var baseopacity=0
var endopacity=100

function showtext(thetext){
cleardowntimer()
if (!document.getElementById)
return
textcontainerobj=document.getElementById("navitext")
browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(baseopacity)
document.getElementById("navitext").innerHTML=thetext
fadingup=setInterval("gradualfadeup(textcontainerobj)",50)
}

function hidetext(){
clearuptimer()
if (!document.getElementById)
return
textcontainerobj=document.getElementById("navitext")
browserdetect=textcontainerobj.filters? "ie" : typeof textcontainerobj.style.MozOpacity=="string"? "mozilla" : ""
fadingdown=setInterval("gradualfadedown(textcontainerobj)",50)
}

function instantset(degree){
if (browserdetect=="mozilla")
textcontainerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
textcontainerobj.filters.alpha.opacity=degree
/*else if (document.getElementById && baseopacity==0)
document.getElementById("navitext").innerHTML=""*/
}

function clearuptimer(){
if (window.fadingup) clearInterval(fadingup);
baseopacity = 0
}

function cleardowntimer(){
if (window.fadingdown) clearInterval(fadingdown);
endopacity = 100
}

function gradualfadeup(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity<1)
cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.99)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else clearuptimer()
}

function gradualfadedown(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity>0)
cur2.style.MozOpacity=Math.max(parseFloat(cur2.style.MozOpacity)-0.1, 0)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity>0)
cur2.filters.alpha.opacity-=10
else cleardowntimer()
}
