/*
	File:		common.js
*/
function popupMovie(sUrl, sTitle, iMovieType, iWidth, iHeight){
	var oWin = window.open('','cjMoviePopup','status=no,toolbars=no, height='+iHeight+',width='+iWidth);
	oWin.document.write('<html><head><title>' + sTitle + '</title></head><body style="padding:0px;margin:0px;">');
	
	switch (iMovieType){
		case 	1: //windows media
			oWin.document.write('<OBJECT CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" WIDTH="100%" HEIGHT="100%" CODEBASE = "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902">');
			oWin.document.write('<PARAM name="SRC" VALUE="'+ sUrl +'">');
			oWin.document.write('<PARAM name="AUTOPLAY" VALUE="true">');
			oWin.document.write('<PARAM name="CONTROLLER" VALUE="true">');
			oWin.document.write('<embed type="application/x-mplayer2" src="' + sUrl + '" width="100%" height="100%" PLUGINSPAGE="http://www.microsoft.com/Windows/MediaPlayer" KIOSKMODE = "True" autoplay="true"></embed>');
			oWin.document.write('</OBJECT>');
			break;
			
		case	2:// real player
			oWin.document.write('<OBJECT ID="movieClip" CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT="100%" WIDTH="100%" BORDER="0">');
	        oWin.document.write('<PARAM NAME="SRC" VALUE="'+ sUrl +'">');
	        oWin.document.write('<PARAM NAME="CONTROLS" VALUE="all">');
	        oWin.document.write('<PARAM NAME="AUTOSTART" VALUE="true">');
	        oWin.document.write('<PARAM NAME="AUTOPLAY" VALUE="true">');
	        oWin.document.write('<EMBED SRC=""'+ sUrl +'" HEIGHT="100%" WIDTH="100%" AUTOSTART="true" AUTOPLAY="true" CONTROLS="all" BORDER="0">');
	        oWin.document.write('</OBJECT>');
	        break;
	        
	    case 	3://quicktime
	    	oWin.document.write('<embed src="'+sUrl+'" width="100%" height="100%" id="movie" name="movie"></embed>');
	    	break;
	    	
	    case	4://flash
	    	oWin.document.write('');
			oWin.document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + iWidth + '" HEIGHT="' + iHeight + '" id="' + sTitle + '" ALIGN="">');
 			oWin.document.write('<PARAM NAME=movie VALUE="' + sUrl + '">');
 			oWin.document.write('<PARAM NAME=quality VALUE=high>');
 			oWin.document.write('<PARAM NAME=wmode VALUE=transparent>');
 			oWin.document.write('<EMBED src="' + sUrl + '" wmode=transparent quality=high WIDTH="' + iWidth + '" HEIGHT="' + iHeight + '" NAME="' + sTitle + '" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>');

	case 5: //googlevideo
		oWin.document.write('<embed style="width:' + iWidth + '; height:' + iHeight + ';" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?videoUrl='+ sUrl +'" allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" wmode="window" salign="TL"  FlashVars="playerMode=embedded"> </embed>');
              
	}
	
	oWin.document.write('</body></html>');
	oWin.document.close();
}
