
// JavaScript Document

//Begin Exit Console Block
var nid=0;
var tid=431;
var mid=947;
var full=1;
var popDialogOptions = "dialogWidth:780px; dialogHeight:625px; dialogTop:0px; dialogLeft:0px; edge:Raised; center:0; help:0; resizable:1; scroll:1; status:0";
var popWindowOptions = "scrollbars=0,menubar=0,toolbar=0,location=0,personalbar=0,status=0,resizable=0";
var exit = true;
var usePopDialog = true;
var isUsingSpecial = false;

function normal_exit(){
if(exit && !isUsingSpecial) {
exit = false;
window.open(popURL,"",popWindowOptions);}}

var isXPSP2 = false; 
var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6"; 

function ext() { 
if(exit) { 
exit=false; 

if(!isXPSP2 && !usePopDialog) { 
window.open(popURL,"",popWindowOptions); 
} 
else if(!isXPSP2 && usePopDialog) { 
eval("window.showModalDialog(popURL,'',popDialogOptions)"); 
} 
else { 
iie.launchURL(popURL); 
}}} 

function brs() { 
document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:"+u+"'></object>"; 
} 

function ver() { 
isXPSP2 = (window.navigator.userAgent.indexOf("SV1") != -1); 
if(isXPSP2) brs(); 
} 

isUsingSpecial = true; 
eval("window.attachEvent('onload',ver);"); 

//End Exit Console Block



//Begin Cookie Block

var numpages=0;
var pages = "";
var check55 = 0;
var expDays = 30;
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));

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;
}


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 DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
//End Cookie Block


function foc_first(redir)
	{	
	opener.location.href=redir;
	}



function foc(redir)
	{
	self.focus();	
	opener.location.href=redir;
	}
	
	
function EnterPage (redir) {  
	var pages = GetCookie('ank-porn-exit-console-dirty-money2');
	var numpages = parseInt(pages);
	numpages = (numpages != null) ? numpages+1 :1;
	SetCookie('ank-porn-exit-console-dirty-money2', numpages, exp);	
	foc	(redir);
	}

function BeforeExit (url2) { 
var pages = GetCookie('ank-porn-exit-console-dirty-money2');
var numpages = parseInt(pages);	
if (numpages < 2 ) { 
	numpages = 0;
    SetCookie('ank-porn-exit-console-dirty-money2', numpages, exp);	
	check55 = 1; 
	var popURL = url2;    
    eval("window.attachEvent('onunload',ext);");
	} else {
		numpages = numpages-1; 	
		SetCookie('ank-porn-exit-console-dirty-money2', numpages, exp);
		opener.focus();
	}
			
}


function ExitePage () {
	if (check55 == 1 ) {	
    	normal_exit();
    	}	
	}