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("txtLocation").value=="")
	{
		alert("Enter the Location")
		document.getElementById("txtLocation").focus()
		return false
	}
	if(document.getElementById("txtAddress").value=="")
	{
		alert("Enter the Address")
		document.getElementById("txtAddress").focus()
		return false
	}
	if(document.getElementById("txtNo").value=="")
	{
		alert("Enter the Contact No")
		document.getElementById("txtNo").focus()
		return false
	}
	if(document.getElementById("txtSubject").value=="")
	{
		alert("Enter the Subject")
		document.getElementById("txtSubject").focus()
		return false
	}
	if(document.getElementById("txtRequirements").value=="")
	{
		alert("Enter the Requirements")
		document.getElementById("txtRequirements").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
}

function showMe(path)
{
	window.showModalDialog(path,'','status:off;edge:raised;unadorned:off;dialogWidth:540px;dialogHeight:560px')
}

