<!--

// Scheduler.js v1.0 by Dominik Schweizer
// E-mail : swiss@active.ch
// Created : July 23, 2002
// Revisions : 
// Copyright 2002 Dominik Schweizer
// =======================================================================================
// 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 Deutschland: ***Merry Gospel Christmas*** Tourneestart am 24.11. in Waldshut/Tiengen. Schweiz: ***Praising His Name*** Tourneestart am 25.11. in Olten.";
	important_date[1] = "25.11.2009 Deutschland: ***Merry Gospel Christmas*** Tournee bis Ende Dezember. Schweiz: ***Praising His Name*** Tournee bis Ende Dezember.";
	important_date[2] = "04.12.2009 Deutschland: Tournee bis Ende Dezember. Spanien: 16.12. in Malaga. Schweiz: 9.12. in Zürich.";
	important_date[3] = "17.12.2009 Schweiz: Tournee bis 22.12. Deutschland: Tournee bis Ende Dezember.";
	important_date[4] = "23.12.2009 Deutschland: Tournee bis Ende Dezember.";
	important_date[5] = "28.12.2009 Über die nächsten Auftritte der Jackson Singers und den Vorverkauf informieren Sie sich hier.";
	important_date[6] = "29.12.2099 für 2010 sind in Planung. Informieren Sie sich hier.";

	
	// the script runs through all entries
	var firsttext = "Nächste Auftritte<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);
		}
	}

 //-->