function mybug($id){
	$url="/ajax.php?action=bug&type=trailerslink&id="+$id+"&timestamp=" + new Date().getTime();
	xmlHttp.onreadystatechange = function(){
		if (xmlHttp.readyState == 4 && xmlHttp.status == 200){
			var mystring = xmlHttp.responseText.split("|");
			//	alert(xmlHttp.responseText);
			alert(mystring[1]);
			if (window.ActiveXObject)
			xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
			else if (window.XMLHttpRequest)
			xmlHttp = new XMLHttpRequest();
		}
	}
	xmlHttp.open("GET",$url);
	xmlHttp.send(null);
}
function mypercent($id,$type,$str){
	if($type=="good")$value=1;
	else $value=-1;
	$url="/ajax.php?action=percent&type=trailerslink&id="+$id+"&value="+$value+"&timestamp=" + new Date().getTime();
	xmlHttp.onreadystatechange = function(){
		if (xmlHttp.readyState == 4 && xmlHttp.status == 200){
			var mystring = xmlHttp.responseText.split("|");
			//alert(xmlHttp.responseText);
			if (mystring[0] == "0"){
				alert(mystring[1]);
			}else{
				$votes=$str+$id;
				var $votes= document.getElementById($votes);
				if(parseInt(mystring[1])>0)$votes.innerHTML='<span style="color:009FFF;">+'+mystring[1]+'<span>';
				else $votes.innerHTML='<span style="color:#F00;">'+mystring[1]+'<span>';
			}
			if (window.ActiveXObject)
			xmlHttp = new ActiveXObject("Microsoft.XMLHttp");
			else if (window.XMLHttpRequest)
			xmlHttp = new XMLHttpRequest();
		}
	}
	xmlHttp.open("GET",$url);
	xmlHttp.send(null);
}
adinit(function(){
document.getElementById("ad_ep_pl_si_top").innerHTML='<iframe width="300" height="250" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="/templates/public/ad/episodes-play~top~300x250.html" ></iframe >';
document.getElementById("ad_ep_pl_lo_top").innerHTML='<iframe width="160" height="600" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="/templates/public/ad/episodes-play~top~160x600.html" ></iframe >';
});