/* ********************************************************************************************
// This section creates the site structure node array. It uses navmap to get the complete list of
// nodes on the site structure. This code also calculates the parent of each node. The parent is not
// available by default.
// ************************************************************************************************ */

/* CODING NOT COMPRESS TOGETHER YET
// Add the site structure node to the array, and give it the default parent of 0
nodeList[i] = new Node($node.assetid,"$node.description","$node.absurl",$node.level,$node.children, 0);
if ($node.level != 1) {				// If this node is not the top level, look for it's parent.
	for(p = i - 1; p > 0; p--) {		// Search up the site structure node list.
		if (nodeList[p].children > 0) {	// If the node has children, you have found the parent
			nodeList[p].children--;	// Decrease its number of children
			break;			// Stop looking for the parent
		}
	}
	nodeList[i].parent = nodeList[p].id;	// Set the parent asset id
}
i++;
*/

nodeList[i]=new Node(4329,"Institutes","/Departments/institutes/index.html",1,5,0);if(1!=1){for(p=i-1;p>0;p--){if(nodeList[p].children>0){nodeList[p].children--;break;}}nodeList[i].parent=nodeList[p].id;}i++;
nodeList[i]=new Node(4296,"Bioethics","/Departments/institutes/bioethics/index.html",2,0,0);if(2!=1){for(p=i-1;p>0;p--){if(nodeList[p].children>0){nodeList[p].children--;break;}}nodeList[i].parent=nodeList[p].id;}i++;
nodeList[i]=new Node(4315,"Financial Leadership","/Departments/institutes/financialleadership/index.html",2,0,0);if(2!=1){for(p=i-1;p>0;p--){if(nodeList[p].children>0){nodeList[p].children--;break;}}nodeList[i].parent=nodeList[p].id;}i++;
nodeList[i]=new Node(4298,"Urban Education","/Departments/institutes/urbaneducation/index.html",2,0,0);if(2!=1){for(p=i-1;p>0;p--){if(nodeList[p].children>0){nodeList[p].children--;break;}}nodeList[i].parent=nodeList[p].id;}i++;
nodeList[i]=new Node(4292,"Womens Leadership","/Departments/institutes/womensleadership/index.html",2,0,0);if(2!=1){for(p=i-1;p>0;p--){if(nodeList[p].children>0){nodeList[p].children--;break;}}nodeList[i].parent=nodeList[p].id;}i++;
 
