// must maintain a record of anything that was previously opened
var previousElement;

function blocking(nr)
{
	if (document.layers) // nn
	{

		current = (document.layers[nr].display == 'block') ? 'none' : 'block';
		document.layers[nr].display = current;
	}
	else if (document.all) // ie
	{

		var currentElement = document.all[nr];

		if (currentElement){ // check to see if it exists first

			currentElement.style.display = (currentElement.style.display == 'block') ? 'none' : 'block';

			// hide an old block (if it exists) if it is not the one we are clicking - the code above will handle it fine otherwise
	
			if (previousElement && (previousElement != currentElement)){
				previousElement.style.display = 'none';
			}

			previousElement = currentElement;
		}

	}


	// i only changed this code
	else if (document.getElementById) // no idea
	{
	
		var currentElement = document.getElementById(nr);

		if (currentElement){ // check to see if it exists first

			currentElement.style.display = (currentElement.style.display == 'block') ? 'none' : 'block';

			// hide an old block (if it exists) if it is not the one we are clicking - the code above will handle it fine otherwise
	
			if (previousElement && (previousElement != currentElement)){
				previousElement.style.display = 'none';
			}

			previousElement = currentElement;
		}
	}
}
