function champValide(champ) {
if (champ.length == 0) { 
	return -1;
}
else
	return 1;
}

function verifMel(nomForm, nomChampNom, nomChampSociete, nomChampMel, nomChampTelephone) {
	erreur_msg = "";
	etat = 1;
	if (champValide(document[nomForm][nomChampNom].value)<0) {etat-- ; erreur_msg = erreur_msg + "Nom\n";}
	if (champValide(document[nomForm][nomChampSociete].value)<0) {etat-- ; erreur_msg = erreur_msg + "Société\n";}
	if (champValide(document[nomForm][nomChampMel].value)<0) {etat-- ; erreur_msg = erreur_msg + "Adresse électronique\n";}
	if (champValide(document[nomForm][nomChampTelephone].value)<0) {etat-- ; erreur_msg = erreur_msg + "Téléphone\n";}
	if (etat > 0) {
		document[nomForm].submit();
	}
	else if (etat == 0){
		alert("Le champs suivant doit être complété :\n" +  erreur_msg);
	}
	else {
		alert("Les champs suivants doivent être complétés :\n" +  erreur_msg);
	}
}

document.onmouseover = cacheMenu;
function getStyleObject(objectId) {
    if (document.all && document.all(objectId)) {
        return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
        return document.layers[objectId];
    } else {
        return false;
    }
}
function changeObjectVisibility(objectId, newVisibility) {
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
        styleObject.visibility = newVisibility;
        return true;
    } else {
        return false;
    }
}
function survol(img){
  cacheMenu();
  document["Navi_"+img].src="images/navi_"+img+"_over.gif";
  changeObjectVisibility('Menu_'+img,'visible');
}
function sortie(img){
  document["Navi_"+img].src="images/navi_"+img+".gif";
}
function cacheMenu() {
  for(counter = 1; counter <= 6; counter++) changeObjectVisibility('Menu_0'+counter,'hidden');
}

function cacheEtude() {
  for(counter = 1; counter <= 6; counter++) changeObjectVisibility('Tab_0'+counter,'hidden');
}
function affiche(num){
  cacheEtude();
  changeObjectVisibility('Tab_'+num,'visible');
}
