function toggleSolution()
{
  var alltags=document.all? document.all.tags("SPAN") : document.getElementsByTagName("*")
  for (i=0; i<alltags.length; i++)
  {
    if (alltags[i].className=="soldisplay")
    {
      var object = alltags[i];
      var state = object.style.visibility;
      if ( state == "visible" )
        object.style.visibility = "hidden";
      else
        object.style.visibility = "visible";
    }
  }
}

function makeTop ()
{
  if (window!= window.top) 
    top.location.href = location.href;
}

function contract ( idstr, control )
{
  var id = document.getElementById( idstr );
  var control = document.getElementById( control );

  if ( id.style.display == "none" )
  {
    id.style.display = "block";
    control.src="open.png";
  }
  else
  {
    id.style.display = "none";
    control.src="closed.png";
  }
}


function display (str)
{
//  var id = document.getElementById ("pencilmarks");
  //if ( id.style.visibility == "hidden" )
 //   id.style.visibility = "visible";

  var id = document.getElementById(str);
  id.style.background = 'silver';
}

function nodisplay (idstr)
{
  var id = document.getElementById(idstr);
  id.style.background = '#fafafa';
}
