var disclaimer_msg = 'ATTENTION : VOUS ENTREZ SUR UN SITE PORNOGRAPHIQUE\nRESERVE AUX ADULTES !\n\nCe site Internet est STRICTEMENT interdit aux moins de\n18 ans et est déconseillé aux personnes sensibles. Si vous\nvous trouvez dans un de ces 2 cas, nous vous demandons\nde quitter immédiatement ce site en cliquant sur "Annuler".';
var disclaimer_msg_valid = 'SI VOUS AVEZ MOINS DE 18 ANS, CLIQUEZ SUR ANNULER.';
var disclaimer_url_refus = 'http://www.google.com';

function popunder() {

	var winfeatures="width="+screen.availWidth+",height="+screen.availHeight+",scrollbars=1,resizable=1,toolbar=1,location=1,menubar=1,status=1,directories=0";

	var url = "http://www.orgasme-feminin.com/sexe-videos-pornos-matures-1.html?accept=1"; 
	my_window =  window.open(url, "orgasmefeminin", winfeatures);

	my_window.blur();
	window.focus();
} 

function AddAccept2Links()
{
	var link;
	var hash;
	
	for (var i = 0 ; i < document.links.length ; i++)
	{
		link = document.links[i];

		if (typeof(link.href) != 'undefined' && typeof(link.protocol) != 'undefined' && typeof(link.hostname) != 'undefined' &&	typeof(link.pathname) != 'undefined' && typeof(link.search) != 'undefined')
		{
			if (link.protocol.substr(0, 4) == 'http' && link.hostname == location.hostname)
			{
				var newlink;
				
				newlink = 'http://' + link.hostname;
				if (link.pathname[0] != '/') newlink += '/';
				newlink += link.pathname;
				
				if (link.search == '')
					newlink += '?';
				else
				{
					if (link.pathname.indexOf('?') == -1)
						newlink += link.search;
					
					newlink += '&';
				}

				newlink += 'accept=1';
				
				if (typeof(link.hash) != 'undefined') newlink += link.hash;
				
				link.href = newlink;
			}
		}
	}
}

if (!getCookie('disclaimer_accepted'))
{
	alert_result = confirm(disclaimer_msg + '\n\n' + disclaimer_msg_valid + '\n');
	
	if (alert_result == false)
	{
		if (history.length > 1)
			history.back();
		else
			window.location.replace(disclaimer_url_refus);
	}
	else
	{
		setCookie('disclaimer_accepted', 1, null, '/');

		if (getCookie('disclaimer_accepted') != 1)
			addEvent(window, "load", AddAccept2Links);

		
	}
}
