function auto_select(selector)
{
  $(selector).change(function(){
    autoselectors = $(selector)
    idx = this.selectedIndex
    term = this.options[idx].text
    
    autoselectors.each(function(i, itm) {
      
      ix = getindex(itm, term)
      if (ix != false && itm.selectedIndex != ix)
      {
        itm.selectedIndex = ix
      }
      
    })
  })
}

function getindex(ary, itm)
{
  for (var i = 0; i < ary.length; i++)
  {
    if (ary[i].text == itm)
    {
      return i
    }
  }
  return false
}