//
// This file stores site specific information that Javascript needs
// access to.  This file is NOT sent to sites except during initial
// installation of the software.  This file must be included in any
// main html pages where the javascript needs access to the settings.
//
// -----------------------------------------------------------------------
//
// Change the SIMSWebLanguage to the name of the language to use.
// as the default for this site.  This will be used for all new
// users until they change the language in User Configuration.
//
var SIMSWebLanguage = 'English'
//
//
// The SIMSWebLanguages array sets the languages which show as being
// available to the dealer to pick from.  Set the number on the
// SIMSWebLanguagesAvailable line to the number of lines that follow
// and increment the number in brackets for each of the SIMSWebLanguages
// lines.  If you set the SIMSWebLanguagesAvailable to 1 then only
// the SIMSWebLanguages[1] language will be available to the dealers.
//
var SIMSWebLanguagesAvailable = 5;
var SIMSWebLanguages = new Array(SIMSWebLanguagesAvailable);
SIMSWebLanguages[1] = 'English'
SIMSWebLanguages[2] = 'Spanish'
SIMSWebLanguages[3] = 'Dutch'
SIMSWebLanguages[4] = 'French'
SIMSWebLanguages[5] = 'Bulgarian'
//
//
// Change the SIMSWebDateForm to the local custom for date formatting.
// 1 = American        mm/dd/yyyy
// 2 = International   yyyy/mm/dd
// 3 = European        dd/mm/yyyy
//
var SIMSWebDateForm = '1'
var SIMSWebDateMask = 'mm/dd/yyyy'
//
// Change the value of Txt_Y and Txt_N to match the values used in
// the SIMS II Database for Yes and No queries.
//
var Txt_Y                       = 'Y'
var Txt_N                       = 'N'
//
// Other fields that need to match the SIMS II database.....
//
var Txt_AM_MinutesShort         = "M"
var Txt_AM_HoursShort           = "H"
var Txt_AM_DaysShort            = "D"
//
//
// Change the SIMSWebPhoneFormat to determine phone number formatting.
// American   = (xxx) xxx-xxxx  or  xxx-xxxx
// Australian = xxxx-xxxx or (xx) xxxx-xxxx
// Dutch      = xxx-xxxxxxx or 06-xxxxxxxx
// Others     = will remove invalid characters but not format number.
//
var SIMSWebPhoneFormat ='American'
//
//
// If you wish the menu items that are disabled to appear even if
// the user doesn't have privelege to use them, set this to -1.
// Default of 0 will cause disabled menu items to vanish.
//
var ShowDisabledMenuItems = '-1'
//
// The following lines change the color of the disabled sub-menu items.
// This is only applicable if the ShowDisabledMenuItems option above
// is enabled.  Otherwise, disabled sub-menu items don't appear at all.
//
var MenuPrefix = '<font color="silver">'
var MenuPostfix = '</font>'
//
//  Does the site want the Username's memorized between sessions ?
//  Set to -1 (default) to memorize Username between sessions.
//  Set to 0 to only memorize Username during current session.
//
var MemorizeUserName = '-1'
//
//  AllowOnlyHexAccountNumbers controls whether SIMSWeb users can
//  enter account numbers that only contain 0-9 and A-F or if they
//  should be allowed to put G-Z in account numbers as well.  This
//  works in conjunction with a compiler switch in SIMS II and
//  care should be taken to make sure they are set the same.
//  AllowOnlyHexAccountNumbers = '-1' restricts it to 0-9 and A-F
//  AllowOnlyHexAccountNumbers = '0' restricts it to 0-9 and A-Z
//
var AllowOnlyHexAccountNumbers = '-1'
//
//  ClusteredServerCheck controls whether SIMSWeb checks to see if
//  clustering is enabled at this site when users connect to the
//  server initially.
//  ClusteredServerCheck = '-1' enables checking for a cluster license.
//  ClusteredServerCheck = '0' (default) disables checking for license.
//
var ClusteredServerCheck = '0'
//
//  InactivityTimeout controls the number of minutes that will force
//  the user to relog back into SIMSWeb if they aren't active.
//  For instance if this is set to 20 then, if they stay in one
//  spot without doing anything with SIMSWeb for 20 minutes, the next
//  time they try to do something it will require they log back on
//  first.  If they are continually moving from screen to screen at
//  least once every 20 minutes they will not be logged out.
//
//  Note: This can not be disabled, DO NOT SET THIS TO ZERO OR ANOTHER
//  SMALL NUMBER OR EVERYONE WILL BE LOGGED OUT VERY QUICKLY.  To
//  semi-disable it, set it to a number like 1440 which is the number
//  of minutes in one day.
//
var InactivityTimeout = '20'
//
//  The following array corresponds to the disposition codes that the
//  dealer will see when they run reports.  It will not effect the
//  dispositions that appear in the reports, only the ones that show
//  in the report search screen.  They are placed here so you can give
//  different names to them to simplify it for them if desired.
//  The names below are just a sample, they probably won't match yours:
//
SIMSWebDispoNames = new Array("Any Disposition");
SIMSWebDispoNames[1] = '(a) Additional Alarm      '
SIMSWebDispoNames[2] = '(b) Battery/Power Related '
SIMSWebDispoNames[3] = '(c) See Event Comments    '
SIMSWebDispoNames[4] = '(d) Damaged Equipment     '
SIMSWebDispoNames[5] = '(e) Environment Related   '
SIMSWebDispoNames[6] = '(f) Fire Dispatched       '
SIMSWebDispoNames[7] = '(g) Guard Service Dispatch'
SIMSWebDispoNames[8] = '(h)                       '
SIMSWebDispoNames[9] = '(i) Incorrect Acct Data   '
SIMSWebDispoNames[10]= '(j)                       '
SIMSWebDispoNames[11]= '(k)                       '
SIMSWebDispoNames[12]= '(l)                       '
SIMSWebDispoNames[13]= '(m) Medical Dispatch      '
SIMSWebDispoNames[14]= '(n) No Action-False Alarm '
SIMSWebDispoNames[15]= '(o) Opn/Clo Schedule Mod  '
SIMSWebDispoNames[16]= '(p) Police Dispatch       '
SIMSWebDispoNames[17]= '(q) Attack/Police Dispatch'
SIMSWebDispoNames[18]= '(r) Revise-Cancel Dispatch'
SIMSWebDispoNames[19]= '(s) Service/Testing       '
SIMSWebDispoNames[20]= '(t) Telco Related         '
SIMSWebDispoNames[21]= '(u) Unresolved            '
SIMSWebDispoNames[22]= '(v) Verified PC Holder    '
SIMSWebDispoNames[23]= '(w) Weather Related       '
SIMSWebDispoNames[24]= '(x)                       '
SIMSWebDispoNames[25]= '(y)                       '
SIMSWebDispoNames[26]= '(z)                       '

