var dimopacity=60
var mozdimopacity=dimopacity/100

function fade_image_up_again(img_id)
{
cleardowntimer()
if (!document.getElementById)
return
containerobj=document.getElementById(img_id)
browserdetect=containerobj.filters? "ie" : typeof containerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(dimopacity)
fadingup=setInterval("gradualfadeup(containerobj)",40)
}

function fade_image_down_slightly(img_id)
{
clearuptimer()
if (!document.getElementById)
return
containerobj=document.getElementById(img_id)
browserdetect=containerobj.filters? "ie" : typeof containerobj.style.MozOpacity=="string"? "mozilla" : ""
instantset(100)
fadingdown=setInterval("gradualfadedown(containerobj)",40)
}

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 if (window.fadingup)
clearInterval(fadingup)
}

function gradualfadedown(cur2){
if (browserdetect=="mozilla" && cur2.style.MozOpacity>mozdimopacity)
cur2.style.MozOpacity=Math.max(parseFloat(cur2.style.MozOpacity)-0.1, mozdimopacity)
else if (browserdetect=="ie" && cur2.filters.alpha.opacity>dimopacity)
cur2.filters.alpha.opacity-=10
else if (window.fadingdown)
clearInterval(fadingdown)
}

function instantset(degree){
if (browserdetect=="mozilla")
containerobj.style.MozOpacity=degree/100
else if (browserdetect=="ie")
containerobj.filters.alpha.opacity=degree
}

function clearuptimer(){
if (window.fadingup) clearInterval(fadingup);
}

function cleardowntimer(){
if (window.fadingdown) clearInterval(fadingdown);
}

