
function linkTo(url,idNr)
{
  if (document.getElementById(idNr))
  {
    //document.getElementById(idNr).style.backgroundColor = "#ddd";
    location.href = url;
  }
}

function turnOn(idNr, ltext)
{
  if (document.getElementById(idNr))
  {
    document.getElementById(idNr+"a").style.color = "#fff";
    document.getElementById(idNr).style.backgroundColor = "#999";
    document.getElementById("linktext").style.color = "#fff";
    document.getElementById("linktext").style.backgroundColor = "#999";
    replaceText(ltext);
  }

}

function turnOff(idNr)
{
  if (document.getElementById(idNr))
  {
    document.getElementById(idNr+"a").style.color = "#fff";
    document.getElementById(idNr).style.backgroundColor = "#424590";
    document.getElementById("linktext").style.color = "#fff";
    document.getElementById("linktext").style.backgroundColor = "#fff";
    replaceText(".");
  }
}

function buildText(theText,len)
{
  var newLength = len + 5;
  var newText = theText.substring(0,len);
  replaceText(newText);
  if (theText.length >= len)
    setTimeout('buildText(\''+theText+'\','+newLength+')', 30);

}

function replaceText(newText)
{
  var theText = document.createTextNode(newText);
  document.getElementById("linktext").replaceChild(theText, document.getElementById("linktext").firstChild);
}


function loadGoogleMap() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById('map'));
    map.setCenter(new GLatLng(50.862006,9.738425), 14);
    map.addControl(new GLargeMapControl());
    map.addControl(new GOverviewMapControl());
    map.addControl(new GScaleControl());
    var pointFirma = new GLatLng(50.862033,9.738440);
    map.addOverlay(new GMarker(pointFirma));
  }
}


function loadGoogleMap2() {
  if (GBrowserIsCompatible()) {        var map = new GMap2(document.getElementById("map2"));
        map.setCenter(new GLatLng(52.49851159531585,13.447061777114868), 14);

        map.addControl(new GSmallZoomControl());
        var pointBerlin = new GLatLng(52.49851159531585,13.447061777114868);
        map.addOverlay(new GMarker(pointBerlin));

  }
}

function openWindow (imageFile, width, height) {
  if (document.all) {
    width  += 20;
    height += 30;
  }
  wOptions = 'width='+width+',height='+height+',top='+((screen.width - width)/2)+',left='+((screen.height-height)/2);
  $wOpen = window.open(imageFile, 'Bildvergrößerung', wOptions);
}
