/*************************************************
    Fonction dimensions de la fenètre
**************************************************/
function getWindowHeight() {
    var h = 0;
    if (typeof(window.innerHeight) == 'number') { // Netscape
        h = window.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        h = document.documentElement.clientHeight;
    } else if (document.body && document.body.offsetHeight) { //client
        h = document.body.offsetHeight;
    }
    return h;
}
function getWindowWidth() {
    var w = 0;
    if (typeof(window.innerWidth) == 'number') { // Netscape
        w = window.innerWidth;
    } else if (document.documentElement && document.documentElement.clientWidth) {
        w = document.documentElement.clientWidth;
    } else if (document.body && document.body.offsetWidth) { //client
        w = document.body.offsetWidth;
    }
    return w;
}
/*************************************************
    Fonction redimensionnement
**************************************************/
function ajust_box_lite()
{
	var windowHeight = getWindowHeight();
	listeContentBox = document.getElementsByClassName("contentBox");
	listeAccordionContent = document.getElementsByClassName("accordionContent");
	
	if (windowHeight <= 650)
	{
		divHeight = 280;
		heightAccordionContent = 200;
	}
	else
	{
		divHeight = 400;
		heightAccordionContent = 320;
	}
	for (i=0; i<listeContentBox.length; i++) 
	{
		listeContentBox[i].style.height = divHeight+"px";
		listeContentBox[i].style.maxHeight = divHeight+"px";
	}
	
	for (i=0; i<listeAccordionContent.length; i++) 
	{
		listeAccordionContent[i].style.height = heightAccordionContent+"px";
		listeAccordionContent[i].style.maxHeight = heightAccordionContent+"px";
	}
}
/*function ajust_box()
{
	var windowHeight = getWindowHeight();
	listeContentBox = document.getElementsByClassName("contentBox");
	listeAccordionContent = document.getElementsByClassName("accordionContent");
	
	if (windowHeight <= 610)
	{
		divHeight = 280;
		heightAccordionContent = 200;
	}
	else
	{
		divHeight = windowHeight - (610-280);
		if (divHeight >360){divHeight=360;}
		heightAccordionContent = windowHeight - (610-200);//200;//windowHeight - 408;
		if (heightAccordionContent >280){heightAccordionContent=280;}
	}
	
	for (i=0; i<listeContentBox.length; i++) 
	{
		listeContentBox[i].style.height = divHeight+"px";
	}
	
	for (i=0; i<listeAccordionContent.length; i++) 
	{
		listeAccordionContent[i].style.height = heightAccordionContent+"px";
	}
}

function sleep_ajust_box()
{
	var wait=2000;
	setInterval('ajust_box()',wait);
}*/


