/*
Script by Jarrod Page
   ------   Copyright 2008   ------
*/








//set some stuff
menus = 4;
start = -23;
end = -12;
jump = 1;
time = 10;
mouseon = false;

function scrollopen(menu)
	{
	mymenu = menu;
	curpos = parseInt(document.getElementById(mymenu).style.top);
	//alert('opening: ' + curpos);
	if (curpos < end && mouseon == true) //&& navigator.userAgent.indexOf("Opera") == -1)
		{
		newpos = curpos + jump;
		document.getElementById(mymenu).style.top = newpos+'px';
		setTimeout("scrollopen(mymenu);",time);
		}
	}

function Escrollshut(menu)
	{
	themenu = menu;
	setTimeout("doscrollshut(themenu);",1000);
	}

function scrollshut(menu)
	{
	mymenu = menu;
	curpos = parseInt(document.getElementById(mymenu).style.top);
	//alert('closing: ' + curpos);
	if (curpos > start && mouseon == false)
		{
		newpos = curpos - jump;
		document.getElementById(mymenu).style.top = newpos+'px';
		setTimeout("scrollshut(mymenu);",time);
		}
	}

function closemenus()
	{
	for (i = 1; i <= menus; i ++)
		{
		//alert('closing ' + i);
		document.getElementById('menu'+i).style.top = start+'px';
		}
	}