// JavaScript Document
function validateFormLabelsLYNX() {
var NumbersOnly = /[0-9]/; // allow only numbers
var CheckPhone=document.myForm.Phone.value.replace(/[\(\)\.\-\ ]/g, '');
var CheckEmail =document.myForm.Email.value;
var emailFilter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
var OtherComments;

if (document.myForm.FirstName.value == ""){alert("Please enter your First Name");document.myForm.FirstName.focus();return false;}
if (document.myForm.LastName.value == ""){alert("Please enter your Last Name");document.myForm.LastName.focus();return false;}
if (document.myForm.Position.value == ""){alert("Please enter your Title");document.myForm.Position.focus();return false;}
if (document.myForm.Organization.value == ""){alert("Please enter your Organizations Name");document.myForm.Organization.focus();return false;}
if (document.myForm.City.value == ""){alert("Please enter your City");document.myForm.City.focus();return false;}
if (document.myForm.State.value == "00"){alert("Please select your State");document.myForm.State.focus();return false;}
if (document.myForm.ZipCode.value == ""){alert("Please enter the Zip Code");document.myForm.ZipCode.focus();return false;}
if (!(emailFilter.test(CheckEmail))){alert("Please enter a valid E-mail address");document.myForm.Email.focus();return false;}
if (isNaN(parseInt(CheckPhone))){alert("Please enter a valid Phone number");document.myForm.Phone.focus();return false;}
OtherComments = "Average annual ED patient census: " + document.myForm.EDCensus.value ;
document.myForm.comment.value =   OtherComments ;



// see if the select box exists/visible and if so add validation
if (document.getElementById('SpecifyLeadType').style.display == 'block')
	{
	//alert(document.myForm.SpecifyLeadType.value);
	if ((document.myForm.SpecifyLeadType.value == "") || (document.myForm.SpecifyLeadType.value == "Please specify" )){alert("Please specify how you heard about Picis");return false;}
	}

	else
{
	//alert('not visible');
}

}