/*
 *
 * This establishes a number of constants used for configuration of the application
 *
 * Many of these can be over-ridden in the Mapbook. Some cannot as they are used to initalize the interface.
 * Example:
 * <mapbook>
 *	<interface>
 *		<param name="BLANK_IMAGE" value="shared/images/my_blank.gif"/>
 *		<param name="MAP_GROUND_UNITS" value="FT"/>
 *	</interface>
 *	...
 * </mapbook>
 *
 */

/*
 * Application Configuration Location
 */

var MAPBOOK_FILE = 'rlwd_dev.xml'; /* This is the default mapbook! This setting can be overridden by setting the mapbook= variable in the URL */

/* This sets the "startup" view for the application
 * commonly expressed as min-x,min-y,max-x,max-y
 */
var INITIAL_VIEW = '195581,5257206,419402,5383078';

/* This populates and "Jump To:" type boxes */
var VIEWS = {
  'Project:' : {
		'Project 3' : '273603.768069, 5322590.776047, 325153.684473, 5292111.535856',
		'Project 4' : '281519.439516, 5309510.900723, 312171.150538, 5291527.672228',
		'Project 5' : '290311.030560, 5306327.460880, 298099.479031, 5301206.377775',
		'Project 7' : '261027.524656, 5318642.594607, 269054.003371, 5313522.103824',
		'Project 14': '249623.137232, 5372367.839440, 298123.844376, 5341335.830951',
		'Project 20': '284977.902776, 5312295.240467, 303260.258694, 5299824.213460',
		'Project 36': '302068.432241, 5308806.459694, 305513.860487, 5306608.449308',
		'Project 39': '312527.818604, 5352402.811058, 315387.227482, 5350584.599978',
		'Project 41': '299197.366705, 5306258.141275, 316387.226313, 5295308.948090',
		'Project 43B': '227687.909927, 5289824.003939, 241721.443258, 5280846.219515',
		'Project 48': '311372.882559, 5300663.909446, 324386.808224, 5292459.478048',
		'Project 49': '312248.165183, 5295920.195821, 318158.571927, 5292166.636854',
		'Project 51': '310175.200191, 5296115.042103, 313459.693181, 5294020.686399',
		'Project 53': '205602.031042, 5303744.166309, 209894.787721, 5300999.233661',
		'Project 101':'318216.092966, 5274210.794099, 325520.634277, 5269545.107756',
		'Project 102':'326931.134558, 5280955.491144, 331633.209597, 5277967.928183',
		'Project 109':'299446.841105, 5320542.098028, 304116.504520, 5317567.725462',
		'Project 113':'306657.877797, 5302801.619580, 314995.169382, 5297477.806881',
		'Project 115':'293078.519683, 5306497.256127, 298554.916645, 5303001.429744',
		'Project 117':'229527.728812, 5289482.274135, 240410.254198, 5282523.622281',
		'Project 119':'217371.066795, 5289454.214297, 228071.022378, 5282643.034737',
		'Project 123':'234088.619748, 5283797.568866, 236322.079036, 5282377.605110',
		'Project 134':'222165.710753, 5297321.262229, 229144.073567, 5292921.037790',
		'Project 135':'214338.641231, 5305162.256413, 221908.038162, 5300328.089159',
		'Project 161':'253110.443640, 5317707.654731, 265811.701244, 5309599.880269',
		'Project 166':'200964.987414, 5328114.605822, 211925.330421, 5321145.257279'
	},

	'Township:' : {
	'--- Beltrami Co. Townships ---' : '305765,5382137,394178,5249384',
	'Alaska' : '333630,5297485,355652,5291025',
	'Battle' : '368519,5320498,377407,5309739',
	'Benville' : '307443,5360574,317353,5350156',
	'Buzzle' :  '334777,5283038,346417,5271567',
	'Cormant' : '373371,5311128,387051,5299550',
	'Durand' : '353348,5287597,365222,5280993',
	'Hamre' : '316306,5351158,326770,5340006',
	'Hagali' : '363442,5291995,376853,5280748',
	'Hines' : '372912,5291808,386427,5280313',
	'Hornet' : '382834,5301205,396440,5290030',
	'Kelliher' : '382760,5320605,396882,5309059',
	'Lammers' : '334441,5273592,346100,5262142',
	'Langor' : '373152,5301482,386982,5290060',
	'Lee' : '307028,5351250,317071,5340468',
	'Liberty' : '344080,5282855,356889,5271177',
	'Maple Ridge' : '344080,5292498,357137,5281334',
	'Minnie' : '326424,5360171,336565,5349378',
	'Moose Park' : '392388,5291360,405936,5279706',
	'Nebish' : '353791,5297098,367026,5285477',
	'Nore' : '392465,5300985,405278,5289557',
	'North Beltrami Unorganized' : '307290,5380193,337257,5358033',
	'O ` Brien' : '363344,5301702,377227,5290091',
	'Quiring' : '363678,5311452,377309,5299745',
	'Roosevelt' : '334465,5292988,347083,5281441',
	'Shooks' : '382929,5310904,396650,5299390',
	'Shotley' : '370050,5330573,387466,5318982',
	'Spruce Grove' : '316839,5360458,327056,5349724',
	'Steenerson' : '326127,5350590.,336384,5339767',
	'Summit' : '382622,5291617,395991,5279995',
	'Turtle Lake' : '353592,5282639,365291,5271327',
	'Waskish' : '383304,5349555,395167,5328470',
	'Woodrow' : '373235,5320796,387173,5309250',
	
	'--- Clearwater Co. Townships ---' :'305069,5324169,336766,5222847',
	'Clover' : '324980,5298484,338282,5291399',
	'Copely' : '316422,5273899,328699,5262598',
	'Dudley' : '326411,5283397,338473,5272137',
	'Eddy' : '307139,5284078,320247,5272424',
	'Falk' : '306296,5264835,317662,5253341',
	'Greenwood' : '315370,5303320,328198,5291698',
	'Hangaard' : '306177,5312683,319177,5301508',
	'Holst' : '316923,5283798,329607,5272123',
	'Leon' : '314926,5293367,328227,5281884',
	'Moose Creek' : '325585,5264241,335997,5252832',
	'Nora' : '316032,5264517,327653,5253002',
	'Pine Lake' : '305365,5293731,318352,5282120',
	'Popple' : '306961,5274419,319927,5263139',
	'Shevlin' : '325653,5273780,336369,5262455',
	'Sinclair' : '324653,5293007,337214,5281524',
	'Winsor' : '305892,5303084,318841,5291826',
	
	'--- Mahnomen Co. Townships ---' : '265674,5268235,310013,5226020',
	'Island Lake' : '297156,5265186,308723,5253421',
	'Heier' : '287068,5265207,299115,5253594',
	
	'--- Marshall Co. Townships ---' : '193300,5387506,309033,5337123',
	'Agder' : '268957,5353081,278945,5339447',
	'Cedar' : '268519,5372401,279117,5361002',
	'Como' : '268553,5382035,279492,5370317',
	'East Valley' : '268967,5362400,279578,5348989',
	'Eckvoll' : '288138,5361692,298841,5350826',
	'Espelie' : '297417,5351954,307486,5338335',
	'Excel' : '259070,5353672,269474,5339730',
	'Grand Plain' : '278583,5352151,288225,5338819',
	'Holt' : '259612,5363093,269950,5352222',
    'Linsell' : '297741,5380210,308174,5369413',
    'Moose River' : '287908,5380716,298537,5369737',
	'Moylan' : '287320,5351954,298123,5338843',
	'Mud Lake' : '278484,5362381,289054,5350667',
	'New Solum' : '249340,5353822,260024,5339901',
    'Rollis' : '288023,5371299,298161,5360296',
    'Thief Lake' : '278430,5381499,289045,5370314',
	'Valley' : '297805,5361203,308134,5350133',
	'Veldt' : '297441,5371119,307993,5359558',
	'Whiteford' : '278110,5371918,288397,5360729',
	
	'--- Pennington Co. Townships ---' :'307417,5312174,238972,5341580',
	'Black River' : '248735,5325024,261901,5316365',
	'Bray' : '237903,5335925,250390,5322101',
	'Clover Leaf' : '277477,5340562,288202,5331364',
	'Deer Park' : '287228,5323704,298247,5314216',
	'Goodridge' : '287171,5340455,298109,5331021',
	'Hickory' : '296692,5323519,308270,5310923',
	'Highlanding' : '286446,5333372,297808,5320679',
	'Kratka' : '276963,5333722,288160,5321053',
	'Mayfield' : '277771,5323948,287434,5315054',
	'Norden' : '249208,5341605,259131,5332966',
	'North' : '258802,5341103,268687,5332594',
	'Numedal' : '238760,5342942,250169,5332645',
	'Polk Centre' : '239554,5325103,252168,5316827',
	'Reiner' : '296867,5340008,307678,5330717',
	'River Falls' : '258661,5324451,270208,5316040',
	'Rocksbury' : '257601,5334969,269351,5322182',
	'Sanders' : '248214,5335163,259631,5322062',
	'Silverton' : '268311,5340717,278428,5332021',
	'Smiley' : '267326,5334050,278723,5321357',
	'Star' : '295715,5333559,307590,5320702',
	'Wyandotte' : '268360,5323849,280178,5312572',
	
	'--- Polk Co. Townships ---' : '191863,5343904,331293,5262659',
	'Andover' : '218528,5297361,231729,5285758',
	'Angus' : '218810,5335983,231705,5324326',
	'Badger' : '266627,5295206,280121,5283450',
	'Belgium' : '229169,5325583,242805,5314060',
	'Brandsvold' : '287682,5284574,301078,5273029',
	'Brandt' : '228721,5335380,241361,5323882',
	'Bygland' : '200978,5308016,212682,5296109',
	'Chester' : '286292,5304219,299768,5292476',
	'Columbia' : '296861,5274686,310383,5263035',
	'Crookston' : '228530,5306628,241789,5294796',
	'Eden' : '295610,5294082,309189,5282536',
	'Esther' : '192696,5337468,202929,5325884',
	'Euclid' : '219944,5326310,232914,5314358',
	'Fairfax' : '228295,5296626,241238,5285055',
	'Fanny' : '219210,5316782,232530,5304778',
	'Fisher' : '209231,5307621,222388,5295681',
	'Gentilly' : '238209,5306115,251597,5294234',
	'Godfrey' : '248791,5286247,261906,5274165',
	'Grand Forks' : '196454,5326850,203357,5316330',
	'Grove Park-Tilden' : '247155,5296916,271869,5279672',
	'Gully' : '295835,5303901,309402,5292027',
	'Hammond' : '220164,5287648,232465,5275695',
	'Hill River' : '285845,5294358,299560,5282940',
	'Huntsville' : '200331,5317219, 211711,5306084',
	'Johnson' : '296219,5313518,309801,5301731',
	'Kertsonville' : '237647,5296471,251556,5284562',
	'Keystone' : '210507,5326869,223208,5314982',
	'King' : '278087,5284928,290934,5273633',
	'Knute' : '268372,5285453,280489,5273597',
	'Lessor' : '276374,5294799,289811,5283150',
	'Lowell' : '218745,5307126,232037,5295120',
	'Nesbit' : '209720,5317213,222852,5305242',
	'Northland' : '199593,5336822,212535,5325245',
	'Onstad' : '240248,5286711,251411,5275262',
	'Parnell' : '228952,5316256,242225,5304351',
	'Queen' : '297558,5284425,310719,5272752',
	'Rhinehart' : '199237,5313947,202259,5307379',
	'Roome' : '208845,5297873,222051,5286238',
	'Russia' : '230111,5287152,241371,5275562',
	'Sullivan' : '200681,5327298,213527,5315582',
	'Tabor' : '209060,5336723,222198,5324680',
	'Tynsid' : '205195,5297915,211387,5286923',
	'Vineland' : '207562,5287712,223850,5276265',
	'Woodside' : '258741,5285779,271090,5274009',
	
	'--- Red Lake ---' : '297729,5293622,239508,5318124',
	'Browns Creek' : '248574,5318562,261844,5313154',
	'Emardville, Emardville North' : '267510,5317660,281022,5302871',
	'Equality, Equality North' : '286472,5317192,299921,5302134',
	'Garnes, Garnes North' : '276839,5317496,288796,5302516',
	'Gervais' : '257672,5314887,271141,5303106',
	'Lake Pleasant' : '247529,5305594,261235,5293784',
	'Lambert' : '276703,5304559,290212,5292821',
	'Louisville' : '238508,5315727,251910,5303895',
	'Poplar River' : '266780,5304861,280463,5293102',
	'Red Lake Falls' : '247932,5315418,261618,5303409',
	'River' : '257889,5318089,271498,5312531',
	'Terrebonne' : '257303,5305272,270773,5293448',
	'Wylie' : '238575,5319120,252315,5313588',
	
	'--- Roseau Co. Townships ---' : '268133,5391964,289204,5379446',
	'Huss' : '268743,5391818,279475,5380455',
	'Poplar Grove' : '278284,5391249,289571,5379790',
	
    '--- Watersheds ---' : '195581,5257206,419402,5383078',
    'Clearwater River' : '252188,5251329,348250,5329611',
    'Grand Marais River' : '190753,5298715,250809,5347655',
    'Red Lake River' : '197635,5252746,333934,5363818',
    'Thief River' : '257240,5324901,337719,5390485',
    'Upper/Lower Red Lakes' : '327512,5360099,423286,5276078'
	}	
};
/*
 * MapServer Location
 */

