//===========================================================
//Script:   JavaScript Cross-Browser SlideShow Script
//          With Cross-Fade Effect between Images
//          Adjustable Timing and Unlimited Images
//Function: Displays images continuously in a slideshow
//          presentation format, with a fade effect on
//          image transitions.
//Browsers: All common browsers: NS3-6, IE 4-6
//          Fade effect only in IE; others degrade gracefully
//Author:   etLux
//===========================================================

//Step 1.
//Put the following script in the head of your page:

//<script>
// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 2000

// Duration of crossfade (seconds)
var crossFadeDuration = 2

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'img/1Watchmen.jpg'
Pic[1] = 'img/2SWTOR.jpg'
Pic[2] = 'img/3Drawn to Life2.jpg'
Pic[3] = 'img/4Aliens.jpg'
Pic[4] = 'img/5BrutalLegend.jpg'
Pic[5] = 'img/2nd Life.jpg'
Pic[6] = 'img/El Cartel.jpg'
Pic[7] = 'img/esurance.jpg'
Pic[8] = 'img/FEAR2.jpg'
Pic[9] = 'img/Fracture.jpg'
Pic[10] = 'img/Indy Lego2.jpg'
Pic[11] = 'img/M4M.jpg'
Pic[12] = 'img/Mercs2.jpg'
Pic[13] = 'img/MyVictim.jpg'
Pic[14] = 'img/Nanovor.jpg'
Pic[15] = 'img/Nike.jpg'
Pic[16] = 'img/Orchid.jpg'
Pic[17] = 'img/PowerRangers.jpg'
Pic[18] = 'img/RAN.jpg'
Pic[19] = 'img/Saboteur.jpg'
Pic[20] = 'img/Silk Trees.jpg'
Pic[21] = 'img/SM.jpg'
Pic[22] = 'img/TED.jpg'
Pic[23] = 'img/The Violent Kind.jpg'
Pic[24] = 'img/Untitled.jpg'
Pic[25] = 'img/Vampyre Story.jpg'
Pic[26] = 'img/WG.jpg'
Pic[27] = 'img/zadaptation.jpg'
Pic[28] = 'img/zaliensyndrome.jpg'
Pic[29] = 'img/zbonneville.jpg'
Pic[30] = 'img/Zconan.jpg'
Pic[31] = 'img/zcornerstore.jpg'
Pic[32] = 'img/zcq.jpg'
Pic[33] = 'img/zhalflife.jpg'
Pic[34] = 'img/zhamiltons.jpg'
Pic[35] = 'img/zhuman.jpg'
Pic[36] = 'img/zlostintranslation.jpg'
Pic[37] = 'img/zlurkin.jpg'
Pic[38] = 'img/znightofhenna.jpg'
Pic[39] = 'img/znumb.jpg'
Pic[40] = 'img/zpsychonauts.jpg'
Pic[41] = 'img/zsearchers.jpg'
Pic[42] = 'img/zzerophilia.jpg'

var Height = new Array()

Height[0] = 480
Height[1] = 480
Height[2] = 480
Height[3] = 480
Height[4] = 480
Height[5] = 480
Height[6] = 480
Height[7] = 480
Height[8] = 480
Height[9] = 480
Height[10] = 480
Height[11] = 480
Height[12] = 480
Height[13] = 480
Height[14] = 480
Height[15] = 480
Height[16] = 480
Height[17] = 480
Height[18] = 480
Height[19] = 480
Height[20] = 480
Height[21] = 480
Height[22] = 480
Height[23] = 480
Height[24] = 480
Height[25] = 480
Height[26] = 480
Height[27] = 480
Height[28] = 480
Height[29] = 480
Height[30] = 480
Height[31] = 480
Height[32] = 480
Height[33] = 480
Height[34] = 480
Height[35] = 480
Height[36] = 480
Height[37] = 480
Height[38] = 480
Height[39] = 480
Height[40] = 480
Height[41] = 480
Height[42] = 480

var Width = new Array()

Width[0] = 640
Width[1] = 640
Width[2] = 640
Width[3] = 640
Width[4] = 640
Width[5] = 640
Width[6] = 640
Width[7] = 640
Width[8] = 640
Width[9] = 640
Width[10] = 640
Width[11] = 640
Width[12] = 640
Width[13] = 640
Width[14] = 640
Width[15] = 640
Width[16] = 640
Width[17] = 640
Width[18] = 640
Width[19] = 640
Width[20] = 640
Width[21] = 640
Width[22] = 640
Width[23] = 640
Width[24] = 640
Width[25] = 640
Width[26] = 640
Width[27] = 640
Width[28] = 640
Width[29] = 640
Width[30] = 640
Width[31] = 640
Width[32] = 640
Width[33] = 640
Width[34] = 640
Width[35] = 640
Width[36] = 640
Width[37] = 640
Width[38] = 640
Width[39] = 640
Width[40] = 640
Width[41] = 640
Width[42] = 640

