/// * banner configuration data * 
var serverName='www.dichrom.com';
var pathToImages='http://'+serverName+'/slideshow/';
var pathToSite='http://'+serverName+'/';


var mySlideList1 = ['slide_f1.jpg',  
     				'Neuer_name_web.jpg',
					'Neuer_name_web.jpg',
					'GPR_800_Sequant_web.jpg',
					'SPOTII_Ultimate_web.jpg',
					'SiliaSep_web',
					'slide_f3.jpg',
					'slide_f6.jpg'];
var myLinkList1 =  ['products/products_kromasil.shtml', 
					'news_main.shtml',
					'news_main.shtml',
					'products/products_protea.shtml', 
					'products/products_armen.shtml#topic2',
					'products/products_SiliCycleWeb.shtml',
					'products/products_sequant.shtml',
					'products/products_gtseptech.shtml'];


// set up a slide show with pictures and links
var mySlideShow1 = new SlideShow(mySlideList1,myLinkList1, 'slide1', 3500, "mySlideShow1");
var slideShowStatus="On";

// * banner functions * 
function setupSlideShow()
{
	if (document.images["slide1"]!=null) {mySlideShow1.play();}
}

function doLink(){
top.document.location=pathToSite+mySlideShow1.linkList[mySlideShow1.current];
}

function SlideShowOnOff(value){
	slideShowStatus=value;
}

function switchImage(imgName, imgSrc) 
{
  if (document.images)
  {
    if (imgSrc != "none")
    {   
		// alert(SlideShowStatus);
		if (slideShowStatus=="On") 
			{
			document.images[imgName].src = imgSrc;
			}
    }
  }
}

function SlideShow(slideList, linkList, image, speed, name)          
{
  this.slideList = slideList;
  this.linkList  = linkList;
  this.image = image;
  this.speed = speed;

  this.name = name;
  this.current = 0;
  this.timer = 0;
}

SlideShow.prototype.play = SlideShow_play;  

function SlideShow_play()       
{
  with(this)
  {
    if(current++ == slideList.length-1) current = 0;
    switchImage(image, pathToImages+slideList[current]);
    clearTimeout(timer);
    timer = setTimeout(name+'.play()', speed);
  }
}