﻿//<script type="text/javascript">
//preload image
var collimg = new Image();
collimg.src = "collapse.gif";
var expimg = new Image();
collimg.src = "expand.gif";

//-------------------------------------------------------------------------------------------------------------------------
function ShowHideLayer(boxID) 
{
	/* This function can be used if the DIV's are visible from the start on the page */

	/* if you are using images:
	Then put this in the link;  <img src="expand.gif" alt="Expand Me" name="btn156" width="9" height="9" id="btn156" /> /*

	/* Obtain reference for the selected boxID layer and its button */
	var box = document.getElementById("box"+boxID);
	var lnk = document.getElementById("lnk"+boxID);
	var sgn = document.getElementById("sign"+boxID);
	var img = document.getElementById("img"+boxID);

	/* If the selected box is currently visible, hide it */
	if(box.style.display == "block" || box.style.display == "") 
	{
		box.style.display = "none";
		//lnk.innerHTML = "[+] expand";
		//sgn.innerHTML = "+";
		img.src= "images/buttons/arrow_right_double_01.png";
		

	}
	/* otherwise hide it */
	else 
	{
		box.style.display = "block";
		//lnk.innerHTML = "[-] collapse";
		//sgn.innerHTML = "-";
		img.src = "images/buttons/arrow_down_01.png";
	}
}

//-------------------------------------------------------------------------------------------------------------------------
function ShowHideLayerAll(fromState,toState)
{
	/* This function can be used if the DIV's are visible from the start on the page */
	
       
	/* create a collection of all div tags in the document */
	var myDivColl = document.all.tags("div");
	
	for (var i=0; i<myDivColl.length; i++) 
	{
	
	
		/* Obtain reference for the DIV element and its link */	
		var box = myDivColl[i];

		/*var box = document.getElementById("box" + DivBox.id.substring(3));*/
		var lnk = document.getElementById("lnk" + box.id.substring(3));
		var sgn = document.getElementById("sign"+box.id.substring(3));
		var img = document.getElementById("img"+box.id.substring(3));


		if (fromState == "COL" && toState == "EXP")
		{
			box.style.display = "block";
			//lnk.innerHTML = "[-] collapse";
			//sgn.innerHTML = "-";
			img.src = "images/buttons/arrow_down_01.png";

		}
		else
		{
			box.style.display = "none";
			//lnk.innerHTML = "[+] expand";
			//sgn.innerHTML = "+";
			img.src = "images/buttons/arrow_right_double_01.png";

		}	
	}
}
