function opengatekeeperlayer() { 
document.getElementById("nextrunlocation").style.visibility = "visible";
this.document.testform.inputbox.focus();
} 

function closegatekeeperlayer() { 
document.getElementById("nextrunlocation").style.visibility = "hidden";
} 
function goForit() {
var xmlDoc;
if (window.XMLHttpRequest){
  xmlDoc=new window.XMLHttpRequest();
  xmlDoc.open("GET","hoshruns.xml",false);
  xmlDoc.send("");
  xmlDoc=xmlDoc.responseXML;
  }
// IE 5 and IE 6
else if (ActiveXObject("Microsoft.XMLDOM"))
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load("hoshruns.xml");
  }
var x=xmlDoc.getElementsByTagName("run");
var records=x.length;
//alert(records);
varRecords= records-1;

password=this.document.testform.inputbox.value
if (password<1||password>varRecords)
{
alert("Only Run Numbers 1 to "+varRecords+" are shown on this site.")
return
};

  var locationwin;
  var password;
var t = new Date();
var date=t.toGMTString();
var i =Date.parse(date);
i=(i+60000); // Add a minute, 1 minute = 6000ms  
//password=this.document.testform.inputbox.value
//location="location"+password+".html?pw="+i
locationwin="location.html?pw="+i+"run="+password
this.document.testform.inputbox.value="";
document.getElementById("nextrunlocation").style.visibility = "hidden";
fetch(locationwin);
//  theKeeper=window.close();
}

function fetch(locationwin) {
  var root;
  //if (opener.closed) {
  // alert(location); 
   // root=window.open('','theKeepersGopher','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,location=no');
   //  root=window.open('','theKeepersGopher','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,fullscreen=no');
window.location=locationwin;
//   window.open(location);
   // root.location.href = location;
//  } else {
   // opener.location.href = location;
 // }
}

