sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	
	for( var i = 0; i < sfEls.length; i++ ) {
		// apply sfhover class to li elements when they are moused over
		sfEls[i].onmouseover = function() {
			this.className += " sfhover";
		}
		
		// remove sfhover class using regex on mouse out
		sfEls[i].onmouseout = function() {
			this.className = this.className.replace( new RegExp(" sfhover\\b"), "" );
		}
	}
}

if( window.attachEvent ) window.attachEvent( "onload", sfHover );

function openWindow(strURL, iWidth, iHeight){
	newWindow = window.open(strURL, "newWindow", "scrollbars=no,menubar=no,resizable=yes,width=" + iWidth + ",height=" + iHeight);
	newWindow.focus();
}

function viewImage(file,w,h,title) {
	
	var win = window.open("","imageviewer","width="+w+",height="+h+",menubar=no,toolbar=no");
	win.document.open();
	win.document.write("<html><head><title>"+title+"</title></head>");
	win.document.write("<body style='margin: 0; padding: 0;'>");
	win.document.write("<img src='"+file+"' alt='"+title+"' /></body></html>");
	win.document.close();
}