var MAPSERVER_MAPFILE_ROOT = '/ms4w/apps/GeoMOOSE/redlake/maps_rlwd/';	/* Root location of mapfiles */
var MAPSERVER_ROOT = '/cgi-bin/mapserv.exe';
var MAPSERVER_IMAGE_URL = MAPSERVER_ROOT+'?map=%MAPFILE%&mapext=%EXTENTS%&mapsize=%SIZE%&mode=%MODE%';
var MAPSERVER_DATA_URL = MAPSERVER_ROOT+'?map=%MAPFILE%&mapext=%EXTENTS%&mapsize=%SIZE%&mode=nquery&searchmap=true';
var MAPSERVER_LEGEND_URL = MAPSERVER_ROOT+'?map=%MAPFILE%&mapext=%EXTENTS%&mapsize=%SIZE%&mode=legend';

var POPUPS_TRIGGER_CHANGETOOL = false;	/* Controls whether the "Map Tips" can be used simutaneously with other tools */
var MAP_POPUPS_ENABLED = true;	/* Controls whether the Map will render the "Map Tip"s aka Popups */
var MAP_ASSUME_DATA = false;	/* This tells the map whether to read data from a layer if the 'data' attribute is unset for a 'map' tag */
var MAP_LEGENDS_ENABLED = true; /* Controls whether the Map will load Legends */
var MAP_ZOOMIN_STYLE = 'blank';	/* Set to 'scale','clip', 'none', or 'auto' to change the behaviour for Zooming In 
				 * 'auto' setting will make it 'clip' style for IE6 and 'scale' for anyone else.
				 * 'scale' will scale the image similiar to that for the Dynamic Zoom
				 * 'clip' will clip the window the the zoome box.
				 * 'none' will do nothing.
				 * 'blank' will clear out the image with BLANK_IMAGE.
				 */
