<!--

// Scheduler.js v1.0 by Dominik Schweizer
// E-mail : info@webxpertise.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 (3);
	important_date[0] = "01.03.2007 Frühlingsangebot bei Wines & more bis 15.4.";
  	important_date[1] = "24.03.2007 Degustieren Sie die neuen Jahrgänge in unserer Vinothek in Zürich.";
  	important_date[2] = "31.12.2009 Degustieren Sie die neuen Jahrgänge in unserer Vinothek in Zürich.";
//	important_date[1] = "30.03.2006 Wir sind jetzt an der Expovina Primavera in Zürich.";
//	important_date[2] = "07.04.2006 Besuchen Sie uns vom 22.09. bis 2.10. an der Züspa.";
//	important_date[3] = "22.09.2006 Wir sind an der Züspa. Degustieren Sie unsere neuen China-Weine.";
//	important_date[4] = "03.10.2006 Besuchen Sie uns vom 28.10. bis 5.11. an der Basler Weinmesse.";
//	important_date[5] = "28.10.2006 Wir sind an der Basler Weinmesse und ab 2.11. an der Expovina.";
//	important_date[6] = "02.11.2006 Wir sind an der Basler Weinmesse und an der Expovina.";
//	important_date[7] = "06.11.2006 Wir sind an der Expovina. Degustieren Sie unsere neuen China-Weine.";
// 	important_date[8] = "17.11.2006 Bis Weihnachten ist unsere Vinothek jeden Donnerstag geöffnet.";
//	important_date[10] = "27.10.2005 Wir sind im Moment an der Expovina in Zürich und ab 29.10. in Basel.";
//  important_date[11] = "29.10.2005 Wir sind bis 6.11. an der Basler Weinmesse. Bis 17.11. auch an der Expovina Zürich.";
//	important_date[12] = "07.11.2005 Wir sind bis 17.11. an der Expovina Zürich. Ab 19.11. an der IGEHO in Basel.";
//	important_date[13] = "18.11.2005 Besuchen Sie uns vom 19.11. bis 23.11. an der IGEHO in Basel.";
//	important_date[14] = "19.11.2005 Wir sind bis 23.11. an der IGEHO in Basel. Kommen Sie vorbei.";
//	important_date[15] = "20.12.2005 Vinothek und Büro sind geschlossen. Bestellung via Fax oder e-Mail.";
//	important_date[16] = "09.01.2006 Vinothek bis 8.3. geschlossen. Büro zu normalen Zeiten geöffnet.";
//	important_date[17] = "24.11.2099 Reduzierte Öffnungszeiten während den Festtagen.";

	
	// the script runs through all entries
	var firsttext = "";
	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);
		}
	}

 //-->