var d = 1;
banner1 = new Image();
banner1.src = "pics/wines/brightleafwhite.gif";
banner2 = new Image();
banner2.src = "pics/wines/sauvignonblanc.gif";
banner3= new Image();
banner3.src = "pics/wines/chardonnay.gif";
banner4= new Image();
banner4.src = "pics/wines/packhousered.gif";
banner5= new Image();
banner5.src = "pics/wines/merlot.gif";
banner6 = new Image();
banner6.src = "pics/wines/chambourcin.gif";
banner7 = new Image();
banner7.src = "pics/wines/cabernetsauvignon.gif";
banner8 = new Image();
banner8.src = "pics/wines/dixiedawn.gif";
banner9 = new Image();
banner9.src = "pics/wines/rusticblooming.gif";
banner10 = new Image();
banner10.src = "pics/wines/fluefire.gif";



links = new Array
links[1] = "aboutthewine.html"
links[2] = "aboutthewine.html"
links[3] = "aboutthewine.html"
links[4] = "aboutthewine.html"
links[5] = "aboutthewine.html"
links[6] = "aboutthewine.html"
links[7] = "aboutthewine.html"
links[8] = "aboutthewine.html"
links[9] = "aboutthewine.html"
links[10] = "aboutthewine.html"



description = new Array
description[1] = "BRIGHTLEAF WHITE"
description[2] = "2006 SAUVIGNON BLANC"
description[3] = "2006 CHARDONNAY"
description[4] = "PACK HOUSE RED"
description[5] = "2006 MERLOT"
description[6] = "2006 CHAMBOURCIN"
description[7] = "2006 CABERNET SAUVIGNON"
description[8] = "DIXIE DAWN"
description[9] = "RUSTIC BLOOMING"
description[10] = "FLUE FIRE"




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 < 10){     // The number 10 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]
}


