document.writeln('<script>\r\n<!--\r\nfunction playMedia(mediaURL,rpt,height,width) {\r\n\r\nvar mediaURL,rpt,height,width\r\n\r\nif (GetBrowser() == "Netscape") \r\n	embedMPlayer(mediaURL,rpt,height,width);  \r\nif (GetBrowser() == "IE") \r\n	embedIEobject(mediaURL,rpt,height,width);\r\nif (navigator.appName.substring(0,5) == "WebTV")\r\n	embedSource(mediaURL,rpt,height,width)\r\n}\r\n\r\nfunction embedSource(mediaURL,rpt,height,width) {\r\n\r\n    var CodeGen = ""\r\n    var mediaURL,rpt,height,width\r\n 		 	\r\n	 CodeGen = \'<embed src="\' + mediaURL + \'"\' + \'\\n\' ;\r\n	 CodeGen += \' height=\' + height + \' width=\' + width + \' autostart="true"\' + \'\\n\'\r\n	 CodeGen += \' LOOP=\' + rpt + \'>\'\r\n	 \r\n    document.write(CodeGen)\r\n\r\n}\r\n\r\n\r\nfunction embedMPlayer(mediaURL,rpt,height,width)	{\r\n		CodeGen = "" \r\n    	var mediaURL,rpt,height,width\r\n				 	\r\n		CodeGen = \'<embed type="application\/x-mplayer2" \' + \'\\n\' ;\r\n    	CodeGen = CodeGen + \' pluginspage="http:\/\/www.microsoft.com\/Windows\/MediaPlayer\/" \' + \'\\n\' ;\r\n	 	CodeGen = CodeGen + \'Name="MediaPlayer" \' + \'src="\' + mediaURL + \'" \' + \'\\n\' ;\r\n	 	CodeGen = CodeGen + \'autoStart=1 \' ;\r\n		if ((height == 24) && (width == 299)) \r\n			CodeGen = CodeGen + \'ShowStatusBar=1 \'; \r\n		if ((height >= 50) && (width >= 200)) \r\n			CodeGen = CodeGen + \'ShowStatusBar=1 \'; \r\n		if ((height <= 49) && (width != 299))\r\n			CodeGen = CodeGen + \'ShowStatusBar=0 \'; \r\n		\r\n		CodeGen = CodeGen + \'playCount=\' + rpt + \' \' ;\r\n		CodeGen = CodeGen + \'volume=-1 \' ;\r\n		CodeGen = CodeGen + \'HEIGHT=\' + height + \' WIDTH=\' + width + \'>\'\r\n				\r\n		 \r\n		document.write(CodeGen)\r\n	\r\n}\r\n\r\nfunction embedIEobject(mediaURL,rpt,height,width){\r\n		CodeGen = "" \r\n    	var mediaURL,rpt,height,width\r\n\r\n		CodeGen = \'<object id=Player\' + \'\\n\' ;\r\n		CodeGen += \'codeBase=http:\/\/activex.microsoft.com\/activex\/controls\/mplayer\/en\/nsmp2inf.cab#Version=6,0,02,902\' + \'\\n\' ;\r\n		CodeGen += \'type=application\/x-oleobject height=\' + height + \' width=\' + width + \'\\n\' ;\r\n		CodeGen += \' standby="Loading Microsoft® Windows® Media Player components..." \' + \'\\n\' ;\r\n		CodeGen += \'classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"> \' + \'\\n\' ;\r\n		CodeGen += \'<param NAME="Filename" VALUE="\' + mediaURL + \'">\' + \'\\n\' ;\r\n		if ((height == 24) && (width == 299)) \r\n			CodeGen += \'<param NAME="ShowStatusBar" VALUE= "true">\';\r\n		if ((height >= 50) && (width >= 200)) \r\n			CodeGen += \'<param NAME="ShowStatusBar" VALUE= "true">\'; \r\n		if ((height <= 49) && (width != 299))\r\n			CodeGen += \'<param NAME="ShowStatusBar" VALUE= "false"> \';\r\n		\r\n		CodeGen += \'<param NAME="autoStart" VALUE="true"><param NAME="Volume" VALUE="-1000">\' + \'\\n\' ;\r\n		CodeGen += \'<param NAME="playCount" VALUE=\' + rpt + \'><\/object>\'\r\n		\r\n		document.write(CodeGen)\r\n\r\n}\r\n\r\nfunction GetBrowser()\r\n{\r\n   var agt=navigator.userAgent.toLowerCase();\r\n   if( ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)) )\r\n       return "IE";\r\n   else if( ((agt.indexOf(\'mozilla\')!=-1) && (agt.indexOf(\'spoofer\')==-1)\r\n         && (agt.indexOf(\'compatible\') == -1) && (agt.indexOf(\'opera\')==-1)\r\n         && (agt.indexOf(\'webtv\')==-1) && (agt.indexOf(\'hotjava\')==-1)) )\r\n       return "Netscape";\r\n   else\r\n       return "unknown";\r\n}\r\n-->\r\n<\/script>\r\n');
