var Ads = new Array(); var AdsLinks = new Array(); var AdsDuration = new Array(); var crossFadeDuration = 2; Ads[0] = "http://www.ctbizmag.com//data/ads/nwi120x240.jpg"; AdsLinks[0] = "www.nwi.cc"; AdsDuration[0] = "10000"; Ads[1] = "http://www.ctbizmag.com//data/ads/HM0703webAD-5.jpg"; AdsLinks[1] = "http://www.hartfordmag.com"; AdsDuration[1] = "5000"; Ads[2] = "http://www.ctbizmag.com//data/ads/HM0703webAD-4.jpg"; AdsLinks[2] = "http://www.hartfordmag.com"; AdsDuration[2] = "5000"; Ads[3] = "http://www.ctbizmag.com//data/ads/HL0701webAD-6.jpg"; AdsLinks[3] = "http://www.homelivingct.com"; AdsDuration[3] = "5000"; Ads[4] = "http://www.ctbizmag.com//data/ads/HL0701webAD-5.jpg"; AdsLinks[4] = "http://www.homelivingct.com"; AdsDuration[4] = "5000"; Ads[5] = "http://www.ctbizmag.com//data/ads/lux_bond.jpg"; AdsLinks[5] = "http://www.lbgreen.com"; AdsDuration[5] = "5000"; Ads[6] = "http://www.ctbizmag.com//data/ads/hoffman.jpg"; AdsLinks[6] = "#"; AdsDuration[6] = "10000"; Ads[7] = "http://www.ctbizmag.com//data/ads/HL0701webAD-1.jpg"; AdsLinks[7] = "#"; AdsDuration[7] = "10000"; Ads[8] = "http://www.ctbizmag.com//data/ads/ctphonebook_120x240.gif"; AdsLinks[8] = "http://ctphonebook.com"; AdsDuration[8] = "10000"; Ads[9] = "http://www.ctbizmag.com//data/ads/HM0703webAD-6.jpg"; AdsLinks[9] = "http://www.hartfordmag.com"; AdsDuration[9] = "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]]); }