// EXIT ACTION
window.onbeforeunload = unloadMess;
document.onmousemove = getMouseXY;

var mousex = 0;
var mousey = 0;
//The text between the quotes is the text that will appear on popup window.
var ExitActionText = "HOld on...Enter your email address under the red arrows and click on the button that says free instant access to get your CPA Quick Start Business Model and start making $35 daily from now on";

function random_100() {
	var ran_formatted = Math.floor( Math.random()*100 );
	return ran_formatted;
}

function unloadMess() {
	if (mousey<10 && mousex > 400) {
		//Exit Action redirect to this url.
		window.location = "http://cpakickstart.com";
		return ExitActionText;
	}
}

function getMouseXY(e) {
	if (!e) e = window.event;
	if (e) {
		if (e.pageX || e.pageY) {
			mousex = e.pageX;
			mousey = e.pageY;
		} else if (e.clientX || e.clientY) {
			mousex = e.clientX + document.body.scrollLeft;
			mousey = e.clientY + document.body.scrollTop;
		}  
	}
}

// AUTO RESIZE
top.window.moveTo(0,0);
top.window.moveTo(0,0);
if (document.all) {
	top.window.resizeTo(screen.availWidth,screen.availHeight);
	
} else if (document.layers||document.getElementById) {
	if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
		top.window.outerHeight = screen.availHeight;
		top.window.outerWidth = screen.availWidth;
	}
}

