addPrintStylesheet = function(){
	if(window.name == "printview"){
		var htmlBody = document.getElementById('footer').innerHTML;
		htmlBody = htmlBody + "<link rel='stylesheet' type='text/css' href='css/printFriendly.css'/>";
		document.getElementById('footer').innerHTML = htmlBody;
		window.resizeTo(830,600);
	}
}
 window.onload = function(){
/* add print stylesheet if window = print */
	addPrintStylesheet();
}

var backgroundSrcs = new Array("images/bg01.jpg","images/bg02.jpg","images/bg03.jpg","images/bg04.jpg","images/bg05.jpg") 

function pickimage() 
{ 
var bgimage=backgroundSrcs[(Math.round(Math.random()*(backgroundSrcs.length-1)))]; 
document.getElementById("topLeft").style.background = "url('" + bgimage + "')"; 
}

sfHover = function() {
	var sfEls = document.getElementById("nav").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); 