function handleMailInputOver(o) {
  if('Entrez votre mot-clé...'==o.value) {
    o.value = "";
  }
  o.focus();
}

function handleMailInputOut(o) {
  if(''==o.value) o.value = 'Entrez votre mot-clé...';
}

function swap_m(img_name,to_what) {
  var swap, towhat;
  swap  = eval('document.images.'+img_name);
  towhat='../images/modeles/picto/'+to_what+'.gif';
  swap.src  = towhat;
}

function swap_f(img_name,to_what) {
  document.getElementById(''+img_name+'').style.backgroundImage = 'url("../images/modeles/picto/'+to_what+'.gif")';
}


/* HELP */
var dwidth = 183;
var tempoO;
var direction = 0;//close , 1= open // stance = opposite direction
var easing = 0.1; // constante d'amortissement

function amorti(goingTo, stance) {
  direction = stance;
  var actualxPos = parseFloat(document.getElementById("dnx").style.width);
  var dx = goingTo - actualxPos;
  if (stance==0){
    var newxPos = Math.ceil(actualxPos+(easing*dx));
    var opacity = (newxPos/dwidth);
  } else {
    var newxPos = Math.floor(actualxPos+(easing*dx));
    var opacity = (newxPos/dwidth);
  }
  document.getElementById("dnx").style.width = newxPos+"px";
  document.getElementById("dnx").style.MozOpacity = opacity;

  if (actualxPos!=goingTo) {
    tempoO = setTimeout('amorti('+goingTo+','+stance+')', 30);
  } else {
    clearTimeout(tempoO); return;
  }
}

function showHelp(){
  var arVersion = navigator.appVersion.split("MSIE");
  var version = parseFloat(arVersion[1]);
  if (tempoO!=undefined) clearTimeout(tempoO);//
  if (direction == 0 ) {
    amorti(0, 1);//close
    if ((version >= 5.5)) {
      document.getElementById("ha").style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/help/ha1.png', sizingMethod='image');";
    } else {
      document.getElementById("ha").src="../images/help/ha1.png";
      //document.images['ha'].src="_img/help/ha1.png";
    }
  } else {
    amorti(380, 0);//open
    if ((version >= 5.5)) {
      document.getElementById("ha").style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/help/ha.png', sizingMethod='image');";
    } else {
      document.getElementById("ha").src="../images/help/ha.png";
      //document.images['ha'].src="_img/help/ha.png";
    }
  }
}
/* EO HELP */

function verif_nombre(champ) {
  var chiffres = new RegExp("[0-9\.]");
  var verif;
  var points = 0;
  for(x = 0; x < champ.value.length; x++) {
    verif = chiffres.test(champ.value.charAt(x));
    if(champ.value.charAt(x) == ","){champ.value = champ.value.substr(0,x) + '.' +champ.value.substr(x+1,champ.value.length-x+1);verif=true;}
    if(verif == false){champ.value = champ.value.substr(0,x) + champ.value.substr(x+1,champ.value.length-x+1);x--;}
  }
}

function verif_entier(champ) {
  var chiffres = new RegExp("[0-9]");
  var verif;
  var points = 0;
  for(x = 0; x < champ.value.length; x++) {
    verif = chiffres.test(champ.value.charAt(x));
    if(champ.value.charAt(x) == ","){points++;}
    if(points > 1){verif = false; points = 1;}
    if(verif == false){champ.value = champ.value.substr(0,x) + champ.value.substr(x+1,champ.value.length-x+1); x--;}
  }
}


/* HELP */