// JavaScript Document
var lastexp;
var lastcat;
function expandOver(e, color) {
	if (e == lastexp || e == lastcat) {
		e.style.color = "#fff";
	} else {
		e.style.color = color;
	}
}
function expandCat(e, parent, color, pagekey) {
	if (lastcat != null) {
		var lastp = document.getElementById(parent);
		var lastd = document.getElementById(lastcat.id + "-detail");
		lastcat.style.color = color;
		lastcat.style.background = '';
		lastd.style.display = 'none';
		lastp.style.height = parseInt(lastp.offsetHeight - lastd.offsetHeight - 25) + "px";
	}
	var p = document.getElementById(parent);
	var d = document.getElementById(e.id + "-detail");
	if (d.style.display == 'block') {
		e.style.color = color;
		e.style.background = '';
		d.style.display = 'none';
		p.style.height = parseInt(p.offsetHeight - d.offsetHeight - 25) + "px";
		//p.style.height = parseInt(p.offsetHeight - 25) + "px";
	} else {
		e.style.background = "url('images/" + pagekey + "/minus_col1.gif') no-repeat";
		e.style.color = '#ffffff';
		d.style.display = 'block';
		p.style.height = parseInt(p.offsetHeight + d.offsetHeight + 25) + "px";
		//p.style.height = parseInt(p.offsetHeight + 25) + "px";
	}
	lastcat = e;
}
function expandDetail(e, parent, color, pagekey) {
	if (lastexp != null && lastexp.id != e.id) {
		var lastp = document.getElementById(parent);
		var lastd = document.getElementById(lastexp.id + "-detail");
		lastexp.style.color = color;
		lastexp.style.background = '';
		lastd.style.display = 'none';
		lastp.style.height = parseInt(lastp.offsetHeight - lastd.offsetHeight - 25) + "px";
	}
	var p = document.getElementById(parent);
	var d = document.getElementById(e.id + "-detail");
	if (d.style.display == 'block') {
		e.style.color = color;
		e.style.background = '';
		d.style.display = 'none';
		p.style.height = parseInt(p.offsetHeight - d.offsetHeight - 25) + "px";
		//p.style.height = parseInt(p.offsetHeight - 25) + "px";
	} else {
		e.style.background = "url('images/" + pagekey + "/minus_col1.gif') no-repeat";
		e.style.color = '#ffffff';
		d.style.display = 'block';
		p.style.height = parseInt(p.offsetHeight + d.offsetHeight + 25) + "px";
		//p.style.height = parseInt(p.offsetHeight + 25) + "px";
	}
	lastexp = e;
}
