// NIVEAU SEMI ACTIF = NIVEAU AVEC SOUS NIVEAU ACTIF-->
//var debutUrl="http://corp-srv-07/divers/staffpool/privateDev/";
var debutUrl="http://www.sui4616.ch/";


// TABLE CONTENANT LE MENU-->
function debutMenu(){
document.write('<table border="0" cellspacing="0" cellpadding="0" width="173">');
//document.write('<tr>');
//document.write('<td width="173" height="16" class="about"><img src="'+debutUrl+'images/pixel.gif" width="173" height="8" alt="" border="0" /></td>');
//document.write('</tr>');
document.write('<tr><td>');
//ligne separation de niveau-->
document.write('<table border="0" cellpadding="0" cellspacing="0" width="173">');
document.write('<tr><td height="1" bgcolor="#FFFFFF"><img src="'+debutUrl+'images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr>');
document.write('</table>');
}

//11111111111111#  1er NIVEAU INNNNNNNNACTIF #11111111111111-->
function niveauUNInactif(nomMenu){
	indexPremierDeuxPoints=nomMenu.indexOf(";",0)
	indexSecondDeuxPoints=nomMenu.indexOf(";",indexPremierDeuxPoints+1)
	nomDuMenu=nomMenu.substring(0,indexPremierDeuxPoints);
	urlDuMenu=nomMenu.substring(indexPremierDeuxPoints+1,indexSecondDeuxPoints);
	idDuMenu=nomMenu.substring(indexSecondDeuxPoints+1,nomMenu.length);

	document.write('<table border="0" cellpadding="0" cellspacing="0" width="173" class="navi" onmouseover="this.className =\'naviOver\';" onmouseout="this.className =\'navi\';" onClick="idMenu='+idDuMenu+';window.location=\''+debutUrl+urlDuMenu+'\'">');
	document.write('<tr>');
	document.write('<td width="4" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="4" height="1" alt="" border="0" /></td>');//modif width de 16 à 4
	document.write('<td valign="middle" width="157" height="10" style="padding: 2px 0px 2px 0px;">'+nomDuMenu+'</td>');
	document.write('</tr>');
	document.write('</table>');
	//ligne separation de niveau-->
	document.write('<table cellpadding="0" cellspacing="0" border="0" width="173">');
	document.write('<tr><td bgcolor="#FFFFFF" height="1"><img src="'+debutUrl+'images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr>');
	document.write('</table>');
}

	//11111111111111#  1er NIVEAU ACTIF #11111111111111-->
function niveauUNActif(nomMenu){	
	indexPremierDeuxPoints=nomMenu.indexOf(";",0)
	indexSecondDeuxPoints=nomMenu.indexOf(";",indexPremierDeuxPoints+1)
	nomDuMenu=nomMenu.substring(0,indexPremierDeuxPoints);
	urlDuMenu=nomMenu.substring(indexPremierDeuxPoints+1,indexSecondDeuxPoints);
	idDuMenu=nomMenu.substring(indexSecondDeuxPoints+1,nomMenu.length);
	
		document.write('	<table border="0" cellpadding="0" cellspacing="0" width="173" class="naviActive" onmouseout="this.className =\'naviActive\';" onClick="window.location=\''+debutUrl+urlDuMenu+'\'">');
		document.write('	<tr>');
		document.write('	<td width="4" align="right" valign="top"><img src="'+debutUrl+'images/arrow_black_small.gif" width="4" height="12" hspace="0" vspace="2" alt="" border="0" /></td>');
		document.write('	<td valign="middle" width="157" height="10" style="padding: 2px 0px 2px 0px;">'+nomDuMenu+'</td>');
		document.write('	</tr>');
		document.write('	</table>');
		//ligne separation de niveau-->	
		document.write('<table cellpadding="0" cellspacing="0" border="0" width="173">');
		document.write('	<tr><td bgcolor="#A8A9C6" height="1"><img src="'+debutUrl+'images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr>');
		document.write('	</table>	');
}

	//11111111111111#  1er NIVEAU SEMI-ACTIF   #11111111111111-->
