var GAL_URL = popURLdecode;
window.onbeforeunload=confirmClose;

function confirmClose() {
	if (shut) {
		window.shut = false;
		setCookie('shut','false',1);
		window.location.href=GAL_URL;
		return '------------------------------------------------------------------ \n\rWait! Click "CANCEL" for our free offer.\n\r ------------------------------------------------------------------';
	}
}
var shut;
if (getCookie('shut') == 'false' || window.location.href.match('/nc/')) {
	shut = false;
}
else shut=true;

$().init(function(){
	$("a").each(function(k,o){$(o).bind("click",function(e){shut=false})});
	$("form").each(function(k,o){$(o).bind("submit",function(e){shut=false})});
});
