function ComprovarFormulari(form) {

if (form.license.value == "")
     {
     alert("Please, Drivers Licence is a mandatory field");
     form.license.focus();
     return (false);
     }

if (form.name.value == "")
     {
     alert("Please, Name is a mandatory field");
     form.name.focus();
     return (false);
     }

if (form.surname.value == "")
     {
     alert("Please, Surname is a mandatory field");
     form.surname.focus();
     return (false);
     }

if (form.passport.value == "")
     {
     alert("Please, Passport is a mandatory field");
     form.passport.focus();
     return (false);
     }

if (form.email.value == ""  ||
     form.email.value.indexOf ('@', 0) == -1 ||
     form.email.value.indexOf ('.', 0) == -1){
     alert("'' " + form.email.value + " '', is invalid. Please type in valid email.");
     form.email.focus();
     return false;
     }

if (form.phone1.value == "")
     {
     alert("Please, Telephone 1 is a mandatory field");
     form.phone1.focus();
     return (false);
     }
	 
if (form.tecaixa.value == 1 & form.ClientNotes.value == 0)
     {
     alert("Please introduce the details in the box ");
     form.ClientNotes.focus();
     return (false);
     }	 

return true;
    }
function syncronize(form){
    form.dropoffof.value=form.pickupof.value;
}

function wopen(url){
	
	var var_width = 283;
	var var_heigth = 400;
	var vleft = Math.round(window.screen.width/2-var_width/2);
	var vtop = Math.round(window.screen.height/2-var_heigth/2);
	//nw=window.open('','ficha','');
	nw=window.open('','ficha','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+var_width+',height='+var_heigth+',top='+vtop+',left='+vleft);
	
	nw.location=url;
}
function formulari_inici(form){
  if (form.pHor.value=='' || form.pMin.value=='' || form.dHor.value=='' || form.dMin.value=='') {
    alert("You must select the pickup and returning dates/times to continue.");
    return false;
  }
  
  if (form.email.value == ""  ||
     form.email.value.indexOf ('@', 0) == -1 ||
     form.email.value.indexOf ('.', 0) == -1){
     alert("'' " + form.email.value + " '', is invalid. Please type in valid email.");
     form.email.focus();
     return false;
     }

}



