﻿//*****************************************  menu show and hide    ***************************************			
			
function ShowLeftSideItemMenu(ItemID)
{
	var Div = document.getElementById(ItemID);
	if (Div == null) { return false; }
	if ((Div.style.visibility != '')) { Div.style.visibility = ''; }
	Div.style.display = '';
}

function SLSIMF(ItemID,flag)
{
	var Div = document.getElementById(ItemID);
	if (Div == null) { return false; }
	if ((Div.style.visibility != '')) { Div.style.visibility = ''; }
	Div.style.display = '';
	document.getElementById(flag).value = 'v';
}

function HideLeftSideItemMenu(ItemID)
{
	var Div = document.getElementById(ItemID);
	if (Div == null) { return false; }
	if ((Div.style.visibility != '')) { Div.style.visibility = ''; }
	Div.style.display = 'none';
}

function TimerHide(trigger,ItemID)
{
	var trig = document.getElementById(trigger);
	if (trig.value == 'v') {return true;}
	var Div = document.getElementById(ItemID);
	if (Div == null) { return false; }
	if ((Div.style.visibility != '')) { Div.style.visibility = ''; }
	Div.style.display = 'none';
}

function HTDMOV(ItemMenu,flag)
{
    if ((document.getElementById(ItemMenu).style.visibility != '')) { document.getElementById(ItemMenu).style.visibility = ''; }
    document.getElementById(ItemMenu).style.display = '';
    document.getElementById(flag).value = 'v';
}

function SNM(MyMenu) 
{
    var otherMenus = MenuDelimitedIDS;
    var otherFlags = FlagDelimitedIDS;
    if (otherMenus.length > 0) 
    {
        var mids = otherMenus.split(',');
		var fids = otherFlags.split(',');
		for (i=0;i<mids.length;i = i+1)
		{
		    var theMenu = document.getElementById(mids[i]);
            var theFlag = document.getElementById(fids[i]);
			if (mids[i] != MyMenu)
			{
			    if (theMenu != null) 
                {
                    if ((theMenu.style.visibility != '')) { theMenu.style.visibility = ''; }
                    theMenu.style.display = 'none';
                }
				if (theFlag != null){theFlag.value = 'h';}
			}else{
			    if (theFlag.value == 'v')
			    {
			        if ((theMenu.style.visibility != '')) { theMenu.style.visibility = ''; }
			        theMenu.style.display = 'none';
			        theFlag.value = 'h';
			    }
			    else 
                {
                    if ((theMenu.style.visibility != '')) { theMenu.style.visibility = ''; }
                    theMenu.style.display = '';
                    theFlag.value = 'v';
                }
                //HTDMOV(mids[i],fids[i]);
            }
        }
    } else {
        var theMenu = document.getElementById(MyMenu);
        if ((theMenu.style.visibility != '')) { theMenu.style.visibility = ''; }
        theMenu.style.display = '';
    }
}

function HTDMO(ItemMenu,flag)
{
	setTimeout('TimerHide(\'' + flag + '\',\'' +  ItemMenu + '\');',1000);
	document.getElementById(flag).value = 'h';
}
function doError()
{
	var sdjflj = document.getElementById('asdasdsad');
	sdjflj.value = 'asd';
}


