// JavaScript Document
<!-- Begin
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;
// Duration of crossfade (seconds)
var crossFadeDuration = 4;
// Specify the image files
var Pic = new Array();
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'http://www.wigantowncentre.com/images/header_01.jpg'
Pic[1] = 'http://www.wigantowncentre.com/images/header_02.jpg'
Pic[2] = 'http://www.wigantowncentre.com/images/header_03.jpg'
Pic[3] = 'http://www.wigantowncentre.com/images/header_04.jpg'
Pic[4] = 'http://www.wigantowncentre.com/images/header_05.jpg'
Pic[5] = 'http://www.wigantowncentre.com/images/header_06.jpg'
Pic[6] = 'http://www.wigantowncentre.com/images/header_07.jpg'
Pic[7] = 'http://www.wigantowncentre.com/images/header_08.jpg'
// do not edit anything below this line

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 -->
<!-- Begin
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'http://www.wigantowncentre.com/images/header_01.jpg'
theImages[1] = 'http://www.wigantowncentre.com/images/header_02.jpg'
theImages[2] = 'http://www.wigantowncentre.com/images/header_03.jpg'
theImages[3] = 'http://www.wigantowncentre.com/images/header_04.jpg'
theImages[4] = 'http://www.wigantowncentre.com/images/header_05.jpg'
theImages[5] = 'http://www.wigantowncentre.com/images/header_06.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

//  End -->
function ViewImage(ifile,ix,iy,ititle) { 
var win;
var sWidth;
var sHeight;
var NS = (document.layers) ? 1 : 0;
win = window.open("","imageviewer","width="+ix+",height="+iy+",menubar=no,toolbar=no");
if (NS) {
sWidth = win.innerWidth;
sHeight = win.innerHeight;
} else {
sWidth = win.document.body.clientWidth;
sHeight = win.document.body.clientHeight;
}
if(sWidth!=ix || sHeight!=iy) {
win.close();
setTimeout("ViewImage('"+ifile+"',"+ix+","+iy+",'"+ititle+"')", 250);
return;
}
win.document.open();
win.document.write("<html><head><title>"+ititle+"</title>");
win.document.write("</head><body>");
win.document.write('<div style="position:absolute;width:'+ix+'px;height:'+iy+'px;left:0px;top:0px">');
win.document.write("<img src="+ifile+"></div></body></html>");
win.document.close();
}