function checkdata()    {    
    
    //Check the 'Name' field    
    if (CarForm.name.value=="")
    {  alert("Please enter your name & initials.")
      CarForm.name.focus()
       return false   }
    
    //Check the 'Address1' field    
    if (CarForm.add1.value=="")
    {  alert("Please enter the first line of your home address.")
       CarForm.add1.focus()
       return false   }
    
    //Check the 'Address2' field    
    if (CarForm.add2.value=="")
    {  alert("Please enter the second line of your home address.")
       CarForm.add2.focus()
       return false   }

    //Check the 'Postcode' field    
    if (CarForm.pcode.value=="")
    {  alert("Please enter your Postcode.")
       CarForm.pcode.focus()
       return false   }

    // Check the 'email' field by first checking the length   
       if (CarForm.email.value.length < 5)  
       {  alert("The email address is incomplete!")
       CarForm.email.focus();
       return false;     }

    // Check for invalid characters

       var invalidChars = " /:,;";
       
       for (var k=0; k<invalidChars.length; k++) {
       var badChar = invalidChars.charAt(k);
       var loc =  CarForm.email.value.indexOf(badChar);       
       loc = loc+1;   
       if (CarForm.email.value.indexOf(badChar) > -1)        
       {   alert("Invalid Character [ "+badChar+" ] at position " +loc+ " in email address")
       CarForm.email.focus();         
       return false;     }     }       
              
    // Check @ and .
       at_location = CarForm.email.value.indexOf("@")
       dot_location = CarForm.email.value.lastIndexOf(".")

       if (at_location == -1 || dot_location == -1  || at_location > dot_location)
       {  alert("Not a proper email address!")
       CarForm.email.value="";
       CarForm.email.focus();
       return false;    }

    // Is there at least one character before the @?
       if (at_location == 0)
       {  alert("Nothing before the @ in the email address!")
       carForm.email.focus();  
       return false;   }

    // Is there at least one character between @ and .?
       if (dot_location - at_location <= 1 )
       {  alert("Nothing between the @ and the dot in the email address!")
       CarForm.email.focus();  
       return false;   }

    // Is there at least one character after .?
       if (CarForm.email.value.length - dot_location <= 1)  
       {  alert("No character exists after the dot in the email address!")
       CarForm.email.focus(); 
       return false;   }

    //Check the 'Model' field    
   if (CarForm.model.value=="")
    {  alert("Please enter the model of your Alvis.")
       CarForm.model.focus()
       return false   }

    //Check the 'Body' field    
    if (CarForm.bod.value=="")
    {  alert("Please enter the body style of your Alvis.")
       CarForm.bod.focus()
       return false   }

    // Check the 'Agree' field    
       if (CarForm.agree.value!="yes")
       {  alert("Please type in your agreement as requested.")
       CarForm.agree.focus();
       return false;  }
    
      }

   //  EofF checkdata()
