this.oldmenu="false";
this.oldbouton="false";

function detection() 
{
if (navigator.userAgent.indexOf("Mac") >= 0)
{ document.write('<link rel="styleSheet" type="text/css" href="text_mac.css">'); }
else
{ document.write('<link rel="styleSheet" type="text/css" href="text.css">'); }

}

function entre(nom)
{
chemin="/public/images/barre/";
document.images[nom].src=chemin+nom+"_f2.gif";
this.oldbouton=nom;
}

function sort()
{
// chemin="/public/images/barre/";
if(this.oldbouton!="false")
{document.images[oldbouton].src=chemin+oldbouton+".gif";
this.oldbouton="false";}
}

function Change(descr)
{
document.form.description.value=descr;
}


function verifie_moteur()
{
if (document.recherche.q.value.length < 4)
	{
	alert("ERREUR\nPas assez de caractères !");
	return false;
	}
else	{ return true; }
}


function verifie() {
var chaine = "";



if (document.forms[0].elements.anom.value ==""){ chaine = chaine + "- Nom\n"; }

if (document.forms[0].elements.bmail.value ==""){ chaine = chaine + "- Email\n"; }

if (document.forms[0].elements.emessage.value ==""){ chaine = chaine + "- Message\n"; }


if (chaine != "")
        {
        alert("ERREUR\nLes champs suivants doivent etre completes :\n" + chaine);
        return false;
        }

else { return true;}
}

function hideit(action,nom_layer) {
  if (document.layers) {
    // Netscape 4 stuff
    var cible = document.layers[nom_layer];
  } else if (document.getElementById) {
    // IE 5 and Netscape 6
    var cible = document.getElementById(nom_layer);
  } else if (document.all) {
    // IE 4 ??
    var cible = document.all(nom_layer);
  } else {
    alert("Probl&egrave;me avec votre navigateur");
  }
  if (cible.style) 
  {
    // IE4 ??, IE5, Netscape 6

    if (action) { cible.style.visibility = "hidden"; } 
	else { cible.style.visibility = "visible"; }
  } 
  else {
    // Netscape 4
    if (action) { cible.visibility = "hide";} 
	else { cible.visibility = "show"; }
  }
}



function montre(nomlayer)
{
hideit(false,nomlayer);

this.oldmenu=nomlayer;

}


function cache()
{

if(this.oldmenu!="false"){
hideit(true,oldmenu);
this.oldmenu="false";}

}

function popup(file) 
{

window.open(file,"Popup", "toolbar=no,location=no,directories=no,menubar=no, scrollbars=yes,status=no,resizable=yes, alwaysraised=no, width=700, height=550")
}

function PopUpImage(img) 
{

window.open("zoom.php?img="+img,"Zoom", "toolbar=no,location=no,directories=no,menubar=no, scrollbars=no,status=no,resizable=no, alwaysraised=yes")
}

function formulaire(nom) 
{
window.open("form_"+nom+".html",nom, "toolbar=no,location=no,directories=no,menubar=no, scrollbars=yes,status=no,resizable=no,width=560, height=460, alwaysraised=yes")
}

function bouton(nom,dossier)
{
chemin="/public/images/"+dossier+"/";
document.images[nom].src=chemin+nom+"_f2.gif";
this.oldbouton=nom;
}

function preload()
{
if (document.images) {
  federation_f2 = new Image(85 ,24); federation_f2.src = "images/barre/federation_f2.gif";
  information_f2 = new Image(130 ,24); information_f2.src = "images/barre/information_f2.gif";
  actualite_f2 = new Image(60 ,24); actualite_f2.src = "images/barre/actualite_f2.gif";
  publications_f2 = new Image(80 ,24); publications_f2.src = "images/barre/publications_f2.gif";
  contacts_f2 = new Image(64 ,24); contacts_f2.src = "images/barre/contacts_f2.gif";
  }
}