
function leapto(sbox, context, error) {
  var myindex=sbox.selectedIndex;
  var parent = 0;

  // Determine load context (parent or main frame).

  if (context.length == 0 ) {
    parent = 1;
  }
  else {
    for (i = 0; i < context.length; i++) {
      if ( context[i] == myindex ) {
        parent = 1;
      }
    }
  }
  // Load into determined context if thereis a URL value defined.
  if ( sbox.options[myindex].value ) {
    if ( parent ) {
      self.location = sbox.options[myindex].value;
    }
    else {
      self.window.location = sbox.options[myindex].value;
    }
  }
  else {
    if ( error ) {
      alert("Bad selection!");
    }
  }
}

