/* The link details */
var links = new Array ("gamemaker", "games", "screenshots");
var links_text = new Array ("Info", "Games", "Screenshots");
var links_url = new Array ("gamemaker.html", "games.html", "screenshots.html");

/* Resolve the location */
var loc=String(this.location);
loc=loc.split("/");
loc=loc[loc.length-1].split(".");
loc=loc[loc.length-2];

/* Menu generating function */
function game_menu_gen()
{
  document.write('[ ');

  for(var i=0; i <links.length; i++)
  {
    if(loc==links[i])
    {
      document.write('<font class="game_menu_active">' + links_text[i] + '</font>');
    }
    else
    {
      document.write('<a href="' + links_url[i] + '" class="game_menu_inactive" onmouseover="this.className=\'game_menu_over\';return true" onmouseout="this.className=\'game_menu_inactive\';return true" >' + links_text[i] + '</a>');
    }
    if(i < links.length - 1) {document.write(' | ');}
  }
  document.write(' ]');
}

/* Generate the menu */
game_menu_gen();