<%
Function VideoPlayer(Videourl,xWidth,yHeight)
	if isnull(Videourl)=true or videourl="" then
		VideoPlayer=""
	 	exit function
	end if
	extname=split(videourl,".")
	select case lcase(extname(ubound(extname)))
		case "rm":
			videourlrtsp=replace(lcase(videourl),"http","rtsp")
			vstr=vstr&"<OBJECT ID=video1 CLASSID='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA' HEIGHT='"&yHeight&"' WIDTH='"&xWidth&"'>"&vbcrlf
			vstr=vstr&"<param name='_ExtentX' value='9313'>"&vbcrlf
			vstr=vstr&"<param name='_ExtentY' value='7620'>"&vbcrlf
			vstr=vstr&"<param name='AUTOSTART' value='0'>"&vbcrlf
			vstr=vstr&"<param name='SHUFFLE' value='0'>"&vbcrlf
			vstr=vstr&"<param name='PREFETCH' value='0'>"&vbcrlf
			vstr=vstr&"<param name='NOLABELS' value='0'>"&vbcrlf
			vstr=vstr&"<param name='SRC' value='"&videourlrtsp&"'>"&vbcrlf
			vstr=vstr&"<param name='CONTROLS' value='ImageWindow'>"&vbcrlf
			vstr=vstr&"<param name='CONSOLE' value='Clip1'>"&vbcrlf
			vstr=vstr&"<param name='LOOP' value='0'>"&vbcrlf
			vstr=vstr&"<param name='NUMLOOP' value='0'>"&vbcrlf
			vstr=vstr&"<param name='CENTER' value='0'>"&vbcrlf
			vstr=vstr&"<param name='MAINTAINASPECT' value='0'>"&vbcrlf
			vstr=vstr&"<param name='BACKGROUNDCOLOR' value='#000000'><embed SRC type='audio/x-pn-realaudio-plugin' CONSOLE='Clip1' CONTROLS='ImageWindow' HEIGHT='"&yHeight&"' WIDTH='"&xWidth&"' AUTOSTART='false'>"&vbcrlf
			vstr=vstr&"</OBJECT>"&vbcrlf
		case "wma": 
			vstr=vstr&"<object classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' id='MediaPlayer1' >"&vbcrlf
			vstr=vstr&"<param name='Filename' value='"&videourl&"'>"&vbcrlf
			vstr=vstr&"<param name='PlayCount' value='1'>"&vbcrlf
			vstr=vstr&"<param name='AutoStart' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ClickToPlay' value='1'>"&vbcrlf
			vstr=vstr&"<param name='DisplaySize' value='0'>"&vbcrlf
			vstr=vstr&"<param name='EnableFullScreen Controls' value='1'>"&vbcrlf
			vstr=vstr&"<param name='ShowAudio Controls' value='1'>"&vbcrlf
			vstr=vstr&"<param name='EnableContext Menu' value='1'>"&vbcrlf
			vstr=vstr&"<param name='ShowDisplay' value='1'>"&vbcrlf
			vstr=vstr&"</object>"&vbcrlf
		case "avi":
			vstr=vstr&"<object id='video' width='"&xWidth&"' height='"&yHeight&"' border='0' classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'>"&vbcrlf
			vstr=vstr&"<param name='ShowDisplay' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ShowControls' value='1'>"&vbcrlf
			vstr=vstr&"<param name='AutoStart' value='1'>"&vbcrlf
			vstr=vstr&"<param name='AutoRewind' value='0'>"&vbcrlf
			vstr=vstr&"<param name='PlayCount' value='0'>"&vbcrlf
			vstr=vstr&"<param name='Appearance value='0 value=''>"&vbcrlf
			vstr=vstr&"<param name='BorderStyle value='0 value=''>"&vbcrlf
			vstr=vstr&"<param name='MovieWindowHeight' value='240'>"&vbcrlf
			vstr=vstr&"<param name='MovieWindowWidth' value='320'>"&vbcrlf
			vstr=vstr&"<param name='FileName' value='"&VideoUrl&"'>"&vbcrlf
			vstr=vstr&"<embed width='"&xWidth&"' height='"&yHeight&"' border='0' showdisplay='0' showcontrols='1' autostart='1' autorewind='0' playcount='0' moviewindowheight='"&yHeight&"' moviewindowwidth='"&xWidth&"' filename='"&VideoUrl&"'' src='"&VideoUrl&"'>"&vbcrlf
			vstr=vstr&"</embed>"&vbcrlf
			vstr=vstr&"</object>"&vbcrlf
		case "mpg":
			vstr=vstr&"<object classid='clsid:05589FA1-C356-11CE-BF01-00AA0055595A' id='ActiveMovie1' width='"&xWidth&"' height='"&yHeight&"'>"&vbcrlf
			vstr=vstr&"<param name='Appearance' value='0'>"&vbcrlf
			vstr=vstr&"<param name='AutoStart' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='AllowChangeDisplayMode' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='AllowHideDisplay' value='0'>"&vbcrlf
			vstr=vstr&"<param name='AllowHideControls' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='AutoRewind' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='Balance' value='0'>"&vbcrlf
			vstr=vstr&"<param name='CurrentPosition' value='0'>"&vbcrlf
			vstr=vstr&"<param name='DisplayBackColor' value='0'>"&vbcrlf
			vstr=vstr&"<param name='DisplayForeColor' value='16777215'>"&vbcrlf
			vstr=vstr&"<param name='DisplayMode' value='0'>"&vbcrlf
			vstr=vstr&"<param name='Enabled' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='EnableContextMenu' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='EnablePositionControls' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='EnableSelectionControls' value='0'>"&vbcrlf
			vstr=vstr&"<param name='EnableTracker' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='Filename' value='"&VideoUrl&"' valuetype='ref'>"&vbcrlf
			vstr=vstr&"<param name='FullScreenMode' value='0'>"&vbcrlf
			vstr=vstr&"<param name='MovieWindowSize' value='0'>"&vbcrlf
			vstr=vstr&"<param name='PlayCount' value='1'>"&vbcrlf
			vstr=vstr&"<param name='Rate' value='1'>"&vbcrlf
			vstr=vstr&"<param name='SelectionStart' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='SelectionEnd' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='ShowControls' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='ShowDisplay' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='ShowPositionControls' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ShowTracker' value='-1'>"&vbcrlf
			vstr=vstr&"<param name='Volume' value='-480'>"&vbcrlf
			vstr=vstr&"</object>"&vbcrlf
		case "wmv":
			vstr=vstr&"<object id='NSPlay' width=200 height=180 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' align='right' hspace='5'>"&vbcrlf
			vstr=vstr&"<param name='AutoRewind' value=1>"&vbcrlf
			vstr=vstr&"<param name='FileName' value='"&VideoUrl&"'>"&vbcrlf
			vstr=vstr&"<param name='ShowControls' value='1'>"&vbcrlf
			vstr=vstr&"<param name='ShowPositionControls' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ShowAudioControls' value='1'>"&vbcrlf
			vstr=vstr&"<param name='ShowTracker' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ShowDisplay' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ShowStatusBar' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ShowGotoBar' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ShowCaptioning' value='0'>"&vbcrlf
			vstr=vstr&"<param name='AutoStart' value=1>"&vbcrlf
			vstr=vstr&"<param name='Volume' value='-2500'>"&vbcrlf
			vstr=vstr&"<param name='AnimationAtStart' value='0'>"&vbcrlf
			vstr=vstr&"<param name='TransparentAtStart' value='0'>"&vbcrlf
			vstr=vstr&"<param name='AllowChangeDisplaySize' value='0'>"&vbcrlf
			vstr=vstr&"<param name='AllowScan' value='0'>"&vbcrlf
			vstr=vstr&"<param name='EnableContextMenu' value='0'>"&vbcrlf
			vstr=vstr&"<param name='ClickToPlay' value='0'>"&vbcrlf
			vstr=vstr&"</object>"&vbcrlf
		case "flv":
			vstr=vstr&"<OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0 height=400 width=480 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME='_cx' VALUE='12700'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='_cy' VALUE='10583'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='FlashVars' VALUE=''>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Movie' VALUE='http://192.168.1.100:7103/template/shareplayer.swf?inputName="&videourl&"&amp;coverName='>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Src' VALUE='http://192.168.1.100:7103/template/shareplayer.swf?inputName="&videourl&"&amp;coverName='>"&vbcrlf
			vstr=vstr&"<PARAM NAME='WMode' VALUE='Window'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Play' VALUE='-1'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Loop' VALUE='-1'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Quality' VALUE='High'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='SAlign' VALUE=''>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Menu' VALUE='-1'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Base' VALUE=''>"&vbcrlf
			vstr=vstr&"<PARAM NAME='AllowScriptAccess' VALUE=''>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Scale' VALUE='ShowAll'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='DeviceFont' VALUE='0'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='EmbedMovie' VALUE='0'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='BGColor' VALUE='FFFFFF'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='SWRemote' VALUE=''>"&vbcrlf
			vstr=vstr&"<PARAM NAME='MovieData' VALUE=''>"&vbcrlf
			vstr=vstr&"<PARAM NAME='SeamlessTabbing' VALUE='1'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='Profile' VALUE='0'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='ProfileAddress' VALUE=''>"&vbcrlf
			vstr=vstr&"<PARAM NAME='ProfilePort' VALUE='0'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='AllowNetworking' VALUE='all'>"&vbcrlf
			vstr=vstr&"<PARAM NAME='AllowFullScreen' VALUE='true'>"&vbcrlf
			vstr=vstr&"<embed src='http://192.168.1.100:7103/template/shareplayer.swf?inputName="&videourl&"&coverName=' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='480' height='400' allowfullScreen='true'></embed>"&vbcrlf
			vstr=vstr&"</OBJECT>"&vbcrlf
		case else
			vstr=vstr&"<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=410 height=400 standby='Loading Microsoft Windows Media Player components...' VIEWASTEXT align=MIDDLE>"&vbcrlf
			vstr=vstr&"<param name=AudioStream value=-1>"&vbcrlf
			vstr=vstr&"<param name=AutoSize value=0>"&vbcrlf
			vstr=vstr&"<param name=AutoStart value=1>"&vbcrlf
			vstr=vstr&"<param name=AnimationAtStart value=0>"&vbcrlf
			vstr=vstr&"<param name=AllowScan value=-1>"&vbcrlf
			vstr=vstr&"<param name=AllowChangeDisplaySize value=0>"&vbcrlf
			vstr=vstr&"<param name=AutoRewind value=0>"&vbcrlf
			vstr=vstr&"<param name=Balance value=0>"&vbcrlf
			vstr=vstr&"<param name=BaseURL value=''>"&vbcrlf
			vstr=vstr&"<param name=BufferingTime value=5>"&vbcrlf
			vstr=vstr&"<param name=CaptioningID value=''>"&vbcrlf
			vstr=vstr&"<param name=ClickToPlay value=0>"&vbcrlf
			vstr=vstr&"<param name=CursorType value=32512>"&vbcrlf
			vstr=vstr&"<param name=CurrentPosition value=-1>"&vbcrlf
			vstr=vstr&"<param name=CurrentMarker value=0>"&vbcrlf
			vstr=vstr&"<param name=DefaultFrame value=1>"&vbcrlf
			vstr=vstr&"<param name=DisplayBackColor value=0>"&vbcrlf
			vstr=vstr&"<param name=DisplayForeColor value=16777215>"&vbcrlf
			vstr=vstr&"<param name=DisplayMode value=0>"&vbcrlf
			vstr=vstr&"<param name=DisplaySize value=0>"&vbcrlf
			vstr=vstr&"<param name=Enabled value=-1>"&vbcrlf
			vstr=vstr&"<param name=EnableContextMenu value=-1>"&vbcrlf
			vstr=vstr&"<param name=EnablePositionControls value=0>"&vbcrlf
			vstr=vstr&"<param name=EnableFullScreenControls value=0>"&vbcrlf
			vstr=vstr&"<param name=EnableTracker value=1>"&vbcrlf
			vstr=vstr&"<param name=Filename value='"&VideoUrl&"'>"&vbcrlf
			vstr=vstr&"<param name=InvokeURLs value=-1>"&vbcrlf
			vstr=vstr&"<param name=Language value=-1>"&vbcrlf
			vstr=vstr&"<param name=Mute value=0>"&vbcrlf
			vstr=vstr&"<param name=PlayCount value=1>"&vbcrlf
			vstr=vstr&"<param name=PreviewMode value=0>"&vbcrlf
			vstr=vstr&"<param name=Rate value=1>"&vbcrlf
			vstr=vstr&"<param name=SAMILang value=''>"&vbcrlf
			vstr=vstr&"<param name=SAMIStyle value=''>"&vbcrlf
			vstr=vstr&"<param name=SAMIFileName value=''>"&vbcrlf
			vstr=vstr&"<param name=SelectionStart value=0>"&vbcrlf
			vstr=vstr&"<param name=SelectionEnd value=true>"&vbcrlf
			vstr=vstr&"<param name=SendOpenStateChangeEvents value=-1>"&vbcrlf
			vstr=vstr&"<param name=SendWarningEvents value=-1>"&vbcrlf
			vstr=vstr&"<param name=SendErrorEvents value=-1>"&vbcrlf
			vstr=vstr&"<param name=SendKeyboardEvents value=0>"&vbcrlf
			vstr=vstr&"<param name=SendMouseClickEvents value=0>"&vbcrlf
			vstr=vstr&"<param name=SendMouseMoveEvents value=0>"&vbcrlf
			vstr=vstr&"<param name=SendPlayStateChangeEvents value=-1>"&vbcrlf
			vstr=vstr&"<param name=ShowCaptioning value=0>"&vbcrlf
			vstr=vstr&"<param name=ShowControls value=1>"&vbcrlf
			vstr=vstr&"<param name=ShowAudioControls value=1>"&vbcrlf
			vstr=vstr&"<param name=ShowDisplay value=1>"&vbcrlf
			vstr=vstr&"<param name=ShowGotoBar value=1>"&vbcrlf
			vstr=vstr&"<param name=ShowPositionControls value=1>"&vbcrlf
			vstr=vstr&"<param name=ShowStatusBar value=1>"&vbcrlf
			vstr=vstr&"<param name=ShowTracker value=1>"&vbcrlf
			vstr=vstr&"<param name=TransparentAtStart value=0>"&vbcrlf
			vstr=vstr&"<param name=VideoBorderWidth value=0>"&vbcrlf
			vstr=vstr&"<param name=VideoBorderColor value=0>"&vbcrlf
			vstr=vstr&"<param name=VideoBorder3D value=0>"&vbcrlf
			vstr=vstr&"<param name=Volume value=-1070>"&vbcrlf
			vstr=vstr&"<param name=WindowlessVideo value=1>"&vbcrlf
			vstr=vstr&"</object>"&vbcrlf
	End Select
	VideoPlayer=vstr
End Function
%>