You need to look at event delegation such as in this example here. The easiest way to arrange your code would be to have one event listener, but alter the functionality according to the evt.target as shown:
Code:
var coord=map.pixelToGeo();
var lat,lon;
map.addListener("click",function(evt){
if (evt.target instanceof nokia.maps.map.Display) {
coord = map.pixelToGeo(evt.displayX, evt.displayY);
lat = coord.latitude;
lon = coord.longitude;
myfunction(lat,lon);
} else if (evt.target instanceof nokia.maps.map.Marker) {
alert("clicked on marker");
}
},true);
function myfunction(lat,lon){
var marker = new nokia.maps.map.Marker([lat, lon],
{draggable: true});
map.objects.add(marker);
}