// JavaScript Document
var MenuclipTop = 0;
var MenuclipWidth = 228; 
var MenuclipBottom = 120;
var Menutopper = 10;
var Menulyrheight = 0;

var time,amount,theTime,theHeight,DHTML;

function Menuinit()
{
	DHTML = (document.getElementById || document.all || document.layers)
	if (!DHTML) return;
	var x = new getObj('rnb');
	if (document.layers)		/* NS4 */
	{
		Menulyrheight = x.style.clip.bottom;
		Menulyrheight += 20;
		MenuclipWidth = x.obj.document.width;
		x.style.clip.top = MenuclipTop;
		x.style.clip.left = 0;
		x.style.clip.right = MenuclipWidth;
		x.style.clip.bottom = MenuclipBottom;
	}
	else if (document.getElementById || document.all)	/* other */
	{
		Menulyrheight = x.obj.offsetHeight;
		MenuclipWidth = x.obj.offsetWidth;
		x.style.clip = 'rect('+MenuclipTop+'px,'+MenuclipWidth+'px,'+MenuclipBottom+'px,0)';
		x.style.clip.top = MenuclipTop;
		x.style.clip.left = 0;
		x.style.clip.right = MenuclipWidth;
		x.style.clip.bottom = MenuclipBottom;
	}
}

function Menuscrollayer(layername,amt,tim)
{
	if (!DHTML) return;
	thelayer = new getObj(layername);
	if (!thelayer) return;
	amount = amt;
	theTime = tim;
	Menurealscroll();
}

function Menurealscroll()
{
	if (!DHTML) return;
	MenuclipTop += amount;
	MenuclipBottom += amount;
	Menutopper -= amount;
	if (MenuclipTop < 0 || MenuclipBottom > Menulyrheight)
	{
		MenuclipTop -= amount;
		MenuclipBottom -= amount;
		Menutopper += amount;
		return;
	}
	if (document.getElementById || document.all)
	{
		clipstring = 'rect('+MenuclipTop+'px,'+MenuclipWidth+'px,'+MenuclipBottom+'px,0)';
		thelayer.style.clip = clipstring;
		thelayer.style.top = Menutopper + 'px';
	}
	else if (document.layers)
	{
		thelayer.style.clip.top = MenuclipTop;
		thelayer.style.clip.bottom = MenuclipBottom;
		thelayer.style.top = Menutopper;
	}
	time = setTimeout('Menurealscroll()',theTime);
}

function MenustopScroll()
{
	if (time) clearTimeout(time);
}

function MenushowControls()
{
	if (!DHTML) return;
	var c = new getObj('lMenuyrctrl');
	if (Menulyrheight > MenuclipBottom )
	{
		c.style.visibility = 'visible';
	}
	else {
		c.style.hisibility = 'hidden';
	}

}

//-->
