function addBookmark() 
{ 
	if (window.external) 
	{ 
		external.AddFavorite(location.href,document.title)
	} 
	else 
	{ 
		alert("Oops, your browser doesn't support this feature.\n" 
		+ "If you are using Netscape Navigator, right click this page\n" 
		+ "and then click on 'Bookmark This Page'"); 
	} 
	return (false); 
} 


function gimmefocus()
{
 if(parent.mainFrame)
 { 
  parent.mainFrame.focus();
  return;
 }
}
function setcontext()
{
  var location=self.location.href;
  if(location.indexOf("cgi-bin")!= -1)
  {
	var z=location.indexOf('cgi-bin');
	var domain=location.slice(0,z-1);
 	var idx=location.lastIndexOf('=');
	var targetpage=domain + location.substr(idx+1);
	var y=targetpage.lastIndexOf('/');
	var toppage=targetpage.slice(0,y)+ '/index.htm';
  }
  else
  {
    var targetpage=top.mainFrame.location.href
    var toppage=top.location.href;
  }
  /*first try and set context on sidebar*/
  var foundleftlink=false;
  var leftFrame=top.leftFrame;
  if(leftFrame)
  {
   
    var idxdoc=leftFrame.document;
    var links=leftFrame.document.links;
   
   
   if(links)
   {
    for(var i=0;i<links.length;i++)
    {
     if(links[i].href==targetpage)
     {
      /*found the link, now turn on context indicator*/
      var j=Math.floor(i/2);		
      idxdoc.images[j].src=leftFrame.imageObjects[1].src;
      foundleftlink=true;
      /*now make sure all other context indicators are turned off*/
      for(var k=0;k<idxdoc.images.length;k++)
      {
        if(k!=j)
         idxdoc.images[k].src=leftFrame.imageObjects[0].src;
      }
      break;
     }
    }
   }
  }
  if(foundleftlink==false)
  {
   /*if didn't find left link, no chance of finding top link*/
   return;
  }

  /*now try and set context on top frame*/
  var topFrame=top.frames[0];
	
  if(topFrame)
  {
   /*if cgi server is different from document server*/
   /*we won't be allowed to look at top document*/
   /*so catch the error so the user doesn't see it*/
   
     idxdoc=topFrame.document;
   
   
    var links=idxdoc.links;
   
   if(links)
   {
    /*browser is going to let us look at top frame*/
    topmenucnt=idxdoc.images.length-2;
    for(var i=0;i<topmenucnt*2;i++)
    {
     if(links[i].href==toppage)
     {
      /*found link, now turn on context indicator*/
      var j=Math.floor(i/2)+1;
			
      idxdoc.images[j].src=topFrame.imageObjects[1].src;
      /*now make sure all the others are turned off*/
      for(var k=1;k<topmenucnt;k++)
      {
       if(k!=j)
        idxdoc.images[k].src=topFrame.imageObjects[0].src;
      }
      return;
     }
    }
    /*no joy, main document must be in submenu*/
    /*strip off submenu directory*/
    var purl=toppage;
    var lastslash=purl.lastIndexOf('/');
    var basename=purl.substr(0,lastslash);
    lastslash=basename.lastIndexOf('/');
    var leftlink=basename.substr(0,lastslash) + "/index.htm";
    for(var i=0;i<topmenucnt*2;i++)
    {
     if(links[i].href==leftlink)
     {
      /*found link, now turn on context indicator*/
      var j=Math.floor(i/2)+1;
			
      idxdoc.images[j].src=topFrame.imageObjects[1].src;
      /*now make sure all the others are turned off*/
      for(var k=1;k<topmenucnt;k++)
      {
       if(k!=j)
        idxdoc.images[k].src=topFrame.imageObjects[0].src;
      }
      return;
     }
    }
    /*no joy, might be in sub sub menu*/
    lastslash=basename.lastIndexOf('/');
    link=basename.substr(0,lastslash);
    lastslash=link.lastIndexOf('/');
    leftlink=link.substr(0,lastslash) + "/index.htm";
    for(var i=0;i<topmenucnt*2;i++)
    {
     if(links[i].href==leftlink)
     {
      /*found link, now turn on context indicator*/
      var j=Math.floor(i/2)+1;
			
      idxdoc.images[j].src=topFrame.imageObjects[1].src;
      /*now make sure all the others are turned off*/
      for(var k=1;k<topmenucnt;k++)
      {
       if(k!=j)
        idxdoc.images[k].src=topFrame.imageObjects[0].src;
      }
      return;
     }
    }
   }
  }
 return;
}
function maximize()
{
	var location=document.location;
	var availHeight = screen.availHeight - 160; 
	var availWidth = screen.availWidth - 10; 
	
	var x = 0, y = 0; 
	if (document.all) 
	{ 
		x = window.screenTop; 
		y = window.screenLeft; 
	} 
	else if (document.layers) 
	{ 
		x = window.screenX; 
		y = window.screenY; 
	} 
	var features="dependent=no,directories=no,location=yes,toolbar=yes,menubar=yes,resizable=yes,status=yes,scrollbars=yes,top=0,left=0,screenX="+x+",screenY="+y+",width="+availWidth+",height="+availHeight;

	

	window.open(location,'bigwindow',features);
	
	return (false);
}
function magnify()
{
	var lhref=location.href;
	if(lhref.indexOf("cgi-bin")!= -1)
	{
		var z=lhref.indexOf('cgi-bin');
		var domain=lhref.slice(0,z-1);
 		var idx=lhref.lastIndexOf('=');
		var ss1=lhref.substr(idx+1);
		idx=ss1.lastIndexOf('htm');
		var ss2=ss1.slice(0,idx+3);
		var toppage=domain + ss2;
		top.location=toppage;
 	}
	else
		top.location=location;
	return false;
}
function ignoreError()
{
	return true;
}
function getfocus()
{
 
 if(parent.mainFrame)
 {
  parent.mainFrame.focus();
 }
 return true;
}
function Zoomed()
{
 if(parent.mainFrame)
 {
//   var location=self.location.href;

 //  if(location.indexOf("cgi")== -1)
   {
    return false;
   } 
 }
 return true;
}