 function ValidateEmail( Email ){
		var atCharPresent = false;
		var dotPresent = false;

		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(Email)){
			//ok;
			atCharPresent = true;
			dotPresent = true;
		}
		if ( !atCharPresent || !dotPresent )
			return false;
			
			var last_ar=Email.split(".");
			if (last_ar[last_ar.length-1].length<2)
				return false;

		return true;
	}

 function CheckForm(theForm)
 {
    if (theForm.name.value == "")
    {alert("Please enter Name.");
    theForm.name.focus();return (false);
    }

	if (theForm.email.value == "")
    {alert("Please enter Email ID.");
    theForm.email.focus();return (false);
    }

	if ( !ValidateEmail( theForm.email.value ) ){
			alert( "Invalid E-mail " + theForm.email.value );
			theForm.email.focus();return (false);
	}
	return (true);
	}
