<!--
var browser = navigator.appName;
var width = screen.width;
var height = screen.height;
if((browser=="Netscape"||browser=="Microsoft Internet Explorer") && (width > 500)) {
	document.write("<style type=\"text/css\">");
	document.write(".root {width: 320px;}");
	/** font **/
	document.write("body {font: 8pt/normal Arial;}");
	document.write("table {font: 8pt/normal Arial;}");
	document.write("span.big {font: xx-large/normal Arial;}");
	document.write("div.header {padding: 3px 1px 3px 1px;padding-left: 5px;}");
	document.write("</style>");
}else {
	document.write("<style type=\"text/css\">");
	document.write("body{background-image: none;background-color: white;color: black;}");
	document.write("</style>");
}

var div;
var height;
var interval = 0;
var divs = new Array();
var multiple;
var originalHeight;
var allCollapse;
function expandCollapse(area, object) {
	div = document.getElementById(area);
	if(div == null) return;

	var status = document.getElementById(object);
	if(status == null) return;
	
	var src = status.src;
	src = src.substring(src.lastIndexOf("/")+1, src.length);
	
	var collapse = allCollapse ? true : src == 'minus.gif';
	
	if(collapse) {
		if(div.style.display == 'block') {
			divs[area.substring(area.lastIndexOf('-')+1)] = div.offsetHeight;
		}
	}else {
		originalHeight = divs[area.substring(area.lastIndexOf('-')+1)];
	}
	height = collapse ? div.style.display == 'block' ? div.offsetHeight : 1 : 1;
	
	if(multiple == null || !multiple) {
		interval = setInterval(collapse ? "hideDiv()" : "showDiv('area')", 1);
	}else {
		if(collapse) {
			div.style.height = 0 + 'px';
			div.style.display = 'none';
		}else {
			div.style.display = 'block';
			div.style.height = originalHeight + 'px';
		}
	}
	
	updateButton(status, collapse);
}

function hideDiv() {
	if(height == 'undefined' || isNaN(height) || width < 500) {
		div.style.display = 'none';
		clearInterval(interval);
	}else {
		if(height <= 0) {
			div.style.display = 'none';
			clearInterval(interval);
		}else {
			height = (height -5);
			div.style.height = (height < 0 ? 0 : height )+ "px";
		}
	}
}

function showDiv(area) {
	if(height == 'undefined' || isNaN(height) || width < 500) {
		div.style.display = 'block';
		clearInterval(interval);
	}else {
		if(height >= originalHeight) {
			clearInterval(interval);
		}else {
			if(height == 1) div.style.display = 'block';
			height = (height + 5);
			div.style.height = (height > originalHeight ? originalHeight : height) + "px";
		}
	}
}

function collapseAll() {
	allCollapse = true;
	multiple = true;
	var allDivs = document.getElementsByTagName("div");
	if(!(allDivs == null || allDivs == 'undefined')) {
		var ec;
		for(div in allDivs) {
			if(!(div == null || div == 'undefined')) {
				if(div.startsWith("content-")) {
					ec = div.replace("content-", "ec-");
					expandCollapse(div, ec);
				}
			}
		}
		ec = null;
	}
	allDivs = null;
	multiple = false;
	allCollapse = false;
}

String.prototype.startsWith = function(str) {
	return (this.match("^"+str)==str);
}
//-->