<!--
//Refresh tree view

function refreshFrames(tblprefix,filename,startNode,mainMenu,manual) {
    // manual will let you pass in a object that should contain the following:
    // manual = [tf:'TopFrameLocation', mf:'MainFrameLocation', bf:'BottomFrameLocation']
    // JL 2006-12-15
    if(!manual) var manual = null;
    if(manual){
        if(manual.tf) top.frames.topFrame.location = manual.tf;
        if(manual.bf) top.frames.bottomFrame.location = manual.bf;
        if(manual.lf) top.frames.leftFrame.location = manual.lf;
        if(manual.mf) top.frames.mainFrame.location = manual.mf;
        return true;
    }

    top.frames.mainFrame.location = filename;
    // added functionality to check if this is coming from the main menu or not
    //   if it is undefined then refresh the tree -- otherwise dont - and it will get done in the main menu
    //   2006-09-01    -J-

    if(mainMenu == undefined){
	    refreshTree(tblprefix,filename,startNode,"");
    }
	refreshBanner(tblprefix,filename,startNode,"");
}

// Used with Main Menu only
function refreshFramesMM( tblprefix , filename , startNode , module , maxDepth ) {
//	top.frames.mainFrame.location.href = filename + "?root=" + startNode;
	top.frames.mainFrame.location.href =
        filename + "?eid=" + startNode.substr(1) + "&prefix=" + tblprefix + "&module=" + module;
	refreshTree(tblprefix,filename,startNode,maxDepth, module);
	refreshBanner( tblprefix , filename , startNode , module );
    refreshFooter();
}

function refreshTree(tblprefix,filename,rootNode,maxDepth,module,useOrgBy) {

	thisget = '';
	possibleargs = Array('prefix', 'context', 'root', 'max_depth', 'module', 'useOrgBy');
	for (x=0; x < arguments.length; x++)
	{
		if(arguments[x] && arguments[x].length){
			if(thisget.length){thisget += '&';}
			thisget += possibleargs[x] + '=' + arguments[x]; // encodeURIComponent()
		}
	}
	if(thisget.length){thisget = '?' + thisget;}
//    if (maxDepth == "") {
        top.frames.leftFrame.location =
        			"/tree/index.php" + thisget;
//?prefix=" + tblprefix + "&context=" + filename + "&root=" + rootNode;
//    } else {
//        top.frames.leftFrame.location.href =
//        			"tree/index.php?prefix=" + tblprefix + "&context=" + filename + "&root=" + rootNode + "&maxdepth=" + maxDepth;
//    }
}

function refreshBanner( tblprefix , filename , rootNode , module ) {
	//needs changed to reflect which module has been selected
	parent.topFrame.location = "/banner.php?prefix=" + tblprefix + "&context=" + filename + "&root=" + rootNode + "&module=" + module;
}

function refreshFooter() {
	//needs changed to reflect which module has been selected
	parent.bottomFrame.location = "/footer.php";
}

function logout(aPath) {
	var filename = "/modules/auth/login.php";
    top.frames.topFrame.location.href = aPath + "/banner.php?context=" + filename;
	top.frames.leftFrame.location.href = aPath + "/tree/index.php"
    top.frames.mainFrame.location.href = aPath + filename;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
//-->
