var d = 1;
banner1 = new Image();
banner1.src = "banners/irongate.png";
banner2= new Image();
banner2.src = "banners/quakercreek.png";
banner3= new Image();
banner3.src = "banners/winetrail.png";
banner4 = new Image();
banner4.src = "banners/lizvegas.png";
banner5 = new Image();
banner5.src = "banners/effigydesigns.png";
banner6 = new Image();
banner6.src = "banners/mapleleaf.png";
banner7 = new Image();
banner7.src = "banners/bodyguard.png";



links = new Array
links[1] = "http://www.irongatevineyards.com"
links[2] = "http://www.quakercreekgolf.com"
links[3] = "http://www.hawriverwinetrail.com"
links[4] = "http://www.lizvegasbeads.com"
links[5] = "http://www.effigydesigns.com"
links[6] = "http://www.mapleleafconstruction.com"
links[7] = "http://www.bodyguardrail.com"



description = new Array
description[1] = "The Winery at Iron Gate Farm.  An Award Winning Winery providing Entertainment and Award Winning Wines."
description[2] = "Quaker Creek Golf.  Come by to see us for the BEST GOLF IN MEBANE!"
description[3] = "Haw River Wine Trail.  Enjoy North Carolina's Wine Country! "
description[4] = "Liz Vegas Beads Shop.  Shop Us Online!"
description[5] = "Effigy Designs.  Mebane's Premiere Web Design Firm."
description[6] = "Maple leaf Costruction.  We Make Dreams Come True."
description[7] = "Fall Protection Systems, Inc.  Our systems protect those that build America."




function startTime(){

        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=8;   // How many seconds til the next rotation
        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 (d < 7){     // The number 7 is the amount of banners that you have
                        d++;
                        document.banner.src = eval("banner" + d + ".src");
                }
                else{
                        d = 1;
                        document.banner.src = eval("banner" + d + ".src");
                }
                startTime();
        }
        else{
                window.setTimeout("Timer()",1800)}

}
 
function clickLink(){
	
	window.open(links[d], "_blank")
}

function descript(){
        window.status = description[d]
}


