// USGS_NATMAP_options.js

function openOptionsWindow() {
	var theWindow = window.open( appDir + "options.html", "options_win", "toolbar=no,location=no,directories=no,status=no,resizable=yes,scrollbars=yes,menubar=no,width=" + optionsWinWth + ",height=" + optionsWinHt);
	theWindow.focus();
}

function toggleRefreshOption() {
	useInstantRefresh = !useInstantRefresh;
	if (useInstantRefresh) {
		parent.RefreshFrame.document.location = appDir + 'blank.htm';
	} else {
		parent.RefreshFrame.document.location = appDir + 'refresh.htm';
	}
	requestNewMainMap();
}

function setInstantRefreshOption (theOption) {
	if (theOption != useInstantRefresh) {
		useInstantRefresh = theOption;
		if (useInstantRefresh) {
			parent.RefreshFrame.document.location = appDir + 'blank.htm';
		} else {
			parent.RefreshFrame.document.location = appDir + 'refresh.htm';
		}
		requestNewMainMap();
	}
}

function setMeasureUnitsOption (theOption) {
	if (theOption != useFineMeasure) { 
		useFineMeasure = theOption;
  }
}

function setMetricOption (theOption) {
	if (theOption != useMetric) {
		useMetric = theOption;
    updateScaleBar();
  }
}

function setDisplayCoordsOption(theOption) {
	if (theOption != useDmsDisplayCoords) { 
		useDmsDisplayCoords = theOption;
  }
}
