// This function is used to show and hide the sub-lists in the TOC.
// The object reference is passed as an argument and used to set the class.
// The class determines if the sub-list is displayed or not.
function fnFlash(oTitle,id){
  oList = document.getElementById("Inner"+id);
  if(oList){
     whichIm = document.getElementById("oImage" + id);
     //alert("oTitle="+oTitle+" id="+id);
     if(oList.className == "tocChildItemHide"){
        oList.className = "tocChildItemShow";
        whichIm.src = tree_expand_src;
     }
     else if(oList.className == "tocChildItemShow") {
         oList.className = "tocChildItemHide";
         whichIm.src = tree_collapse_src ;
     }
  }
}

function mouseover(el) {
  el.className = "toc_raised grpHref";
  el.focus();
}

function mouseout(el) {
  el.className = "grpHref";
  el.focus();
}

function mousedown(el) {
  el.className = "toc_pressed grpHref";
  el.focus();
}

function mouseup(el) {
  el.focus();
}

function syncToc(grp_id){
  if(grp_id != ''){

	  syncObj = document.getElementById("Parent"+grp_id);
	  while( syncObj.id != "tocm" ){
	        if(syncObj.id.indexOf("Parent") != -1){
	          var new_grp_id = syncObj.id.replace("Parent","");
	          new_grp_id = parseInt(new_grp_id);
	          //document.getElementById("oImage"+new_grp_id).fireEvent('onclick');

	          //flash the image obj
	          var imgObj = document.getElementById("oImage"+new_grp_id);
		  		 fnFlash(imgObj,new_grp_id)
	        }
	        //set parent node
	     	  syncObj=syncObj.parentNode;
	  }
	  document.getElementById("link"+grp_id).className = "toc_pressed grpHref";
  }
}