<!--
//Drop down menu link- © Dynamic Drive (www.dynamicdrive.com)
//For full source code and 100's more DHTML scripts, visit http://www.dynamicdrive.com
//Credit MUST stay intact for use

var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all

function dropit(e,whichone){
  //BA Oct26, 2010 - Removed the folowing conditions to return the tb rotations to a set time.
  //if (whichone=='roll7') numsecs = 8
  //else numsecs = 12
  curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id

  //hide any menu that's not the current one
  if (window.themenu&&themenu.id!=curmenuID)
    themenuStyle.visibility=(ns6||ie4)?"hidden" : "hide"

  themenu=ns6? document.getElementById(whichone) : eval(whichone)
  themenuStyle=(ns6||ie4)? themenu.style : themenu

  hiddenconst=(ns6||ie4)? "hidden" : "hide"
  if ((themenuStyle.visibility==hiddenconst)||(themenuStyle.visibility=='')){
    themenuStyle.visibility=(ns6||ie4)? "visible" : "show"
    //InitializeTimer(numsecs)
	InitializeTimer()
  }
  else
    if (e=='click') {
      hidemenu()
    }
  return false
}

function hidemenu(){
  if ((ie4||ns6)&&window.themenu)
    themenuStyle.visibility="hidden"
  else if (ns4)
    themenu.visibility="hide"
}

//if (ie4||ns6)
document.onclick=hidemenu

//hidemenu if timed out
var secs
var timerID = null
var timerRunning = false
var delay = 400

//function InitializeTimer(howmanysecs)
function InitializeTimer()
{
    // Set the length of the timer, in seconds
    //secs = howmanysecs
	secs = 10
	StopTheClock()
    StartTheTimer()
}

function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
		hidemenu()
    }
    else
    {
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}

-->
