<!--
//This script is not especially fault tolerant.
//If you improve on this script, please send the source code
//to gilbertnews@hotmail.com so I can see what you've done.
function writeResults() {
  var estr=this.location.toString();
  var index=estr.indexOf("?");
  if(index==-1) {
    document.writeln("<h1>Kein Ergebnis zu der Anfrage</h1>");
    return;
  }
  index++;
  estr=estr.substring(index,estr.length);
  index=estr.indexOf(",");
  document.writeln("<dl>");
  document.write("<dt>Zum gesuchten Begriff <b>"+unescape(estr.substring(0,index))+"</b> ");
  estr=estr.substring(index+1,estr.length);
  if(estr.substring(0,1)=="y") document.write(" (with exact matches only) ");
  if(estr.substring(1,2)=="y") document.write(" (excluding HTML) "); 
  document.writeln("wurden nachfolgende Eintragungen gefunden:<p>");
  estr=estr.substring(2,estr.length);
  index=-1;
  var lastindex=0;//colon
  var clastindex=0;//comma
  var currdata="";
  var myurl="";
  var myanchor="";
  var colonindex=-1;
  var info="";
  var context="";
  var anchor="";
  while((index=estr.indexOf(",",index+1))!=-1) {
    currdata=estr.substring(clastindex,index);
    clastindex=index+1;
    colonindex=currdata.indexOf(":");
    if(colonindex!=-1) {
      //Get the URL
      myurl=unescape(currdata.substring(0,colonindex));
      //Get the page's title
      lastindex=colonindex+1;
      colonindex=currdata.indexOf(":",lastindex);
      document.write("<dd><a href=\""+myurl+"\"><b>"+
unescape(currdata.substring(lastindex,colonindex))+"</b> <b>("+myurl+")</b></a>");
      //Get the anchor
      lastindex=colonindex+1;
      colonindex=currdata.indexOf(":",lastindex);
      anchor=unescape(currdata.substring(lastindex,colonindex));
      if(anchor.length>0) document.write(" <a href=\""+myurl+"#"+anchor+"\">[Closest anchor]</a>");
      document.writeln("<br>");
      lastindex=colonindex+1;
      colonindex=currdata.indexOf(":",lastindex);
      info=unescape(currdata.substring(lastindex,colonindex));
      document.write("<font size=2>");
      if(info.length>0) document.write("<b>Document Info</b>: "+info+"&nbsp;&nbsp;&nbsp;&nbsp;");
      lastindex=colonindex+1;
      context=unescape(currdata.substring(lastindex,currdata.length));
      if(context.length) document.writeln("<b>Match Context</b>: \""+context+"\"<p>");
      document.write("</font>");
    }
  }
  document.writeln("</dl>");
}


//-->
