 // Copyright © 1999 Doug Popeney
// Created by Doug Popeney (easyjava@easyjavascipt.com)
// JavaScript Made Easy!! - http://www.easyjavascript.com


var i = 1;

banner1 = new Image();
banner1.src = "/banners/112910.jpg";
banner2 = new Image();
banner2.src = "/banners/flyin.jpg";
banner3= new Image();
banner3.src = "/banners/stormwater.jpg";
banner4= new Image();
banner4.src = "/banners/102910pre.jpg";
banner5= new Image();
banner5.src = "/banners/2011_tri_conf_call_for_papers.jpg";
banner6= new Image();
banner6.src = "/banners/mdeonline.jpg";
banner7= new Image();
banner7.src = "/banners/comar.jpg";
banner8= new Image();
banner8.src = "/banners/eco-letter_on-line";


links = new Array

links[1] = "http://www.wwoa-cwea.org/wwoa/112910.html"
links[2] = "http://www.wwoa-cwea.org/cwea/2011 Fly In.htm"
links[3] = "http://www.wwoa-cwea.org/cwea/Stormwater.html"
links[4] = "http://www.wwoa-cwea.org/cwea/102910/102910pre.html"
links[5] = "http://www.wwoa-cwea.org/tri-con/2011 papers.html"
links[6] = "http://www.wwoa-cwea.org/mdeonlineexams.htm"
links[7] = "http://www.wwoa-cwea.org/COMAR/COMAR 26.html"
links[8] = "http://www.wwoa-cwea.org/eco-letter/eco-letter.html"


description = new Array

description[1] = "WWOA Eastern Shore Section Fall Meeting"
description[2] ="AWWA & WEF are seeking Delegates for the 2011 Water Fly In"
description[3] = "Stormwater Issues Around the Bay Presentations"
description[4] = "Presentations from the CWEA FOG Seminar"
description[5] = "Call for Papers 2011 Tri-Con"
description[6] = "MDE Announces Online Exams"
description[7] = "COMAR 26.06.01.00. Title 26"
description[8] = "Eco-Letter"



function startTime(){

        var time= new Date();
        hours= time.getHours();
        mins= time.getMinutes();
        secs= time.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=2.2;   // 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 (i < 8){     // The number is the number of banners that you have - in this case, 8
                        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 = links[i]
}

function descript(){
        window.status = description[i]
}


