// +-------------------------------------------------------------+
// | HiveMail™ version 1.3.1
// +-------------------------------------------------------------+
// | HIVEMAIL™ IS NOT FREE SOFTWARE
// | If you have downloaded this software from a website other
// | than Hivemail or if you have otherwise received
// | this software from someone who is not a representative of
// | this organization you are involved in an illegal activity.
// +-------------------------------------------------------------+
// | $RCSfile: collapse.js,v $ - $Revision: 1.3 $
// | $Date: 2004/07/21 02:47:28 $ - $Author: tubedogg $
// +-------------------------------------------------------------+

function render(c, t) {
	if (c.checked || c == 1) {
		document.getElementById(t).style.display="";
	} else {
		document.getElementById(t).style.display="none";
	}
}

function renderSect(sects, i) { 
	var im = document.images[i];
	var todo = '';
	var cook = '';

	if (im.src.match(/arrow_up.gif$/)) { 
		todo = 'none';
		cook = 'closed';
		im.src = "images/arrow_down.gif";
		im.title = 'Open This Section';
	} else {
		cook = 'open';
		im.src = "images/arrow_up.gif";
		im.title = 'Collapse This Section';
	}

	for (var i = 0; i < sects.length; i++) {
		document.getElementById(sects[i]).style.display = todo;
		setCookie(sects[i], cook);
	}
}