<!-- Hide from old browsers
var numBanners = 1;
var i = numBanners;
banner1 = new Image();
banner1.src = "http://www.bnhba.com/images/banners/eastern_propane.jpg";  // put up July 15, 2010 
//banner1 = new Image();
//banner1.src = "http://www.bnhba.com/bannerAds/nl_family_banner_ad_470x64.gif";  // put up Jun 30, 2009 (second time)
//banner2 = new Image();
//banner2.src = "http://www.bnhba.com/bannerAds/2009-11-bankofcanton.jpg";  // put up Nov 19, 2009 (second time)

//banner1 = new Image();
//banner1.src = "http://www.bnhba.com/bannerAds/Propane_Plus-BNHBA-Web-ban2.gif";  // put up Jan 31, 2008 (second time)
//banner2 = new Image();
//banner2.src = "http://www.bnhba.com/bannerAds/MA-static-banner_v3ms.jpg";  // put up June 6, 2008
//banner2 = new Image();
//banner2.src = "http://www.bnhba.com/bannerAds/mm_banner_bnhba.jpg";  // Put up Jan 31, 2008
//banner3 = new Image();
//banner3.src = "http://www.bnhba.com/bannerAds/bedrockgranite.gif";  // Put up June 9, 2009

ban_links = new Array;
ban_links[1] = "http://www.eastern.com";
//ban_links[2] = "http://www.ibankcanton.com/Biz-Construction-Loans.aspx";
//ban_links[1] = "http://www.propaneplus.com";
//ban_links[2] = "http://www.massenergystarhomes.com";
//ban_links[2] = "http://www.masonandmasoninsurance.com";
//ban_links[3] = "http://www.bedrockgranite-ma.com";

ban_description = new Array;
ban_description[1] = "Visit Eastern Propane, a BNHBA sponsor";
//ban_description[1] = "Visit The Bank of Canton, a BNHBA sponsor";
//ban_description[1] = "Visit Propane Plus, a BNHBA sponsor";
//ban_description[2] = "Visit Massachusetts Energy Star Homes, a BNHBA sponsor";
//ban_description[2] = "Visit Mason and Mason Insurance, a BNHBA sponsor";
//ban_description[3] = "Visit Bedrock Granite Company, a BNHBA sponsor";

function randombanner() {
	var randomnumber = Math.random();
	i = Math.round( (numBanners - 1) * randomnumber) + 1;
	document.banner.src = eval("banner" + i + ".src");
}

function startTime() {
        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=6;   
        Timer();
}

function Timer() {
        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        curTime=hours*3600+mins*60+secs;
        if (curTime>=closeTime) {
                if (i < numBanners) {
                        i++;
                        document.banner.src = eval("banner" + i + ".src");
                }
                else {
                        i = 1;
                        document.banner.src = eval("banner" + i + ".src");
                }
                startTime();
        }
        else {
                window.setTimeout("Timer()",1000);
		}
}

function clickLink() {
//        top.location = ban_links[i];
        window.open(ban_links[i]);
}

function descript() {
        window.status = ban_description[i];
}

// -->
