function CoolAdsStart() {
    if (document.documentElement.clientHeight > 0) {
        $('#buffer').height (gsPlayer.height - 45 );
        $('#buffer').show();
    }
}
function CoolStatus() {
    if (Player.Full == 0) {
        if (Player.PlayState == 3) {
            AdsEnd()
        } else {
            CoolAdsStart()
        }
    }
}
function CoolNextDown() {
    if (Player.get_CurTaskProcess() > 900 && !bstartnextplay){
        Player.StartNextDown(gsPlayer.playurl1);
        bstartnextplay = true
    }
}
gsPlayer.playhtml ='<object id="Player" width="100%" height="'+gsPlayer.height+'" classid="clsid:73BAB958-AC02-5108-B2B8-665834A9C63A" onError="gsPlayer.install();"><param name="URL" VALUE="'+gsPlayer.playurl+'"><param name="Autoplay" VALUE="1"><param name="CoolAdUrl" VALUE="'+gsPlayer.pauseurl+'"><param name="NextWebPage" VALUE="'+ gsPlayer.nexturl +'"><PARAM NAME="Showcontrol" 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 == 'CoolPlugin'){
				ll = true;
				break;
			}
		}
	}
	if(ll){
		gsPlayer.playhtml ='<embed URL="'+gsPlayer.playurl+'" type="application/cool-plugin" autoplay="1" showcontrol="1" width="100%" height="'+gsPlayer.height+'"></embed>';
	}
	else{
		gsPlayer.install();
	}
}
gsPlayer.show();
setTimeout(function(){
	if (gsPlayer.status == true && gscmsplay==1) {
		setInterval("CoolStatus()", 1000);
		if (gsPlayer.nexturl) {
			Player.NextWebPage = gsPlayer.nexturl;
			setInterval("CoolNextDown()", 9333)
		}
	}
},
adsloadtime + 1000);