// JavaScript Document

// EXPAND AND CONTRACT
// DESCRIPTION: user clicks on link or +/- image
// and the div contents are shown. The image gets
// replaced with the opposite image. The text changes
// from "View Document Details" to "Hide Document Details"
// and vice versa
//

<!-- hide from old browser
var opt_item = new Array();
var ecimg = new Array();
var eclinktext = new Array();
//create an array for all optional addon items
for (i=0; i<50; i++)
{
	opt_item[i] = "hs" + i;
	ecimg[i] = "ecimg" + i;
	eclinktext[i] = "eclinktext" + i;
}
// expand and contract optional addon item div that contains
// download details
function tree(x)
{
	var divsh = document.getElementById(opt_item[x]).style;
	var ec_img = window.document.getElementById(ecimg[x]);
	var ec_link = window.document.getElementById(eclinktext[x]);

	if (divsh.display == "none")
	{
		divsh.display = "";
		ec_img.src = "http://testlinx/test/dlc/images/collapse.gif";
		
	} 
	else
	{
		divsh.display = "none";
		ec_img.src = "http://testlinx/test/dlc/images/expand.gif";
		
	}
}
	

// end hide -->