var to_mostra = null; var fadespeed=70 //speed of fade (5 or above). Smaller=faster. var baseopacity=0 function mostra(objDiv) { objDiv.style.display = "block"; slowhigh(objDiv) } function slowhigh(which2){ imgobj=which2 browserdetect=which2.filters? "ie" : typeof which2.style.MozOpacity=="string"? "mozilla" : "" instantset(baseopacity) highlighting=setInterval("gradualfade(imgobj)",fadespeed) } function instantset(degree){ cleartimer() if (browserdetect=="mozilla") imgobj.style.MozOpacity=degree/100 else if (browserdetect=="ie") imgobj.style.filter = "alpha(opacity=" + (degree*100) + ")"; //imgobj.filters.alpha.opacity=degree } function cleartimer(){ if (window.highlighting) clearInterval(highlighting) } function gradualfade(cur2){ if (browserdetect=="mozilla" && cur2.style.MozOpacity<0.91) cur2.style.MozOpacity=Math.min(parseFloat(cur2.style.MozOpacity)+0.1, 0.92) else if (browserdetect=="ie" && cur2.style.opacity<90) cur2.style.opacity = parseFloat(cur2.style.opacity) + 10 /*else if (browserdetect=="ie" && cur2.filters.alpha.opacity<92) cur2.filters.alpha.opacity+=10*/ else if (window.highlighting) clearInterval(highlighting) //cur2.xOpacity = cur2.style.opacity; cur2.style.filter = "alpha(opacity=" + (cur2.style.opacity) + ")"; //alert(cur2.style.opacity); }