function addBookmark(title,url) {
if (window.sidebar) { window.sidebar.addPanel(title, url,"");
} else if( document.all ) { window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) { return true; } }


function timedad728()
{
Parent = document.getElementById("topad");
nset = document.getElementById("728set").value;

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="top728.php";
url=url+"?set="+nset;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
nset.value=nset.value+1;

xmlHttp.open("GET",url,true);
xmlHttp.send(null);


t=setTimeout("timedad()",25000);

}

 function ratev(fgh)
{

  x = document.getElementById("ratesel").value;
Parent = document.getElementById("rstars");

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="<?php echo $site.$path ?>rate.php";
url=url+"?id="+fgh;
url=url+"&val="+x;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}



function timedad()
{
Parent300 = document.getElementById("rtop");
nset = document.getElementById("rtopset").value;

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="toprad.php";
url=url+"?set="+nset;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged300;
nset.value=nset.value+1;

xmlHttp.open("GET",url,true);
xmlHttp.send(null);

t2=setTimeout("timedad728()",25000);

}

 function clickout(fgh)
{


xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="clickout.php";
url=url+"?id="+fgh;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged2;


xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}



 function nextvids(vb,nm,lp,ui)
{

  Parent = document.getElementById("showcase");
  nset = document.getElementById("vset").value;
document.cookie = "set="+nset+ ";expires=<?php echo time()+31536000;   $dom=str_replace("www", "",$_SERVER['HTTP_HOST'] ); ?>; path=/; domain = <?php echo $dom ?>; ";


xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="showcase2.php";
url=url+"?set="+nset;
url=url+"&scr="+vb;
url=url+"&scc="+nm;
url=url+"&vthumb1="+lp;
url=url+"&vthumb2="+ui;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
nset.value=nset.value+1;

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}



 function showvid(fgh)
{

  Parent = document.getElementById("vidc");


xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  }
var url="video.php";
url=url+"?id="+fgh;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;

xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}




function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

  function stateChanged()
{
if (xmlHttp.readyState==4)
{

tid=xmlHttp.responseText;

Parent.innerHTML = tid;

}
}
  function stateChanged300()
{
if (xmlHttp.readyState==4)
{

tid=xmlHttp.responseText;

Parent300.innerHTML = tid;

}
}


  function stateChanged2()
{
if (xmlHttp.readyState==4)
{

tid=xmlHttp.responseText;



}
}