
var TREE_CUBES = [
	['OIRP Home', 'http://oirp.carleton.ca/version2/', null,
		['Multi-dimensional Data Cubes', null, {'tt' : 'A data cube is a multi-dimensional representation of data which provides fast retrieval and drill down facilities.'},    
          	      ['&nbsp;All Cubes - Carleton University Internal', 'http://oirp.carleton.ca/WDSI.php', {'tt': 'This selection requires the user to have a Carleton \'CUNET\' account. A Username and Password prompt may occur on the next screen - for Username enter cunet\\your-cunet-account-name for example, cunet\\herbgray .(The user does not need to be logged on to the Carleton network to use to this option, however, access from some browsers in non-windows environments may be limited).','i0' : 'icons/lock.gif', 'i4' : 'icons/lock.gif', 'i8' : 'icons/lock.gif', 'i12' : 'icons/lock.gif', 'i64' : 'icons/lock.gif', 'i68' : 'icons/lock.gif', 'i72' : 'icons/lock.gif', 'i76' : 'icons/lock.gif'}],                            
                      ['&nbsp;Public Access', 'http://opas2.carleton.ca/WDSP/', {'i0' : 'icons/forward.gif', 'i4' : 'icons/forward.gif', 'i8' : 'icons/forward.gif', 'i12' : 'icons/forward.gif', 'i64' : 'icons/forward.gif', 'i68' : 'icons/forward.gif', 'i72' : 'icons/forward.gif', 'i76' : 'icons/forward.gif'}],
                      ['&nbsp;Troubleshooting Guide', "javascript:Launch('firefox.html')", {'i0' : 'icons/text.gif', 'i4' : 'icons/text.gif', 'i8' : 'icons/text.gif', 'i12' : 'icons/text.gif', 'i64' : 'icons/text.gif', 'i68' : 'icons/text.gif', 'i72' : 'icons/text.gif', 'i76' : 'icons/text.gif'}],		      
                ],				     
                ['&nbsp;University Statistics', '/university_stats/html/university_stats.htm', { 'tt' : 'Includes performance indicators (e.g., admission averages, applicant statistics), a web-based data book (student and personnel data), admission statistics, and supplementary student enrollment figures - includes current and historical data.','i0' : 'icons/forward.gif', 'i4' : 'icons/forward.gif', 'i8' : 'icons/forward.gif', 'i12' : 'icons/forward.gif', 'i64' : 'icons/forward.gif', 'i68' : 'icons/forward.gif', 'i72' : 'icons/forward.gif', 'i76' : 'icons/forward.gif'}],			 
                ['&nbsp;Reports on Surveys', '/surveys/html/surveys.htm', {'tt' : 'Results are presented for several surveys, including CUSC, NSSE, Satisfaction surveys on services, Work Environment surveys, and other student and employee surveys.', 'i0' : 'icons/forward.gif', 'i4' : 'icons/forward.gif', 'i8' : 'icons/forward.gif', 'i12' : 'icons/forward.gif', 'i64' : 'icons/forward.gif', 'i68' : 'icons/forward.gif', 'i72' : 'icons/forward.gif', 'i76' : 'icons/forward.gif'}],		  		 
                ['&nbsp;Specialized Reports', '/specialized_reports/html/specialized_reports.htm', {'tt' : 'Includes course-load scenarios, integrative review tables, graduation and retention statistics, graduate enrollment and time-to-degree reports, course information, OCGS program reviews, and Common University Data Ontario (CUDO).','i0' : 'icons/forward.gif', 'i4' : 'icons/forward.gif', 'i8' : 'icons/forward.gif', 'i12' : 'icons/forward.gif', 'i64' : 'icons/forward.gif', 'i68' : 'icons/forward.gif', 'i72' : 'icons/forward.gif', 'i76' : 'icons/forward.gif'}],
                ['&nbsp;Old Reports/Documents', 'old_reports.html', {'tt' : 'Includes archived performance indicators and a sample Teaching Evaluation form.','i0' : 'icons/forward.gif', 'i4' : 'icons/forward.gif', 'i8' : 'icons/forward.gif', 'i12' : 'icons/forward.gif', 'i64' : 'icons/forward.gif', 'i68' : 'icons/forward.gif', 'i72' : 'icons/forward.gif', 'i76' : 'icons/forward.gif'}],
        ],
   ];
	


// ['&nbsp;Course/Grade Info - Restricted Access', 'http://oirweb01/OIRP/access.aspx', {'tt': 'This selection requires the user to have a Carleton \'CUNET\' account. A Username and Password prompt may occur on the next screen - for Username enter cunet\\your-NT-account-name for example, cunet\\marcgarneau .(The user does not need to be logged on to the Carleton network to use to this option, however, access from some browsers in non-windows environments may be limited).','i0' : 'icons/lock.gif', 'i4' : 'icons/lock.gif', 'i8' : 'icons/lock.gif', 'i12' : 'icons/lock.gif', 'i64' : 'icons/lock.gif', 'i68' : 'icons/lock.gif', 'i72' : 'icons/lock.gif', 'i76' : 'icons/lock.gif'}],
		      


function Launch(page) { 
OpenWin = this.open(page, "Note", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,left=200,top=200,width=650,height=500"); 
} 


function onItemSelectHandler (o_item) {
    // if node with no link then toggle
    var o_state = o_item.state();
    if (o_state['node'] && !o_item.a_config[1]) {
        o_item.o_root.toggle(o_item.n_id);
        // cancel default action
        return false;
    }
    // proceed to default handler
    return true;
}


/*
	This function opens first tree item which has the caption specified.
	There are a lot of verifications that will help you to debug your
	code. You can disable or remove those checks when finished.
	
*/
function openItemByCaption (s_caption, o_tree) {
	// set to true when debugging the application
	var B_DEBUG = false;

	// exit if required parameter isn't specified
	if (!s_caption)
		return (B_DEBUG
			? alert("Required parameter to function openItemByCaption is missing")
			: false
		);

	// use first tree on the page if tree object isn't explicitly defined
	if (!o_tree)
		o_tree = (TREES[0]);
	if (!o_tree)
		return (B_DEBUG
			? alert("No Tigra Tree Menu PRO instances can be found on this page")
			: false
		);

    // find item with specified caption
    var a_item = o_tree.find_item(s_caption);
    for(var n=0; n < a_item.length; n++) {
	o_item=a_item[n];
	// collect info about all item's parents
	var n_id = o_item.n_id,
		n_depth = o_item.n_depth,
		a_index = o_item.o_root.a_index,
		a_parents = [o_item];

	while (n_depth) {
		if (a_index[n_id].n_depth < n_depth) {
			a_parents[a_parents.length] = a_index[n_id];
			n_depth--;
		}
		n_id--;
	}
		
	// open all parents starting from root
	for (var i = a_parents.length-1; i >= 0; i--)
	   // check if node or root
	   if (a_parents[i].n_state & 48)
	      a_parents[i].open();
	   else
	      if (B_DEBUG) 
	         alert("Item with caption '" + a_parents[i].a_config[0]+ 
	            "' is a leaf.\nHierarchy will be opened to its parent node only.")
    }
}