var MAP_TIMESTAMP_REQ = true;	/* When set true the Map will timestamp layers.  The prevents images from being cached by the browser. */
var MAP_NAVIGATION_DELAY = 500;
var OPACITY_CONTROLS = 'full';/* Set to 'none', 'prompt', 'full', or 'auto' to changethe behaviour for the Opacity Controls
				 * 'auto' settings will force 'prompt' for those using IE6 and allows 'full' opacity control for all others.
				 * This effects both the Map Object (where opacity is rendered) and the Visible Layers Object (where the controls lay)
				 */

var MAP_DEBUG_LAYERS = false;	/* When set true, GeoMOOSE will query each layer
				 * to see if it returns an image
				 */

/* Prompt Message to display for when OPACITY_CONTROLS is set to "Prompt" */
var OPACITY_CONTROLS_DISABLED_MESSAGE = "Opacity controls have been disabled.\nClick 'Enable Opacity Controls' to enable them.";
var OPACITY_CONTROLS_ENABLE_WARNING = "Opacity controls can cause performance problems on older hardware with IE6 and earlier.\nWould you still like to enable them?";

var MAP_IE_SCALE_STYLE_SWITCH = 6;	/* Minimum IE Version for 'auto' to switch to using scale mode 
					 * Switch this to '100' if you want to disable Scale-style zoom in for all versions of IE.
					*/

