var curVideoURL = null;

function showVideo(newVideoURL) {

	// if currVideo and newVideo are different then replace the current video
	if(curVideoURL != newVideoURL) {
		curVideoURL = newVideoURL;
		var videoPane = document.getElementById("videoPane");
		var wmv = '<OBJECT width="360px" height="273px" ';;
		wmv += 'classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ';
		wmv += 'standby="Loading Video..." ';
		wmv += 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ';
		wmv += 'type="application/x-oleobject">';
		wmv += '<PARAM name="filename" value="'+newVideoURL+'" />';
		wmv += '<PARAM name="ShowControls" VALUE="true" />';
		wmv += '<param name="ShowStatusBar" value="true" />';
		wmv += '<PARAM name="ShowDisplay" VALUE="false" />';
		wmv += '<PARAM name="autostart" VALUE="true" />';
		wmv += '<PARAM name="ClickToPlay" VALUE="true" />';
		wmv += '<PARAM name="AllowScan" VALUE="true" />';
		wmv += '<EMBED TYPE="application/x-mplayer2" src="'+newVideoURL+'" width="360px" height="273px" ShowControls="true" ShowStatusBar="true" ShowDisplay="false" autostart="true" ClickToPlay="true" AllowScan="true"></EMBED>';
		wmv += '</OBJECT>';
		videoPane.innerHTML = wmv;
	}
	
}

function showsmallVideo(newVideoURL) {

	// if currVideo and newVideo are different then replace the current video
	if(newVideoURL != "") {
		var videoPane = document.getElementById("videocontsmlvid");
		var wmv = '<OBJECT width="360px" height="273px" ';;
		wmv += 'classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ';
		wmv += 'standby="Loading Video..." ';
		wmv += 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" ';
		wmv += 'type="application/x-oleobject">';
		wmv += '<PARAM name="filename" value="'+newVideoURL+'" />';
		wmv += '<PARAM name="ShowControls" VALUE="true" />';
		wmv += '<param name="ShowStatusBar" value="true" />';
		wmv += '<PARAM name="ShowDisplay" VALUE="false" />';
		wmv += '<PARAM name="autostart" VALUE="true" />';
		wmv += '<PARAM name="ClickToPlay" VALUE="true" />';
		wmv += '<PARAM name="AllowScan" VALUE="true" />';
		wmv += '<EMBED TYPE="application/x-mplayer2" src="'+newVideoURL+'" width="360px" height="273px" ShowControls="true" ShowStatusBar="true" ShowDisplay="false" autostart="true" ClickToPlay="true" AllowScan="true"></EMBED>';
		wmv += '</OBJECT>';
		videocontsmlvid.innerHTML = wmv;
	}
	
}
