var $j = jQuery.noConflict();


          function scaleImage(imageElement, thumbnailWidth)
          {
          var width = $j(imageElement).width(),height = $j(imageElement).height(), ar = width / height;
          if (width > thumbnailWidth)
          {
          $j(imageElement).width(thumbnailWidth);
          $j(imageElement).attr("width",thumbnailWidth);
          $j(imageElement).height(Math.round(thumbnailWidth / ar));
          $j(imageElement).attr("height",Math.round(thumbnailWidth / ar));
          }

          }
         
          var oldExpanded = null;
          
          function expandCategories(objID, objSender)
          { 

          	oldExpanded = document.getElementById(objID);

			if (oldExpanded.getAttribute("class") == "template_maximized")
				{
							 document.getElementById(objSender).setAttribute("src", "tree_plus.gif");
					oldExpanded.setAttribute("class", "template_minimized");
					oldExpanded.setAttribute("class", "template_minimized");
				}
				else
				{
				 document.getElementById(objSender).setAttribute("src", "tree_minus.gif");
				oldExpanded.setAttribute("class", "template_maximized");
				oldExpanded.setAttribute("className", "template_maximized"); 
				} 
          }
          
          
          function expandBreadCrumbs(breadCrumbs)
          {
          
          var itemArray = breadCrumbs.split(" > ");
			for (var i = 0; i < itemArray.length; i++)
			{
				var code = lookup[itemArray[i].substring(1, itemArray[i].length-1)];
				expandCategories(code, code.replace("treenode_","treenode_toggle_"));
			}
          }
          
         
 
        