var MAP_DYNAMIC_ZOOM = true;	/* Enable/Disable the Mouse Zoom Tool 
				 * This is here because it's image scaling behavior is controlled separately from the rest of the zoom tools.
				*/
var MAP_FADE_EFFECTS = !true;	/* Fade Effects Control
				 * When MAP_FADE_EFFECTS is set to true and MAP_FADE_EFFECTS_DURATION is greater than 0
				 * new map images will appear to "fade" in.
				 */
var MAP_FADE_EFFECTS_DURATION = 500;	/* This is in milliseconds and refers to the duration of the effect not the step value */
var MAP_MAPBOOK_ORDER = true;	/* Enable/Disable whether the order in the mapbook is honored 
				 * If the MAP_MAPBOOK_ORDER is set to false then layers will appear in the order in which they are added
				 * with newer layers being placed on top of other layers (unless the zindex attribute is set to "-1" then
				 * the map-layer will be placed on the bottom of the other layers).
				 * If the MAP_MAPBOOK_ORDER is set to true then layers will appear in the order in which they appear in the 
				 * mapbook.
				 */

/* 
 * THIS WILL BE DEPRECIATED IN FAVOR OF SCALE BAR ON THE MAP!
 * You can have what-ever CGI you want generate a scale bar
 * only two variables are passed to it:
 *	[SIZE] - The image size of hte map
 *	[EXTENTS] - The extents in "MINX MINY MAXX MAXY" format.
 * To disable the Scalebar, simply set SCALEBAR_CALL to null or ''
 */
