
function addallorte(map,jahr,id) {
    
      var icon1 = new GIcon();
      icon1.image = "/images/punkt_ort.gif";
      icon1.iconSize = new GSize(8, 8);
      icon1.iconAnchor = new GPoint(4, 4);
      icon1.infoWindowAnchor = new GPoint(4,4); 

      var icon = new GIcon();
      icon.image = "/images/punkt1_ort.gif";
      icon.iconSize = new GSize(8, 8);
      icon.iconAnchor = new GPoint(4, 4);
      icon.infoWindowAnchor = new GPoint(4,4); 

    function createMarker(point, icon, name, nr) {
      var marker = new GMarker(point,icon);
      GEvent.addListener(marker, "click", function() {
      	//text = "<div style='font-size:10px;'><b>"+name+"</b> <a href='/tafel/"+nr+"/"+name+"'><br /><img src='http://www.anthes.org/cms/gif/link_extern.gif' border='0' /> Link zur Stadttafel</a><br /><br /><img src='/bilder/tn_bild"+nr+".jpg' /><br /></div>";
     	text = "<div style='font-size:10px;'><b>"+name+"</b> <a href='/ort/"+nr+"/"+name+"'><br /><img src='http://www.anthes.org/cms/gif/link_extern.gif' border='0' /> Link zum Ort</a><br /></div>"; 
        marker.openInfoWindowHtml(text, {maxWidth:120});
      });
      return marker;
    }
    
    if (jahr == "1926") {
      anzahl = xxOrt1926.length;
    } else if (jahr == "1822") {
      anzahl = xxOrt1822.length;
    } else if (jahr == "1700") {
      anzahl = xxOrt1700.length;
    } else {
      anzahl = xxOrt.length;
    }
    var markers = [];
    
    for (var i = 0; i < anzahl; i++) {
      
      if (jahr == "1926") {
        px = xxOrt1926[i];
        py = yyOrt1926[i];
      } else if (jahr == "1700") {
        px = xxOrt1700[i];
        py = yyOrt1700[i];
      } else if (jahr == "1822") {
        px = xxOrt1822[i];
        py = yyOrt1822[i];
      } else {
        px = xxOrt[i];
        py = yyOrt[i];
      }
      
      var point  = new GLatLng(px,py);
      if (jahr == "1926") {
        if (id == linkOrt1926[i]) {
          map.addOverlay(createMarker(point, icon, nameOrt1926[i], linkOrt1926[i]));      
        } else {
          map.addOverlay(createMarker(point, icon1, nameOrt1926[i], linkOrt1926[i]));      
        }
      } else  if (jahr == "1700") {
        if (id == linkOrt1700[i]) {
          map.addOverlay(createMarker(point, icon, nameOrt1700[i], linkOrt1700[i]));      
        } else {
          map.addOverlay(createMarker(point, icon1, nameOrt1700[i], linkOrt1700[i]));      
        }
      } else  if (jahr == "1822") {
        if (id == linkOrt1822[i]) {
          map.addOverlay(createMarker(point, icon, nameOrt1822[i], linkOrt1822[i]));      
        } else {
          map.addOverlay(createMarker(point, icon1, nameOrt1822[i], linkOrt1822[i]));      
        }
      } else {
        map.addOverlay(createMarker(point, icon, nameOrt[i], linkOrt[i]));      
      }
    }    
} 
