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();
		//alert("windowHeight : " + windowHeight);
		if (windowHeight > 0) {
			var contentHeight = document.getElementById('bodyInner').offsetHeight;
			//alert("contentHeight : " + contentHeight);

			var footerElement = document.getElementById('foot');

			if (footerElement) {
				var footerHeight  = footerElement.offsetHeight;

				footerElement.style.top = (contentHeight - (footerHeight)) + 'px';
				/*
				if (windowHeight - (footerHeight) >= 0) {
					footerElement.style.top = (contentHeight - (footerHeight)) + 'px';
				}
				else {
					footerElement.style.top = '0px';
				}*/
			}
		}
	}
}
window.onload = function() {
	setFooter();
}
window.onresize = function() {
	setFooter();
}

/*
function patchfoot(){



	if(navigator.userAgent.indexOf("Safari")!=-1){
		//patch pour SAFARI

		//document.write('<link href="/_css/safari.css" rel="stylesheet" type="text/css" media="all" />');
	}
	else if (navigator.appName.indexOf("Microsoft",0)>=0){
		//document.write('<link href="/_css/iemac.css" rel="stylesheet" type="text/css" media="all" />');
	}

	alert(


	document.getElementById("foot").style.position = "absolute";
	//document.getElementById("foot").style.bottom = "1px";
	//document.getElementById("foot").style.bottom = "0px";

	if (document.getElementById){
    document.getElementById("foot").style.position="absolute";
    document.getElementById("foot").style.bottom="1px";
	  document.getElementById("foot").style.bottom="0px";
	}
	else if (document.all){
      document.all.foot.style.bottom="1px";
	   document.all.foot.style.bottom="0px";
	   document.all["foot"].style.bottom="1px";
	   document.all["foot"].style.bottom="0px";
	}
	else if (document.layers){
    document.layers["foot"].style.bottom="1px";
  	document.layers["foot"].style.bottom="0px";

	}
	else if(document.layers["foot"].bottom){
    document.layers["foot"].bottom = 1;
  	document.layers["foot"].bottom = 0;
  }

}*/
