//*****************************************************************//
// GateKeeper v3.3 - by Joe Barta
// http://www.pagetutor.com/keeper/
// Permission is granted to freely use this script.
//*****************************************************************//
function GateKeeper() {
   gateKeeperBox = window.open('gatemain.html',
     'theKeeper', 'width=230,height=100,resizable=yes'); }
//*****************************************************************//
// Length of time (in seconds) for GateKeeper to find the password doc.
//*****************************************************************//
gatetimer = 5;
//*****************************************************************//
// Send visitors to this page if password is denied, full or relative url
//*****************************************************************//
redirectpage = "insider_news_oops.htm";
//==================================================================//
// Function that creates id.html & top.html
// For now, middle & bottom are just blank.
//===================================================================//
function createDocs()
{
   // top.html ===============================
   parent.topframe.document.clear();
   parent.topframe.document.open();
   parent.topframe.document.writeln("<H"+"TML><H"+"EAD><T"+"ITLE></T"+"ITLE></H"+"EAD>");
   parent.topframe.document.writeln("<B"+"ODY BGCOLOR=\"#CCCCCC\">");
   parent.topframe.document.writeln("<CENTER><FORM NAME=\"passform\" METHOD=post");
   parent.topframe.document.writeln(
     "ACTION=\"javascript:parent.checkPassword(window.document.passform.passbox.value)\">");
   parent.topframe.document.writeln("<FONT FACE=\"arial,helvetica\" SIZE=2><B>Password Required</B></FONT><BR>");
   parent.topframe.document.writeln("<INPUT TYPE=\"password\" NAME=\"passbox\" SIZE=\"22\">");
   parent.topframe.document.writeln("</FORM></CENTER>");
   parent.topframe.document.writeln("<P>&nbsp;<P>&nbsp;");
   parent.topframe.document.writeln("</B"+"ODY></H"+"TML>");
   parent.topframe.document.close();
   // id.html ===============================
   parent.idframe.document.clear();
   parent.idframe.document.open();
   parent.idframe.document.writeln("<H"+"TML><H"+"EAD><T"+"ITLE></T"+"ITLE></H"+"EAD>");
   parent.idframe.document.writeln("<B"+"ODY BGCOLOR=\"#CCCCCC\" LINK=\"#FF0000\" VLINK=\"#FF0000\" ALINK=\"#FFCCCC\">");
   parent.idframe.document.writeln("<P ALIGN=\"center\"><FONT SIZE=\"1\" FACE=\"verdana,arial,helvetica\"><A HREF=\"javascript:parent.gotoGatekeeper()\">Protected by GateKeeper</A></FONT>");
   parent.idframe.document.writeln("<P>&nbsp;<P>&nbsp;");
   parent.idframe.document.writeln("</B"+"ODY></H"+"TML>");
   parent.idframe.document.close();
   parent.topframe.document.passform.passbox.focus();
}
/*==================================================================
Sends the user to the GateKeeper page
===================================================================*/
function gotoGatekeeper()
{
   parent.opener.location.href = "http://www.pagetutor.com";
   parent.close();
}
/*==================================================================
Check the password. If times out, deny entry.
===================================================================*/
function checkPassword(password) {
   parent.bottomframe.location.href = "bin/" + password + ".htm";
   parent.middleframe.document.clear();
   parent.middleframe.document.open();
   parent.middleframe.document.writeln("<H"+"TML><B"+"ODY BGCOLOR=\"#CCCCCC\">");
   parent.middleframe.document.writeln("<CENTER><FONT SIZE=\"3\" FACE=\"verdana,arial,helvetica\"");
   parent.middleframe.document.writeln("COLOR=\"#0000FF\"><B>Verifying Password</B></FONT></CENTER>");
   parent.middleframe.document.writeln("<BR></B"+"ODY></H"+"TML>");
   parent.middleframe.document.close();
   pauseScript = setTimeout("denyEntry()",gatetimer*1000);
}
/*==================================================================
Deny entry on timeout, go to redirectpage.
===================================================================*/
function denyEntry() {
   parent.middleframe.document.clear();
   parent.middleframe.document.open();
   parent.middleframe.document.writeln("<H"+"TML><B"+"ODY BGCOLOR=\"#EE0000\">");
   parent.middleframe.document.writeln("<CENTER><FONT SIZE=\"3\" FACE=\"verdana,arial,helvetica\"");
   parent.middleframe.document.writeln("COLOR=\"#FFFFFF\"><B>Password Denied</B></FONT></CENTER>");
   parent.middleframe.document.writeln("<BR></B"+"ODY></H"+"TML>");
   parent.middleframe.document.close();
   if (redirectpage.length > 2) {parent.opener.location.href = redirectpage;}
}
/*==================================================================
Verify Target File exists, go to targetfile.
===================================================================*/
function speedVerify(targetfile)
{
   parent.middleframe.document.clear();
   parent.middleframe.document.open();
   parent.middleframe.document.writeln("<H"+"TML><B"+"ODY BGCOLOR=\"#009900\">");
   parent.middleframe.document.writeln("<CENTER><FONT SIZE=\"3\" FACE=\"verdana,arial,helvetica\"");
   parent.middleframe.document.writeln("COLOR=\"#FFFFFF\"><B>Password Accepted</B></FONT></CENTER>");
   parent.middleframe.document.writeln("<BR></B"+"ODY></H"+"TML>");
   parent.middleframe.document.close();
   parent.opener.location.href = targetfile;
   holdup = setTimeout('parent.close()',1250);
}
//****************    End of Source   ******************************//
// GateKeeper v3.3 - by Joe Barta
// http://www.pagetutor.com/keeper/
// Permission is granted to freely use this script.
//*****************************************************************//
