
function az_combo(master, child, array)
{

/*  alert($(master));
  alert($(master).options);
  alert($(master).selectedIndex);
  alert($(master).options[$(master).selectedIndex]);
  */

  val = $(master).options[$(master).selectedIndex].value;

  if ($(child).options.length) $(child).options.length = 0;

  var cnt = 0;

  for (var i in array)
  {

    //if ((parseInt(i) > 0) && i == val)
    if (i == val)
    {

      for (var j in array[i])
      {

    //    if (parseInt(j) > 0)
    //    {
          $(child).options[cnt] = new Option(array[i][j], j);
          cnt++;
    //    }
      }

    }
  }

}


function az_combo_select(combo, value)
{
  el = $(combo);

  if (el.options.length > 0 )
  {
    for (var i = 0; i <  el.options.length; i++)
    {
      if (el.options[i].value == value)
      {
        el.options[i].selected = true;
      }
      else
      {
        el.options[i].selected = false;
      }

    }
  }
}


