function HexArray(n)
{
        this.length=n;

        for(i=0;i<10;i++)
                this[i]=i;

        this[10]="A";
        this[11]="B";
        this[12]="C";
        this[13]="D";
        this[14]="E";
        this[15]="F";

        return(this)
}

hex=new HexArray();

function DezToHex(x)
{
        var high=Math.floor(x/16);
        var low=Math.floor(x-high*16);
        return(hex[high]+""+hex[low])
}

function begmtxt(text,start_red,start_green,start_blue,end_red,end_green,end_blue)
{
         cr=new Array();
         cg=new Array();
         cb=new Array();
         c=0;
         t=text;
         l=text.length;
        for(j=0;j<l+1;j++)
        {
    cr[j]=start_red-j*(start_red-end_red)/(l-1);
    cg[j]=start_green-j*(start_green-end_green)/(l-1);
    cb[j]=start_blue-j*(start_blue-end_blue)/(l-1);
  }

        for(j=0;j<l+1;j++)
        {
                cr[j+l]=cr[l-j];
                cg[j+l]=cg[l-j];
                cb[j+l]=cb[l-j];
  }
        animate();
}

function animate()
{
        tn="";
        for(i=0;i<l+1;i++)
        {
                cjred=cr[Math.abs(c-i)];
          cjgreen=cg[Math.abs(c-i)];
          cjblue=cb[Math.abs(c-i)];
          tn=tn+"<FONT COLOR='#"+DezToHex(cjblue)+DezToHex(cjgreen)+DezToHex(cjred)+"'>"+t.substring(i,i+1)+"</FONT>";
  }


        //alert(tn);
        document.getElementById("Festival").innerHTML=tn;

        c = (c==l*2) ? 0 : (c+1);


        setTimeout('animate()',100);
}
window.onload=begmtxt("Tango Speyer & Tangohaus Informiert",0,255,255,50,50,255); 