
visibleTime = 800;
activeMenu = null;
timer = null;
function show( id )
{
	var menu = getMenu( id );
	if( activeMenu == menu )
		return clearTimer();
	if( activeMenu != null )
		hideMenu( activeMenu.id );
	if( menu == null )
		return;
	menu.className = "submenuVisible";
	activeMenu = menu;
}
function startHideTimer( id )
{
	timer = window.setTimeout( "hideMenu('" + id + "')", visibleTime );
}
function hideMenu( id )
{
	if( activeMenu == null )
		return;
	activeMenu.className = "submenu";
	activeMenu = null;
	clearTimer();
}
function getMenu( id )
{
	return document.getElementById( id.indexOf( "sub" ) == -1 ? "sub" + id : id );
}
function clearTimer()
{
	window.clearTimeout( timer );
	timer = null;
}

function deleteThread(threadId, name)
{
	if (confirm("Wollen Sie wirklich den Thread \"" + name + "\" l\u00F6schen?"))	
	{
		f = document.getElementById("form1");
		f.action = "forum_work.asp?task=deleteThread&threadId=" + threadId;
		f.submit();
	}
}

