// JavaScript Document
function expand_next_row (cell){
	row = cell.parentNode;
	table = row.parentNode;
	row_next = table.rows[row.rowIndex+1];

	if (row_next.style.display == "none") {
		try{
			row_next.style.display = "table-row";
		} catch (e){
			row_next.style.display = "block";
		}
		cell.className="expander_closed expander_opened";
	} else {
		row_next.style.display = "none";
		cell.className="expander_closed";
	}
}
function expandAll_rows(){
	var e = arguments[0];
	if (!e) var e = window.event
	if (e.target) targ = e.target
	else if (e.srcElement) targ = e.srcElement
	if (targ.nodeType == 3) // defeat Safari bug
	   targ = targ.parentNode
	
	div = targ.parentNode;
	children = div.childNodes;
	for (i=0;i<children.length;i++){
		if(children[i].tagName=="TABLE"){
			rowz=children[i].rows;
			break;
		}
	}
	
	for(i=0;i<rowz.length;i++){
		if (rowz[i].style.display == "none") {
			try{
				rowz[i].style.display = "table-row";
			} catch (e){
				rowz[i].style.display = "block";
			}
			cell = rowz[i-1].cells[1];
			cell.className="expander_closed expander_opened";
		}
		
	}
	targ.onclick = collapseAll_rows;
	targ.innerHTML="Collapse all";
}
function collapseAll_rows(){
	var e = arguments[0];
	if (!e) var e = window.event
	if (e.target) targ = e.target
	else if (e.srcElement) targ = e.srcElement
	if (targ.nodeType == 3) // defeat Safari bug
	   targ = targ.parentNode
	
	div = targ.parentNode;
	children = div.childNodes;
	for (i=0;i<children.length;i++){
		if(children[i].tagName=="TABLE"){
			rowz=children[i].rows;
			break;
		}
	}
	
	for(i=0;i<rowz.length;i++){
		if ((i+1)%2 == 0) {
			rowz[i].style.display = "none";
			cell = rowz[i-1].cells[1];
			cell.className="expander_closed";
		}
		
	}
	targ.onclick = expandAll_rows;
	targ.innerHTML="Expand all";
}