// Set the OCDaysOfWeekTypes to the number of different day combinations
// that will appear on the schedule page for the Day field.  There should
// be that number of Array_OCDaysOfWeek entries below:
//
var OCDaysOfWeekTypes = 21
var Array_OCDayCodes = new Array(OCDaysOfWeekTypes);
//
Array_OCDayCodes[1]  = '   '
Array_OCDayCodes[2]  = 'ALL'		// 'Every Day'
Array_OCDayCodes[3]  = 'MON'		// 'Monday Only'
Array_OCDayCodes[4]  = 'M-T'		// 'Monday & Tuesday'
Array_OCDayCodes[5]  = 'M-W'		// 'Monday - Wednesday'
Array_OCDayCodes[6]  = 'MTH'		// 'Monday - Thursday'
Array_OCDayCodes[7]  = 'M-F'		// 'Monday - Friday'
Array_OCDayCodes[8]  = 'M-S'		// 'Monday - Saturday'
Array_OCDayCodes[9]  = 'MWF'		// 'Mon, Wed & Friday'
Array_OCDayCodes[10] = 'TUE'		// 'Tuesday Only'
Array_OCDayCodes[11] = 'T&T'		// 'Tuesday & Thursday'
Array_OCDayCodes[12] = 'WED'		// 'Wednesday Only'
Array_OCDayCodes[13] = 'W-T'		// 'Wednesday & Thursday'
Array_OCDayCodes[14] = 'W-F'		// 'Wednesday - Friday'
Array_OCDayCodes[15] = 'THU'		// 'Thursday Only'
Array_OCDayCodes[16] = 'FRI'		// 'Friday Only'
Array_OCDayCodes[17] = 'F-S'		// 'Friday & Saturday'
Array_OCDayCodes[18] = 'SAT'		// 'Saturday Only'
Array_OCDayCodes[19] = 'S-S'		// 'Saturday & Sunday'
Array_OCDayCodes[20] = 'SUN'		// 'Sunday Only'
Array_OCDayCodes[21] = 'S-T'		// 'Sunday - Thursday'

//
// The Txt_JavaScriptError variable holds the contents of the message that
// will appear to the user if there is a JavaScript error.  Because it
// is needed in all JavaScript files, it has to be located here instead of
// in the language specific files.  Under normal circumstances you
// shouldn't need to change it anyway.
//
var Txt_JavaScriptError = '******* AN ERROR HAS OCCURRED ******** \n \n' +
    'SIMSWeb has detected an error has occured in the client \n' +
    'side Javascript running in your browser to check data fields \n' +
    'for accuracy and completeness.  This can be caused by Firewall or \n' +
    'Ad blocking software which inhibits client side Javascript from \n' +
    'running properly.  You may have to set a permission to allow this site \n' +
    'to operate as intended.  If the error continues, you will need to \n' +
    'provide the following information to technical support: \n\n' +
    '--------------------------------------------------------------------- \n\n' +
    'Error details are below:'

//
//
//  Do NOT change anything with the javascript below or the web site
//  may no longer work as expected !
//
function xgetcookie(name) {
   //
   // Read a cookie from those currently available to this document.
   //
   var start = document.cookie.indexOf(name+"=");
   var allcookie = document.cookie
   var len = start+name.length+1;
   var cookiestart = document.cookie.substring(0,name.length)
   if ((!start) && (name != cookiestart)) return null;
   var thiscookie=''
   if (start != -1) {
          var end = document.cookie.indexOf(";",len);
          if (end == -1) end = document.cookie.length;
          thiscookie = document.cookie.substring(len,end);
   }
   if (thiscookie == 'null') { thiscookie = '' }
   return thiscookie;
}

var userLNG = xgetcookie('LNG');
if (userLNG != '') { SIMSWebLanguage = userLNG }

if (ShowDisabledMenuItems != '-1') {
    //
    // This causes the text in the disabled menu items to be inside a
    // comment, which effectively makes the text disappear.
    //
        MenuPrefix = '<!-- '
        MenuPostfix = ' -->'
}
//
// Common variables follow, DO NOT MODIFY THEM !!!
//
var dq = '"';
var sq = "'";
var lt = '<';
var gt = '>';
var nb = '&nbsp;';
var CR = unescape('%0d');
var LF = unescape('%0a');
var CRLF = CR + LF
var temp = new Date();
var BrowserGMTOffset = temp.getTimezoneOffset();
