// Load multiple functions on window onload and onresize
// Source: http://simon.incutio.com/archive/2004/05/26/addLoadEvent
function addLoadEvent (func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

// Javascript for drop down menu, needed for IE. Taken from: http://www.htmldog.com/articles/suckerfish/dropdowns/
sfHover = function() {
	var sfEls = document.getElementById("primary-navigation").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"), "");
		}
	}
}

// Attach event for IE only
if (window.attachEvent) {
	addLoadEvent(sfHover);
}


// Print current year
function printCurrentYear () {
    var d = new Date();
    document.write(d.getFullYear());
}

