// si on est dans une page tierse, on en sort
if (window.top != window.self) {
	window.top.location = window.self.location;
}

window.addEvent('domready', function(){
	var accordion = new Accordion('div.menuTitreDroite', 'div.menuLiensDroite', {
		alwaysHide: true,
		show: navMenu
	}, $('menuDroite'));
	var accordion2 = new Accordion('div.menuTitreGauche', 'div.menuLiensGauche', {
		alwaysHide: true,
		show: navMenu
	}, $('menuGauche'));
	
	var ici = location.href;
	var queryIndex = ici.indexOf('?');
	var egaleIndex = ici.search('=');
	var myParam = ici.substring(egaleIndex + 1);
	if (queryIndex != -1) {
		var myLien = "";
		if (myParam.search('http') != -1) {
			location.href = ici.substring(0, queryIndex - 1);
		}
	}
	var myType = ici.substring(queryIndex + 1, egaleIndex);
	var liens = $$("a");
	var i;	
	for (i = 0; i < liens.length; i++) {
		if (liens[i].target.search('blank') == -1) {
			liens[i].href = "javascript:void(0);";
			liens[i].onmouseover = function () {if (this.style.color == "rgb(255, 255, 255)" || this.style.color == "rgb(255,255,255)" || this.style.color == "#fff") this.style.color = "#940f12";};
			liens[i].onmouseout = function () {if (this.style.color == "rgb(148, 15, 18)" || this.style.color == "rgb(148,15,18)" || this.style.color == "#940f12") this.style.color = "#fff";};
		}
	}
	
	if (queryIndex != -1) {
		myLien = $(myType + "_" + myParam);
		if (myLien) {
			myLien.style.color = '#E89934';
		}
	}
});