function makehref()
{
 var theHost = window.location.host;
 var theURL = 'http://'+theHost+'/matheplanet/nuke/html';
 var fullurl = window.location.href;
 var referrer = document.referrer;
 var parsarray = fullurl.split('?');
 var newurl = theURL + '/index.php';
 if(parsarray.length>1)
 {
  if(parsarray[1]=='user')
  {
   newurl = theURL + '/user.php';
  }
  else if(parsarray[1]=='links')
  {
   newurl = theURL + '/links.php';
  }
  else
  {
   ops = parsarray[1].split('=');
   if(ops.length>1 && ops[0]=='article')
   {
    newurl = theURL + '/article.php?sid=' + ops[1];
   }
    else if(ops.length>1 && ops[0]=='outlink')
   {
    newurl = theURL + '/links.php?op=outsidelinksetup&lid=' + ops[1];
   }
   else if(ops.length>2 && ops[0]=='topic')
   {
    newurl = theURL + '/viewtopic.php?topic=' + ops[1] + '&forum=' + ops[2];
   }
   else if(ops.length>0 && ops[0]=='mo')
   {
    newurl = theURL + '/viewtopic.php?topic=159653';
   }
   else if(ops.length>1 && ops[0]=='linkcat')
   {
    newurl = theURL + '/links.php?op=viewlink&cid=' + ops[1];
   }
   else if(ops.length>1 && ops[0]=='call')
   {
    newurl = theURL + '/' + ops[1];
    if(parsarray.length>2)
     newurl = newurl + '?' + parsarray[2];
    for(var i=3;i<parsarray.length;i++)
     newurl = newurl + '&' + parsarray[i];
   }
   else if(ops.length>1 && ops[0]=='section')
   {
    newurl = theURL + '/sections.php?artid=' + ops[1];
   }
   else if(ops.length>1 && ops[0]=='query')
   {
    newurl = theURL + '/search.php?query=' + ops[1];
   }
   else if(ops.length>1 && ops[0]=='link')
   {
    newurl = theURL + '/links.php?op=visit&f=1&lid=' + ops[1];
    window.location.replace(newurl);
   }
   else if(ops.length>1 && ops[0]=='query')
   {
    newurl = theURL + '/links.php?op=search&query=' + ops[1];
   }
   newurl = newurl ;
  }
 }
 // wenn in redirectTo ein ? vorkommt, dann haenge $f=1 an
 // sonst haenge ?f=1 an.
 if(newurl.indexOf("?")==-1)
 {
  newurl = newurl + '?f=1&ff=y';
 }
 else
 {
  newurl = newurl + '&f=1&ff=y';
 }
 return newurl;
}

var redirectTo = makehref();
window.document.open(); 
window.document.write('<frameset rows="111,*" border=0 frameborder=0 framespacing=0>');
window.document.write(' <frameset cols="13%,*" border=0 frameborder=0 framespacing=0>');
window.document.write('  <frame src="counter.php" noresize scrolling=no name="c">');
window.document.write('  <frame src="static_head.html" noresize scrolling=no name="o">');
window.document.write(' </frameset>');
window.document.write('  <frame noresize src="'+redirectTo+'&rd3=1'+'" name="u">');
window.document.write('</frameset>');
window.document.close();

