function chargerDisclaimer(){
	$.ajax({
		url: "/style1/HTML/atoutDesirs/warning.html",
		cache: false,
		success: function(contenu){
			$("#conteneurAD").html(contenu);
			$("#fondNoir").css("opacity", 0);
			$("#warningAD").css("opacity", 0);
			$("#fondNoir").animate({
				opacity: 0.5
				}, 500, function(){
					$("#warningAD").animate({
						opacity: 1
						}, 500
					);
				}
			);
			$("#entrer").click(function(){
				$("#fondNoir").css("display", "none");
				$("#warningAD").css("display", "none");
				$.cookie("c_disl_AD", "vu", { expires: 1 });
				return false;
			});
			$("#sortir").click(function(){
				if(window.history.length>1){
					window.history.back();
				} else {
					window.location.replace("http://www.quelle.fr");
				}
				return false;
			});
		}
	});
}

function verifURL(){
	var adresse = window.location.href;
	var reponse = false;
	if(adresse.indexOf("ListeProduits:7956:7959:9016")>0 || adresse.indexOf("ListeProduits:7958:7962:9017")>0){
		reponse = true;
	}
	return reponse;
}

window.onload = function(){
	if($.cookie("c_disl_AD") != "vu"){
		if(verifURL()){
			chargerDisclaimer();
		} else {
			var nom = new Array();
			var valeur = new Array();
			
			param = window.location.search.slice(1,window.location.search.length);	
			first = param.split("&");
		
			for(i=0;i<first.length;i++){
				second = first[i].split("=");
				if(second[0] == "fh_location" && second[1] == "%2f%2fquelle%2ffr_FR%2flistable%3d1%2fsites_ref%3E{www_quelle_fr}%2fcategories%3C{quelle_8836}"){
					chargerDisclaimer();
				}
			}
		}
	}
}
