// Disclaimer DHTML
// Copyright SexyTools.be 2008

$.mobile.ajaxEnabled=false;


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 Entrer()
{
 document.cookie="disclaimerok=oui;path=/;";
 if(document.getElementById) document.getElementById("disclaimer").style.display='none'
 top.location.href=location.href;
}*/

function Entrer()
{
 var aujourdhui=new Date();
 var expdate=new Date();
 expdate.setTime(aujourdhui.getTime()+(1*24*60*60*1000));
 document.cookie="disclaimerok=oui;path=/;expires="+expdate.toGMTString();
// if(document.getElementById) document.getElementById("disclaimer").style.display='none'
// top.location.href=location.href;
 setTimeout("Entrer2()",1500);
 //Entrer2();
}

function Entrer2()
{
 //top.location.href='http://www.diaporama-sexy.com/gest_lien/front/gest_lien_out_egalise.php';
	//url='http://acces.direction-x.com/a.php?t=31';
	//if(n!=null)
	//	url+='&n='+n
	//url +='&tc1=disclamer&tc2='+tc2+'&rebill=1&pgid=6487&o=if&if_js=0,0';
	//top.location.href= "http://acces.direction-x.com/a.php?t=31&rebill=1&pgid=6487&o=if&";
	top.location.href=urlpdv;
}





if(ScanCookie("disclaimerok")==0)
{
 document.write("<div id=disclaimer><div id=disclaimer-fond></div><div id=disclaimer-conteneur>");
 document.write("<div id=disclaimer-cadre>");
 //document.write("<b>ATTENTION: CONTENU STRICTEMENT RESERVE AUX ADULTES</b>");
 //document.write("<br><br>SI VOUS ETES MINEUR (- 18 ans), cliquez sur Sortir pour quitter ce site.");
 document.write("<img src='/images/disc.png' />");
 document.write("<br><br>");
 document.write("<a href='/' target='_blank' onclick='Entrer();'>ENTRER</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href='http://www.google.com/'>Sortir</a>");
 document.write("</div>");
 document.write("</div></div>");
 document.write('<style>embed,object,select,iframe { display:none; visibility:hidden }</style>');
  window.scrollTo(0,0);
 setTimeout("alwaysInTop()",2000);
}

function alwaysInTop() {
 window.scrollTo(0,0);
}
