
function CollapseAll(root,id)
{
  var node=$(root);
  var action='hide';
  var img;
	if(node) //make sure the node exists
	{
	    var l = node.childNodes.length;
		for(var x = l - 1; x >= 0; x--) //delete all of node's children
		{
			var childNode = node.childNodes[x];
			img =null;			
			if(childNode.nodeName && childNode.nodeName=='DIV')
			{
				if(id && childNode.id==id)
				{
					action='show';
					$(id+'_img').src='images/collapse.gif';
				}
				else
				{
					action='hide';
					$(childNode.id+'_img').src='images/expand.gif';
				}
				if(childNode.hasChildNodes())
				{
				    var _l =childNode.childNodes.length;
					for(var y = _l - 1; y >= 0; y--) //delete all of node's children
					{
						var cc = childNode.childNodes[y];
						
						if(cc.nodeName && cc.nodeName=='IMG')
						{
							img=cc;
						}
						
						if(cc.nodeName && cc.nodeName=='A')
						{
							if(action=='show'){cc.style.display='block';}else{cc.style.display='none';}
						}
					}
				}
			}
		}
	}
}
function Go(url)
{
$('Content_Api').src=url;
}

function Expand(ele)
{
	CollapseAll(ele.parentNode.id,ele.id);
}