// JavaScript Document
function ChangeMenuStyle(ioElem, icStyle_left, icStyle_centre, icStyle_right){
	ioElem.previousSibling.className = icStyle_left;
	ioElem.className = icStyle_centre;
	ioElem.nextSibling.className = icStyle_right;
}

function GetURL(icUrl){
	if(icUrl != "#")window.location.href = icUrl;
	else alert("pas d'url");
}

function ResizeContent(){
	var headerHeight = 141;//document.getElementById("divHeader").offsetHeight;
	var centreHeight = document.getElementById("divCentre").offsetHeight;
	var footerHeight = 38;//document.getElementById("divFooter").offsetHeight;
	

	//-------------------------------------------------------------------------
	var avaibleHeight = 0;
	if (self.innerHeight) // all except Explorer
	{
		avaibleHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		avaibleHeight = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		avaibleHeight = document.body.clientHeight-21;
	}
	//-------------------------------------------------------------------------
	var diffHeight = Number(avaibleHeight-headerHeight-footerHeight-10);
	document.getElementById("divCentre").style.height = diffHeight + "px";
	//-------------------------------------------------------------------------
	    
    if(document.getElementById("IFramePage")){
        document.getElementById("IFramePage").height = diffHeight-30;
    }
}

function PrintOpenerContent(){
    document.getElementById("divContentToPrint").innerHTML = window.opener.document.getElementById("contentScroll").innerHTML;
    window.print();
    window.close();
}

myWindow = null;
function Popup(icURL, icWIdth, icHeight, ilResisable, icWindowName){
	myWindow = window.open (icURL, icWindowName, "status=0,toolbar=0,menubar=0,location=0,resizable="+ ilResisable +",scrollbars=1,fullscreen=0,directories=0,top=20,left=" + ((screen.availWidth - icWIdth) / 2) + ",height=" + icHeight + ",width=" + icWIdth);
}

var GV2_menu;
var SousNav;
function DoLayout(){
  GV2_menu = document.getElementById("GV2_menu");
  SousNav = document.getElementById("SousNav");
  ResizeContent();
}

window.onresize=ResizeContent;
window.onchange=ResizeContent;
