//easyhh.js

// function to handle show/hide the contents tree
function swapstate(){
	var s = location.href.lastIndexOf("/")+1;
	var d = location.href.lastIndexOf(".");
	thishref = location.href.substring(s,d);

	if(typeof parent.easyhh_tocframe=="object"){
		parent.location.href=thishref+".htm";
		framesvisible=false;
	}
	else{
		framesvisible=true;
		if (s == location.href.length)
			parent.location.href="bcpindex.htm";
		else
			parent.location.href="bcpindex.htm?"+thishref;
	}
}

function syncTOC(){//alert("syncTOC()");
   if(typeof parent.easyhh_tocframe=="object"){
	if(document.all && parent.easyhh_tocframe.document.easyhh_toc){
		if(parent.easyhh_tocframe.synchroniseTOC) parent.easyhh_tocframe.synchroniseTOC();
	}
   }
}

