// JavaScript Document

	var tableau_div =  new Array("Amelioration" , "MaitreOuvrage" , "EvolutionSI" , "Projets" );
		
	function hideall() {
		for (i=0; i<tableau_div.length;i++) {
			nom = tableau_div[i];

			var obj = document.getElementById(nom);
			obj.style.visibility="hidden";
			obj.style.display="none";
		}
	}
		
	function switchvisibility(nom) {
		var obj = document.getElementById(nom);

		if (obj.style.visibility=="visible")	{
			obj.style.visibility="hidden";
			obj.style.display="none";
		} else {
			obj.style.visibility="visible"
				obj.style.display="block";
		}
	}
		
	function affiche(nom) {
			
		hideall();
		switchvisibility(nom);
	}
		
//		function onLoadAfficheOffre() {
//			nReq =  location.search;
//			
//			nReq = nReq.split("?");
//			if (nReq.length > 1) {
//				nParam = nReq[1].split("=");
//				if (nParam.length >= 2) {
//					offre = nParam[1];
//					if (nParam[0] == "offre" && (offre < tableau_div.length) ) {
//						affiche(tableau_div[offre]);
//					}
//					else affiche(tableau_div[0]);
//				}
//				else affiche(tableau_div[0]);
//			}
//			else affiche(tableau_div[0]);
//
//		}
		
	function onLoadAfficheOffre() {
		nReq =  location.search;

		nReq = nReq.split("?");
		if (nReq.length > 1) {
			nParam = nReq[1].split("=");
			if (nParam.length >= 2) {
				offre = nParam[1];
				if (nParam[0] == "offre") {
					hideall();
					switchvisibility(offre);
				} else affiche(tableau_div[0]);
			} else affiche(tableau_div[0]);
		} else affiche(tableau_div[0]);
	}


