/*
=====================================================================
Version 0.1
10/5/2006

Used to dynamically hide and show a piece of HTML. style="display: none;" must be set on element!

Put it in the code library for the first time. Starting it at 0.1. 
=====================================================================
*/

function toggleDisplay( as_elementId )
{
    var lo_element = document.getElementById( as_elementId );

    if ( lo_element.style.display == 'none' ) lo_element.style.display = 'block';
    else lo_element.style.display = 'none';
}

function switchText( as_elementId, as_text1, as_text2 )
{
    var lo_element = document.getElementById( as_elementId );

    if ( lo_element.innerHTML == as_text1 ) lo_element.innerHTML = as_text2;
    else lo_element.innerHTML = as_text1;
}

function toggle_test1( )
{
	toggleDisplay( 'test1' )
	switchText( 'moreLess', 'more', 'less' );
}

/*
Example
<p><a href="javascript:toggle_test1();">&lt; <span id="moreLess">more</span> &gt;</a></p>

<h1 id="test1" style="display: none;">Blah, blah</h1>
*/