function niveauUNSemiActif(nomMenu){			
	indexPremierDeuxPoints=nomMenu.indexOf(";",0)
	indexSecondDeuxPoints=nomMenu.indexOf(";",indexPremierDeuxPoints+1)
	nomDuMenu=nomMenu.substring(0,indexPremierDeuxPoints);
	urlDuMenu=nomMenu.substring(indexPremierDeuxPoints+1,indexSecondDeuxPoints);
	idDuMenu=nomMenu.substring(indexSecondDeuxPoints+1,nomMenu.length);
		document.write('<table border="0" cellpadding="0" cellspacing="0" width="173" class="naviActive" onmouseover="this.className =\'naviOver\';" onmouseout="this.className =\'naviActive\';" onClick="window.location=\''+debutUrl+urlDuMenu+'\'">');
		document.write('<tr>');
		document.write('<td width="4" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="4" height="1" alt="" border="0" /></td>');
		document.write('<td valign="middle" width="157" height="10" style="padding: 2px 0px 2px 0px;">'+nomDuMenu+'</td>');
		document.write('</tr>');
		document.write('</table>');
		//ligne separation de niveau-->
		document.write('<table cellpadding="0" cellspacing="0" border="0" width="173">');
		document.write('<tr><td bgcolor="#A8A9C6" height="1"><img src="'+debutUrl+'images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr>');
		document.write('</table>');
}
		
		//22222222222222#  2eme NIVEAU INNNNNNNNACTIF   #22222222222222-->
function niveauDEUXInactif(nomSousMenu){		
	indexPremierDeuxPoints=nomSousMenu.indexOf(";",0)
	indexSecondDeuxPoints=nomSousMenu.indexOf(";",indexPremierDeuxPoints+1)
	nomDuMenu=nomSousMenu.substring(0,indexPremierDeuxPoints);
	urlDuMenu=nomSousMenu.substring(indexPremierDeuxPoints+1,indexSecondDeuxPoints);
	idDuMenu=nomSousMenu.substring(indexSecondDeuxPoints+1,nomSousMenu.length);
		document.write('<table border="0" cellpadding="0" cellspacing="0" width="173" class="navi2" onmouseover="this.className =\'naviOver2\'" onmouseout="this.className =\'navi2\'" onClick="window.location=\''+debutUrl+urlDuMenu+'\'">');
		document.write('<tr>');
		document.write('<td width="4" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="4" height="1" alt="" border="0" /></td>');
		document.write('<td width="16" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="16" height="1" alt="" border="0" /><img src="'+debutUrl+'images/pixel.gif" width="16" height="1" alt="" border="0" /></td>');
		document.write('<td valign="top" width="141" height="10" style="padding: 2px 0px 2px 0px;">'+nomDuMenu+'</td>');
		document.write('</tr>');
		document.write('</table>');
		//ligne separation de niveau-->
		document.write('<table border="0" cellpadding="0" cellspacing="0" width="173">');
		document.write('<tr><td bgcolor="#FFFFFF"><img src="'+debutUrl+'images/pixel.gif" width="1" height="1" alt="" border="0" /></td></tr>');
		document.write('</table>');
}

//22222222222222#  2eme NIVEAU ACTIF   #22222222222222-->
function niveauDEUXActif(nomSousMenu){	
	indexPremierDeuxPoints=nomSousMenu.indexOf(";",0)
	indexSecondDeuxPoints=nomSousMenu.indexOf(";",indexPremierDeuxPoints+1)
	nomDuMenu=nomSousMenu.substring(0,indexPremierDeuxPoints);
	urlDuMenu=nomSousMenu.substring(indexPremierDeuxPoints+1,indexSecondDeuxPoints);
	idDuMenu=nomSousMenu.substring(indexSecondDeuxPoints+1,nomSousMenu.length);
document.write('<table border="0" cellpadding="0" cellspacing="0" width="173" class="naviActive2" onmouseout="this.className =\'naviActive2\'" onClick="window.location=\''+debutUrl+urlDuMenu+'\'">');
		document.write('<tr>');
		document.write('<td width="4" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="4" height="1" alt="" border="0" /></td>');
		document.write('<td width="16" align="left" valign="top"><img src="'+debutUrl+'images/arrow_black_small.gif" width="12" height="12" vspace="2" alt="" border="0" /><img src="'+debutUrl+'images/pixel.gif" width="16" height="1" alt="" border="0" /></td>');
		document.write('<td valign="top" width="141" height="10" style="padding: 2px 0px 2px 0px;">'+nomDuMenu+'</td>');
		document.write('</tr>');
		document.write('</table>');
		//ligne separation de niveau-->
		document.write('<table border="0" cellpadding="0" cellspacing="0" width="173">');
		document.write('<tr>');
		document.write('<td width="32" bgcolor="#A8A9C6"><img src="'+debutUrl+'images/pixel.gif" width="32" height="1" alt="" border="0" /></td>');
		document.write('<td width="142" bgcolor="#A8A9C6"><img src="'+debutUrl+'images/pixel.gif" width="141" height="1" alt="" border="0" /></td>');
		document.write('</tr>');
		document.write('</table>');
}
		
		//22222222222222#  2eme NIVEAU SEMI-ACTIF   #22222222222222-->
