
function fullcheck()
{
  var str=document.contact.email.value;
//alert(str);

     if (document.contact.name.value=="")
        {
           alert ("Blank space not allowed. Please type your Name.");
           document.contact.name.select(); 
           return false;
	    }   
	
	
		if (document.contact.email.value=="")
        {
           alert ("Blank space not allowed. Please type your Email.");
           document.contact.email.select(); 
           return false;
	    }  
		
		
		if ((document.contact.email.value).indexOf(" ")>=0)
		{
		alert ("Blank space not allowed inside email!");
		document.contact.email.select();
		return false;
		}
	
		if (document.contact.email.value.indexOf("@",1) == -1)
		{
			alert("Invalid E-Mail address");
			document.contact.email.focus();
			document.contact.email.select();
			return(false);
		}
		if (document.contact.email.value.indexOf("@") == 0)
		{
			alert("Invalid E-Mail address");
			document.contact.email.focus();
			document.contact.email.select();
			return(false);
		}
		if (document.contact.email.value.indexOf(".",5) == -1)
		{
			alert("Invalid E-Mail address");
			document.contact.email.focus();
			document.contact.email.select();
			return(false);
		}
		if (document.contact.email.value.indexOf(".") == 0)
		{
			alert("Invalid E-Mail address");
			document.contact.email.focus();
			document.contact.email.select();
			return(false);
		}
		
		if ((document.contact.email.value.lastIndexOf(".")) -(document.contact.email.value.indexOf("@"))<4 )
		{
		
			alert("Invalid E-Mail address");
			document.contact.email.focus();
			document.contact.email.select();
			return(false);
		}

}

<!--
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 0;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

function checkInternationalPhonee(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}


function fullcheck1()
{


if (document.contacta.firstname.value=="")
        {
           alert ("Please enter your first name.");
           document.contacta.firstname.select(); 
           return false;
	    } 
		
		
		if (document.contacta.lastname.value=="")
        {
           alert ("Please enter your last name.");
           document.contacta.lastname.select(); 
           return false;
	    }  
		
		if (document.contacta.gender.value=="")
        {
           alert ("Please select your Gender.");
           document.contacta.gender.focus(); 
           return false;
	    }  
	
			if (document.contacta.address.value=="")
        {
           alert ("Please enter your Home Address.");
           document.contacta.address.select(); 
           return false;
	    } 
		
			if (document.contacta.city.value=="")
        {
           alert ("Please enter your Town or City.");
           document.contacta.city.select(); 
           return false;
	    } 
		
		
			if (document.contacta.postal.value=="")
        {
           alert ("Please enter your Postal Code.");
           document.contacta.postal.select(); 
           return false;
	    }
		
		
			if (document.contacta.postall.value=="")
        {
           alert ("Please enter your Postal Code.");
           document.contacta.postall.select(); 
           return false;
	    }
		
	
				var Phone=document.contacta.phone
	
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please enter your Primary Phone number.");
		Phone.focus();
		return false;
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please enter your Primary Phone number.");
		Phone.value="";
		Phone.focus();
		return false;
	}
		
			var Phonee=document.contacta.phonee
	
	if ((Phonee.value==null)||(Phonee.value=="")){
		alert("Please enter your Primary Phone number.");
		Phonee.focus();
		return false;
	}
	if (checkInternationalPhone(Phonee.value)==false){
		alert("Please enter your Primary Phone number.");
		Phonee.value="";
		Phonee.focus();
		return false;
	}
		
				if (document.contacta.date.value=="")
        {
           alert ("Please enter your Date of Birth.");
           document.contacta.date.focus(); 
           return false;
	    }
		
				if (document.contacta.month.value=="")
        {
           alert ("Please enter your Date of Birth.");
           document.contacta.month.focus(); 
           return false;
	    }
		
				if (document.contacta.year.value=="")
        {
           alert ("Please enter your Date of Birth.");
           document.contacta.year.select(); 
           return false;
	    }
	
		
		
		

	}	  
//-->
