
<!-- Paste this code into an external JavaScript file named: marquee.js  -->

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Mike Hudson :: http://www.afrozeus.com */

function setupFadeLinks() {
/*  arrFadeLinks[0] = "index_calendar.shtml";
  arrFadeLinks[1] = "index_calendar.shtml";
  arrFadeLinks[2] = "index_calendar.shtml";
  arrFadeLinks[3] = "index_calendar.shtml";
  arrFadeLinks[4] = "index_calendar.shtml";
  arrFadeLinks[5] = "index_calendar.shtml";
  arrFadeLinks[6] = "index_calendar.shtml";*/
	var mthNames = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", 
							"October", "November", "December");
	var d = new Date();
	var currMonth;
	var txtMonth;
	var currYear;
	var dateText = document.getElementById("mthyear");
	
 	currMonth = d.getMonth();
	txtMonth = mthNames[currMonth];
	currYear = d.getFullYear();
	dateText.innerHTML = txtMonth + " " + currYear;
}

// You can also play with these variables to control fade speed, fade color, and how fast the colors jump.

var m_FadeOut = 255;
var m_FadeIn = 0;
var m_Fade = 0;
var m_FadeStep = 3;
var m_FadeWait = 1600;
var m_bFadeOut = true;

var m_iFadeInterval;

window.onload = Fadewl;

//var arrFadeLinks;
var arrFadeTitles;
var arrFadeCursor = 0;
var arrFadeMax;
var arrFadeInterval = 3;

function Fadewl() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
//  arrFadeLinks = new Array();
  setupFadeLinks();
	var d = new Date();
	var currMonth;
	
 	currMonth = d.getMonth();
	currMonth++;
	
	switch(currMonth) {
		case 1 :
			arrFadeTitles = new Array(
"Wednesday 21st","Books and uniform collection",
"Tuesday 27th - Friday 30th","Staff Development Days"
			);
			break;
		case 2 :
			arrFadeTitles = new Array(
"Monday 2nd","Students begin Term 1",
"Thursday 5th","House Swimming P  4",
"Friday 6th","House Swimming 5  12",
"Tuesday 10th","Year 7 2008 Information Night",
"Wednesday 11th","Parents and Friends&rsquo; Meeting",
"Friday 13th","Parents and Friends&rsquo; welcoming Night",
"Monday 16th  Wednesday 18th","Year 7 Camp Harrietville",
"Friday 20th","House Breakfast and Whole School Eucharist",
"Tuesday 24th","Year 8/9/10 Information Night",
"Wednesday 25th","Board Meeting"
			);
			break;
		case 3 :
			arrFadeTitles = new Array(
"Monday 2nd &amp; Tuesday 3rd","Year 11 Retreat",
"Monday 9th","Labour Day holiday",
"Wednesday 11th","Parents and Friends Meeting",
"Wednesday 25th","Board Meeting",
"Thursday 26th","House Music",
"Tuesday 31st","Primary Parent-Teacher Interviews",
"Wednesday 1st April","Parents and Friends&rsquo; Meeting",
"Friday 3rd April","Easter Liturgy",
"Friday 3rd April","End of Term 1  Interim reports. 2.15 p.m. finish"
			);
			break;
		case 4 :
			arrFadeTitles = new Array(
"Monday 20th","Staff Development Day",
"Tuesday 21st","Students begin Term 2",
"Wednesday 22nd","Board Meeting",
"Thursday 23rd","House Cross Country",
"Friday 24th","House Captain Induction service",
"Tuesday 28th","Year 3 and 4 Trip to 15 Mile Creek"
			);
			break;
		case 5 :
			arrFadeTitles = new Array(
"Tuesday 5th","Secondary students Parent-Teacher Interviews",
"Monday 11th  Friday 15th","Year 10 Work Experience",
"Tuesday 12th  Thursday 14th","National Curriculum Testing Year 3, 5, 7 &amp; 9",
"Wednesday 13th","Parents and Friends&rsquo; Meeting",
"Tuesday 19th","Year 7 2009 Trial Day &amp; Information Night  All parents",
"Friday 22nd","Whole School Photographs",
"Tuesday 26th","Open Day",
"Wednesday 27th","Board Meeting"
			);
			break;
		case 6 :
			arrFadeTitles = new Array(
"Monday 1st  Friday 5th","Year 6 Canberra Camp",
"Monday 8th","Queen&rsquo;s Birthday holiday",
"Tuesday 9th  Thursday 11th","Yr 11 &amp; 12 V.C.E. Written Examinations",
"Tuesday 9th  Friday 12th","Year 7  10 Examinations",
"Wednesday 10th","Parents and Friends&rsquo; Meeting",
"Monday 15th","Semester 2 courses begin for Year 11 &amp; 12 students",
"Wednesday 24th","Board Meeting",
"Friday 26th","End of Term 2  2.15 p.m. finish"
			);
			break;
		case 7 :
			arrFadeTitles = new Array(
"Monday 13th","Staff and Students begin Term 3",
"Wednesday 15th","Parents and Friends&rsquo; Meeting",
"Wednesday 22nd","Board Meeting",
"Wednesday 29th","Year 7 2009 Trial Day"
			);
			break;
		case 8 :
			arrFadeTitles = new Array(
"Tuesday 11th","Parents and Friends&rsquo; Meeting",
"Wednesday 12th","Year 10 VCE Information Night",
"Friday 14th","House Athletics Prep  4",    
"Saturday 15th","House Athletics 5  12",
"Wednesday 19th","Year 8, 9 &amp; 10 Elective Selection Night",
"Monday 24th &amp; Tuesday 25th","Begin initial VCE Interviews Year 10 &amp; 11",
"Wednesday 26th","Board Meeting"
			);
			break;
		case 9 :
			arrFadeTitles = new Array(
"Tuesday 1st","P&frasl;1 &amp; 2&frasl;3 &amp; both Choirs to Music Festival",
"Wednesday 2nd","Parents and Friends&rsquo; Meeting",
"Thursday 3rd","4&frasl;5 &amp; 5&frasl;6 &amp; Senior Choir to Music Festival",
"Thursday 3rd","Jubilee aerial photograph P-7",
"Friday 4th","Year 11 &amp; 12 Studio Arts Visit Gallery",
"Monday 7th","Fresh &amp; Fiesty Choir Workshop",
"Tuesday 8th","Buy a White Balloon Day, Gold Coin donation",
"Tuesday 8th","SDSSSA Athletics",
"Wednesday 9th","Prep Excursion to the Albury Library and Museum",
"Friday 11th","Secondary student elective selection forms due in",
"Friday 11th","Year 12 English lecture and film",
"Friday 11th","TRIVIA NIGHT",
"Monday 14th  Thursday 17th","Year 8 and 9 Camp",
"Tuesday 15th","Junior School Parent-Teacher Interviews",
"Friday 18th","Yr 11 &amp; 12 Studio Arts Final Works &amp; folios submitted",
"Friday 18th","Fresh &amp; Feisty Rehearsal",
"Friday 18th","Deep Blue Rehearsal &amp; Workshop",
"Friday 18th","Interim report",
"Friday 18th","End of Term 3  2.15 p.m. finish",
"Thursday 24th","Board Meeting"
			);
			break;
		case 10 :
			arrFadeTitles = new Array(
"Monday 5th","Students begin Term 4",
"Tuesday 13th","Parents and Friends&rsquo; AGM",
"Wednesday 14th","Secondary Parent-Teacher Interviews",
"Tuesday 20th","Year 7 Transition activities",
"Tuesday 20th  Friday 20th November","LOTE Oral Examinations",
"Friday 23rd","Year 10 Presentation Ball",
"Thursday 29th","House Drama"
			);
			break;
		case 11 :
			arrFadeTitles = new Array(
"Monday 2nd","EXEAT Day",
"Tuesday 3rd","Cup day holiday",
"Friday 6th","Prep  Year 2 sleepover",
"Wednesday 11th","Parents and Friends&rsquo; Meeting",
"Tuesday 24th  Friday 27th","Year 11 Exams",
"Monday 30th  Wednesday 2nd December","Year 10 Exams"
			);
			break;
		case 12 :
			arrFadeTitles = new Array(
"Tuesday 1st","Scholarship Testing",
"Thursday 3rd and Friday 4th","Year 11 and 12 Head Start VCE",
"Monday 7th  Thursday 10th","Year 7, 8, 9 Exams",
"Monday 7th  Thursday 10th","Year 10 Camp",
"Friday 11th","Correction Day  -  NO STUDENTS",
"Monday 14th","Primary and Secondary Campuses Carol Service",
"Wednesday 16th","Secondary Students Finish",
"Wednesday 16th","Presentation Night",
"Thursday 17th","Primary Presentation morning",
"Friday 18th","End of Term 4 for staff"
			);
			break;
		default :
			arrFadeTitles = new Array(
			"","No Events"
			);
	}
