if (document.all && !document.getElementById) { // cope with old IE versions
	document.getElementById = function(id) {
		return document.all[id];
	}
}

/* To allow for both invisible and visible initial states, it is necessary
to set initially invisible toggleable elements as display: none using inline
CSS rather than a stylesheet */

function toggle( targetId ) { // toggle display of a node
	target = document.getElementById( targetId );
	if (target.style.display == "none") {
		target.style.display = "block";
	} else {
		target.style.display = "none";
	}
}

function hide() { // hide all nodes passed as arguments
	for (var i = 0; i < arguments.length; ++i) {
		// alert(arguments[i]);
		target = document.getElementById( arguments[i] );
		target.style.display = "none";
	}
}

function plusminus( targetId ) { // write a +/- link to toggle display of this node
	toggletext(targetId,'+/-');
}

function toggletext( targetId, linkText ) { // write a link to toggle display of this node
	document.write(
		"<a href=" + 
		"\"#\"" +
		"onclick=" +
		"\"toggle('" +
		targetId +
		"'); return false;\"" +
		">" +
		linkText +
		"<" +
		"/a>"
	);
}
