

//=============================================================
function validateInqForm(theForm){

var strMsg = "";

	if(theForm.Summary.value == ""){
		strMsg = "\n - Please enter your project summary." + strMsg;
		theForm.Summary.focus();
	}else{
	  var strSummary = theForm.Summary.value;
	  //length acceptable = 5100 - allowance for differing progs/languages counting characters differently
	  if(strSummary.length > 5100){
		strMsg = "\n - Your summary is more than 5000 characters in length and only 5000 characters are accepted." + strMsg;
		theForm.Summary.focus();
	  }
	}

	if(theForm.Funding.value == ""){
		strMsg = "\n - Please enter the funding being requested." + strMsg;
		theForm.Funding.focus();
	}

	if(theForm.Budget.value == ""){
		strMsg = "\n - Please enter the organization's budget." + strMsg;
		theForm.Budget.focus();
	}

	if(theForm.Mission.value == ""){
		strMsg = "\n - Please enter the organization's mission." + strMsg;
		theForm.Mission.focus();
	}else{
	  var strMission = theForm.Mission.value;
	  //length acceptable = 1100 - allowance for differing progs/languages counting characters differently
	  if(strMission.length > 1100){
		strMsg = "\n - Your mission is more than 1000 characters in length and only 1000 characters are accepted." + strMsg;
		theForm.Mission.focus();
	  }
	}

	if(theForm.OrgEmailAddress.value == ""){
		strMsg = "\n - Please enter an email address." + strMsg;
		theForm.OrgEmailAddress.focus();
	}

	if(theForm.ContactPerson.value == ""){
		strMsg = "\n - Please enter a contact person." + strMsg;
		theForm.ContactPerson.focus();
	}

	if(theForm.Phone1.value == ""){
		strMsg = "\n - Please enter a phone number." + strMsg;
		theForm.Phone1.focus();
	}

	if(theForm.Address1.value == ""){
		strMsg = "\n - Please enter an address." + strMsg;
		theForm.Address1.focus();
	}

	if(theForm.Nameoforganization.value == ""){
		strMsg = "\n - Please enter the name of the organization." + strMsg;;
		theForm.Nameoforganization.focus();
	}	

	if(strMsg != ""){
	    strMsg = "\nWe're sorry but there was a problem processing your inquiry.          \n" + strMsg;;
	    strMsg = strMsg + "\n\nPlease click 'OK' to return to the Letter of Inquiry form.\n" ;;
		alert(strMsg);
		return false;
	}
	else{
		return true;
	}

  
}
