	//doesn't know what state it's in to start with
	//so we check for none first and toggle accordingly

	function reflowLayer(layerToChange)
	{
		// if the browser supports this, continue
		if (document.getElementById)
		{
			// gets the style property of the layer being passed
			var layer = document.getElementById(layerToChange).style;
			// assigns the display property to the oppostie of what it currently is
			layer.display = (layer.display == "none")? "block":"none";
		}
	}

	function hideAnswers()
	{
		
		var pattern = new RegExp("(^|\\s)answer(\\s|$)");

		var tag = document.getElementsByTagName('div');
			
		for (i = 0; i < tag.length; i++)
		{
			if ( pattern.test(tag[i].className) )
			{
				reflowLayer(tag[i].id);
			}
		}
	}