function checkFields() {

	var reqstr = document.getElementById("reqFields").value;

	if (reqstr.length == 0) return true;

	var reqarr = reqstr.split(",");

	for (i=0;i<reqarr.length;i++) {
		var str = document.getElementById(reqarr[i]).value;
		if (str.length == 0) {
			document.getElementById(reqarr[i]).focus();
			alert("You must fill in the " + reqarr[i] + " field");
			return false;
		}
	}

	//check the location field, it's always required
	var fa = document.getElementsByTagName("input");
	var len = fa.length;
	var ca = 0;

	for (i=0;i<len;i++) {

		//skip none locationId fields
		if (fa[i].id!="locationId[]") continue;

		//if it's a hidden field, then it's already filled in and we can okay it
		if (fa[i].type=="hidden") {
			ca = 1;
			break;
		}

		//if it's a checkbox and it's checked, set our bit to 1
		if (fa[i].type=="checkbox" && fa[i].checked == true) {
			ca = 1;
			break;
		}

	}

    /*
	if (ca!=1) {
		alert("You must select a community to request information for");
		return false;
	}
    */

	return true;

}
