function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function setFooter() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('mainTable').offsetHeight;
			var bodyHeight = document.getElementById('bodyTable').offsetHeight;
			if (windowHeight - (contentHeight + 270) >= 0) {
				$("#mainTable").height(windowHeight - 270);
				//$("#bodyTable").height(windowHeight);
				$("#bFooter").css("top", (windowHeight-100));

				//$("#mainTable").animate({ height: windowHeight - 224 }, "fast");
				//$("#footerTR").fadeTo("slow", 1);

			} else {

				$("#bFooter").css("top", (bodyHeight-100));
			}
		}
	}
}
function AddToFavorite() {
    if ( document.all ) window.external.AddFavorite( window.top.location.href, '' );
    else alert("Press 'Ctrl + D'." );
}
function showB(name) {
	$("#"+name).fadeTo("fast", 1);
}
function getDiv(name){
	var parent = document.getElementById(name);
	var div = document.getElementById('sub'+name);
	if(div.style.display == 'none') {
		parent.className = name+'On';
		div.style.display = 'block';
	} else {
	div.style.display = 'none';
	parent.className = name;
	}
}
$(document).ready(function(){
	setFooter();
	$(".linkMenu").mouseover(function(){
		$("#"+$(this).attr("rel")).show("slow");
	})
	$(".linkMenu").mouseout(function(){
		$("#"+$(this).attr("rel")).hide("slow");
	})
})

window.onresize = function() {
	setFooter();
}
