var mmenu=Array('news', 'iam', 'cv', 'games', 'gifts', 'photos', 'projs'), tm;
function SetMenuPos()
{
	var pos=0;
	if (window.innerHeight)
  	pos = window.pageYOffset;
	else if (document.documentElement && document.documentElement.scrollTop)
		pos = document.documentElement.scrollTop;
	else if (document.body)
  	pos = document.body.scrollTop;

	var mnu = document.getElementById('mmenu');
	mnu.style.top=pos+"px";

	var hints = document.getElementById('hints');
	hints.style.top=pos+"px";
}

function ShowBtn(num, image)
{
	var obj=document.getElementById(mmenu[num]);
	obj.src='img/menu/'+image;
	for(i=0;i<mmenu.length;i++)
	{
		obj=document.getElementById(mmenu[i]+'_hint');
		obj.style.visibility = ((i==num) ? 'visible' : 'hidden');
	}

	var hints = document.getElementById('hints');
	hints.style.left="53px";
}
function HideBtn(num, image)
{
	var obj=document.getElementById(mmenu[num]);
	obj.src='img/menu/'+image;
}

function HideAll()
{
	var hints = document.getElementById('hints');
	hints.style.left="-150px";
	tm='';
}

function WaitAll()
{
	tm=setTimeout('HideAll()', 1000);
}

// Note - SetMenuPos is depricated (using position:fixed to restrict position against browser window)
window.onscroll=SetMenuPos;
document.onscroll=SetMenuPos;
document.documentElement.onscroll=SetMenuPos;

