//validation in contact
function validation()
{
var dm=document.contact;
var str = dm.elements["txtemail"].value;
//var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
var reg1 = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
var msg=document.contact.txtmsg.value;

if(dm.txtemail.value=="")
		{
			alert('E-mail field should not be empty!');
			dm.txtemail.focus();
			return false;
		}
if (reg1.test(str)){ // if syntax is valid
	   		//return true;
		}else{
			alert ("Please enter a proper email address!");
			dm.txtemail.focus();
			return false;
		}	
if(msg=="")
	{
		alert("Message field should not be empty!");
				document.contact.txtmsg.focus();		
		return false;
	}
msg = "Do you wish to proceed? ";
	if (confirm(msg))	
		return true;	
	else
		return false;   
}
