// JS Scripte

function cms_weiterlesen_show(){
	document.getElementById('weiterlesenlink').style.display='none';
	document.getElementById('weiterlesenlinkcontent').style.display='block';
}


function email_secure(name,sld,tld){
		return decrypt(name)+"@"+decrypt(sld)+"."+tld;
}

function decrypt(s){
	n=0;
	r="";
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(1));
	}
	return r;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function setHeight(){
	var gesamt=document.getElementById('container').offsetHeight;
	var menu=document.getElementById('nav_main_haupt').offsetHeight;
	var spalte=gesamt-menu-93-108-200-150;		
	document.getElementById('suche').style.height=spalte+'px';
}
function siteShow(){
	document.getElementById('container').style.display='block';
}

function goto(url){
	document.location.href=url;	
}

var X=0, Y=0;

if(document.attachEvent)
    document.attachEvent('onmousemove',setPos);
else if(document.addEventListener)
    document.addEventListener('mousemove',setPos,false);

function setPos(e){
    if(e.pageX){
        X=e.pageX;
        Y=e.pageY;
    }
    else{
        X=e.clientX;
        Y=e.clientY;
    }
};

 //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
        
		
		function createMarker(point,html) {
			  var marker = new GMarker(point);
			
			// Zeige Info Fenster bei Klick
			  GEvent.addListener(marker, 'click', function() {
				marker.openInfoWindowHtml(html);
			  });
			
			  return marker;
		}
		
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		
		map.setCenter(new GLatLng(49.7068666, 9.2677749), 17);
      
		var punkt = new GLatLng(49.7068666, 9.2677749);
	    map.setCenter(punkt, 15);
		
		var pos = new GLatLng(49.7068666, 9.2677749)
	    map.setCenter(punkt, 16);

		/* Setzt eigenen Marker auf die Karte */
		var oicon = new GIcon();
		
		oicon.shadow = "http://web282.server3.keller-brennecke.de/images/pin-shadow.png";
   		oicon.shadowSize = new GSize(45, 60);
		
		oicon.image = "http://web282.server3.keller-brennecke.de/images/pin.png";
        oicon.iconSize = new GSize(37, 44);
        oicon.iconAnchor = new GPoint(10, 46);
        oicon.infoWindowAnchor = new GPoint(5, 1)
		
		var pos = new GLatLng(49.7068666, 9.2677749)
        map.addOverlay(new GMarker(pos, oicon));
		
	  
	  }
    }
    //]]>
