i = 0;
var pagetab = new Array();
var linktab = new Array();

var ICONS = 0;
var ABOUT = 2;
var EOS = 3;
var GAME = 4;
var M2000 = 6;
var H2002 = 7;
var NY2004 = 8;
var B2006 = 9;



pagetab[i]='Start Page';linktab[i]='index.html';i++;
pagetab[i]='--------------------------------';linktab[i]='-';i++;
pagetab[i]='About ...';linktab[i]='about/index.html';i++;
pagetab[i]='Energy Of Slaves';linktab[i]='eos/index.html';i++;
pagetab[i]='The Favorite Game';linktab[i]='game/index.html';i++;
pagetab[i]='--------------------------------';linktab[i]='-';i++;
pagetab[i]='Montreal 2000';linktab[i]='montreal/index.html';i++;
pagetab[i]='Hydra 2002';linktab[i]='hydra/index.html';i++;
pagetab[i]='New York 2004';linktab[i]='ny/index.html';i++;
pagetab[i]='Berlin 2006';linktab[i]='berlin/index.html';i++;


maxPages = i;

showPages();

function showPages()
{
	for (i=0;i<pagetab.length;i++)
	{
   		  aSelect = document.getElementById("selectPage");
    	  anOption = document.createElement("option");
		  anOption.value = linktab[i];
		  aText = document.createTextNode(pagetab[i]);
		  anOption.appendChild(aText);	   	
		  aSelect.appendChild(anOption);
	}
}

function showPage()
{

   myPageIndex = document.getElementById("selectPage").selectedIndex;

   document.getElementById("mainForm").action= "../" + linktab[myPageIndex];
   document.getElementById("mainForm").submit();
}

function previousPage()
{
   myPageIndex = document.getElementById("selectPage").selectedIndex;

   myPageIndex--;
   if (myPageIndex < 0) myPageIndex = maxPages - 1;

   document.getElementById("selectPage").selectedIndex = myPageIndex;
   if (linktab[myPageIndex] == "-") previousPage();
   else showPage();  
}

function nextPage()
{
   myPageIndex = document.getElementById("selectPage").selectedIndex;
   myPageIndex++;
   if (myPageIndex > (maxPages - 1)) myPageIndex = 0;
   document.getElementById("selectPage").selectedIndex = myPageIndex;
   if (linktab[myPageIndex] == "-") nextPage();
   else showPage();
}

function goMain()
{
   document.getElementById("mainForm").submit();
}
