var box_height = 250;
var box_width = 150;
var text_col = "#3A116D";
var back_col = "#ffffff";
var border_col = "#ffffff";
var text_size = 10;
var text_family = "verdana";
var time_change = 5;
var more_text = ">>>>";
var step_col=10;
var titles = new Array;
var contents = new Array;
var links = new Array;
var targets = new Array;

titles[0]="Titlu 1";
contents[0]="<b>re greg reg</b> erg324243242432424gre greg ergw regewgrgrewgergerwgrewgrew greg ewregerg";
links[0]="1";
targets[0]="_self";

titles[1]="Titlu 2";
contents[1]="re greg reg erg ergwg egregerwgreg wgre greg ergw regewgrgrewgergerwgrewgrew greg ew";
links[1]="2";
targets[1]="_self";

titles[2]="Titlu 3";
contents[2]="Text s hsaj 4837471 jhf 032 5- djf09- 2jnsd89y72345 23hjsh732  sd jsdk";
links[2]="3";
targets[2]="_self";

titles[3]="Titlu 4";
contents[3]="Text s hsaj 4837471 jhf 032 5- djf09- 2jnsd89y72345 23hjsh732  sd jsdk";
links[3]="4";
targets[3]="_self";


var pas=step_col=(Math.abs(Math.ceil(step_col))<101)?Math.abs(Math.ceil(step_col)):100;
var in_out = 0;
var max_tick=titles.length;
var actual = max_tick;
var actualel = null;var actuallk = null;
time_change = time_change *1000;
function HexToR(h) { return parseInt((cutHex(h)).substring(0,2),16) }
function HexToG(h) { return parseInt((cutHex(h)).substring(2,4),16) }
function HexToB(h) { return parseInt((cutHex(h)).substring(4,6),16) }
function cutHex(h) { return (h.charAt(0)=="#") ? h.substring(1,7) : h}
function col(dfcol,prcol)
{
	this.dfcol=dfcol;
	this.prcol=prcol;
	this.colr=HexToR(prcol);	
	this.colg=HexToG(prcol);
	this.colb=HexToB(prcol);	
	this.defr=HexToR(dfcol);	
	this.defg=HexToG(dfcol);	
	this.defb=HexToB(dfcol);	
	pasr=parseInt((defr-colr)/pas);
	pasg=parseInt((defg-colg)/pas);	
	pasb=parseInt((defb-colb)/pas);	col1();
}
function col1()
{
	if(pas==0){pas=step_col;	
	if (in_out==0)
	{	
		document.getElementById("tick"+actual+"").style.color=dfcol;		
		document.getElementById("link"+actual+"").style.color=dfcol;	
		in_out=1;		
		timer_tick=setTimeout("col(back_col,text_col)",time_change);	
	}else
	{		
		document.getElementById("tick"+actual+"").style.visibility="hidden";	
		actual++;
		in_out=0;	
		initial=setTimeout("switchIt()",400);	
	}	
}else
{
	pas--;
	colr+=pasr;
	colg+=pasg;	
	colb+=pasb;	
	colorset=setTimeout('coloreaza()',20)
}}
function coloreaza()
{
	document.getElementById(actualel).style.color="rgb("+colr+","+colg+","+colb+")";
	document.getElementById(actuallk).style.color="rgb("+colr+","+colg+","+colb+")";
	col1()
}
function openwindow1() {
	var newWindow = window.open('popup\\popup1.html','_inde99452','scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width=430,height=400,resizable=yes,left=150,top=150')
}
function openwindow2() {
	var newWindow = window.open('popup\\popup2.html','_inde99452','scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width=430,height=400,resizable=yes,left=150,top=150')
}
function openwindow3() {
	var newWindow = window.open('popup\\popup3.html','_inde99452','scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width=430,height=400,resizable=yes,left=150,top=150')
}
function openwindow4() {
	var newWindow = window.open('popup\\popup4.html','_inde99452','scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,width=430,height=400,resizable=yes,left=150,top=150')
}
function eye_ticker()
{
	document.write("<div style=\"height:"+box_height+"px;width:"+box_width+"px;overflow:hidden;padding:4px;border:1px solid "+border_col+";background-color:"+back_col+";font: "+text_size+" "+text_family+"\">");
	for (i=0;i<max_tick;i++)
	{	
		document.write("<div id=\"tick"+i+"\" style=\"width:"+(box_width-((document.all&&!window.opera)?8:2))+"px;position:absolute;visibility:hidden;color:"+back_col+";font: normal "+text_size+"px "+text_family+"\">"+"<center><b>"+titles[i]+"</b></center><br/>"+contents[i]+"<a href=\"javascript:openwindow"+links[i]+"()\" id=\"link"+i+"\" style=\"text-decoration:none;float:right;margin:1px;color:"+back_col+"\">[ "+more_text+" ]</a></div>")};document.write("</div>");switchIt();}function switchIt(){actual=(actual==max_tick)?0:actual;actualel="tick"+actual+"";actuallk="link"+actual+"";	document.getElementById(actualel).style.visibility="visible";	col(text_col,back_col);}