/*var promoImage1 = "global_Picture1.jpg"; var promoImage2 = "global_Picture2.jpg"; var promoImage3 = "global_Picture3-2.jpg";*/ /*var preLoadImage1 = new Image(); preLoadImage1.src = promoImage1; var preLoadImage2 = new Image(); preLoadImage2.src = promoImage2; var preLoadImage3 = new Image(); preLoadImage3.src = promoImage3;*/ var ImagesUrl = new Array(); var ImagesUrlSrc = new Array(); var time1,time2; var imgCount=-1; var moved=0; var outTime; var promoImageLoaded = 0; /*ImagesUrl[0] = promoImage1; ImagesUrl[1] = promoImage2; ImagesUrl[2] = promoImage3; */ function setPromotionImageSrc(promoImage1, promoImage2, promoImage3, URL1, URL2, URL3) { var preLoadImage1 = new Image(); preLoadImage1.src = promoImage1; var preLoadImage2 = new Image(); preLoadImage2.src = promoImage2; var preLoadImage3 = new Image(); preLoadImage3.src = promoImage3; ImagesUrl[0] = promoImage1; ImagesUrl[1] = promoImage2; ImagesUrl[2] = promoImage3; ImagesUrlSrc[0]= URL1; ImagesUrlSrc[1]= URL2; ImagesUrlSrc[2]= URL3; promoImageLoaded = 1; } function startSlideShow(){ jQuery(document).ready(function(){ if(imgCount == ImagesUrl.length - 1) { imgCount = 0; } else { imgCount++; } jQuery('#Displayed') .fadeOut(700, function() { jQuery('#Displayed').attr('src',ImagesUrl[imgCount]); jQuery('#Displayed').fadeIn(700); }); if(imgCount==0) { jQuery('#img1').fadeTo(1000,1.5) jQuery('#img2').fadeTo(1000,0.45) jQuery('#img3').fadeTo(1000,0.45) document.getElementById('promotionlink').href= ImagesUrlSrc[imgCount]; } if(imgCount==1) { jQuery('#img2').fadeTo(600,1.5) jQuery('#img1').fadeTo(600,0.45) jQuery('#img3').fadeTo(600,0.45) document.getElementById('promotionlink').href= ImagesUrlSrc[imgCount]; } if(imgCount==2) { jQuery('#img3').fadeTo(1000,1.5) jQuery('#img2').fadeTo(1000,0.45) jQuery('#img1').fadeTo(1000,0.45) document.getElementById('promotionlink').href= ImagesUrlSrc[imgCount]; } time1 = setTimeout ( "startSlideShow()", 6000 ); }); } function setMoved() { moved=1; } function resetMoved() { moved=0; } function autoPlayPromotion() { if(moved==1) { var currDate = new Date(); if((currDate-outTime) > 6000) { playPromotion(); moved=0; } } time2=setTimeout("autoPlayPromotion()", 1000) } function playPromotion() { startSlideShow(); } function pausePromotion() { clearTimeout(time1); } function showThis(id) { clearTimeout(time1); jQuery('#Displayed').attr('src',ImagesUrl[id]); jQuery('#Displayed').fadeIn(700); if(id==0) { jQuery('#img1').fadeTo(600,1.5) jQuery('#img2').fadeTo(600,0.45) jQuery('#img3').fadeTo(600,0.45) } if(id==1) { jQuery('#img2').fadeTo(600,1.5) jQuery('#img1').fadeTo(600,0.45) jQuery('#img3').fadeTo(600,0.45) } if(id==2) { jQuery('#img3').fadeTo(600,1.5) jQuery('#img2').fadeTo(600,0.45) jQuery('#img1').fadeTo(600,0.45) } imgCount=id; }