		function createCookie(name,value,days) {
			if (days) {
				var date = new Date();
				date.setTime(date.getTime()+(days*24*60*60*1000));
				var expires = "; expires="+date.toGMTString();
			} else
				var expires = "";
			document.cookie = name+"="+value+expires+"; path=/";
		}
		
		function readCookie(name) {
			var nameEQ = name + "=";
			var ca = document.cookie.split(';');
			for(var i=0;i < ca.length;i++) {
				var c = ca[i];
				while (c.charAt(0)==' ') c = c.substring(1,c.length);
				if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
			}
			return null;
		}		
		function reinitApplet() {
			var a = document.getElementById("syncApplet");
			if (a != null) {
				a.reinit();
			}
		}
		
		function openImagesWindow() {
			window.open('imageSettings.html', 'imageSettings', 'width=600,height=400');
		}
		
		function printImage(data, imgWidth, imgHeight) {
			var width = parseInt(imgWidth);
			var height = parseInt(imgHeight);
			window.open('about:blank', 'printWindow', 'width=' + (width + 40) + ',height=' + (height + 40));
			document.imageForm.imageData.value = data;
			document.imageForm.submit();
		}
		
		function getCoords() {
			var url = "resolveCoords.php?q=" + encodeURIComponent(
				document.sync_coords.city.value + "," + document.sync_coords.country.value);
			if (typeof XMLHttpRequest != "undefined") {
				req = new XMLHttpRequest();
			} else if (window.ActiveXObject) {
				req = new ActiveXObject("Microsoft.XMLHTTP");
			}
			req.open("GET", url, true);
			req.onreadystatechange = callback;
			req.send(null);
		}
		
		function getCoords() {
		}





function showLayer(layer){ if(document.getElementById(layer).style.display=="block"){hideLayer(layer);}else{ document.getElementById(layer).style.display = "block";}}function hideLayer(layer){ document.getElementById(layer).style.display = "none";}