// Copyright information must stay intact
// FormCheck v1.10
// Copyright NavSurf.com 2002, all rights reserved
// Creative Solutions for JavaScript navigation menus, scrollers and web widgets
// Affordable Services in JavaScript consulting, customization and trouble-shooting
// Visit NavSurf.com at http://navsurf.com

function formCheck(formobj){
	// name of mandatory fields
	var fieldRequired = Array("rv1", "rv2", "rv3", "rv4", "rv5", "rv6", "rv7", "rv8", "rv9", "rv10", "rv11");
	// field description to appear in the dialog box
	var fieldDescription = Array("Is your organization a 501(c)(3) nonprofit organization, or a state or local public education institution?", "Does your request fall under the category of Education, Health & Human Services, Community Service, or Arts & Culture?", "Is your request for an individual person or family?", "Is your request for sponsorship of a fundraising event, tickets or dinner?", "Is your request for a general endowment fund?", "Is your request for non-religious purposes?", "Is your request for a national health organization?", "Is your request for non-political purposes?", "Is your request for a professional service organization?", "Is your request for operating costs or curriculum expansion of an educational institution?", "Is your request part of a capital equipment or building campaign?");
	// dialog message
	var alertMsg = "The following fields were not completed correctly:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			if (obj.type == null){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				continue;
			}

			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}


function MM_message() {
alert("Capital equipment and building campaigns are rarely\nfunded by the Dennis & Phyllis Washington Foundation.\nFrom its beginning in 1988, the Foundation has focused\nits resources towards programs, services, and\norganizations that provide direct services to needy\npeople in Montana and throughout the operating areas\nof the Washington Companies.")
}




