
  function search()
  {
    self.location.href = '/tags/'+document.getElementById('keyword').value;
  }

  function popurl(domain)
  {
    window.open("http://www."+domain+".com",domain,"");
    return false;
  }


  function countdown(sec)
  {
    var min="";
    var n_sec="";
    var tmp_res;
    if (sec<1) 
    {
      document.getElementById('countdown').innerHTML="<a href='/'>check out the new videos !</a>";
    } 
    else
    {
      if (sec>60) { tmp_res=sec%60; min=((sec-tmp_res)/60)+"min"; n_sec=tmp_res+"s"; }
      else n_sec=sec+"s";
      document.getElementById('countdown').innerHTML="new videos in "+min+" "+n_sec;
      setTimeout("countdown("+(sec-1)+")",1000);
    }
  }



  function ScanCookie(variable)
	{
	cook = document.cookie;
	variable += "=";
	place = cook.indexOf(variable,0);
	if (place <= -1)
		return("0");
	else
		{
		end = cook.indexOf(";",place)
		if (end <= -1)
			return(unescape(cook.substring(place+variable.length,cook.length)));
		else
			return(unescape(cook.substring(place+variable.length,end)));
		}
	}

  function CreationCookie(nom,valeur,permanent)
	{
	if(permanent)
		{
		dateExp = new Date(2020,11,11);
		dateExp = dateExp.toGMTString();
		ifpermanent = '; expires=' + dateExp + ';';
		}
	else
		ifpermanent = '';
	document.cookie = nom + '=' + escape(valeur) + ifpermanent+";domaine=.evereplay.com";
	}

    if(ScanCookie("disclaimer")==0 && document.referrer.indexOf(".evereplay.com") == -1)
    {
    if (document.URL.indexOf("perso33") == -1)
      {
        okoupas=confirm("By entering this site,\nyou confirm that you are exactly or over the age of 18.\n\nIf you are under this age, or under the age of legal consent to view adult material in your country, you do not have permission to view this site.");
      if (okoupas==false){
        document.location="http://www.google.fr";
      }
    }
	    CreationCookie("disclaimer","oui",false);
  }


  function star_selected(img,num){
    for(i=1;i<=num;i++)
      document.getElementById("eve-rating-"+img+"-"+i).src= "/pics/star_selected.png";
  }


  function star_default(img){
    for(i=1;i<=5;i++)
      if(document.getElementById("eve-rating-"+img+"-"+i).src!="/pics/star_"+document.getElementById("hidden-eve-rating-"+img+"-"+i).value+".png")
     document.getElementById("eve-rating-"+img+"-"+i).src= "/pics/star_"+document.getElementById("hidden-eve-rating-"+img+"-"+i).value+".png";
    else
      break;
  }

