function addline(whichmap)
	global referenceLines
	
if strcmp(whichmap,'utm'),
	prompt{1} = 'Enter START Easting:'; 
	prompt{2} = 'Enter START Northing:';
	prompt{3} = 'Enter END Easting:';
	prompt{4} = 'Enter END Northing:';
	reference = 1;
else
	prompt{1} = 'Enter START Longitude:'; 
	prompt{2} = 'Enter START Latitude:';
	prompt{3} = 'Enter END Longitude:';
	prompt{4} = 'Enter END Latitude:';
	reference = 2;
end

try,
	title = 'Enter Reference Line or Hit Cancel to Use Mouse';
	answer = inputdlg(prompt,title,1);
	if length(answer) == 0,
		[x,y] = ginput(1);
		if length(x) < 1, return, end
		answer{1} = x(1);
		answer{2} = y(1);
		[x,y] = ginput(1);
		if length(x) < 1, return, end
		answer{3} = x(1);
		answer{4} = y(1);
	else
		for ii=1:length(answer),
			if isempty(answer{ii}), addline(whichmap), return, end
			answer{ii} = str2num(answer{ii});
		end
	end
	X = [answer{1} answer{3}];
	Y = [answer{2} answer{4}];
	line(X,Y,'Color','k','Marker','o');
	referenceLines = [referenceLines; X Y reference];
catch, errorbox('Bad line inputs'), end