	function zeigeMal(Ereignis) {
		 if (!Ereignis)
    			Ereignis = window.event;
		    pos = new Object();
		    pos.left = Ereignis.clientX;
		    pos.top = Ereignis.clientY;

		if(document.getElementById('kartenLayer').style.display=='block') {
			document.getElementById('kartenLayer').style.display='none';
			document.onclick=null;

			
		} else {
			document.getElementById('kartenLayer').style.display='block';
			document.getElementById("kartenLayer").style.top=(pos.top+10)+"px";
			document.getElementById("kartenLayer").style.left=(pos.left+10)+"px";

		}	
	}	
	var Param = "";		
	function ZeigeInfoLayer(Ereignis) {
		 if (!Ereignis)
    			Ereignis = window.event;
		    pos = new Object();
		    pos.left = Ereignis.clientX;
		    pos.top = Ereignis.clientY;

		if(document.getElementById("InfoLayer").style.display=='block') {
			document.getElementById("InfoLayer").style.display='none';
			document.onmouseover=null;
			Ereignis=null;

			
		} else {
			document.getElementById("InfoLayer").style.display='block';
			switch(Param) {
				case "Veranstalter":
					
					document.getElementById("inhaltHead").innerHTML="Tour";
					document.getElementById("inhalt").innerHTML="<h5 class='infoLayerH5'>Woran man Qualität erkennt.</h5>"+
					"Unsere Reisen sind unser Kapital. Und unsere ganze Leidenschaft. Bei der qualitativen Ausstattung und Durchführung sind wir darum besonders anspruchsvoll und detailgenau. Um diesem hohen Qualitätsanspruch gerecht zu werden, organisieren und begleiten wir die Reisen persönlich."+
					"<br><br><img src='/fileadmin/template/main/images/Velociped_Tour.gif'><br>Alle original Velociped-Touren erkennen Sie an der Velociped-Fahne. Ist das Symbol neben dem Reisetitel aufgeführt, sind wir hier persönlich für Sie aktiv!"+
					"<br><br><img src='/fileadmin/template/main/images/Velociped_Partner_Tour.gif'><br>Damit Sie aber aus einem noch umfangreicheren Angebot an Reisen wählen können, arbeiten wir darüber hinaus mit langjährigen, ausgewählten Partnern zusammen.";				
				
					
				break;
				case "Reiseart":
					document.getElementById("inhaltHead").innerHTML="Reiseart";
					document.getElementById("inhalt").innerHTML="<h5 class='infoLayerH5'>Auf eigene Faust oder in der Gruppe?</h5>"+
					"<b>Geführte Reisen</b><br>"+
					"Bei den geführten Reisen brauchen Sie sich wirklich nur noch aufs Rad zu setzen und es rollen zu lassen. Um alles andere kümmern sich die beiden Velociped-Reiseleiter: der eine per Fahrrad, der andere mit dem Bus. Wo immer es sich lohnt, haben wir Besichtigungen organisiert und Führungen reserviert."+
					"<br><br>Was Rad- und Busbegleiter sonst noch alles für Sie tun, lesen Sie unter Punkt „Das Rundum - Sorglos - Paket“. Die geführten Reisen finden zu den auf den jeweiligen Seiten angegebenen Terminen statt. Unsere Gruppen haben eine max. Teilnehmerzahl von 18 Personen und sind bunt gemischt, was immer für interessante Gespräche und eine sehr gelöste Stimmung sorgt."+
					"<br><br>"+
					"<b>Individuelle Reisen</b><br>"+
					"Bei den individuellen Touren entscheiden Sie selbst, wann und mit wem Sie fahren möchten. Außerdem können Sie Ihren persönlichen Tagesablauf festlegen oder die Reise auch zwischendurch unterbrechen."+
					"<br><br>"+
					"Auch für die Individualtouren haben wir ein eigenes „Individuell-Sorglos-Paket“ entwickelt.";				
				break;
				case "Reiselevel":
					document.getElementById("inhaltHead").innerHTML="Level";
					document.getElementById("inhalt").innerHTML="<h5 class='infoLayerH5'>Welche Tour für wen?</h5>Diese Übersicht zeigt Ihnen die unterschiedlichen Schwierigkeitsgrade " +
					"unserer Touren. So können Sie Ihre eigene Radel-Kondition besser " +
					"einschätzen und die passende Reise für Sie finden.<br><br>"+
					"<b>+ <br>leicht</b><br>Gaaaanz entspanntes Radeln in meist ebenem Gelände." +
					"<br><br><b>++<br>leicht-mittel</b><br>Leichtes Fahren, ab und an eine Schiebestrecke."+
					"<br><br><b>+++<br>mittel</b><br>Für Menschen mit normaler Kondition, einzelne Etappen mit schwierigeren Wegeverhältnissen oder Schiebestrecken."+
					"<br><br><b>++++<br>schwer</b><br>Für aktive Radfahrer, mehrere Etappen im hügeligen Gelände.";				
				break;
				case "DZ":
					document.getElementById("inhaltHead").innerHTML="Unterkunft";
					document.getElementById("inhalt").innerHTML="<h5 class='infoLayerH5'>Nobel- oder Jugendherberge?</h5>"+
					"Natürlich richten wir uns, so weit es geht, nach Ihren Wünschen. Nur in einem Punkt lassen wir Ihnen begrenzt die Wahl: verwöhnen lassen müssen Sie sich schon!<br><br>"+
					" Auf all unseren Individualtouren bieten wir Ihnen entweder von uns persönlich ausgesuchte komfortable Hotels oder gute familiengeführte Gasthöfe. Oft können Sie sogar zwischen diesen zwei verschiedenen Standards wählen:<br><br>"+
					" Bevorzugen Sie kleinere familiengeführte Gasthöfe und Hotels, so empfehlen wir Ihnen die Kategorie B. Wünschen Sie jedoch Komforthotels im 3 bis 4 Sterne-Bereich, so sind Sie bei unserer Kategorie A gut aufgehoben. Eines ist dabei sicher: alle Zimmer sind ausgestattet mit Dusche/Bad und WC und bieten der Kategorie entsprechenden Komfort. Denn wir sind der Meinung, dass ein erlebnisreicher Tag auf dem Rad einen schönen Ausklang verdient.<br><br>"+
					" Bei allen Original Velociped Gruppenreisen übernachten Sie in ausgewählten, komfortablen Mittelklasse-Hotels (3 bis 4 Sterne) der Kategorie A."+
					" Durch ausgewählte Partnertouren erschließen wir Ihnen zusätzliche attraktive Reiserouten - denn wir können nicht selbst überall sein."+
					" Durch die gute und zum Teil schon langjährige Zusammenarbeit mit unseren Partnern können wir Ihnen auch bei diesen Reisen einen schönen Urlaub garantieren.";				
				break;
				case "Rabatt":
					document.getElementById("inhaltHead").innerHTML="Rabatt";
					document.getElementById("inhalt").innerHTML="Der Rabatt bezieht sich immer auf den Grundpreis der jeweiligen Reise.";				
				break;
				case "Teilnehmer":
					document.getElementById("inhaltHead").innerHTML="Hinweis zur Mindestteilnehmerzahl";
					document.getElementById("inhalt").innerHTML="Der Reiseveranstalter kann von der Reise bis zum einundzwanzigsten Tag vor Reisebeginn zurücktreten, wenn die in der Reiseausschreibung konkret angegebene Mindestteilnehmerzahl nicht erreicht wird – Sie werden im Falle des Absage unverzüglich informiert - Den eingezahlten Reisepreis erstattet Ihnen der Veranstalter selbstverständlich unverzüglich zurück - Bitte beachten Sie dazu auch die allgemeinen Geschäftsbedingungen des Reiseveranstalters.";				
				break;
			}
			document.getElementById("InfoLayer").style.top=(pos.top+0)+"px";
			document.getElementById("InfoLayer").style.left=(pos.left-310)+"px";
			

		}
		
	}
	function ZeigeInfoLayerEnglisch(Ereignis) {
		 if (!Ereignis)
    			Ereignis = window.event;
		    pos = new Object();
		    pos.left = Ereignis.clientX;
		    pos.top = Ereignis.clientY;

		if(document.getElementById("InfoLayer").style.display=='block') {
			document.getElementById("InfoLayer").style.display='none';
			document.onmouseover=null;
			Ereignis=null;

			
		} else {
			document.getElementById("InfoLayer").style.display='block';
			switch(Param) {
				case "Veranstalter":
					
					document.getElementById("inhaltHead").innerHTML="Tour";
					document.getElementById("inhalt").innerHTML="<h5 class='infoLayerH5'>How quality can be identified.</h5>"+
					"Our tours are our capital. And also our greatest passion. Therefore, we are particularly ambitious and precise as to the quality of our equipment and tour realisation. In order to cope with this high quality standard, we organise and guide our tours personally."+
					"<br><br><img src='/fileadmin/template/main/images/Velociped_Tour.gif'><br>You can easily identify all of the original Velociped tours by the Velociped flag. Whenever you find this symbol next to the tour title, you may be sure that we are acting here personally for you!"+
					"<br><br><img src='/fileadmin/template/main/images/Velociped_Partner_Tour.gif'><br>And what’s more: The cooperation with long-lasting, selected partners give us the possibility to offer you an even more comprehensive tour programme.";				
				
					
				break;
				case "Reiseart":
					document.getElementById("inhaltHead").innerHTML="Tour type";
					document.getElementById("inhalt").innerHTML="<h5 class='infoLayerH5'>On your own or in a group?</h5>"+
					"<b>Guided tours</b><br>"+
					"Guided tours mean that you just get on your bike and enjoy your holiday. The two Velociped tour guides will care about everything else: one of them by bike, the other one by bus. Wherever it is worthwhile, we have organised sightseeings and guidances for you."+
					"<br><br>Under “All-carefree service” you’ll find anything else our guides will arrange for you. You will find all dates of the guided tours on the corresponding pages. The maximum number of participants is 18 per group. It is the mix that guarantees interesting conversations and good mood."+
					"<br><br>"+
					"<b>Individual tours</b><br>"+
					"Individual bike tours mean that you determine when and with whom you want to travel. Furthermore, you can decide on your personal daily routine, or even interrupt the tour in between."+
					"<br><br>"+
					"For the individual tours we have also developed a special “All-carefree service”. ";				
				break;
				case "Reiselevel":
					document.getElementById("inhaltHead").innerHTML="Levels";
					document.getElementById("inhalt").innerHTML="<h5 class='infoLayerH5'>Which tour for whom?</h5>This overview shows you the different levels of difficulty" +
					"of our tours allowing you to assess your own cycling condition far better, " +
					" and to find out the suitable travel for you.<br><br>"+
					"<b>+ <br>easy</b><br>Muuuuy relaxed biking in mostly flat terrain.  " +
					"<br><br><b>++<br>easy to moderate</b><br>Easy cycling, pushing your bike for short stretches."+
					"<br><br><b>+++<br>moderate</b><br>For people in a general good shape. Few stretches over more difficult terrain or pushing your bike."+
					"<br><br><b>++++<br>advanced</b><br>For experienced bikers, several tracks over hilly terrain.";				
				break;
				case "DZ":
					document.getElementById("inhaltHead").innerHTML="Accommodation";
					document.getElementById("inhalt").innerHTML="<h5 class='infoLayerH5'>Luxury hotel or youth hostel?</h5>"+
					"Of course, we'll try to comply with your requirements as far as possible. But there is one point we'll not leave free choice to you: you'll be pampered by us!<br><br>"+
					" For all of our individual tours we offer you either personally selected, comfortable hotels or good family-owned guesthouses. Often, you may even choose between these two different standards:<br><br>"+
					" If you prefer smaller, family-owned guesthouses or hotels, we recommend you our category B. Should you prefer comfort hotels ranged from 3 to 4 stars, our category A would be the right choice. Anyhow, all rooms are equipped with shower/bath and WC and offer a comfort as corresponds to the chosen category. We think that an eventful day on the bike deserves a pleasant end.<br><br>"+
					" On all original Velociped group tours you will be accommodated in selected, comfortable middle-class hotels (3 to 4 stars) of category A."+
					" In addition, we offer you attractive routes that are organised by some selected business partners – as we cannot be present everywhere personally."+
					" Based on good and in part already long-lasting cooperation with our partners, we can guarantee you a nice holiday also on those tours.";				
				break;
				case "Rabatt":
					document.getElementById("inhaltHead").innerHTML="Rebate.";
					document.getElementById("inhalt").innerHTML="The rebate always applies to the base price of the respective tour.";				
				break;
				case "Teilnehmer":
					document.getElementById("inhaltHead").innerHTML="Minimum number of participants.";
					document.getElementById("inhalt").innerHTML="The tour operator can withdraw from the tour twenty-one days before the starting date of the tour, at the latest , in case the minimum number of participants  stated under the tour description is not attained. You will duly be informed without any delay in case of a withdrawal. The paid tour price will, of course, be refunded by the operator without undue delay. Please note the General Terms and Conditions of the tour operator.";				
				break;
			}
			document.getElementById("InfoLayer").style.top=(pos.top+0)+"px";
			document.getElementById("InfoLayer").style.left=(pos.left-310)+"px";
			

		}
		
	}
	
	var formularElement="";
	var posLayer=null;
	
	function openLayer(Ereignis) {
	
 		if (!Ereignis)
    			Ereignis = window.event;
    	if(!posLayer) {
		    posLayer = new Object();
		    posLayer.left = Ereignis.clientX;
		    posLayer.top = Ereignis.clientY;
    	}

		document.getElementById("calendar").style.display="block";
		document.getElementById("calendar").style.top=(posLayer.top-100)+"px";
		document.getElementById("calendar").style.left=(posLayer.left-50)+"px";
	}
	
	
		function CalendarJS() {
		this.now = new Date();
		this.dayname = ["Mo","Di","Mi","Do","Fr","Sa","So"];
		this.monthname = ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"];	
		this.tooltip = ["vorheriger Monat","nächster Monat","aktuelles Datum"];
		this.monthCell = document.createElement("th");
		this.tableHead = null;
		this.parEl = null;
		
		this.init = function( id, initDate ) {
			this.now = initDate?initDate:new Date();
			this.date = this.now.getDate();
			this.month = this.mm = this.now.getMonth();
			this.year = this.yy = this.now.getFullYear();
			this.monthCell.colSpan = 5;
			this.monthCell.appendChild(document.createTextNode( this.monthname[this.mm]+" "+this.yy ));
			this.tableHead = this.createTableHead();
			this.parEl = document.getElementById( id );
			this.show();
			if (!initDate) this.checkDate();
		},
		
		
		this.checkDate = function() {
			var self = this;
			var today = new Date();
			if (this.date != today.getDate()) {
				this.date  = today.getDate();
				if (this.mm == this.month && this.yy == this.year)
					this.switchMonth("current");
				this.month = today.getMonth();
				if (this.mm == this.month && this.yy == this.year)
					this.switchMonth("current");
				this.year  = today.getFullYear();
				if (this.mm == this.month && this.yy == this.year)
					this.switchMonth("current");
 
			}
			window.setTimeout(function() { self.checkDate(); }, Math.abs(new Date(this.year, this.month, this.date, 24, 0, 0)-this.now));
		},
		
		this.removeElements = function( Obj ) {
			for (var i=0; i<Obj.childNodes.length; i++)
				Obj.removeChild(Obj.childNodes[i]);
			return Obj;
		},
			
		this.show = function() {
			this.parEl = this.removeElements( this.parEl );
			this.monthCell.firstChild.replaceData(0, this.monthCell.firstChild.nodeValue.length, this.monthname[this.mm]+" "+this.yy);
			var table = document.createElement("table");
			table.appendChild( this.createTableBody() );
			table.appendChild( this.tableHead );
			this.parEl.appendChild( table );
		},
				
		this.createTableHead = function() {
			var thead = document.createElement("thead");
			var tr = document.createElement("tr");
			var th = this.getCell( "th", "\u00AB", "last_month" )
			th.Instanz = this;
			th.onclick = function() { this.Instanz.switchMonth("prev"); };
			th.title = this.tooltip[0];
			try { th.style.cursor = "pointer"; } catch(e){ th.style.cursor = "hand"; }
			tr.appendChild( th );
			this.monthCell.Instanz = this;
			this.monthCell.onclick = function() { this.Instanz.switchMonth("current"); };
			this.monthCell.title = this.tooltip[2];
			try { this.monthCell.style.cursor = "pointer"; } catch(e){ this.monthCell.style.cursor = "hand"; }
			tr.appendChild( this.monthCell );			
			th = this.getCell( "th", "\u00BB", "next_month" )
			th.Instanz = this;
			th.onclick = function() { this.Instanz.switchMonth("next"); };
			th.title = this.tooltip[1];
			try { th.style.cursor = "pointer"; } catch(e){ th.style.cursor = "hand"; }
			tr.appendChild( th );
			thead.appendChild( tr );
			tr = document.createElement('tr');
			for (var i=0; i<this.dayname.length; i++)
				tr.appendChild( this.getCell("th", this.dayname[i], "weekday" ) );
			thead.appendChild( tr );
			return thead;
		},
		
		this.createTableBody = function() {
			var dayspermonth = [31,28,31,30,31,30,31,31,30,31,30,31];
			var sevendaysaweek = 0;
			var begin = new Date(this.yy, this.mm, 1);
			var firstday = begin.getDay()-1;
			if (firstday < 0)
				firstday = 6;
			if ((this.yy%4==0) && ((this.yy%100!=0) || (this.yy%400==0)))
				dayspermonth[1] = 29;
			var tbody = document.createElement("tbody");
			var tr = document.createElement('tr');
			if (firstday == 0) {
				for (var i=0; i<this.dayname.length; i++) {
					var prevMonth = (this.mm == 0)?11:this.mm-1;
					tr.appendChild( this.getCell( "td", dayspermonth[prevMonth]-6+i, "last_month" ) );
				}
				tbody.appendChild( tr );
				tr = document.createElement('tr');
			}
			
			for (var i=0; i<firstday; i++, sevendaysaweek++) {
				var prevMonth = (this.mm == 0)?11:this.mm-1;
				tr.appendChild( this.getCell( "td", dayspermonth[prevMonth]-firstday+i+1, "last_month" ) );
				
			}
			
			for (var i=1; i<=dayspermonth[this.mm]; i++, sevendaysaweek++){
				if (this.dayname.length == sevendaysaweek){
					tbody.appendChild( tr );
					tr = document.createElement('tr');
					sevendaysaweek = 0;
				}
				
				var td = null;
				if (i==this.date && this.mm==this.month && this.yy==this.year && (sevendaysaweek == 5 || sevendaysaweek == 6))
					td = this.getCell( "td", i, "today weekend" );
				else if (i==this.date && this.mm==this.month && this.yy==this.year)
					td = this.getCell( "td", i, "today" );
				else if (sevendaysaweek == 5 || sevendaysaweek == 6)
					td = this.getCell( "td", i, "weekend" );
				else
					td = this.getCell( "td", i, null ); 
					
				td.setDate = this.setDate;
				td.dd = i;
				td.mm = this.mm;
				td.yy = this.yy;
				td.onclick = function(e) {
					var currentDate = new Date(this.yy, this.mm, this.dd);
					this.setDate( currentDate );
				};
				tr.appendChild( td );
			}
	
			var daysNextMonth = 1;
			for (var i=sevendaysaweek; i<this.dayname.length; i++) 
				tr.appendChild( this.getCell( "td", daysNextMonth++, "next_month"  ) );
				
			tbody.appendChild( tr );
			
			while (tbody.getElementsByTagName("tr").length<6) {
				tr = document.createElement('tr');
				for (var i=0; i<this.dayname.length; i++) 
					tr.appendChild( this.getCell( "td", daysNextMonth++, "next_month"  ) );
				tbody.appendChild( tr );
				
			}
			return tbody;
			
		},
		
		
		
		this.setDate = function(date) {
			// Weiterverarbeitung des geklickten Datums

		
			var month = date.getMonth()+1;
			var year = date.getYear();
			var day = date.getDate();
			if(day<10) day = "0" + day;
			if(month<10) month= "0" + month;
			if(year<1000) year+=1900;
			document.getElementById(formularElement).value= (day +"."+month+"."+year);
			document.getElementById("calendar").style.display="none";
			document.onclick=null;
		}
		
		
		
		
		this.getCell = function(tag, str, cssClass) {
			var El = document.createElement( tag );
			El.appendChild(document.createTextNode( str ));
			if (cssClass != null)
				El.className = cssClass;
			return El;
		},
		
		this.switchMonth = function( s ){
			switch (s) {
				case "prev": 
					this.yy = (this.mm == 0)?this.yy-1:this.yy;
					this.mm = (this.mm == 0)?11:this.mm-1;
				break;
				
				case "next":
					this.yy = (this.mm == 11)?this.yy+1:this.yy;
					this.mm = (this.mm == 11)?0:this.mm+1;
				break;
				
				case "current":
					this.yy = this.year;
					this.mm = this.month;
				break;
			}
			this.show();
		}
	}
	
	var DOMContentLoaded = false;
	function addContentLoadListener (func) {
		if (document.addEventListener) {
			var DOMContentLoadFunction = function () {
				window.DOMContentLoaded = true;
				func();
			};
			document.addEventListener("DOMContentLoaded", DOMContentLoadFunction, false);
		}
		var oldfunc = (window.onload || new Function());
		window.onload = function () {
			if (!window.DOMContentLoaded) {
				oldfunc();
				func();
			}
		};
	}
	
	addContentLoadListener( function() { 
		try {
			new CalendarJS().init("calendar");
		} catch (e) {
			;
		}
		
			//new CalendarJS().init("calendar", new Date(2009, 1, 15));
	} );
	