//  arrFadeMax = arrFadeLinks.length-1;
  arrFadeMax = arrFadeTitles.length-1;
  setFadeLink();
}

function setFadeLink() {
  var ilink = document.getElementById("fade_link");
  var x;
  ilink.innerHTML = "";
  for (x=0;x<arrFadeInterval*2;x+=2) {
	  if ((arrFadeCursor+x) > arrFadeMax) 
	  	break; 
	  ilink.innerHTML = ilink.innerHTML + "<br /><b>" + arrFadeTitles[arrFadeCursor+x] + "</b><br /><i>" + arrFadeTitles[arrFadeCursor+x+1] + "</i><br />";
  }
//  ilink.href = arrFadeLinks[arrFadeCursor];
  ilink.href = "index_calendar.shtml";
}

function fade_ontimer() {
  if (m_bFadeOut) {
    m_Fade+=m_FadeStep;
    if (m_Fade>m_FadeOut) {
      arrFadeCursor = arrFadeCursor + (2 * arrFadeInterval);
      if (arrFadeCursor>arrFadeMax)
        arrFadeCursor=0;
      setFadeLink();
      m_bFadeOut = false;
    }
  } else {
    m_Fade-=m_FadeStep;
    if (m_Fade<m_FadeIn) {
      clearInterval(m_iFadeInterval);
      setTimeout(Faderesume, m_FadeWait);
      m_bFadeOut=true;
    }
  }
  var ilink = document.getElementById("fade_link");
  if ((m_Fade<m_FadeOut)&&(m_Fade>m_FadeIn))
    ilink.style.color = "#" + ToHex(m_Fade);
}

function Faderesume() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
}

function ToHex(strValue) {
  try {
    var result= (parseInt(strValue).toString(16));

    while (result.length !=2)
            result= ("0" +result);
    result = result + result + result;
    return result.toUpperCase();
  }
  catch(e)
  {
  }
}
