/* The link details */
var links = new Array ("index", "gamemaker", "links");
var links_text = new Array("Home", "Game Maker", "Links");
var links_url = new Array("index.html", "gamemaker.html", "links.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 dyn_menu_gen()
{
  document.write('<table width="100%" frame="hsides" rules="none" bordercolor="#025FA4" bgcolor="#A7D9FE" cellspacing="0" cellpadding="5"><tr><td align="right"><font size="2" face="arial black">');

  for(var i=0; i<links.length; i++)
  {
    if(loc=="screenshots" || loc=="games") {loc="gamemaker";}
    if(loc==links[i])
    {
      document.write('<font class="top_menu_active">' + links_text[i] + '</font>');
    }
    else
    {
      document.write('<a href="' + links_url[i] + '" class="top_menu" onmouseover="this.className=\'top_menu_over\';return true" onmouseout="this.className=\'top_menu\';return true" >' + links_text[i] + '</a>');
    }
    if(i < links.length - 1) {document.write('<font color="#025FA4"> | </font>');}
  }
  document.write('</font></td><td width="10"></td></tr></table>');
}

/* Generate the menu */
dyn_menu_gen();
