			function uhrzeit() 
			{	
				var Digital=new Date()
				var hours=Digital.getHours()
				var minutes=Digital.getMinutes()
				var seconds=Digital.getSeconds()
				var day=Digital.getDate()
				var month=Digital.getMonth()
				month = month + 1;				
				var year=Digital.getFullYear()

				if (hours==0)
				hours=12
				if (minutes<=9)
				minutes="0"+minutes
				if (seconds<=9)
				seconds="0"+seconds
				
				document.getElementById("uhrzeit").innerHTML = day+"."+month+"."+year+" "+hours+":"+minutes+":"+seconds;

				setTimeout("uhrzeit()",1000)
			}
			
			function seite(seitenr) 
			{	
				window.location.hash = "?seite="+seitenr;
			}
		
			function seite_guestbook(seitenr,seitenzahl) 
			{								
				window.location.hash = "?seite="+seitenr+"&seitenzahl="+seitenzahl;
			}
		
			function searchForText(saisonnr)
			{				
				var xmlHttp = null;

				if(typeof XMLHttpRequest != 'undefined')
				{
					xmlHttp = new XMLHttpRequest();
				}

				if(!xmlHttp)
				{
					try
					{
						xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
					}
					catch(e)
					{
						try
						{
							xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
						}
						catch(e)
						{
							xmlHttp = NULL;
						}
					}
				}
			
				if(xmlHttp)
				{
					var hash = window.location.hash;
					var seite= hash.substr(8,2);
					
					if(seite == "")
					{
						art = "index";
					}
					else if(seite == 1)
					{
						art = "index";
					}
					else if(seite == 2)
					{
						art = "saison";
					}
					else if(seite == 3)
					{
						art = "verein";
					}					
					else if(seite == 18)
					{
						art = "gaestebuch";
						
						var hash = window.location.hash;
						var seitenr= hash.substr(22);
					}
					else if(seite == 5)
					{
						art = "kontakt";
					}
					else if(seite == 6)
					{
						art = "impressum";
					}
					else if(seite == 7)
					{
						art = "links";
					}
					else if(seite == 8)
					{
						art = "faschingsthema_aktuell";
					}
					else if(seite == 9)
					{
						art = "prinzenpaar_aktuell";
					}
					else if(seite == 10)
					{
						art = "termine_aktuell";
					}
					else if(seite == 11)
					{
						art = "bilder_aktuell";
					}
					else if(seite == 12)
					{
						art = "verfuegung_aktuell";
					}
					else if(seite == 13)
					{
						art = "chronik";
					}
					else if(seite == 14)
					{
						art = "gruendung";
					}
					else if(seite == 15)
					{
						art = "randnotizen";
					}
					else if(seite == 16)
					{
						art = "puenktchen";
					}
					else if(seite == 17)
					{
						art = "kellerloch";
					}
					else if(seite == 22)
					{
						art = "presse";
					}
					else if(seite == 19)
					{
						art = "uebersicht";
					}
					else if(seite == 20)
					{
						art = "detail_veranstaltung";
					}
					else if(seite == 21)
					{
						art = "elferrat";
					}
								
					var url="suche.php";

					var params="art="+art+"&seite="+seitenr+"&saisonnr="+saisonnr;	

					xmlHttp.open("POST", url, true);
					xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length",params.length);
					xmlHttp.setRequestHeader("Connection","close");

					xmlHttp.onreadystatechange = function()
					{
						if(xmlHttp.readyState == 4)
						{
							document.getElementById("textinhaltsfeld").innerHTML = xmlHttp.responseText;
							
							setColorBox();
							gb();
							kontakt();
						}
					}

					xmlHttp.send(params);
				}
			}
			
			function head_container()
			{				
				var xmlHttp = null;

				if(typeof XMLHttpRequest != 'undefined')
				{
					xmlHttp = new XMLHttpRequest();
				}

				if(!xmlHttp)
				{
					try
					{
						xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
					}
					catch(e)
					{
						try
						{
							xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
						}
						catch(e)
						{
							xmlHttp = NULL;
						}
					}
				}
			
				if(xmlHttp)
				{
					var art = "head";
					var url="suche.php";

					var params="art="+art;	

					xmlHttp.open("POST", url, true);
					xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length",params.length);
					xmlHttp.setRequestHeader("Connection","close");

					xmlHttp.onreadystatechange = function()
					{
						if(xmlHttp.readyState == 4)
						{
							document.getElementById("logo").innerHTML = xmlHttp.responseText;
						}
					}

					xmlHttp.send(params);
				}
			}
		
			function show(g_id, anz)
			{				
				var xmlHttp = null;

				if(typeof XMLHttpRequest != 'undefined')
				{
					xmlHttp = new XMLHttpRequest();
				}

				if(!xmlHttp)
				{
					try
					{
						xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
					}
					catch(e)
					{
						try
						{
							xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
						}
						catch(e)
						{
							xmlHttp = NULL;
						}
					}
				}
			
				if(xmlHttp)
				{
					var hash = window.location.hash;
					var art = "show";
					
					var url="suche.php";

					var params="art="+art+"&g_id="+g_id+"&anz="+anz;	

					xmlHttp.open("POST", url, true);
					xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
					xmlHttp.setRequestHeader("Content-length",params.length);
					xmlHttp.setRequestHeader("Connection","close");

					xmlHttp.onreadystatechange = function()
					{
						if(xmlHttp.readyState == 4)
						{
							for(var i = 1; i <= anz; i++)
							{
								document.getElementById("textfeld_"+i).style.display = "none";
							}
							
							document.getElementById("textfeld_"+anz).style.display = "inline";
							
							$("#textfeld_"+anz).hide().fadeIn(3000);
							
							document.getElementById("textfeld_"+anz).innerHTML = xmlHttp.responseText;
																												
							setColorBox();
							gb();
							kontakt();	
								
							for(var j = anz+1; j <= 20; j++)
							{
								document.getElementById("textfeld_"+j).style.display = "none";
							}
						}
					}

					xmlHttp.send(params);
				}
			}
		
			function gb()
			{	
				$(document).ready(function(){
					/* The following code is executed once the DOM is loaded */
	
					/* This flag will prevent multiple comment submits: */
					var working = false;
	
					/* Listening for the submit event of the form: */
					$('#addguestbookForm').submit(function(e){

 						e.preventDefault();
						if(working) return false;
		
						working = true;
						$('#submit').val('Working..');
						$('span.error').remove();
		
						/* Sending the form fileds to submit.php: */
						$.post('submit.php',$(this).serialize(),function(msg){

							working = false;
							$('#submit').val('Abschicken');
			
							if(msg.status){

								/* 
								/	If the insert was successful, add the comment
								/	below the last one on the page with a slideDown effect
								/*/

								$(msg.html).hide().insertBefore('#addCommentContainer').slideDown();
								$('#body').val('');
								
								working = true;
								$('#submit').val('Der Gästebucheintrag wurde erfolgreich abgeschickt.');
							}
							else {
								/*
								/	If there were errors, loop through the
								/	msg.errors object and display them on the page 
								/*/
				
								$.each(msg.errors,function(k,v){
									$('label[for='+k+']').append('<span class="error">'+v+'</span>');
								});
							}
						},'json');
					});
				});
			}
		
			/* <![CDATA[ */

			var idTextfeld    = 'inhalt';       // ID der <textarea>
			var idColorpicker = 'colorpicker';     // ID der Tabelle

			var rangeIE = null;

			function insertMerkmal(merkmal,inhalt)
			{
  				insertText('[' + merkmal + '=' + inhalt + ']', '[\/' + merkmal + ']');
			}

			// IE,Opera und Mozilla-Weiche zum Einf�gen von Text ins Textfeld
			function insertText(vor, nach)
			{
     				var textfeld = document.getElementById(idTextfeld);
     				// falls Cursor au�erhalb war
				textfeld.focus();  

				// f�r IE, Opera
			     	if(typeof document.selection != 'undefined')               
     				{
       					insertIE(textfeld, vor, nach);
     				}
     				else if (typeof textfeld.selectionStart != 'undefined')   
				//f�r Firefox
     				{	
       					insertFF(textfeld, vor, nach);
     				}
			}

			// Im "textfeld" Portionen "vor" und "nach" einf�gen (f�r IE,Opera)
			function insertIE(textfeld, vor, nach)
  			{
	  			if(!rangeIE) rangeIE = document.selection.createRange();
        	   
				if(rangeIE.parentElement().id != idTextfeld)
				{
					rangeIE = null; return; 
				}

				var alterText = rangeIE.text;

				// Auswahl um BB-Code erg�nzen
				rangeIE.text = vor + alterText + nach;

				// Cursor neu setzen (wie SelfHTML)
				if (alterText.length == 0)
				{
 					rangeIE.move('character', -nach.length);
				}
				else
				{
 					rangeIE.moveStart('character', rangeIE.text.length);
 				}    
 
				rangeIE.select();
				rangeIE = null;
			}

			// Im "textfeld" Portionen "vor" und "nach" einf�gen (f�r Firefox)
			function insertFF(textfeld, vor, nach)
			{		
				von = textfeld.selectionStart;
		     		bis = textfeld.selectionEnd;

			     	// Text zerlegen
     				anfang = textfeld.value.slice(0,   von);
     				mitte  = textfeld.value.slice(von, bis);
     				ende   = textfeld.value.slice(bis);         

			     	// BB-Code einf�gen und ins Textfeld schreiben
     				textfeld.value = anfang + vor + mitte + nach + ende;

			     	// Cursor neu setzen
     				if(bis - von == 0)
     				{
  			     		textfeld.selectionStart = von + vor.length;
     	  				textfeld.selectionEnd = textfeld.selectionStart;
     				}
     				else
     				{
       					textfeld.selectionEnd   = bis + vor.length + nach.length;
       					textfeld.selectionStart = textfeld.selectionEnd;
 			    	}
			}
	
			// Im IE die Textauswahl merken (onMouseDown im Farbw�hler)
			function getSelectionIE()
			{
				if (document.selection)
    				{
      					document.getElementById(idTextfeld).focus();
      					rangeIE = document.selection.createRange();
    				}
			}
  			/* ]]> */

			function kontakt()
			{	
				$(document).ready(function(){
					/* The following code is executed once the DOM is loaded */
	
					/* This flag will prevent multiple comment submits: */
					var working = false;
	
					/* Listening for the submit event of the form: */
					$('#addCommentForm').submit(function(e){

 						e.preventDefault();
						if(working) return false;
		
						working = true;
						$('#submit').val('Working..');
						$('span.error').remove();
		
						/* Sending the form fileds to submit.php: */
						$.post('submit2.php',$(this).serialize(),function(msg){

							working = false;
							$('#submit').val('Abschicken');
			
							if(msg.status){

								/* 
								/	If the insert was successful, add the comment
								/	below the last one on the page with a slideDown effect
								/*/

								$(msg.html).hide().insertBefore('#addCommentContainer').slideDown();
								$('#body').val('');
								
								working = true;
								$('#submit').val('Der Gästebucheintrag wurde erfolgreich abgeschickt.');
							}
							else {
								/*
								/	If there were errors, loop through the
								/	msg.errors object and display them on the page 
								/*/
				
								$.each(msg.errors,function(k,v){
									$('label[for='+k+']').append('<span class="error">'+v+'</span>');
								});
							}
						},'json');
					});
				})
			}
	
			function setColorBox()
			{
				$(document).ready(function(){
					//Examples of how to assign the ColorBox event to elements
					$("a[rel='images']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					$("a[rel='images1']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					$("a[rel='images2']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					$("a[rel='images3']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					$("a[rel='images4']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					$("a[rel='images5']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					$("a[rel='images6']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					$("a[rel='images7']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					$("a[rel='images8']").colorbox({slideshow:true, slideshowAuto: false, slideshowStart: "Diashow starten", slideshowStop: "Pause", slideshowSpeed: 3000, current: "Bild {current} von {total}", initialHeight: "560", initialWidth: "840"});
					
					$(".example5").colorbox();

					$(".example8").colorbox({width:"998px", inline:true, href:"#inline_example"});

					$(".example10").colorbox({width:"70%", inline:true, href:"#inline_example10"});

				});
			}
	
			function menue_aufbau()
			{
			    $(document).ready(function(){  
	      
	        		//$("ul.subnav").parent().append("<span></span>"); //Only shows drop down trigger when js is enabled (Adds empty span tag after ul.subnav*)  
	      
	       			$(".menue_1").hover(function() { //When trigger is clicked...  
	      
	            		//Following events are applied to the subnav itself (moving subnav up and down)  
	            		$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
	      
	            		$(this).parent().hover(function() {  
		          		 }, function(){  
		               		 $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
		           		});  
		            //Following events are applied to the trigger (Hover events for the trigger)  
		            }).hover(function() {  
		                $(this).addClass("subhover"); //On hover over, add class "subhover"  
		            }, function(){  //On Hover Out  
		                $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
		        	});  
		        	
		        	$(".menue_1").click(function() { //When trigger is clicked...  
	      
	            		//Following events are applied to the subnav itself (moving subnav up and down)  
	            		$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
	      
	            		$(this).parent().hover(function() {  
		          		 }, function(){  
		               		 $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
		           		});  
		            //Following events are applied to the trigger (Hover events for the trigger)  
		            }).hover(function() {  
		                $(this).addClass("subhover"); //On hover over, add class "subhover"  
		            }, function(){  //On Hover Out  
		                $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
		        	});  
		        	
		        	$(".menue_2").hover(function() { //When trigger is clicked...  
	      
	            		//Following events are applied to the subnav itself (moving subnav up and down)  
	            		$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
	      
	            		$(this).parent().hover(function() {  
		          		 }, function(){  
		               		 $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
		           		});  
		            //Following events are applied to the trigger (Hover events for the trigger)  
		            }).hover(function() {  
		                $(this).addClass("subhover"); //On hover over, add class "subhover"  
		            }, function(){  //On Hover Out  
		                $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
		        	}); 
		        	
		        	$(".menue_2").click(function() { //When trigger is clicked...  
	      
	            		//Following events are applied to the subnav itself (moving subnav up and down)  
	            		$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
	      
	            		$(this).parent().hover(function() {  
		          		 }, function(){  
		               		 $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
		           		});  
		            //Following events are applied to the trigger (Hover events for the trigger)  
		            }).hover(function() {  
		                $(this).addClass("subhover"); //On hover over, add class "subhover"  
		            }, function(){  //On Hover Out  
		                $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
		        	}); 
		        	
		        	$(".menue_6").hover(function() { //When trigger is clicked...  
	      
	            		//Following events are applied to the subnav itself (moving subnav up and down)  
	            		$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
	      
	            		$(this).parent().hover(function() {  
		          		 }, function(){  
		               		 $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
		           		});  
		            //Following events are applied to the trigger (Hover events for the trigger)  
		            }).hover(function() {  
		                $(this).addClass("subhover"); //On hover over, add class "subhover"  
		            }, function(){  //On Hover Out  
		                $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
		        	}); 
		        	
		        	$(".menue_6").click(function() { //When trigger is clicked...  
	      
	            		//Following events are applied to the subnav itself (moving subnav up and down)  
	            		$(this).parent().find("ul.subnav").slideDown('fast').show(); //Drop down the subnav on click  
	      
	            		$(this).parent().hover(function() {  
		          		 }, function(){  
		               		 $(this).parent().find("ul.subnav").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up  
		           		});  
		            //Following events are applied to the trigger (Hover events for the trigger)  
		            }).hover(function() {  
		                $(this).addClass("subhover"); //On hover over, add class "subhover"  
		            }, function(){  //On Hover Out  
		                $(this).removeClass("subhover"); //On hover out, remove class "subhover"  
		        	});
		   		});  
		   	}
