
function checkForm(myform){
	

	this.checkdateFormat=function(mystring){

		dateForm=/^\d{1,2}[\/-]\d{1,2}[\/-]\d{4}$/;

		if(!mystring.match(dateForm)){
			alert("Date must be formatted as m/d/yyyy");					
			return false;
		}

	}


	this.checkssnFormat=function(mystring){

		ssnForm=/^\d{3}[\s\/-]\d{2}[\s\/-]\d{4}$/;

		if(!mystring.match(ssnForm)){
			alert("Social security missing or improperly formated");
			return false;
		}

	}


	this.checktextOnly=function(mystring){

		checktext=/[a-zA-Z]/;

		if(!mystring.match(checktext)){
			alert("Only letters are allowed for this area");
			return false;

		}
			
	}

	this.checkFirstName=function(mystring){

		checktext=/[a-zA-Z]/;

		if(!mystring.match(checktext)){
			alert("First name required. Please check information");
			return false;

		}
			
	}

	this.checkLastName=function(mystring){

		checktext=/[a-zA-Z]/;

		if(!mystring.match(checktext)){
			alert("Last name required. Please check information");
			return false;

		}
			
	}

	this.checkStreetAddress=function(mystring){

		checktext=/[a-zA-Z0-9]/;

		if(!mystring.match(checktext)){
			alert("Street Address required. Please check information");
			return false;

		}
			
	}


	this.checkEmailAddress=function(mystring){
		
		checktext= /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

		if(!mystring.match(checktext)){
			alert("Email Address missing or improperly formatted. Please check information");
			return false;

		}
	}

	this.checkTelephoneNumber=function(mystring){
		checktext=/\(?\d{3}\)?([-\/\.])\d{3}\1\d{4}/;

		if(!mystring.match(checktext)){
			alert("Enter telephone number including area code");
			return false;
		}

	}

	this.checkMoney=function(mystring){
		checktext=/\d{1,2}[.]\d{0,2}/;

		if(!mystring.match(checktext)){
			alert("Please enter include decimal place in monetary value");
			return false;
		}
	
	}

	this.checkBudgetItem=function(mystring){
		checktext=/\d{2}[-]\d{3}[-]\d{2}[-]\d{6}[-]\d{5}/;

		if(!mystring.match(checktext)){
			alert("At least 1 budget line item required and all budget "+
				"line items must be formatted"+
				"XX-XXX-XX-XXXXXX-XXXXX");
			return false;
		}
	
	}

}