/*var SCALEBAR_CALL = '/datasets/ANNOTATION/SAINT_PAUL/PUBLIC_WORKS/GISMO/scalebar.map?mapsize=[SIZE]&mapext=[EXTENTS]&mode=scalebar';*/
/*** THIS WILL BE REMOVED IN RC3 ***/

/*
 * This is the client enforced limit on how many objects it will
 * be willing to process once downloaded.  Setting this rediculously high
 * will the control to be in the mapfiles/server.
 */
var LAYER_MAXIMUM_OBJECTS = 200;

/*
 * Default Image Icons
 */

var BLANK_IMAGE = 'shared/images/blank.gif';

var REMOVE_ICON = 'shared/images/remove.png';
var RELOAD_ICON = 'shared/images/reload.png';
var FADE_ICON = 'shared/images/fade.png';
var UNFADE_ICON = 'shared/images/unfade.png';
var SERVICE_DEFAULT_ICON = 'shared/images/tool.png';
var LEGEND_TOGGLE_ICON = 'shared/images/text_linespacing.png';

var UP_ICON = 'shared/images/arrow_up.png';
var DOWN_ICON = 'shared/images/arrow_down.png';

var META_DEFAULT_ICON = 'shared/images/meta.png';
var HELP_DEFAULT_ICON = 'shared/images/help.png';

/*
 * Three Popup States
 * 1) ACTIVE - The popups the user will see on the map
 * 2) AVAILABLE - The data is loaded but they are not selected by the layer
 * 3) UNAVAILABLE - There is no popup data loaded for that particular layer
 */
var POPUP_ACTIVE_ICON = 'shared/images/flag_green.png';
var POPUP_AVAILABLE_ICON = 'shared/images/flag_yellow.png';
var POPUP_UNAVAILABLE_ICON = 'shared/images/flag_red.png';

