window.elmExpand = null;

$(document).ready(function() {
	$("[name='toggletext']").click(function() {
		toggle($(this));
	});
	
	if(window.location.hash) {
		//alert(window.location.hash)
		toggle($("[id='toggle"+window.location.hash+"']"));
	}
});


function toggle(elmElement, blnForce) {
	if (window.elmExpand != null && !blnForce && elmElement.attr("expand") != "true") {
		toggle(window.elmExpand, true);
		window.elmExpand = null;
	}

	var elmChild=elmElement.parent().find("[name='extra']");

	elmChild.slideToggle('fast');

	if (elmElement.attr("expand") == "false" || !elmElement.attr("expand")) {
		elmElement.attr("expand", "true");
		window.elmExpand = elmElement;
	} else {
		elmElement.attr("expand", "false");

		window.elmExpand = null;
	}
}