function niveauDEUXSemiActif(nomSousMenu){		
	indexPremierDeuxPoints=nomSousMenu.indexOf(";",0)
	indexSecondDeuxPoints=nomSousMenu.indexOf(";",indexPremierDeuxPoints+1)
	nomDuMenu=nomSousMenu.substring(0,indexPremierDeuxPoints);
	urlDuMenu=nomSousMenu.substring(indexPremierDeuxPoints+1,indexSecondDeuxPoints);
	idDuMenu=nomSousMenu.substring(indexSecondDeuxPoints+1,nomSousMenu.length);
		document.write('<table border="0" cellpadding="0" cellspacing="0" width="173" class="naviActive2" onmouseover="this.className =\'naviOver2\'" onmouseout="this.className =\'naviActive2\'" onClick="window.location=\''+debutUrl+urlDuMenu+'\'">');
		document.write('<tr>');
		document.write('<td width="4" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="4" height="1" alt="" border="0" /></td>');
		document.write('<td width="16" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="16" height="1" alt="" border="0" /><img src="'+debutUrl+'images/pixel.gif" width="16" height="1" alt="" border="0" /></td>');
		document.write('<td valign="top" width="141" height="10" style="padding: 2px 0px 2px 0px;">'+nomDuMenu+'</td>');
		document.write('</tr>');
		document.write('</table>');
		//ligne separation de niveau-->
		document.write('<table border="0" cellpadding="0" cellspacing="0" width="173">');
		document.write('<tr>');
		document.write('<td width="32" bgcolor="#FFFFFF"><img src="'+debutUrl+'images/pixel.gif" width="32" height="1" alt="" border="0" /></td>');
		document.write('<td width="142" bgcolor="#A8A9C6"><img src="'+debutUrl+'images/pixel.gif" width="141" height="1" alt="" border="0" /></td>');
		document.write('</tr>');
		document.write('</table>');
}
		
		//33333333333333#  3eme NIVEAU INNNNNNNNACTIF #33333333333333-->
function niveauTROISInactif(nomMenuNiveau3){	
	indexPremierDeuxPoints=nomMenuNiveau3.indexOf(";",0)
	indexSecondDeuxPoints=nomMenuNiveau3.indexOf(";",indexPremierDeuxPoints+1)
	nomDuMenu=nomMenuNiveau3.substring(0,indexPremierDeuxPoints);
	urlDuMenu=nomMenuNiveau3.substring(indexPremierDeuxPoints+1,indexSecondDeuxPoints);
	idDuMenu=nomMenuNiveau3.substring(indexSecondDeuxPoints+1,nomMenuNiveau3.length);
document.write('<table border="0" cellpadding="0" cellspacing="0" width="173" class="navi3" onmouseover="this.className =\'naviOver3\';" onmouseout="this.className =\'navi3\';" onClick="window.location=\''+debutUrl+urlDuMenu+'\'">');
		document.write('<tr>');
		document.write('<td width="32" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="32" height="1" alt="" border="0" /></td>');
		document.write('<td width="16" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="16" height="1" alt="" border="0" /></td>');
		document.write('<td valign="top" width="125" height="10" style="padding: 2px 0px 2px 0px;">'+nomDuMenu+'</td>');
		document.write('</tr>');
		document.write('</table>');
		//ligne separation de niveau-->
		document.write('<table border="0" cellpadding="0" cellspacing="0" width="173">');
		document.write('<tr>');
		document.write('<td width="32" bgcolor="#FFFFFF"><img src="'+debutUrl+'images/pixel.gif" width="32" height="1" alt="" border="0" /></td>');
		document.write('<td width="142" bgcolor="#A8A9C6"><img src="'+debutUrl+'images/pixel.gif" width="141" height="1" alt="" border="0" /></td>');
		document.write('</tr>');
		document.write('</table>');
}
		
		//33333333333333#  3eme NIVEAU ACTIF #33333333333333-->
