
function formSubmit() { 

 var aname = document.getElementById('aname').value;
 var aemail = document.getElementById('aemail').value;
 var asubject = document.getElementById('asubject').value;
 var acomments = document.getElementById('acomments').value;
 var valided = document.getElementById('valided').value;
 

 
 if ( (aname == '') || (aemail == '') || (asubject == '') || (acomments == '') || (valided == '') ) { 
   alert('Required Value Missing. Fill up All the field and try again.');
   return;
 }
 
 var stremail = aemail;
 var emailchar = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
 if (!(emailchar.test(stremail))) {
   alert('Invalid E-Mail Address. Please check the E-Mail Address and try again.');
   return;
 }
 document.form1.submit();


} // end function


function img_ref(st)
{
	var browserName=navigator.appName; 
	var ob = document.getElementById(st);
	if (browserName != "Microsoft Internet Explorer")	{

		var val = document.getElementById('dum');
		val.value += 1;
		ob.innerHTML = '<img src="verify_img.php?' + val.value + '" />';
	}
	else {

		ob.innerHTML = '<img src="verify_img.php" />';
	}
}
