

function contact(url, action,code, formId) {

//document.getElementById('messageContact').style.display='block';
if (formId) {

var myAjax = new Ajax.Updater(
         'messageContact', 
         url, 
         { method: 'post', 
           postBody: Form.serialize(formId)
         }
          ); // fin des parametres de Ajax.Updater

} else {

if (code) {
  var pars = 'a='+action+'&c='+code;
} else {
  var pars = 'a='+action;
}
 
var myAjax = new Ajax.Updater(
         'messageContact', 
         url, 
         { method: 'get', 
           parameters: pars
         }
          ); // fin des parametres de Ajax.Updater
}

} // fin de la fonction contact