// script by douglas@katipo.co.nz
var d=document
var loading=1
var Netscape=d.layers;
var Explorer=d.all;
var Dom= (d.getElementsByTagName)? d.getElementsByTagName('div'):null;
var time=0
var dbody=d.body || d
var ticker=0
var vis='visible'
var hid='hidden'
if(Netscape){
    hid='hide'
    vis='hide'
}
var olddivstyle=0;
var alldivs=Netscape || Explorer || Dom
//var alldivs=Explorer || Dom
var delaying=1;
var ondelay=0;
function TMstayon(num){
    TMoff()
    nom="menu"+num
    thediv=alldivs[nom]
    if (thediv){
        thedivstyle=thediv.style || thediv
        thedivstyle.visibility=vis
	olddivstyle=thedivstyle
    }
    ticker=1
}
function TMon(num){
    if(loading){
        setTimeout('TMon("'+num+'")',100)
        return false
    }
    ondelay=setTimeout("TMstayon("+num+")",100)
    return true
}
function TMoff(){
    clearTimeout(ondelay)
    if (olddivstyle){
        olddivstyle.visibility=hid
    }
}
function timer(){
    ticker=0
    clearTimeout(time)
    time=window.setTimeout("TMoff2()",100)
}
function TMoff2(){
    if (!ticker) TMoff()
}
d.onclick=TMoff