			function getUserPosition() {
				var output = new Object();
				
				outputString = JSONstring.make(output);
		
				jsonPostData('json/geoData/getPosition.php', escape(outputString), 'displayUserPosition');				
			}
			
			function displayUserPosition(Object) {
				var displayErrorMessage = true;
				if(Object) {
					if(Object["status"]=='ok') {
						//alert("Positions-Test: Deine aktuelle Position ist bei " + Object["cityName"]);
						displayErrorMessage = false;
					}
				}
				
				if(displayErrorMessage) {
					//alert("Positions-Test: Deine aktuelle Position konnte nicht ermittelt werden.");
				}
			}
			
			function citySelected() {
				cityName = document.getElementById("citySelectorInputField").value;
				if(cityName!=0) {
					if(cityName != defaultCityString) {
						if(GBrowserIsCompatible()) {			
							geocoder = new GClientGeocoder();	
							eval("geocoder.getLatLng('" + cityName + "', function(point) { foundCityLocationNew(point); });");
						}	
					}
				}
			}			

			var scrollCounter = 0;
			var scrollPortalBoxRightInterval;
			var scrollPortalBoxLeftInterval;
			
			function startScrollingPortalBox(direction) {
				if(direction=='right') {
					if(document.getElementById("portalBoxScrollContainer").offsetLeft + document.getElementById("portalBoxScrollContainer").offsetWidth - 570 > 0) {					
						document.getElementById("scrollRightButton").className = 'scrollRightButton hovered';
						document.getElementById("scrollLeftButton").className = 'scrollLeftButton';
						scrollPortalBoxRightInterval = window.setInterval("scrollPortalBoxToRight()", 10);
					}
				} else {
					if(document.getElementById("portalBoxScrollContainer").offsetLeft < 0) {
						document.getElementById("scrollLeftButton").className = 'scrollLeftButton hovered';
						document.getElementById("scrollRightButton").className = 'scrollRightButton';						
						scrollPortalBoxLeftInterval = window.setInterval("scrollPortalBoxToLeft()", 10);
					}
				}
			}	
			
			function scrollPortalBoxToRight() {
				leftPos = document.getElementById("portalBoxScrollContainer").offsetLeft;
				
				if(document.getElementById("portalBoxScrollContainer").offsetLeft + document.getElementById("portalBoxScrollContainer").offsetWidth - 570 > 0) {	
					leftPos = leftPos - 6;
					document.getElementById("portalBoxScrollContainer").style.left = leftPos + 'px';
				} else {
					document.getElementById("scrollRightButton").className = 'scrollRightButton inactive';
					stopScrollingPortalBox();					
				}
			}

			function scrollPortalBoxToLeft() {
				leftPos = document.getElementById("portalBoxScrollContainer").offsetLeft;
				
				if(leftPos < 0) {
					leftPos = leftPos + 6;
					document.getElementById("portalBoxScrollContainer").style.left = leftPos + 'px';
				} else {
					document.getElementById("scrollLeftButton").className = 'scrollLeftButton inactive';
					stopScrollingPortalBox();									
				}
			}
			
			function stopScrollingPortalBox(direction) {
				if(direction=='right') {
					if(document.getElementById("scrollRightButton").className != 'scrollRightButton inactive') {
						document.getElementById("scrollRightButton").className = 'scrollRightButton';	
					}				
					window.clearInterval(scrollPortalBoxRightInterval);
				} else {
					if(document.getElementById("scrollLeftButton").className != 'scrollLeftButton inactive') {
						document.getElementById("scrollLeftButton").className = 'scrollLeftButton';					
					}
					window.clearInterval(scrollPortalBoxLeftInterval);
				}			
			}
			
			function selectPortal(box) {
				box.className = 'portalBox hovered';
			}

			function deSelectPortal(box) {
				box.className = 'portalBox';
			}
						
			function initTeaserImages() {
				activeTeaserImageContainer = document.getElementById("firstTeaserImageContainer");
				passiveTeaserImageContainer = document.getElementById("secondTeaserImageContainer");
								
				activeTeaserImageContainer.style.top = '0px';
				passiveTeaserImageContainer.style.top = '595px';
				
				activeTeaserImageContainer.innerHTML = '<img src="' + teaserImages[0] +'" />';
				passiveTeaserImageContainer.innerHTML = '<img src="' + teaserImages[1] +'" />';
				
				switchTeaserImagesInterval = window.setInterval("switchTeaserImages()", 5000);				
			}
			
			function switchTeaserImages() {
				passiveTeaserImageContainer.style.zIndex = 2;
				activeTeaserImageContainer.style.zIndex = 1;
				
				startMoveBoxEffect(passiveTeaserImageContainer, 'up', 0, 20, switchTeaserImagesInt());
			}
			
			function switchTeaserImagesInt() {
				teaserImageCounter++;
				if(teaserImageCounter >= teaserImages.length) {
					teaserImageCounter = 0;
				}
				
				bkpTeaserImageContainer = passiveTeaserImageContainer;
				passiveTeaserImageContainer = activeTeaserImageContainer;
				activeTeaserImageContainer = bkpTeaserImageContainer;
				
				activeTeaserImageContainer.innerHTML = '<img src="' + teaserImages[teaserImageCounter] +'" />';
				activeTeaserImageContainer.style.top = '595px';
			}
			
			function hoverOverEvent(box) {

			}
			
			function unHoverOverEvent(box) {

			}	
			
			function foundCityLocation(location) {
				if(location) {
					var cityCoordString = location.toUrlValue(13);
			
					var coords = cityCoordString.split(",");		
			
					var latitude = coords[0];
					var longitude = coords[1];

					window.location.href='/?city=' + escape(cityName) + '&lat=' + escape(latitude) + '&long=' + escape(longitude);
				}	
			}
			
			function foundCityLocationNew(location) {
				if(location) {
					var cityCoordString = location.toUrlValue(13);
			
					var coords = cityCoordString.split(",");		
			
					var latitude = coords[0];
					var longitude = coords[1];

					window.location.href='/?beta=true&city=' + escape(cityName) + '&lat=' + escape(latitude) + '&long=' + escape(longitude);
				}	
			}			
			
			function focusOnCityInput() {
				var cityName = document.getElementById("city").value;
				if(cityName == defaultCityString) {	
					document.getElementById("city").value = '';
				}		
			}
			
			function deleteCityData() {
				window.location.href='/?deleteCity=true';			
			}	
			
			function scrollDownUpcomingEventsList() {
				if(!disableScrollDownUpcomingEventsList && upcomingEventsListCurrentPage < lastPage) {
					upcomingEventsListCurrentPage++;
					startMoveBoxEffect(document.getElementById('upcomingEventsInnerScrollContainer'), 'up', (upcomingEventsListCurrentPage - 1) * -219, 30, false);	
					disableScrollUpUpcomingEventsList = false;				
					document.getElementById('upcomingEventsListScrollUpBar').className = 'upcomingEventsListScrollUpBar';
							
					if(upcomingEventsListCurrentPage >= lastPage) {
						disableScrollDownUpcomingEventsList = true;
						document.getElementById('upcomingEventsListScrollDownBar').className = 'upcomingEventsListScrollDownBar inactive';
					}
				}
			}		
		
			function scrollUpUpcomingEventsList() {
				if(!disableScrollUpUpcomingEventsList) {
					upcomingEventsListCurrentPage--;
					startMoveBoxEffect(document.getElementById('upcomingEventsInnerScrollContainer'), 'down', (upcomingEventsListCurrentPage - 1) * -219, 30, false);
							
					disableScrollDownUpcomingEventsList = false;
					document.getElementById('upcomingEventsListScrollDownBar').className = 'upcomingEventsListScrollDownBar';
							
					if(upcomingEventsListCurrentPage==1) {
						disableScrollUpUpcomingEventsList = true;
						document.getElementById('upcomingEventsListScrollUpBar').className = 'upcomingEventsListScrollUpBar inactive';
					}	
				}			
			}	