
function startList() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("primarynav");
for (i=0; i < navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}

function init() {
	//==========================================================================================
	// if supported, initialize TransMenus
	//==========================================================================================
	// Check isSupported() so that menus aren't accidentally sent to non-supporting browsers.
	// This is better than server-side checking because it will also catch browsers which would
	// normally support the menus but have javascript disabled.
	//
	// If supported, call initialize() and then hook whatever image rollover code you need to do
	// to the .onactivate and .ondeactivate events for each menu.
	//==========================================================================================
	if (TransMenu.isSupported()) {
		TransMenu.initialize();

		// hook all the highlight swapping of the main toolbar to menu activation/deactivation
		// instead of simple rollover to get the effect where the button stays hightlit until
		// the menu is closed.
		menu1.onactivate = function() { document.getElementById("nav1Item1").className = "hover"; };
		menu1.ondeactivate = function() { document.getElementById("nav1Item1").className = ""; };

		menu2.onactivate = function() { document.getElementById("nav1Item2").className = "hover"; };
		menu2.ondeactivate = function() { document.getElementById("nav1Item2").className = ""; };

		menu3.onactivate = function() { document.getElementById("nav1Item3").className = "hover"; };
		menu3.ondeactivate = function() { document.getElementById("nav1Item3").className = ""; };




	}
}

var ouverture;
var fermeture;
var VitesseOuverture = 1;
var Incrementation = 3;

function ouvrir(NomDiv){
	window.clearInterval(ouverture); 
	window.clearInterval(fermeture); 
	window.document.getElementById(NomDiv).style.width = "0px";
	window.document.getElementById(NomDiv).style.display='block'; 
	window.document.getElementById(NomDiv).style.visibility='visible';
	ouverture = window.setInterval("agrandissement('"+NomDiv+"')",VitesseOuverture);
}
function agrandissement(NomDiv) {
	HeightAct = window.document.getElementById(NomDiv).style.width;
	HeightAct = new Number(HeightAct.replace(new RegExp("px"), ''));
	//HeightAct2 = window.document.getElementById('content').style.width;
	//HeightAct2 = new Number(HeightAct2.replace(new RegExp("px"), ''));
	//HeightAct3 = window.document.getElementById('sidebar').style.width;
	//HeightAct3 = new Number(HeightAct3.replace(new RegExp("px"), ''));
	
	window.document.getElementById(NomDiv).style.display='block'; 
	if(HeightAct<215){
		//window.document.getElementById(NomDiv).style.display='block'; 
		HeightAct = HeightAct+Incrementation;
		//HeightAct2 = HeightAct2-Incrementation;
		//HeightAct3 = HeightAct3+Incrementation;
		
		//theBottom = PropBottom;
	}
	else {	
		window.clearInterval(ouverture); 
		//window.document.getElementById(NomDiv).childNodes[3].style.visibility = "visible";
		//window.document.getElementById(NomDiv).style.display='block'; 
		//nomLien = "Lien"+NomDiv
		//window.document.getElementById(nomLien).href="javascript:fermer('"+NomDiv+"');";
		//nomImg = "img"+NomDiv
		//window.document.getElementById(nomImg).src = "img/titre_"+NomDiv+".gif" ;
	}
	window.document.getElementById(NomDiv).style.width=HeightAct+"px";
	//window.document.getElementById('content').style.width=HeightAct2+"px";
	//window.document.getElementById('sidebar').style.width=HeightAct3+"px";
}

function verifFormulaire(form){
			if (form.nom.value == ""){
				window.alert("Vous devez saisir un nom.");
				form.nom.focus();
				return false;
				} else if (form.email.value == "" || !estEmailValide(form.email.value)){
				window.alert("Vous devez saisir une adresse email valide.");
				form.email.focus();
				return false;
			} else if (form.message.value == ""){
				window.alert("Vous devez saisir un message.");
				form.message.focus();
				return false;
			} else {
				return true;
			}	
		}

        function estEmailValide(email) { 
			var verif = /^[-!#$%&\'*+\\.0-9=?A-Z^_`a-z{|}~]+@[a-zA-Z0-9-]{2,}[.][a-zA-Z]{2,4}$/
			if (verif.exec(email) == null) {
				return false; 
			} else { 
				return true; 
			}     
		} 
		

function infobulle(var1){
text=var1.getElementsByTagName("span").item(0).innerHTML;
document.getElementById("infobulle").innerHTML=text;
}

function remove(){
document.getElementById("infobulle").innerHTML="";
}

function popUp(strURL,strType,strHeight,strWidth) {
var strOptions="";
if (strType=="console") strOptions="scrollbars,resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth+",left=0,top=0";
window.open(strURL, 'newWin', strOptions);
}

