var bstartnextplay = false;
function BaiduAdsStart() {
    if (document.documentElement.clientHeight > 0) {
        $('#buffer').height ( MacPlayer.height - 62 );
        $('#buffer').show();
    }
}
function BaiduStatus() {
    if (Player.IsPlaying()) {
        AdsEnd()
    } else {
        BaiduAdsStart()
    }
}
gsPlayer.playhtml='<object id="Player" classid="clsid:02E2D748-67F8-48B4-8AB4-0A085374BB99" width="100%" height="'+gsPlayer.height+'" onError="gsPlayer.install();"><param name="URL" value="'+ gsPlayer.playurl +'"><param name="NextWebPage" value="'+ gsPlayer.nexturl +'"><param name="NextCacheUrl" value="'+ gsPlayer.playurl1 +'"><param name="Autoplay" value="1"></object>';
if(!window.ActiveXObject){
	if (navigator.plugins){
		var ll = false;
		for (var i=0;i<navigator.plugins.length;i++) {
			if(navigator.plugins[i].name == 'BaiduPlayer Browser Plugin'){
				ll = true;
				break;
			}
		}
	}
	if(ll){
	gsPlayer.playhtml = '<object id="Player" name="Player" type="application/player-activex" width="100%" height="'+gsPlayer.height+'" progid="Xbdyy.PlayCtrl.1" param_URL="'+gsPlayer.playurl+'"param_NextCacheUrl="'+gsPlayer.playurl1+'" param_LastWebPage="" param_NextWebPage="'+gsPlayer.nexturl+'" param_OnPlay="onPlay" param_OnPause="onPause" param_OnFirstBufferingStart="onFirstBufferingStart" param_OnFirstBufferingEnd="onFirstBufferingEnd" param_OnPlayBufferingStart="onPlayBufferingStart" param_OnPlayBufferingEnd="onPlayBufferingEnd" param_OnComplete="onComplete" param_Autoplay="1"></object>'
	}
	else{
		gsPlayer.install();
	}
}
gsPlayer.show();
setTimeout(function(){
	if (gsPlayer.status == true && gscmsplay==1){
		setInterval("BaiduStatus()", 1000);
		if (gsPlayer.nexturl) {
			Player.NextWebPage = gsPlayer.nexturl
		}
	}
},
adsloadtime + 1000);