function showMainBg(obj)
{
	obj.parentNode.style.backgroundImage='url(images/menu_main_bg.jpg)';
	obj.parentNode.lastChild.style.backgroundImage='url(images/menu_arrow_R_w.png)';	
}
function hideMailBg(obj)
{
	obj.parentNode.style.backgroundImage='';
	if(obj.parentNode.parentNode.parentNode.childNodes.length>1)
	{
		if(obj.parentNode.parentNode.parentNode.lastChild.style.display=='none')
		{
			obj.parentNode.lastChild.style.backgroundImage='url(images/menu_arrow_R_w.png)';
		}
		else
		{
			obj.parentNode.lastChild.style.backgroundImage='url(images/menu_arrow_d.jpg)';
		}		
	}
}
function checkSubMenu(obj)
{
	if(obj.parentNode.parentNode.parentNode.childNodes.length>1)
	{
		if(obj.parentNode.parentNode.parentNode.lastChild.style.display=='none')
		{
			obj.parentNode.parentNode.parentNode.lastChild.style.display='';
		}
		else
		{
			obj.parentNode.parentNode.parentNode.lastChild.style.display='none';			
		}
	}
	checkHeight();
}
function showSubArrow(obj)
{
	obj.parentNode.lastChild.style.backgroundImage='url(images/menu_arrow_R_b.jpg)';
}
function hideSubArrow(obj)
{
	obj.parentNode.lastChild.style.backgroundImage='';
}
function checkThirdMenu(obj)
{
	if(obj.parentNode.parentNode.childNodes.length>1)
	{
		if(obj.parentNode.parentNode.lastChild.style.display=='none')
		{
			obj.parentNode.parentNode.lastChild.style.display='';
		}
		else
		{
			obj.parentNode.parentNode.lastChild.style.display='none';			
		}
	}	
	checkHeight();
}
function checkHeight()
{
	if(document.getElementById('secondary').clientHeight>defaultHeight)
	{
		document.getElementById('primary').style.height=(document.getElementById('secondary').clientHeight+50);
	}
	else
	{
		document.getElementById('primary').style.height=defaultHeight;
	}	
}
var defaultHeight;
function setDefaultHeight()
{
	defaultHeight=document.getElementById('primary').clientHeight;	
	checkHeight();
}
