<!-- Begin
function TimeO(i)
 {
 setTimeout("TOmsg(120);",(i-2)*60000);
 window.status="Warning: Your JATC session times out after "+i+" minutes of inactivity.";
 }
function TOmsg(i)
 {
 var t1,t2,t3,t4;
 t1=DaySec();
 alert("Warning:\n\nYour JATC session will time out in "+i+" seconds\nif no interaction with the server is detected!");
 t2=DaySec();
 t3=t2-t1;
 t4=i*1;
 if(t3<0) { t3+=86400; }
 if(t3>t4)
  {
  window.location="EmpClose.asp";
  }
 else
  {
  Sclose(t4-t3);
  } 
 }
function Sclose(i)
 {
 window.status="Your JATC session will time out in "+i+" seconds!"
 i--;
 if(i<0) 
  {
  window.location="EmpClose.asp?unlock=yes";
  }
 else
  {
  setTimeout("Sclose("+i+");",1000);
  }
 }
function DaySec()
 {
  var now = new Date();
  var hours = now.getHours();
  var minutes = now.getMinutes();
  var seconds = now.getSeconds();
  return((hours*3600)+(minutes*60)+seconds);
 }
function GoFocus(i,j)
 {
 if(j==1) {
  if(i==0) {document.forms[0].userid.focus();}
  else {document.forms[0].passwd.focus();}
  }
 else if(j==2) {
  document.forms[0].pwd1.focus();
  TimeO(20);
  }
 }
function Approve(f)
 {
  var i,j,k;
  k=1;
  for(var i=1;i<=document.forms[0].wrkDay.length;i++) {
   if (f==0) {
    document.forms[0].elements[k].checked=false;
    document.forms[0].elements[k+1].checked=false;
    document.getElementById("y"+i).style.backgroundColor="#cccccc";
    document.getElementById("n"+i).style.backgroundColor="#cccccc";
   }
   else if (f==1) {
    document.forms[0].elements[k].checked=true;
    document.getElementById("y"+i).style.backgroundColor="#3fff3f";
    document.getElementById("n"+i).style.backgroundColor="#cccccc";
   }
   else if (f==-1) {
    document.forms[0].elements[k+1].checked=true;
    document.getElementById("y"+i).style.backgroundColor="#cccccc";
    document.getElementById("n"+i).style.backgroundColor="#ff3f3f";
   }
   k=k+3;
  }
 }
function waitmsg()
 {
  document.forms[0].jatcemplo.value="Logging On";
  document.forms[0].waittxt.value="Please wait - Apprentice information is being retrieved...";
 }

function bcolor(which)
{ 
 var i;
 i=which.name.substr(6,which.name.length-6);
 if(which.value==1) {
   document.getElementById("y"+i).style.backgroundColor="#3fff3f";
   document.getElementById("n"+i).style.backgroundColor="#cccccc";
 }
 else {
   document.getElementById("n"+i).style.backgroundColor="#ff3f3f";
   document.getElementById("y"+i).style.backgroundColor="#cccccc";
 }
}
// End -->

