var count=0; banners = new Array(); var from='livingston'; var bannerSrc = new Array(); var bannerAllowedFor = new Array(); var bannerLink = new Array(); bannerSrc[0]="skyScrapers/carterAd.gif"; bannerLink[0]="http://www.victoriacarter.com"; bannerAllowedFor[0]="maplewood,south-orange,springfield,summit,short-hills,montclair"; bannerSrc[1]="skyScrapers/rosaSky.gif"; bannerLink[1]="http://www.rosatarantino.com"; bannerAllowedFor[1]="chatham,maplewood,mountainside,south-orange,springfield,summit,westfield,short-hills,livingston,harding,montclair,morristown,berkeley-heights"; bannerSrc[2]="skyScrapers/rosaSky2.swf"; bannerLink[2]="http://www.rosatarantino.com"; bannerAllowedFor[2]="chatham,maplewood,mountainside,south-orange,springfield,summit,westfield,short-hills,livingston,harding,montclair,morristown,berkeley-heights"; bannerSrc[3]="skyScrapers/crtsyssky2blue.swf"; bannerLink[3]="http://www.crt-inc.com"; bannerAllowedFor[3]="chatham,maplewood,mountainside,south-orange,springfield,summit,westfield,short-hills,livingston,harding,montclair,morristown,berkeley-heights"; bannerSrc[4]="skyScrapers/skyScraperAdvertiseWithUs0002.swf"; bannerLink[4]="/ad.html"; bannerAllowedFor[4]="chatham,maplewood,mountainside,south-orange,springfield,summit,westfield,short-hills,livingston,harding,montclair,morristown,berkeley-heights"; var cities = new Array(); cities[0]="chatham" cities[1]="maplewood" cities[2]="mountainside" cities[3]="south-orange" cities[4]="springfield" cities[5]="summit" cities[6]="westfield" cities[7]="short-hills" cities[8]="livingston" cities[9]="harding" cities[10]="montclair" cities[11]="morristown" cities[12]="berkeley-heights" function Banner(src, lnk, allowedFor) { this.source = src; this.lnk = lnk; this.citiesAllowed = allowedFor.split(","); this.getType = function() { var toReturn; if (this.source.indexOf("gif") == (this.source.length-3)) { toReturn = "gif"; } else if (this.source.indexOf("swf") == (this.source.length-3)) { toReturn = "swf"; } else { toReturn = "error"; } return toReturn; }; this.isAllowed = function(currentCity) { var theCitiesAllowed = allowedFor.split(","); for (var i = 0; i'; } else if (_banner.getType() == "swf") { toReturn += ''; toReturn += ' '; toReturn += ' '; toReturn += ' '; toReturn += ' '; toReturn += ' '; toReturn += ''; } else { toReturn = '----------Unknown-Error----------'; } return toReturn; } function selectABanner(){ for (var i = 0; i