function changePage() {
	var index = window.document.navForm.countyID.value;
	var index = window.document.navForm.countyID.options[window.document.navForm.countyID.selectedIndex].value;
	var loc = "/countyPrograms/index.jsp?countyID="+index
	window.document.location.href = loc;
}

function isArray (array) {
  return ((array != null) && (typeof array == "object") &&
         (array.constructor == Array));
}

function go() {
 len = document.utility_list.length
 radioArray = new Array(len);
 elementName  = "";
 maxLength  = 0;
 for(i=0;i<document.utility_list.length;i++) {
   if (document.utility_list.elements[i].type == "radio" && elementName != document.utility_list.elements[i].name) {
     elementName = document.utility_list.elements[i].name;
     radioArray[i] =  i;
     maxLength  =  maxLength  + 1;
   }
   else
   {
     radioArray[i] = -1;
   }
 }

 testingArray = new Array(maxLength);
 arrayIndex = 0;
 for(k=0;k<radioArray.length;k++) {
  if (radioArray[k] != -1) {
   testingArray[arrayIndex] = radioArray[k];
   arrayIndex = arrayIndex + 1;
  }
 }  

for(k=0;k<testingArray.length;k++) {
 if (typeof eval('document.utility_list.' + document.utility_list.elements[testingArray[k]].name + "[0]") != "object") {
  testingArray[k] = true;
 }
 else {
  for(j=0;j<eval("document.utility_list." + document.utility_list.elements[testingArray[k]].name + ".length");j++) {
   if (eval("document.utility_list." + document.utility_list.elements[testingArray[k]].name + "[j].checked") == true) {
      testingArray[k] = true;
      break;
   }
  }
 }
}
for(k=0;k<testingArray.length;k++) {
 if (testingArray[k] != true) {
   alert ("Please select your Electric and Gas utilities.");
   return false;
 }
}
document.utility_list.submit();
return true;
}

