var bstartnextplay=false;
function $Showhtml(){
	var player;
	player='<object id="QvodPlayer" name="QvodPlayer" width="100%" height="'+height+'" classid="clsid:F3D0D36F-23F8-4682-A195-74C92B03D4AF" onError="$Install(\'qvod\');">';
	player+='<PARAM NAME="URL" VALUE="'+url+'">';
	player+='<PARAM NAME="Autoplay" VALUE="'+autoPlay+'">';
	player+='<PARAM NAME="QvodAdUrl" VALUE="'+adsPage+'">';
	if(nextpath != "no"){
		player+='<PARAM NAME="NextWebPage" VALUE="'+nexturl+'">';
	}	
	player+='</object><scr'+'ipt>setInterval("$ShowSwf()",500);setInterval("$NextPath()",9333);</scr'+'ipt>';
	return(player);
}

function $ShowSwf(){
	try{
		if(QvodPlayer.Full==0){
			if(QvodPlayer.PlayState==3){
				$$('QvodPlayer').style.height = height;
				$$('playad').style.display='none';
			}else{
				$$('playad').style.display='inline';
				$$('playadi').style.height=height-59;
				$$('QvodPlayer').style.height=59;
			}
		}
	} catch(e) {}
}

function $NextPath(){
	if(nextpath != "no"){
		if(QvodPlayer.get_CurTaskProcess()>=800 && !bstartnextplay){
			QvodPlayer.StartNextDown(nextpath);
			bstartnextplay = true;
		}
	}
}