// The following code was written by Oliver Kuederle on March 27, 2000.
// Unauthorized copying, modification, or distribution not permitted.
// For more information please contact kuederle@sfu.ca.

// Check which browser we have here.
var ns4=(document.layers)?true:false;
var ie4=(document.all)?true:false;

// Preload the underlined links.
IntlClub=new Image();
IntlClub.src="LB_IntlClub_UL.gif";
HamHall=new Image();
HamHall.src="LB_HamHall_UL.gif";
DTP=new Image();
DTP.src="LB_DTP_UL.gif";
Fur=new Image();
Fur.src="LB_Fur_UL.gif";
BackHome=new Image();
BackHome.src="LB_BackHome_UL.gif";

// The function that underlines the links.
function Underline(TheObject)
{
  document.images[TheObject+'_OBJ'].src=eval(TheObject+'.src');
}

// The function that removes the underline.
function NoUnderline(TheObject)
{
  document.images[TheObject+'_OBJ'].src='LB_'+TheObject+'.gif';
}

// This function constantly updates the position of the
// TV banner.
function UpdateTVBanner(LayerName,Width,Height)
{
  var NewX,NewY;

  // Determine the new position of the TV banner
  // (taking scrolling into account).
  if(ns4)
  {
    NewX=window.pageXOffset+window.innerWidth-16-Width;
    NewY=window.pageYOffset+window.innerHeight-Height;
  }
  else if(ie4)
  {
    NewX=document.body.scrollLeft+document.body.offsetWidth-20-Width;
    NewY=document.body.scrollTop+document.body.offsetHeight-Height;
  }
  else
  {
    NewX=-Width;
    NewY=-Height;
  }

  // Set the new position of the TV banner.
  if(ns4)
  {
    eval('document.'+LayerName+'.left='+NewX);
    eval('document.'+LayerName+'.top='+NewY);
  }
  else if(ie4)
  {
    eval(LayerName+'.style.left='+NewX);
    eval(LayerName+'.style.top='+NewY);
  }

  // Update every now and then.
  setTimeout('UpdateTVBanner("'+LayerName+'",'+Width+','+Height+')',100);
}