
function SU_writeEmbedVideo(videoUrl, W, str, type){
Pa = ""
Pb = ""
	if (videoUrl!="") 
	{

		if (type==null || type == 'undefined' || type == 'null')
			type = 'DAILYMOTION';
	
	  //alert(type);


	   params = str.split("§")
	   for (i=0; i<params.length; i++)
	   {
		vals = params[i].split('|')
		Pa+= ' ' + vals[0] + '="' + vals[1] + '"'
		Pb+= '<param name="' + vals[0] + '" value="' + vals[1] + '"/>'
	   }

	   switch (type)
	   {
		  case 'YALP':
			document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" height="243" width="'+ W +'" id="yalplayer" align="middle">');
			document.write('<param name="allowScriptAccess" value="always" />');
			document.write('<param name="allowFullScreen" value="true" />');
			document.write('<param name="movie" value="' + videoUrl + '&size=s&color=00ccff&corr=0"></param>');
			document.write('<param name="quality" value="high" />');
			document.write('<param name="bgcolor" value="black" />');
			document.write('<param name="wmode" value="transparent" />');
			document.write('<embed src="' + videoUrl + '&size=s&color=00ccff&corr=0" quality="high" bgcolor="black" height="243" width="' + W + '" name="yalplayer" align="middle" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" ></embed>');
			document.write('</object>');
			
			break
		case "DAILYMOTION":
			document.write('<object width="'+ W +'">')
			document.write('<param name="wmode" value="transparent" />');
			document.write('<param value="' + videoUrl + '" name="movie"/>')
			document.write(Pb)
			document.write('<embed width="'+ W +'" type="application/x-shockwave-flash" src="' + videoUrl + '" ' + Pa + ' wmode="transparent"/>')
			document.write('</object>')
			break
		default:
			document.write('<object width="'+ W +'">')
			document.write('<param name="wmode" value="transparent" />');
			document.write('<param value="' + videoUrl + '" name="movie"/>')
			document.write(Pb)
			document.write('<embed width="'+ W +'" type="application/x-shockwave-flash" src="' + videoUrl + '" ' + Pa + ' wmode="transparent"/>')
			document.write('</object>')

	   }

   }

}