var POPUP_MESSAGE = new Array();
POPUP_MESSAGE['PopupsAvailable'] = 'Popups available for this layer.';
POPUP_MESSAGE['PopupsUnavailable'] = 'Popups unavailable for this layer.';
POPUP_MESSAGE['PopupsActive'] = 'Popups for this layer are displayed on the map.';

var POPUP_LAYERCHANGE_CLEAR = true;	/* Clear the old popups when you change layers */

/*
 * Cursor Configuration
 */

var CURSOR_NOTHING = 'default';
var CURSOR_ZOOM_IN = 'url(cursors/zoomin2.cur),auto';
var CURSOR_ZOOM_OUT = 'url(cursors/zoomout2.cur),auto';
var CURSOR_ZOOM_PAN = 'url(cursors/pan.cur),auto';

var CURSOR_POPUPS = 'help';
var CURSOR_DRAW = 'url(cursors/pencil2.cur),auto';
var CURSOR_MEASURE = 'url(cursors/measure2.cur),auto';

/*
 * OpenMNND Specific Configuration
 */
var GEOMOOSE_SKIN = 'green';	/* Default skin/theme to load */
var HEADER_URL = 'skins/%THEME%/header.html';	/* The header could be fixed, but this default allows it to change with the Theme */
var SIDE_PANEL_RIGHT = true;	/* Sets whether the side panel should be on the right or left side of the screen */
var MENU_SOURCE = 'rlwdmenu_dev.xml';
var MENU_TOGGLE_ICON = 'shared/images/checkmark.gif';

/* Settings for the Map Navigator */
var SHOW_MAP_NAVIGATOR = true;
var EAST_WEST_PERCENTAGE = .25; /* Percentage of the map that they Map Navigator will scroll when clicked */
var NORTH_SOUTH_PERCENTAGE = .25;
var MAP_NAVIGATOR_SCALES = [
	{ 'scale' : 250000, 'label' : 'Full Extent' },
	{ 'scale' : 125000, 'label' : null },
	{ 'scale' : 75000, 'label' : null },
	{ 'scale' : 35000, 'label' : '1:35000 Scale XXX' },
	{ 'scale' : 18000, 'label' : null },
	{ 'scale' : 9000, 'label' : '1:9000 Scale' }

];


/* Settings for the references map */
var REFERENCE_MAP = true;		/* Turns on/off the reference map */
var REFERENCE_MAP_VISIBLE = true;	/* Toggle visibility of the reference map */
var REFERENCE_MAP_WIDTH = 150;		/* Reference Map Dimensions */
var REFERENCE_MAP_HEIGHT = 100;
var REFERENCE_MAP_TOP = false;		/* Reference Map Location, the reference map can be pinned to one of the four corners of the map */
var REFERENCE_MAP_LEFT = false;
var REFERENCE_MAP_DYNAMIC = false;	/* The reference map can be static (older style) or Dynamic like Google & others (newer style) */
					/* Not fully implemented */
var REFERENCE_MAP_MULTIPLIER = 16;	/* The scale multiplier between the main-map and the reference map */

var GEOMOOSE_TITLE = 'Red Lake Watershed District - MapViewer'; /* Window Title */
var GEOMOOSE_ORGANIZATION = 'Red Lake Watershed District'; /* Organization that will be displayed in the footer */

var SHOW_MAP_WIDTH = false;
/*
 * Toolbar Display Options
 */
var TOOLBAR_TEXT = false; /* Toggles whether the Tools show have the title shown */
var TOOLBAR_IMAGE = true; /* Toggles whether the Tools should have icons */
var TOOLS_SHOW_AS_SELECTED = false; /* Toggles Whether the Tools anchors have the .className is set to selected */
var TOOLS_DIVIDE_PANEL = false; /* This makes the upper toolbar defined only on-load and the tool-panel dynamic if set true, otherwise both are dynamic */
var TOOLS_SHOW_REMOVE = false;

/*
 * Unit Specification
 */

