/* DHTML expand/contract
* Created: 28th January 2010
* Visit http://www.activepresentation.com
*/

// Old functions - not working in FF but OK in IE and Chrome

function showSection (divID){
//display the section if it's not displayed; hide it if it is displayed
if (divID.style.display=="none"){divID.style.display="inline"}
else{divID.style.display="none"}
}

function hideSection (divID){
//remove the section when user clicks in the opened DIV

// the following line produces an error in the .chm file but not in a browser so is commented out, preventing the div from being collapsed when clicked on

//if (divID.style.display=="inline"){divID.style.display="none"}

}
// HTML code for each <DIV> to show/hide:
// <a onclick="showSection(UID002)" href="javascript:hideSection('UID002')">Show me</a>
// <div style="DISPLAY: none" id="UID002" onclick="hideSection(UID002)">This is the content</div>


//New functions added from http://www.webmasterworld.com/forum91/441.htm on 16NOV2010

var state = 'none';

function showhide(layer_ref) {

if (state == 'inline') {   // changed from block
state = 'none'; 
} 
else { 
state = 'inline';  // changed from block
} 
if (document.all) { //IS IE 4 or 5 (or 6 beta) 
eval( "document.all." + layer_ref + ".style.display = state"); 
} 
if (document.layers) { //IS NETSCAPE 4 or below 
document.layers[layer_ref].display = state; 
} 
if (document.getElementById &&!document.all) { 
hza = document.getElementById(layer_ref); 
hza.style.display = state; 
} 
} 

// HTML code for each <DIV> to show/hide:
// <p><a href="#" onclick="showhide('div1');">show/hide me</a></p> 
// <div id="div1" style="display: none;">This is the content</div>
