function swapOptions1(the_array_name)
{
  var numbers_select = window.document.sel_form.f_0;
  var the_array = eval(the_array_name);
  setOptionText1(window.document.sel_form.f_1, the_array);
}



function setOptionText1(the_select, the_array) {
	removeAllOptions1(window.document.sel_form.f_1);

  var str_0 = '<please choose>';
	var mod_str = arr_cat_f0_to_f1[the_array];
	var mod_arr = mod_str.split(";"); 
	mod_arr_no = mod_arr.length;

  addOption1(the_select, 0, str_0);


	for (loop=0; loop < mod_arr_no; loop++) {
		mod_single = mod_arr[loop];
		mod_single_array = mod_single.split(","); 
		m_value = mod_single_array[0];
		m_str = mod_single_array[1];
		addOption1(the_select, m_value, m_str);
	}

}


function swapOptions_11(the_array_name)
{
  var numbers_select = window.document.sel_form.f_1;
  var the_array = eval(the_array_name);
  setOptionText_11(window.document.sel_form.f_1, the_array);
}



function setOptionText_11(the_select, the_array) {

	removeAllOptions1(the_select);

  var str_0 = '<please choose>';

	var mod_str = arr_cat_f0_to_f1[the_array];
	var mod_arr = mod_str.split(";"); 
	mod_arr_no = mod_arr.length;

  addOption1(the_select, 0, str_0);

	for (loop=0; loop < mod_arr_no; loop++) {
		mod_single = mod_arr[loop];
		mod_single_array = mod_single.split(","); 
		m_value = mod_single_array[0];
		m_str = mod_single_array[1];
		addOption(the_select, m_value, m_str);
	}


}



function removeAllOptions1(selectbox) {
	var i;
	for(i=selectbox.options.length-1;i>=0;i--) {
		selectbox.remove(i);
	}
}



function addOption1(selectbox, value, text ) {
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}


function go_items(c1) {

  var c0 = document.getElementById("f_0").value;
  var c1 = document.getElementById("f_1").value;

  if(c0 == 1) {
    c0_str = 'Equipment-Supply';
  }
  if(c0 == 2) {
    c0_str = 'Services';
  }
  if(c0 == 3) {
    c0_str = 'Personal';
  }

	var mod_str = arr_cat_f0_to_f1[c0];
	var mod_arr = mod_str.split(";"); 
	mod_arr_no = mod_arr.length;

	for (loop=0; loop < mod_arr_no; loop++) {
		mod_single = mod_arr[loop];
		mod_single_array = mod_single.split(","); 
		m_value = mod_single_array[0];
		m_str = mod_single_array[1];

		if(m_value == c1){
      c1_str = m_str;
    }
	}

  var pname = "?type=items&c0=" + c0_str + "&c1=" + c1_str;

  window.document.location = pname;

}
