// JavaScript Document

function disappear(trName) 
{
	document.getElementById(trName).style.display = "none";
}

function reappear(trName)
{
	document.getElementById(trName).style.display = "";
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_changeProp(objId,x,theProp,theValue) { //v9.0
  var obj = null; with (document){ if (getElementById)
  obj = getElementById(objId); }
  if (obj){
    if (theValue == true || theValue == false)
      eval("obj.style."+theProp+"="+theValue);
    else eval("obj.style."+theProp+"='"+theValue+"'");
  }
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function movepic(img_name,img_src) {
	document[img_name].src=img_src;
}

function password(){
	var ID=prompt("Password", "");
	var cor=false;
	
	if (ID=="Secret Agent")
		{
		window.location="secretpage.html";
		cor=true;
		}
	else
		{
		alert("Warning Unautherized User\nThis computer will self destruct in 10 seconds.\nHave a nice day.");
		cor=false;
		document.write("<p><!-- na na na na na --></p>");
		}
	
	return cor;
}

function AgentWrite(){
	document.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
	document.write("<head>");
	document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />");
	document.write("<title>The Secret Page</title>");
	document.write("<script type=\"text/javascript\" src=../\"script.js\"></script>");
	document.write("</head>");
	document.write("<body onLoad=\"call()\">");
	document.write("<div align=\"center\"><h2>Welcome Agent.  These are your secret links.</h2></div>");
	document.write("<div align=\"left\">");
	document.write("<p></p>");
	document.write("</div>");
	document.write("<div align=\"left\">");
	document.write("<p><a href=\"https://www99.americanexpress.com/myca/logon/us/en/en_US/logon/LogLogon.jsp?DestPage=https%3A%2F%2Fwww99.americanexpress.com%2Fmyca%2Facctsumm%2Fus%2Faction%3Frequest_type%3Dauthreg_acctAccountSummary%26entry_point%3Dlnk_homepage%26aexp_nav%3Dsc_checkbill)\">American Express</a></p>");
	document.write("<p><a href=\"http://www.bankofamerica.com/\">Bank of America</a></p>");
	document.write("<p><a href=\"https://investing.schwab.com/trading/signoff\">Charles Schwab</a></p>");
	document.write("<p><a href=\"http://www.chase.com/\">Chase Credit Card</a></p>");
	document.write("<p><a href=\"https://www.discovercard.com/cardmembersvcs/loginlogout/app/ac_main\">Discover Card</a></p>");
	document.write("<p><a href=\"http://www2.discovercard.com/deskshop/\">Discover Card Numbers</a></p>");
	document.write("<p><a href=\"https://www.mbnanetaccess.com/NASApp/NetAccess/LoginDisplay\">MBNA</a></p>");
	document.write("<p><a href=\"https://pcb.peoples.com/online/default.jsp\">PCB Peoples</a></p>");
	document.write("<p><a href=\"https://gateway.nam.slb.com/dana-na/auth/url_default/welcome.cgi\">Schlumberger</a></p>");
	document.write("</div>");
	document.write("</body>");
	document.write("</html>");
}

function ErrorWrite(){
	document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">");
document.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">");
document.write("<head>");
document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />");
document.write("<title>404 Error: Page Missing</title>");
document.write("<script type=\"text/javascript\" src=../\"script.js\"></script>");
document.write("</head>");
document.write("<body>");
document.write("<h1>404 ERROR: PAGE NOT FOUND <span onclick=\"MM_callJS('call()')\">             </span></h1>");
document.write("<p>The URL you have requested was not found.</p>");
document.write("<p>The page your looking for might have been removed, had it's name changed, or is temporarily unavailable.</p>");
document.write("<p>Please try the following:</p>");
document.write("<ul>");
document.write("<li>If you typed the page address in the Address bar, make sure that it's spelled correctly.</li>");
document.write("<li>Click the <a href=\"javascript:history.go(-1)\">back</a> button to try another link.</li>");
document.write("<li>Click <a href=\"http://www.google.com\">Search</a> to look for more information on the internet.</li>");
document.write("</ul>");
document.write("</body>");
document.write("</html>");
}

function call(){
	var cor=password();
	if (cor==true)
		{AgentWrite();}
	else{
		ErrorWrite();}
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
