// (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
// =======================================
function randOrd(){
return (Math.round(Math.random())-0.5); }
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 8000;
// Specify the arrays and major variables
var numPics = 70;
var sequence = Array ();
var showStarted = 0;
var changePane = 0;
var Pic = new Array(11);
for (i=0; i < numPics; i++) {
Pic[i] = new Array(3);
sequence[i] = i;
}
sequence.sort(randOrd);
Pic[0][0] = "/banners/f_3-2.jpg";
Pic[0][1] = "/page/41";
Pic[0][2] = "ShopAGW";
Pic[0][3] = "S";
Pic[1][0] = "/banners/f_21-4.jpg";
Pic[1][1] = "/series/17";
Pic[1][2] = "FREE Wednesdays";
Pic[1][3] = "S";
Pic[2][0] = "/banners/f_3-2.jpg";
Pic[2][1] = "/page/41";
Pic[2][2] = "ShopAGW";
Pic[2][3] = "S";
Pic[3][0] = "/banners/f_21-4.jpg";
Pic[3][1] = "/series/17";
Pic[3][2] = "FREE Wednesdays";
Pic[3][3] = "S";
Pic[4][0] = "/banners/f_3-2.jpg";
Pic[4][1] = "/page/41";
Pic[4][2] = "ShopAGW";
Pic[4][3] = "S";
Pic[5][0] = "/banners/f_21-4.jpg";
Pic[5][1] = "/series/17";
Pic[5][2] = "FREE Wednesdays";
Pic[5][3] = "S";
Pic[6][0] = "/banners/f_5-1.jpg";
Pic[6][1] = "/series/8";
Pic[6][2] = "Sundays in the Studio";
Pic[6][3] = "S";
Pic[7][0] = "/banners/f_7-1.jpg";
Pic[7][1] = "/page/18";
Pic[7][2] = "AGW Collection";
Pic[7][3] = "S";
Pic[8][0] = "/banners/f_8-1.jpg";
Pic[8][1] = "/page/18";
Pic[8][2] = "AGW Collection";
Pic[8][3] = "S";
Pic[9][0] = "/banners/f_9-1.jpg";
Pic[9][1] = "/page/18";
Pic[9][2] = "AGW Collection";
Pic[9][3] = "S";
Pic[10][0] = "/banners/f_10-1.jpg";
Pic[10][1] = "/page/18";
Pic[10][2] = "AGW Collection";
Pic[10][3] = "S";
Pic[11][0] = "/banners/f_11-1.jpg";
Pic[11][1] = "/page/18";
Pic[11][2] = "AGW Collection";
Pic[11][3] = "S";
Pic[12][0] = "/banners/f_13-1.jpg";
Pic[12][1] = "/event/125";
Pic[12][2] = "Summer Camps at the AGW";
Pic[12][3] = "S";
Pic[13][0] = "/banners/f_14-1.jpg";
Pic[13][1] = "/series/8";
Pic[13][2] = "Sundays in the Studio";
Pic[13][3] = "S";
Pic[14][0] = "/banners/f_28-1.jpg";
Pic[14][1] = "/page/18";
Pic[14][2] = "AGW Collection";
Pic[14][3] = "S";
Pic[15][0] = "/banners/f_29-1.jpg";
Pic[15][1] = "/page/18";
Pic[15][2] = "AGW Collection";
Pic[15][3] = "S";
Pic[16][0] = "/banners/f_34-1.jpg";
Pic[16][1] = "/exhibitions/current";
Pic[16][2] = "AGW Exhibitions";
Pic[16][3] = "S";
Pic[17][0] = "/banners/f_35-1.jpg";
Pic[17][1] = "/page/18";
Pic[17][2] = "AGW Collection";
Pic[17][3] = "S";
Pic[18][0] = "/banners/f_36-1.jpg";
Pic[18][1] = "/page/18";
Pic[18][2] = "AGW Collection";
Pic[18][3] = "S";
Pic[19][0] = "/banners/f_37-3.jpg";
Pic[19][1] = "http://newsletters.agw.ca/?p=subscribe&id=1";
Pic[19][2] = "Subscribe to AGW e-mail updates";
Pic[19][3] = "N";
Pic[20][0] = "/banners/f_43-1.jpg";
Pic[20][1] = "/page/18";
Pic[20][2] = "AGW Collection";
Pic[20][3] = "S";
Pic[21][0] = "/banners/f_44-1.jpg";
Pic[21][1] = "/page/18";
Pic[21][2] = "AGW Collection";
Pic[21][3] = "S";
Pic[22][0] = "/banners/f_45-1.jpg";
Pic[22][1] = "/page/18";
Pic[22][2] = "AGW Collection";
Pic[22][3] = "S";
Pic[23][0] = "/banners/f_46-1.jpg";
Pic[23][1] = "/page/18";
Pic[23][2] = "AGW Collection";
Pic[23][3] = "S";
Pic[24][0] = "/banners/f_47-1.jpg";
Pic[24][1] = "/page/18";
Pic[24][2] = "AGW Collection";
Pic[24][3] = "S";
Pic[25][0] = "/banners/f_48-1.jpg";
Pic[25][1] = "/page/18";
Pic[25][2] = "AGW Collection";
Pic[25][3] = "S";
Pic[26][0] = "/banners/f_49-1.jpg";
Pic[26][1] = "/page/18";
Pic[26][2] = "AGW Collection";
Pic[26][3] = "S";
Pic[27][0] = "/banners/f_50-1.jpg";
Pic[27][1] = "/page/18";
Pic[27][2] = "AGW Collection";
Pic[27][3] = "S";
Pic[28][0] = "/banners/f_52-1.jpg";
Pic[28][1] = "/page/18";
Pic[28][2] = "AGW Collection";
Pic[28][3] = "S";
Pic[29][0] = "/banners/f_53-1.jpg";
Pic[29][1] = "/page/18";
Pic[29][2] = "AGW Collection";
Pic[29][3] = "S";
Pic[30][0] = "/banners/f_54-1.jpg";
Pic[30][1] = "/page/18";
Pic[30][2] = "AGW Collection";
Pic[30][3] = "S";
Pic[31][0] = "/banners/f_55-1.jpg";
Pic[31][1] = "/page/18";
Pic[31][2] = "AGW Collection";
Pic[31][3] = "S";
Pic[32][0] = "/banners/f_56-1.jpg";
Pic[32][1] = "/page/18";
Pic[32][2] = "AGW Collection";
Pic[32][3] = "S";
Pic[33][0] = "/banners/f_57-1.jpg";
Pic[33][1] = "/page/18";
Pic[33][2] = "AGW Collection";
Pic[33][3] = "S";
Pic[34][0] = "/banners/f_58-1.jpg";
Pic[34][1] = "/page/18";
Pic[34][2] = "AGW Collection";
Pic[34][3] = "S";
Pic[35][0] = "/banners/f_59-1.jpg";
Pic[35][1] = "/page/18";
Pic[35][2] = "AGW Collection";
Pic[35][3] = "S";
Pic[36][0] = "/banners/f_60-1.jpg";
Pic[36][1] = "/page/18";
Pic[36][2] = "AGW Collection";
Pic[36][3] = "S";
Pic[37][0] = "/banners/f_61-1.jpg";
Pic[37][1] = "/page/18";
Pic[37][2] = "AGW Collection";
Pic[37][3] = "S";
Pic[38][0] = "/banners/f_62-1.jpg";
Pic[38][1] = "/page/18";
Pic[38][2] = "AGW Collection";
Pic[38][3] = "S";
Pic[39][0] = "/banners/f_63-1.jpg";
Pic[39][1] = "/page/18";
Pic[39][2] = "AGW Collection";
Pic[39][3] = "S";
Pic[40][0] = "/banners/f_64-1.jpg";
Pic[40][1] = "/page/18";
Pic[40][2] = "AGW Collection";
Pic[40][3] = "S";
Pic[41][0] = "/banners/f_65-1.jpg";
Pic[41][1] = "/page/18";
Pic[41][2] = "AGW Collection";
Pic[41][3] = "S";
Pic[42][0] = "/banners/f_66-1.jpg";
Pic[42][1] = "/page/18";
Pic[42][2] = "AGW Collection";
Pic[42][3] = "S";
Pic[43][0] = "/banners/f_67-1.jpg";
Pic[43][1] = "/page/18";
Pic[43][2] = "AGW Collection";
Pic[43][3] = "S";
Pic[44][0] = "/banners/f_68-4.jpg";
Pic[44][1] = "/page/18";
Pic[44][2] = "AGW Collection";
Pic[44][3] = "S";
Pic[45][0] = "/banners/f_69-1.jpg";
Pic[45][1] = "/page/18";
Pic[45][2] = "AGW Collection";
Pic[45][3] = "S";
Pic[46][0] = "/banners/f_70-1.jpg";
Pic[46][1] = "/page/18";
Pic[46][2] = "AGW Collection";
Pic[46][3] = "S";
Pic[47][0] = "/banners/f_71-1.jpg";
Pic[47][1] = "/page/18";
Pic[47][2] = "AGW Collection";
Pic[47][3] = "S";
Pic[48][0] = "/banners/f_72-1.jpg";
Pic[48][1] = "/page/18";
Pic[48][2] = "AGW Collection";
Pic[48][3] = "S";
Pic[49][0] = "/banners/f_73-1.jpg";
Pic[49][1] = "/page/18";
Pic[49][2] = "AGW Collection";
Pic[49][3] = "S";
Pic[50][0] = "/banners/f_74-1.jpg";
Pic[50][1] = "/page/18";
Pic[50][2] = "AGW Collection";
Pic[50][3] = "S";
Pic[51][0] = "/banners/f_75-1.jpg";
Pic[51][1] = "/page/18";
Pic[51][2] = "AGW Collection";
Pic[51][3] = "S";
Pic[52][0] = "/banners/f_77-1.jpg";
Pic[52][1] = "/page/18";
Pic[52][2] = "AGW Collection";
Pic[52][3] = "S";
Pic[53][0] = "/banners/f_78-2.jpg";
Pic[53][1] = "/page/18";
Pic[53][2] = "AGW Collection";
Pic[53][3] = "S";
Pic[54][0] = "/banners/f_79-1.jpg";
Pic[54][1] = "/page/18";
Pic[54][2] = "AGW Collection";
Pic[54][3] = "S";
Pic[55][0] = "/banners/f_80-1.jpg";
Pic[55][1] = "/page/18";
Pic[55][2] = "AGW Collection";
Pic[55][3] = "S";
Pic[56][0] = "/banners/f_81-1.jpg";
Pic[56][1] = "/page/18";
Pic[56][2] = "AGW Collection";
Pic[56][3] = "S";
Pic[57][0] = "/banners/f_82-1.jpg";
Pic[57][1] = "/page/18";
Pic[57][2] = "AGW Collection";
Pic[57][3] = "S";
Pic[58][0] = "/banners/f_83-1.jpg";
Pic[58][1] = "/page/18";
Pic[58][2] = "AGW Collection";
Pic[58][3] = "S";
Pic[59][0] = "/banners/f_84-1.jpg";
Pic[59][1] = "/page/18";
Pic[59][2] = "AGW Collection";
Pic[59][3] = "S";
Pic[60][0] = "/banners/f_85-2.jpg";
Pic[60][1] = "/page/18";
Pic[60][2] = "AGW Collection";
Pic[60][3] = "S";
Pic[61][0] = "/banners/f_86-1.jpg";
Pic[61][1] = "/page/18";
Pic[61][2] = "AGW Collection";
Pic[61][3] = "S";
Pic[62][0] = "/banners/f_87-1.jpg";
Pic[62][1] = "/page/18";
Pic[62][2] = "AGW Collection";
Pic[62][3] = "S";
Pic[63][0] = "/banners/f_88-1.jpg";
Pic[63][1] = "/page/18";
Pic[63][2] = "AGW Banner";
Pic[63][3] = "S";
Pic[64][0] = "/banners/f_12-1.jpg";
Pic[64][1] = "/series/11";
Pic[64][2] = "Art Discovery";
Pic[64][3] = "S";
Pic[65][0] = "/banners/f_15-1.jpg";
Pic[65][1] = "/page/8";
Pic[65][2] = "Venue Rentals";
Pic[65][3] = "S";
Pic[66][0] = "/banners/f_16-1.jpg";
Pic[66][1] = "/page/41";
Pic[66][2] = "Uncommon Market";
Pic[66][3] = "S";
Pic[67][0] = "/banners/f_17-1.jpg";
Pic[67][1] = "/page/41";
Pic[67][2] = "Uncommon Market";
Pic[67][3] = "S";
Pic[68][0] = "/banners/f_24-1.jpg";
Pic[68][1] = "/page/73";
Pic[68][2] = "AGW Going Green!";
Pic[68][3] = "S";
Pic[69][0] = "/banners/f_26-1.jpg";
Pic[69][1] = "/page/78";
Pic[69][2] = "Taste Bud Bistro";
Pic[69][3] = "S";
var preLoad = new Array();
var currentImage = 4;
var link0 = '';
var link1 = '';
var link2 = '';
for (a = 0; a < numPics; a++) {
preLoad[a] = new Image()
preLoad[a].src = Pic[sequence[a]][0]
}
function loadSlides() {
  document.images.SlideShow0.src = preLoad[0].src;
  document.images.SlideShow1.src = preLoad[1].src;
  document.images.SlideShow2.src = preLoad[2].src;
  document.images.SlideShow0.title = Pic[sequence[0]][2];
  document.images.SlideShow1.title = Pic[sequence[1]][2];
  document.images.SlideShow2.title = Pic[sequence[2]][2];
  document.images.SlideShow0.alt = Pic[sequence[0]][2];
  document.images.SlideShow1.alt = Pic[sequence[1]][2];
  document.images.SlideShow2.alt = Pic[sequence[2]][2];
  link0 = Pic[sequence[0]][1];
  link1 = Pic[sequence[1]][1];
  link2 = Pic[sequence[2]][1];
  target0 = Pic[sequence[0]][3];
  target1 = Pic[sequence[1]][3];
  target2 = Pic[sequence[2]][3];
}
function runSlideShow(){
 if (showStarted == 0) {
   showStarted = 1;
   t = setTimeout('runSlideShow()', slideShowSpeed);
 } else {
   do {
     jj=Math.floor(Math.random()*3);
   } while (jj == changePane)
   changePane = jj;
if (jj == 0) {      
     if (document.all) {
     document.images.SlideShow0.style.filter="blendTrans(duration=2)"
     document.images.SlideShow0.filters.blendTrans.Apply()
     }
     document.images.SlideShow0.src = preLoad[currentImage].src
     document.images.SlideShow0.alt = Pic[sequence[currentImage]][2];
     document.images.SlideShow0.title = Pic[sequence[currentImage]][2];
  link0 = Pic[sequence[currentImage]][1];
  target0 = Pic[sequence[currentImage]][3];
}
   if (jj == 1) {
     if (document.all) {
     document.images.SlideShow1.style.filter="blendTrans(duration=2)"
     document.images.SlideShow1.filters.blendTrans.Apply()
     }
     document.images.SlideShow1.src = preLoad[currentImage].src
     document.images.SlideShow1.alt = Pic[sequence[currentImage]][2];
     document.images.SlideShow1.title = Pic[sequence[currentImage]][2];
  link1 = Pic[sequence[currentImage]][1];
  target1 = Pic[sequence[currentImage]][3];
   }
   if (jj == 2) {       
     if (document.all) {
document.images.SlideShow2.style.filter="blendTrans(duration=2)"
document.images.SlideShow2.filters.blendTrans.Apply()
}
document.images.SlideShow2.src = preLoad[currentImage].src
document.images.SlideShow2.alt = Pic[sequence[currentImage]][2];
document.images.SlideShow2.title = Pic[sequence[currentImage]][2];
  link2 = Pic[sequence[currentImage]][1];
  target2 = Pic[sequence[currentImage]][3];
}
if (document.all){
   if (jj == 0) document.images.SlideShow0.filters.blendTrans.Play()
   if (jj == 1) document.images.SlideShow1.filters.blendTrans.Play()
   if (jj == 2) document.images.SlideShow2.filters.blendTrans.Play()
}
currentImage = currentImage + 1;
if (currentImage >= numPics) currentImage = 1;
while(document.images.SlideShow0.src == preLoad[currentImage].src ||      document.images.SlideShow1.src == preLoad[currentImage].src ||      document.images.SlideShow2.src == preLoad[currentImage].src) {       currentImage = currentImage +1;
       if(currentImage >= numPics) curentImage = 1; }
t = setTimeout('runSlideShow()', slideShowSpeed);
}
}

