function ExpandMenu(j,Sgn,SubNum)
{
	for (i=21;i<=28;i++)
	{
		try
		{
		    if (i!=j)
			{
				document.getElementById('imgL'+i).src = 'images/but_plus.gif';
				shrinkMenu(i,2,1);			
			}
		}
		catch(e)
		{}
	}
    if (document.getElementById('divL'+j).style.display=='block')
    {
	    document.getElementById('imgL'+j).src = 'images/but_plus.gif';
	    shrinkMenu(j,2,1);
    }
    else 
    {
	    document.getElementById('imgL'+j).src = 'images/but_minus.gif';
	    if (eval(SubNum)==1)
	    {
		    expandMenu(j,2,(eval(SubNum) * 29) + 1 + eval(SubNum)- 4);
	    }
	    else
	    {
	        expandMenu(j,2,(eval(SubNum) * 27) + 1 + eval(SubNum)- 4);
	    }
    }
}

function expandMenu(victim, factor, reach)
{  
    document.getElementById('divL'+victim).style.display='block';
	if (parseInt(document.getElementById('divL'+victim).style.height)==reach)
	{
	    clearTimeout(expandMove);
		flag=false;
	}
	else
	{
		flag=true;
		document.getElementById('divL'+victim).style.height =parseInt(document.getElementById('divL'+victim).style.height) + parseInt(factor);
		expandMove = window.setTimeout("expandMenu('" + victim + "'," + factor + " ," + reach + ");",0.00000000000000000000000000000000000000000000000000000000000000001);
	}
}

function shrinkMenu(victim,factor, reach)
{
	if (parseInt(document.getElementById('divL'+victim).style.height)==reach)
	{
	    clearTimeout(shrinkMove);
	    document.getElementById('divL'+victim).style.overflow='hidden';
	    document.getElementById('divL'+victim).style.display='none';
	}
	else
	{
	    document.getElementById('divL'+victim).style.height = parseInt(document.getElementById('divL'+victim).style.height) - parseInt(factor);
	    var shrinkMove = window.setTimeout("shrinkMenu('" + victim + "'," + factor + " ," + reach + ");",0.000000000000000000000000000000000000000000000000000000000000000001);
	}
}

function openMenu(j, SubNum)
{
	try
	{
	    document.getElementById('imgL'+j).src = 'images/but_minus.gif';
	    document.getElementById('divL'+j).style.display = 'block';
	    
	    if (eval(SubNum)==1)
		    height = ((eval(SubNum) * 29) + 1 + eval(SubNum)- 4);
	    else
	        height = ((eval(SubNum) * 27) + 1 + eval(SubNum)- 4);
	    
	    document.getElementById('divL'+j).style.height = height;
    }
	catch(e)
	{}
}

function ShowSubs(child)
{
	for (i=21;i<=28;i++)
	{
		try
		{
			document.getElementById("divL"+i).style.display='none';
		}
		catch(e)
		{}
	}

	try
	{
		if (document.getElementById("divL"+child).style.display=='none')
		{
		    document.getElementById("divL"+child).style.display='block';
		}
		else
		{
		    document.getElementById("divL"+child).style.display="none";
		}
	}
   	catch(e)
	{}
}

