// JavaScript Document

var startDate = new Date();
var startValue = startDate.getTime();

function openCalendar(){
popUp = window.open('calendar/calendarNew.php', 'newWin', 'width=775,height=595,toolbar=no,scrollbars=yes')
popUp.focus()
return false;
}

// link to e-mail address
function noSpam(user,domain,tld){
window.location = "mailto:"+user+"@"+domain+"."+tld;
return false;
}


function lockScreen(action, hideSelectFields){
// hideSelectFields should be true/false - use false as default
// if page to be locked has form with "select" fields, use TRUE for IE Hack

if (action == "lock")
 {
 document.getElementById('lockScreen').style.visibility = "visible";
 }else{
 document.getElementById('lockScreen').style.visibility = "hidden"; 
 }

if ((navigator.userAgent.match("MSIE")) && (hideSelectFields == true))
{
  if (action == "lock")
   {
   document.getElementById('lockScreenFrame').style.visibility = "visible";
   }else{
   document.getElementById('lockScreenFrame').style.visibility = "hidden";
   }
 }
}


// hide, unhide and/or move a div.
function popUp(id,displayValue,top,left){
 var box = document.getElementById(id).style;
 
 box.display = displayValue;
 if(top != "" && left != ""){
 box.top = top+"px";
 box.left = left+"px";
 }
 return false;
}