
function multiClass(eltId) {
	arrLinkId = new Array('_0','_1','_2','_3');
	intNbLinkElt = new Number(arrLinkId.length);
	arrClassLink = new Array('current','ghost');
	strContent = new String()
	for (i=0; i<intNbLinkElt; i++) {
		strContent = "menu"+arrLinkId[i];
		if ( arrLinkId[i] == eltId ) {
			document.getElementById(arrLinkId[i]).className = arrClassLink[0];
			document.getElementById(strContent).className = 'on content';
		} else {
			if (document.getElementById(arrLinkId[i]) != null) {
				document.getElementById(arrLinkId[i]).className = arrClassLink[1];
				document.getElementById(strContent).className = 'off content';
			}
		}
	}	
}
function ActivateMenu(idNoeud)
{
	// gauche
	ListeNoeud='node' + idNoeud;
	TrouverActiver(ListeNoeud)
		
	// haut
	ListeNoeud = 'hnode' + idNoeud;
	TrouverActiver(ListeNoeud)

}

function TrouverActiver(ListeNoeud)
{
	if (document.getElementById(ListeNoeud) != null) {

		var sfEls = document.getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			if (sfEls[i].id == ListeNoeud) {
				sfEls[i].className= 'menusel';
sfEls[i].id= 'menusel';
				}
			}
	}
}
function ShowPopWindow(RefWindow,w,h) {

	var URL;
	//var w = 495;
	//var h = 280;
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	var scroll = 'yes';
	URL=RefWindow;
     settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,location=no,status=no,menubar=no,resizable=yes,dependent=no'
	win=window.open(URL,"toto",settings);
	if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
 

function sendmail(prefto,sufto,objet,fichierscript)
{

machaine=""
postto = fichierscript +"?" + "mailto=" + prefto + "@" + sufto + "&objet=" + objet + "&"

	for(var i = 0; i < document.formulaire.length; i++)
	{
		with (document.formulaire.elements[i])
		{
			v_Value = ""
        			// si dernier char = *, champ obligatoire
			if (name!="")
			{
       				if (name.charAt(name.length-1)== '*') 
				{
				       	if (value == "")
					{
       						alert("Saisir une valeur pour le champ : " + name)
       						//document.formulaire.elements[i].focus
       						return false 
					}
				}

				
				if (value != "")
				{
					if (type=="select-multiple")
					{
						v_Value = ""
						for (var l = 0; l < length; l++) 
						{
       							 if (options[l].selected) 
							{
         				 				v_Value = v_Value + options[l].value + ",";
        							}
      						}

					}
					else {v_Value = value}

					if (machaine!="") {machaine = machaine + "&"}
       					machaine = machaine + name + "=" + v_Value 
      				} 

			}
		}
	}


	url= postto + machaine ;
	ShowPopWindow(url,200,100)		
	return false;
}


function ajoutfavoris(url,nom)
{
	browserName = navigator.appName;
	browserVer = parseInt(navigator.appVersion);
	if (browserName == "Microsoft Internet Explorer" & browserVer >= 4) {
		window.external.AddFavorite(url, nom);
	}
	else {
		window.sidebar.addPanel(nom,url,"");
	}
} 

function fmailto(prenom,nom,domaine,objet)
{
	var aro = '@'
	chaine = "mailto:" + prenom + aro + nom + "." + domaine;
	 location.href = chaine;
}
function mailpage()
{
 chaine_mail = "mailto:?subject= " + document.title;
 chaine_mail += "&body= Je recommande cette page : " + document.title;
 chaine_mail += ". Consultable à l'adresse : " + location.href; 
 location.href = chaine_mail;
}
