	
		function getWebcams(FROM, TO) {
			var get = '?from=' + FROM + '&to=' + TO;
			var caption = 'Webcams ' + FROM + " - " + TO;
			dojoGet('../businessLogic/ajax/getWebcams.php' + get, caption);
        }
		
		function dojoGet(url, label){
	            dojo.xhrGet ({
                // Location of the HTML content we want to grab
                url: url,
				useCache: false, 
       			preventCache: true ,
        
                // Called when the page loaded successfully
                load: function (data) { 
					if(dojo.byId('webcams_main') != null){
						dojo.byId('webcams_main').innerHTML = data;
						dojo.byId('aktuelle_auswahl').innerHTML = label;
					}
				},
        
                // Called if there was an error (such as a 404 response)
                error: function (data) { }
            });
		}
		
		dojoGet('../businessLogic/ajax/getWebcams.php?from=A&to=E', "Webcams A - E");
		
		function openWebcamBox(header, source, href){
			dojo.xhrGet ({
                // Location of the HTML content we want to grab
                url: '../businessLogic/ajax/getWebcamPopup.php?href=' + href + '&source=' + source + "&header=" + header,
				useCache: false, 
       			preventCache: true,
        
                // Called when the page loaded successfully
                load: function (data) { 
					$.modal(data);
				},
        
                // Called if there was an error (such as a 404 response)
                error: function (data) { }
            });
		}
		
				var getUserOnlineReady = true;
		function getUserOnline() {
			if(getUserOnlineReady == true){
				getUserOnlineReady = false;
				dojo.xhrGet ({
					// Location of the HTML content we want to grab
					url: '../businessLogic/ajax/getUserOnline.php',
					useCache: false, 
					preventCache: true ,
			
					// Called when the page loaded successfully
					load: function (data) { 
						//nothing to do
					},
			
					// Called if there was an error (such as a 404 response)
					error: function (data) { }
				});
			}
			setTimeout("getUserOnline()", 30000);
        }
		getUserOnline();
