function CollapseMenu(obj, subobj)
{
	if(document.getElementById)
	{
	    var el = document.getElementById(obj);
	    if ((el != undefined) && (el != null))
	    var ar = el.getElementsByTagName("tr"); 
	    for (var i=0; i<ar.length; i++)
	    {
		    if (ar[i].className!=null && ar[i].className!='')
		    {
		        if (subobj == ar[i].className)
                    ar[i].style.display = '';
		        else
                    ar[i].style.display = "none";
 		    }
 		    else 
 		    {
	            var ars = ar[i].getElementsByTagName("td");
	            if (ars.length > 0)
	            {
                    imgtag = ars[0].getElementsByTagName("img");
                    if (imgtag.length > 0)
                    {
                        if (imgtag[0].className==subobj)
                        {
                            var imgArrowDown = new Image();     // Active images
                            imgArrowDown.src = g_imgArrowDown.src;
                            imgArrowDown.alt = g_imgArrowDown.alt;
                            imgArrowDown.border = g_imgArrowDown.border;
                            imgArrowDown.className = imgtag[0].className;
                            ars[0].replaceChild(imgArrowDown, imgtag[0]);
                        }
                        else if (imgtag[0].className && (imgtag[0].className.substring(3, 0) == "sub"))
                        {
                            var imgArrowRight = new Image();    // Inactive images
                            imgArrowRight.src = g_imgArrowRight.src;  
                            imgArrowRight.alt = g_imgArrowRight.alt;
                            imgArrowRight.border = g_imgArrowRight.border;
	                        imgArrowRight.className = imgtag[0].className;
                            ars[0].replaceChild(imgArrowRight, imgtag[0]);
                        }
                    }
                }
 		    }
	    }

	}
}


