cerclet_pub = "";
cerclet_type = "popunder";

/*
* NE RIEN MODIFIER CI-DESSOUS
*/

function cerclet_set_cookie(c_name, value, expiredays) {
	var exdate = new Date();
	exdate.setDate(exdate.getDate()+expiredays);
	document.cookie = c_name+ "=" +escape(value)+";"+((expiredays=='') ? "" : "expires="+exdate.toGMTString()+";")+"path=/;";
}

function cerclet_get_cookie(c_name) {
	if (document.cookie.length > 0) {
		c_start = document.cookie.indexOf(c_name + "=");
		if (c_start != -1) {
			c_start = c_start + c_name.length+1;
			c_end = document.cookie.indexOf(";",c_start);
			if (c_end == -1) { c_end = document.cookie.length; }
			return unescape(document.cookie.substring(c_start,c_end));
		}
	}
	return "";
}

function cerclet_entrer() {
	cerclet_set_cookie("cerclet_disclaimer_ok", "oui", 0);
    if (document.getElementById) { document.getElementById("cerclet_disclaimer").style.display="none"; }
	if (document.layers) { document.cerclet_disclaimer.style.display="none"; }
	if (cerclet_pub != "") {
		if (cerclet_type == "redirect") { setTimeout("cerclet_redirect()",5000); }
		else if ((cerclet_type == "popunder") || (cerclet_type == "popover")) { cerclet_popup(); }
	}
}

function cerclet_popup() {
	var vnc_win_options = "width="+screen.availWidth+",height="+screen.availHeight+",scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0";
	var vnc_new_win = window.open(cerclet_pub,"",vnc_win_options);
    if (cerclet_type == "popunder") { vnc_new_win.blur(); window.self.focus(); }
    else if (cerclet_type == "popover") { window.self.blur(); vnc_new_win.flocus(); }
}

function cerclet_redirect() {
	top.location.href = cerclet_pub;
	return false;
}

cerclet_cook = cerclet_get_cookie("cerclet_disclaimer_ok");
if ((cerclet_cook == null) || (cerclet_cook == "")) {
	cerclet_theme = '<!DOCTYPE html PUBLIC "-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN" "http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd">';
	cerclet_theme += '<html xmlns="http:\/\/www.w3.org\/1999\/xhtml">';
	cerclet_theme += '<head>';
	cerclet_theme += '<meta http-equiv="Content-Type" content="text\/html; charset=UTF-8" \/>';
	cerclet_theme += '<title>Disclaimer<\/title>';
	cerclet_theme += '<style type="text\/css">';
	cerclet_theme += '	html {height:100%;width:100%;margin:0;padding:0;}';
	cerclet_theme += '	body {position:relative;height:100%;width:100%; margin:0;padding:0;}';
	cerclet_theme += '	#cerclet_disc_back { position:fixed; z-index:10000; width:100%; background:#000; filter:alpha(opacity=80); -moz-opacity:0.8; opacity: 0.8; height:100%;}';
	cerclet_theme += '  *html #cerclet_disc_back { position:absolute; top:expression(documentElement.scrollTop+body.scrollTop);}';
	cerclet_theme += '	#cerclet_disc { width:672px;height:313px; margin-top:-157px; margin-left:-336px; position:fixed;top:50%;left:50%;z-index:10010; }';
	cerclet_theme += '	*html #cerclet_disc { position:absolute; top:expression(documentElement.scrollTop+body.scrollTop);margin-top:0; }';
	cerclet_theme += '	#cerclet_disc .img_disc {float:left;border:none;display:block;}';
	cerclet_theme += '	#cerclet_disc #disc_in {display:block; width:188px;height:67px;float:left;background:url(\js\/disclaimer\/images\/3_hover.gif);border:none;}';
	cerclet_theme += '	#cerclet_disc #disc_out {display:block; width:184px;height:67px;float:left;background:url(\js\/disclaimer\/images\/4_hover.gif);border:none;}';
	cerclet_theme += '<\/style>';
	cerclet_theme += '<\/head>';
	cerclet_theme += '<body>';
	cerclet_theme += '<div id="cerclet_disclaimer">';
	cerclet_theme += '<div id="cerclet_disc_back"><\/div>';
	cerclet_theme += '<div id="cerclet_disc">';
	cerclet_theme += '    <!-- PRELOAD DU ROLL-OVER -->';
	cerclet_theme += '    <img src="\/js\/disclaimer\/images\/3_hover.gif" alt="" style="display:none;" \/>';
	cerclet_theme += '    <img src="\/js\/disclaimer\/images\/4_hover.gif" alt="" style="display:none;" \/>';
	cerclet_theme += '    <!-- _____________________ -->';
	cerclet_theme += '    ';
	cerclet_theme += '    <img src="\/js\/disclaimer\/images\/1.gif" alt="" class="img_disc" height="96"\/>';
	cerclet_theme += '    <img src="\/js\/disclaimer\/images\/2.gif" alt="" class="img_disc" height="150"\/>';
	if (cerclet_type == "redirect") { cerclet_theme += '    <a href="##URL##" onclick="cerclet_entrer();" target="_blank" id="disc_in">'; }
	else { cerclet_theme += '    <a href="javascript:void(0);" onclick="cerclet_entrer();" target="_self" id="disc_in">'; }
	cerclet_theme += '        <img src="\/js\/disclaimer\/images\/blank.gif" alt="" class="img_disc" \/>';
	cerclet_theme += '    <\/a>';
	cerclet_theme += '    <a href="http:\/\/www.google.com\/" id="disc_out">';
	cerclet_theme += '        <img src="\/js\/disclaimer\/images\/blank.gif" alt="" class="img_disc" \/>';
	cerclet_theme += '    <\/a>';
	cerclet_theme += '    <img src="\/js\/disclaimer\/images\/5.gif" alt="" class="img_disc" height="67"\/>';
	cerclet_theme += '<\/div>';
	cerclet_theme += '<\/div>';
	cerclet_theme += '<\/body>';
	cerclet_theme += '<\/html>';
    cerclet_theme = cerclet_theme.replace(/##URL##/, location.href);
    document.write(cerclet_theme);
}


