function hide_modes($pref,key) {

  lastchar = key.substr(-1);
  $words = key.split(" ").length;
  
  if ($words > 1 && lastchar != " ") {
    $($pref+'or').disabled = false;
    $($pref+'and').disabled = false;
  } else if (lastchar != " ") {
    $($pref+'or').disabled = true;
    $($pref+'and').disabled = true;
    $($pref+'exact').checked = true;
  }
  
}

function word_over(obj) {
  obj.style.textDecoration='underline';
}

function word_out(obj) {
  obj.style.textDecoration='none';
}

function shc(obj,$mode) {
  if ($mode) {
    setTimeout(function() {$(obj).style.display = 'block';},100);
  } else {
    setTimeout(function() {$(obj).style.display = 'none';},100);
  }
}
