/* rotator script for splash-images in page */


var rotatorSpeed = 12000;  //millisekunden

var filterSpeed = 3;     //1-10

/* var images = "splash_home_2.jpg;splash_home_3.jpg;splash_home_1.jpg" */	/* IS DEFINED BEFORE!!! */

if(images.indexOf(";")>-1) {var allImages = images.split(';');}

function changeOpac(opacity, id) 

{ 

 var object = document.getElementById(id).style; 

     object.opacity = (opacity / 100); 

     object.MozOpacity = (opacity / 100); 

     object.KhtmlOpacity = (opacity / 100); 

     object.filter = "alpha(opacity=" + opacity + ")"; 

     object = null;

} 

 

function blendimage(divid, imageid, imagefile, millisec) 

{ 

 var speed = Math.round(millisec / 100); 

 var timer = 0; 

 

     changeOpac(10, divid);    

     

     document.getElementById(divid).style.backgroundImage = "url(" + imagefile + ")"; 

 

     timer = 0; 

    

     for(i = 10; i <= 100; i++) 

     { 

      setTimeout("changeOpac(" + i + ",'" + divid + "')",(timer * speed)); 

      timer++; 

     }      

    

     speed = null;

     timer = 0;

}

 

function rotator(counter)

{

 try

 {

  counter++;

  if(counter>allImages.length-1) counter=0;

  if(allImages[counter] != "")

  {

   blendimage('id_1_5_bild','img_1_5','/v3/general/img/rotate/' + allImages[counter],1000);

  }

 }

 catch(exception)

 {

  window.status = exception.description;

 }

 setTimeout("rotator(" + counter + ")",rotatorSpeed);

}

 


