wside=(window.sidebar)?true:false;var w456=false;

function RsRsRsRs(teaabb) {
	var tttmmm="";
	l=teaabb.length;
	www=hhhhffff=Math.round(l/2);
	if(l<2*www)
		hhhhffff=hhhhffff-1;
	for(i=0;i<2*www;i++)
		tttmmm = tttmmm + teaabb.charAt(l-1);
	document.write(tttmmm);
	//document.frmTest.txtTest.value = tttmmm;
};
//RsRsRsRs(wlkji);
function IsBlocked(popupwin){
if(!popupwin) return true;
try{
return popupwin.closed;
}
catch(e){
return true;
}
 }

function AuditMyPCPopupWindow(){
return NewPopup("", screen.height, screen.width, (screen.availWidth/2), (screen.availHeight/2));
}

function BrowserWindow(){
return NewWindow("", screen.height, screen.width, (screen.availWidth/2), (screen.availHeight/2));
}

function AuditMyPCModelessWindow(){
if(document.all && document.getElementById){
return window.showModelessDialog("popup_sample.html");
}
else return AuditMyPCPopupWindow();
}

function AuditMyPCChannelWindow(){
return window.open("", "", "channelmode=yes");
}

function FullscreenWindow(){
return window.open("", "", "fullscreen=yes");
}

