// (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 = 3000;

// Duration of crossfade (seconds)
var crossFadeDuration = 3;

// 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] = {path:'images/image0.jpg',url:'/programmes/iso_actif.shtml',target:'_self'};
Pic[1] = {path:'images/image2.jpg',url:'javascript:;',target:'_self'};
Pic[2] = {path:'images/image3.jpg',url:'/programmes/5fruits_5legumes.shtml',target:'_self'};
Pic[3] = {path:'images/image4.jpg',url:'/programmes/acti-midi.shtml',target:'_self'};
Pic[4] = {path:'images/logo2_mepse_2007.JPG',url:'/programmes/mepse.shtml',target:'_self'};
Pic[5] = {path:'images/logo_defi_moihcroque_07.jpg',url:'http://www.arser.qc.ca/programmes/5fruits_5legumes_defi_moi_jcroque.shtml',target:'_self'};
Pic[6] = {path:'images/viens_defier_gym2.jpg',url:'/programmes/viens_defier_Gym.shtml',target:'_self'};
Pic[7] = {path:'images/viens_defier_gym_banniere2.jpg',url:'/programmes/viens_defier_Gym.shtml',target:'_self'};
Pic[8] = {path:'images/defacto2.jpg',url:'http://www.defacto.ca/',target:'_self'};
Pic[9] = {path:'images/Affiche_site_defi08.jpg',url:'/programmes/5fruits_5legumes.shtml',target:'_self'};
Pic[10] = {path:'images/produc_pommes_rot.jpg',url:'http://www.lapommeduquebec.ca/index.aspx',target:'_self'};



// =======================================
// do not edit anything below this line
// =======================================

var mn;
var a = 0;
var u = Pic.length;

var preLoad = new Array();
for (z = 0; z < u; z++){
   preLoad[z] = new Image();
   preLoad[z].src = Pic[z].path;
}

function runSlideShow(){
//alert(document.images.length);
   if (document.all){
      document.images.SlideImg.style.filter="blendTrans(duration=2)";
      document.images.SlideImg.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideImg.filters.blendTrans.Apply();      
   }
//alert("lienRotator");
   document.images.SlideImg.src = preLoad[a].src;
   document.getElementById('lienRotator').href = Pic[a].url;
   document.getElementById('lienRotator').target = Pic[a].target;
   if (document.all){
      document.images.SlideImg.filters.blendTrans.Play();
   }
   a = a + 1;
   if (a > (u-1)) a=0;
   mn = setTimeout('runSlideShow()', slideShowSpeed);
}