function showObj(_o) { var _s=""; for(var i in _o) { _s+=i+"="+_o[i]+"
"; } var _x1=window.open(); _x1.document.open(); _x1.document.write(_s); _x1.document.close(); } /* Tree View Grid Properties & Functions */ var plusImage1 = "/trgm/images/down10_10.gif"; var minusImage1 = "/trgm/images/up10_10.gif"; var imageTagPrefix = "img"; var nodeSeparator = "."; var nodeHighlightColor = "#E2A800"; var nodeMouseOverColor = "#FFDA6A"; var n = 1; function Collapse1(Node) { objNode = document.getElementById(Node); objNode.style.backgroundColor=nodeHighlightColor; /* Get n'th child of Node */ objChildNode = document.getElementById(Node + nodeSeparator + n); /* Get image object of Node */ objImg = document.getElementById(imageTagPrefix + nodeSeparator + Node); /* Check if Child exists. If does not exist then Reset n = 1 & exit function & */ if(objChildNode != null) { /* Toggle the Child Status i.e. if visible then make it invisible & vis-versa */ if (objChildNode.style.display == "") { /* Close all the Childs, Sub-Childs and so on of the Node*/ if (objImg != null)objImg.src = plusImage1; closeAllChilds(Node) return; }else { objChildNode.style.display = ""; if (objImg != null)objImg.src = minusImage1; } /* Call Collapse for the Next Child be increamenting n*/ n = n + 1; Collapse1(Node); }else n = 1; } /*if p_direction = 0 then Close else Open*/ function ExplicitCollapse(Node,p_direction) { objNode = document.getElementById(Node); objNode.style.backgroundColor=""; objChildNode = document.getElementById(Node + nodeSeparator + n); objImg = document.getElementById(imageTagPrefix + nodeSeparator + Node); if(objChildNode != null) { if (p_direction == "0") { objChildNode.style.display = "none"; if (objImg != null)objImg.src = plusImage1; if(!closeAllChilds(objChildNode.id)) return false; }else { objChildNode.style.display = ""; if (objImg != null)objImg.src = minusImage1; } n = n + 1; ExplicitCollapse(Node,p_direction); }else n = 1; } /* Function to close all the childs of a Node As Each Child Node ID contains its Parent Node ID, Close all the rows having the Node ID as a prefix in their IDs. */ function closeAllChilds(nNode) { var tempNode,objTempNode,objNode,tempImg,objBody; objNode= document.getElementById(nNode); objNode.style.backgroundColor=""; /* Get the Parent Element of Node ie. the Table Object */ objTable = objNode.parentElement?objNode.parentElement:objNode.parentNode; var browserName=navigator.appName; if (browserName=="Microsoft Internet Explorer") { tagNm = objTable.tagName; }else { tagNm = "TBODY"; } /* Get the Parent Element is not a Table then exit function */ if(tagNm.toUpperCase() == "TBODY") { var nIndex = 1; /* For each TR of the Table*/ for(i=0;i= 0) if( tempNode == nNode + nodeSeparator + nIndex ) { objTempNode = document.getElementById(tempNode); tempImg = document.getElementById(imageTagPrefix + nodeSeparator + tempNode); if (tempImg != null)tempImg.src = plusImage1; objTempNode.style.display = "none"; objTempNode.style.backgroundColor=""; nIndex = nIndex + 1; } } } }else { alert("Table Tag not found"); return false; } return true; } /* Function to keep a Node open onLoad This function also opens up the corresponding Parent Nodes of that perticular Node */ function OpenNode(strNode,p_direction) { var objNode; var arrNode = strNode.split(nodeSeparator); var str = ""; for(i=0;i