function checkScholarshipForm(form_ref) {
	// check the required fields to make sure they are filled in.
	var alert_txt = "";
	if (form_ref.date.value == "") { // first name field
		alert_txt += "\n* Current date should be filled in.";
		form_ref.date.style.borderColor = "#F54C00";
		form_ref.date.style.backgroundColor = "#ffdddd";
	}
	if (form_ref.name.value == "") { // last name field
		alert_txt += "\n* Please fill in your name.";
		form_ref.name.style.borderColor = "#f54c00";
		form_ref.name.style.backgroundColor = "#ffdddd";
	}
	if (form_ref.address1.value == "") { // address field
		alert_txt += "\n* Please fill in your address.";
		form_ref.address1.style.borderColor = "#f54c00";
		form_ref.address1.style.backgroundColor = "#ffdddd";
	}
	if (form_ref.phone.value == "") { // city field
		alert_txt += "\n* Please fill in your phone.";
		form_ref.phone.style.borderColor = "#f54c00";
		form_ref.phone.style.backgroundColor = "#ffdddd";
	}
	if (form_ref.email.value == "") { // city field
		alert_txt += "\n* Please fill in your email address.";
		form_ref.email.style.borderColor = "#f54c00";
		form_ref.email.style.backgroundColor = "#ffdddd";
	} else {
	    if (form_ref.email.value.indexOf('@')<0) {
		  alert_txt += "\n* Email address is not in correct format.";
		  form_ref.email.style.borderColor = "#f54c00";
		  form_ref.email.style.backgroundColor = "#ffdddd";
		}
	}
	if (form_ref.current_grade.value == "") { // state field
		alert_txt += "\n* Please fill in your current grade.";
		form_ref.current_grade.style.borderColor = "#f54c00";
		form_ref.current_grade.style.backgroundColor = "#ffdddd";
	}
	if (form_ref.why.value == "") { // phone field
		alert_txt += "\n* Please fill out why you should be awarded this scholarship.";
		form_ref.why.style.borderColor = "#f54c00";
		form_ref.why.style.backgroundColor = "#ffdddd";
	}
	
	/*if (form_ref.scholarships_considered.value == "") { // phone field
		alert_txt += "\n* Please fill out what scholarships you are considering.";
		form_ref.scholarships_considered.style.borderColor = "#f54c00";
		form_ref.scholarships_considered.style.backgroundColor = "#ffdddd";
	}
	if (form_ref.gpa.value == "") { // zip field
		alert_txt += "\n* Please fill in your GPA.";
		form_ref.gpa.style.borderColor = "#f54c00";
		form_ref.gpa.style.backgroundColor = "#ffdddd";
	}*/
	
	
	if (alert_txt) { // there was an error
		alert_txt = "There was a problem with your information:\n\n"+alert_txt;
		alert(alert_txt);
		return false;
	} else {
		return true;
	}
}

function mailInfo(message) {
	document.location = document.location+"?mail_str="+message;
}

function countit(){

/*Word count script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/

var formcontent=document.schol_app_form.why.value
formcontentWords=formcontent.split(" ")
document.schol_app_form.wordcount3.value=formcontentWords.length
}