// quick_jump.js
// Jump to appropriate page when selected in dropdown box

function quick_jump(selectbox, prefix, replacement) {
  loc = selectbox.options[selectbox.selectedIndex].value;
  if (loc) {
    if (prefix && loc.substr(0, prefix.length) == prefix) {
      loc = loc.substr(prefix.length);
      if (replacement)
        loc = replacement + loc;
    }
    var b = document.getElementsByTagName('base');
    if (b && b[0] && b[0].href) {
        if (b[0].href.substr(b[0].href.length-1) == '/' && loc.charAt(0) == '/')
                loc = loc.substr(1);
        loc = b[0].href + loc;
    }
    location.href = loc;
  }
  return false;
}
