function createMouseXY(axis){ var nameProperty; if(axis=="x"){ nameProperty = "pageX"; } else{ nameProperty = "pageY"; } return function(e){ return *!*e[nameProperty];*/!* } } }