myname=self.location.href;

n=myname.lastIndexOf("/");

if (n < 0)
{
	myname="";
}
else
{
	myname=myname.substr(n+1);
}

n=myname.lastIndexOf("#");

if (n >= 0)
{
        myname=myname.substr(0,n)+"~"+myname.substr(n+1);
}

myname="http://www.courier-mta.org/?" + myname;

x=top.location.href;

if (x.substr(0, 5) != "file:")
{
  if (x.substr(0,27) != "http://www.courier-mta.org/")
  {
	top.location=myname;
  }

  if (top == self)
  {
    top.location=myname;
  }
  document.write('<object id="pmenu" data="menu.html" style="z-index: 1;');
}
else
{
  document.write('<object id="pmenu" style="z-index: 1;');
}

document.write('position: fixed;');
document.write('left: 0px; top: 0px;');
document.write('width: 100%; height: 100%;');
document.write('visibility: hidden" ></object>');

function menuon()
{
   var p=document.getElementById('pmenu');

   if (p.style.visibility == 'visible')
   {
       p.style.visibility='hidden';
   }
   else
   {
       p.style.visibility='visible';
   }
}
