﻿<!-- Copyright 2001, Sandeep Gangadharan -->
<!-- For more free scripts go to http://sivamdesign.com/scripts/ -->
<!--
var src ="../images/silderImage/";
var timer= 5000;
var images = 0;
var photos = new Array;
var urlinks = new Array;
var num = 0;
preload=new Image(619,99);   // change the numbers at the left to match the size of the images. 

function getphotovalue()
{
// change the names of the images in this array to suit your needs
photos=($('photoarray').value).split(',');
urlinks=($('urlinkarray').value).split(',');
auto();
}
function stop(id)
{
	window.clearTimeout(TI);	
	try
	{
		$( 'image' + num).className = 'slideshowmouseover';
		$( 'image' + images).className = 'slideshowmouseout';		
	}
	catch(e)
	{}
	var value = id.substr(id.length-1,id.length);   
	images = value -1;
	num = value;
	$('slides').src=src+photos[images]; 
  if(urlinks[images])
  {
  	$('slides_link').href=urlinks[images];
  	$('slides_link').target='blank';
  }
	$( 'image' + num).className = 'slideshowmouseover';	
}
function auto(msg) 
{  
  if (photos.length >= images) 
  {
   $('slides').src=src+photos[images];   
   if(urlinks[images])
   {
   	$('slides_link').href=urlinks[images];
  	$('slides_link').target='blank';
   }
   num = images + 1;
   try
   {
   	$( 'image' + num).className = 'slideshowmouseover';
   	$( 'image' + images).className = 'slideshowmouseout';
   }
   catch(e){}
   if (images == photos.length) 
   { 
  	restart();
   }
   else
   {
   	images++;	
   }
  }
  TI=window.setTimeout("auto()", timer);
}

function restart() 
{
  $('slides').src=src+photos[0];  
  if(urlinks[0])
  {
  	$('slides_link').href=urlinks[0];
  	$('slides_link').target='blank';
  }
  $( 'image' + 1).className = 'slideshowmouseover';
  $( 'image' + photos.length).className = 'slideshowmouseout';
  images = 1;
  num = 1;
}
//-->