window.addEvent('domready', function() {
	if (bol_anime) {
		// --------------------------------------------------------------------------------------------------
		var list_nav1 = $$('#nav1 li');
		list_nav1.each(function(element) {
			if (element.className=="off") {
				var fx_nav1 = new Fx.Styles(element, {duration:1000, fps:100, wait:false, transition: Fx.Transitions.Sine.easeOut});
				element.addEvent('mouseenter', function(){
					fx_nav1.start({
						'background-color': '#E5EBF2'
					});
				});
				element.addEvent('mouseleave', function(){
					fx_nav1.start({
						'background-color': '#FFF'
					});
				});
				element.addEvent('click', function(){
					clicEltNav1("titre_"+element.id);
				});
			}
		});
		// --------------------------------------------------------------------------------------------------
		var list_nav2 = $$('#proemploi li, #candidat li, #entreprise li, #nav2_proemploi li');
		list_nav2.each(function(element) {
			if (element.className=="off") {
				var fx_nav2 = new Fx.Styles(element, {duration:300, fps:100, wait:false, transition: Fx.Transitions.Sine.easeOut});
				element.addEvent('mouseenter', function(){
					fx_nav2.start({
						'padding-left': '8px'
					});
				});
				element.addEvent('mouseleave', function(){
					fx_nav2.start({
						'padding-left': '0px'
					});
				});
				element.addEvent('click', function(){
					clicEltNav2(element.id);
				});
			}
		});
		// --------------------------------------------------------------------------------------------------
		var list_titre_bloc = $$('#proemploi h1, #candidat h1, #entreprise h1');
		list_titre_bloc.each(function(element) {
			if (element.id!="") {
				element.addEvent('click', function(){
					clicEltNav1(element.id);
				});
			}
		});
		// --------------------------------------------------------------------------------------------------
		var list_pied = $$('#pied li');
		list_pied.each(function(element) {
			if (element.id!="") {
				element.addEvent('click', function(){
					clicEltPied(element.id);
				});
			}
		});
	// --------------------------------------------------------------------------------------------------
	}
});
// **************************************************************************************************
// **************************************************************************************************
// **************************************************************************************************
function clicEltNav1(idelt) {
	nav1(parseInt(idelt.substring(11)));
}
//
function nav1(rub) {
	switch (rub) {
		case 0:
			document.location.href="index.php";
			break;
		case 1:
			document.location.href="proemploi.php";
			break;
		case 2:
			document.location.href="candidat.php";
			break;
		case 3:
			document.location.href="entreprise.php";
			break;
		case 4:
			document.location.href="news.php";
			break;
		case 5:
			document.location.href="competence.php";
			break;
		case 6:
			document.location.href="offre.php";
			break;
		default:
			alert("nav1("+rub+") : erreur navigation");
			break;
	}
}
// **************************************************************************************************
function clicEltNav2(idelt) {
	nav2(parseInt(idelt.substring(4)));
}
//
function nav2(rub) {
	switch (parseInt(rub/10)) {
		case 0:
			document.location.href="index.php";
			break;
		case 1:
			document.location.href="proemploi.php?r="+rub;
			break;
		case 2:
			document.location.href="candidat.php?r="+rub;
			break;
		case 3:
			document.location.href="entreprise.php?r="+rub;
			break;
		case 4:
			document.location.href="news.php?r="+rub;
			break;
		case 5:
			document.location.href="competence.php?r="+rub;
			break;
		case 6:
			document.location.href="offre.php?r="+rub;
			break;
		default:
			alert("nav2("+rub+") : erreur navigation");
			break;
	}
}
// **************************************************************************************************
function clicEltPied(idelt) {
//	pied(parseInt(idelt.substring(5)));
}
//
function pied(lurl) {
	document.location.href=lurl;
}
// **************************************************************************************************
function changeStyle(obj) {
	//alert (obj.value);
	var title=obj.options[obj.options.selectedIndex].value;
	setActiveStyleSheet(title);
	window.location.reload(true);
}
// **************************************************************************************************

