function focusMe()
{
	document.getElementById("txtName").focus()
}

function validMail(eid)
{
	a=eid.indexOf('@')
	b=eid.indexOf('.')
	if(a<1 || b<1 || a==(eid.length-1) || b==(eid.length-1) || Math.abs(a-b)==1)
	{
		return false
	}
	return true
}

function validate()
{
	if(document.getElementById("txtName").value=="")
	{
		alert("Enter your name")
		document.getElementById("txtName").focus()
		return false
	}
	if(document.getElementById("txtAddress").value=="")
	{
		alert("Enter the Address")
		document.getElementById("txtAddress").focus()
		return false
	}
	if(document.getElementById("txtSubject").value=="")
	{
		alert("Enter the Subject")
		document.getElementById("txtSubject").focus()
		return false
	}
	if(document.getElementById("txtComments").value=="")
	{
		alert("Enter the Requirements / Comments")
		document.getElementById("txtComments").focus()
		return false
	}
	if(document.getElementById("txtEmail").value!="")
	{
		if(!validMail(document.getElementById("txtEmail").value))
		{
			alert("Enter a valid Email Address")
			document.getElementById("txtEmail").focus()
			return false
		}
	}
	return true
}

