/* Code & Umsetzung (C) 2007 by aktivComm GmbH, Weinheim
                             http://www.aktivcomm.de/  */


var rotimage_next = 0;

function start_rotimage_timer()
{
   window.setTimeout(rotate_image, 10000);
}


function rotimage_blend_raster_in()
{
   var blendraster = document.getElementById("blendraster");

   if (blendraster) {
      blendraster.style.visibility = "visible";
   }
}

function rotimage_blend_raster_out()
{
   var blendraster = document.getElementById("blendraster");

   if (blendraster) {
      blendraster.style.visibility = "hidden";
   }

   window.setTimeout(rotate_image, 10000);
}

function rotimage_next_image()
{
   var img = document.getElementById("rotimage");

   if (img) {
      img.onload = rotimage_delayed_blend_raster_out;
      img.src = rot_images[rotimage_next];

      rotimage_next++;
      if (rotimage_next >= rot_images.length) rotimage_next = 0;
   }

}

function rotimage_delayed_blend_raster_out()
{
   window.setTimeout(rotimage_blend_raster_out, 200);
}

function rotate_image()
{
   rotimage_blend_raster_in();
   window.setTimeout(rotimage_next_image, 200);
}

