//KNOW YOUR SEASONS SCRIPT---------------------------------------------------------------------------------------------------------
// Written for Tallygarunga Academy of Magic - Wed 14 Apr 2010 - By ELMUGGO
//-------------------------------------------------------------------------------------DO NOT REMOVE THIS HEADER WITHOUT PERMISSION ---------
// Copyright (C) 2010 El Muggo.
//
//    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 > http://www.gnu.org/licenses/>.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


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

var descriptions = new Array("",
"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?", // summer message
"Watch out it's windy, Easter Holiday are coming up and things are heating up as the temperature cools", // autumn message
"Rug up and get cosy as things heat up towards Tallygarunga's birthday in August, are you ready for the party?", // winter message
"The weather is changing by the minute, storms and rain come in to play as exam fever begins to heat up.."); // spring message

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[season]);
