function OuvrePopup() {
	if (GetCookie("pop1fois")==null) {
	var msg="WARNING, ADULT CONTENTS!\n\n"+"By accepting these terms and conditions you are stating that you are:\n\n"+"  -> not breaking any laws in your country or state by viewing this site.\n"+"  -> of legal age (decided by your community) to view photographic and videos\n"+"       representations of nudity and adult themes.\n"+"  -> you are not offended by nudity, erotic and adult themes and material.\n"+"  -> that you are of sound mind and viewing the site of your OWN FREE WILL.\n\n"+"OK to ACCEPT, CANCEL to leave.\n"
	if (!confirm(msg)) {
	window.top.location.replace("http://www.charmelingerie.com/lingerienath/");
	return; }
	var pathname=location.pathname;
	var myDomain=pathname.substring(0,pathname.lastIndexOf('/')) +'/';
	var date_exp = new Date();
	date_exp.setTime(date_exp.getTime()+(24*3600*1000)); // 24 heures
	SetCookie("pop1fois","ok",date_exp,myDomain);
	}
}

function SetCookie (name, value) {
	var argv=SetCookie.arguments;
	var argc=SetCookie.arguments.length;
	var expires=(argc > 2) ? argv[2] : null;
	var path=(argc > 3) ? argv[3] : null;
	var domain=(argc > 4) ? argv[4] : null;
	var secure=(argc > 5) ? argv[5] : false;
	document.cookie=name+"="+escape(value)+
		((expires==null) ? "" : ("; expires="+expires.toGMTString()))+
		((path==null) ? "" : ("; path="+path))+
		((domain==null) ? "" : ("; domain="+domain))+
		((secure==true) ? "; secure" : "");
}

function getCookieVal(offset) {
	var endstr=document.cookie.indexOf (";", offset);
	if (endstr==-1)
      		endstr=document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
	var arg=name+"=";
	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 getCookieVal (j);
                i=document.cookie.indexOf(" ",i)+1;
                        if (i==0) break;}
	return null;
}

OuvrePopup();

