
function inSeason(month,fish) {
    this.month = month;
    this.fishList = new Array(arguments.length - 1);
    for (var i = 1; i < arguments.length; i++) {
        this.fishList[i - 1] = arguments[i];
    }
}
var inSeasonCal = new Array(12);
inSeasonCal[0] = new inSeason("JANUARY","Wash. Dungeness Crab","Canadian Walleye","Florida Stone Crab");
inSeasonCal[1] = new inSeason("FEBRUARY","Maine Day Boat Cod","Oregon Dungeness Crab","Virginia Flounder");
inSeasonCal[2] = new inSeason("MARCH","Pacific Halibut","Florida Grouper","Dungeness Crab");
inSeasonCal[3] = new inSeason("APRIL","Great Lakes Smelt","Pacific Halibut","Great Lakes Whitefish");
inSeasonCal[4] = new inSeason("MAY","Wild King Salmon","Soft Shell Crab","Mahi Mahi");
inSeasonCal[5] = new inSeason("JUNE","Soft Shell Crab","Copper River Salmon","Blue Crab Fingers");
inSeasonCal[6] = new inSeason("JULY","Maine Lobsters","Wild King Salmon","Block Island Swordfish");
inSeasonCal[7] = new inSeason("AUGUST","Wild King Salmon","Alaskan Dungeness Crab","Lake Superior Whitefish");
inSeasonCal[8] = new inSeason("SEPTEMBER","Wild King Salmon","Florida Red Grouper","Yellow Lake Perch");
inSeasonCal[9] = new inSeason("OCTOBER","Pacific Halibut","Florida Stone Crab","Rhode Island Flounder");
inSeasonCal[10] = new inSeason("NOVEMBER","Nantucket Bay Scallops","Rhode Island Flounder","Red King Crab Legs");
inSeasonCal[11] = new inSeason("DECEMBER","Nantucket Bay Scallops","Red King Crab Legs","Live Maine Lobster");

var today = new Date();
var currentMonth = today.getMonth();
//cycle calendar based on month
function buildInSeason(id,full) {
    var out = '<h1>' + inSeasonCal[currentMonth].month + ': NOW IN SEASON</h1>';
    out+= '<ul class="plain">';

    for (var n = 0; n < inSeasonCal[currentMonth].fishList.length; n++) {
        out+= '<li>' + inSeasonCal[currentMonth].fishList[n].toUpperCase() + '</li>';
    }

    out+= '</ul>'

    if (full) {
        out+= '<dl class="fishList">';
        var c = currentMonth;
        for (var i = 0; i < inSeasonCal.length; i++) {

            out+= '<dt>' + inSeasonCal[c].month + '</dt>';
            for (var f = 0; f < inSeasonCal[c].fishList.length; f++) {
                out+= '<dd>' + inSeasonCal[c].fishList[f] + '</dd>';
            }
            c++;
            if (c > 11) {
                c = 0;
            }
        }
        out+= '</dl>';
    }
    document.getElementById(id).innerHTML = out;
}
