function videoplay(viedourl)
{
//var viedourl='http://61.187.98.156/movies/dongman/mao&laoshu/cat&m02.rmvb';
var filetype=viedourl.substring(viedourl.length-3,viedourl.length); 

var spwidth="246";
var spheight="281";

if (filetype=="avi"||filetype=="asf"||filetype=="wmv") {

document.writeln("<object classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,1,5,217\" id=MediaPlayer type=application/x-oleobject width=\""+spwidth+"\" height=\""+spheight+"\" standby=\"Loading Microsoft Windows Media Player components...\" VIEWASTEXT align=MIDDLE>"); 
document.writeln("<param name=AudioStream value=-1>"); 
document.writeln("<param name=AutoSize value=0>"); 
document.writeln("<param name=AutoStart value=1>"); 
document.writeln("<param name=AnimationAtStart value=0>"); 
document.writeln("<param name=AllowScan value=-1>"); 
document.writeln("<param name=AllowChangeDisplaySize value=0>"); 
document.writeln("<param name=AutoRewind value=0>"); 
document.writeln("<param name=Balance value=0>"); 
document.writeln("<param name=BaseURL value=\"\">"); 
document.writeln("<param name=BufferingTime value=5>"); 
document.writeln("<param name=CaptioningID value=\"\">"); 
document.writeln("<param name=ClickToPlay value=0>"); 
document.writeln("<param name=CursorType value=32512>"); 
document.writeln("<param name=CurrentPosition value=-1>"); 
document.writeln("<param name=CurrentMarker value=0>"); 
document.writeln("<param name=DefaultFrame value=1>"); 
document.writeln("<param name=DisplayBackColor value=0>"); 
document.writeln("<param name=DisplayForeColor value=16777215>"); 
document.writeln("<param name=DisplayMode value=0>"); 
document.writeln("<param name=DisplaySize value=0>"); 
document.writeln("<param name=Enabled value=-1>"); 
document.writeln("<param name=EnableContextMenu value=-1>"); 
document.writeln("<param name=EnablePositionControls value=0>"); 
document.writeln("<param name=EnableFullScreenControls value=0>"); 
document.writeln("<param name=EnableTracker value=1>"); 
document.writeln("<param name=Filename value=\""+viedourl+"\">"); 
document.writeln("<param name=InvokeURLs value=-1>"); 
document.writeln("<param name=Language value=-1>"); 
document.writeln("<param name=Mute value=0>"); 
document.writeln("<param name=PlayCount value=1>"); 
document.writeln("<param name=PreviewMode value=0>"); 
document.writeln("<param name=Rate value=1>"); 
document.writeln("<param name=SAMILang value=\"\">"); 
document.writeln("<param name=SAMIStyle value=\"\">"); 
document.writeln("<param name=SAMIFileName value=\"\">"); 
document.writeln("<param name=SelectionStart value=0>"); 
document.writeln("<param name=SelectionEnd value=true>"); 
document.writeln("<param name=SendOpenStateChangeEvents value=-1>"); 
document.writeln("<param name=SendWarningEvents value=-1>"); 
document.writeln("<param name=SendErrorEvents value=-1>"); 
document.writeln("<param name=SendKeyboardEvents value=0>"); 
document.writeln("<param name=SendMouseClickEvents value=0>"); 
document.writeln("<param name=SendMouseMoveEvents value=0>"); 
document.writeln("<param name=SendPlayStateChangeEvents value=-1>"); 
document.writeln("<param name=ShowCaptioning value=0>"); 
document.writeln("<param name=ShowControls value=-1>"); 
document.writeln("<param name=ShowAudioControls value=1>"); 
document.writeln("<param name=ShowDisplay value=0>"); 
document.writeln("<param name=ShowGotoBar value=1>"); 
document.writeln("<param name=ShowPositionControls value=0>"); 
document.writeln("<param name=ShowStatusBar value=1>"); 
document.writeln("<param name=ShowTracker value=1>"); 
document.writeln("<param name=TransparentAtStart value=0>"); 
document.writeln("<param name=VideoBorderWidth value=0>"); 
document.writeln("<param name=VideoBorderColor value=0>"); 
document.writeln("<param name=VideoBorder3D value=0>"); 
document.writeln("<param name=Volume value=-1070>"); 
document.writeln("<param name=WindowlessVideo value=0>"); 
document.writeln("</object>");

}

if (filetype=="mpg"||filetype=="peg") {


document.writeln("<object classid=\"clsid:05589FA1-C356-11CE-BF01-00AA0055595A\" id=\"ActiveMovie1\" width=\""+spwidth+"\" height=\""+spheight+"\"> ");
document.writeln("<param name=\"Appearance\" value=\"0\"> ");
document.writeln("<param name=\"AutoStart\" value=\"-1\"> ");
document.writeln("<param name=\"AllowChangeDisplayMode\" value=\"-1\"> ");
document.writeln("<param name=\"AllowHideDisplay\" value=\"0\"> ");
document.writeln("<param name=\"AllowHideControls\" value=\"-1\"> ");
document.writeln("<param name=\"AutoRewind\" value=\"-1\"> ");
document.writeln("<param name=\"Balance\" value=\"0\"> ");
document.writeln("<param name=\"CurrentPosition\" value=\"0\"> ");
document.writeln("<param name=\"DisplayBackColor\" value=\"0\"> ");
document.writeln("<param name=\"DisplayForeColor\" value=\"16777215\"> ");
document.writeln("<param name=\"DisplayMode\" value=\"0\"> ");
document.writeln("<param name=\"Enabled\" value=\"-1\"> ");
document.writeln("<param name=\"EnableContextMenu\" value=\"-1\"> ");
document.writeln("<param name=\"EnablePositionControls\" value=\"-1\"> ");
document.writeln("<param name=\"EnableSelectionControls\" value=\"0\"> ");
document.writeln("<param name=\"EnableTracker\" value=\"-1\"> ");
document.writeln("<param name=\"Filename\" value=\""+viedourl+"\" valuetype=\"ref\"> ");
document.writeln("<param name=\"FullScreenMode\" value=\"0\"> ");
document.writeln("<param name=\"MovieWindowSize\" value=\"0\"> ");
document.writeln("<param name=\"PlayCount\" value=\"1\"> ");
document.writeln("<param name=\"Rate\" value=\"1\"> ");
document.writeln("<param name=\"SelectionStart\" value=\"-1\"> ");
document.writeln("<param name=\"SelectionEnd\" value=\"-1\"> ");
document.writeln("<param name=\"ShowControls\" value=\"-1\"> ");
document.writeln("<param name=\"ShowDisplay\" value=\"-1\"> ");
document.writeln("<param name=\"ShowPositionControls\" value=\"0\"> ");
document.writeln("<param name=\"ShowTracker\" value=\"-1\"> ");
document.writeln("<param name=\"Volume\" value=\"-480\"> ");
document.writeln("</object>");

}


if (filetype==".rm") { 


document.writeln("<OBJECT ID=video1 CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" width=\""+spwidth+"\" height=\""+spheight+"\"> ");
document.writeln("<param name=\"_ExtentX\" value=\"9313\"> ");
document.writeln("<param name=\"_ExtentY\" value=\"7620\"> ");
document.writeln("<param name=\"AUTOSTART\" value=\"0\"> ");
document.writeln("<param name=\"SHUFFLE\" value=\"0\"> ");
document.writeln("<param name=\"PREFETCH\" value=\"0\"> ");
document.writeln("<param name=\"NOLABELS\" value=\"0\"> ");
document.writeln("<param name=\"SRC\" value=\""+viedourl+"\"> ");
document.writeln("<param name=\"CONTROLS\" value=\"ImageWindow\"> ");
document.writeln("<param name=\"CONSOLE\" value=\"Clip1\"> ");
document.writeln("<param name=\"LOOP\" value=\"0\"> ");
document.writeln("<param name=\"NUMLOOP\" value=\"0\"> ");
document.writeln("<param name=\"CENTER\" value=\"0\"> ");
document.writeln("<param name=\"MAINTAINASPECT\" value=\"0\"> ");
document.writeln("<param name=\"BACKGROUNDCOLOR\" value=\"#000000\">");
document.writeln("<embed SRC type=\"audio/x-pn-realaudio-plugin\" CONSOLE=\"Clip1\" CONTROLS=\"ImageWindow\" width=\""+spwidth+"\" height=\""+spheight+"\" AUTOSTART=\"false\"> ");
document.writeln("</OBJECT>");


}


if (filetype=="mvb") {
document.writeln("<OBJECT width=\""+spwidth+"\" height=\""+spheight+"\" CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" NAME=\"player\">");
 document.writeln("<PARAM NAME=\"_ExtentX\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"_ExtentY\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"AUTOSTART\" VALUE=\"-1\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"SHUFFLE\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"PREFETCH\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"NOLABELS\" VALUE=\"-1\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"SRC\" VALUE=\""+viedourl+"\">");  
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"CONTROLS\" VALUE=\"Imagewindow\">"); 
 document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"CONSOLE\" VALUE=\"clip1\">");  
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"LOOP\" VALUE=\"0\">");  
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"NUMLOOP\" VALUE=\"0\">");  
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"CENTER\" VALUE=\"0\">");  
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"MAINTAINASPECT\" VALUE=\"0\">");  
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"BACKGROUNDCOLOR\" VALUE=\"#000000\">"); 
document.writeln("</PARAM>"); document.writeln("</OBJECT><BR>");  
document.writeln("<OBJECT ID=\"RP2\" HEIGHT=\"50\" width=\""+spwidth+"\" CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\">"); 
document.writeln("<PARAM NAME=\"_ExtentX\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"_ExtentY\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"AUTOSTART\" VALUE=\"-1\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"SHUFFLE\" VALUE=\"0\">");
 document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"PREFETCH\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"NOLABELS\" VALUE=\"-1\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"SRC\" VALUE=\""+viedourl+"\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"CONTROLS\" VALUE=\"ControlPanel,StatusBar\">");
 document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"CONSOLE\" VALUE=\"clip1\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"LOOP\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"NUMLOOP\" VALUE=\"0\">");
 document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"CENTER\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"MAINTAINASPECT\" VALUE=\"0\">"); 
document.writeln("</PARAM>");  
document.writeln("<PARAM NAME=\"BACKGROUNDCOLOR\" VALUE=\"#000000\">"); 
document.writeln("</PARAM>"); 
document.writeln("</OBJECT>"); }
}