function setFocus() {
  document.quick_search.snm.focus();
  return true;
}

function shimg(img) {
  win =
  window.open("/shimg/"+img,'imagewindow','width=800,height=700,scrollbars=yes');
  win.window.focus();
}

function confirmDelete(x) {
  var replyConfirm = confirm('Really delete '+x+'?');
  if (replyConfirm) {
    return true;
  }
  else {
    return false;
  }
}

function showNav(x) {
  /* collect all <div>-tags */
  var divs = document.getElementsByTagName('div');
  
  for (i = 0; i < divs.length; i++) {
    /* make still visible <div>-tags with id=^(nav_) invisible */
    if (divs[i].id.match(/^(nav_)/)) {
      divs[i].style.visibility = 'hidden';
    }
  }
  
  /* make desired <div> visible */
  document.getElementById('nav_' + x).style.visibility = 'visible';
  
  /* collect all <span>-tags */
  var spans = document.getElementsByTagName('span');
  
  for (j = 0; j < spans.length; j++) {
    /* make color of menu items <span>-tags with id=^(menu_) normal */
    if (spans[j].id.match(/^(menu_)/)) {
      spans[j].style.background = '#c33';
      spans[j].style.color = '#ffc';
      // spans[j].style.border = '';
    }
  }
  
  if (x != 'begin') {
  /* make color of <span> different */
  document.getElementById('menu_' + x).style.background = '#900';
  document.getElementById('menu_' + x).style.color = '#ffc';
  // document.getElementById('menu_' + x).style.border = '1px #c33 solid';
  }
  else {
  }
}

/* This needs good implementation in site */
function hideNav() {
  /* collect all <div>-tags */
  var divs = document.getElementsByTagName('div');
  
  for (i = 0; i < divs.length; i++) {
    /* make visible <div>-tags with id=^(nav_) invsible */
    if (divs[i].id.match(/^(nav_)/)) {
      divs[i].style.visibility = 'hidden';
    }
  }
  
  /* make default <div> visible (= begin) */
  document.getElementById('nav_begin').style.visibility = 'visible';
  
  /* collect all <span>-tags */
  var spans = document.getElementsByTagName('span');
  
  for (j = 0; j < spans.length; j++) {
    /* make color of menu items <span>-tags with id=^(span_) normal */
    if (spans[j].id.match(/^(menu_)/)) {
      spans[j].style.background = '#dda';
      spans[j].style.color = '#fff';
    }
  }
}
