var lastClicked;
      var allIcons = new Array();

      function getElement(id, d) {
      if (!d) d = document;
      if (d.getElementById) {
      return d.getElementById(id);
      }
      if (d.layers && d.layers[id]) {
      return d.layers[id];
      }
      if (d.all && d.all[id]) {
      return d.all[id];;
      }
      }
        
      function preloadImgs(){
        allIcons[0] = new Image();
        allIcons[0].src = '/images/plus.gif';
        allIcons[1] = new Image();
        allIcons[1].src = '/images/plus.2.gif';
        allIcons[2] = new Image();
        allIcons[2].src = '/images/minus.gif';
        allIcons[3] = new Image();
        allIcons[3].src = '/images/minus.2.gif';
      }

      function tocShowHideChildren(id){
      var imgURL = getElement('i-' + id).src;
      var isPlus = (imgURL.indexOf("plus") != -1) ? true : false;
      
      if (isPlus){
      getElement(id).style.visibility = "visible";
      getElement(id).style.display = "block";
      getElement('i-' + id).src= allIcons[2].src;
      } else {
      getElement(id).style.display = "none";
      getElement(id).style.visibility = "hidden";
      getElement('i-' + id).src= allIcons[0].src;
      }
      }

    function showHoverImg(id){
    var url = getElement(id).src;
    var isPlus = (url.indexOf("plus") != -1) ? true : false;
    if (isPlus && allIcons[1]){
    getElement(id).src= allIcons[1].src;
    } 
    if (!isPlus && allIcons[3]) {
    getElement(id).src= allIcons[3].src;
    }
    }

    function hideHoverImg(id){
    var obj = getElement(id);
    var isPlus = (obj.src.indexOf("plus") != -1) ? true : false;
    if (isPlus && allIcons[0]){
    obj.src= allIcons[0].src;
    } 
    if (!isPlus && allIcons[2] ) {
    obj.src= allIcons[2].src;
    }
    }
	
	preloadImgs()
