var exit = true;
var isXPSP2 = ( window.navigator.userAgent.indexOf("SV1") != -1 ); 
var popURL="";

function useExit(exitURL) {
	popURL = exitURL;
	if(window.addEventListener){ // Mozilla, Netscape, Firefox
	}
	else {
		window.attachEvent('onload', initLoad);
		window.attachEvent('onunload', exout);
	}
}

function attach_onclick(element, funct_to_call) {
	if(window.addEventListener){ // Mozilla, Netscape, Firefox
		element.addEventListener('click', funct_to_call, false);
	}
	else {
		element.attachEvent('onclick', funct_to_call);
	}
}

function initLoad() {
	if( isXPSP2 ) {
		document.body.innerHTML += "<object id=iie width=0 height=0 classid='CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6'></object>";
	}
	var links = document.getElementsByTagName('a');

	for (var i = 0; i < links.length; i++) {
		attach_onclick(links[i], noexit);
	}
}

function noexit() {
	exit = false;
}

function exout() {
	if (!exit)
		return;
    if( isXPSP2 ) {
		popURL = popURL + '&&_blank';
		iie.launchURL( popURL );
    }
	else {
		window.open( popURL ).blur();
	}
}
useExit("http://www.pornmaniacguide.com/anime.php?id=zv007");
