Finally found the answer!
Now instead of creating a new add marker function, I have added its code in the Open function defined below:
map = new GMap2(document.getElementById("map"));
map.setCenter( new GLatLng(0,0),1 );
function Open (x,y)
map.setCenter (new GLatLng(x,y), 13);
var point = new GLatLng (x,y);
map.addOverlay (new GMarker(point));