//COPYRIGHT QRUSH TECHNOLOGIES, DO NOT COPY, EDIT, OR DISTRIBUTE
var counter=0;
function ExpandItSlowly(length)
{
	if(length<ExpandTo)
	{
		length+=ExpandPerTick;
		document.Spotlight.height=length;
		counter = setTimeout("ExpandItSlowly("+length+")", 1);
		return;
	}
	document.Spotlight.height=ExpandTo;
}

function ShrinkItSlowly(length)
{
	if(length>SpotHeight)
	{
		length-=ShrinkPerTick;
		document.Spotlight.height=length;
		counter = setTimeout("ShrinkItSlowly("+length+")", 1);
		return;
	}
	else
		document.Spotlight.GotoFrame(RestartMenuFrame);

	counter=0;
}


function Spotlight_DoFSCommand(command, args)
{
	if(command=="ExpandIt")
	{
		if(counter!=0)
			clearTimeout(counter);
		document.Spotlight.GotoFrame(MenuExpandedFrame);
		counter = setTimeout("ExpandItSlowly("+document.Spotlight.height+")", 2);
	}
	else
	{
		if(counter!=0)
			clearTimeout(counter);
		counter = setTimeout("ShrinkItSlowly("+document.Spotlight.height+")", 2);
	}
}