/*Browsercheck:*/ ie=document.all?1:0 // Internet Explorer n=document.layers?1:0 // Netscape 4.x //declare globals to build object reference var whichDom = "", styleObj = "", howDom ="", writeObj ="" var isNav4, isNav6, isIE var isBrand = navigator.appName var agt = navigator.userAgent.toLowerCase() var navVer = parseInt(navigator.appVersion) isNav4 = (isBrand == "Netscape" && navVer < 5) ? true : false isNav6 = (isBrand == "Netscape" && navVer >= 5) ? true : false isNav46 = ((isBrand == "Netscape") && (parseFloat(navigator.appVersion) >= parseFloat(4.6)) && (parseFloat(navigator.appVersion) < parseFloat(4.7))) ? true : false isNav47 = ((isBrand == "Netscape") && (parseFloat(navigator.appVersion) >= parseFloat(4.7))) ? true : false isIE = ((agt.indexOf("msie") != -1) && (parseInt(navVer) >= 4)) ? true : false //construct object reference var doc = document var layers = doc.layers var all = doc.all if (layers) { whichDom = '["' styleObj = '"]' } else if (all) { whichDom = ".all." styleObj = ".style" } else { whichDom = '.getElementById("' styleObj = '").style' } if (layers) { howDom = '.' writeObj = '.' } else if (all) { howDom = ".all." writeObj = "" } else { howDom = '.getElementById("' writeObj = '")' } //Css style object reference function setObject(obj) { var theObj if (typeof obj == "string") theObj = eval("document" + whichDom + obj + styleObj) else theObj = obj return theObj } //Content object reference function objectForWriting(obj,nest) { var theObj if (typeof obj == "string") if (n)//Navigator 4.x theObj = eval(nest + "document" + howDom + obj + writeObj + "document"); else theObj = eval("document" + howDom + obj + writeObj); else { theObj = obj } return theObj } /******************************************************************************** Here are the variables you must set: (this is the only part you have to change) Remember that, if you wan't different size for the layers, different clip or anything change that in the stylesheet. */ //The number of news lines var lines = 2; //The current first news var currentNews=0; //The delay between the fades (in milliseconds) smaller value gives less time: betweendelay=4000 //Do you wan't it to start over on the first one when it's gone trought all the news? //(set to 0 if not) var loop=1 //Which font do you want to use? FontFace='verdana,arial,helvetiva' //What font-size (in pixel)? FontSize=11 //Do you wan't it to fade out aswell? 1 for on, 0 for off fadeback=0 //Set the colors, first color is same as background, last color is the color it stops at: //You can have upto 7 colors, set the ones you wan't use to 0 colors=new Array() colors[0]='#FFFFFF' colors[1]='#EEEEEE' colors[2]='#CCCCCC' colors[3]='#999999' colors[4]='#666666' colors[5]='#333333' colors[6]='#000000' /*Dont change anything below this! *********************************************************************************/ fadeInit=new Function("oNews=new makeObj('divNews1','divCont'); fadeNews(0)"); function makeObj(obj,nest){ nest=(!nest) ? '':'document.'+nest+'.' this.css=setObject('divNews1'); this.writeref=objectForWriting(obj, nest); this.fadeIt=b_fadeIt this.obj = obj + "Object"; eval(this.obj + "=this") } function b_fadeIt(font,size,speed,fn,num,c0,c1,c2,c3,c4,c5,c6){ if(num60) text=news[(currentNews+i)%newsCounter]["text"].slice(0,60)+"..."; else text=news[(currentNews+i)%newsCounter]["text"]; link=news[(currentNews+i)%newsCounter]["link"]; target=news[(currentNews+i)%newsCounter]["target"]; writetext+='        '+time+'   ' +text +'
'; writetext+='
'; } if(n){this.writeref.write(writetext); this.writeref.close()} if (isNav6) this.writeref.innerHTML=writetext; if(ie) this.writeref.innerHTML=writetext num++ setTimeout(this.obj+'.fadeIt("'+font+'",'+size+','+speed+',"' +fn+'",'+num+',"'+c0+'","'+c1+'","'+c2+'","'+c3+'","'+c4+'","'+c5+'","'+c6+'")',speed) }else setTimeout('eval('+fn+')',betweendelay) } function fadeNews(num){ if (top.news==null) { alert("Warning: news file not loaded! Reload the page."); return; } currentNews=num; if(num=0){ oNews.fadeIt(FontFace,FontSize,100,'fadeNews('+(num+1) +')',7,colors[6],colors[5],colors[4],colors[3],colors[2],colors[1],colors[0]) } } /*End of fadescript **********************************************************************************/ //This is the news you wanna have, set the link and the text. If you don't wan't it to link anywhere //use a # as the link news=new Array(); //Copy there three lines and change the info and numbers to get more news. news[0]=new Array(); news[0]["time"]="16:14"; news[0]["text"]="Pedofilia: chiesa Olanda, si allarga scandalo "; news[0]["link"]="http://www.ansa.it/settori/webnews/20100310161435042581.html"; news[0]["target"]="_self"; news[0]["type"]="text"; news[1]=new Array(); news[1]["time"]="15:39"; news[1]["text"]="Inps: crollo domande invalidita', -58% in due mesi "; news[1]["link"]="http://www.ansa.it/settori/webnews/20100310153935042564.html"; news[1]["target"]="_self"; news[1]["type"]="text"; news[2]=new Array(); news[2]["time"]="15:07"; news[2]["text"]="Mali: prosegue trattativa per italiana "; news[2]["link"]="http://www.ansa.it/settori/webnews/20100310150735042557.html"; news[2]["target"]="_self"; news[2]["type"]="text"; news[3]=new Array(); news[3]["time"]="14:56"; news[3]["text"]="Indonesia: smantellati vertici di Jemaa Islamiyah "; news[3]["link"]="http://www.ansa.it/settori/webnews/20100310145635042548.html"; news[3]["target"]="_self"; news[3]["type"]="text"; news[4]=new Array(); news[4]["time"]="14:54"; news[4]["text"]="Via Poma: Vanacore, si indaga per istigazione al suicidio "; news[4]["link"]="http://www.ansa.it/settori/webnews/20100310145435042545.html"; news[4]["target"]="_self"; news[4]["type"]="text"; news[5]=new Array(); news[5]["time"]="14:38"; news[5]["text"]="Regionali: Bossi, esclusione lista Pdl mina democrazia "; news[5]["link"]="http://www.ansa.it/settori/webnews/20100310143835042536.html"; news[5]["target"]="_self"; news[5]["type"]="text"; news[6]=new Array(); news[6]["time"]="14:35"; news[6]["text"]="Iraq: voto, risultati preliminari entro domani "; news[6]["link"]="http://www.ansa.it/settori/webnews/20100310143535042535.html"; news[6]["target"]="_self"; news[6]["type"]="text"; news[7]=new Array(); news[7]["time"]="14:31"; news[7]["text"]="Regionali: 13/3 udienza al Consiglio di Stato "; news[7]["link"]="http://www.ansa.it/settori/webnews/20100310143135042531.html"; news[7]["target"]="_self"; news[7]["type"]="text"; //number of news in the current file var newsCounter=8;