function isBlank(s)
{
	for (var i =0; i< s.length; i++)
	{
		var c=s.charAt(i);
		if ((c !=' ') && (c !='\n') && (c != '\t')) return false;
	}
	return true;
}

function isChecked(s) {
	if (!s.checked){ 
	return true;
	}
}

function validateForm(form) {
	
	var fullName;
	var email;
	var phone;
	
	fullName=form.fullName.value;
	email=form.email.value;
	phone=form.phone.value;
	
	
	var success = true;
	var errorMessage = "";
		
	if (isBlank(fullName))
	{
		errorMessage+= 'Enter your full name.\r\n';
		success = false;
	}
	
	if (isBlank(email))
	{
		errorMessage+= 'Enter your email address.\r\n';
		success = false;
	}
	
	if (isBlank(phone))
	{
		errorMessage+= 'Enter your business phone.\r\n';
		success = false;
	}
	//************************************
	//****** PRESENT ERROR MESSAGE *******
	//************************************	
	if(!success) {
		errorMessage = "There were some problems with your input, please check the following:\r\n\r\n" + errorMessage;
		alert(errorMessage);
	}
	
	//******************
	//***** RETURN *****
	//******************	
	return success;
}

