	// preload the tree images.... (add any specials)
	var bTreeMultiSelect = false;
	var bTreeAllowDeselect = false;
	var oTreeLastSelectedItem = null;
	var oTreeLastSelectedData = null;
	var TreeItemDispatch=null;
	
	var Img1 = new Image();Img1.src = "images/I.gif";	
	var Img2 = new Image();Img2.src = "images/L.gif";	
	var tree_lMinus = new Image();tree_lMinus.src = "images/minus.gif";	
	var tree_lPlus = new Image();tree_lPlus.src = "images/plus.gif";	
	var Img5 = new Image();Img5.src = "images/T.gif";	
	var tree_TMinus = new Image();tree_TMinus.src = "images/minus.gif";	
	var tree_TPlus = new Image();tree_TPlus.src = "images/plus.gif";	
	var Img8 = new Image();Img8.src = "images/white.gif";	
	
	// expand or collapse function
	function tree_iconclick(sNodeID)
	{
		oChild = document.getElementById(sNodeID + "Child");
		oController_O = document.getElementById(sNodeID + "_o");
		
		if (oChild.style.display == "none") // || oChild.style.display =="") 
		{
			// expanding (which means it has a plus next to it right now)
			oChild.style.display= "block";
			if(oController_O.src == tree_TPlus.src)
				oController_O.src = tree_TMinus.src;
			else
				oController_O.src = tree_lMinus.src;
		}
		else
		{
			// Collapse (has minus next to it)
			oChild.style.display= "none";
			if(oController_O.src == tree_TMinus.src)
				oController_O.src = tree_TPlus.src;
			else
				oController_O.src = tree_lPlus.src;
		}
	}
	
	//Mine collaps the tree
	function tree_iconclick_childP(sNodeID)
	{
		oChild = document.getElementById(sNodeID + "Child");
		oController_O = document.getElementById(sNodeID + "_o");
		
		if (oChild.style.display == "none" || oChild.style.display =="") 
		{
			// expanding (which means it has a plus next to it right now)
			oChild.style.display= "block";
			if(oController_O.src == tree_TPlus.src)
				oController_O.src = tree_TMinus.src;
			else
				oController_O.src = tree_lMinus.src;
		}
		else
		{
			// Collapse (has minus next to it)
			oChild.style.display= "none";
			if(oController_O.src == tree_TMinus.src)
				oController_O.src = tree_TPlus.src;
			else
				oController_O.src = tree_lPlus.src;
		}
	}
	//mine2 end
	
		//Mine collaps the tree
	function tree_iconclick_childQ(sNodeID)
	{
		oChild = document.getElementById(sNodeID + "Child");
		oController_O = document.getElementById(sNodeID + "_o");
		
		if (oChild.style.display == "none")// || oChild.style.display =="") 
		{
			// expanding (which means it has a plus next to it right now)
			oChild.style.display= "block";
			if(oController_O.src == tree_TPlus.src)
				oController_O.src = tree_TMinus.src;
			else
				oController_O.src = tree_lMinus.src;
		}
		else
		{
			// Collapse (has minus next to it)
			oChild.style.display= "none";
			if(oController_O.src == tree_TMinus.src)
				oController_O.src = tree_TPlus.src;
			else
				oController_O.src = tree_lPlus.src;
		}
	}
	//mine2 end


//Mine 3 
function tree_iconclickP(sNodeID)
	{
		oChild = document.getElementById(sNodeID + "Child");
		oController_O = document.getElementById(sNodeID + "_o");
		
		if (oChild.style.display == "none" || oChild.style.display =="") 
		{
			// expanding (which means it has a plus next to it right now)
			oChild.style.display= "block";
			if(oController_O.src == tree_TPlus.src)
				oController_O.src = tree_TMinus.src;
			else
				oController_O.src = tree_lMinus.src;
		}
		else
		{
			// Collapse (has minus next to it)
			oChild.style.display= "none";
			if(oController_O.src == tree_TMinus.src)
				oController_O.src = tree_TPlus.src;
			else
				oController_O.src = tree_lPlus.src;
		}
	}
//Mine 3 END


	
	// Item click
	function tree_itemclick(sNodeID,sKey)
	{		
		//background : #C5C5C5;
		oItem = document.getElementById(sNodeID + "Item");
		oItemData = document.getElementById(sNodeID + "Data");
		
		// See if its selected....
		if(oItemData.style.zIndex == 0)// nope
		{
			oItemData.style.zIndex =1;
			oItem.style.background  = "#C5C5C5";
			
			if(!bTreeMultiSelect && oTreeLastSelectedItem != null)
			{
				// deselect the last one
				oTreeLastSelectedData.style.zIndex =0;	
				oTreeLastSelectedItem.style.background  = "#FFFFFF";		
				TreeItemDispatch(false,false,oTreeLastSelectedData.innerText);				
			}
			
			oTreeLastSelectedItem = oItem;
			oTreeLastSelectedData =oItemData;
			TreeItemDispatch(false,true,oItemData.innerText);
		}
		else// yup
		{
			if(bTreeAllowDeselect)
			{
				oItemData.style.zIndex =0;		
				oItem.style.background  = "#FFFFFF";
				TreeItemDispatch(false,false,oItemData.innerText);				
				oTreeLastSelected = null;
				oTreeLastSelectedData =null;
			}
			else
				TreeItemDispatch(true,true,oItemData.innerText);	
		}
	}
	// Generic tree item function handler
	// use as prototype then assign your own after including the script....
	function def_TreeItemDispatch(bReslect,bSelected,sKey)
	{
		if(bSelected || bReslect)
		{
			alert(sKey);
		}
	}
	// assign default
	TreeItemDispatch = def_TreeItemDispatch;



