function paintBackground()
{
  var w = window;  
  var h = w.innerHeight || (w.document.documentElement.clientHeight || w.document.body.clientHeight);
  $('aivbds').setStyle(
    {
      backgroundImage: "url(/Background.axd?Orientation=Vertical&Length=" + h + "&StartColor=f39911&EndColor=f4c88e)",
      backgroundRepeat: "repeat-x"
    }
  );
}


tempo = 7000;
elemento = "";

immagini = new Array();
immagini[0]='/UICs/header/images/img-top1.jpg';
immagini[1]='/UICs/header/images/img-top2.jpg';
immagini[2]='/UICs/header/images/img-top3.jpg';
immagini[3]='/UICs/header/images/img-top4.jpg';
immagini[4]='/UICs/header/images/img-top5.jpg';
immagini[5]='/UICs/header/images/img-top6.jpg';
immagini[6]='/UICs/header/images/img-top7.jpg';
immagini[7]='/UICs/header/images/img-top8.jpg';
immagini[8]='/UICs/header/images/img-top9.jpg';
immagini[9]='/UICs/header/images/img-top10.jpg';

function start(id)
{

elemento = window.document.getElementById(id);
if(elemento != null)
{
immagine();
}
}

function immagine()
{
do
{
num = Math.round((immagini.length-1)*Math.random());
}
while(elemento.src == immagini[num]);
elemento.src = immagini[num];
window.setTimeout("immagine()", tempo);
}
