
/* for menu tool */
function expandTool(cid){
	var inc=0;
	while (tcollect[inc]){
		if (tcollect[inc].id!=cid) {
			document.getElementById(tcollect[inc].id).style.display="none";
			document.getElementById(tcollect[inc].id+"_off").style.display="block";
		}
		inc++;
	}
	document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none";
	document.getElementById(cid+"_off").style.display=(document.getElementById(cid+"_off").style.display!="block")? "block" : "none";
	if (document.getElementById(cid).style.display=="block") {
		document.cookie='BOZARToolext'+"="+cid;
	} else {
		document.cookie='BOZARToolext'+"=none";
	}
}

function do_onloadTool(){
	tcollect=new Array();
	var inc=0;
	var alltags=document.all? document.all : document.getElementsByTagName("*");
	for (i=0; i<alltags.length; i++){
		if (alltags[i].className=="switchTool")
			tcollect[inc++]=alltags[i];
	}
	/*
	if (get_cookie('BOZARToolext') != "") {
		if (get_cookie('BOZARToolext') != "none") {
			sItems = get_cookie('BOZARToolext');
			expandTool(sItems);
		}
	}
	*/
}

if (window.addEventListener)
	window.addEventListener("load", do_onloadTool, false);
else if (window.attachEvent)
	window.attachEvent("onload", do_onloadTool);
else if (document.getElementById)
	window.onload=do_onloadTool;
