// File: .javascript.js		-*- Java -*- 
// Created by: Alex Knowles (alex@ed.ac.uk) Tue Oct 19 11:51:58 1999
// Last Modified: Time-stamp: <Tue Oct 19 11:51:58 EDT 1999> 
// RCS $Id$ 

<!-- //ALL code Copyright 1998-9 Alex Knowles - reproduction & reuse prohibited

// check we are the top frame - we insist that we are!
if( window.location != window.top.location ){
  /* alert("This should be in a new window"  +"\n"+
           window.top.location  +"\n"+
           window.location  +"\n"+
           this.location  +"\n"+
           document.location  +"\n"); */
  if( window.top.replace ){
    window.top.replace(window.location);
  } else {
    window.top.location=window.location;
  }
  // we could have logged the bad person, but let's not.
  // "http://www.rageMTB.com/cgi-bin/ragemoved/" + window.top.location;
}

// -->

<!-- // all code CopyRight 1998 Alex Knowles - reuse forbidden
// this is the name of the document currently displayed
if( ! lastdoc ){
  var lastdoc="Home";
}

function newdoc( link )
{
  return true;
}

function over(lnk, txt){
  TOCdoit(pagename(lnk.pathname), '1' );
  if( txt ){
    status=txt;
  }
  return true;
}

function out( lnk){ TOCdoit(pagename(lnk.pathname), '3' );}

// returns the basename of the argument fish/daily.shtml - daily
function pagename( str )
{
  str=str.substring( 0, str.lastIndexOf( '/') );
  str=str.substring( str.lastIndexOf( '/')+1 );
  //+1,str.indexOf( '.' )); str.length < 1 || 
  if( str == "new"){ 
   str="index";
  }

  // alert("Pagename is : " + str );
  return str;
}

// changes the colour of an image in the page to either wht or blk
// does nothiong if the image represents the displayed frame
function TOCdoit(str,col)
{
  if( str && 0<str.length && document.images && document.images[str] )
    if( !top.toons || top.toons.location.href.indexOf( str ) == -1 )
      document.images[str].src="/Images/buttons/" + str + col +".gif";
    else 
      document.images[str].src="/Images/buttons/" + str +"3.gif";
}

defaultStatus="RAGE: Boston's Coolest Mountain Bike Club!";

// -->

<!-- image caching stuff -->

  var history;
  var lists;
  var maps;
  var photos;
  var archives;
  var bestof;
  var reviews;
  var misc;
  var links;
  var index;

function REALLYcacheTOCImages(){
      history=new Image();
      history.src="http://www.rageMTB.com/Images/buttons/history1.gif";

      lists=new Image();
      lists.src="http://www.rageMTB.com/Images/buttons/lists1.gif";

      maps=new Image();
      maps.src="http://www.rageMTB.com/Images/buttons/maps1.gif";

      photos=new Image();
      photos.src="http://www.rageMTB.com/Images/buttons/photos1.gif";

      archives=new Image();
      archives.src="http://www.rageMTB.com/Images/buttons/archives1.gif";

      bestof=new Image();
      bestof.src="http://www.rageMTB.com/Images/buttons/bestof1.gif";

      reviews=new Image();
      reviews.src="http://www.rageMTB.com/Images/buttons/reviews1.gif";

      misc=new Image();
      misc.src="http://www.rageMTB.com/Images/buttons/misc1.gif";

      links=new Image();
      links.src="http://www.rageMTB.com/Images/buttons/links1.gif";

      index=new Image();
      index.src="http://www.rageMTB.com/Images/buttons/index1.gif";

}

REALLYcacheTOCImages();

