
// JavaScript Document
    //<![CDATA[
var map;
var mgr;
var icons = {}
var ovcontrol = new GOverviewMapControl(new GSize(100,100)); 
var ovmap = ovcontrol.getOverviewMap();

function AddressCoordinates(address) {
	geocoder = new GClientGeocoder();
	geocoder.getLatLng(
	address,
		function(point) {
			if (!point) {
			alert(address + " not found");
			}else{
			return point;
			}
		} 
	);
}


 function NewZoom() {
}
NewZoom.prototype = new GControl();

NewZoom.prototype.initialize = function(map) {
  var container = document.createElement("div");
  var containerId=document.createAttribute("id");
  containerId.nodeValue="container";
  container.setAttributeNode(containerId);


	var zoomInImg = document.createElement("img");
	var srcIn = document.createAttribute("src");
	srcIn.nodeValue = "bilder/lokale/zoomin.gif";
	zoomInImg.setAttributeNode(srcIn);
	container.appendChild(zoomInImg);
	GEvent.addDomListener(zoomInImg, "click", function() {
	map.zoomIn();
  });

	var zoomOutImg = document.createElement("img");
	var srcOut = document.createAttribute("src");
	srcOut.nodeValue = "bilder/lokale/zoomout.png";
	zoomOutImg.setAttributeNode(srcOut);
	container.appendChild(zoomOutImg);
	GEvent.addDomListener(zoomOutImg, "click", function() {
	map.zoomOut();
  });

  map.getContainer().appendChild(container);
  return container;
}

NewZoom.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(0, 0));
}
var i=120;	
var left=0;
var bewegung;
function controllAusblenden(){
if(left>-50){
i=i-1;
left=left-1;
var container=document.getElementById("container");
container.style.width=i+"px";
container.style.left=left+"px";
}else{
clearInterval(bewegung);}
}

function controllTimeout(){
var bewegung=window.setInterval("controllAusblenden()",20);
}

function controllNormal(){
var container=document.getElementById("container");
var omap=document.getElementById("map_overview");
var satelliteDiv=document.getElementById("satelliteButton");
var normalDiv=document.getElementById("normalButton");
var hybridDiv=document.getElementById("hybridButton");
var ausblendenDiv=document.getElementById("ausblenden");
container.style.width="120px";
satelliteDiv.innerHTML="Satelliten-Karte";	
normalDiv.innerHTML="Standard-Karte";	
hybridDiv.innerHTML="Hybrid-Karte";	
ausblendenDiv.innerHTML="minimieren";	
ausblendenDiv.style.backgroundImage="url(bilder/lokale/pfeil_links.gif)";
satelliteDiv.style.width="80px";
normalDiv.style.width="80px";
hybridDiv.style.width="80px";
satelliteDiv.style.paddingLeft="22px";
normalDiv.style.paddingLeft="22px";
hybridDiv.style.paddingLeft="22px";
omap.style.display="block";
GEvent.addDomListener(ausblendenDiv, "click", function() {
controllSmaller();
});
}
function controllSmaller(){
var container=document.getElementById("container");
var omap=document.getElementById("map_overview");
var satelliteDiv=document.getElementById("satelliteButton");
var normalDiv=document.getElementById("normalButton");
var hybridDiv=document.getElementById("hybridButton");
var ausblendenDiv=document.getElementById("ausblenden");
container.style.width="25px";
satelliteDiv.innerHTML="";	
normalDiv.innerHTML="";	
hybridDiv.innerHTML="";	
ausblendenDiv.innerHTML="";	
ausblendenDiv.style.backgroundImage="url(bilder/lokale/pfeil_rechts.gif)";
satelliteDiv.style.width="20px";
normalDiv.style.width="20px";
hybridDiv.style.width="20px";
satelliteDiv.style.paddingLeft="0px";
normalDiv.style.paddingLeft="0px";
hybridDiv.style.paddingLeft="0px";
omap.style.display="none";
GEvent.addDomListener(ausblendenDiv, "click", function() {
controllNormal();
});
}

   
	//]]>

