// Specify the image files
var Pic = new Array();
var Lin = new Array();
;

randomDisplay=true;
// to add more images, just continue
// the pattern, adding to the array below
properties = 'images/creditcards.gif,#special1|images/sp-top1a.gif,#special1|images/delivery.gif,#special1';
Ref = properties.split("|");



Lin[0] = '#'
Lin[1] = '#'
Lin[2] = '#'
Lin[3] = '#'

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;
// Duration of crossfade (seconds)
var crossFadeDuration = 4;
// Whether images are shown randomly (otherwise sequential)
var randomDisplay = false;

// do not edit anything below this line
var z;
var z2;
var t;
var c;
var c2;
var j = 0;

var p = Ref.length;
var preLoad = new Array();
for (i = 0; i < p; i++) {
isplit=Ref[i].split(",");
Pic[i]=isplit[0];
Lin[i]=isplit[1];

preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}



function runSlideShow(l) {

if (document.all) {
document.getElementById("mainimg1").style.filter="blendTrans(duration=2)";
document.getElementById("mainimg1").style.filter="blendTrans(duration=crossFadeDuration)";
document.getElementById("mainimg1").filters.blendTrans.Apply();
document.getElementById("mainimg2").style.filter="blendTrans(duration=2)";
document.getElementById("mainimg2").style.filter="blendTrans(duration=crossFadeDuration)";
document.getElementById("mainimg2").filters.blendTrans.Apply();
}

if (randomDisplay == true) {
	c = Math.floor(Math.random()*p);
	c2 = Math.floor(Math.random()*p);	
	if (z = c) {
		c = Math.floor(Math.random()*p);
	}

	document.getElementById("mainimg1").src = preLoad[c].src;
	document.getElementById("mainlink1").href = Lin[c];
	
	
	z = c;

} else {
//  alert(preLoad[l].src+'         '+preLoad[l].src.indexOf('.jpg'));
	document.getElementById("mainimg1").src = preLoad[l].src;
	document.getElementById("mainlink1").href = Lin[l];

	
}
if (document.all) {
	document.getElementById("mainimg1").filters.blendTrans.Play();
	
}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow(' + j + ')', slideShowSpeed);
}
