
timer = new Array();
function showMenu(id,level,off,id2)
{
	
	if (timer[id]) clearTimeout(timer[id])
	if (off==1 && level!=1)
		timer[id] = setTimeout('showMenu(\''+id+'\','+level+',2,\''+id2+'\')',100);
	else if (off==2 || (level==1 && off==1)) $('#m'+level+id).hide(); 
	else
	{	
		if (level==1)
		{
			$('#m1'+id).css('margin-top',-19);
			$('#m1'+id).css('margin-left',+$('#menu').width()-$('#a'+id).width()-$('#m1'+id).width()-60);
		}
	
		else if (level==3)
		{
			$('#m3'+id).css('margin-top',-$('#a2'+id).height()-27);
			$('#m3'+id).css('margin-left',203);
		}	
		else if (level==4)
		{
			$('#m4'+id).css('margin-top',-$('#a3'+id).height()-30);
			$('#m4'+id).css('margin-left',$('#m3'+id2).width()+13);
		}

		if ($('#m'+level+id).width()>200)
		{
			$('#m'+level+id).css('white-space','normal');
			$('#m'+level+id).width(200);
		}

		$('#m'+level+id).show();
	}
}

function fPage(id)
{
	for(i=1;i<5;i++)
	{
		if (i==id)
		{
			$("#page"+i).show();		
			$("#a"+i).addClass('psel');			
		}
		else
		{
			$("#page"+i).hide();		
			$("#a"+i).removeClass('psel');	
		}
	}
}

