function EditRequired(FieldName, SubmitText, FieldType, FieldValue)
	{	
		
		if(FieldType == 'DD')
		{
			if(FieldValue == 0)
			{
				alert(FieldName + " is a required field.  Please select a " + FieldName + ", then click the " + SubmitText + " to continue.");				
				return false;
			}	
		}	
		else if(FieldValue == '')
			{
				alert(FieldName + " is a required field.  Please enter a " + FieldName + ", then click the " + SubmitText + " to continue.");				
				return false;
			}					
		{
			return true;
		}
	}

function EditNumeric(Required, SubmitText, FieldValue, FieldName)
	{	
		if(Required == 'Y')
		{
			if(FieldValue == '')
			{
				alert(FieldName + " is a required field.  Please enter the " + FieldName + ", then click the " + SubmitText + " to continue.");				
				return false;
			}	
		}	
		
		if(FieldValue == '')
		{
			return true;
		}
		
		var FoundSomething = FieldValue.match(/[^0-9]/);		
		if(FoundSomething) 
		{ 
			alert(FieldName + " uses numbers only." + '\n' + "Please re-enter a numbers only " + FieldName + '\n' + "Then press the " +  SubmitText + " button to continue.");
			return false;
		}
		
		else
		{
			return true;
		}
	}


function EditSuffix(Required, SubmitText, Suffix)
	{	
		if(Required == 'Y')
		{
			if(Suffix == 0)
			{
				alert("Title is a required field.  Please select a Title, then click the " + SubmitText + " to continue.");				
				return false;
			}	
		}	
		else
		{
			return true;
		}
	}

function EditFirstName(Required, SubmitText, FirstName)
	{	
		if(Required == 'Y')
		{
			if(FirstName == '')
			{
				alert("First Name is a required field.  Please enter a First Name, then click the " + SubmitText + " button to continue.");
				return false;
			}	
		}	
		if(FirstName == '')
		{
			return true;
		}
		var FoundSomething = FirstName.match(/[^A-Z^a-z]/);		
		if(FoundSomething) 
		{ 
			alert("First Name uses letters only." + '\n' + "Please re-enter a letters only First Name." + '\n' + "Then press the " +  SubmitText + " button to continue.");
			return false;
		}
		else
		{
			return true;
		}
	}
	
function EditMiddleInitial(Required, SubmitText, MiddleInitial)
	{	
		if(Required == 'Y')
		{
			if(MiddleInitial == '')
			{
				alert("Middle Initial is a required field.  Please enter a Middle Initial, then click the " + SubmitText + " button to continue.");
				return false;
			}	
		}	
		
		if(MiddleInitial == '')
		{
				return true;
		}	
		
		else if(! MiddleInitial.match(/^[A-Za-z][\.]?$/)) 
		{ 
			alert("Middle Initial uses a single letter only." + '\n' + "Please enter a single letter in Middle Initial, then click the " + SubmitText + " button to continue.");
			return false;
		}
		
		return true;
	}
		
	
function EditLastName(Required, SubmitText, LastName)
	{	
		
		if(Required == 'Y')
		{
			if(LastName == '')
			{
				alert("Last Name is a required field.  Please enter a Last Name, then click the " + SubmitText + " button to continue.");
				return false;
			}	
		}	
		
		if(LastName == '')
		{
			return true;
		}	
		var FoundSomething = LastName.match(/[^A-Z^a-z^'^\-^\.]/);			
		if(FoundSomething) 
		{ 			
			alert("Last Name uses letters, dash, period, and apostrophe only." + '\n' + "Please re-enter a properly formatted Last Name." + '\n' + "Then click the " + SubmitText + " button to continue.");
			return false;
		}
		else
		{
			return true;
		}
	}
	
function EditCity(Required, SubmitText, City)
	{	
		
		if(Required == 'Y')
		{
			if(City == '')
			{
				alert("City is a required field.  Please enter a City, then click the " + SubmitText + " button to continue.");
				return false;
			}	
		}	
		
		if(City == '')
			{
				return true;
			}
		var FoundSomething = City.match(/[^A-Z^a-z^'^\-^\.^\s]/);			
		if(FoundSomething) 
		{ 			
			alert("City uses letters, apostrophe, dash, and period only." + '\n' + "Please re-enter a City which contains only letters, apostrophes, dashs, and periods." + '\n' + "Then click the " + SubmitText + " button to continue.");
			return false;
		}
		else
		{
			return true;
		}
	}
		
	
function EditEmail(Required, SubmitText, Email)
	{	
		
		if(Required == 'Y')
		{
			if(Email == '')
			{
				alert("Email is a required field.  Please enter an Email, then click the " + SubmitText + " button to continue.");
				return false;
			}	
		}		
			
		if(Email == '')
			{
				return true;
			}
			
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
		if(filter.test(Email))
			{
				return true;
			}
		else
			{
				alert("Email must conform to this format: aaa@aaa.aaa" + '\n' + "Please re-enter a properly formed Email, then click the " + SubmitText + " button to continue.");
				return false;	
			}	
	}
	
function EditZipCode(Required, SubmitText, ZipCode)
	{			
		if(Required == 'Y')
		{
			if(ZipCode == '')
			{
				alert("Zip Code is a required field."  + '\n' +  "Please enter a Zip Code, then click the " + SubmitText + " button to continue.");
				return false;
			}				
		}	
		
		if( (ZipCode == '') || (ZipCode.match(/\d{5}(-\d{4})?$/)) )
		{
			return true;
		}
		else
		{
			alert("Zip Code must conform to format: 11111 or 11111-1111"  + '\n' +  "Please enter a properly formated Zip Code, then click the " + SubmitText + " button to continue.");
			return false;					
		}	
	}
	
function EditPhoneNumber(Required, SubmitText, PhoneNumber, Type)
	{	
		if(Required == 'Y')
		{
			if(PhoneNumber == '')
			{
				alert(Type + ' is a required field. ' + '\n' + 'Please enter a ' + Type + ', then click the ' + SubmitText + ' button to continue.');
				return false;
			}	
		}	
		
		if(PhoneNumber == '')
		{
			return true;
		}
		
		if(PhoneNumber == '' || PhoneNumber.match(/^(\(\d{3}\)|\d{3}[-. ])\d{3}[-. ]\d{4}$/))
		{		
			return true;			
		}
		else if(PhoneNumber.match(/^\d{10}$/))
		{
			return true;
		}
		else
		{
			alert(Type + " does not conform to proper format"  + '\n' +  "Acceptable formats are:"  + '\n' +  "1234567890, (123)456-7890, 123-456-7890");
			return false;
		}				
		
		
		
	}

