/* Javascripts utilisés sur le site
 * Mettez l'ensemble de vos fonctions générique javascript ici
 * 
 * La liaison avec les page se fait à l'aide du code ci-dessous :
 * <script type="text/javascript" src="css-js/scripts.js"></script>
 */



/* GESTION PIEDS DE PAGE */

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(){

	var maxHeight = getWindowHeight();
	

	// récuopération de la hauteur du footer
	var footer = document.getElementById('footer');
	var footerHeigth = footer.offsetHeight;
	var divHeight = (maxHeight - footerHeigth);
	document.getElementById('container').style.height=divHeight+'px';

}
if(!window.innerHeight){
	event.cancelBubble = true;
}
window.onresize = function(){
	setFooter();
}
function montre(id) {
		var myStretch = document.getElementsByClassName('stretch');
		var myStretcher = document.getElementsByClassName('stretcher');
		var myAccordion = new fx.Accordion(myStretch, myStretcher, {opacity: true});
                myAccordion.showThisHideOpen(myStretcher[id]);
}


function PopupCentrer(page,largeur,hauteur,options) {
  var top=(screen.height-hauteur)/2;
  var left=(screen.width-largeur)/2;
  window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
function fermer() {
opener=self;
self.close();
}

function loadPopop(page){
	if(page == 'index2.php'){
		Modalbox.show('popup.php', {title: '', width: 571, height: 770, method: 'get', params: {param: 'email'} });return false;
	}
}