var koeln = new GLatLng(50.94559165456269,6.905711889266968);
var honnef = new GLatLng(50.63285881560628,7.216386795043945);
var wheim = new GLatLng(49.77089912694362,9.57509994506836);
var ddorf = new GLatLng(51.24279364461759,6.741002798080444);
var gerlin = new GLatLng(48.801323407820476,9.056859612464905);
var bielef = new GLatLng(52.02006,8.52997);

showAllLocations();

function showAllLocations() {
    var point = new GLatLng(50.443513052458044,8.5693359375);
    var map = new GMap2(document.getElementById("meine_gmap"));
    map.removeMapType(G_PHYSICAL_MAP);
    map.setCenter(point, 6, G_NORMAL_MAP);
    var m1 = new GMarker(koeln);
    map.addOverlay(m1);
    GEvent.addListener(m1, "mouseover", function() {highlight("koeln")});
    GEvent.addListener(m1, "mouseout", function() {dehighlight("koeln")});
    var m2 = new GMarker(honnef);
    map.addOverlay(m2);
    GEvent.addListener(m2, "mouseover", function() {highlight("honnef")});
    GEvent.addListener(m2, "mouseout", function() {dehighlight("honnef")});
    var m3 = new GMarker(wheim);
    map.addOverlay(m3);
    GEvent.addListener(m3, "mouseover", function() {highlight("wheim")});
    GEvent.addListener(m3, "mouseout", function() {dehighlight("wheim")});
    var m4 = new GMarker(ddorf);
    map.addOverlay(m4);
    GEvent.addListener(m4, "mouseover", function() {highlight("ddorf")});
    GEvent.addListener(m4, "mouseout", function() {dehighlight("ddorf")});
    var m6 = new GMarker(gerlin);
    map.addOverlay(m6);
    GEvent.addListener(m6, "mouseover", function() {highlight("gerlin")});
    GEvent.addListener(m6, "mouseout", function() {dehighlight("gerlin")});
    var m7 = new GMarker(bielef);
    map.addOverlay(m7);
    GEvent.addListener(m7, "mouseover", function() {highlight("bielef")});
    GEvent.addListener(m7, "mouseout", function() {dehighlight("bielef")});
    map.setUIToDefault();
}

function showKoeln() {
showMap(koeln);
}

function showHonnef() {
showMap(honnef);
}

function showWheim() {
showMap(wheim);
}

function showDdorf() {
showMap(ddorf);
}

function showGerlin() {
showMap(gerlin);
}

function showBielef() {
showMap(bielef);
}

function showMap(point) {
var map = new GMap2(document.getElementById("meine_gmap"));
map.setCenter(point, 15, G_NORMAL_MAP);
map.addOverlay(new GMarker(point));
map.setUIToDefault();
}

function highlight(id) {
    var ref = document.getElementById(id);
    if (ref != null) {
        ref.className="addressSel";
    }
}

function dehighlight(id) {
    var ref = document.getElementById(id);
    if (ref != null) {
        ref.className="";
    }
}




