// JavaScript Document

var inmenu=false;
var lastmenu=0;

function LSmenu ( current )
{
	if ( ! document.getElementById ) return;
	
	inmenu = true;
	oldmenu = lastmenu;
	lastmenu = current;
	
	if ( oldmenu ) LSerase ( oldmenu );
	
	m = document.getElementById ( current + "-lsmenu" );
	box = document.getElementById ( current );
//	box.style.left = m.offsetLeft;
//	box.style.top = m.offsetTop + m.offsetHeight;
	box.style.visibility = "visible";
	box.style.backgroundColor = "#FBFBFB";
	box.style.width = "180px";
	
}

function LSerase ( current )
{
	if ( !document.getElementById ) return;
	
	if ( inmenu && lastmenu == current )
	{
		return;
	}
	
	box = document.getElementById ( current );
	box.style.visibility = "hidden";

}

function LStimeout ( current )
{
	inmenu = false;
	window.setTimeout ( "LSerase ('" + current + "' );", 500 );
}

function LShighlight ( menu, item )
{
	if ( !document.getElementById ) return;
	
	inmenu = true;
	lastmenu = menu;
	obj = document.getElementById ( item );
	obj.style.backgroundColor = "#F4F4F4";
}

function LSunhighlight ( menu, item )
{
	if ( !document.getElementById ) return;
	
	LStimeout ( menu );
	obj = document.getElementById ( item );
	obj.style.backgroundColor = "#FBFBFB";
}