//KNOW YOUR SEASONS SCRIPT 2.0---------------------------------------------------------------------------------------------------------
// Written for Tallygarunga Academy of Magic - Wed 2 Feb 2010 - By Muggs
//-------------------------------------------------------------------------------DO NOT REMOVE THIS HEADER WITHOUT PERMISSION ---------
//
//    This program is free software: you can redistribute it and/or modify
//    it under the terms of the GNU General Public License as published by
//    the Free Software Foundation, either version 3 of the License, or
//    (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details > 
//
//    100% Australian Made, no animals where harmed in the making of this script
//    ...except bugs...muggs no likes bugs // Inspired by Tallygarunga Academy of Magic
//--------------------------------------------------------------------------------------


var timeOfYear = new Array("", 
"Summer", 
"Autumn", 
"Winter",
"Spring");

var descriptions = new Array("",
"School's out on <b>December 22nd</b> The weather is hot hot hot! Bring out the thongs and sunscreen, cause it's gonna be a scorcher of a day! But don't forget, while you're enjoying your <b>summer</b>, school starts on the <b>1st of February</b>... are you ready for the new year?", // JAN
"Welcome to <b>Term 1</b> of the School Year! If you think the Summer Holidays where hot you don't know the half of it as the mercury continues to peak! Classes are open and it's time to sign up and jump in to your new subjects.. you wouldn't want to be late for your first day of school now would you?", // FEB
"Good news! (or Bad) Summer's over and we can say goodbye to the 40+ Degree days as we settle into <b>Term One</b>", // MAR
"Watch out it's windy! Easter Holiday are coming up from <b>8th of April</b> to 2nd Term starting the on <b>27th</b> and it's time to rug up as the temperature cools", //APRIL
"It's <b>Term Two</b> and it just keeps getting colder, no snow though! Expect rain, wind and chilly weather perfect for getting cosy with that special someone", //MAY
"It's <b>Term Two</b> and it just keeps getting colder, no snow though! Expect rain, wind and chilly weather perfect for getting cosy with that special someone", //JUNE
"It's Raining! It's Pouring! it's Semester Break for All Students from the <b>1st of July</b> but don't go getting too comfy <b>Term Three</b> starts on the <b>18th!</b>", //JULY
"It's <b>Term Three!</b> Rug up and get cosy as things head towards <b>Tallygarunga's Birthday on August 6th!</b> Are you ready for the party?", // AUGUST
"Avast Ye Harties! Freezing? Yes but the end is in sight with Holidays just around the corner <b>Term Three</b> ends on the <b>23rd of September</b> and who could forget Pirate Day on the 19th!", // SEP
"Welcome to <b>Term Four</b> and the weather is changing by the minute. Classes start on the 10th so it's time to get your kids hitting the books for those O's and E's at the end of the year while gearing up for <b>TaPostoWriMo</b> next month!", // OCT
"It's <b>TaPostoWriMo</b> which is quite a mouthful! Tally's homegrown Nano where the challenge is what you set! Have you posted your's up yet?", //NOV
"The weather is changing by the minute, storms and rain come in to play as exam fever begins to heat up..as does the mercury as it shifts into <b>Summer Holidays on the 22nd!</b> Time to start planning your vacation or summer adventures!"); //DEC

var date = new Date();
var d  = date.getDate();
var day = (d < 10) ? '0' + d : d;
var m = date.getMonth() + 1;
var month = (m < 10) ? '0' + m : m;
var yy = date.getYear();
var year = (yy < 1000) ? yy + 1900 : yy;
var season = 0;

// ok.. not entirely elegant but would be great for customised - you could do a custom message every month!// 
if (month == 1) season = 1; // jan = summer
if (month == 2) season = 1; // feb = summer
if (month == 3) season = 2; // mar = autumn
if (month == 4) season = 2; // apr = autumn
if (month == 5) season = 2; // may = autumn
if (month == 6) season = 3; // jun = winter
if (month == 7) season = 3; // jul = winter
if (month == 8) season = 3; // aug = winter
if (month == 9) season = 4; // sep = spring
if (month == 10) season = 4; //oct = spring
if (month == 11) season = 4; //nov = spring
if (month == 12) season = 1; //dec = summer


document.write(" This is <b>Victoria</b>, <b>Australia</b>. The year is <b>"+year+"</b> and it's currently <b>"+timeOfYear[season] +"</b>. "+ descriptions[m]);

