function largeur_fenetre()
{
	 if (window.innerWidth) return window.innerWidth;
	 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
	 else return 0;
}

function hauteur_fenetre()
{
	 if (window.innerHeight) return window.innerHeight;
	 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
	 else return 0;
}
function reconstruction()
{
	 if (largeur != largeur_fenetre() || hauteur != hauteur_fenetre())
	 window.history.go(0);
}
function remakescrollIE()
{
	   if (document.body.offsetWidth<document.documentElement.scrollWidth)
	   {
		   xoffset = document.documentElement.scrollLeft;
		   largeur = largeur_fenetre();
		   document.all['TheCompletePage'].style.width=(largeur+xoffset);
	   }
}
function remakescrollMZ()
{
	  if (document.body.offsetWidth<document.documentElement.scrollWidth)
	   {
		 // document.getElementById['Output'].createTextNode = "test="+document.body.offsetWidth+" "+document.documentElement.scrollLeft;
		  xoffset = document.documentElement.scrollLeft;
		   largeur = largeur_fenetre();
		   document.getElementById('TheCompletePage').style.width=(largeur-xoffset)+"px";
	   }
}

function checkresize(res_id,res_width,res_height)
{
	if (IE)
	{
	//document.write("Internet explorer");
	if(!window.largeur && document.body && document.body.offsetWidth)
	{
		  //document.getElementById'Output'].innerHTML = "test="+document.body.offsetWidth+" "+document.documentElement.scrollLeft;
		xoffset = 0;
	   window.onresize = reconstruction;
	   window.onscroll = remakescrollIE;
	   largeur = largeur_fenetre();
	   hauteur = hauteur_fenetre();
	   document.all[res_id].style.width=(largeur+xoffset-res_width);
	   document.all[res_id].style.height=(hauteur-res_height);
	  }
	}
	else if(MZ)
	{ 
	/*initialiser la surveillance de Netscape*/
		if(!window.largeur && window.innerWidth)
		  {
		  xoffset = 0;
		   window.onresize = reconstruction;
		   window.onscroll = remakescrollMZ();
		   largeur = largeur_fenetre();
		   hauteur = hauteur_fenetre();
		   document.getElementById(res_id).style.width=(largeur+xoffset-res_width)+"px";
		   document.getElementById(res_id).style.height=(hauteur-res_height)+"px";
	
		  }
	}
}

