// =============================================================
//
// Copyright (c) 2000-2003 GE Smallworld. All Rights Reserved.
//
// =============================================================
// Modified:   2007-02-05   S Junghanns (GRINEC)
// =============================================================

// -------------------------------------------------------------------
// Miscellaneous
// -------------------------------------------------------------------

// We intentionally define a variable called undefined because variables
// that are undefined in Javascript have a distinct, non-null value, which
// is "undefined."  Thus by declaring this variable we can use it to test if
// other variables are underined (as opposed to null).
var undefined;

// -------------------------------------------------------------------
// Global constants
// -------------------------------------------------------------------

// Maximum number of simultanious content listeners
var MAX_LISTENERS = 10;

// Maximum number of queued parameters to register on submit
var MAX_PARAMS = 13;

// Maximum number of queued requests
var MAX_REQUESTS = 10;

// Maximum number of javascript objects under the response object
var MAX_OBJECTS = 10;

// Maximum number of registered javascript interface events
var MAX_EVENTS = 20;

// Maximum number of measure points
var MAX_MEASURE_POINTS = 6;

// Maximum number of trail points
var MAX_TRAIL_POINTS = 10;

// Minimal extend of nav Box: if navBox width or height is smaller than this value,
// a zooming a default zoom in or out around the center of the navbox
// is executed and the navBox size is ignored
var MIN_NAV_BOX_EXT = 3;

// Defines navBox-Color
var NAVBOX_COLOR = '#ff0000';

// Map Size Offsets
var MAP_WIDTH_OFFSET = 40;
var MAP_HEIGHT_OFFSET = 88; //108;

// -------------------------------------------------------------------
// Global state
// -------------------------------------------------------------------

// This is a list of allowed values for select mode.  They may be
// replace_select, no_select or adjust_select.  The mode determines
// whether if clicking on a map appends features to the current
// selection (adjust_select), replaces the selection (replace_select)
// or does nothing (no_select)
var FEATURE_SELECT_MODE = 'replace_select';

var LAST_QUERY_SERVICE = '';
var LAST_FEATURE_START = '0';
// Number of features returned per page in search results
var FEATURE_COUNT = 10;

var CURRENT_CONTENT = '';

// Global record of parameters to be passed between client and server
var GLOBAL_CONTEXT = new Context();

// Holds user name used to login to current session
var GT_SWL_SESSION_VAR_USER_NAME = undefined;


//--->  MUS (SHH), 29.6.2007 -------------------------------------------------

var SHH_SWL_SESSION_VAR_USER_NAME = undefined;

//<---  MUS (SHH), 29.6.2007 -------------------------------------------------


// Determines whether to show themes panel or not
var GT_SWL_SESSION_VAR_SHOW_THEMES = true;

// Parameters specific to a network enquiry session
var GT_SWL_SESSION_VAR_NETWORK_ENQUIRY = new Object();
// Reference to current enquiry case object
GT_SWL_SESSION_VAR_NETWORK_ENQUIRY["CURRENT_CASE"] = '';
// Indicates whether we are currently registered for a network enquiry session
GT_SWL_SESSION_VAR_NETWORK_ENQUIRY["IS_ACTIVE"] = false;
// Global storage for Bauvorhabentyp / Art der Massnahme
GT_SWL_SESSION_VAR_NETWORK_ENQUIRY["BVTYP"] = '';
// Global storage for Ort des Bauvorhabens (Gemarkung)
GT_SWL_SESSION_VAR_NETWORK_ENQUIRY["BVORT"] = '';
// Global storage for Ort des Bauvorhabens (Strasse)
GT_SWL_SESSION_VAR_NETWORK_ENQUIRY["BVSTR"] = '';


// -----------------------------------------
// GT Browser Service
// -----------------------------------------

var GT_SWL_GT_BRWSR_SVC_DEFAULT_FEATURE_COUNT = FEATURE_COUNT;
var GT_SWL_GT_BRWSR_SVC_DEFAULT_STYLESHEET = 'content_query.xsl';
var GT_SWL_GT_BRWSR_SVC_DEFAULT_TARGET  = top.hcf_table;

// -------------------------------------------------------------------
// Last object mapped
// -------------------------------------------------------------------

var LAST_MAPPED_OBJECT_TYPE;
var LAST_MAPPED_OBJECT_PROPERTIES;
