

////////////////////////////////////////////////////////////////
// Javascript made by Rasmus Beyer Petersen - http://www.peters1.dk //
// modifyed by Esbern Holmes
////////////////////////////////////////////////////////////////
var SLIDE_sti = ''; // Adresse til mappen, hvor billederne er placeret

var SLIDE_text = new Array();

var SLIDE_billede = new Array();
var SLIDE_load = new Array();
var SLIDE_status, SLIDE_timeout;
var SLIDE_aktuel = 1;
var SLIDE_speed = 3000;
var SLIDE_fade = 2;
var SLIDE_antal = 1;

function SLIDE_load_slide()
{
for (i = 1; i <= SLIDE_text.length-1; i++)
{
  SLIDE_billede[i] = SLIDE_sti+i+'.jpg';
  SLIDE_load[i] = new Image();
  SLIDE_load[i].src = SLIDE_billede[i];
}
SLIDE_antal = SLIDE_billede.length-1;
}

function SLIDE_start()
{
  document.images.SLIDE_billedeBox.src = SLIDE_load[SLIDE_aktuel].src;
  document.images.SLIDE_billedeBox.alt= SLIDE_text[SLIDE_aktuel];

  SLIDE_slide();
  SLIDE_status = 'SLIDE_play';
  SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}

function SLIDE_play()
{
  SLIDE_aktuel++;
  SLIDE_slide();
  SLIDE_status = 'SLIDE_play';
  SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}


function SLIDE_slide()
{
  if (SLIDE_aktuel > (SLIDE_antal)) SLIDE_aktuel=1;
  if (SLIDE_aktuel < 1) SLIDE_aktuel = SLIDE_antal;
  if (document.all)
  {
    document.images.SLIDE_billedeBox.style.filter="blendTrans(duration=2)";
    document.images.SLIDE_billedeBox.style.filter="blendTrans(duration=SLIDE_fade)";
    document.images.SLIDE_billedeBox.filters.blendTrans.Apply();
  }
   document.images.SLIDE_billedeBox.src = SLIDE_load[SLIDE_aktuel].src;
   document.images.SLIDE_billedeBox.alt= SLIDE_text[SLIDE_aktuel];

  if (document.all) document.images.SLIDE_billedeBox.filters.blendTrans.Play();
}
