 //Images Slider By Ing. Manuel Javier Jimenez Rico
 //declaring local variables / declarando varibles locales
 var banner = new Array(9); //array to hold the images / arreglo para almacenar imagenes
 var start = null; 
 var counter = 1; //counts the image sequences
 var delayTime = null; //user defined


 if(document.images) //pre-load all the images
 {
   /* change the looping condition if you want
      to add or remove images. Do not load too
      many images, it will slow down the program's
      loading time [e.g. 30 or above images] */

   for(i = 1; i <= 9; i++)
   {
     banner[i] = new Image();
     banner[i].src = "Images/AnimHistory" + i + ".gif";
   }
 }


 //function for getting the user defined delay time
 function getDelayTime(dlTime)
 {
   var temp = parseInt(dlTime);
   if(temp != NaN)
    delayTime = temp;

   else
    delayTime = 4000;
 }


 //function for changing the images
 function anim()
 {
   counter++;
   document.getElementById("banner").src = banner[counter].src;
   if(counter == 9)
    counter = 0; //sets the counter value to 0
 }


 //function for starting the slide show
 function slide()
 {
   getDelayTime(8500);
   start = setInterval("anim()", delayTime);
  /* with(document.form1)
   {
     
     stShow.disabled = true;
     spShow.disabled = false;
   }*/
 }


 //function to stop the slide show
/* function stopSlide()
 {
   clearInterval(start);
   document.form1.stShow.disabled = false;
   document.form1.spShow.disabled = true;
 }*/
































/*function bannerHandler()
{
if (document.images)
{
var banner= new Image();
banner.src="Images/frontAnim1.gif";
var banner1= new Image();
banner1.src="Images/frontanim2.gif";

//image= new document.getElementById("front_Anim");
path=image.src;
setTimeout("image.src=baner.src",50000);
setTimeout("image.src=baner1.src",25000);
switch (path)
{
	case "Images/frontAnim1.gif":
	image.src="Images/frontanim2.gif";
	break;
	case "Images/frontanim2.gif";:
	image.src="Images/frontAnim1.gif";
	break;
}
}
}*/