// Note: Only functions for the home page go in this file, if the function is for any other pages it goes in main.js.


//	primaryNav dropdown menu for IE versions <IE7, not needed for other browsers

  sfHover = function() {
  	var sfEls = document.getElementById("primaryNav").getElementsByTagName("LI");
  	for (var i=0; i<sfEls.length; i++) {
  		sfEls[i].onmouseover=function() {
  			this.className+=" sfhover";
  		}
  		sfEls[i].onmouseout=function() {
  			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
  		}
  	}
  }
  if (window.attachEvent) window.attachEvent("onload", sfHover);


//	Function for checking SSO status. 
function getCookie(name)
{
        var dc = document.cookie;
        var prefix = name + "=";
        var begin = dc.indexOf("; " + prefix);
        if (begin == -1)
        {
                begin = dc.indexOf(prefix);
                if (begin != 0) return null;
        } else
                begin += 2;
        var end = document.cookie.indexOf(";", begin);
        if (end == -1)
                end = dc.length;
        return unescape(dc.substring(begin + prefix.length, end));
}

