if (document.getElementById && document.getElementsByTagName && document.createElement) {
	document.write('<link rel="stylesheet" type="text/css" href="js_hide.css" />');
	window.onload = initShowHide;
}

function initShowHide() {
	// Hide the container with all toggleable elements 
	document.getElementById('toggleable').style.display = 'none';
	var as = document.getElementById('toggle').getElementsByTagName('a');
	for (var i = 0; i < as.length; i++) {
		as[i].onclick = function() {
			toggle(this);
			return false;
		}	
	}
}

function toggle(s) {
	// Retrieve the id of the toggleable section
	var id = s.href.match(/#(\w.+)/)[1];
	// Clone the activated toggleable element from the content pool
	var clone = document.getElementById(id).cloneNode(true);
	// This clone will be wrapped in a generated container element called 'cloneDiv' 
	// Try to get a reference to an existing container element
	var cloneDiv = document.getElementById('cloneDiv');
	// In case the container element already exists
	if (cloneDiv) {
		// Replace the previously cloned toggleable element with the new one
		cloneDiv.replaceChild(clone, cloneDiv.firstChild);	
	}
	// In case the container element isn't created yet
	else {
		// Create the container element
		var cloneDiv = document.createElement('div');
		// Add the id attribute and set its value
		cloneDiv.setAttribute('id', 'cloneDiv');
		// Put the cloned element in the cloned container
		cloneDiv.appendChild(clone);
		// Append the cloned container to the body of the document
		document.body.appendChild(cloneDiv);
	}
}
	