var hotspots = document.getElementsByName('hotspot');
var toggles = document.getElementsByName('toggle');

function visibilitytoggle()
{
  for (var i = 0; i < hotspots.length; i++)
  {
  hotspots[i].someProperty = i;
  hotspots[i].onclick = function() {toggle(this.someProperty)};
  }

  for (var i = 0; i < toggles.length; i++)
  {
    /* if want to hide all sections on load
    toggles[i].style.display = 'none';
    */

  	if (i != 0) { toggles[i].style.display = 'none'; }
  	if (i == 0)
  	{
  		hotspots[i].style.backgroundImage = 'url(images/hotspotRollover.gif)';
  		hotspots[i].style.color = '#BCC189';
  	}

  }
}

function toggle(i)
{
  if (toggles[i].style.display == 'none')
  {toggles[i].style.display = '';
   hotspots[i].style.backgroundImage = 'url(images/hotspotRollover.gif)';
   hotspots[i].style.color = '#BCC189';
  }
  else {
  toggles[i].style.display = 'none';
  hotspots[i].style.backgroundImage = 'url(images/hotspot.gif)';
  hotspots[i].style.color = '#97005D';
  }
}

function showall()
{
  for (var i = 0; i < toggles.length; i++)
  {
  toggles[i].style.display = '';
  hotspots[i].style.backgroundImage = 'url(images/hotspotRollover.gif)';
  }
}

function hideall()
{
  for (var i = 0; i < toggles.length; i++)
  {
  toggles[i].style.display = 'none';
  hotspots[i].style.backgroundImage = 'url(images/hotspot.gif)';
  }
}