h_main   = 0;
h_footer = 60;

/*
 * footer placement
 */
function resize_content() {
	var h_visible = window.innerHeight;
	if(!h_visible)
		h_visible = document.body.clientHeight;

	if(h_visible - h_footer >= h_main) {
		if(document.getElementById) {
			document.getElementById("main_wrapper").style.height = (h_visible - h_footer)+"px";
		}
		else if(document.all) {
			document.all.main_wrapper.style.height = (h_visible - h_footer)+"px";
		}
	}
}

function resize_content_onload() {
	h_main = document.getElementById("main_wrapper").offsetHeight;
	resize_content();
}

window.onresize = resize_content;
window.onload   = resize_content_onload;

/*
 * roll-over pull-down-menu for IE
 */
sfHover = function() {
	var sfEls = document.getElementById("menu_main_wrapper").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);

