%function addauv(whichmap)
function addauv(whichmap)
	global auvMarks
	
if strcmp(whichmap,'utm'),
	prompt{1} = 'Enter AUV Relative Easting:'; 
	prompt{2} = 'Enter AUV Relative Northing:';
	reference = 1;
else
	prompt{1} = 'Enter AUV Longitude:'; 
	prompt{2} = 'Enter AUV Latitude:';
	reference = 2;
end

try,
	title = 'Enter AUV Location or Hit Cancel to Use Mouse';
	answer = inputdlg(prompt,title,1);
	if length(answer) == 0,
		[x,y] = ginput(1);
		answer{1} = x;
		answer{2} = y;
	else
		for ii=1:length(answer),
			if isempty(answer{ii}), addAuv(whichmap), return, end
			answer{ii} = str2num(answer{ii});
		end
	end
	
	hold on
	plot(answer{1},answer{2},'y*')
	plot(answer{1},answer{2},'bo')
	hold off
	
	auvMarks = [auvMarks; answer{1} answer{2} reference];

catch, errorbox('Bad line inputs'), end