
	function toggleLayer(whichLayerID) 
	{
	  var elem, vis;
	  elem = document.getElementById(whichLayerID);
	  vis = elem.style;
	  // if the style.display value is blank we try to figure it out here
	  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
		vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
	  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
	}

	function CheckListAll(IDstr, total) // IDstr is the first part of the checkbox ID, total is the total number of checkboxes to untick //
	//IDs follow numerically, i.e.: <input type="checkbox" ID="checkbox1"> / <input type="checkbox" ID="checkbox2">, etc
	{
		for (i=1; i <= total; i++)	
		{
			checkboxID = IDstr + i;
			document.getElementById(checkboxID).checked = true;
		}
	}

	function unCheck(checkboxID) // checkboxID is the ID (as a string) of the checkbox to uncheck
	{
		document.getElementById(checkboxID).checked = false;
	}
	
