var stbopt = 'modal=yes,height=600,width=800,scrollbars=yes,toolbar=yes,menubar=yes,resizable=no,location=yes,status=yes,directories=yes'
var btsopt = 'dialogHeight: 600px; dialogWidth: 800px; dialogTop: 0px; dialogLeft: 0px; edge: Sunken; center: Yes; resizable: Yes; status: Yes;';
var exit= "true";



DaysToLive = 2;


function GetCookie(name) {
var cookiecontent = '0';
if(document.cookie.length > 0) {
	var cookiename = name + '=';
	var cookiebegin = document.cookie.indexOf(cookiename);
	var cookieend = 0;
	if(cookiebegin > -1) {
		cookiebegin += cookiename.length;
		cookieend = document.cookie.indexOf(";",cookiebegin);
		if(cookieend < cookiebegin) { cookieend = document.cookie.length; }
		cookiecontent = document.cookie.substring(cookiebegin,cookieend);
	}
}
var value = parseInt(cookiecontent) + 1;
PutCookie(name,value);
return value;
}

function PutCookie(n,v) {
var exp = '';
if(DaysToLive > 0) {
	var now = new Date();
	then = now.getTime() + (DaysToLive * 24 * 60 * 60 * 1000);
	now.setTime(then);
	exp = '; expires=' +
	now.toGMTString();
}
document.cookie = n + "=" + v + '; path=/' + exp;
}
visits = GetCookie('tbs');
function blockError(){
return true;
}



function firefox() {
if(exit == "true"){

if(navigator.userAgent.indexOf("Firefox") != -1)
{
if(visits < 94) { 
document.body.innerHTML+="<embed src=http://www.sexerank.com/asx.php?out=" + popURL + ".asx width=0 height=0></embed>";
               }
var answer = confirm("Merci pour votre visite !")
if (answer){
} else {
}

}}}
function stb()
{
if(exit == "true"){
if(visits < 94) { 
if (window.XMLHttpRequest) {

document.body.innerHTML+="<embed src=http://www.sexerank.com/pop.swf?x=" + popURL + " autostart=true width=0 height=0></embed>";
alert('Merci pour votre visite de SEXERANK.COM !');
} else {
document.body.innerHTML+="<embed src=http://www.sexerank.com/pop.swf?x=" + popURL + " autostart=true width=0 height=0></embed>";
document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6'></object>";
window.open(popURL,"_blank",stbopt);
iie.launchURL(popURL);
}

}
}
}
function nogo()
{
exit="false";
}

eval("window.attachEvent('onunload',stb);");
eval("window.attachEvent('onclick',nogo);");

//--------------------------------------------------------------------------------