////////////////////////////////////////////////////////////////
// Javascript made by Rasmus Beyer Petersen - http://www.peters1.dk //
////////////////////////////////////////////////////////////////


	var SLIDE_billede = new Array();
	var SLIDE_load = new Array();
	var SLIDE_text = new Array();
	var SLIDE_status, SLIDE_timeout;
	var SLIDE_aktuel = 1;
	var SLIDE_speed = 9000;
	var SLIDE_fade = 2;
	var SLIDE_antal;



function SLIDE_init(){

	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.getElementById('SLIDE_pause').disabled = true;
  document.images.SLIDE_billedeBox.src = SLIDE_load[SLIDE_aktuel].src;
  document.getElementById("SLIDE_textBox").innerHTML= SLIDE_text[SLIDE_aktuel];
}

function SLIDE_play()
{
  document.getElementById('SLIDE_play').disabled = true;
  document.getElementById('SLIDE_pause').disabled = false;
  SLIDE_aktuel++;
  SLIDE_slide();
  SLIDE_status = 'SLIDE_play';
  SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}

function SLIDE_pause()
{
  clearTimeout(SLIDE_timeout);
  SLIDE_status = 'SLIDE_pause';
  document.getElementById('SLIDE_pause').disabled = true;
  document.getElementById('SLIDE_play').disabled = false;	
}

function SLIDE_tilbage()
{
  clearTimeout(SLIDE_timeout);
  SLIDE_aktuel--;
  SLIDE_slide();
  if (SLIDE_status != 'SLIDE_pause') SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}

function SLIDE_frem()
{
  clearTimeout(SLIDE_timeout);
  SLIDE_aktuel++;
  SLIDE_slide()
  if (SLIDE_status != 'SLIDE_pause') SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}


function SLIDE_slide()
{
  if (SLIDE_status != 'SLIDE_pause')
  {
    document.getElementById('SLIDE_play').disabled = true;
    document.getElementById('SLIDE_pause').disabled = false;
  }
  if (SLIDE_aktuel > (SLIDE_antal)) SLIDE_aktuel=1;
  if (SLIDE_aktuel < 1) SLIDE_aktuel = SLIDE_antal;
  if (document.all)
  {
    document.getElementById("SLIDE_textBox").style.background = "transparent";
    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;
  if (document.getElementById) document.getElementById("SLIDE_textBox").innerHTML= SLIDE_text[SLIDE_aktuel];
  if (document.all) document.images.SLIDE_billedeBox.filters.blendTrans.Play();
}

function SLIDE_hastighed(SLIDE_valgt)
{
  SLIDE_speed = SLIDE_valgt.options[SLIDE_valgt.selectedIndex].value;
}