var submit = false;
var timeout = 300;  // 5 minutes.

// Reset 'submit' so that the form can be submitted again.
function resetTimer()
{
  window.clearTimeout(timeoutID);
  window.status = "Enter PIN";
  submit = false;
  document.login.pin.focus();
}

function checkLogin()
{

  // This is to make sure that the form is submitted only once when
  // the user hits several times on the login button.
  if (submit)
  {
    alert("Your request is being processed.\nPlease do not hit reload or refresh.\nThis request may take up to a minute to process.");
    return false;
  }
  timeoutID = window.setTimeout("resetTimer()", timeout*1000);
  submit = true;

  return true;
}

function gotoLink(form) 

{

var OptionIndex=form.currentLocale.selectedIndex;

parent.location = form.currentLocale.options[OptionIndex].value;

}
