//<![CDATA[

var yyyymmdd;         // Last Sundays date - file names
var yyyy_mm_dd;       // Last Sundays date - file names w/ hyphens
var xtoday;           // Today's date
var m3dy;             // Last Sundays date
var yyyy;             // Last Sundays year
var m3ssy;            // Last weekend date (Sat & Sun)
var m3msy;            // Next week date (Mon - Sat)

  var m3=new Array(13);
  m3[1]="Jan";
  m3[2]="Feb";
  m3[3]="Mar";
  m3[4]="Apr";
  m3[5]="May";
  m3[6]="Jun";
  m3[7]="Jul";
  m3[8]="Aug";
  m3[9]="Sep";
  m3[10]="Oct";
  m3[11]="Nov";
  m3[12]="Dec";

function getSunday() {
  LastSun = new Date();
  xtoday = (LastSun.getFullYear() * 10000) + ((LastSun.getMonth() + 1) * 100) + LastSun.getDate();

  LastSun.setTime(LastSun.getTime() - LastSun.getDay() * 24 * 60 * 60 * 1000);

  yyyymmdd = (LastSun.getFullYear() * 10000) + ((LastSun.getMonth() + 1) * 100) + LastSun.getDate();
  yyyy_mm_dd = LastSun.getFullYear() + "-";
  if ((LastSun.getMonth() + 1) < 10) {
    yyyy_mm_dd = yyyy_mm_dd + "0";
    }
  yyyy_mm_dd = yyyy_mm_dd + (LastSun.getMonth() + 1) + "-" + LastSun.getDate();
  yyyy = LastSun.getFullYear();
  m3dy = m3[LastSun.getMonth() + 1] + " " + LastSun.getDate() + ", " + LastSun.getFullYear();

  LastSat = new Date();
  LastSat.setTime(LastSun.getTime() - 1 * 24 * 60 * 60 * 1000);

  NextMon = new Date();
  NextMon.setTime(LastSun.getTime() + 1 * 24 * 60 * 60 * 1000);

  NextSat = new Date();
  NextSat.setTime(LastSun.getTime() + 6 * 24 * 60 * 60 * 1000);

  if (LastSun.getMonth() == LastSat.getMonth()) {
    m3ssy = m3[LastSun.getMonth() + 1] + " " + LastSat.getDate() + " & " + LastSun.getDate() + ", " + LastSun.getFullYear();
    }

  if (LastSun.getMonth() != LastSat.getMonth()) {
    m3ssy = m3[LastSat.getMonth() + 1] + " " + LastSat.getDate() + " & " + m3[LastSun.getMonth() + 1] + " " + LastSun.getDate() + ", " + LastSun.getFullYear(); 
    }

  if (NextMon.getMonth() == NextSat.getMonth()) {
    m3msy = m3[NextMon.getMonth() + 1] + " " + NextMon.getDate() + " - " + NextSat.getDate();
    }

  if (NextMon.getMonth() != NextSat.getMonth()) {
    m3msy = m3[NextMon.getMonth() + 1] + " " + NextMon.getDate() + " - " + m3[NextSat.getMonth() + 1] + " " + NextSat.getDate(); 
    }
  }

// by AK - 8/10/02

//]]>
