
function playvod(diz,w,h)
{
	var strExt,strExtx,strExt3;
	strExt=diz.substring(diz.length-2,diz.length);
	strExt3=diz.substring(diz.length-3,diz.length);	
	strExtx=diz.substring(diz.length-4,diz.length);
	strExt=strExt.toLowerCase();
	if((strExt3=="swf"))
	{		
		document.write("<DIV align=center>");
		document.write("<object classid=\"clsid:D27CDB6E-AE6D-11CF-96B8-444553540000\"  codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0\" border=\"0\" width=\""+w+"\" height=\""+h+"\">");
		document.write("<param name=\"movie\" value=\""+diz+"\">");
		document.write("<param name=\"quality\" value=\"High\">");
		document.write("<embed src=\""+diz+"\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\"  width=\""+w+"\" height=\""+h+"\"></object>");
		document.write("</div>");
	}
	else if((strExt3=="flv"))		
	{
		var flvurl=diz;
		document.write("<DIV align=center>");			
		document.write('<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="'+h+'" width="'+w+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">');
        document.write('<param value="system/scripts/flvplayer.swf" name="movie" />');
        document.write('<param value="high" name="quality" />');
        document.write('<param value="true" name="allowFullScreen" />');
        document.write('<param value="vcastr_file='+flvurl+'&IsAutoPlay=1&IsContinue=1&DefaultVolume=0" name="FlashVars" />');
        document.write('</object>'); 
		document.write("</div>");
	}
		
	else if((strExt3=="avi"))		
	{
		var flvurl=diz;
		document.write("<DIV align=center>");
		document.write('<object id="video" width="'+w+'" height="'+h+'" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">'); 
		document.write('<param name="ShowDisplay" value="0"> '); 
		document.write('<param name="ShowControls" value="1"> '); 
		document.write('<param name="AutoStart" value="1"> '); 
		document.write('<param name="AutoRewind" value="0"> '); 
		document.write('<param name="PlayCount" value="0"> '); 
		document.write('<param name="Appearance" value="0"> '); 
		document.write('<param name="BorderStyle " value="0"> '); 
		document.write('<param name="MovieWindowHeight" value="240"> '); 
		document.write('<param name="MovieWindowWidth" value="320"> '); 
		document.write('<param name="FileName" value="'+diz+'"> '); 
		document.write('<embed width="300" height="200" border="0" showdisplay="0" ' +
		'showcontrols="1" autostart="1" autorewind="0" playcount="0"moviewindowheight="240" ' +
		'moviewindowwidth="320" filename="css/sss.avi" src="css/sss.avi"></embed> '); 
		document.write('</object> '); 
		document.write("</div>");
	}
	else if((strExt3=="wmv"))		
	{
		var flvurl=diz;
		document.write("<DIV align=center>");	
		document.write('<object width="'+w+'" height="'+h+'" ' +
		'classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" ' +
		'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" ' +
		'standby="Loading Microsoft Windows Media Player components..." ' +
		'type="application/x-oleobject" hspace="5">'); 
		document.write('<param name="AutoRewind" value=1>'); 
		document.write('<param name="FileName" value="'+diz+'">'); 
		document.write('<param name="ShowControls" value="1">'); 
		document.write('<param name="ShowPositionControls" value="0">'); 
		document.write('<param name="ShowAudioControls" value="1">'); 
		document.write('<param name="ShowTracker" value="0">'); 
		document.write('<param name="ShowDisplay" value="0">'); 
		document.write('<param name="ShowStatusBar" value="0">'); 
		document.write('<param name="ShowGotoBar" value="0">'); 
		document.write('<param name="ShowCaptioning" value="0">'); 
		document.write('<param name="AutoStart" value="1">'); 
		document.write('<param name="Volume" value="5000">'); 
		document.write('<param name="AnimationAtStart" value="0">'); 
		document.write('<param name="TransparentAtStart" value="0">'); 
		document.write('<param name="AllowChangeDisplaySize" value="0">'); 
		document.write('<param name="AllowScan" value="0">'); 
		document.write('<param name="EnableContextMenu" value="0">'); 
		document.write('<param name="ClickToPlay" value="0">'); 
		document.write('</object>'); 
		document.write("</div>");
		
	}
	else if ((strExt3!="ram") && (strExt!="rm") && (strExtx!="rmvb")) 
	{

		
		document.write("<DIV align=center>");
		document.write("<OBJECT ID=\"Player\" width=\""+w+"\" height=\""+h+"\"  CLASSID=\"CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6\">");
		document.write("<param name=\"AutoStart\" value=\"True\">");
		document.write("<param name=\"uiMode\" value=\"full\">");
		document.write("<param name=\"stretchToFit\" value=\"1\">");
		document.write("<PARAM NAME=\"enableContextMenu\" VALUE=\"true\">");
		document.write("<param name=\"URL\" value=\""+diz+"\"></OBJECT>");
		document.write("</DIV>");
	}	
  else 
	{
		var strx,nPosx;
		strx=diz.substring(6,diz.length);	
		nPosx=strx.indexOf("/");	
		document.write("<DIV align=center>");
		document.write("<OBJECT id=RAOCX width=\""+w+"\" height=\""+(h-30)+"\" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA name=rmplay>");
		document.write("<PARAM NAME=\"SRC\" VALUE=\""+diz+"\">");
		document.write("<PARAM NAME=\"CONSOLE\" VALUE=\"Clip1\">");
		document.write("<PARAM NAME=\"CONTROLS\" VALUE=\"imagewindow\">");
		document.write("<PARAM NAME=\"AUTOSTART\" VALUE=\"true\"></OBJECT>");
		document.write("</DIV><DIV align=center>");
		document.write("<OBJECT id=video2 height=30 width=\""+w+"\" classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA>");
		document.write("<PARAM NAME=\"SRC\" VALUE=\""+diz+"\">");
		document.write("<PARAM NAME=\"AUTOSTART\" VALUE=\"-1\">");
		document.write("<PARAM NAME=\"SHUFFLE\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"PREFETCH\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"NOLABELS\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"CONTROLS\" VALUE=\"controlpanel\">");
		document.write("<PARAM NAME=\"LOOP\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"CONSOLE\" VALUE=\"Clip1\">");
		document.write("<PARAM NAME=\"NUMLOOP\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"CENTER\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"MAINTAINASPECT\" VALUE=\"0\">");
		document.write("<PARAM NAME=\"BACKGROUNDCOLOR\" VALUE=\"#000000\"></OBJECT>");
		document.write("</div>");
	}
}
