
function ValidPhone(aphone)
{
	var valid = "0123456789";

		if(aphone=="")
		{
		alert("Telephone is required field!")
		return false
		}
	
		return true
}


function valid_required(field)
{
	if(field=="") 
	{
	return false;
	}

	return true;
}


function EmailValid(email)
	{
		if(email=="")
		{
		alert("Email is required field!")
		return false
		}
		len = email.length
		
		if((email.charAt(1)=='@'))
		{
		alert("Invalid Email Please try again! Don't forget the @ and . --> yourname@company.com")
		return false
		}
		if((email.charAt(len-2)=='@')||(email.charAt(len-2)=='.'))
		{
		alert("Invalid Email Please try again! Don't forget the @ and . --> yourname@company.com")
		return false
		}
		
				

		count=0
		dotcount=0
	for (i=0; i< email.length; i++)
		{
			if(email.charAt(i)=='@')
			count++
			if(email.charAt(i)=='.')
			dotcount++
		 }
		
			 if((count !=1))
			 	{
			 	alert("Invalid Email Please try again! Don't forget the @ and . --> yourname@company.com")
			 	return false
			 	}
		
		
	return true
	}