function LinkToName( Index ) {
  var URL = "#" + Index;
  parent.frames[1].location = URL;
}

function openMsgWin(URL,name,width,height,scrollbars,otherbars) {
  if( ! width  ) { width  = 200 };
  if( ! height ) { height = 200 };
  if( ! scrollbars ) { scrollbars = 'no' };
  if( ! otherbars  ) { otherbars  = 'no' };
  var Message = window.open(URL,name,"width="+width+",height="+height+",top=105,left=100,scrollbars="+scrollbars+",resizable=yes,menubar="+otherbars+",toolbar="+otherbars);
  Message.focus();
}

function stopErrors() {
  return true;
}

function context_help( helpservice, baseurl ) {
  if( helpservice == "HELP_-" ) helpservice = "HELP_START";
  if( helpservice.match(/^HELP_LOCAL/) ) {
    alert("Diese Funktionen/Angebote sind nicht direkt Teil der \"DigiBib\".\nDaher enthält die DigiBib-Hilfe keine Angaben dazu.");
    return true;
  }
  this.window.onerror = stopErrors;
  // alert( helpservice );
  var f_len = this.parent.frames.length;
  f_len--;
  var loc = '';
  var f_f_len = eval("this.parent.frames[" + f_len + "].frames.length");
  if( f_f_len ) {
    f_f_len--;
    try { loc = eval("this.parent.frames[" + f_len + "].frames[" + f_f_len + "].location.href"); }
    catch(e) { };
  } else { 
    try { loc = eval("this.parent.frames[" + f_len + "].location.href"); }
    catch(e) { };
  }
  if( loc && loc.match(/\?/) ) {  // we have a problem here with POST requests!
    var subsrv = loc.match(/SUBSERVICE=[A-Z0-9\_]+/);
    if( subsrv == null ) {
      if( loc.match(/\/ezb\?/) ) {
        subsrv = 'EZB_FRONTEND';
      }
    } else {
      subsrv = subsrv[0].substring(11, subsrv[0].length);
    }
    if( subsrv.match(/^HELP_/) ) subsrv = 'HELP_START';
    openMsgWin(baseurl + '&SERVICE=TEMPLATE&SUBSERVICE=HELP_' + subsrv,'DigiBib_Help',450,500,'yes','yes');
  } else {
    if( helpservice.match(/^HELP_HELP_/) ) helpservice = 'HELP_HELP_START';
    openMsgWin(baseurl + '&SERVICE=TEMPLATE&SUBSERVICE=' + helpservice,'DigiBib_Help',450,500,'yes','yes');
  }
  return true;
}

