DHTML_evodisc = function()
{
	var htmlOfevodisc;
	var divs_transparentDiv;
	var divs_content;
	var iframe;
	var width;
	var height;
	var MSIE;
	this.MSIE = false;
	if(navigator.userAgent.indexOf('MSIE')>=0) this.MSIE = true;
}

DHTML_evodisc.prototype = {
	setHtmlContent : function(newHtmlContent) { this.htmlOfevodisc = newHtmlContent; }
	,
	setSize : function(width,height) { if(width)this.width = width;	if(height)this.height = height;	}
	,		
	// {{{ display()	
	display : function()
	{
		if(!this.divs_transparentDiv){ this.__createDivs(); }	
		this.divs_transparentDiv.style.display='block';
		this.divs_content.style.display='block';
		if(this.MSIE)this.iframe.style.display='block';	
		this.__resizeDivs();
		
		window.refToThisModalBoxObj = this;		
		setTimeout('window.refToThisModalBoxObj.__resizeDivs()',150);
		
		this.__insertContent();
	}
	// }}}		
	,
	// {{{ close()	
	close : function()
	{
		/* Hiding divs */
		this.divs_transparentDiv.style.display='none';
		this.divs_content.style.display='none';
		if(this.MSIE)this.iframe.style.display='none';
		
	}	
	// }}}	
	,
	// {{{ __addEvent()		
	addEvent : function(whichObject,eventType,functionName,suffix)
	{ 
	  if(!suffix)suffix = '';
	  if(whichObject.attachEvent){ 
	    whichObject['e'+eventType+functionName+suffix] = functionName; 
	    whichObject[eventType+functionName+suffix] = function(){whichObject['e'+eventType+functionName+suffix]( window.event );} 
	    whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName+suffix] ); 
	  } else 
	    whichObject.addEventListener(eventType,functionName,false); 	    
	} 
	// }}}	
	,
	// {{{ __createDivs()	
	__createDivs : function()
	{
		// Creating transparent div
		this.divs_transparentDiv = document.createElement('DIV');
		this.divs_transparentDiv.className='evotransparent';
		this.divs_transparentDiv.style.left = '0px';
		this.divs_transparentDiv.style.top = '0px';
		this.divs_transparentDiv.style.zIndex = '6000';
		this.divs_transparentDiv.style.position = 'absolute';
		
		document.body.appendChild(this.divs_transparentDiv);
		// Creating content div
		this.divs_content = document.createElement('DIV');
		this.divs_content.className = 'evoconteneur';
		this.divs_content.id = 'evodisc_modalBox_contentDiv';
		this.divs_content.style.zIndex = '6100';
		this.divs_content.style.position = 'absolute';
		
		if(this.MSIE){
			this.iframe = document.createElement('<IFRAME marginwidth="0" marginheight="0" src="about:blank" frameborder=0>');
			this.iframe.style.zIndex = 6030;
			this.iframe.style.position = 'absolute';
			document.body.appendChild(this.iframe);	
		}
			
		document.body.appendChild(this.divs_content);
		window.refToModMessage = this;
		
		this.addEvent(window,'scroll',function(e){ window.refToModMessage.__repositionTransparentDiv(); window.refToModMessage.__resizeDivs(); });
		this.addEvent(window,'resize',function(e){ window.refToModMessage.__repositionTransparentDiv(); window.refToModMessage.__resizeDivs(); });
		
	}
	// }}}
	,
	// {{{ __getBrowserSize()	
	__getBrowserSize : function()
	{
    	var bodyWidth = document.documentElement.clientWidth;
    	var bodyHeight = document.documentElement.clientHeight;
    	
		var bodyWidth, bodyHeight; 
		if (self.innerHeight){ // all except Explorer 
		 
		   bodyWidth = self.innerWidth; 
		   bodyHeight = self.innerHeight; 
		}  else if (document.documentElement && document.documentElement.clientHeight) {
		   // Explorer 6 Strict Mode 		 
		   bodyWidth = document.documentElement.clientWidth; 
		   bodyHeight = document.documentElement.clientHeight; 
		} else if (document.body) {// other Explorers 		 
		   bodyWidth = document.body.clientWidth; 
		   bodyHeight = document.body.clientHeight; 
		} 
		return [bodyWidth,bodyHeight];		
		
	}
	// }}}	
	,
	// {{{ __resizeDivs()
    __resizeDivs : function()
    {
    	
    	var topOffset = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
		this.divs_content.className='evoconteneur';	
			    	
    	if(!this.divs_transparentDiv)return;
    	
    	// Preserve scroll position
    	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
    	var sl = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
    	
    	//window.scrollTo(sl,st);
    	//setTimeout('window.scrollTo(' + sl + ',' + st + ');',10);
    	this.__repositionTransparentDiv();
    	
		var brSize = this.__getBrowserSize();
		var bodyWidth = brSize[0];
		var bodyHeight = brSize[1];
    	
	    if(this.MSIE){
 			this.divs_content.style.width = this.width + 'px';
			this.divs_content.style.height= this.height + 'px'; 
 		}
		else
		{
			this.divs_content.style.width = (this.width - 20) + 'px';
			this.divs_content.style.height= (this.height - 20) + 'px'; 
		}
    	
    	var tmpWidth = this.divs_content.offsetWidth;	
    	var tmpHeight = this.divs_content.offsetHeight;
		
		this.divs_content.style.left = Math.ceil((bodyWidth - tmpWidth) / 2) + 'px';
    	this.divs_content.style.top = (Math.ceil((bodyHeight - tmpHeight) / 2) +  topOffset) + 'px';
    	
 		if(this.MSIE){
 			this.iframe.style.left = (Math.ceil((bodyWidth - tmpWidth) / 2) + 20) + 'px';
 			this.iframe.style.top = ((Math.ceil((bodyHeight - tmpHeight) / 2) + 20) +  topOffset) + 'px';
 			this.iframe.style.width = (this.width - 40) + 'px';
 			this.iframe.style.height = (this.height - 40) + 'px';  	
 		}
 		
  	
    	
    }
    // }}}	
    ,
	// {{{ __repositionTransparentDiv()
    __repositionTransparentDiv : function()
    {
    	this.divs_transparentDiv.style.top = Math.max(document.body.scrollTop,document.documentElement.scrollTop) + 'px';
    	this.divs_transparentDiv.style.left = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft) + 'px';
		var brSize = this.__getBrowserSize();
		var bodyWidth = brSize[0];
		var bodyHeight = brSize[1];
    	this.divs_transparentDiv.style.width = bodyWidth + 'px';
    	this.divs_transparentDiv.style.height = bodyHeight + 'px';		
		   	
    }
	// }}}	
	,
	// {{{ __insertContent()
    __insertContent : function()
    {
 	 this.divs_content.innerHTML = this.htmlOfevodisc;	
    }	
	// }}}
	,
	// {{{
	evomain : function()
	{
	 document.body.style.overflow="hidden";
	 document.documentElement.style.overflow="hidden";

	 var evoHead,evodiscss;
	 evoHead = document.getElementsByTagName('head')[0];
	 evodiscss = document.createElement('link');
	 evodiscss.href = "http://promo.evolupass.com/evodisclaimer/evodisc.css";
	 evodiscss.rel = "stylesheet";
	 evodiscss.type = "text/css";
	 evoHead.appendChild(evodiscss);

	 var evodiscss = document.createElement("link");
	 evodiscss.href = "http://promo.evolupass.com/evodisclaimer/evodisc.css";
	 evodiscss.rel = "stylesheet";
	 evodiscss.type = "text/css";
	 document.body.appendChild(evodiscss);
	 
	 var evodomain = document.domain.toUpperCase();
	 if ( evodomain == '' ) { evodomain = 'SITE PORNOGRAPHIQUE'; }

	 var evodisctxt = '<table align="center" style="margin: 0px;"><tr><td align="center" style="padding: 0px;"><img src="" width="250" height="140" border="0" id="evoattention"></td><td rowspan="2" width="10" style="padding: 0px;"></td><td valign="top" width="430" style="padding: 0px;">';
	 evodisctxt += '<div align="center" class="evondd" id="evondd">' + evodomain + '</div>';
	 evodisctxt += '<div align="center" class="evotxt1" id="evotxt1">Ce site contient des vid&eacute;os, photos et textes pouvant choquer<br>la sensibilit&eacute; de certaines personnes et notemment<br>celle des plus jeunes.</div>';
	 evodisctxt += '<div align="center" class="evotxt2" id="evotxt2">En cliquant sur le bouton ENTRER vous acceptez toutes les<br>conditions d\'acc&egrave;s d&eacute;crites ci-dessous et vous certifiez &egrave;tre<br>majeur selon les lois de votre pays.</div>';
	 evodisctxt += '</td></tr><tr><td width="240" height="185" align="center" style="padding: 0px;"><div class="evothumb" id="evothumb"></div><img src="" border="0" class="evologo18" id="evologo18"></td><td valign="top" align="left" width="430" style="padding: 0px;"><div class="evoconditions" id="evoconditions" style="width: 216px;">';
	 evodisctxt += 'Ce site web contient des textes, images et vid&eacute;os &agrave; caract&egrave;re pornographique qui peuvent choquer certaines sensibilit&eacute;s. Je certifie sur l\'honneur :<br>';
	 evodisctxt += '- Etre majeur selon la loi en vigueur dans mon pays.<br>- Que les lois de mon &eacute;tat ou mon pays m\'autorisent a consulter les pages de ce site web et que ce site web a le droit de me transmettre de telles donn&eacute;es.<br>';
	 evodisctxt += '- Etre inform&eacute; du caract&egrave;re pornographique du serveur auquel j\'acc&egrave;de.<br>- Je d&eacute;clare n\'&ecirc;tre choqu&eacute; par aucun type de sexualit&eacute; et m\'interdit de poursuivre les auteurs de ce site web.<br>';
	 evodisctxt += '- Consulter ce serveur &agrave; titre personnel sans impliquer de quelque mani&egrave;re que ce soit une soci&eacute;t&eacute; priv&eacute;e ou un organisme public.<br><br>En cons&eacute;quence, je reconnais :<br>';
	 evodisctxt += '- Ne pas faire &eacute;tat de l\'existence de ce serveur et &agrave; ne pas en diffuser le contenu &agrave; des mineurs.<br>- Utiliser tous les moyens permettant d\'emp&eacute;cher l\'acc&egrave;s de ce serveur &agrave; tout mineur.<br>';
	 evodisctxt += '- Assumer ma responsabilit&eacute;, si un mineur acc&egrave;de &agrave; ce serveur &agrave; cause de n&eacute;gligences de ma part : absence de protection de l\'ordinateur personnel, absence de logiciel de censure, divulgation ou perte du mot de passe de s&eacute;curit&eacute;.<br>';
	 evodisctxt += '- Assumer ma responsabilit&eacute; si une ou plusieurs de mes pr&eacute;sentes d&eacute;clarations sont inexactes.<br><br>J\'ai not&eacute; que les &eacute;diteurs de ce site web ont particuli&egrave;rement insist&eacute; pour que je prenne connaissance des conditions d\'acc&egrave;s d&eacute;crites ci-dessus.</div>';
	 evodisctxt += '<table width="420" align="center" cellpadding="10" style="margin: 0px; margin-top: 14px;"><tr><td width="20" style="padding: 0px;"></td><td class="evobutton1" id="evobutton1" align="center" valign="middle"><a href="" onclick="" class="evolinks" id="enterlink">ENTRER</a></td><td width="30" style="padding: 0px;"></td><td id="evobutton2" class="evobutton2" align="center" valign="middle"><a href="" onclick="" class="evolinks" id="quitlink">SORTIR</a></td><td width="20" style="padding: 0px;"></td></tr></table>';
	 evodisctxt += '</td></tr></table>';

	 this.setHtmlContent(evodisctxt);
	 this.setSize(719,372);
	 this.display();
	 
	 document.getElementById("evoconditions").style.width = "416px";

	 window.onresize = function()
	 {
	  this.display();
	 };
	}
	// }}}
	,
	//
	setevocolor : function(c1, c2, tpl, transp)
	{
	 document.getElementById("enterlink").style.color = '#FFFFFF';	
	 document.getElementById("quitlink").style.color = '#FFFFFF';	
	 this.divs_transparentDiv.style.backgroundColor = c2;
	 document.getElementById("evondd").style.color = c1;	 
	 document.getElementById("evotxt1").style.color = c2;
	 document.getElementById("evotxt2").style.color = c2;
	 document.getElementById("evothumb").style.borderColor = c1;	 
	 document.getElementById("evoconditions").style.borderColor = c2;
	 document.getElementById("evoconditions").style.color = c2;
	 document.getElementById("evobutton1").style.backgroundColor = c1;
	 document.getElementById("evobutton2").style.backgroundColor = c2;
	 document.getElementById("evoattention").src = 'http://promo.evolupass.com/evodisclaimer/imgdisc' + tpl + '/attention.png';
	 document.getElementById("evologo18").src = 'http://promo.evolupass.com/evodisclaimer/imgdisc' + tpl + '/logo18.png';
	 if(this.MSIE)
	 {
      var strNewHTML = "<span class='evologo18' id='evologo18' style=\"width: 80px; height: 80px; display:inline-block; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://promo.evolupass.com/evodisclaimer/imgdisc" + tpl + "/logo18.png', sizingMethod='scale');\"></span>";
      document.getElementById("evologo18").outerHTML = strNewHTML;
	 }
	 this.divs_transparentDiv.style.opacity = (transp / 100);
	 this.divs_transparentDiv.style.filter = "alpha(style=0,opacity=" + transp + ")";
	 this.divs_content.style.display = "inline-block";
	}
	//
	,
	//
	setevothumb : function(url)
	{
	 if (url == '')
	 {
	  randy = Math.floor( Math.random() * 18 );
	  if (randy == 0) { randy = 1; }
	  document.getElementById("evothumb").style.backgroundImage = 'url("http://promo.evolupass.com/evodisclaimer/thsdisc/' + randy + '.jpg")';
	 }
	 else
	 {
	  document.getElementById("evothumb").style.backgroundImage = 'url("' + url + '")';
	 }
	}
	//
	,
	//
	setquitlink : function(url)
	{
     document.getElementById("quitlink").href = url;
	}
	//
	,
	//
	setevolink : function(mode, url, delai)
	{
	 // mode 1 : here evo + blank entree
	 if (mode == 1)
	 {
 	  document.getElementById("enterlink").href = window.location.href;
	  document.getElementById("enterlink").target = '_blank';
	  this.addEvent(document.getElementById("enterlink"),'click',function(e){ window.evoEcrireCookie("evodisc_vu", "1", delai); window.evoEcrireCookie("evodisc_temp", "1", "1"); document.getElementsByTagName('body').onbeforeunload=null; window.parent.location.href = url; });
	 }
	 // mode 2 : here entree + blank evo
	 if (mode == 2)
	 {
 	  document.getElementById("enterlink").href = url;
	  document.getElementById("enterlink").target = '_blank';
	  this.addEvent(document.getElementById("enterlink"),'click',function(e){ window.evoEcrireCookie("evodisc_vu", "1", delai); window.evoEcrireCookie("evodisc_temp", "1", "1"); document.getElementsByTagName('body').onbeforeunload=null; window.parent.location.href = window.parent.location.href; });
	 }
	 // mode 3 : here entree + popup evo CHECKED
	 if (mode == 3)
	 {
 	  document.getElementById("enterlink").href = window.location.href;
	  document.getElementById("enterlink").target = '';
	  var dimzz = this.dimension_detect();
	  var viewW = dimzz.viewW + dimzz.left;
	  var viewH = dimzz.viewH + dimzz.top;
	  this.addEvent(document.getElementById("enterlink"),'click',function(e){ window.evoEcrireCookie("evodisc_vu", "1", delai); window.evoEcrireCookie("evodisc_temp", "1", "1"); document.getElementsByTagName('body').onbeforeunload=null; window.open(url,'PAGE','width='+viewW+',height='+viewH+',toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menuBar=1'); });
	 }
	 // mode 4 : here entree + popunder evo
	 if (mode == 4)
	 {
 	  document.getElementById("enterlink").href = window.location.href + '#';
	  document.getElementById("enterlink").target = '';
	  var dimzz = this.dimension_detect();
	  var viewW = dimzz.viewW + dimzz.left;
	  var viewH = dimzz.viewH + dimzz.top;
	  this.addEvent(document.getElementById("enterlink"),'click',function(e){ window.evoEcrireCookie('evodisc_vu', '1', delai); window.evoEcrireCookie("evodisc_temp", "1", "1"); document.getElementsByTagName('body').onbeforeunload=null; evo_page = window.open(url,'PAGE','width='+viewW+',height='+viewH+',toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menuBar=1'); setTimeout('window.evo_recharge()', 1000); return false });
	 }
	}
	//
	,
	//
	dimension_detect : function()
	{
	 var d={'viewW':0,'viewH':0,'docH':0,'docW':0,'left':0,'top':0};
	 if (document.body.scrollHeight>document.body.offsetHeight)
	 {
	  d.docW=document.body.scrollWidth;
	  d.docH=document.body.scrollHeight;
	 }
	 else
	 {
	  d.docW=document.body.offsetWidth;
	  d.docH=document.body.offsetHeight;
	 }
	 if (self.innerWidth)
	 {
	 d.viewW=self.innerWidth;
	 d.viewH=self.innerHeight;
	 d.left=window.pageXOffset;
	 d.top=window.pageYOffset;
	 }
	 else
	 {
	  var ie=(document.compatMode&&document.compatMode!='BackCompat')?document.documentElement:document.body;
	  d.viewW=ie.clientWidth;
	  d.viewH=ie.clientHeight;
	  d.left=ie.scrollLeft;
	  d.top=ie.scrollTop;
	 }
	 return d;
	}
}






