// JavaScript Document

 function isEmailValid(sEmail) 
            	{
					if (sEmail.value == '' || sEmail.indexOf('.') == 0 || sEmail.indexOf('.') == -1 || sEmail.indexOf('@') == 0 || sEmail.indexOf('@') == -1 || sEmail.indexOf('.') == sEmail.length - 1 || sEmail.indexOf(',') >= 0) {
						return false;
					} else {
						return true;
					}
				}

function validate(frmList)
	  {
	  if ((frmList.natof_feedback.value) =="na")
		  {
			alert("Nature Of Feedback Not Specified.")
			frmList.natof_feedback.focus();
			return false;			
		  }
		   if ((frmList.name.value) == "")
		  {
			alert("Name Not Specified.")
			frmList.name.focus();
			return false;			
		  }
		  if ((frmList.country.value) == "")
		   {
			alert("Country Not Specified.")
			frmList.country.focus();
			return false;			
		  }
  if((frmList.email.value) == "")
		  {
			alert("Email Not Specified.")
			frmList.email.focus();
			return false;			
		 }
 if (!(isEmailValid(frmList.email.value)))
		  {
			alert("Please enter a valid  Email.")
			frmList.email.focus();
			return false;			
		  }
		
if ((frmList.comments.value) == "")
		  {
			alert("Comment Not Specified.")
			frmList.comments.focus();
			return false;			
		  }
		  
  if(document.getElementById('code').value == "") {
		alert("OOPs !! Please Enter Verification Code");
		document.getElementById('code').focus();
		return false;
	}
		
	if(document.getElementById('cap_code').value != document.getElementById('code').value) {
		alert("OOPs !! Verification Code Mismatch");
		document.getElementById('code').focus();
		return false;
	}	
	
	if(document.getElementById('cap_code').value == document.getElementById('code').value) {
		alert("Success: I have passed captcha validation......")
	}
return true;
}		