var MAP_GROUND_UNITS = "M"; // "IN", "FT", "M", "MI" /* Sets the type of Ground Units */
var MAP_COORDINATE_DISPLAY = {
	groundUnits : true,
	lonLat : true /* Will only display if MAP_COORDINATE_SYSTEM is set */
};
var MAP_SCALE_DISPLAY = true;	/* Toggles whether the scale box should be shown */
var MAP_COORDINATE_SYSTEM = 'UTM-15'; /* Sets the Map Coordinate system, for coordinate reprojection to Lat/Long */

var MEASURE_LENGTH_UNITS = "MI"; // "IN", "FT", "M", "MI"
var MEASURE_AREA_UNITS = "SQACRE"; // "SQIN", "SQFT", "SQM", "SQMI", "SQACRE" ** "SQACRE" is acres, not "Square Acres"

var MAP_PIXELS_PER_INCH = 72; /* Sets the scrreen DPI for scale calculations */

var ZOOM_BOX_SHAPE = 'box'; ///'scalebox' /* The rubber-band zoom in/out can be forced to be displayed using the aspect ratio of the map */


/*
 * These set the scale-settings
 * This is an associative array, the Key is displayed as the title and the Value is the Scale
 */
var SCALEBOX_JUMPER_INCREMENTS = new Array();
SCALEBOX_JUMPER_INCREMENTS['1:6'] = '6';
SCALEBOX_JUMPER_INCREMENTS['1:12'] = '12';
SCALEBOX_JUMPER_INCREMENTS['1:120'] = '120';
SCALEBOX_JUMPER_INCREMENTS['1:1200'] = '1200';
SCALEBOX_JUMPER_INCREMENTS['1:2400'] = '2400';
SCALEBOX_JUMPER_INCREMENTS['1:24000'] = '24000';
SCALEBOX_JUMPER_INCREMENTS['1:120000'] = '120000';


var SERVICE_OVERLOAD_MESSAGE = 'Service returned too many objects! Narrow your search!';
var SERVICE_RETURN_NEW_WINDOW = false;/* Sets whether results will be rendered in a new window or in the control panel. */ 
var SERVICE_SHOW_WARNINGS = !true; /* Default empty results checking can be turned off */

/*
 * This controls the visibility and names of the tabs as they are displayed
 * in the side-panel
 */
var TABS_SHOW_PANEL = true;			/* This sets whether or not to show the Tabs Panel at the top of the Control Panel */
var TABS_CATALOG_NAME = 'Map Layers';		/* These are some default titles for the different panels/tabs */
var TABS_LEGENDS_NAME = 'Legends & Controls';
var TABS_TOOLS_NAME = 'Tools';
var TABS_RESULTS_NAME = 'Information';

var TOOLS_SHOW_TAB = false; /* Defines whether to show the Tools Tab */

/*
 * These two arrays define the titles and id's for the tabs
 * They can be re-arranged in any order.
 * The tab TITLES order is directly relayed to the TABS_IDS order,
 * if 'Catalog' is in TABS_TITLES[0] and 'div_my_catalog' is in TABS_IDS[0],
 * then when 'Catalog' is clicked 'div_my_catalog' will be set to visible.
 */
var TABS_TITLES = new Array();
var TABS_IDS = new Array();
if(TOOLS_SHOW_TAB) {
	TABS_TITLES = [TABS_CATALOG_NAME,TABS_TOOLS_NAME,TABS_RESULTS_NAME];
	TABS_IDS = ['content_map_layers', 'content_tools_list', 'content_results_form'];
} else {
	TABS_TITLES = [TABS_CATALOG_NAME,TABS_RESULTS_NAME];
	TABS_IDS = ['content_map_layers', 'content_results_form'];
}


/*
 * Map Popup Functions
 * These are used to dynamically  build the popup menu for the menu.
 * The title for the menu is the array key and the URL is in the array value.
 */
var MAP_POPUP_MENU = true;	/* Sets whether the Map Popup Menu is available */
var MAP_POPUP_FUNCTIONS = new Array();
MAP_POPUP_FUNCTIONS['Zoom In'] = "javascript:Map.recenterOnZoomPoint(.7)";
MAP_POPUP_FUNCTIONS['Zoom Out'] = "javascript:Map.recenterOnZoomPoint(1.2)";
MAP_POPUP_FUNCTIONS['Recenter Here'] = "javascript:Map.recenterOnZoomPoint(1)";

