// JavaScript Document
<!--
//variable to hold the value of the login container that we are showing and hiding
var theContainer

//this variable is used to show a spacer for the aboutus page when the login button in left nav and footer is clicked
var theSpace

//this function is only called from the client login button on main about us page, code is in the footer and left nav
function getSpace(space) {
	theSpace = space
}


function showLogin(section) {
	
	//if aboutus main page show the spacer
	if (theSpace == "aboutSpacer") {
		document.getElementById(theSpace).style.display='block';
	} else {
		//do nothing
	}
	
	//show the login box
	document.getElementById(section).style.display='block';
		
	theContainer = section
	//start the timer to hide the box if it is up for an extended amount of time
	InitializeTimer(theContainer)
}



//timer to hide the login box if it isn't being used
var secs
var timerID = null
var timerRunning = false
var delay = 1000

function InitializeTimer(theContainer)	{
    // Set the length of the timer, in seconds
    secs = 45
    StopTheClock()
	StartTheTimer(theContainer)
}

function StopTheClock()	{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer(theContainer) {
	if (secs==0)	{
        StopTheClock(theContainer)
		//time is up so hide the login box
       	document.getElementById(theContainer).style.display='none';
			//if aboutus main page hide the spacer since the login box is now hidden
			if (theSpace == "aboutSpacer") {
				document.getElementById(theSpace).style.display='none';
			} else {
				//do nothing
			}
	} else {
        //self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer(theContainer)", delay)
    }
}

function showOn(onimage,offimage) {
	document.getElementById(onimage).style.display = 'block';
	document.getElementById(offimage).style.display = 'none';
	
}
function showOff(offimage,onimage) {
	document.getElementById(offimage).style.display = 'block';
	document.getElementById(onimage).style.display = 'none';
}

-->