function NewPopup(url, name, top, left, width, height){
return window.open(url, name, "top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",menubar=no,location=no,status=no,toolbar=no,scrollbars=no");
}

function NewWindow(url, name, top, left, width, height){
return window.open(url, name, "top=" + top + ",left=" + left + ",width=" + width + ",height=" + height + ",menubar=yes,location=yes,status=yes,toolbar=yes,scrollbars=yes");
}

var ptest=new Array();
ptest[0]=new Array("normal popup", "currwin=AuditMyPCPopupWindow();");
ptest[1]=new Array("fullscreen window", "currwin=FullscreenWindow();");
ptest[2]=new Array("channel opener", "currwin=AuditMyPCChannelWindow();");
ptest[3]=new Array("modeless dialog", "currwin=AuditMyPCModelessWindow();");
ptest[4]=new Array("browser window popup", "currwin=BrowserWindow();");

var presults=new Array();
presults[0]=new Array("Normal popup blocking", "normal", false, 30);//original score 20
presults[1]=new Array("Fullscreen popup blocking", "fullscreen", false, 20);//original score 10
presults[2]=new Array("Channel popup blocking", "channel", false, 10);//original score 5
presults[3]=new Array("Modeless popup blocking", "modeless", false, 15);//original score 10
presults[4]=new Array("Browser window popup blocking", "browserwindow", false, 25);//original score 20
//presults[5]=new Array("User-launched HREF popup allowing", "user1", false, 10);
//presults[6]=new Array("User-launched JavaScript popup allowing", "user2", false, 10);
//presults[7]=new Array("User-launched OnClick popup allowing", "user3", false, 10);
//presults[8]=new Array("User-launched Delayed popup allowing", "user4", false, 5);

var currwin, winclose=false, i=0, thepoints=0, result, progress;
var p="<font color=\"#006600\"><b>Popup Blocked</b></font>";
var n="<font color=\"#FF0000\"><b>Popup Not Blocked</b></font>";

function PageScroll(){
window.scrollBy(0, 200);
}

function ShowProgress(){
progress.innerHTML="&nbsp; Progress: " + parseInt((i/presults.length)*100) + "%, test " + i + " of " + presults.length;
}

function StartTest(){
if(!document.getElementById){
window.alert("You need an Internet Explorer 5.5+, Netscape 6+, or Mozilla web browser in order to perform this popup test.");
return;
}
result=document.getElementById("result");
progress=document.getElementById("progress");
progress.style.visibility="visible";
i=0;
winclose=false;
result.innerHTML="<p>Checking popup blocking with the <b>" + navigator.appName + "</b> web browser</p><p><i>Initializing popup blocking tests, please wait...</i></p>";
ShowProgress();
PageScroll();
setTimeout("GoNextTest1();", 3000);
}

function GoNextTest1(){
try{
eval(ptest[i][1]);
}
catch(e){}
window.focus();
setTimeout("CheckTest1();", 1000);
}

function CheckTest1(){
presults[i][2]=IsBlocked(currwin);
if(!presults[i][2]) currwin.close();
result.innerHTML+="<p><img border=\"0\" src=\"newitem.gif\" alt=\"Popup Stopper Arrow\" width=\"10\" height=\"12\"> Checking <b>" + ptest[i][0] + "</b> popup blocking... " + ((presults[i][2])?p:n) + "</p>";
i++;
PageScroll();
ShowProgress();
if(i<ptest.length) setTimeout("GoNextTest1();", 2000);
//else setTimeout("StartULP();", 1000);
else setTimeout("FinishPopupTest();", 1000);
}

function StartULP(){
result.innerHTML+="<p><img border=\"0\" src=\"newitem.gif\" alt=\"Popup Stopper Arrow\" width=\"10\" height=\"12\"> <b>FOLLOW THESE INSTRUCTIONS TO CONTINUE:</b><br><blockquote><b>IMPORTANT!</b> <a href=\"popup_page.html\" target=\"_blank\" onclick=\"setTimeout('CheckULP();', 4000);\">Click here to continue the user-launched <b>popup test 1/4</b></a> - Standard-link  popup opening method</a></blockquote></p>";
PageScroll();
}

function CheckULP(){
var pr=window.confirm("FOLLOW THESE INSTRUCTIONS TO CONTINUE WITH THE POPUP BLOCKER TEST:\n\nClick the \"OK\" button if a new window titled as \"Popup Example\" has just been opened and it is currently open (it may be open in the background)\n\nIf no browser window appeared then click the \"Cancel\" button");
winclose=true;
presults[i][2]=pr;
i++;
result.innerHTML+="<br>User-launched popup allowing test #1 - " + ((pr)?p:n) + "<br>";
PageScroll();
StartULP2();
}

function StartULP2(){
result.innerHTML+="<p><blockquote><b>IMPORTANT!</b> <a href=\"javascript:void(currwin=AuditMyPCPopupWindow()); currwin.blur();\" onclick=\"setTimeout('CheckULP2();', 3000);\">Click here to continue the user-launched <b>popup test 2/4</b></a> - Javascript-link popup opening method</a></blockquote></p>";
PageScroll();
}

function CheckULP2(){
result.innerHTML+="<br>User-launched popup allowing test #2 - " + (IsBlocked(currwin)?n:p) + "<br>";
presults[i][2]=!IsBlocked(currwin);
if(!IsBlocked(currwin)) currwin.close();
i++;
PageScroll();
ShowProgress();
StartULP3();
}

function StartULP3(){
result.innerHTML+="<p><blockquote><b>IMPORTANT!</b> <a href=\"javascript:void(setTimeout('CheckULP3();', 3000));\" onclick=\"javascript: currwin=AuditMyPCPopupWindow(); currwin.blur();\">Click here to continue the user-launched <b>popup test 3/4</b></a> -  OnClick-link popup opening method</a></blockquote></p>";
PageScroll();
}

function CheckULP3(){
result.innerHTML+="<br>User-launched popup allowing test #3 - " + (IsBlocked(currwin)?n:p) + "<br>";
presults[i][2]=!IsBlocked(currwin);
if(!IsBlocked(currwin)) currwin.close();
i++;
PageScroll();
ShowProgress();
setTimeout("StartULP4();", 1000);
}

function StartULP4(){
result.innerHTML+="<p><blockquote><b>IMPORTANT!</b> <a href=\"javascript:window.alert('This is a message box that delays the launching of a popup.\n\n Click OK to continue.'); currwin=AuditMyPCPopupWindow(); currwin.blur();\" onclick=\"setTimeout('CheckULP4();', 3000);\">Click here to continue the user-launched <b>popup test 4/4</b></a> -  Delayed-link popup opening method</a></blockquote></p>";
PageScroll();
}

function CheckULP4(){
result.innerHTML+="<br>User-launched popup allowing test #4 - " + (IsBlocked(currwin)?n:p) + "<br>";
presults[i][2]=!IsBlocked(currwin);
if(!IsBlocked(currwin)) currwin.close();
i++;
PageScroll();
ShowProgress();
setTimeout("FinishPopupTest();", 1000);
}

function FinishPopupTest(){
progress.style.visibility="hidden";
var pr="?";
for(i=0;i<presults.length;i++){
pr+="t" + i + "=" + ((presults[i][2])?"1":"0") + "&";
if(presults[i][2]) thepoints+=presults[i][3];
}
pr+="tot=" + thepoints;

//result.innerHTML+="<br><p><img border=\"0\" src=\"newitem.gif\" width=\"10\" height=\"12\"><a href=\"popup_score.cfm" + pr + "\">Press to calcuate your test results</a></p>";
result.innerHTML+="<br><p>Checking complete</p>";
PageScroll();
}

window.onerror=new Function("return true;");

