<!--
/* 
   Copyright (c) 2004 Concept Marketing Interactif
   interactif.com - All Rights Reserved.
			Olivier Cozette
*/
// Bloquer les erreurs JS
function NoError() {
 return true;
}
//window.onerror=NoError;
/******************************** NAVIGATION ************************************/
// Délai de fermeture sousrub
var delai=200;
timerOFF=setTimeout("",delai);
// Liste sousrubriques
var tabSousrub=new Array('offresemplois',1,'postuler',1,'apropos',1,'aide',1,'saviezvous',0);
// Variables navigateur
var ns4=(document.layers)? true:false;
var ie4=(document.all)? true:false;
var ns6=(!document.all && document.getElementById)? true:false;
// Afficher layer
function Show(id) {
 if (ns4) document.layers[id].visibility="show";
 if (ie4) document.all[id].style.visibility="visible";
 if (ns6) document.getElementById(id).style.visibility="visible";
}
// Cacher layer
function Hide(id) {
 if (ns4) document.layers[id].visibility="hide";
 if (ie4) document.all[id].style.visibility="hidden";
 if (ns6) document.getElementById(id).style.visibility="hidden";
}
// Relever la posX
function ImgX(rep) {
 if (ns4 || ns6) {
  xRepPos=eval("document.images['"+rep+"'].x");
 }
 if (ie4) {
  xRepPos=eval(rep).offsetLeft;
  tempEl=eval(rep).offsetParent;
  while (tempEl!=null) {
   xRepPos+=tempEl.offsetLeft;
   tempEl=tempEl.offsetParent;
  }
 return xRepPos;
 }
}
// Relever la posY
function ImgY(rep) {
 if (ns4 || ns6) {
  yRepPos=eval("document.images['"+rep+"'].y");
 }
 if (ie4) {
  yRepPos=eval(rep).offsetTop;
  tempEl=eval(rep).offsetParent;
  while (tempEl!=null) {
   yRepPos+=tempEl.offsetTop;
   tempEl=tempEl.offsetParent;
  }
 return yRepPos;
 }
}
// Rollovers
function rollo(type,nom,etat) {
	// Navigation
	if (type==1) {
		if (etat==1) {
			clearTimeout(timerOFF);
			for (x=0;x<tabSousrub.length;x++) {
				if (tabSousrub.length!=x) {
					if (tabSousrub[x]!=1 && tabSousrub[x]!=0) {
						eval("document."+tabSousrub[x]+".src="+tabSousrub[x]+"_off.src;");
					}
				}
			}

			/* NE PAS LOADER MENU POUR */
			if (rub!="index" && rub!="teteemploi") {

				eval("document."+rub+".src="+rub+"_off.src;");
			}
			eval("document."+nom+".src="+nom+"_on.src;");
			eval("sousRub('"+nom+"');");
		}
		if (etat==0) {
		eval("sousRub('"+nom+"');");
		timerOFF=setTimeout("init()",delai);
		}
	}
	// Rolls simples
	if (type==2) {
		if (etat==1) {
			eval("document."+nom+".src="+nom+"_on.src;");
		}
		if (etat==0) {
			eval("document."+nom+".src="+nom+"_off.src;");
		}
	}
	// Rolls bt links
	if (type==3) {
		if (etat==1) {
			eval("document."+nom+".src=link_on.src;");
		}
		if (etat==0) {
			eval("document."+nom+".src=link_off.src;");
		}
	}
	// Rolls del
	if (type==4) {
		if (etat==1) {
			eval("document."+nom+".src=del_on.src;");
		}
		if (etat==0) {
			eval("document."+nom+".src=del_off.src;");
		}
	}
	// Rolls edit
	if (type==5) {
		if (etat==1) {
			eval("document."+nom+".src=edit_on.src;");
		}
		if (etat==0) {
			eval("document."+nom+".src=edit_off.src;");
		}
	}
	// Rolls bt detail
	if (type==6) {
		if (etat==1) {
			eval("document."+nom+".src=detailposte_on.src;");
		}
		if (etat==0) {
			eval("document."+nom+".src=detailposte_off.src;");
		}
	}
 return true;
}
// Afficher une sousrubrique
function sousRub(nom) {
	var ya=0;
	for (x=0;x<tabSousrub.length;x++) {
		if (tabSousrub.length!=x) {
			if (tabSousrub[x]==nom && tabSousrub[x+1]==1) {
				ya=1;
			}
		}
	}
	if (ya==1) {
		for (x=0;x<tabSousrub.length;x++) {
			if (tabSousrub.length!=x) {
				if (tabSousrub[x]!=1 && tabSousrub[x]!=0 && tabSousrub[x+1]!=0) {
					eval("Hide('sr"+tabSousrub[x]+"');");
				}
			}
		}
		ImgX('posxy');ImgY('posxy');
		// Décalage Y
		var decalX=0;
		var decalY=+28;
		if (ns4) {
	  eval("document.sr"+nom+".left=xRepPos+decalX;");
	  eval("document.sr"+nom+".top=yRepPos+decalY;");
	 }
	 if (ie4) {
	  eval("document.all(\"sr"+nom+"\").style.left=xRepPos+decalX;");
	  eval("document.all(\"sr"+nom+"\").style.top=yRepPos+decalY;");
	 }
	 if (ns6) {
	  eval("document.getElementById('sr"+nom+"').style.left=xRepPos+decalX;");
 		eval("document.getElementById('sr"+nom+"').style.top=yRepPos+decalY;");
	 }
		eval("Show('sr"+nom+"')");
	}
	if (ya==0) {
		for (x=0;x<tabSousrub.length;x++) {
			if (tabSousrub.length!=x) {
				if (tabSousrub[x]!=1 && tabSousrub[x]!=0 && tabSousrub[x+1]!=0) {
					eval("Hide('sr"+tabSousrub[x]+"');");
				}
			}
		}
	}
}
// Initialiser
function init() {
	var ya=0;	
	for (x=0;x<tabSousrub.length;x++) {
		if (tabSousrub.length!=x) {
			if (tabSousrub[x]!=1 && tabSousrub[x]!=0 && tabSousrub[x+1]!=0) {
				eval("Hide('sr"+tabSousrub[x]+"');");
			}
			if (tabSousrub[x]!=1 && tabSousrub[x]!=0) {
				eval("document."+tabSousrub[x]+".src="+tabSousrub[x]+"_off.src;");
			}
			if (tabSousrub[x]==rub && tabSousrub[x]!=1 && tabSousrub[x]!=0) {
				ya=1;
			}
		}
	}
	if (ya==1) {
		rollo(1,rub,1);
	}
}
// Pause
function pause() {
	clearTimeout(timerOFF);
}
// Fin Pause
function fpause() {
	timerOFF=setTimeout("init()",delai);
}
/********************** /NAVIGATION ************************************/
//-->