var blnOk=true;

/* fonction d'initialisation des positions des menus */
function Chargement() {
	// position absolues des menus -0.5
	var posLeftMenu   = new Array(18.6,24.6,29.4,36.5,41.8,51.6,61.6);
	// position absolues des sous-menus
	var posLeftSsMenu = new Array(18.6,24.6,29.4,36.5,41.8,51.6,53.8);
	
	if(document.body.style.backgroundColor!="") { blnOk=false; }
	if(document.body.style.color!="") { blnOk=false; }
	if(document.body.style.marginTop!="") { blnOk=false; }

	if(document.getElementById) {
		with(document.getElementById("content").style) {
			if(position!="") { blnOk=false; }
			if(top!="") { blnOk=false; }
			if(left!="") { blnOk=false; }
			if(height!="") { blnOk=false; }
			if(zIndex!="") { blnOk=false; }
			if(margin!="") { blnOk=false; }
			if(padding!="") { blnOk=false; }
			if(visibility!="") { blnOk=false; }
		}
	} else {
		blnOk=false;
	}

	if(blnOk) {
		CacherMenus();
		with( document.getElementById("hautdepage").style) {
			position="absolute";left="0";top="0"; /* width="48.3em"; */
		}
		with(document.body.style) {
			backgroundColor="#fff";color="#000";
		}
		with( document.getElementById("content").style) {
			position="absolute";left="11.1em";top="5.3em";zIndex="1";
		}
		with( document.getElementById("menugauche").style) {
			position="absolute";left="0";top="5.3em";width="11.0em";
		}
		with( document.getElementById("menu_produits_et_services").style) {
			width="100%";position="absolute";top="58px";left="0em";zIndex="1";
		}
		for(i=1;i<=7;i++) {
			with(document.getElementById("menu"+i).style) {
				position="absolute";top="0em";left= posLeftMenu[i-1] +"em";zIndex="2";
			}
		}
		for(i=1;i<=7;i++) {
			with(document.getElementById("ssmenu"+i).style) {
				position="absolute";top="1.8em";left= posLeftSsMenu[i-1] +"em";
				width="15em";padding="0em";zIndex="3";
			}
		}
	}
}
/* Montrer le menu paramétré */
function MontrerMenu(strMenu) {
  if(blnOk) {
    CacherMenus();  
    document.getElementById(strMenu).style.visibility="visible";
  }
}
/* Montrer tous les menus */
function CacherMenus() {
	if(blnOk) {
		for(i=1;i<=7;i++) {
			with(document.getElementById("ssmenu"+i).style) {
				visibility="hidden";
			}
		}
	}
}
/* trouver un objet grâce à son id */
function FIND(item) {
	window.mmIsOpera = navigator.userAgent.toLowerCase().indexOf("opera") != -1;
	if( window.mmIsOpera ) return(document.getElementById(item));
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
}
/* ouverture en pop-up */
function pop( name , address ) {
	window.open( address , name , 'width=560,height=400,scrollbars=yes,resizable=yes,location=no, directories=no,status=no,menubar=no,copyhistory=no');
	return false ;
}
function pop2( name,address,largeur,hauteur){
	window.open(address,name, 'width='+largeur+',height='+hauteur+',scrollbars=yes,resizable=yes,location=no,directories=no,status=no,menubar=no,copyhistory=no');
	return false ;
}
function pop3( name , address ) {
	window.open( address , name , 'width=550,height=400,scrollbars=yes,resizable=yes,location=no, directories=no,status=no,menubar=no,copyhistory=no');
}

/* impression de la page en cours */
function imp() {
	var add=new String(window.location);
	posdiese=add.indexOf('#');
	if (posdiese == -1) window.open( add + '&printable=yes','imprimer'); 
	else window.open(add.substring(0,posdiese)+'&printable=yes','imprimer');
	return true;
}

/* fonction pour le redimensionnement d'une image  */
IE5=NN4=NN6=false;
if(document.all)IE5=true;
else if(document.getElementById)NN6=true;
else if(document.layers)NN4=true;
function autoSize() {
	if(IE5) 		self.resizeTo(document.images[0].width+10,document.images[0].height+31)
    else if(NN6)   	{ self.resizeTo(document.images[0].width+20,document.images[0].height+51); }
    else 		   	window.resizeTo(document.images[0].width,document.images[0].height)
    self.focus();
}
						