﻿//Execute the function when window load
$(document).ready(function () {
	positionFooter();
});

var height;

function positionFooter() {

	$footer = $("#footer");
	var body = document.body,
	html = document.documentElement;

	height = Math.max(body.scrollHeight, body.offsetHeight, body.clientHeight,
					html.clientHeight, html.scrollHeight, html.offsetHeight);

	if (jQuery(location).attr('href').split("/").reverse()[0] == "default.htm") {
		var ua = $.browser;
		if (ua.msie && ua.version.slice(0, 3) <= "9.0") {
			//alert("MSIE 8 or lower");
		}
		else
			height -= 75;
	}

	//	if (height < $(window).height())
	//	    height = $(window).height() - 80;

	height += 20;

	$footer.css({ top: height });

	// alert(height);
}


