function getLaborDayOfWeek(year) {

    for (var i = 1; i < 8; i++) {
        var test = new Date("Sept " + i + ", " + year )
        var day = test.getDay();
        if (day == 1) {
            break;
        }
    }
    
    return i;

}

function getWhichYear(now, this_year) {

    // Establish any Labor Day
    var labor_day = "Sept " + getLaborDayOfWeek(this_year) + ", " + this_year;
    var labor_date = new Date(labor_day);
    
    // Test whether we're past labor_day:
    if (now < labor_date) {
        return 0;
    }
    
    if (now > labor_date) {
        return 1;
    }    
    
}

function getLaborDay() {

    var now = new Date();
    var this_year = (now.getYear()) + 1900;

    var which_year = getWhichYear(now, this_year);
    
    if (which_year) {
        var next_year = this_year + 1;
        labor_day = "Sept " + getLaborDayOfWeek(next_year) + ", " + next_year;
    } else {
        labor_day = "Sept " + getLaborDayOfWeek(this_year) + ", " + this_year;    
    }
    
    labor_date = new Date(labor_day);
    brc_opens = new Date(labor_date.getTime() - (7 * 86400000));
    
    return ('Aug ' + brc_opens.getDate() + ', ' + (brc_opens.getYear() + 1900) + ' 00:00:01');
        
}

function getBMYear() {

    var now = new Date();
    var this_year = year = (now.getYear()) + 1900;
    
    var which_year = getWhichYear(now, this_year);
    
    if (which_year) {
        year++;
    } 
    return year;
}

var event = getLaborDay();
var bm_year = getBMYear();