var Ads = new Array(); var AdsLinks = new Array(); var AdsDuration = new Array(); var crossFadeDuration = 2; Ads[0] = "http://php1.walkontheweb.com/hmagazine//data/ads/ctphonebook_120x240.gif"; AdsLinks[0] = "http://www.ctphonebook.com"; AdsDuration[0] = "5000"; Ads[1] = "http://php1.walkontheweb.com/hmagazine//data/ads/hoffman.jpg"; AdsLinks[1] = "http://www.hoffmanauto.com/"; AdsDuration[1] = "5000"; Ads[2] = "http://php1.walkontheweb.com/hmagazine//data/ads/lux_bond.jpg"; AdsLinks[2] = "http://www.lbgreen.com"; AdsDuration[2] = "5000"; Ads[3] = "http://php1.walkontheweb.com/hmagazine//data/ads/HM0703webAD-7.jpg"; AdsLinks[3] = "http://www.hartfordmag.com"; AdsDuration[3] = "5000"; Ads[4] = "http://php1.walkontheweb.com/hmagazine//data/ads/HM0703webAD-8.jpg"; AdsLinks[4] = "http://www.hartfordmag.com"; AdsDuration[4] = "5000"; Ads[5] = "http://php1.walkontheweb.com/hmagazine//data/ads/HM0703webAD-9.jpg"; AdsLinks[5] = "http://www.hartfordmag.com"; AdsDuration[5] = "5000"; Ads[6] = "http://php1.walkontheweb.com/hmagazine//data/ads/connectability_banner_120x240.gif"; AdsLinks[6] = "http://connect-ability.com/"; AdsDuration[6] = "15000"; Ads[7] = "http://php1.walkontheweb.com/hmagazine//data/ads/AG0701magWebAd.jpg"; AdsLinks[7] = "http://www.allgreen.com/subscribe"; AdsDuration[7] = "5000"; Ads[8] = "http://php1.walkontheweb.com/hmagazine//data/ads/HM08BOHwebADs-2.jpg"; AdsLinks[8] = "http://www.hartfordmag.com/story.php?storyid=125"; AdsDuration[8] = "5000"; Ads[9] = "http://php1.walkontheweb.com/hmagazine//data/ads/HM08BOHwebADs-7.jpg"; AdsLinks[9] = "http://www.hartfordmag.com/story.php?storyid=125"; AdsDuration[9] = "5000"; Ads[10] = "http://php1.walkontheweb.com/hmagazine//data/ads/HM08BOHwebADs-6.jpg"; AdsLinks[10] = "http://www.hartfordmag.com/story.php?storyid=125"; AdsDuration[10] = "5000"; var numAds = Ads.length; var timeOuts = new Array(); var nextAds = new Array(); var preLoadAds = new Array(); timeOuts[0]; nextAds[0] = Math.floor(Math.random()*numAds); timeOuts[1]; nextAds[1] = Math.floor(Math.random()*numAds); timeOuts[2]; nextAds[2] = Math.floor(Math.random()*numAds); timeOuts[3]; nextAds[3] = Math.floor(Math.random()*numAds); timeOuts[4]; nextAds[4] = Math.floor(Math.random()*numAds); timeOuts[5]; nextAds[5] = Math.floor(Math.random()*numAds); timeOuts[6]; nextAds[6] = Math.floor(Math.random()*numAds); timeOuts[7]; nextAds[7] = Math.floor(Math.random()*numAds); timeOuts[8]; nextAds[8] = Math.floor(Math.random()*numAds); timeOuts[9]; nextAds[9] = Math.floor(Math.random()*numAds); for (i = 0; i < numAds; i++) { preLoadAds[i] = new Image(); preLoadAds[i].src = Ads[i]; } function loadAd(adNum){ if(numAds){ document.write(""); showAd(adNum); } } function showAd(adNum) { if (document.all) { document.getElementById("Ad" + adNum).style.filter="blendTrans(duration=2)"; document.getElementById("Ad" + adNum).style.filter="blendTrans(duration=crossFadeDuration)"; document.getElementById("Ad" + adNum).filters.blendTrans.Apply(); //document.images.Banner.style.filter="blendTrans(duration=2)"; //document.images.Banner.style.filter="blendTrans(duration=crossFadeDuration)"; //document.images.Banner.filters.blendTrans.Apply(); } do { var rand = Math.floor(Math.random()*numAds); } while (rand == nextAds[adNum] && numAds>1) nextAds[adNum] = rand; document.getElementById("Ad" + adNum).src = preLoadAds[nextAds[adNum]].src; //document.images.Banner.src = preLoadAds[nextAds[adNum]].src; document.getElementById("Ad" + adNum + "Link").href = AdsLinks[nextAds[adNum]]; if (document.all) { document.getElementById("Ad" + adNum).filters.blendTrans.Play(); //document.images.Banner.filters.blendTrans.Play(); } timeOuts[adNum] = setTimeout("showAd(" + adNum + ")", AdsDuration[nextAds[adNum]]); }