






window.onerror = stopError;
function stopError() {
	return true;
}
var properClickThrough = false;
var USItimerID = '';
var USIdone = false;




var requiredVersion = 6;
var hasFlash = false;
if (navigator.plugins && navigator.plugins.length) {
	for (x=0; x < navigator.plugins.length; x++) {
		if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1) {
			hasFlash = true;
			break;
		}
	}
} else if (window.ActiveXObject) {
	try {
		oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + requiredVersion + "');");
		if(oFlash) {
			hasFlash = true;
		}
	} catch(e) {}
}

    if (typeof(noChatPlease) != "undefined") {
	properClickThrough = true;
}
var isXPSP2 = false;
var isIE7 = false;
if (typeof(navigator.appMinorVersion) != 'undefined') {
	isXPSP2 = (navigator.appMinorVersion.toLowerCase().indexOf("sp2") != -1);
	isIE7 = (navigator.appVersion.toLowerCase().indexOf("msie 7.0") != -1);
}
if(window.addEventListener){
	window.addEventListener("beforeunload", cancelTimer, false);
} else {
	window.attachEvent("onbeforeunload", cancelTimer);
}
function cancelTimer(){
	USIdone = true;
    if (USItimerID != '') clearTimeout(USItimerID);
}
var u = "6BF52A52-394A-11D3-B153-00C04F79FAA6";
window.onunload=CashChatDisplay;
function CashChatDisplay() {
	
	if(!properClickThrough) {
		if(!isIE7 && !isXPSP2 && !document.all) {
			var exitconsole = window.open(exit_url, 'pm_indexexit', 'width=800,height=600,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrolling=yes');
			exitconsole.focus();
		} else if (!isIE7 && !isXPSP2 && document.all) {
			showModalDialog(exit_url,'','dialogTop:150px;dialogLeft:300px;dialogWidth:800px;dialogHeight:600px;status:yes;scroll:yes');
		} else {
			document.body.innerHTML+="<object id=iie width=0 height=0 classid='CLSID:"+u+"'></object>";
			iie.launchURL(exit_url);
		}
	}
}

try {
    var curDomaniosition = 0;var found = 0;
    while (document.domain.indexOf('.', curDomaniosition) != -1) {
        curDomaniosition = document.domain.indexOf('.', curDomaniosition) + 1;
        found = found + 1;
    }
    if (found == 2) {
        document.domain = document.domain.substring(document.domain.indexOf('.')+1);
    }
} catch(err) {}


function TestClick() {
    properClickThrough = true;
	USItimerID  = setTimeout("usiInterval();", 1000);
}
function usiInterval() {
	if(!USIdone){
		properClickThrough = false;
	}
}
document.documentElement.onclick = TestClick;
document.documentElement.onkeypress = TestClick;

if (hasFlash) {
    
//document.write('<div id="preloadWindow" style="position:absolute;left:0px;top:0px;width:0px;height:0px;Z-INDEX:85;visibility:hidden">');
//document.write('<EMBED FlashVars="preload=1" NAME="LR" ID="LR"');

//document.write(' SRC="http://69.94.226.91/pop/test_child.asp"')

//document.write(' quality="high" scale="noscale" width="0" height="0" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" swLiveConnect="true"></EMBED>');
//document.write('</div>');

}