function evoEcrireCookie(nom, valeur, delai)
{
 var evotoday = new Date();
 var evotempday = evotoday.getTime() + ( delai * 1000 * 60 * 60 * 24 );
 var evoexpires = new Date(evotempday);
 document.cookie = nom + "=" + escape(valeur) + "; expires=" + evoexpires.toGMTString() + "; path=/";
}

function evoGetCookieVal(offset)
{
 var endstr=document.cookie.indexOf (";", offset);
 if (endstr==-1) endstr=document.cookie.length;
 return unescape(document.cookie.substring(offset, endstr)); 
}

function evoLireCookie(nom)
{
 var arg=nom+"=";
 var alen=arg.length;
 var clen=document.cookie.length;
 var i=0;
 while (i<clen)
 {
  var j=i+alen;
  if (document.cookie.substring(i, j)==arg) return evoGetCookieVal(j);
  i=document.cookie.indexOf(" ",i)+1;
  if (i==0) break;
 }
 return null; 
}

function addLoadEvent(func) 
{
 var oldonload = window.onload;
 if (typeof window.onload != 'function') { window.onload = func; }
 else { window.onload = function() { if (oldonload) { oldonload(); } func(); } }
}

function evo_recharge() 
{
 evo_page.blur();
 window.focus();
 var evoreg=new RegExp("(#)", "g");
 var evonewurl = window.location.href.replace(evoreg,"");
 window.location.href = evonewurl;
}






