//\//////////////////////////////////////////////////////////////////////////////////
//\  echecker 1.5  --  This notice must remain untouched at all times.
//\  Copyright ONLINEMEDIADESIGNS.COM 2004-2006. All rights reserved.
//\
//\  Last modified 2002-11-01.
//\
//\  Please give credit on sites that use echecker and submit changes of the script
//\  so other people can use them as well. This script is free to use, don't abuse.
//\//////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////////
// CONSTANTS
// Make your changes here. :)
////////////////////////////////////////////////////////////////////////////////////
<!--
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000;
// Duration of crossfade (seconds)
var crossFadeDuration = 5;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below

//get number of photos
var nphoto = '5';




if (nphoto == 1) 
{
Pic[0] = 'images/listing/1.jpg'
}

if (nphoto == 2) 
{
Pic[0] = 'images/listing/1.jpg'
Pic[1] = 'images/listing/2.jpg'
}

if (nphoto == 3) 
{
Pic[0] = 'images/listing/1.jpg'
Pic[1] = 'images/listing/2.jpg'
Pic[2] = 'images/listing/3.jpg'
}

if (nphoto == 4) 
{
Pic[0] = 'images/listing/1.jpg'
Pic[1] = 'images/listing/2.jpg'
Pic[2] = 'images/listing/3.jpg'
Pic[3] = 'images/listing/4.jpg'
}

if (nphoto == 5)
{
Pic[0] = 'images/listing/1.jpg'
Pic[1] = 'images/listing/2.jpg'
Pic[2] = 'images/listing/3.jpg'
Pic[3] = 'images/listing/4.jpg'
Pic[4] = 'images/listing/5.jpg'
}

if (nphoto == 6)
{
Pic[0] = ''
Pic[1] = ''
Pic[2] = ''
Pic[3] = ''
Pic[4] = ''
Pic[5] = ''
}

if (nphoto == 7)
{
Pic[0] = ''
Pic[1] = ''
Pic[2] = ''
Pic[3] = ''
Pic[4] = ''
Pic[5] = ''
Pic[6] = ''
}

if (nphoto == 8)
{
Pic[0] = ''
Pic[1] = ''
Pic[2] = ''
Pic[3] = ''
Pic[4] = ''
Pic[5] = ''
Pic[6] = ''
Pic[7] = ''
}

if (nphoto == 9)
{
Pic[0] = ''
Pic[1] = ''
Pic[2] = ''
Pic[3] = ''
Pic[4] = ''
Pic[5] = ''
Pic[6] = ''
Pic[7] = ''
Pic[8] = ''
}


if (nphoto == 10)
{
Pic[0] = ''
Pic[1] = ''
Pic[2] = ''
Pic[3] = ''
Pic[4] = ''
Pic[5] = ''
Pic[6] = ''
Pic[7] = ''
Pic[8] = ''
Pic[9] = ''
}

var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}
function runSlideShow() {
if (document.all) {
document.images.SlideShow.style.filter="blendTrans(duration=2)";
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
document.images.SlideShow.filters.blendTrans.Apply();
}
document.images.SlideShow.src = preLoad[j].src;
if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}
//  End -->