	function validName(theName) {
		if (theName == "") {
			return false
		}
		
		if (theName.length < 3) {
			return false
		}
		return true
	}
	
	function validEmail(email) {
		invalidChars = " /:,;"
		if (email == "") {
			return false
		}
		for (i=0; i<invalidChars.length; i++) {
			badChar = invalidChars.charAt(i)
			if (email.indexOf(badChar,0) != -1) {
				return false
			}
		}
		atPos = email.indexOf("@",1)
		if (atPos == -1) {
			return false
		}
		if (email.indexOf("@",atPos+1) != -1) {
			return false
		}
		periodPos = email.indexOf(".",atPos)
		if (periodPos == -1) {
			return false
		}
		if (periodPos+3 > email.length)	{
			return false
		}
		return true
	}
	
function validPhone(ph) { 
	Nbrs = 0;
	validChars = "+()1234567890-eExXtT. ";
	validNbrs="0123456789";
	for (z=0; z<ph.length; z++) { 
		charOK=false;
		for (i=0; i<validChars.length; i++) {
				if (ph.charAt(z)== validChars.charAt(i) ) {
					charOK=true;
					break;
				} 
		}
		if (!charOK)  return false;
		
		isNbr=false;
		for (i=0; i<validNbrs.length; i++) {
				if (ph.charAt(z)== validNbrs.charAt(i) ) {
					isNbr=true;
					break;
				} 
		}
		if (isNbr) Nbrs++; 
	}
	
	if (Nbrs < 10) {
		return false;
	}			
	return true;
}
  
function submitIt(theForm) {
		  
		if (!validName(theForm.Name.value)) {
			alert("Please enter your name")
			theForm.Name.focus()
			theForm.Name.select()
			return false
		}
		 
		if (!validPhone(theForm.Phone.value)) {
			alert("Please enter your phone number")
			theForm.Phone.focus()
			theForm.Phone.select()
			return false
		} 
		
			  
		if (!validEmail(theForm.Email.value)) {
			alert("Please enter your email address")
			theForm.Email.focus()
			theForm.Email.select()
			return false
		} 
		
			if (!validName(theForm.DomainName.value)) {
			alert("Please enter your domain name\n like MySite.com or MySite.net...")
			theForm.DomainName.focus()
			theForm.DomainName.select()
			return false
		} 
			 
		if (!validName(theForm.SendMsg.value)) {
			alert("Please enter a message")
			theForm.SendMsg.focus()
			theForm.SendMsg.select()
			return false
		} 
		
		return true		
} 

function char_count(form)
{
	form.t2.value=form.SendMsg.value.length;
}