function checkRequired(){
/*
  var E=true;
  for(var C=0;C<B.length;C++){
    var A=D[B[C]];
    if(!A){continue}
    if(!A.value||A.style.color==HINT_COLOR){
      A.style.backgroundColor="#ffffcc";
      if(E){
        A.focus()
      }
      E=false
    }
    else{A.style.backgroundColor="white"}
  }
  return E;
*/
  var valid = true;
  var focus = '';
  /*
  if($('societe').value == '' || $('societe').value == 'Société') {
    $('societe').style.backgroundColor="#ffffcc";
    $('societe').style.border="1px solid #ff0000";
    focus = 'societe';
    valid = false;
  }
  else {
    $('societe').style.backgroundColor="#BAE8FB";
    $('societe').style.border="0px";
  }
*/
  if($('nom').value == '' || $('nom').value == 'Nom') {
    $('nom').style.backgroundColor="#ffffcc";
    $('nom').style.border="1px solid #ff0000";
    if(focus=='') focus='nom';
    valid = false;
  }
  else {
    $('nom').style.backgroundColor="#BAE8FB";
    $('nom').style.border="0px";
  }

  if($('tel').value == '' || $('tel').value == 'Téléphone') {
    $('tel').style.backgroundColor="#ffffcc";
    $('tel').style.border="1px solid #ff0000";
    if(focus=='') focus='tel';
    valid = false;
  }
  else {
    $('tel').style.backgroundColor="#BAE8FB";
    $('tel').style.border="0px";
  }

  if($('email').value == '' || $('email').value == 'Email') {
    $('email').style.backgroundColor="#ffffcc";
    $('email').style.border="1px solid #ff0000";
    focus = 'email';
    valid = false;
  }
  else {
    $('email').style.backgroundColor="#BAE8FB";
    $('email').style.border="0px";
  }

  if(valid) {
    $('submiter').disabled=true;
    window.scrollTo(0,0);
    $('msg').innerHTML='<div class="message">Votre demande de contact est en cours d\'envoi...</div>';
    postdata('contactform');
    return false;
  }
  else {
    //$(focus).focus();
  }

  return false;
}

function postdata(form)
{
//alert(frm.action);
var frm=document.getElementById(form);
var url = frm.action;
var pars = '';
for (var i=0;i<frm.length;i++)
{
  pars=pars+frm.elements[i].name+"="+frm.elements[i].value+"&";
}

var frmReq = new Ajax.Request(
  url,
  {
    method: frm.method,
    parameters: pars,
    onComplete: function(req) {
      eval(req.responseText);
    }
  });

return false;
}



function closeMsg() {
  new Effect.SlideUp('msg');

}

if(typeof sIFR == "function"){
// This is the preferred "named argument" syntax
  sIFR.replaceElement(named({sSelector:"h1", sFlashSrc:"swf/lte50402.swf",sColor:"#3181A3",sBgColor:"#FDFAFA"}));
  sIFR.replaceElement(named({sSelector:"h2", sFlashSrc:"swf/lte50402.swf"}));
  sIFR.replaceElement(named({sSelector:"h3", sFlashSrc:"swf/lte50402.swf"}));
  sIFR.replaceElement(named({sSelector:"h4", sFlashSrc:"swf/lte50402.swf"}));
  sIFR.replaceElement(named({sSelector:"h5", sFlashSrc:"swf/lte50402.swf"}));
  sIFR.replaceElement(named({sSelector:".sifr", sFlashSrc:"swf/lte50402.swf",sColor:"#3181A3",sBgColor:"#FDFAFA"}));
}
