//start the menu building
if(document.all)
document.write('<div id="slidemenu2" style="left:-139" onMouseover="slide()" onMouseout="paintmenu()">');
else
document.write('<layer id="slidemenu" onMouseover="slide()" onMouseout="paintmenu()">');

//used for window resizing
function repaint()
{
	window.location.reload();
}
function repaint2()
{
	if (document.layers)
	setTimeout("window.onresize=repaint",400);
}
window.onload=repaint2;

//fill the menu with our links
function fillmenu()
{
	var array1=new Array();
	var array1links=new Array();
	var array2=new Array();
	var array2links=new Array();
	var array3=new Array();
	var array3links=new Array();
	var array4=new Array();
	var array4links=new Array();
	
	array1[0]="Seekers Home";
	array1[1]="News & Events";
	array1[2]="Games";
	array1links[0]="http://seekers.arilye.com/index.html";
	array1links[1]="http://seekers.arilye.com/news.html";
	array1links[2]="http://seekers.arilye.com/games/index.html";
	
	array2[0]="Who are we?";	
	array2[1]="Honored Seekers";
	array2[2]="Active Seekers";
	array2links[0]="http://seekers.arilye.com/allegiance/index.html";
	array2links[1]="http://seekers.arilye.com/seekers/HonoredSeekers.html";
	array2links[2]="http://seekers.arilye.com/allegiance/ActiveSeekers.html";
	
	array3[0]="Seeker Tales";
	array3[1]="Photo Album";
	array3[2]="Dereth Guides";
	array3[3]="Related Links";
	array3links[0]="http://seekers.arilye.com/tales/index.html";
	array3links[1]="http://seekers.arilye.com/photos/index.html";
	array3links[2]="http://seekers.arilye.com/guides/index.html";
	array3links[3]="http://seekers.arilye.com/links.html";


	document.write('<div align="center"><center><table border="0" cellpadding="0" cellspacing="0" width="180"><tr><td align="center" valign="top"><center><table bgcolor="#000033" border="0" cellpadding="0" cellspacing="0" width="140"><tr><td valign="top" colspan="3"><img src="http://seekers.arilye.com/images/MenuTop.gif" width="140" height="6" border="0"></td></tr><tr><td width="5" background="http://seekers.arilye.com/images/MenuBody.gif">&nbsp;</td><td width="130"><table bgcolor="#000033" border="0" cellpadding="0" cellspacing="0" width="130"><tr><td class="TableH" align="center">General</td></tr>');
	
	for (i=0;i<=array1.length-1;i++)
	document.write('<tr><td align="center"><a href='+array1links[i]+'>'+array1[i]+'</a></td></tr>');
	
	document.write('<tr><td class="TableH" align="center">The Seekers</td></tr>');
	for (i=0;i<=array2.length-1;i++)
	document.write('<tr><td align="center"><a href='+array2links[i]+'>'+array2[i]+'</a></td></tr>');
	
	document.write('<tr><td class="TableH" align="center">Dereth</td></tr>');
	for (i=0;i<=array3.length-1;i++)
	document.write('<tr><td align="center"><a href='+array3links[i]+'>'+array3[i]+'</a></td></tr>');
	
	document.write('</table></td><td width="5" background="http://seekers.arilye.com/images/MenuBody.gif">&nbsp;</td></tr><tr><td valign="top" colspan="3"><img src="http://seekers.arilye.com/images/MenuBottom.gif" width="140" height="6"></td></tr></table></center></td><td valign="top"><img src="http://seekers.arilye.com/images/MenuTitle.gif" width="40" height="230" alt="[Seekers Menu]" border="0"></td></tr></table></center></div>');
	
}

//Used when the surfer scrolls the page
function menuscroll()
{
	themenu.top=document.body.scrollTop;
}
function menuscroll2()
{
	themenu.top=pageYOffset;
}

//finish the menu, close it, and set it's properties
if (document.all)
{
	fillmenu();
	document.write('</div>');
	themenu=document.all.slidemenu2.style;
	rightboundary=0;
	leftboundary=-139;
	window.onscroll=menuscroll;
}
else
{
	fillmenu();
	document.write('</layer>');
	themenu=document.layers.slidemenu;
 	themenu.top=0;
	themenu.left=0;
	rightboundary=139;
	leftboundary=0;
	setInterval("menuscroll2()",2500)
}

//moving the menu back and forth
function slide()
{
	if (window.paintmenuit)
	clearInterval(paintmenuit);
	slideit=setInterval("slideengine()",10);
}

function paintmenu()
{
	clearInterval(slideit);
	paintmenuit=setInterval("paintengine()",10);
}

function slideengine()
{
	if (document.all&&themenu.pixelLeft<rightboundary)
	themenu.pixelLeft=0;
	else if(document.layers&&themenu.left<rightboundary)
	themenu.left+=10;
	else if (window.slideit)
	clearInterval(slideit);
}

function paintengine()
{
	if (document.all&&themenu.pixelLeft>leftboundary)
	themenu.pixelLeft=-140;
	else if(document.layers&&themenu.left>leftboundary)
	themenu.left-=10;
	else if (window.paintmenuit)
	clearInterval(paintmenuit);
}
