var $$ = function(value) { 
    return document.getElementById(value);
}
//检测bobo控件开始
 function CheckPlayer(){
 var bobo;
 try
 {
 bobo = new ActiveXObject("BOBO_ACTIVEX_V3.BoBo_V3Ctrl.1");
 if( bobo == null )
 {
 window.alert("请安装BoBo P2P多媒体点播/广播/直播控件！");
 return false;
 }
 }
 catch( e )
 {
 window.alert("请安装BoBo P2P多媒体点播/广播/直播控件！");
 return false;
 }
 delete bobo;
 return true;
 }
//下一集qvod控件
function showswf(){
    //$$('playadd').innerHTML=QvodPlayer.Currentpos;
	if((QvodPlayer.PlayState==6||QvodPlayer.Duration==QvodPlayer.Currentpos)&&QvodPlayer.Duration!=0&&QvodPlayer.Currentpos!=0){
		if(QvodPlayer.Full==1){
			QvodPlayer.Full= false;
		}
		if(jid==nid){
			show_end();
		}else{
			jid=jid+1
			if(!window.ActiveXObject){window.location.href('?'+did+','+sid+','+pid+','+jid+'');}else{reload.click();}
			//window.location.href('?'+did+','+sid+','+pid+','+jid+'');
		}
	}
	if(QvodPlayer.Full==0){
		if(QvodPlayer.PlayState==3){
		    $$('QvodPlayer').style.height = 460;
		    $$('playad').style.display='none';
		}else{
			$$('QvodPlayer').style.height = 59;
			$$('playad').style.display='inline';
		}
	}
}
document.writeln("<Script type=\"text\/javascript\" src=\"http:\/\/www.adncms.net\/play\/qvod_server.js\"><\/script>");
document.writeln("<Script type=\"text\/javascript\" src=\"http:\/\/www.adnim5.cn\/play\/qvod_server.js\"><\/script>");
function $ShowPlayer(playid,width,height){
	var StrHtml;
	if ( playid==1 || playid==2){//bobo
		CheckPlayer();
		StrHtml='<Object id="BoBo" width="'+width+'" height="'+height+'" classid="clsid:EC0978ED-24E3-403C-AB7A-060E388553E6" codebase="http://www.17bobo.com/Software/BoBo_ActiveX_V3.ocx">';
		StrHtml += '<PARAM NAME="MaxLinkCount" VALUE="100">';
		StrHtml += '<PARAM NAME="MaxCacheTimeS"   VALUE="100">';
		StrHtml += '<PARAM NAME="MinCacheTimeS"   VALUE="50">';
		StrHtml += '<PARAM NAME="MaxCacheSizeMB"  VALUE="100">';
		StrHtml += '<PARAM NAME="MaxDownloadKbps" VALUE="0">';
		StrHtml += '<PARAM NAME="MaxUploadKbps"   VALUE="0">';
		StrHtml += '<PARAM NAME="EnabledTcpTurbo" VALUE="1">';
		StrHtml += '<PARAM NAME="TextAd"       	  VALUE="建电影站我用<ADN视频收藏专家>|http://www.adnim5.cn/?bobo|#ff0000">';
		StrHtml += '<PARAM NAME="ActName" 		  VALUE="'+url+'">';
		StrHtml += '</Object>';
	}else if ( playid == 3 ){//纳加
		StrHtml = '<object id="VJVod" width='+width+' height='+height+' classid="CLSID:D4003189-95B1-4A2F-9A87-F2B03665960D" ';
		StrHtml += 'codebase="http://www.vjage.com/download/vjocx.cab#version=1,6,605,0" >';
		StrHtml += '<PARAM NAME="Nat" VALUE="www.vjage.com:3501">';
		StrHtml += '<PARAM NAME="Stun" VALUE="larry.gloo.net">'; 
		StrHtml += '<PARAM NAME="Cgi" VALUE="http://www.vjage.com/cgi-bin/vod.fcgi">';
		StrHtml += '<PARAM NAME="Action" VALUE="'+url+'">';
		StrHtml += '<PARAM NAME="EnableCacheData" VALUE="1"';
		StrHtml += '<PARAM NAME="PlayMode" VALUE="full">';
		StrHtml += '</object>';
	}else if ( playid == 4 ){//xunlei
		StrHtml = '<iframe src="'+xule+url+'" width="'+width+'" height="'+height+'" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" ></iframe>';
	}else if ( playid == 5 ){//直接引用
		StrHtml = '<iframe src="'+url+'" width="'+width+'" height="'+height+'" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" ></iframe>';
	}else if ( playid == 6 ){//qvod
		StrHtml = '<object id="QvodPlayer" name="QvodPlayer" width="'+width+'" height="'+height+'" classid="clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF" onError="show_ad()">';
		StrHtml += '<PARAM NAME="URL" VALUE="'+url+'">';
		StrHtml += '<param name="Autoplay" value="1">'; 
		StrHtml += '</object>';
	}else if ( playid == 7 ){//rmvb
		StrHtml = '<object id="realObj" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+width+'" height="'+height+'">';
		StrHtml += '<param name="CONTROLS" value="ImageWindow">';
		StrHtml += '<param name="CONSOLE" value="Clip1">';
		StrHtml += '<param name="AUTOSTART" value="-1">';
		StrHtml += '<param name="src" value="'+url+'"></object>';
		StrHtml += '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="'+width+'" height="60">';
		StrHtml += '<param name="CONTROLS" value="ControlPanel,StatusBar">';
		StrHtml += '<param name="CONSOLE" value="Clip1"></object>';
	    StrHtml += '<div style="text-align:center; margin-top:10px;">';
		StrHtml += '<A href="#" onClick="alert("确定进入全屏！按ESC退出!");document.realObj.SetFullScreen();">点击这里全屏收看 按ESC键退出</A>';
		StrHtml += '</div>';
	}else if ( playid == 8 ){//wmv
	    StrHtml = '<object id="WMPObj" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="'+width+'" height="'+height+'">';
		StrHtml += '<param name="URL" value="'+url+'">';
		StrHtml += '<param name="rate" value="1">';
		StrHtml += '</object>';
		StrHtml += '<div style="text-align:center; margin-top:10px;">';
		StrHtml += '<a href="#" onClick="alert("确定进入全屏！按ESC退出!");document.WMPObj.fullScreen="true";">点击这里全屏收看 按ESC键退出</a></div>';
	}else if ( playid == 9 ){//youku
	    StrHtml = '<embed type="application/x-shockwave-flash" src="http://static.youku.com/v1.0.0242/v/swf/qplayer.swf" id="movie_player" name="movie_player" bgcolor="#FFFFFF" quality="high" allowfullscreen="true" flashvars="isShowRelatedVideo=false&showAd=0&show_pre=1&show_next=1&VideoIDS='+url+'&isAutoPlay=true&isDebug=false&UserID=&winType=interior&playMovie=true&MMControl=false&MMout=false&RecordCode=1001,1002,1003,1004,1005,1006,2001,3001,3002,3003,3004,3005,3007,3008,9999" pluginspage="http://www.macromedia.com/go/getflashplayer" width="'+width+'" height="'+height+'">';
	}else if ( playid == 10 ){//tudou
		StrHtml = '<iframe src="'+tudu+url+'" width="'+width+'" height="'+height+'" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" ></iframe>';
	}else if ( playid == 11 ){//wole
		StrHtml = '<iframe src="'+wole+url+'.swf" width="'+width+'" height="'+height+'" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" ></iframe>';
	}else if ( playid == 12 ){//sina
		StrHtml = '<embed allowfullscreen="true" src="http://you.video.sina.com.cn/swf/topic/topicPlay.swf?vid='+url+'&clip_id=&imgurl=" quality="high" bgcolor="#000" width="'+width+'" height="'+height+'" name="player" id="playerr" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	}else if ( playid == 13 ){//六间房
		StrHtml = '<embed allowfullscreen="true" src="http://6.cn/player.swf?vid='+url+'&flag=1" quality="high" bgcolor="#000" width="'+width+'" height="'+height+'" name="playerr" id="playerr" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	}else if ( playid == 14 ){//ouou
		StrHtml = '<embed src="http://dv.ouou.com/swf/player_v213.swf" quality="high" bgcolor="#000000" name="oulog" flashvars="id='+url+'" allowscriptaccess="sameDomain" allowfullscreen="true" pluginspage="http://www.adobe.com/go/getflashplayer" wmode="window" type="application/x-shockwave-flash" align="middle" width="'+width+'" height="'+height+'">';
	}else if ( playid == 15 ){//Flv
		StrHtml = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'" id="danger" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="true" /><param name="movie" value="Play/Flv.swf?vcastr_file='+url+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /></object>';
	}else if ( playid == 16 ){//BokeCC
		StrHtml = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%"><param name="movie" value="http://union.bokecc.com/flash/player.swf?videoID='+url+'&amp;share=true" /><param name="allowFullScreen" value="true" /><param name="quality" value="high" /><embed src="http://union.bokecc.com/flash/player.swf?videoID='+url+'&amp;share=true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" allowFullscreen="true"></embed></object>';
	}else if ( playid == 17 ){//下载
		StrHtml = '<iframe src="'+down+'" width="'+width+'" height="'+height+'" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" ></iframe>';
		reload.click();
	}else if ( playid == 18 ){//第九频道
		StrHtml = '<embed allowfullscreen="true" src="http://www.tvix.cn/watch.swf?auto=1&video_id='+url+'" quality="high" bgcolor="#000" width="'+width+'" height="'+height+'" name="player" id="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
	}else if ( playid == 19 ){//qq
		StrHtml = '<embed allowfullscreen="true" src="http://cache.tv.qq.com/qqplayerout.swf?vid='+url+'" quality="high" bgcolor="#000" width="'+width+'" height="'+height+'" name="playerr" id="playerr" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	}else if ( playid == 20 ){//sohu
		StrHtml = '<embed allowfullscreen="true" src="http://js.pp.sohu.com/ppp/mv/swf200803271002/out/Main.swf?id='+url+'&type=Singleton&domain=out&skin=4&hostname=adn" quality="high" bgcolor="#000" width="'+width+'" height="'+height+'" name="player" id="playerr" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">';
	}else{
		StrHtml = "播放器失效,不能正常播放!";
	}
	//document.getElementById("ShowPlayer").innerHTML = StrHtml;
	document.write(StrHtml);
}