var ferienhausIcon = new GIcon();
ferienhausIcon.image = "images/gmapsicons/ferienhaus.png";
ferienhausIcon.iconSize = new GSize(22, 32);
ferienhausIcon.iconAnchor = new GPoint(2, 30);
ferienhausIcon.infoWindowAnchor = new GPoint(11, 4);
ferienhausIcon.infoShadowAnchor = new GPoint(11, 4);

var ferienwohnungIcon = new GIcon();
ferienwohnungIcon.image = "images/gmapsicons/ferienwohnung.png";
ferienwohnungIcon.iconSize = new GSize(22, 32);
ferienwohnungIcon.iconAnchor = new GPoint(2, 30);
ferienwohnungIcon.infoWindowAnchor = new GPoint(11, 4);
ferienwohnungIcon.infoShadowAnchor = new GPoint(11, 4);

var hotelIcon = new GIcon();
hotelIcon.image = "images/gmapsicons/hotel.png";
hotelIcon.iconSize = new GSize(22, 32);
hotelIcon.iconAnchor = new GPoint(2, 30);
hotelIcon.infoWindowAnchor = new GPoint(11, 4);
hotelIcon.infoShadowAnchor = new GPoint(11, 4);

var pensionIcon = new GIcon();
pensionIcon.image = "images/gmapsicons/pension.png";
pensionIcon.iconSize = new GSize(22, 32);
pensionIcon.iconAnchor = new GPoint(2, 30);
pensionIcon.infoWindowAnchor = new GPoint(11, 4);
pensionIcon.infoShadowAnchor = new GPoint(11, 4);

var icons = [];
icons[1] = ferienhausIcon;
icons[2] = ferienwohnungIcon;
icons[3] = hotelIcon;
icons[4] = pensionIcon;

function newMarker(markerLocation, markerId, objektName, objektArt, strasse, plz, ort, bild) {
	var marker=new GMarker(markerLocation, {icon:icons[objektArt], title:objektName, clickable:true});
	GEvent.addListener(marker, 'click', function() {
		if(objektArt==1) url="ferienhaus,";	if(objektArt==2) url="ferienwohnung,"; if(objektArt==3) url="hotel,"; if(objektArt==4) url="pension,";
		marker.openInfoWindowHtml("<table height='100' border='0' cellpadding='0' cellspacing='0'><tr><td valign='middle'><img src='images/objekte/klein/"+bild+"' style='padding-right:5px;' /></td><td valign='middle'><b>"+objektName+"</b><br />"+strasse+"<br />"+plz+" "+ort+"<br /><br /><img src='images/gmapsicons/icon.gif' style='margin-right:5px;' /><a href='"+url+markerId+".htm' class='nolink' style='text-decoration:underline;'>zum Eintrag</a></td><td>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr></table>");
	});
	return marker;
}
