<!--  // hide the code
//  Default cookie functions
function getCookieVal (offset) {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1)
      endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}

function getCookie (name) {
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen)
   {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
         return getCookieVal(j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) break;
   }
   return null;
}

function setCookie (name, value,expires,path,domain,secure) {
   path = path
   document.cookie = name + "=" + escape (value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
}

function deleteCookie (name, path, domain) {
   if (getCookie(name))   {
   path = path
   setStr = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-98 00:00:01 GMT";
   document.cookie = setStr
   }
}

function showCookie(name)  {
	var strCookieContents = getCookie(name)
	alert('Cookie '+name+' = ' + strCookieContents)
}

// Browser detection
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
if ((browserName == "Netscape" && browserVer >= 3) || ((browserName.indexOf("Microsoft") >= 0) && browserVer >= 4)) version = "n3";
else version = "n2"



function imageUp(name)  {
   if (version == "n3")  {
     if (document.images) {
       if (imageFlag == 1) {
        document[name].src = eval(name + "on.src");
       }
     }
   }
}

function imageDown(name)  {
   if (version == "n3")  {
     if (document.images) {
       if (imageFlag == 1) {
        document[name].src = eval(name + "off.src");
       }
     }
   }
}

var smsChildVar
function smsChildWin(file)  {
  gotoLocation = "fs"+file
  smsChildVar = window.open(gotoLocation,"","height=450,width=400,locationbar=no,directories=no,scrollbars=no")
}

var timerId 
var today
var gotoLocation
function startTimer(destination){
   gotoLocation=destination
   window.setTimeout(((gotoLocation) ? "window.location.href = gotoLocation" : "location.reload()"), smsCoreCodeTimeLimit*1000)
}

function logOut(strLink) {
  // they want their cookie deleted if they accept cookies
  deleteCookie("LOGIN")
  deleteCookie("ZipCookie")
  location.href = "sy173frm.asp?link=" + strLink
}

function Go(){return}
	
// function used to open a new child window
var newWindow = null;
function openWin2(url) {
	var winWidth = (550);
	var winHieght = (300);
	var winl = (screen.width - winWidth) / 2;
	var wint = (screen.height - winHieght) / 2;
    winStats='toolbar=no,location=no,directories=no,menubar=no,'
    winStats+='scrollbars=yes,width='+winWidth+',height='+winHieght
		if (navigator.appName.indexOf("Microsoft")>=0) {
          	winStats+=',left='+winl+',top='+wint
 		}else{
       		winStats+=',screenX='+winl+',screenY='+wint
		}
		
		if (!newWindow || newWindow.closed){
			newWindow = window.open(url,"NewWindow",winStats);
		}else{
			newWindow.focus();
		}  
		 
		if (newWindow.opener == null){
			newWindow.opener = self
		} 
		
    }

function SwapBtnImg(objBtn, imageName){
	objBtn.src = ("images/" + imageName + ".gif");
}


// used for expandable windows...
var xyPositions = "";
var x = 0;
var y = 0;
var d = document
var ie = d.all
var ns6 = d.getElementById&&!d.all
var id = "hoverInfo"
var id2 = "DisableBG"
var id3 = "hoverInfoContent"
function expandDiv(Msg, divWidth, divHeight){
	try{
	    var winl;
		var wint;
		var objInfoBox = d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		var objDisableBG = d.getElementById?d.getElementById(id2):d.all?d.all[id2]:d.layers[id2];
		var objInfoContent = d.getElementById?d.getElementById(id3):d.all?d.all[id3]:d.layers[id3];
		var noPx = document.childNodes ? 'px' : 0;
	    winl = (window.screen.width - divWidth) / 2;
	    wint = 30//(divHeight==0)?(30):((window.screen.height - divHeight) / 2);
	    objInfoBox.style.width = divWidth + noPx;
		objInfoBox.style.height = divHeight + noPx;
		objInfoBox.style.left = winl + noPx;
		objInfoBox.style.top = wint + noPx;
		objInfoBox.style.display="block";
		objDisableBG.style.display="block";
		objInfoContent.style.height = (divHeight - 75) + noPx;
		objInfoContent.innerHTML = Msg
	}catch (e){
	
	}
}

function showMessage(Msg, divWidth, divHeight){
		if(Msg != ""){
			expandDiv(Msg, divWidth, divHeight)
		}
	}

function HideHoverInfo(objNodeName){    
	try{
	    var objNode = d.getElementById?d.getElementById(objNodeName):d.all?d.all[objNodeName]:d.layers[objNodeName];
	    objNode.style.display="none";	
	    var objDisableBG = d.getElementById?d.getElementById(id2):d.all?d.all[id2]:d.layers[id2];
	    objDisableBG.style.display="none";
	}catch(e){
	
	}
}

window.onload = function(){
	if(SessionMsg != ""){
		//alert(SessionMsg);
		showMessage(SessionMsg, 400, 300)
	}
	startTimer(); // used for refreshing the page after 20 minutes...
	
		// check if our scrollbar does exist to prevent JS error from null value...
	var navcontainer = document.getElementById("NavContainer");
	if ((navcontainer != null)){
		setNavActiveLink(); // sets display of acvtive link in the side navigation...
	};
	
	HighlightSideNavigation();
	HighlightMainNavigation();
	parseStylesheets();
	
}
	

function setNavActiveLink(){
	var list = document.getElementById("NavContainer").getElementsByTagName("li");
	if (list != null){
		for(var i = 0;i < list.length;i++){
			if (list[i].className == "submenu"){
				var aList = list[i].getElementsByTagName("a");
				for(var k = 0;k < aList.length;k++){
					if (location.href == aList[k].href){
						list[i].className = "submenu navLinksActive"
					}
				}
			}
		}
	}		
}
//  done hiding the code -->