/*
Contains functions used by the site to show and hide text.

Example of how to use is:

Link to show and hide text
<div align="right"><a href="javascript:toggle();" id="displayText">[+] Modifiy Search</a></div>

The section that is being hidden or shown
<div id="toggleText" style="display: none;" align="left">Form goes here and other information to modify searh.</div>

ALW
*/

function toggleModifySearch() {
var ele = document.getElementById("toggleText");
var text = document.getElementById("displayText");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "[+] Modify Search";
}
else {
ele.style.display = "block";
text.innerHTML = "[-] Modify Search";
}
} 

function toggleForgotPassword() {
var ele = document.getElementById("toggleText");
var text = document.getElementById("displayText");
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = "forgot password?";
}
else {
ele.style.display = "block";
text.innerHTML = "forgot password?";
}
} 

/*
This Function is used to show and hide text.
Examples of having multiple instances.  You need to make sure you properly name the ID's etc.

For the first one below you Text to show and hide the content is setup as div ID "ShowText1" and you make sure you put that as the second variable in the called function.
The content that is being hidden is div ID "ToggleText1" and is put as the first variable in the called function.
The other two varibles are for what you want text to be when the content is hidden and showen.  Example 1 is "[+] Show Text" Then when content is shown it changes to "[-] Hide Text"

<div align="left"><a href="javascript:toggleShowHideText('ToggleText1', 'ShowText1', '[+] Show Text 1', '[-] Hide Text 1');" id="ShowText1">[+] Show Text 1</a></div><br />
<div id="ToggleText1" style="display: none;" align="left">Showing text from the first one.</div>

<div align="left"><a href="javascript:toggleShowHideText('ToggleText2', 'ShowText2', '[+] Show Text 2', '[-] Hide Text 2');" id="ShowText2">[+] Show Text 2</a></div><br />
<div id="toggleText2" style="display: none;" align="left">Showing text from the second one.</div><br />

<div align="left"><a href="javascript:toggleShowHideText('ToggleText3', 'ShowText3', '[+] Show Text 3', '[-] Hide Text 3');" id="ShowText3">[+] Show Text 3</a></div><br />
<div id="toggleText3" style="display: none;" align="left">Showing text from the third one.</div><br /><br />
*/
function toggleShowHideText(strElementID, strOnOff, strOnText, strOffText) {
var ele = document.getElementById(strElementID);
var text = document.getElementById(strOnOff);
if(ele.style.display == "block") {
ele.style.display = "none";
text.innerHTML = strOnText;
}
else {
ele.style.display = "block";
text.innerHTML = strOffText;
}
} 
