/**
 * @author Vis
 */
////////////////////////////////////////////////////////////////
// Javascript made by Rasmus - http://www.peters1.dk //
////////////////////////////////////////////////////////////////

var SLIDE_path = 'http://www.volucer.it/TACSlider/img/'; // Path to the folder, where the images are put.

var SLIDE_text = new Array();
SLIDE_text[1]  = ''; // Text to Image 1
SLIDE_text[2]  = ''; // Text to Image 2
SLIDE_text[3]  = ''; // Text to Image 3
SLIDE_text[4]  = ''; // Text to Image 4
SLIDE_text[5]  = ''; // Text to Image 5
SLIDE_text[6]  = ''; // Text to Image 5
SLIDE_text[7]  = ''; // Text to Image 5
SLIDE_text[8]  = ''; // Text to Image 5
SLIDE_text[9]  = ''; // Text to Image 5
SLIDE_text[10]  = ''; // Text to Image 5
SLIDE_text[11]  = ''; // Text to Image 5
SLIDE_text[12]  = ''; // Text to Image 5
SLIDE_text[13]  = ''; // Text to Image 5
SLIDE_text[14]  = ''; // Text to Image 5
SLIDE_text[15]  = ''; // Text to Image 5
SLIDE_text[16]  = ''; // Text to Image 5
SLIDE_text[17]  = ''; // Text to Image 5
SLIDE_text[17]  = ''; // Text to Image 5
SLIDE_text[18]  = ''; // Text to Image 5
SLIDE_text[19]  = ''; // Text to Image 5
SLIDE_text[20]  = ''; // Text to Image 5
SLIDE_text[21]  = ''; // Text to Image 5
SLIDE_text[22]  = ''; // Text to Image 5
SLIDE_text[23]  = ''; // Text to Image 5


// Don't change anything under here...

var SLIDE_pic = new Array();
var SLIDE_load = new Array();
var SLIDE_status, SLIDE_timeout;
var SLIDE_actual = 1;
var SLIDE_speed = 3000;
var SLIDE_fade = 2;

//for (i = 1; i <= SLIDE_text.length-1; i++)
//{
//  SLIDE_pic[i] = SLIDE_path+i+'.jpg';
//  SLIDE_load[i] = new Image();
//  SLIDE_load[i].src = SLIDE_pic[i];
//}

SLIDE_load[1] = new Image();
SLIDE_load[1].src = "TACSlider/img/TC001_STENOSI.jpg";

SLIDE_load[2] = new Image();
SLIDE_load[2].src = "TACSlider/img/TC002_STENOSI.jpg";

SLIDE_load[3] = new Image();
SLIDE_load[3].src = "TACSlider/img/TC003_STENOSI.jpg";

SLIDE_load[4] = new Image();
SLIDE_load[4].src = "TACSlider/img/TC004_STENOSI.jpg";

SLIDE_load[5] = new Image();
SLIDE_load[5].src = "TACSlider/img/TC005_STENOSI.jpg";

SLIDE_load[6] = new Image();
SLIDE_load[6].src = "TACSlider/img/TC006_STENOSI.jpg";

SLIDE_load[7] = new Image();
SLIDE_load[7].src = "TACSlider/img/TC007_STENOSI.jpg";

SLIDE_load[8] = new Image();
SLIDE_load[8].src = "TACSlider/img/TC008_STENOSI.jpg";

SLIDE_load[9] = new Image();
SLIDE_load[9].src = "TACSlider/img/TC009_STENOSI.jpg";

SLIDE_load[10] = new Image();
SLIDE_load[10].src = "TACSlider/img/TC010_STENOSI.jpg";

SLIDE_load[11] = new Image();
SLIDE_load[11].src = "TACSlider/img/TC011_STENOSI.jpg";

SLIDE_load[12] = new Image();
SLIDE_load[12].src = "TACSlider/img/TC012_STENOSI.jpg";

SLIDE_load[13] = new Image();
SLIDE_load[13].src = "TACSlider/img/TC013_STENOSI.jpg";

SLIDE_load[14] = new Image();
SLIDE_load[14].src = "TACSlider/img/TC014_STENOSI.jpg";

SLIDE_load[15] = new Image();
SLIDE_load[15].src = "TACSlider/img/TC015_STENOSI.jpg";

SLIDE_load[16] = new Image();
SLIDE_load[16].src = "TACSlider/img/TC016_STENOSI.jpg";

SLIDE_load[17] = new Image();
SLIDE_load[17].src = "TACSlider/img/TC017_STENOSI.jpg";

SLIDE_load[18] = new Image();
SLIDE_load[18].src = "TACSlider/img/TC018_STENOSI.jpg";

SLIDE_load[19] = new Image();
SLIDE_load[19].src = "TACSlider/img/TC019_STENOSI.jpg";

SLIDE_load[20] = new Image();
SLIDE_load[20].src = "TACSlider/img/TC020_STENOSI.jpg";

SLIDE_load[21] = new Image();
SLIDE_load[21].src = "TACSlider/img/TC021_STENOSI.jpg";

SLIDE_load[22] = new Image();
SLIDE_load[22].src = "TACSlider/img/TC022_STENOSI.jpg";

SLIDE_load[23] = new Image();
SLIDE_load[23].src = "TACSlider/img/TC023_STENOSI.jpg";



var SLIDE_count = SLIDE_load.length-1;

function SLIDE_start()
{
  document.getElementById('SLIDE_pause').disabled = true;
  document.images.SLIDE_picBox.src = SLIDE_load[SLIDE_actual].src;
  document.getElementById("SLIDE_textBox").innerHTML= SLIDE_text[SLIDE_actual];
}

function SLIDE_play()
{
  document.getElementById('SLIDE_play').disabled = true;
  document.getElementById('SLIDE_pause').disabled = false;
  SLIDE_actual++;
  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_back()
{
  clearTimeout(SLIDE_timeout);
  SLIDE_actual--;
  SLIDE_slide();
  if (SLIDE_status != 'SLIDE_pause') SLIDE_timeout = setTimeout("SLIDE_play()",SLIDE_speed);
}

function SLIDE_forward()
{
  clearTimeout(SLIDE_timeout);
  SLIDE_actual++;
  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_actual > (SLIDE_count)) SLIDE_actual=1;
  if (SLIDE_actual < 1) SLIDE_actual = SLIDE_count;
  if (document.all)
  {
    document.getElementById("SLIDE_textBox").style.background = "transparent";
    document.images.SLIDE_picBox.style.filter="blendTrans(duration=2)";
    document.images.SLIDE_picBox.style.filter="blendTrans(duration=SLIDE_fade)";
    document.images.SLIDE_picBox.filters.blendTrans.Apply();
  }
  document.images.SLIDE_picBox.src = SLIDE_load[SLIDE_actual].src;
  if (document.getElementById) document.getElementById("SLIDE_textBox").innerHTML= SLIDE_text[SLIDE_actual];
  if (document.all) document.images.SLIDE_picBox.filters.blendTrans.Play();
}

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

