var links = new Array (
  "home",
  "club_info",
  "events",
  "news",
  "distributor",
  "guestbook",
  "forum",
  "mycar",
  "contact",
  "admin"
 );

var links_text = new Array (
  "Home",
  "Club Info",
  "Motoring 'round",
  "In the News",
  "The Distibutor",
  "The Guestbook",
  "The Forum",
  "Me and My Car",
  "Contact Us",
  "Links"
 );

var links_url = new Array (
  "../home/",
  "../club_info/",
  "../events/",
  "../news/",
  "../distributor/",
  "../guestbook/",
  "../forum/",
  "../mycar/",
  "../contact/",
  "../links/"
 );

var links_desc = new Array (
  "The Home Page",
  "Contact and Membership details of the club",
  "Details of Upcoming Club Events",
  "The club in the news",
  "The Distributor - Club Newsletter",
  "Leave your details in our Guestbook",
  "Discussion forum for all things 48 & FJ",
  "Club Members and their cars",
  "Contact Us",
  "Links to associates of the club"
 );


var loc=String(this.location);
var temp=new Array();
temp=loc.split("/");
loc=temp[4];


function desc_on(html){
  html = '&raquo;&nbsp;' + html
  if (document.getElementById)
    document.getElementById("boxdescription").innerHTML=html
  else
    boxdescription.innerHTML=html
}

function desc_off(){
  if (document.getElementById)
    document.getElementById("boxdescription").innerHTML='&raquo;&nbsp;'
  else
    boxdescription.innerHTML='&raquo;&nbsp;'
}

function menu_generate()
{
  document.write('<table cellspacing=2 cellpadding=0 align=center width=100%><tr>');
  for(var i=0; i<links.length; i++)
  {
    if(loc==links[i])
    {
      document.write('<td class="explorer_active" onmouseover="this.className=&#39;explorer_active&#39;;desc_on(&#39;' + links_desc[i] + '&#39;);return true" onmouseout="this.className=&#39;explorer_active&#39;;desc_off();return true" onmousedown="this.className=&#39;explorer_active&#39;;return true" onclick="location.href=&#39;' + links_url[i] + '&#39;"><a href="' + links_url[i] + '" class="menu">' + links_text[i] + '</a></td>');
    }
    else
    {
     document.write('<td class="explorer" onmouseover="this.className=&#39;explorer_over&#39;;desc_on(&#39;' + links_desc[i] + '&#39;);return true" onmouseout="this.className=&#39;explorer&#39;;desc_off();return true" onmousedown="this.className=&#39;explorer_down&#39;;return true" onclick="location.href=&#39;' + links_url[i] + '&#39;"><a href="' + links_url[i] + '" class="menu">' + links_text[i] + '</a></td>');
    }
   }
  document.write('</tr><tr><td colspan=6 valign=top><font id="boxdescription">&raquo;&nbsp;</font></td>');

} 

menu_generate();
