// JavaScript Document for banatelkamar.net

/*This script displays the password for the student page login on double click*/
function pswdHelp(msg) { 
  msg = "Zi1S"; /* UC Z, lc i, numeral 1, UC S */
  alert(msg);
}


/*This script allows people to enter the student page by using a form that asks for a
Password.  The radio button selects the anchor on the page to go to */
function login(form) 
{
if (form.password.value=="Zi1S") /* UC Z, lc i, numeral 1, UC S */
{ 
for (var i=0; i < 6; i++)
   { 
   if (document.form1.radioLocation[i].checked)
      {
      var rad_val = document.form1.radioLocation[i].value;
      }
   }	
parent.location='studentPage.htm#' + rad_val; 
} 
else 
{
alert("Invalid Password")
}
} 

/*This script opens a new window for external links */
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


/* keypress stuff *

function enter(form)
{
	alert(' in enter pswd is ' form.password.value)
if (event.keyCode == 13)
	{	
	login(this.form)
	}
}
*/