function niveauTROISActif(nomMenuNiveau3){	
	indexPremierDeuxPoints=nomMenuNiveau3.indexOf(";",0)
	indexSecondDeuxPoints=nomMenuNiveau3.indexOf(";",indexPremierDeuxPoints+1)
	nomDuMenu=nomMenuNiveau3.substring(0,indexPremierDeuxPoints);
	urlDuMenu=nomMenuNiveau3.substring(indexPremierDeuxPoints+1,indexSecondDeuxPoints);
	idDuMenu=nomMenuNiveau3.substring(indexSecondDeuxPoints+1,nomMenuNiveau3.length);
document.write('<table border="0" cellpadding="0" cellspacing="0" width="173" class="naviActive3" onClick="window.location=\''+debutUrl+urlDuMenu+'\'">');
		document.write('<tr>');
		document.write('<td width="32" align="left" valign="top"><img src="'+debutUrl+'images/pixel.gif" width="32" height="1" alt="" border="0" /></td>');
		document.write('<td width="16" align="left" valign="top"><img src="'+debutUrl+'images/arrow_black_small.gif" width="12" height="12" hspace="0" vspace="2" alt="" border="0" /></td>');
		document.write('<td valign="top" width="125" height="10" style="padding: 2px 0px 2px 0px;">'+nomDuMenu+'</td>');
		document.write('</tr>');
		document.write('</table>');
		//ligne separation de niveau-->
		document.write('<table border="0" cellpadding="0" cellspacing="0" width="173">');
		document.write('<tr>');
		document.write('<td width="32" bgcolor="#FFFFFF"><img src="'+debutUrl+'images/pixel.gif" width="32" height="1" alt="" border="0" /></td>');
		document.write('<td width="142" bgcolor="#A8A9C6"><img src="'+debutUrl+'images/pixel.gif" width="141" height="1" alt="" border="0" /></td>');
		document.write('</tr>');
		document.write('</table>');
}


//33333333333333#  3eme NIVEAU SEMI-ACTIF #33333333333333-->
//Y a pas -->


// FIN TABLE CONTENANT LE MENU-->
function menuFin(){	
	document.write('</td></tr>');
	document.write('<tr><td width="173" height="30" class="about"><img src="'+debutUrl+'images/pixel.gif" width="173" height="1" alt="" border="0" /></td></tr>');
	document.write('</table>');
}//END FCT

/*
menu NIVEAU 1 [0][0];[0][1]
	sousMenu NIVEAU 2 [0][0][0]; [0][1][0]; [0][2][0]
		lienSousMenu NIVEAU 3 [0][0][1]; [0][0][2] ... ; [0][1][1]; [0][1][2] ...
id des Menus :
niveau 1
	niveau 2
		niveau 3
1
	11
		111
		112
	12
		121
		122
2
	21
		211
		212
		213
	22

*/		

