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

function Media(id, media) { 
    if (document.getElementById) { 
	document.getElementById(id).innerHTML = media; 
    } 
} 

function AgendaMois(m){
	document.f0.action='default.asp?Mois='+m;
	document.f0.submit();
}

function ZommPhoto(src,h,w){
	wPopup=window.open(src,'Zoom','left=5,top=5,height='+h+',width='+w+',location=no,scrollbars=auto,resizable=yes,menubar=no,status=no,toolbar=no')
	wPopup.focus();
}

function openPopup(theURL,winName,features) { 
  var w=window.open(theURL,winName,features);
    w.document.close();
    w.focus();
  }
  
function entre(nom){
	document.images[nom].src=chemin+nom+"_F2.gif";
	this.oldbouton=nom;
}

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

function change(nom,lien)
{document.images[nom].src=lien;}

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 hideall() {
	hideit(true,"lactualite1");
	hideit(true,"lactualite2");
	hideit(true,"lactualite3");
}

function AtteindreLien(nomlayer){
	var htmlLayer=document.getElementById(nomlayer).outerHTML;
	var debutLien = htmlLayer.indexOf('href=')+6
	var finLien = htmlLayer.indexOf('>',debutLien )-1
	var lien = htmlLayer.substring(debutLien,finLien)
	alert(lien)
	document.location.href=lien;
	//document.location.href='http://www.google.fr'
	alert('fin')
}


function montre(nomlayer)
{
hideit(false,nomlayer);
hideit(false,"zone1");
hideit(false,"zone2");
this.oldmenu=nomlayer;

}


function cache(){
	hideit(true,"zone1");
	hideit(true,"zone2");
	if(this.oldmenu!="false"){
		hideit(true,oldmenu);
		this.oldmenu="false";
	}
}
function verifie() {
var chaine = "";
if (document.forms[0].elements.nom.value ==""){ chaine = chaine + "- Nom\n"; }
if (document.forms[0].elements.sujet.value ==""){ chaine = chaine + "- Sujet\n"; }
if (document.forms[0].elements.email.value ==""){ chaine = chaine + "- Email\n"; }
if (document.forms[0].elements.message.value ==""){ chaine = chaine + "- Message\n"; }
if (chaine != "")
        {
        alert("ERREUR\nLes champs suivants sont obligatoires :\n" + chaine);
        return false;
        }
else { return true;}
}
function verifie2() {
var chaine = "";
if (document.forms[0].elements.nom.value ==""){ chaine = chaine + "- Name\n"; }
if (document.forms[0].elements.email.value ==""){ chaine = chaine + "- Email\n"; }
if (document.forms[0].elements.message.value ==""){ chaine = chaine + "- Message\n"; }
if (chaine != "")
        {
        alert("ERREUR\nYou must fill the following fields :\n" + chaine);
        return false;
        }
else { return true;}
}

function jumpToPage(form)
{ var index;
        var URL;
        index = form.menu.selectedIndex;
        URL = form.menu.options[index].value;
        if (URL.indexOf(".",2) == -1)
        {
                form.menu.selectedIndex = 0;
        }
        else
        {
                form.menu.selectedIndex = 0;
                location = URL;
        }
}

