	function validate(theForm)
		{
			var docForm = document.registration;
			if (docForm.firstname.value == '')
	          {
	                  alert('Please enter the valid first name.');
	                  docForm.firstname.focus();
	                  return false;
	          }
			if (docForm.lastname.value == '')
	          {
	                  alert('Please enter the valid last name.');
	                  docForm.lastname.focus();
	                  return false;
	          }  
			if (docForm.institution.value == '')
	          {
	                  alert('Please enter the valid institution.');
	                  docForm.institution.focus();
	                  return false;
	          }  
			if (docForm.address.value == '')
	          {
	                  alert('Please enter the valid address.');
	                  docForm.address.focus();
	                  return false;
	          } 
		   if (!isValidEmail(docForm.email.value))
			{
				alert("Enter a valid Email Address");
				docForm.email.focus();
				return false;
			}
		}		
		function isValidEmail(checkString)
		{
		    var newstr = "";
		    var at = false;
		    var dot = false;
		
		   // IF EMAIL ADDRESS HAS A '@' CHARACTER
		    if (checkString.indexOf("@") != -1) {
		      at = true;
		
		    // IF EMAIL ADDRESS HAS A '.' CHARACTER
		    } else if (checkString.indexOf(".") != -1) {
		      dot = true;
		    }
		    // PARSE REMAINDER OF STRING
		    for (var i = 0; i < checkString.length; i++) {
		        ch = checkString.substring(i, i + 1)
		        if ((ch >= "A" && ch <= "Z") || (ch >= "a" && ch <= "z")
		                || (ch == "@") || (ch == ".") || (ch == "_")
		                || (ch == "-") || (ch >= "0" && ch <= "9")) {
		                newstr += ch;
		                if (ch == "@") {
		                    at=true;
		                }
		                if (ch == ".") {
		                    dot=true;
		                }
		        }
		    }
		    if ((at == true) && (dot == true)) {
		        return true;
		    }
		    else {
		      // DISPLAY ERROR MESSAGE      
		      return false;
		    }
		}
