function init () {
  var timeoutMs = timeoutMin * 60000;
  window.setTimeout ("restart ()", timeoutMs);
}



function restart () {
  var expire = "expires=Sat, 1-Jan-2000 00:00:00 GMT";
  document.cookie   = "focus='';" + expire;
  document.cookie   = "userId='';" + expire;
  document.location = home;
}



function openWindow (url, id, option) {
  if (option == 0) {
    window.open (url, id, "");
  } else {
    window.open (url, id, "width=800,height=600,location=no,status=no,resizable,scrollbars");
  }
}



function focusElement (name) {
  document.getElementsByName (name)[0].style.background = "#ffc";
  document.cookie = "focus=" + name + ";";
}



function blurElement (name) {
  document.getElementsByName (name)[0].style.background = "#fff";
}
