// JavaScript Document for ImpressiveCarServices . Author : NIRMALYA SAHA(Web Developer) ------------ //

function fullcheck()
{
       if (document.booking.fname.value=="")
        {
           alert ("Please enter your Name");
           document.booking.fname.select(); 
           return false;
	    }
		if (document.booking.lname.value=="")
        {
           alert ("Please enter Last Name");
           document.booking.lname.select(); 
           return false;
	    }  
		if (document.booking.email.value=="")
        {
           alert ("Please enter your Email");
           document.booking.email.select(); 
           return false;
	    }  
		if ((document.booking.email.value).indexOf(" ")>=0)
		{
		alert ("Blank space not allowed inside email!");
		document.booking.email.select();
		return false;
		}
	
		if (document.booking.email.value.indexOf("@",1) == -1)
		{
			alert("Invalid E-Mail address");
			document.booking.email.focus();
			document.booking.email.select();
			return(false);
		}
		if (document.booking.email.value.indexOf("@") == 0)
		{
			alert("Invalid E-Mail address");
			document.booking.email.focus();
			document.booking.email.select();
			return(false);
		}
		if (document.booking.email.value.indexOf(".",5) == -1)
		{
			alert("Invalid E-Mail address");
			document.booking.email.focus();
			document.booking.email.select();
			return(false);
		}
		if (document.booking.email.value.indexOf(".") == 0)
		{
			alert("Invalid E-Mail address");
			document.booking.email.focus();
			document.booking.email.select();
			return(false);
		}
		
		if ((document.booking.email.value.lastIndexOf(".")) -(document.booking.email.value.indexOf("@"))<4 )
		{
		
			alert("Invalid E-Mail address");
			document.booking.email.focus();
			document.booking.email.select();
			return(false);
		}
		 if (document.booking.comment.value=="")
        {
           alert ("Please enter your Comment");
           document.booking.comment.select(); 
           return false;
	    } 
  return (true);	
}
