ie=document.all?1:0;
n=document.layers?1:0;
m=document.getElementById?1:0;

betweendelay=5000; //link
betweendelay2=20; //vuoto

var loop=1;

FontFace='Verdana,arial,helvetiva';

FontSize=12;

fadeback=1;

//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]='#FFF9ED';
colors[1]='#EEEEEE';
colors[2]='#CCCCCC';
colors[3]='#999999';
colors[4]='#666666';
colors[5]='#333333';
colors[6]='#000000';

fadeInit=new Function("oNews=new makeObj('divSlide','divCont'); fadeNews(0)");
function makeObj(obj,nest){
    nest=(!nest) ? '':'document.'+nest+'.';
    //this.css=(n) ? eval(nest+'document.'+obj):eval(obj+'.style');
    //this.writeref=(n) ? eval(nest+'document.'+obj+'.document'):eval(obj);		
	this.css=(m) ? eval('document.getElementById("'+obj+'").style'):eval(obj+'.style');
    this.writeref=(m) ? eval('document.getElementById("'+obj+'")'):eval(obj);
	this.fadeIt=b_fadeIt;
    this.obj = obj + "Object"; 	eval(this.obj + "=this");
}
function b_fadeIt(text,link,font,size,speed,fn,num,c0,c1,c2,c3,c4,c5,c6){
	if(num<arguments.length && arguments[num]!=0){
		writetext='<a href="'+link+'" class="l_offerte" style="text-decoration:none; font-size:'+size+'px">'
		+'<font face="'+font+'" color="'+arguments[num]+'">'+text+'</font></a>';
		if(n){this.writeref.write(writetext); this.writeref.close()};
		if(m){this.writeref.innerHTML=writetext};
		if(ie) this.writeref.innerHTML=writetext;
		num++;
		setTimeout(this.obj+'.fadeIt("'+text+'","'+link+'","'+font+'",'+size+','+speed+',"'
		+fn+'",'+num+',"'+c0+'","'+c1+'","'+c2+'","'+c3+'","'+c4+'","'+c5+'","'+c6+'")',speed);
	}else {
		//alert(fn.substring(0,8));
		if (fn.substring(0,8)=='fadeBack') 
			delay = betweendelay; //link
		else 
			delay = betweendelay2; //vuoto
		setTimeout('eval('+fn+')',delay);
	}
}
function fadeNews(num){
	if(num<news.length){
		fn=fadeback?'fadeBack('+num+')':'fadeNews('+(num+1)+')';
		oNews.fadeIt(news[num],link[num],FontFace,FontSize,80,fn,7,
		colors[0],colors[1],colors[2],colors[3],colors[4],colors[5],colors[6]);
	}else if(loop)fadeNews(0);
}
function fadeBack(num){
	if(num>=0){
		oNews.fadeIt(news[num],link[num],FontFace,FontSize,80,'fadeNews('+(num+1)
		+')',7,colors[6],colors[5],colors[4],colors[3],colors[2],colors[1],colors[0]);
	}
}

if (news.length > 0) {
  onload=fadeInit;
}