// This include file has the basic scripts required for basic SWG pages
// include syntax: <SCRIPT language="JavaScript" src="/swg_01.js"></SCRIPT>


// this servReq is now set in msg.ph4
//var servReq = "down"; 
//var servReq = "up"; 

var newsalert = "off";
//var newsalert = "on";



function changelinkcolor(){
   for (i=0; i< flashlinks.length; i++){
     var flashtype=document.getElementById? flashlinks[i].getAttribute("flashtype")*1 :      flashlinks[i].flashtype*1;
     var flashcolor=document.getElementById? flashlinks[i].getAttribute("flashcolor") :      flashlinks[i].flashcolor;
     // note that lowercase color setting for flashcolor is required
     // flashtype 0 blinks text and flashtype 1 blinks background 
     if (flashtype==0){ 
         if (flashlinks[i].style.color==flashcolor)
           flashlinks[i].style.color=''
         else
           flashlinks[i].style.color=flashcolor
         }
     else if (flashtype==1){
        if (flashlinks[i].style.backgroundColor!=flashcolor) {
           flashlinks[i].style.backgroundColor=flashcolor;
        } else {
           flashlinks[i].style.backgroundColor='';
        }
    }
  }
}


function init(){
  setInterval("changelinkcolor()", 1000)

  if (newsalert == "on") {
     var i=0
     if (document.all){
       while (eval("document.all.flashlink"+i)!=null){
         flashlinks[i]= eval("document.all.flashlink"+i)
         i++
       } 
     }
     else if (document.getElementById){
       while (document.getElementById("flashlink"+i)!=null){
         flashlinks[i]= document.getElementById("flashlink"+i)
         i++
       }
     }
     setInterval("changelinkcolor()", 1000)
     }
}

function callPerl() {
    document.hrpost.action = perlpath + "hr_data/hr_view.pl";
    document.hrpost.submit();
}

function serviceR() {
  if (servReq != "down") {
     jump('ssm/index.php','s');
  } else {
     alert('Service Requests are temporarily offline.  Please check back in a few minutes.  We apologize for the inconvenience.');
     window.location.reload( true ); 
  }
}
 