function dessineMoiUnMenu(idMenu){

//idMenu="111";//0 tou inactif

var tableauMenu = new Array();

//NOUVEAU MENU NIVEAU 1 __________________________________________________
var sousMenu0 = new Array();
//var lienSousMenu0  = new Array();

tableauMenu[1]=sousMenu0;
	sousMenu0[0]="Présentation;accueil/presentation.php;1";
	//sousMenu0[1]=lienSousMenu0;
	//	lienSousMenu0[0]="Livre;http://www.manpower.ch;11";
	//		lienSousMenu0[1]="Tarzan;http://www.manpower.ch;111";
	//		lienSousMenu0[2]="Bible;http://www.manpower.ch;112";
	
	

//NOUVEAU MENU NIVEAU 1 __________________________________________________
var sousMenu1 = new Array();
//var lienSousMenu0  = new Array();

tableauMenu[2]=sousMenu1;
	sousMenu1[0]="Contacts;accueil/contacts.php;2";//MENU DE NIVEAU 1
//	sousMenu1[1]=new Array("Christophe;christophe.htm;21");//INDICE 0 = MENU NIVEAU 2 ET 1,2... NIVEAU 3
//	sousMenu1[2]=new Array("Malko;malko.htm;22");
	//	sousMenu1[2]=new Array("Malko;malko.htm;22","Saumon;http://www.manpower.ch;221","Caviar;http://www.manpower.ch;222");
//	sousMenu1[3]=new Array("Nicolas;nicolas.htm;23");
//	sousMenu1[4]=new Array("Jeff;jeff.htm;24");
	//	lienSousMenu1[0]="Dessert";
		//	lienSousMenu1[1]="Tarte aux pommes";
//			lienSousMenu1[2]="Fraises chantilly";

//NOUVEAU MENU NIVEAU 1 __________________________________________________
var sousMenu2 = new Array();
//var lienSousMenu2  = new Array();
tableauMenu[3]=sousMenu2;
	sousMenu2[0]="Galerie;galerie/galerie.php;3";
	//sousMenu2[1]=new Array("Photos;m_reservation/reservation.php;3");
	//sousMenu2[1]=lienSousMenu2;
	//	lienSousMenu2[0]="photo;http://www.manpower.ch;31";
	//		lienSousMenu2[1]="Tarzan;http://www.manpower.ch;311";
	//		lienSousMenu2[2]="Bible;http://www.manpower.ch;312";

//NOUVEAU MENU NIVEAU 1 __________________________________________________
var sousMenu3 = new Array();
//var lienSousMenu3  = new Array();
tableauMenu[4]=sousMenu3;
	sousMenu3[0]="Liens;accueil/liens.php;4";
	//sousMenu3[1]=lienSousMenu1;
	//	lienSousMenu3[0]="Livre;http://www.manpower.ch;41";
	//		lienSousMenu3[1]="Tarzan;http://www.manpower.ch;411";
	//		lienSousMenu3[2]="Bible;http://www.manpower.ch;412";
			

//NOUVEAU MENU NIVEAU 1 __________________________________________________
var sousMenu4 = new Array();
//var lienSousMenu4  = new Array();
tableauMenu[5]=sousMenu4;
	sousMenu4[0]="Presse;accueil/presse.php;5";
	//sousMenu4[1]=lienSousMenu1;
	//	lienSousMenu4[0]="Livre;http://www.manpower.ch;51";
	//		lienSousMenu4[1]="Tarzan;http://www.manpower.ch;511";
	//		lienSousMenu4[2]="Bible;http://www.manpower.ch;512";
	

// LOGO STAFF POOL
//document.write('<img alt="Staff Pool" src="'+debutUrl+'images/sui6416.gif" style="position: absolute; top:10px"><BR><BR><BR><BR><BR>');
debutMenu();
for(k=1;k<(tableauMenu.length);k++){
	for(i=0;i<(tableauMenu[k].length);i++){

			if(k!=idMenu.charAt(0)){//SI LE MENU INACTIF
				if(i==0){// CAR [k][0] ==  TABLEAU DES SOUS Menu
					niveauUNInactif(tableauMenu[k][i]);			
				}//END IF
			}//END IF
			else{
				if(i==0){// CAR [k][0] ==  TABLEAU DES SOUS Menu
					if(idMenu.length == 1) // SI idMenu A UN SEUL CARACTERE ALOS MENU ACTIF
					niveauUNActif(tableauMenu[k][i]);			
					else //MENU SEMI ACTIF
					niveauUNSemiActif(tableauMenu[k][i]);			
					//document.write('('+tableauMenu[k][i].length+')');
				}//END IF
						
			
		
		
				for(j=0;j<(tableauMenu[k][i].length);j++){
					if(i!=0){//[k][0] = Nom Menu donc il n'y a rien en [k][0][i]
		//				document.write('<br>&nbsp;&nbsp;&nbsp;&nbsp;');	
						if(j==0){//AFFICHAGE DU NIVEAU 2
							
							if((i!=idMenu.charAt(1) & idMenu.charAt(1)!="" )|| (k==idMenu.charAt(0) & idMenu.charAt(1)==""))//substr(position,Longueur)
							niveauDEUXInactif(tableauMenu[k][i][j]);//AFFICHE NIVEAU 2 SI J=O SINON NIVEAU 3
							else {
								if(idMenu.length == 2)//SI idMenu A DEUX CARACTERE
								niveauDEUXActif(tableauMenu[k][i][j]);//AFFICHE NIVEAU 2 SI J=O SINON NIVEAU 3
								
								else if(idMenu.length == 3) niveauDEUXSemiActif(tableauMenu[k][i][j]);//AFFICHE NIVEAU 2 SI J=O SINON NIVEAU 3
							}//END ELSE
						}//END IF
						else{	//AFFICHAGE DU NIVEAU 3						
														
							if(idMenu.length == 3 & k==idMenu.charAt(0) & i==idMenu.charAt(1) & j==idMenu.charAt(2))								
							niveauTROISActif(tableauMenu[k][i][j]);//AFFICHE NIVEAU 2 SI J=O SINON NIVEAU 3											
							else if(idMenu.length > 1 & k==idMenu.charAt(0) & i==idMenu.charAt(1))								
							niveauTROISInactif(tableauMenu[k][i][j]);//AFFICHE NIVEAU 2 SI J=O SINON NIVEAU 3				
						}//END ELSE
						//document.write(k+i+j+'-->');	
		
					}//END IF
				}//END FOR j
			}//END ELSE		
	}//END FOR i
}//END FOR k
menuFin();
// LIEN FERMER LA SESSION


}//END FUNCTION






