/* ---------------------------------------------------------------
 * environment.js
 * ---------------------------------------------------------------
 * Creator: wputz      Creation Date: 15/01/07
 *
 * description: contains all constants           (@ Constants)
 *              contains all paths               (@ Paths)
 *              contains all entrypoints         (@ Entry Points)
 *
 * ---------------------------------------------------------------
 */


//********************************************************************************************
//%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&
//
//                                     Constants
//
//%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&
//********************************************************************************************

//this is the default application name, used in urls and collection names
APP_NAME = "metasweb";

// try to configure APP_NAME according to domain name (host name)
var domainApps = [];
domainApps["intranet.metas.admin.ch"]   = "intranet07";
domainApps["www.metas.ch"]              = "metasweb";
domainApps["metascms01.metas.admin.ch"] = "legnet2";
domainApps["legnet.metas.ch"]           = "legnet2";

if (typeof request != "undefined") {
  var currentDomain = request.field.Host;
  for (domain in domainApps) {
    if (currentDomain.match(new RegExp(domain,"i"))) {
      APP_NAME = domainApps[domain];
      break;
    }
  }
}

//only set this to true if you have successfully prepared your ressources and includes!!
CACHING = false;
USE_STRIPPING_CONCATENATING = false;

// modify this accordingly to file v6.3/config/menudef.js - variable:CERTIFICATES_LOCATION
CERTIFICATES_LOCATION = "/";

//what is the def site language
var DEFAULT_LANGUAGE            = "ge";

var HOME                        = APP_NAME ;

var CLIENT_PREFIX               = "lbc";

var SEARCH_DEFAULT_MODE         = 10; // DONT_SCALE_SCORE = 1, CURRENT_VERSION = 2, APPLY_CLUSTER = 8, (!) don't configure mode NO_ITERATOR = 4 (!)

var HIDE_EMPTY_FOLDERS          = false;

var VERIFY_OBJECTS              = true; // check if images exist before adding link (affects performance)

var DEBUG_LEVEL                 = 7;

// DEFAULT VALUES

var DEFAULT_SECTION_PAGE        = false; // alias name (e.g. global_intro_header) or false (if no default page should be shown)

var DEFAULT_SITEMAP_LEVELS      = 3;            //2 or 3

var DEFAULT_NAV_LEVELS          = 9;

var DEFAULT_LISTING_COLUMNS     = 1;

//where to find the 404 error page with a custom error msg
var DEFAULT_ERROR_PAGE          = "/" + APP_NAME + "/404.html";

//which groups are allowed to upload files into the /metas_inbox
var GROUPS_ALLOW_UPLOAD         = ["system", "uploaders"];

//which is the fileinbox for the web uploads
var UPLOAD_COLLECTION           = "/" + APP_NAME + "_inbox";

//where are the metas data stored
var METAS_DATA_COLLECTION       = "/" + APP_NAME;

//if metas will have a different parent than the root collection, enter it here
var METAS_PARENT_COLLECTION     = "/";

//whats the name the context collection where all context files are stored
var METAS_CONTEXT_COLLECTION    = "context";
var METAS_APP_CONTEXT_COLLECTION    = METAS_CONTEXT_COLLECTION + "_" + APP_NAME;

//context objects need an suffix because of different file extension like .pdf would cause errors
var METAS_CONTEXT_OBJ_SUFFIX    = ".html";

/** system email handling */
var MAIL_TYPE                   = "text/plain";

//enter the contact person email here
var METAS_CONTACT_EMAIL         = "info@metas.ch";

//if you have more than one contact personen, add the additional emails here (see sample below)
var METAS_CONTACT_CC_EMAILS     = [];
//sample
//var METAS_CONTACT_CC_EMAILS     = ["first@email.here", "second@email.here"];

//if there are any errors during the sendmail, send an email to an admin here
var METAS_ERROR_MAIL_TO         = "hans-anton.ebener@metas.ch";

var METAS_CBX_DOCTYPES_PRAEFIX = "cbxdoctype_";

//********************************************************************************************
//%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&
//
//                                     Paths
//
//%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&
//********************************************************************************************

PREFIX_WAVEMASTER  = "/wavemaster.internal/";
PATH_TO_IMAGES = PREFIX_WAVEMASTER + "icons/";

// general paths
BASE_PATH               = "";
PATH_TO_CACHE           = BASE_PATH + "cache/";
PATH_TO_CONFIG          = BASE_PATH + "configs/";
PATH_TO_COMPONENTS      = BASE_PATH + "components/";

PATH_TO_LIB             = BASE_PATH   + "lib/";
PATH_TO_MODLIB          = PATH_TO_LIB + "modules/";
PATH_TO_COMPLIB         = PATH_TO_LIB + "components/";
PATH_TO_BASELIB         = PATH_TO_LIB + "base/";
PATH_TO_CLIENTLIB       = PATH_TO_LIB + "clientlib/";
PATH_TO_SHARELIB        = PATH_TO_LIB + "share/";
PATH_TO_DEFAULT_STYLE   = PREFIX_WAVEMASTER + "styles/" + APP_NAME;


//path the default style directory with the wavemaster prefix for the urls
var DEFAULT_STYLE               = PREFIX_WAVEMASTER + "styles/" + APP_NAME;

ROOTIMAGEPATH = "/" + APP_NAME + "/images/rootimage.jpg";

//********************************************************************************************
//%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&
//
//                                     Entry Points
//
//%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&%&@#$%&
//********************************************************************************************

// CERTIFICATE SEARCH
ENTRYPOINT_CERT_SEARCH = "/entrypoints/certsearch";

// global date Variables
var HW_UI_UseLocalDate=true;

/*
 * Hide from Navigation definition
 * you can hide an object with several Attribute Value combinations
 * in our example we want to hide every object with HW_DC_InstanceOf=HW_DC_Remote
 * it is also possible to hide an object if a special attribute exists
 * or if a special attribute with an explicit value exists
 *
 * remark: multivalue attributes are not supported, in that case the first value would be checked
*/
var objHideFromNavigation = {};
objHideFromNavigation.HW_DC_InstanceOf   = ["HW_DC_Remote"];
objHideFromNavigation.hideFromNavigation = "";
//objHideFromNavigation.CollectionType     = ["Cluster", "MultiCluster", "AlternativeCluster"];

//============= Login/Logout =============
//switch automatic authorization on
var NTLM_AUTHORIZATION = false;
