var rmID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"; 
var wmID="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"; 
var swfID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"; 

var thePlayer; 

function doPlay(fPath){ 
if(!fPath)fPath=document.getElementById("txtURL").value; 
if(fPath==""||fPath==null)return(false); 
fType=fPath.substring(fPath.lastIndexOf(".")+1).toLowerCase(); 
if(thePlayer){ 
document.getElementById("theTurePlayerID").outerHTML=""; 
}
thePlayer=document.createElement("object"); 
thePlayer.width="380"; 
thePlayer.height="245"; 
thePlayer.style.display="none"; 
thePlayer.id="theTurePlayerID"; 
document.getElementById("playerDIV").appendChild(thePlayer); 
switch(fType){ 
case "rm":case "rmvb": 
thePlayer.classid=rmID; 
with(thePlayer){ 
AUTOSTART=-1; 
NOLABELS=0;CONTROLS="Imagewindow,controlpanel"; 
LOOP=0; 
} 
thePlayer.Source=fPath; 
thePlayer.DoPlay(); 
break; 
case "swf": 
thePlayer.classid=swfID; 
thePlayer.movie=fPath; 
break;
default: 
thePlayer.classid=wmID; 
thePlayer.fileName=fPath;
thePlayer.Play(); 
} 

setTimeout("thePlayer.style.display='';",1000); 
}