if (typeof evodiscvars == "undefined") { var evodiscvars = { }; }

if (evodiscvars.evodisc_run == '1')
{
 if (evodiscvars.evocolor == '') { evodiscvars.evocolor = 1; }
 if (evodiscvars.evotransp == '') { evodiscvars.evotransp = 100; }
 if (evodiscvars.evomode == '') { evodiscvars.evomode = 1; }
 if (evodiscvars.evoquitter == '') { evodiscvars.evoquitter = 'http://www.google.fr'; }
 if (evodiscvars.evodisc_cookie == '') { evodiscvars.evodisc_cookie = 0; }

 var evodisc_vu = evoLireCookie("evodisc_vu");
 var evodisc_temp = evoLireCookie("evodisc_temp");
 
 // if (evodiscvars.evodisc_cookie == 0)
 // {
  // var evodisc_vu = 0;
  // var evodisc_temp = 0;
 // }
 
 if ((evodisc_vu != 1) && (evodisc_temp != 1))
 {
  evodiscObj = new DHTML_evodisc();
  evodiscObj.evomain();
  
  if ( evodiscvars.evocolor == 1 ) { evodiscObj.setevocolor('#c41212','#363631','1',evodiscvars.evotransp); }  // ROUGE
  if ( evodiscvars.evocolor == 2 ) { evodiscObj.setevocolor('#e400f2','#363631','2',evodiscvars.evotransp); }  // ROSE
  if ( evodiscvars.evocolor == 3 ) { evodiscObj.setevocolor('#0067f2','#363631','3',evodiscvars.evotransp); }  // BLEU
  if ( evodiscvars.evocolor == 4 ) { evodiscObj.setevocolor('#f26202','#363631','4',evodiscvars.evotransp); }  // ORANGE
  if ( evodiscvars.evocolor == 5 ) { evodiscObj.setevocolor('#5eae05','#363631','5',evodiscvars.evotransp); }  // VERT
  if ( evodiscvars.evocolor == 6 ) { evodiscObj.setevocolor('#9102ff','#363631','6',evodiscvars.evotransp); }  // VIOLET

  evodiscObj.setevothumb(evodiscvars.evothurl);
  evodiscObj.setquitlink(evodiscvars.evoquitter);

  var linkout = 'http://www.evolupass.com/gotosite.php?gosite=' + evodiscvars.evosite + '&gooffre=' + evodiscvars.offre + '&gotracking=' + evodiscvars.tracking + '&gopage=' + evodiscvars.page + '&gowebid=' + evodiscvars.webid ;
  evodiscObj.setevolink(evodiscvars.evomode, linkout, evodiscvars.evodisc_cookie);
 }
 
 if (evodisc_temp == 1)
 {
  evoclrck = new Date;
  evoclrck.setFullYear(evoclrck.getFullYear()-1);
  evoEcrireCookie("evodisc_temp", null, evoclrck);
 }
}

