sfHover = function () {
	var el = document.getElementById("nav").childNodes;
	for (var i = 0; i < el.length; i++) {
		if (el[i].getElementsByTagName("LI").length > 0 && el[i].id != navon + "_li") {
			el[i].onmouseover = function() {
				if (navon.length > 0 && navon != "home" && navon != "book") document.getElementById(navon).className = "nav-off";
				this.className = "sfhover";
			}
			el[i].onmouseout = function() {
				if (navon.length > 0 && navon != "home" && navon != "book") document.getElementById(navon).className = "nav-on";
				this.className = "";
			}
		}
	}
}

if (window.attachEvent)
	window.attachEvent("onload", sfHover);
else
	window.addEventListener("load", sfHover, false);
	
var win=null;
function openWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="center"){
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
	}else if((pos!="center" && pos!="random") || pos==null){
		LeftPosition=0;TopPosition=20
 	}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
	if(win.focus){
		win.focus();
	}
}

function processBook(){
	var item = document.getElementById('bnform');
	if(item){
		document.location.href = item.value;
	}
}