function validateForm()
{
	var result = true;
	var errorMsg = '';
	var errorColor = "#FDE1DF";
	
	var emailRegExp = /^([a-zA-Z0-9_\.-])+@[^\.-@](([a-zA-Z0-9\.-])?([a-zA-Z0-9])+)+(\.([a-zA-Z]){2,4}){1,2}$/;
	
	var firstname 	= jQuery('#Fname');
	var lastname 	= jQuery('#Lname');
	var address1 	= jQuery('#address1');
	var city 		= jQuery('#city');
	var zipcode		= jQuery('#zip');
	var state 		= jQuery('#state');
	var country 	= jQuery('#country');
	var phone 		= jQuery('#phone');
	var email 		= jQuery('#email');
	
	//remove old validation messages
	clearValidationMessages();
	
	if(!firstname.val())
	{
		firstname.css({'background-color': errorColor});
		result = false;
	}
	
	if(lastname.val() == '')
	{
		lastname.css({'background-color': errorColor});
		result = false;
	}
	
	if(address1.val() == '')
	{
		address1.css({'background-color': errorColor});
		result = false;
	}
	
	if(city.val() == '')
	{
		city.css({'background-color': errorColor});
		result = false;
	}
	
	if(zipcode.val() == '')
	{
		zipcode.css({'background-color': errorColor});
		result = false;
	}
	
	if(state.val() == '')
	{
		state.css({'background-color': errorColor});
		result = false;
	}
	
	if(country.val() == '')
	{
		result = false;
	}
	
	if(phone.val() == '')
	{
		phone.css({'background-color': errorColor});
		result = false;
	}
	
	if(email.val() == '')
	{
		email.css({'background-color': errorColor});

		result = false;
	}
	
	//make sure this is a valid email address
	if (email.val() != '' && !emailRegExp.test(email.val())) 
	{
		errorMsg += "\n\nPlease enter a valid email address.";
		email.css({'background-color': errorColor});
		
		result = false;
	}
	
	if(!result)
	{
		alert('Please enter all the required content before submitting.' + errorMsg);
	}
	
	
	return result;
	
}

function clearValidationMessages()
{
	jQuery("form input:text").css({'background-color': 'white'});
}