/*
 * Loading Bar Message and Image
 * You can change the 'Loading...' default message to pretty much anything you want.
 * This is more useful for internationalization than anything else.
 */
var LOADING_MESSAGE = 'Loading...';
var LOADING_IMAGE = './shared/images/waiting.gif';
var LOADING_TIMEOUT = 30000; /* In milliseconds, this is how long the loading box will wait until it thinks the layer is broken */

/*
 * Controls for the TreeView,
 * if desired the legends and layer controls can be displayed in the TreeView
 */
var TREEVIEW_SHOW_CONTROLS = true;
var TREEVIEW_LEGENDS = {
	enabled: true,		/* Sets whether the legends are shown in the tree view */
	visible: false		/* sets whether the legends are visible by default */
};

/* 
 * If a layer is out of range, then the checkbox will be disabled
 */
var TREEVIEW_CHECKBOX_RANGE_VISIBILITY = true;

/*
 * TREEVIEW_CONTROLS is a way to do fine-grained adjustments when 
 *	TREEVIEW_SHOW_CONTROLS is set to true.
 */
var TREEVIEW_CONTROLS = {
	up: false,
	down: false,
	fade: true,
	unfade: true,
	refresh: false,
	legendToggle: true
};

var TREEVIEW_BREAK_FOR_CONTROLS = false; 	/* If true, controls go on a line AFTER the layer title
							if false, they go on the same line. */

var MAP_LOAD_LEGENDS = false;


/*
 * This array is used to load custom Javascripts into the interface
 * If there is a custom application launching function you need this is the place to add those functions.
 */
var CUSTOM_SCRIPTS = new Array();
CUSTOM_SCRIPTS[0] = './custom/synergen.js';
CUSTOM_SCRIPTS[1] = './custom/validate.js';

var VALIDATE_FUNCTIONS = new Array();
VALIDATE_FUNCTIONS['INTEGER'] = 'validateInteger'; /* This is in ./custom/validate.js */

var SERVICES_INVALID_BACKGROUND = '#F00';
var SERVICES_INVALID_MESSAGE = 'Cannot call service, there is still invalid input (check inputs whose backgrounds are red)!';

/*
 * Messages for when one is creating new shapes
 */
var SHAPE_MESSAGES = new Array();
SHAPE_MESSAGES['poly'] = 'Select a freehand polygon. Press down with the left mouse button and drag it around. Let up to finish drawing.';
SHAPE_MESSAGES['point'] = 'Click a point on the map.';
SHAPE_MESSAGES['measurearea'] = 'Click the corners of the polygon. Double-click to finish the polygon.';
SHAPE_MESSAGES['measureline'] = 'Click the points of the line. Double-click to finish the line.';
SHAPE_MESSAGES['box'] = 'Hold the mouse down and drag to draw a box.  Releasing the mouse finishes the line.';

/*
 * When using ProcessURLString() delim and sep (pointdelim) are optional
 * These are the defaults it will use as delimiters.
 * ..DELIM will be used to divide the X and Y of points and items in lists (like Layer titles) 
 * ..POINT_DELIM will be used to divide points
 */
var URL_DEFAULT_DELIM = ' ';
var URL_DEFAULT_POINT_DELIM = ',';

/*
 * XSL Definition Files
 */

var XSL_RESULTS = 'xsl/results.xsl';
var XSL_IMAGEMAP = 'xsl/imagemap.xsl';

/*
 * Min/Maxing capability for the Map as a whole.
 * Setting the minscale="" and mapscale="" will set local min/max displays for those layers.
 */

var MAP_MINSCALE = 0;
var MAP_MAXSCALE = 3500000;

/*
 * Namespacing for the HTML returns
 */
var MAPBOOK_NAMESPACE_URI = 'http://geomoose.org/';
var MAPBOOK_NAMESPACE_PREFIX = 'moose';

/*
 * Set this to show a "waiting message"
 * References a DIV
 */
var SERVICE_WAITING_DIV = 'WaitingMessage';
