
var $ua = navigator.userAgent;
var isIE6 = Boolean( $ua.match("MSIE 6") );
var isIE = Boolean( $ua.match("MSIE") );

if(isIE6) {
	document.execCommand("BackgroundImageCache", false, true);
}



Event.observe(
	window,
	'load',
	function() {
		fitFooter();
	},
	false
);

if(!isIE) {
Event.observe(
	window,
	'resize',
	function() {
		fitFooter();
	},
	false
);
}

setInterval(fitFooter, 200);


function fitFooter() {
	var info = new Object();
	
	var foot = document.getElementById("foot");
	if(!foot) {
		return;
	}
	
	foot.style.marginTop = "40px";
	
	var windowHeight = window.innerHeight || document.documentElement.clientHeight;
	var bodyHeight = document.body.offsetHeight;
	
	if(windowHeight > bodyHeight) {
		foot.style.marginTop = (windowHeight - bodyHeight + 40) + "px";
	}
}
