function ecsexpandmenu(menuid)
{
	Element.show('ecscollapseicon'+menuid);
	Element.hide('ecsexpandicon'+menuid);
//	Element.show('ecsmenu'+menuid);
	Effect.BlindDown('ecsmenu'+menuid, {duration:0.5});
}


function ecscollapsemenu(menuid)
{
	Element.hide('ecscollapseicon'+menuid);
	Element.show('ecsexpandicon'+menuid);
	Effect.BlindUp('ecsmenu'+menuid, {duration:0.5});
//	Element.hide('ecsmenu'+menuid);
}









var scrolling = 0;	// Controls whether the layer is scrolling or not
var yT = 5;	// Pixel position the top of the scrolling layer should be set to
var lT = 5;	// Initial position for the top of the layer
var yI = 15;	// Increment that the scrolling layer should move at
var yH = 0;	// Hight of scrollling layer
var scroll_object = null;	// Stores the generic DOM for the scrolling layer to access style properties

function startScroll(objectID,direction) 
{
	scroll_object = $(objectID);
	scrolling = 1;
	scroll(direction);
}

function scroll(direction) 
{
	if (scrolling == 1) 
	{
		if(direction == 1)
		{
			yT = yT + yI;
			scroll_object.scrollTop = yT;
			if(scroll_object.scrollTop < yT)
			{
			  yT = scroll_object.scrollTop;
			  scolling = 0;
			}
		}
		else
			{
				yT -= yI;
				scroll_object.scrollTop = yT;
				if(scroll_object.scrollTop > yT)
				{
				  yT = scroll_object.scrollTop;
				  scolling = 0;
				}
			}
		code2run = 'scroll('+ direction + ')';
		setTimeout(code2run,0);
	}
	return false;
}

function stopScroll() 
{
	scrolling = 0;
	return false;
}
