function staid2(m);
global sta sections lon_var lat_var sta_var B_HANDLES nstn GEO_HANDLE
eval(['global ' lon_var]); 
eval(['global ' lat_var]); 
ax = get(GEO_HANDLE,'Children'); 		% look for figure axes
valid = 0;
for i=1:length(ax),
  if strcmp(get(ax(i),'Type'),'axes'),
    pt1 = get(ax(i),'CurrentPoint');
    xlim = get(ax(i),'XLim');
    ylim = get(ax(i),'YLim');
    if (xlim(1) <= pt1(1,1) & pt1(1,1) <= xlim(2) & ...
	  ylim(1) <= pt1(1,2) & pt1(1,2) <= ylim(2))
      valid = 1;
      % cleverly change to axis in which pointer is found,
      % allowing Stasel for multiple plots on one fig
      set(gcf,'CurrentAxes',ax(i)); 
      break
    end
  end
end
if ~valid; return; end
pt = get(gca,'currentpoint'); pt = pt(1,1:2);
temp = ones(2*nstn,2);
temp(1:2:(2*nstn-1),:) = [ones(nstn,1)*pt(2) ones(nstn,1)*pt(1)];
eval(['temp(2:2:2*nstn,:) = [' lat_var '(:), ' lon_var '(:)];'])
d = dist(temp(:,1), temp(:,2));
d = d(1:2:(2*nstn-1))';
j = find(d == min(d));
staid(B_HANDLES(12),j);
