var collapse="yes";

function getElementbyClass(classname) {
	ccollect=new Array();
	var inc=0;
	var alltags=document.all?document.all:document.getElementsByTagName("*");

	for(i=0;i<alltags.length;i++) {
		if(alltags[i].className==classname) {
			ccollect[inc++]=alltags[i];
		}
	}
}

function contract(omit) {
	var inc=0;
	while(ccollect[inc]) {
		if(ccollect[inc].id!=omit) {
			ccollect[inc].style.display="none";
		}
	inc++;
	}
}

function expand(cid) {
	if(typeof ccollect!="undefined") {
		if(collapse=="yes") {
			contract(cid);
			document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")?"block":"none";
		}
	}
}

function hilite(id) {
	document.getElementById(id).style.color="#c00";
}

function hilite2(id) {
	document.getElementById(id).style.color="#0ff";
	document.getElementById(id).style.textDecoration="underline";
}

function revert(id) {
	document.getElementById(id).style.color="#999";
}

function revert2(id) {
	document.getElementById(id).style.color="0ff";
	document.getElementById(id).style.textDecoration="none";
}

function do_onload() {
	getElementbyClass("switchcontent");
}