var Url = new Array() // addendum to allow links to follow the slideshow, too!

Url[0] = 'index.php'
Url[1] = 'index.php'
Url[2] = 'index.php'
Url[3] = 'index.php'
Url[4] = 'index.php'
Url[5] = 'index.php'
Url[6] = 'index.php'
Url[7] = 'index.php'
Url[8] = 'index.php'
Url[9] = 'index.php'
Url[10] = 'index.php'
Url[11] = 'index.php'
Url[12] = 'index.php'
Url[13] = 'index.php'
Url[14] = 'index.php'
Url[15] = 'index.php'
Url[16] = 'index.php'
Url[17] = 'index.php'
Url[18] = 'index.php'
Url[19] = 'index.php'
Url[20] = 'index.php'
Url[21] = 'index.php'
Url[22] = 'index.php'
Url[23] = 'index.php'
Url[24] = 'index.php'
Url[25] = 'index.php'
Url[26] = 'index.php'
Url[27] = 'index.php'
Url[28] = 'index.php'
Url[29] = 'index.php'
Url[30] = 'index.php'
Url[31] = 'index.php'
Url[32] = 'index.php'
Url[33] = 'index.php'
Url[34] = 'index.php'
Url[35] = 'index.php'
Url[36] = 'index.php'
Url[37] = 'index.php'
Url[38] = 'index.php'
Url[39] = 'index.php'
Url[40] = 'index.php'
Url[41] = 'index.php'
Url[42] = 'index.php'

var Title = new Array()

Title[0] = 'Caption'
Title[1] = 'Caption'
Title[2] = 'Caption'
Title[3] = 'Caption'
Title[4] = 'Caption'
Title[5] = 'Caption'
Title[6] = 'Caption'
Title[7] = 'Caption'
Title[8] = 'Caption'
Title[9] = 'Caption'
Title[10] = 'Caption'
Title[11] = 'Caption'
Title[12] = 'Caption'
Title[13] = 'Caption'
Title[14] = 'Caption'
Title[15] = 'Caption'
Title[16] = 'Caption'
Title[17] = 'Caption'
Title[18] = 'Caption'
Title[19] = 'Caption'
Title[20] = 'Caption'
Title[21] = 'Caption'
Title[22] = 'Caption'
Title[23] = 'Caption'
Title[24] = 'Caption'
Title[25] = 'Caption'
Title[26] = 'Caption'
Title[27] = 'Caption'
Title[28] = 'Caption'
Title[29] = 'Caption'
Title[30] = 'Caption'
Title[31] = 'Caption'
Title[32] = 'Caption'
Title[33] = 'Caption'
Title[34] = 'Caption'
Title[35] = 'Caption'
Title[36] = 'Caption'
Title[37] = 'Caption'
Title[38] = 'Caption'
Title[39] = 'Caption'
Title[40] = 'Caption'
Title[41] = 'Caption'
Title[42] = 'Caption'

// =======================================
// do not edit anything below this line
// =======================================

var tss;
var jss = randomWholeNumber(0, Pic.length - 1);
var pss = Pic.length;

var preLoad = new Array();
for (iss = 0; iss < pss; iss++){
   preLoad[iss] = new Image();
   preLoad[iss].src = Pic[iss];
   preLoad[iss].height = Height[iss];
   preLoad[iss].width = Width[iss];
}

function runSlideShow(){
   var myIDObj = document.getElementById('indexPics');
   var mySlideShowObj = document.images.SlideShow;
	
   if (document.all){
      mySlideShowObj.style.filter="blendTrans(duration=2)";
      mySlideShowObj.style.filter="blendTrans(duration=crossFadeDuration)";
      mySlideShowObj.filters.blendTrans.Apply();
   }
   mySlideShowObj.src = preLoad[jss].src;
   mySlideShowObj.height = preLoad[jss].height;
   mySlideShowObj.width = preLoad[jss].width;
   myIDObj.src = Url[jss];
   myIDObj.title = Title[jss];

   if (document.all){
      mySlideShowObj.filters.blendTrans.Play();
   }
   jss = randomWholeNumber(0,Pic.length - 1);
   if (jss > (pss - 1))
		jss = 0;
   tss = setTimeout('runSlideShow()', slideShowSpeed);
}

function randomWholeNumber(nLower, nUpper) {
	var rnd = nLower + (nUpper - nLower + 1) * Math.random();
	return Math.floor(rnd);
}

//</script>

//===========================================================

//Step 2.
//Put this onload event call in your body tag:
  
//<body onload="runSlideShow()">  

//===========================================================

//Step 3.
//Put this in the body of your page where you want the 
//slide show to appear.  

//Set widths and heights same as images
//Set image file same as first image in array Pic[] (above)

//<table border="0" cellpadding="0" cellspacing="0">
//<tr>
//<td id="VU" height=150 width=150>
//<img src="1.jpg" name='SlideShow' width=150 height=150></td>
//</tr>
//</table>

//===========================================================