//FONCTION DE LOIC HORELLOU http://lohic.free.fr
//MERCI A EMMANUEL GAILLE http://blanc.blanc.free.fr/ pour les tests de versions



function tailleImage(){

	var screenW = 0, screenH = 0, hauteurBloc = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		screenW = window.innerWidth;
		screenH = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		screenW = document.documentElement.clientWidth;
		screenH = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		screenW = document.body.clientWidth;
		screenH = document.body.clientHeight;
	}
	
	
	
	if (screenH/screenW <= 3/4){
		//100% largeur
		document.getElementById("imgFond").style.width = screenW+"px";
		document.getElementById("imgFond").style.height = screenW*3/4+"px";
		
	}else if (screenH/screenW > 3/4){
		//100% hauteur
		document.getElementById("imgFond").style.width  = screenH*4/3+"px";
		document.getElementById("imgFond").style.height = screenH+"px";
	}
	
	//var margeDivScroll = 75;
	
	//document.getElementById("scroll").style.height = (screenH*77/100-8-margeDivScroll)+"px";
	//document.getElementById("cadreblanc").style.height = screenH-20+"px";
	//document.getElementById("cadreblanc").style.width = screenW-20+"px";
	
	
	if (screenH<700){
		hauteurBloc = screenH - 150 - 60 - 50;
	}else{
		hauteurBloc = 440;
	}
	
	if (document.getElementById("bloc")){
		document.getElementById("bloc").style.height = hauteurBloc+"px";
	}
	if (document.getElementById("bloc_large")){	
		document.getElementById("bloc_large").style.height = hauteurBloc+"px";
	}
}


function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

function init(){
	tailleImage();
	montre();
}

window.onload=init;
window.onresize=tailleImage;