
var arrItems1 = new Array();
var arrItemsGrp1 = new Array();
var arrValues1 = new Array();


arrItems1[21] = "Strengthening Families";
arrItemsGrp1[21] = '';
arrValues1[21] = "Strengthening Families";
arrItems1[22] = "Youth Development";
arrItemsGrp1[22] = '';
arrValues1[22] = "Youth Development";
arrItems1[26] = "Gay & Lesbian";
arrItemsGrp1[26] = '';
arrValues1[26] = "Gay & Lesbian";
arrItems1[27] = "Immigrant Rights & Reform";
arrItemsGrp1[27] = '';
arrValues1[27] = "Immigrant Rights and Reform";
arrItems1[28] = "Racial Equity";
arrItemsGrp1[28] = '';
arrValues1[28] = "Racial Equity";
arrItems1[32] = "Arts & Culture";
arrItemsGrp1[32] = '';
arrValues1[32] = "Arts and Culture";
arrItems1[33] = "Critical Assistance";
arrItemsGrp1[33] = '';
arrValues1[34] = "Critical Assistance";
arrItems1[34] = "Education";
arrItemsGrp1[34] = '';
arrValues1[34] = "Education";
arrItems1[35] = "General";
arrItemsGrp1[35] = '';
arrValues1[35] = "General";


arrItems1[1] = "Strengthening Families";
arrItemsGrp1[1] = "Children, Youth and Families";
arrValues1[1] = "Strengthening Families";
arrItems1[2] = "Youth Development";
arrItemsGrp1[2] = "Children, Youth and Families";
arrValues1[2] = "Youth Development";

arrItems1[6] = "Gay and Lesbian Rights";
arrItemsGrp1[6] = "Equality and Justice";
arrValues1[6] = "Gay and Lesbian Rights";
arrItems1[7] = "Immigrant Rights";
arrItemsGrp1[7] = "Equality and Justice";
arrValues1[7] = "Immigrant Rights";
arrItems1[8] = "Racial Equity";
arrItemsGrp1[8] = "Equality and Justice";
arrValues1[8] = "Racial Equity";

arrItems1[12] = "Arts & Culture";
arrItemsGrp1[12] = "Other Fund Interests";
arrValues1[12] = "Arts & Culture";
arrItems1[13] = "Critical Assistance";
arrItemsGrp1[13] = "Other Fund Interests";
arrValues1[13] = "Critical Assistance";
arrItems1[14] = "Education";
arrItemsGrp1[14] = "Other Fund Interests";
arrValues1[14] = "Education";
arrItems1[15] = "General";
arrItemsGrp1[15] = "Other Fund Interests";
arrValues1[15] = "General";


function selectChange(control, controlToPopulate, ItemArray, GroupArray, ValueArray) {
  var myEle ;
  var x ;
  // Empty the second drop down box of any choices
  for (var q=controlToPopulate.options.length;q>=0;q--) controlToPopulate.options[q]=null;
  if (control.name == "firstChoice") {
    // Empty the third drop down box of any choices
    //for (var q=form.thirdChoice.options.length;q>=0;q--) form.thirdChoice.options[q] = null;
  }
  // ADD Default Choice - in case there are no values
  myEle=document.createElement("option");
  theText=document.createTextNode("All Sub Program Areas");
  myEle.appendChild(theText);
  myEle.setAttribute("value","");
  controlToPopulate.appendChild(myEle);
  // Now loop through the array of individual items
  // Any containing the same child id are added to
  // the second dropdown box
  for ( x = 0 ; x < ItemArray.length  ; x++ ) {
    if ( GroupArray[x] == control.value ) {
      myEle = document.createElement("option") ;
      //myEle.value = x ;
      myEle.setAttribute("value",ValueArray[x]);
      // myEle.text = ItemArray[x] ;
      var txt = document.createTextNode(ItemArray[x]);
      myEle.appendChild(txt)
      // controlToPopulate.add(myEle) ;
      controlToPopulate.appendChild(myEle)
    }
  }
  if ( controlToPopulate.length==1 ) {
	  //controlToPopulate.disabled=true;
  } else {
	  //controlToPopulate.disabled=false;
  }
}