// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function checkplate ( form )
{
if (form.plate.value == "") {
     alert( "Entrez une plaque d'immatriculation." );
     form.plate.focus();
     return false ;
     }
return true ;
}


function checkcar ( form )
{
var alert_msg = "";

if (form.plate.value == "") {
     alert_msg = "- La plaque d'immatriculation est vide" + '\n';
     form.plate.focus();
     }
if (form.year.value == "") {
     alert_msg = alert_msg + "- L'année est vide" + '\n';
     form.year.focus();
     }
if (form.model.value == "") {
     alert_msg = alert_msg + "- Le model est vide";
     form.model.focus();
     }
if (alert_msg.length != 0) {
    alert("Les champs suivant sont invalides:" + '\n' + alert_msg);
    return false ;
}

return true ;
}