/******* footer *******/

var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 &&
              parseFloat(navigator.appVersion) >= 4 &&  parseFloat(navigator.appVersion) < 5) ? 1 : 0;
var isMinIE4 = (document.all) ? 1 : 0;
var isMinIE5 = (isMinIE4 && navigator.appVersion.indexOf("5.") >= 0) ? 1 : 0;
var NS6 = (document.getElementById&&!document.all)

onresize = function()
{
  footer('main')
}

function footer(div1){
	div1=getLayer2(div1);
	bas=getLayer2("footer");
	div2=getLayer2("gauche");
	div3=getLayer2("contenu");
	
	if(div3.offsetHeight<=div2.offsetHeight) div3.style.height=div2.offsetHeight+"px";
	
	
	haut=getHeight();
	
	if((haut-bas.offsetHeight)>div1.offsetHeight){
		bas.style.top=haut-bas.offsetHeight+"px";
	}
	else{
		bas.style.top=div1.offsetHeight+bas.offsetHeight+"px";
	}
}

function getHeight(){
	if(NS6) haut=window.innerHeight;
	else if (isMinIE5 && navigator.appVersion.indexOf("Macintosh") != -1) haut =document.body.offsetHeight;
	else haut = document.documentElement.clientHeight;
	
	return haut;
}

function getLayer2(name) {

  if (isMinNS4)
    return findLayer(name, document);
  if (isMinIE4)
    return eval('document.all.' + name);
	if (NS6)
		return document.getElementById(name);
  return null;
}