  function checkSearch(anId) {
    ok = false;
    term = document.getElementById(anId);
    if (term != null && term.value.length > 0) {
      var stuff = new RegExp("[^a-zA-Z0-9_ -]","g");
      term.value = term.value.replace(stuff,"");
      term.value = term.value + "*";
      ok = true;
    }
    return ok;
  }
  
  function getButtonValue(button) {
    var count = -1;
    for (var i = button.length - 1; i > -1; i--) {
      if (button[i].checked) {
        count = i; 
        i = -1;
      }
    }
    if (count > -1) {
      return button[count].value;
    } else {
      return null;
    }
  }  
