var arr_mess = new Array; var pause = 5; var index = 0; var element = 'meteo'; var updown = -1; mess = arr_mess[0]; init(element); function alpha(){ if (navigator.appName == "Netscape"){ if((parseFloat(document.getElementById(element).style.MozOpacity) && updown==-1) || (parseFloat(document.getElementById(element).style.MozOpacity)<1 && updown==1)){ document.getElementById(element).style.MozOpacity=parseFloat(document.getElementById(element).style.MozOpacity)+(updown*0.2); setTimeout("alpha()",200); }else{ if(updown==-1) { document.getElementById(element).innerHTML = mess; updown=1; alpha(); } else updown=-1; } }else{ if((parseFloat(document.getElementById(element).filters.alpha.opacity) && updown==-1) || (parseFloat(document.getElementById(element).filters.alpha.opacity)<100 && updown==1)){ document.getElementById(element).filters.alpha.opacity=parseFloat(document.getElementById(element).filters.alpha.opacity)+(updown*20); setTimeout("alpha()",200); }else{ if(updown==-1) { document.getElementById(element).innerHTML = mess; updown=1 alpha(); } else updown=-1; } } } function action(){ mess=arr_mess[index]; alpha(-1); if(index+1>arr_mess.length-1) index=0; else index++; setTimeout("action()",(pause+1)*1000); } function init(element){ if (navigator.appName == "Netscape") document.getElementById(element).style.MozOpacity=1; else document.getElementById(element).filters.alpha.opacity = 100; document.getElementById(element).innerHTML = mess; index=1; setTimeout("action()",pause*1000); }