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);

function getCursor(e){
	var cursor = {x:0, y:0};
	if (e.pageX || e.pageY) {
		cursor.x = e.pageX;
		cursor.y = e.pageY;
	}else {
		var de = document.documentElement;
		var b = document.body;
		cursor.x = e.clientX + (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
		cursor.y = e.clientY + (de.scrollTop || b.scrollTop) - (de.clientTop || 0);
	}
	return cursor;
}
function windowOpen(e, div_id, offset_x, offset_y){
	e = e || window.event;
	var cursor =getCursor(e);
	
	document.getElementById(div_id).style.visibility="hidden";
	document.getElementById(div_id).style.left=(cursor.x+offset_x)+"px";
	document.getElementById(div_id).style.top=(cursor.y+offset_y)+"px";
	
	document.getElementById(div_id).style.visibility="visible";
}
function windowClose(div_id){
	document.getElementById(div_id).style.visibility="hidden";
}