function findObj(n, d) 
{
	var p,i,x;  
	if(!d) d=document; 
  		
	if(!(x=d[n])&&d.all) 
	x=d.all[n]; 
		
	return x;
}			
	
function showHideLayers() 
{
	var i,p,v,obj,args=showHideLayers.arguments;
	for (i=0; i<(args.length-1); i+=2) 
	{
		obj=findObj(args[i]);
		obj=obj.style;
		v=args[i+1];
		v=(v=='show')?'visible':(v='hide')?'hidden':v; 
   		obj.visibility=v;
	}
}		

function do_help()
{
	window.open('../Help/Introduce.aspx','post','resizable=yes,width=790,height=720,scrollbars=2');
}

function resizeFrame(iframeObj)
{
//	var iframeObj = document.getElementById('ContentHtmlArea_ContentHtmlArea');
	var innerBody = iframeObj.contentWindow.document.body;
	var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
	var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
	iframeObj.style.height = innerHeight;
//	iframeObj.style.width = innerWidth;
}

//  TreeMenu Start
var ctrl_selitem = null;

function selected_levelitem(ctrl)
{
    if(ctrl_selitem != ctrl)
    {
        if(ctrl_selitem != null)
        {
            ctrl_selitem.style.fontWeight = "";
            ctrl.style.fontWeight = "bold";
        }
    
        ctrl_selitem = ctrl;

        obj=document.getElementById('MemberTree_OrganizationPanel');
        if(obj != null)
        {
            obj.style.display = "none";
        
            window.parent.resizeNavigator();
        }
    }
}
