<!--

// Scheduler.js v1.0 by Dominik Switzerlander
// E-mail : info@webxpertise.ch
// Created : July 23, 2002
// Revisions : 
// Copyright 2002 Dominik Switzerlander
// =======================================================================================
// With this script you can time the appearance of texts on your website. 
// When a page containing this script is loaded, it checks if an important date
// has passed and displays the corresponding text.

// To use this script save it as *.js
// Paste the following code to your web page
// <script language="JavaScript" src="js/scheduler.js"></script>
// <noscript>---Please aktivate javascript to see all elements---</noscript>

// Date list
// New entries need to be inserted in the correct order.
// Numbers in [brackets] need to be adjusted to ensure the array works.
// The number xx in "new Array (xx)" needs to be equal to the number of entries in the array.
// An entry consists of a date and text. Enter the date exactly in the format as below
// ("dd.mm.yyyy texttext") and don't forget the trailing ";" sign.

	var important_date = new Array (7);
	important_date[0] = "01.09.2009 Germany: ***Merry Gospel Christmas*** Tour start on 24 Nov in Waldshut/Tiengen. Switzerland: ***Praising His Name*** Tour start on 25 Nov in Olten.";
	important_date[1] = "25.11.2009 Germany: ***Merry Gospel Christmas*** Tour until end Dec. Switzerland: ***Praising His Name*** Tour until end Dec.";
	important_date[2] = "04.12.2009 Germany: Tour until end Dec. Spain 16 Dec in Malaga. Switzerland: 9 Dec in Zurich.";
	important_date[3] = "17.12.2009 Switzerland: Tour until 22 Dec. Germany: Tour until end Dec.";
	important_date[4] = "23.12.2009 Germany: Tour until end Dec.";
	important_date[5] = "28.12.2009 Please check here for the latest information on concerts of the Jackson Singers.";
	important_date[6] = "29.12.2099 for 2010 are being planned. Please check again here.";
	
	// the script runs through all entries
	var firsttext = "Next events<br>";
	var eventtext = "";
	for (var n = 0; n < important_date.length; n++) {
    eventtext = important_date[n];
	date = eventtext.substring(0,2);
	month = eventtext.substring(3,5);
	year = eventtext.substring(6,10);

	var eventdate=new Date(year,month-1,date);
	var today = new Date();

	// Checking if a date entry is newer than today.
	// If yes, the previous date entry is being displayed.
		if (eventdate > new Date()) {
		eventtext = important_date[n-1];
		text = eventtext.substring(11,eventtext.length);
		document.write(firsttext + text);
		break; 
		}
		else if (eventdate < new Date()) {
		void(0);
		}
	}

 //-->