\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\tvar iBUTTON_THRESHOLD = 10;\r\n\tvar sDDB_DIVIDER = "[__DDB_DIVIDER__]";\r\n\r\n\tvar bDBG_TEST_FUNC_CALLS = false;\r\n\tvar bTST_FUNCS_ELIM_TYPE_POSTS = false;\r\n\tvar bTST_FUNCS_pppp_TO_POINT = false;\r\n\tvar bTST_FUNCS_dddd_TO_DASH = false;\r\n\tvar bTST_FUNCS___TO_SPACE = false;\r\n\tvar bCRSH_ALRT = true;\r\n\tvar bCRSH_DGNSTCS = true;\r\n\tvar bCRSH_THROW = true;\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\tvar bCONCEPT_DOC_PAGE = false;\r\n\r\n\t\r\n\t\tvar sJSDIR;\r\n\t\tvar sSifCfgUrl;\r\n\t\tvar bDbgJSLoads;\r\n\r\n\t\tvar bLDD_VFPD = false;\r\n\t\tvar bLDD_CIBC = false;\r\n\t\tvar bLDD_DBG = false;\r\n\t\tvar bLDD_OD = false;\r\n\t\tvar bLDD_STASIF = false;\r\n\t\tvar bLDD_SIF_CFG = false;\r\n\t\tvar bLDD_CI = false;\r\n\r\n\t\tvar bVFPDInUrl = false;\r\n\r\n\t\tvar aVfbc = [];\r\n\r\n\t\tvar sSifCfgUrl;\r\n\t\tvar bDbgJSLoads;\r\n\r\n\tvar sDMOV_FUNC_PRE = "vfpdtf__";\r\n\tvar sURLP_VFPD = "vfpd";\r\n\tvar sURLP_CIBC = "load_cibc";\r\n\tvar sFRM_NM_VFPD = "form_vfpd__";\r\n\r\n\r\nvar bLVFCalled = false; \r\n\r\n\r\nfunction loadVF(s_jsDirUrl, s_sifCfgUrl, b_dbgJSLoads) {\r\n\tif(bLVFCalled) { \r\n\t\tcrsh("vf.lvf1", loadVF, "loadVF (XCMAX): This function was already called.");\r\n\t} \r\n\tbLVFCalled = true; \r\n\r\n\tciMissing(loadVF, "loadVF (XCMAX)", "s_jsDirUrl", s_jsDirUrl);\r\n\r\n\tif(s_jsDirUrl.substring((s_jsDirUrl.length - 1), s_jsDirUrl.length) != "/") { \r\n\t\tcrsh("vf.lvf1", loadVF, "loadVF (XCMAX): s_jsDirUrl must end with a url slash ('/'). Currently '" + s_jsDirUrl + "'.");\r\n\t} \r\n\r\n\tsJSDIR = s_jsDirUrl;\r\n\tsSifCfgUrl = s_sifCfgUrl;\r\n\tbDbgJSLoads = (df(b_dbgJSLoads) && b_dbgJSLoads);\r\n\r\n\tif(df(sSifCfgUrl)) {\r\n\t\tloadJS(bLDD_STASIF, true, sJSDIR, "vf_stASIF.js");\r\n\r\n\t\t\r\n\t\t\r\n\t\tloadJS(false, true, "", sSifCfgUrl);\r\n\t}\r\n}\r\n\r\n\r\nvar bCVFLCalled = false; \r\n\r\n\r\nfunction completeVFLoad() {\r\n\tvar f = completeVFLoad;\r\n\tvar sF_XCMAX = "completeVFLoad (XCMAX): ";\r\n\tciNotLoaded(sF_XCMAX, undefined);\r\n\tif(bCVFLCalled) { \r\n\t\tcrsh("vf.cvfl1", f, sF_XCMAX + "This function was already called.");\r\n\t\tbCVFLCalled = true; \r\n\t} \r\n\tif(aVfbc.length == 0) {\r\n\t\tcrsh("vf.cvfl2", f, sF_XCMAX + "Must call configVF().");\r\n\t} \r\n\r\n\t\r\n\r\n\tif(!df(aVfbc[0].sFrmNm) && aVfbc.length > 1) { \r\n\t\tcrsh("vf.cvf3", f, sF_XCMAX + "aVfbc.length is greater than one (" + aVfbc.length + "), but aVfbc[0].sFrmNm is.[undefined].");\r\n\t} \r\n\r\n\tfor(var i = 0; i < aVfbc.length; i++) {\r\n\t\tvar sFnm = aVfbc[i].sFrmNm;\r\n\r\n\t\tfor(var j = (i + 1); j < aVfbc.length; j++) { \r\n\t\t\tif(sFnm == aVfbc[j].sFrmNm) { \r\n\t\t\t\tcrsh("vf.cvfl4", f, sF_XCMAX + ": configVF was called twice for the form named '" + sFnm + "'. [i=" + i + ", j=" + j + "]");\r\n\t\t\t} \r\n\t\t} \r\n\r\n\t\tif(aVfbc.length > 1 || df(aVfbc[0].sFnm)) { \r\n\t\t\t\r\n\r\n\t\t\tif(!df(sFnm)) { \r\n\t\t\t\tcrsh("vf.cvfl5", f, sF_XCMAX + "configVF was called multiple times, but call number " + (i + 1) + ", has a form name of [undefined]. [undefined] is a legal form name only when configVF is called a single time.");\r\n\t\t\t} \r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\tif(eval("!df(document." + sFnm + ")")) { \r\n\t\t\t\t\tcrsh("vf.cvfl6", f, sF_XCMAX + ": configVF was called for a form named '" + sFnm + "', but no form having that name exists.");\r\n\t\t\t\t} \r\n\r\n\t\t\t\tif(sFnm.substring(0, sFRM_NM_VFPD.length) == sFRM_NM_VFPD) {\r\n\t\t\t\t\tcrsh("vf.cvfl7", f, sF_XCMAX + "configVF was called for a form named '" + sFnm + "'. No form name may start '" + sFRM_NM_VFPD + "'.");\r\n\t\t\t\t} \r\n\t\t} \r\n\t}\r\n\r\n\tcommitVFPDValues();\r\n}\r\n\r\n\r\nfunction configVF(sb_cibcOnOff, i_dfltDbgPerScr, s_formName) {\r\n\tif(!bLVFCalled) { \r\n\t\tcrsh("vf.cvf1", configVF, "configVF (XCMAX): Must call loadVF() first.");\r\n\t} \r\n\r\n\t\r\n\tvar vfbc = new VFBCfg(sb_cibcOnOff, i_dfltDbgPerScr, s_formName);\r\n\taVfbc[aVfbc.length] = vfbc;\r\n\r\n\tbVFPDInUrl = (window.location.search.indexOf(sURLP_VFPD) != -1);\r\n\r\n\tif(i_dfltDbgPerScr != -1) {\r\n\t\t\r\n\t\tloadDBG();\r\n\t}\r\n\r\n\tloadCIBC(vfbc.isCIBCOn());\r\n}\r\n\r\nfunction loadObjDgnstcs() {\r\n\tloadJS(bLDD_OD, true, sJSDIR, "vf_obj_dgnstcs.js");\r\n}\r\n\r\nfunction loadCrashIf() {\r\n\tloadJS(bLDD_CI, true, sJSDIR, "crash_if.js");\r\n}\r\n\r\nfunction loadCIBC(b_doLoad) {\r\n\t\r\n\tif(b_doLoad || window.location.search.indexOf(sURLP_CIBC) != -1) {\r\n\t\tloadJS(bLDD_CIBC, true, sJSDIR, "vf_cibVFCfg.js");\r\n\t\tloadObjDgnstcs();\r\n\t\tloadCrashIf();\r\n\t}\r\n}\r\n\r\n\r\nfunction configVFPD(sb_on, sb_cibcOnOff, sb_onLink, sb_offLink, sb_resetLink, sb_successDDB, sb_cibcSection, sb_cibcCrshDdb, ai_dbgPerScrDDB, as_tstVFuncPosts, s_formName) {\r\n\tvar vfbc = gtVfbc(configVFPD, "configVFPD", s_formName);\r\n\tvfbc.stVfpdc(sb_on, sb_cibcOnOff, sb_onLink, sb_offLink, sb_resetLink, sb_successDDB, sb_cibcSection, sb_cibcCrshDdb, ai_dbgPerScrDDB, as_tstVFuncPosts, s_formName);\r\n\r\n\tloadVFPD(vfbc.isVfpdOn());\r\n\r\n\tif(vfbc.isVfpdOn() && vfbc.bDCIBCOnOff) {\r\n\t\tloadCIBC(true);\r\n\t}\r\n}\r\n\r\nfunction gtSB(s_callingFunc, s_sbName, string_boolean, s_true, s_false) {\r\n\tciMissing(gtSB, s_callingFunc, s_sbName, string_boolean); \r\n\r\n\tif(string_boolean == s_true) {\r\n\t\treturn true;\r\n\t} else if(string_boolean == s_false) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tcrsh("vf.gsb1", gtSB, s_callingFunc + " (XCMAX): The string_boolean parameter " + s_sbName + " must equal either s_true ([" + s_true + "]), or s_false ([" + s_false + "]).");\r\n}\r\n\r\n\r\n\r\n\r\nfunction getFormErrorMsgs(f_orm, s_userErrPre, b_crshAlert, b_crshDgnstcs, b_crshThrow) {\r\n\tvar sF_XCMAX = "getFormErrorMsgs (XCMAX)";\r\n\tvar f = getFormErrorMsgs;\r\n\r\n\t\r\n\t\r\n\t\r\n\tcommitVFPDValues();\r\n\r\n\tif(getFormErrorMsgs.arguments.length > 2) { \r\n\t\tcrsh("vf.gfem1", f, sF_XCMAX + ": " + getFormErrorMsgs.arguments.length + " parameters have been provided to this function, but only two are expected.");\r\n\t} \r\n\r\n\tciMissing(getFormErrorMsgs, sF_XCMAX, "f_orm", f_orm);\r\n\tciMissing(getFormErrorMsgs, sF_XCMAX, "s_userErrPre", s_userErrPre);\r\n\r\n\tif(!df(f_orm.name) || f_orm.name == "") {\r\n\t\tcrsh("vf.gfem1", f, sF_XCMAX + ": f_orm.name is undefined or zero characters in length.");\r\n\t}\r\n\r\n\tif(aVfbc.length == 0) {\r\n\t\tcrsh("vf.gfem2", f, sF_XCMAX + ": Must call configVF() first.");\r\n\t}\r\n\r\n\tvar vfbc = gtVfbc(getFormErrorMsgs, "getFormErrorMsgs", f_orm.name);\r\n\r\n\t\r\n\tbCRSH_ALRT = df(b_crshAlert)? b_crshAlert : vfbc.bCrshAlrt;\r\n\tbCRSH_DGNSTCS = df(b_crshDgnstcs)? b_crshDgnstcs : vfbc.bCrshDgnstcs;\r\n\tbCRSH_THROW = df(b_crshThrow)? b_crshThrow : vfbc.bCrshThrow;\r\n\r\n\tciNotLoaded(sF_XCMAX, vfbc);\r\n\r\n\t\r\n\tvar aFLS4Frm = gtAFLSvf(vfbc.sFrmNm);\r\n\r\n\t\r\n\t\r\n\tvar bCIBC = false;\r\n\r\n\tif(!df(aFLS4Frm)) {\r\n\t\t\r\n\r\n\t\t\r\n\t\tbCIBC = true;\r\n\r\n\t\t\r\n\t\tvar aFLS = gtAFLS(f_orm);\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\taFLS4Frm = aFLS;\r\n\r\n\t\t\r\n\t}\r\n\r\n\tif(bLDD_DBG) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tdbgVF(aFLS4Frm, vfbc.iDDPS, false);\r\n\t}\r\n\r\n\r\n\t\r\n\t\r\n\t\r\n\tif(bLDD_CIBC && bCIBC && vfbc.isCIBCOn()) {\r\n\t\tcibVFCfg(aFLS4Frm);\r\n\t}\r\n\r\n\t\r\n\treturn (gtUsrErrCnt(aFLS4Frm) > 0)\r\n\t\t? gtAFLSUsrErrs(aFLS4Frm, "", s_userErrPre, "")\r\n\t\t: "";\r\n}\r\n\r\n\r\nfunction loadVFPD(b_on) {\r\n\tloadJS(bLDD_VFPD, b_on, sJSDIR, "vf_perm_diagnostics.js");\r\n}\r\n\r\n\r\nfunction loadDBG() {\r\n\tloadJS(bLDD_DBG, true, sJSDIR, "vf_dbgVF.js");\r\n\tloadObjDgnstcs();\r\n\tloadCrashIf();\r\n}\r\n\r\n\r\nfunction loadJS(b_alreadyLoaded, b_doLoad, s_dir, s_jsFile) {\r\n\tif(b_alreadyLoaded || !b_doLoad) {\r\n\t\t\r\n\t\treturn;\r\n\t}\r\n\r\n\t\r\n\r\n\tvar sLoad = '[vfpd on]
');\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n\r\nfunction commitVFPDValues() {\r\n\tif(bLDD_VFPD) {\r\n\t\tupdateVFPDCRaw();\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction stAFLSvf(a_flStats, s_formName) {\r\n\tvar vfbc = gtVfbc(stAFLSvf, "stAFLSvf", s_formName);\r\n\tvfbc.aFLStats = a_flStats;\r\n}\r\n\r\n\r\nfunction gtAFLSvf(s_formName) {\r\n\treturn gtVfbc(gtAFLSvf, "gtAFLSvf", s_formName).aFLStats;\r\n}\r\n\r\n\r\n\r\nfunction gtDUrl(b_vfpdP, b_cibcP, b_resetLink) {\r\n\tvar url = window.location;\r\n\tvar sq = url.search;\r\n\r\n\tsq = addDelUrlP(sq, b_vfpdP, sURLP_VFPD);\r\n\tsq = addDelUrlP(sq, b_cibcP, sURLP_CIBC);\r\n\r\n\tif(b_resetLink) {\r\n\t\t\r\n\t\t\r\n\r\n\t\t\r\n\t\tvar sRND_PRE = "vfrndp_";\r\n\t\tvar iPOST_LEN = 4;\r\n\r\n\t\tvar iIdxPrevRnd = sq.indexOf(sRND_PRE);\r\n\t\tif(iIdxPrevRnd != -1) {\r\n\t\t\tsq = addDelUrlP(sq, false, sq.substring(iIdxPrevRnd, iIdxPrevRnd + sRND_PRE.length + iPOST_LEN));\r\n\t\t}\r\n\r\n\t\t\r\n\t\tvar sRnd = ((new Date()).getTime() + "");\r\n\t\tsRnd = sRnd.substring((sRnd.length - iPOST_LEN), sRnd.length);\r\n\t\tsq = addDelUrlP(sq, true, sRND_PRE + sRnd);\r\n\t}\r\n\r\n\t\r\n\t\r\n\treturn url.protocol + "/" + "/" + url.host + url.pathname + sq;\r\n}\r\n\r\n\r\n\r\nfunction doSubmitOnSuccess(f_orm) {\r\n\tciMissing(doSubmitOnSuccess, "doSubmitOnSuccess (XCMAX)", "f_orm", f_orm);\r\n\treturn gtVfbc(doSubmitOnSuccess, "doSubmitOnSuccess", f_orm.name).bSbmtOnSuccess;\r\n}\r\n\r\n\r\n\r\nfunction VFBCfg(sb_cibcOnOff, i_dfltDbgPerScr, s_formName) {\r\n\tvar sF = "VFBCfg";\r\n\tvar sF_XCMAX = sF + " (XCMAX)";\r\n\tciMissing(VFBCfg, sF_XCMAX, "sb_cibcOnOff", sb_cibcOnOff);\r\n\tciMissing(VFBCfg, sF_XCMAX, "i_dfltDbgPerScr", i_dfltDbgPerScr);\r\n\r\n\tthis.bCIBCOnOff = gtSB(sF, "sb_cibcOnOff", sb_cibcOnOff, "CIBC_ON", "CIBC_OFF");;\r\n\tthis.iDfltDPS = i_dfltDbgPerScr;\r\n\r\n\t\r\n\t\r\n\tthis.sFrmNm = s_formName;\r\n\r\n\t\r\n\t\tthis.stVfpdc = pb_stVfpdc;\r\n\r\n\t\t\r\n\t\t\tthis.bDOnDflt;\r\n\t\t\tthis.bDCIBCOnOff = false;\r\n\t\t\tthis.bOnLnk = false;\r\n\t\t\tthis.bOffLnk = false;\r\n\t\t\tthis.bResetLnk = false;\r\n\t\t\tthis.bSuccessDDB = false;\r\n\t\t\tthis.bCIBCSctn = false;\r\n\t\t\tthis.bCIBCCrshDdb = false;\r\n\t\t\tthis.asTstngVFuncPost;\r\n\t\t\tthis.aiDPSddb;\r\n\r\n\t\t\r\n\t\t\tthis.bDOn;\r\n\t\t\tthis.bCIBCDoCrsh;\r\n\t\t\tthis.bSbmtOnSuccess;\r\n\t\t\tthis.iDDPS;\r\n\t\t\tthis.bCrshAlrt;\r\n\t\t\tthis.bCrshDgnstcs;\r\n\t\t\tthis.bCrshThrow;\r\n\t\t\tthis.bOrigCrshAlrt = bCRSH_ALRT;\r\n\t\t\tthis.bOrigCrshDgnstcs = bCRSH_DGNSTCS;\r\n\t\t\tthis.bOrigCrshThrow = bCRSH_THROW;\r\n\r\n\t\tthis.turnDOnOff = pb_turnDOnOff;\r\n\t\tthis.isCIBCOn = pb_isCIBCOn;\r\n\t\tthis.isVfpdOn = pb_isVfpdOn;\r\n\r\n\t\tthis.turnDOnOff(false);\r\n}\r\n\r\n\r\nfunction pb_turnDOnOff(b_onOff) {\r\n\tthis.bCIBCDoCrsh = false;\r\n\r\n\t\r\n\t\r\n\tthis.bSbmtOnSuccess = !b_onOff;\r\n\tthis.iDDPS = this.iDfltDPS;\r\n\tthis.bDOn = b_onOff;\r\n\r\n\tif(b_onOff && this.bCIBCCrshDdb) {\r\n\t\tthis.bCrshAlrt = true;\r\n\t\tthis.bCrshDgnstcs = false;\r\n\t\tthis.bCrshThrow = false;\r\n\t} else {\r\n\t\tthis.bCrshAlrt = this.bOrigCrshAlrt;\r\n\t\tthis.bCrshDgnstcs = this.bOrigCrshDgnstcs;\r\n\t\tthis.bCrshThrow = this.bOrigCrshThrow;\r\n\t}\r\n}\r\n\r\nfunction pb_isCIBCOn() {\r\n\tvar b = ((!this.bDOn && this.bCIBCOnOff) ||\r\n\t\t(this.bDOn && this.bCIBCSctn && this.bCIBCDoCrsh));\r\n\r\n\tif(!df(b)) {\r\n\t\tcrsh("vf.vfbc.icibco1", this.isCIBCOn, "isCIBCOn (XCMAX sanity check): b is undefined?! [this.bDOn=" + this.bDOn + ", this.bCIBCOnOff=" + this.bCIBCOnOff + ", this.bCIBCDoCrsh=" + this.bCIBCDoCrsh + "]");\r\n\t}\r\n\r\n\treturn b;\r\n}\r\n\r\n\r\n\r\nfunction pb_isVfpdOn() {\r\n\treturn (df(this.bDOnDflt) && this.bDOnDflt != bVFPDInUrl);\r\n}\r\n\r\n\r\nfunction pb_stVfpdc(sb_on, sb_cibcOnOff, sb_onLink, sb_offLink, sb_resetLink, sb_successDDB, sb_cibcSection, sb_cibcCrshDdb, ai_dbgPerScrDDB, as_tstVFuncPosts, s_formName) {\r\n\tvar sF = "configVFPD";\r\n\r\n\tif(df(this.bDOnDflt)) { \r\n\t\tcrsh("vfbc.svfpdc1", this.stVfpdc, sF + " (XCMAX): Already called " + sF + "() for s_formName ('" + s_formName + "').");\r\n\t} \r\n\r\n\tthis.aFLStats;\r\n\tthis.bDOnDflt = gtSB(sF, "sb_on", sb_on, "ON", "OFF");\r\n\tthis.bDCIBCOnOff = gtSB(sF, "sb_cibcOnOff", sb_cibcOnOff, "CIBC_ON", "CIBC_OFF");\r\n\tthis.bOnLnk = gtSB(sF, "sb_onLink", sb_onLink, "ON_LNK", "NO_ON_LNK");\r\n\tthis.bOffLnk = gtSB(sF, "sb_offLink", sb_offLink, "OFF_LNK", "NO_OFF_LNK");\r\n\tthis.bResetLnk = gtSB(sF, "sb_resetLink", sb_resetLink, "RESET_LNK", "NO_RESET_LNK");\r\n\tthis.bSuccessDDB = gtSB(sF, "sb_successDDB", sb_successDDB, "SUCCESS_DDB", "NO_SUCCESS_DDB");\r\n\tthis.bCIBCSctn = gtSB(sF, "sb_cibcSection", sb_cibcSection, "CIBC_SCTN", "NO_CIBC_SCTN");\r\n\tthis.bCIBCCrshDdb = gtSB(sF, "sb_cibcCrshDdb", sb_cibcCrshDdb, "CIBC_CRSH_DDB", "NO_CIBC_CRSH_DDB");\r\n\r\n\tif(df(as_tstVFuncPosts)) { \r\n\t\tcibRA(sF + " (XCMAX)", "as_tstVFuncPosts", as_tstVFuncPosts);\r\n\t\tfor(var i = 0; i < as_tstVFuncPosts.length; i++) { \r\n\t\t\tfor(var j = (i + 1); j < as_tstVFuncPosts.length; j++) { \r\n\t\t\t\tif(as_tstVFuncPosts[i] == as_tstVFuncPosts[j] && \r\n\t\t\t\t \tas_tstVFuncPosts[i] != sDDB_DIVIDER && \r\n\t\t\t\t \tas_tstVFuncPosts[j] != sDDB_DIVIDER) { \r\n\t\t\t\t\tcrsh("vfbc.svfpdc2", this.stVfpdc, sF + " (XCMAX): as_tstVFuncPosts[" + i + "] and as_tstVFuncPosts[" + j + "] are the same: '" + as_tstVFuncPosts[i] + "'. Form name='" + this.sFrmNm + "'");\r\n\t\t\t\t} \r\n\t\t\t} \r\n\t\t} \r\n\t} \r\n\r\n\tif(df(ai_dbgPerScrDDB)) { \r\n\t\tcibRA(sF, "ai_dbgPerScrDDB", ai_dbgPerScrDDB); \r\n\t\tfor(var i = 0; i < ai_dbgPerScrDDB.length; i++) { \r\n\t\t\tif(!df(ai_dbgPerScrDDB) || !isNum(ai_dbgPerScrDDB[i], "false")) { \r\n\t\t\t\tcrsh("vfbc.svfpdc2", this.stVfpdc, sF_XCMAX + ": ai_dbgPerScrDDB[" + i + "] (" + ai_dbgPerScrDDB[i] + ") must be defined, and an integer.");\r\n\t\t\t} \r\n\t\t} \r\n\t} \r\n\r\n\tthis.asTstngVFuncPost = as_tstVFuncPosts;\r\n\tthis.aiDPSddb = ai_dbgPerScrDDB;\r\n\r\n\t\r\n\t\r\n\t\r\n\tthis.sFrmNm = s_formName;\r\n\r\n\tthis.turnDOnOff(this.bDOnDflt);\r\n}\r\n\r\nfunction gtVfbc(f_calling, s_callingFunc, s_formName) {\r\n\tif(!df(aVfbc[0].sFrmNm)) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn aVfbc[0];\r\n\t}\r\n\r\n\t\r\n\r\n\tvar sFrmNmLst = " Form names: ['";\r\n\tfor(var i = 0; i < aVfbc.length; i++) {\r\n\t\tif(i > 0) {\r\n\t\t\tsFrmNmLst += "', '";\r\n\t\t}\r\n\t\tsFrmNmLst += aVfbc[i].sFrmNm;\r\n\t\tif(s_formName == aVfbc[i].sFrmNm) {\r\n\t\t\treturn aVfbc[i];\r\n\t\t}\r\n\t}\r\n\tsFrmNmLst += "']";\r\n\r\n\tcrsh("vf.gc1", f_calling, s_callingFunc + " (XCMAX): No VFBCfg exists for a form named s_formName ('" + s_formName + "'). Must call loadVF(), configVF() and/or configVFPD() before calling this function. [aVfbc.length=" + aVfbc.length + "]" + sFrmNmLst);\r\n}\r\n\r\nfunction pb_setAFLS(a_flStats) {\r\n\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction wrt(s_tring) {\r\n\tdocument.writeln(s_tring);\r\n\treturn s_tring + '\n';\r\n}\r\n\r\nfunction wrtnl(s_tring) {\r\n\tdocument.write(s_tring);\r\n\treturn s_tring;\r\n}\r\n\r\n\r\nfunction df(v_ariable) {\r\n\treturn (v_ariable != undefined);\r\n}\r\n\r\n\r\n\r\nfunction addDelUrlP(s_urlq, b_pNeeded, s_urlp) {\r\n\tif(b_pNeeded == (s_urlq.indexOf(s_urlp) != -1)) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn s_urlq;\r\n\t}\r\n\r\n\t\r\n\r\n\tif(b_pNeeded) {\r\n\t\t\r\n\t\tif(s_urlq.length > 0) {\r\n\t\t\t\r\n\t\t\treturn s_urlq + "&" + s_urlp;\r\n\t\t} else {\r\n\t\t\treturn "?" + s_urlp;\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t\r\n\t\tvar iIdx = s_urlq.indexOf(s_urlp);\r\n\t\tvar iLen = s_urlp.length;\r\n\r\n\t\t\r\n\t\tif(s_urlq.substring((iIdx - 1), iIdx) == "&") {\r\n\t\t\tiIdx--;\r\n\t\t\tiLen++;\r\n\t\t}\r\n\r\n\t\tvar s = s_urlq.substring(0, iIdx) + s_urlq.substring((iIdx + iLen), s_urlq.length);\r\n\t\tif(s.substring(0, 2) == "?&") {\r\n\t\t\ts = "?" + s.substring(2, s.length);\r\n\t\t}\r\n\r\n\t\treturn (s == "?")\r\n\t\t\t? ""\r\n\t\t\t: s;\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\tvar sCNSTR_XCMAX = "SIFmt.constructor (XCMAX)";\r\n\r\n\r\n\r\nfunction SIFmt(s_msgTxtPostfix, si_rqdMin, si_rqdMax, si_altMin, si_altMax) {\r\n\tciMissing(SIFmt, sCNSTR_XCMAX, "s_msgTxtPostfix", s_msgTxtPostfix);\r\n\tciMissing(SIFmt, sCNSTR_XCMAX, "si_rqdMin", si_rqdMin);\r\n\tciMissing(SIFmt, sCNSTR_XCMAX, "si_rqdMax", si_rqdMax);\r\n\r\n\tif(s_msgTxtPostfix == 'Dec' || \r\n\t \ts_msgTxtPostfix == 'Email' || \r\n\t \ts_msgTxtPostfix == 'Int') { \r\n\t\tcrsh("snf.cnstr1", SIFmt, sCNSTR_XCMAX + ": s_msgTxtPostfix (currently '" + s_msgTxtPostfix + "') must not equal 'Dec', 'Email', or 'Int'.");\r\n\t} \r\n\r\n\t\r\n\tvar acLtrsDgtsUndrscr = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '_', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0']; \r\n\tfor(var i = 0; i < (s_msgTxtPostfix.length - 1); i++) { \r\n\t\tvar c = s_msgTxtPostfix.substring(i, (i + 1)).toLowerCase(); \r\n\t\tif(isInAscRA(c, acLtrsDgtsUndrscr)) { \r\n\t\t\tcontinue; \r\n\t\t} else { \r\n\t\t\tcrsh("snf.cnstr2", SIFmt, sCNSTR_XCMAX + ": s_msgTxtPostfix (currently '" + s_msgTxtPostfix + "') may not contain anything but letters, digits, and underscores. Character at index " + i + " ('" + c + "') is illegal.");\r\n\t\t} \r\n\t} \r\n\r\n\tif(df(si_altMin) ^ df(si_altMax)) { \r\n\t\t\r\n\t\tcrsh("snf.cnstr2", SIFmt, sCNSTR_XCMAX + ": si_altMin ('" + si_altMin + "') and si_altMax ('" + si_altMax + "') must both be either undefined or defined.");\r\n\t} \r\n\t\r\n\r\n\tcibLnRng(si_rqdMin, si_rqdMax, "si_rqdMin", "si_rqdMax", ""); \r\n\tcibLnRng(si_altMin, si_altMax, "si_altMin", "si_altMax", "When provided, ");\r\n\r\n\r\n\t\r\n\t\tthis.sMTPost = s_msgTxtPostfix;\r\n\t\tthis.siRqMn = si_rqdMin;\r\n\t\tthis.siRqMx = si_rqdMax;\r\n\t\tthis.siLtMn = si_altMin;\r\n\t\tthis.siLtMx = si_altMax;\r\n\r\n\t\tthis.gtFmtV = pb_gtFmtV;\r\n\t\tthis.isFmtEq = pb_isFmtEq;\r\n\r\n\t\tthis.type = "SIFmt";\r\n}\r\n\r\n\r\nfunction pb_isFmtEq(si_fmt) {\r\n\tciMissing(this.isFmtEq, "isFmtEq (XCMAX)", "si_fmt", si_fmt);\r\n\r\n\treturn (si_fmt.siRqMn == this.siRqMn &&\r\n\t \tsi_fmt.siRqMx == this.siRqMx &&\r\n\t \tsi_fmt.siLtMn == this.siLtMn &&\r\n\t \tsi_fmt.siLtMx == this.siLtMx);\r\n}\r\n\r\n\r\n\r\nfunction gtDgts(s_tring) {\r\n\tciMissing(gtDgts, "gtDgts (XCMAX)", "s_tring", s_tring);\r\n\r\n\tif(/^\D$/.test(s_tring)) {\r\n\t\t\r\n\t\treturn "";\r\n\t}\r\n\t\r\n\r\n\tvar asNumberParts = s_tring.split(/\D/);\r\n\r\n\tvar sNumber = asNumberParts[0];\r\n\tfor(var i = 1; i < asNumberParts.length; i++) {\r\n\t\tsNumber += asNumberParts[i];\r\n\t}\r\n\r\n\treturn sNumber;\r\n}\r\n\r\n\r\n\r\nfunction pb_gtFmtV(s_value) {\r\n\tciMissing(this.gtFmtV, "gtSIFromFormat (XCMAX)", "s_value", s_value);\r\n\r\n\t\r\n\tvar sDigits = gtDgts(s_value);\r\n\r\n\tvar siRqdPart;\r\n\tvar siAltPart;\r\n\tvar iStrippedLen = sDigits.length;\r\n\r\n\t\r\n\t\r\n\t\r\n\tif(iStrippedLen < this.siRqMn.length) {\r\n\t\t\r\n\t\treturn undefined;\r\n\r\n\t} \r\n\r\n\r\n\tif(iStrippedLen > this.siRqMn.length) {\r\n\t\t\r\n\t\t\r\n\r\n\t\tif(!df(this.siLtMn)) {\r\n\t\t\t\r\n\t\t\treturn undefined;\r\n\r\n\t\t} \r\n\r\n\t\tif(iStrippedLen !=\r\n\t\t \t(this.siRqMn.length + this.siLtMn.length)) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn undefined;\r\n\r\n\t\t} \r\n\t\t \r\n\r\n\t\tsiRqdPart = sDigits.substring(0, this.siRqMn.length);\r\n\t\tsiAltPart = sDigits.substring(this.siRqMn.length, iStrippedLen);\r\n\r\n\t} else { \r\n\t \r\n\t\tsiRqdPart = sDigits;\r\n\t\tsiAltPart = undefined;\r\n\t}\r\n\r\n\r\n\tif(!isInFrmtRng(siRqdPart, this.siRqMn, this.siRqMx)) {\r\n\t\t\r\n\t\treturn undefined;\r\n\r\n\t}\r\n\r\n\tif(df(siAltPart) &&\r\n\t \t!isInFrmtRng(siAltPart, this.siLtMn, this.siLtMx)) {\r\n\t\t\r\n\t\t\r\n\t\treturn undefined;\r\n\t}\r\n\r\n\t\r\n\treturn sDigits;\r\n}\r\n\r\nfunction isInFrmtRng(si_valuePart, si_frmtPartMin, si_frmtPartMax) {\r\n\tvar iValuePart = parseInt(si_valuePart, 10);\r\n\tvar iFPartMin = parseInt(si_frmtPartMin, 10);\r\n\tvar iFPartMax = parseInt(si_frmtPartMax, 10);\r\n\r\n\treturn (iValuePart >= iFPartMin &&\r\n\t iValuePart <= iFPartMax);\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction FLStats(frm_frmLmnt, fls_frm, a_prevFLS) {\r\n\tvar ffl = frm_frmLmnt;\r\n\tvar f = FLStats;\r\n\tvar sFLSC_XCMAX = "FLStats.constructor (XCMAX): ";\r\n\r\n\t\r\n\t\t\r\n\t\tciMissing(FLStats, sFLSC_XCMAX, "frm_frmLmnt", ffl);\r\n\r\n\t\t\r\n\t\t\t\r\n\t\t\tvar iFflTypeIdx = gtVRAIdx("fls.c0", ffl.type, asOBJ_TYPES);\r\n\t\t\tif(iFflTypeIdx == -1 &&\r\n\t\t\t \tdf(ffl.elements) &&\r\n\t\t\t \tdf(ffl.elements.length) &&\r\n\t\t \tdf(ffl.reset)) {\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t\t\t\t\r\n\t\t\t\tiFflTypeIdx = 0;\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\r\n\r\n\t\tif(df(fls_frm)) { \r\n\t\t if(iFflTypeIdx == 0) { \r\n\t\t\t\tcrsh("fls.c1", f, sFLSC_XCMAX + "fls_frm is provided, but frm_frmLmnt is also a 'form' object.");\r\n\t\t\t} \r\n\r\n\t\t\tciNotFLStats(sFLSC_XCMAX, "fls_frm", fls_frm);\r\n\t\t\tif(fls_frm.sType != "form") {\r\n\t\t\t\tcrsh("fls.c2", f, sFLSC_XCMAX + "fls_frm, when provided, must have an 'sType' equal to 'form'. Currently, fls_frm.sType='" + fls_frm.sType + "'.");\r\n\t\t\t} \r\n\t\t\r\n\t\t} else { \r\n\t\t\tif(df(a_prevFLS)) { \r\n\t\t\t\tcrsh("fls.c3", f, sFLSC_XCMAX + "When fls_frm is not provided, a_prevFLS must also be undefined. Currently, a_prevFLS=['" + a_prevFLS.join("', '") + "'].");\r\n\t\t\t} \r\n\r\n\t\t\tif(iFflTypeIdx != 0) { \r\n\t\t\t\tcrsh("fls.c4", f, sFLSC_XCMAX + "When fls_frm is not provided, frm_frmLmnt must be a form object. Currently, frm_frmLmnt.type=" + ffl.type + ", frm_frmLmnt.toString()=[" + ffl.toString() + "].");\r\n\t\t\t} \r\n\t\t} \r\n\r\n\r\n\t\tif(df(a_prevFLS)) { \r\n\t\t\tcibRA(sFLSC_XCMAX, "a_prevFLS", a_prevFLS);\r\n\t\t} \r\n\t\r\n\r\n\t\r\n\r\n\t\r\n\t\t\r\n\t\t\tthis.sNm;\r\n\t\t\tthis.sType;\r\n\t\t\tthis.obj;\r\n\t\t\tthis.sAftrFrmNm;\r\n\t\t\tthis.sAftrAttrNm;\r\n\t\t\tthis.iTotOpts;\r\n\t\t\tthis.flsFrm; \r\n\t\t\tthis.sUsrErr;\r\n\r\n\t\tthis.bUseThisFLS = false;\r\n\t\tthis.type = "FLStats";\r\n\r\n\t\tthis.useThisFLS = pb_useThisFLS;\r\n\t\tthis.gtCd4Attr = pb_gtCd4Attr;\r\n\t\tthis.gtCdAttrNm = pb_gtCdAttrNm;\r\n\t\tthis.gtCdFLSNm = pb_gtCdFLSNm;\r\n\t\tthis.gtAttrVRaw = pb_gtAttrVRaw;\r\n\t\tthis.gtEvlCdLmntAttrNm = pb_gtEvlCdLmntAttrNm;\r\n\t\tthis.gtEvlCdObjNm = pb_gtEvlCdObjNm;\r\n\t\tthis.gtEvalCode = pv_gtEvalCode;\r\n\t\tthis.isAttrAssc2Lmnt = pb_isAttrAssc2Lmnt;\r\n\t\tthis.gtAttrV = pb_gtAttrV;\r\n\t\tthis.isLmntVal1OrMore = pb_isLmntVal1OrMore;\r\n\t\tthis.gtLmntValSnglr = pb_gtLmntValSnglr;\r\n\t\tthis.gtLmntOptsTotal = pb_gtLmntOptsTotal;\r\n\t\tthis.gtLmntOptsChosen = pb_gtLmntOptsChosen;\r\n\t\tthis.ciFrm1OrMore = pv_ciFrm1OrMore; \r\n\t\tthis.gtFLS4Frm = pv_gtFLS4Frm;\r\n\t\tthis.gtLmntStats = pv_gtLmntStats;\r\n\t\tthis.unassociateFalseBS = pv_unassociateFalseBS;\r\n\t\r\n\r\n\tif(df(fls_frm)) {\r\n\t\t\r\n\t\t\r\n\t\tthis.flsFrm = fls_frm;\r\n\t}\r\n\r\n\t\r\n\tif(iFflTypeIdx == -1) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tthis.bUseThisFLS = false;\r\n\r\n\r\n\t\r\n\r\n\t} else if(!df(fls_frm)) {\r\n\t\t\r\n\t\tthis.gtFLS4Frm(ffl);\r\n\t\tthis.bUseThisFLS = true;\r\n\r\n\t} else {\r\n\t\t\r\n\t\tthis.bUseThisFLS = this.gtLmntStats(ffl, a_prevFLS);\r\n\t}\r\n\r\n\tif(!this.bUseThisFLS) {\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}\r\n\r\n\t\r\n\tif(!df(ffl.name) || \r\n\t \tffl.name == "") { \r\n\t\tcrsh("fls.c5", f, sFLSC_XCMAX + "frm_frmLmnt.name ([" + ffl.name + "]) must be defined, at least one character in length, and unique among all forms in this web page.");\r\n\t} \r\n\r\n\tthis.sNm = ffl.name;\r\n\r\n\tif(gtVRAIdx("fls.c6", this.sType, asOBJ_TYPES) == -1) {\r\n\t\tcrsh("fls.c7", f, sFLSC_XCMAX + "this.sType ('" + this.sType + "') is not one of these valid types: '" + asOBJ_TYPES.join("', '") + "'.");\r\n\t}\r\n\r\n\tif(df(this.iTotOpts) && \r\n\t \tthis.iTotOpts < 2) { \r\n\t\tcrsh("fls.c1", f, sFLSC_XCMAX + " (this.sNm='" + this.sNm + "'): This element is a multiple-value element, but there are less than two options?! One checkbox checkbox sets should be considered singular.\n\n" + sXCMAX);\r\n\t} \r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\tthis.unassociateFalseBS(7);\r\n\t\r\n\tthis.unassociateFalseBS(10);\r\n\t\r\n\tthis.unassociateFalseBS(11);\r\n\t\r\n\tthis.unassociateFalseBS(12);\r\n}\r\n\r\n\r\n\r\n\r\nfunction gtAFLSUsrErrs(a_flStats, s_header, s_linePre, s_footer) {\r\n\tvar sF_XCMAX = "gtAFLSUsrErrs (XCMAX)";\r\n\tcibAFLS(sF_XCMAX, "a_flStats", a_flStats);\r\n\tciMissing(gtAFLSUsrErrs, sF_XCMAX, "s_header", s_header);\r\n\tciMissing(gtAFLSUsrErrs, sF_XCMAX, "s_linePre", s_linePre);\r\n\tciMissing(gtAFLSUsrErrs, sF_XCMAX, "s_footer", s_footer);\r\n\r\n\tvar sErrors = "";\r\n\tfor(var i = 0; i < a_flStats.length; i++) {\r\n\t\tif(df(a_flStats[i].sUsrErr)) {\r\n\t\t\tsErrors += s_linePre + a_flStats[i].sUsrErr;\r\n\r\n\t\t\tif(i < (a_flStats.length - 1)) {\r\n\t\t\t\tsErrors += "\n";\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif(sErrors == "") { \r\n\t\tcrsh("os.guefaos1", gtAFLSUsrErrs, sF_XCMAX + "No element in a_flStats has a defined value for sUsrErr.");\r\n\t} \r\n\r\n\treturn s_header + sErrors + s_footer;\r\n}\r\n\r\n\r\n\r\nfunction gtAFLS(f_orm) {\r\n\tciMissing(gtAFLS, "gtAFLS (XCMAX)", "f_orm", f_orm);\r\n\r\n\tvar aFLStats = new Array(1);\r\n\r\n\taFLStats[0] = new FLStats(f_orm);\r\n\r\n\t\r\n\tfor(var i = 0; i < f_orm.elements.length; i++) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tvar fls = new FLStats(f_orm[i], aFLStats[0], aFLStats);\r\n\t\tif(fls.useThisFLS()) {\r\n\t\t\taFLStats[aFLStats.length] = fls;\r\n\t\t}\r\n\t}\r\n\r\n\treturn aFLStats;\r\n}\r\n\r\n\r\nfunction pb_useThisFLS() {\r\n\tciMissing(this.useThisFLS, "useThisFLS (XCMAX) [This function may only be called once per object, after which time this.bUseThisFLS is undefined.]", "this.bUseThisFLS", this.bUseThisFLS);\r\n\r\n\tvar b = this.bUseThisFLS;\r\n\tthis.bUseThisFLS = undefined;\r\n\treturn b;\r\n}\r\n\r\n\r\n\r\nfunction pb_gtCd4Attr(s_attrNm) {\r\n\t\r\n\treturn this.gtCdAttrNm(s_attrNm) + " = " + gtCd4V(this.gtAttrV(s_attrNm)) + ";\n";\r\n}\r\n\r\n\r\nfunction pb_gtCdAttrNm(s_attrNm) {\r\n\tciMissing(this.gtCdAttrNm, "gtCdAttrNm (XCMAX)", "s_attrNm", s_attrNm);\r\n\r\n\tif(this.sType == "form") {\r\n\t\treturn this.sNm + "." + s_attrNm;\r\n\t} else {\r\n\t\treturn this.flsFrm.sNm + this.sAftrFrmNm + this.sNm + "." + s_attrNm + this.sAftrAttrNm;\r\n\t}\r\n}\r\n\r\n\r\nfunction pb_gtCdFLSNm() {\r\n\tif(this.sType == "form") {\r\n\t\treturn this.sNm;\r\n\t} else {\r\n\t\treturn this.flsFrm.sNm + this.sAftrFrmNm + this.sNm + this.sAftrAttrNm;\r\n\t}\r\n}\r\n\r\n\r\nfunction pb_gtAttrVRaw(s_attrNm) {\r\n\treturn eval(this.gtEvlCdLmntAttrNm(s_attrNm));\r\n}\r\n\r\n\r\nfunction pb_isAttrAssc2Lmnt(s_attrNm) {\r\n\treturn df(this.gtAttrVRaw(s_attrNm));\r\n}\r\n\r\n\r\nvar asSUB_RNG_ATTRS = ['dDecMin', 'dDecMax', 'iIntMin', 'iIntMax', 'iMinLength', 'iMaxLength', 'maxLength', 'iMCMin', 'iMCMax']; \r\n\r\n\r\n\r\nfunction pb_gtAttrV(s_attrNm) {\r\n\t\r\n\tif(gtVRAIdx("gtAttrV", s_attrNm, asVF_ATTRS) == -1 &&\r\n\t \tgtVRAIdx("gtAttrV", s_attrNm, asSUB_RNG_ATTRS) == -1) {\r\n\t\tcrsh("fls.gav1", this.gtAttrV, "gtAttrV (XCMAX): s_attrNm ('" + s_attrNm + "') is not a legal attribute. Must exist in either validate_form.asVF_ATTRS or fl_stats.asSUB_RNG_ATTRS.\n\n asVF_ATTRS=\n['" + asVF_ATTRS.join("', '") + "'])\n\nasSUB_RNG_ATTRS=\n(['" + asSUB_RNG_ATTRS.join("', '") + "'])");\r\n\t} \r\n\r\n\tif(!this.isAttrAssc2Lmnt(s_attrNm)) { \r\n\t\tcrsh("fls.gav2", this.gtAttrV, "gtAttrV (XCMAX): isAttrAssc2Lmnt(s_attrNm) equals false. s_attrNm='" + s_attrNm + "', this.sNm='" + this.sNm + "', this.sType='" + this.sType + "'.");\r\n\t} \r\n\r\n\treturn this.gtAttrVRaw(s_attrNm);\r\n}\r\n\r\n\r\nfunction pb_isLmntVal1OrMore() {\r\n\treturn (!df(this.iTotOpts));\r\n}\r\n\r\n\r\nfunction pb_gtLmntValSnglr() {\r\n\tthis.ciFrm1OrMore("gtLmntValSnglr", false);\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\r\n\tvar vValSnglr;\r\n\tif(this.sType == "select-one" &&\r\n\t\t\tthis.obj.selectedIndex != -1) {\r\n\t\tvValSnglr = this.obj.options[this.obj.selectedIndex].value;\r\n\r\n\t} else if(this.sType == "radio") {\r\n\t\tvar rdo = eval(this.gtEvlCdObjNm());\r\n\r\n\t\tfor(var i = 0; i < rdo.length; i++) {\r\n\t\t\tif(rdo[i].checked) {\r\n\t\t\t\tvValSnglr = rdo[i].value;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t} else if(this.sType == "checkbox") {\r\n\t\t\r\n\t\tif(this.checked) {\r\n\t\t\tvValSnglr = this.obj.value;\r\n\t\t}\r\n\r\n\t} else {\r\n\t\tvValSnglr = this.obj.value;\r\n\t}\r\n\r\n\treturn (vValSnglr == "")\r\n\t\t? undefined\r\n\t\t: vValSnglr;\r\n}\r\n\r\n\r\nfunction pb_gtLmntOptsTotal() {\r\n\tthis.ciFrm1OrMore("gtLmntOptsTotal", true);\r\n\treturn this.iTotOpts;\r\n}\r\n\r\n\r\nfunction pb_gtLmntOptsChosen() {\r\n\tthis.ciFrm1OrMore("gtLmntOptsChosen", true);\r\n\r\n\tvar iOptsChosen = 0;\r\n\r\n\tif(this.sType == "checkbox" &&\r\n\t \tthis.flsFrm.obj.elements[this.sNm].length > 1) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tfor(var i = 0; i < this.iTotOpts; i++) {\r\n\t\t\tif(this.flsFrm.obj.elements[this.sNm][i].checked) {\r\n\t\t\t\tiOptsChosen++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t} else\tif(this.sType == "select-multiple") {\r\n\t\tfor(var i = 0; i < this.iTotOpts; i++) {\r\n\t\t\tif(this.obj.options[i].selected) {\r\n\t\t\t\tiOptsChosen++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn iOptsChosen;\r\n}\r\n\r\nfunction pv_ciFrm1OrMore(s_callingFunc, b_1OrMore) {\r\n\tif(this.sType == "form" || \r\n\t \tthis.isLmntVal1OrMore() == b_1OrMore) { \r\n\t\tcrsh("fls.cif1om", ciFrm1OrMore, s_callingFunc + " (XCMAX) ('" + this.sNm + "'): sType may not equal 'form', and/or b_1OrMore=" + b_1OrMore + " must equal isLmntVal1OrMore() (" + isLmntVal1OrMore() + ").");\r\n\t} \r\n} \r\n\r\n\r\nfunction pv_gtFLS4Frm(f_orm) {\r\n\tthis.obj = f_orm;\r\n\tthis.sType = "form";\r\n\tthis.sAftrFrmNm = undefined;\r\n\tthis.sAftrAttrNm = undefined;\r\n\tthis.iTotOpts = undefined;\r\n\r\n\t\r\n\t\r\n\t\r\n\tvar bNameFound = false;\r\n\tfor(var i = 0; i < document.forms.length; i++) {\r\n\t\tif(!bNameFound) {\r\n\t\t\tif(document.forms[i].name == f_orm.name) {\r\n\t\t\t\t\r\n\t\t\t\tbNameFound = true;\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t} else if(document.forms[i].name == f_orm.name) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tcrsh("fls.gosff", this.gtFLS4Frm, "FLStats.constructor (XCMAX): The name of this form is '" + f_orm.name + "', but at least one other form on this page has that same name.");\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\nfunction pv_gtLmntStats(frm_lmnt, a_prevFLS) {\r\n\tthis.sType = frm_lmnt.type;\r\n\r\n\t\r\n\t\r\n\r\n\tthis.iTotOpts = undefined;\r\n\tif(this.sType == "checkbox" &&\r\n\t \tthis.flsFrm.obj.elements[frm_lmnt.name].length > 1) {\r\n\t\tthis.iTotOpts = this.flsFrm.obj.elements[frm_lmnt.name].length;\r\n\r\n\t} else\tif(this.sType == "select-multiple") {\r\n\t\tthis.iTotOpts = frm_lmnt.options.length;\r\n\t}\r\n\r\n\t\r\n\t\r\n\r\n\tif(this.sType == "radio" ||\r\n\t \t(df(this.iTotOpts) && this.sType == "checkbox")) {\r\n\t\tfor(var i = 0; i < a_prevFLS.length; i++) {\r\n\t\t\tif(a_prevFLS[i].sNm == frm_lmnt.name) {\r\n\t\t\t\t\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tif(this.sType == "radio" ||\r\n\t \tthis.sType == "checkbox") {\r\n\t\tthis.obj = this.flsFrm.obj[frm_lmnt.name];\r\n\t\tthis.sAftrFrmNm = "['";\r\n\t\tthis.sAftrAttrNm = "']";\r\n\r\n\t} else {\r\n\t\tthis.obj = frm_lmnt;\r\n\t\tthis.sAftrFrmNm = ".";\r\n\t\tthis.sAftrAttrNm = "";\r\n\t}\r\n\r\n\t\r\n\t\r\n\r\n\treturn true;\r\n}\r\n\r\n\r\nfunction pv_unassociateFalseBS(i_attrIdx) {\r\n\tvar sAttrNm = asVF_ATTRS[i_attrIdx];\r\n\tif(this.isAttrAssc2Lmnt(sAttrNm) &&\r\n\t \tthis.gtAttrV(sAttrNm) == "false") {\r\n\t\teval(this.gtEvlCdLmntAttrNm(sAttrNm) + " = undefined;\n");\r\n\t}\r\n}\r\n\r\n\r\nfunction pb_gtEvlCdLmntAttrNm(s_attrNm) {\r\n\tciMissing(this.gtEvlCdLmntAttrNm, "gtEvlCdLmntAttrNm (XCMAX)", "s_attrNm", s_attrNm);\r\n\treturn this.gtEvalCode(s_attrNm);\r\n}\r\n\r\n\r\nfunction pb_gtEvlCdObjNm() {\r\n\treturn this.gtEvalCode(undefined);\r\n}\r\n\r\n\r\n\r\nfunction pv_gtEvalCode(s_attrNm) {\r\n\tvar sAttrCd;\r\n\tif(!df(s_attrNm)) {\r\n\t\tsAttrCd = "";\r\n\t} else {\r\n\t\tsAttrCd = "." + s_attrNm;\r\n\t}\r\n\r\n\tif(this.sType == "form") {\r\n\t\t\r\n\t\t\r\n\t\treturn "document." + this.sNm + sAttrCd;\r\n\r\n\t} else {\r\n\t\t\r\n\t\t\r\n\t\treturn "document." + this.flsFrm.sNm + this.sAftrFrmNm + this.sNm + sAttrCd + this.sAftrAttrNm;\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\r\n\r\n\r\n\t\r\n\t\tvar cSS_DELIM = "\~";\r\n\t\tvar sSS_CURRLEN = 'CURRLEN';\r\n\t\tvar sSS_BOUND_MIN = 'RANGE_MIN';\r\n\t\tvar sSS_BOUND_MAX = 'RANGE_MAX';\r\n\t\tvar sSS_BSS_LIST = 'BSS_LIST';\r\n\t\tvar sSS_BSS_FOUND = 'BSS_FOUND';\r\n\t\tvar sSS_OPTS_TOT = 'OPTS_TOTAL';\r\n\t\tvar sSS_OPTS_CHSN = 'OPTS_CHOSEN';\r\n\r\n\t\tvar aFLStats = undefined;\r\n\t\r\n\r\n\t\r\n\t\r\n\tbLDD_GUEC = true;\r\n\r\n\r\nfunction gtUsrErrCnt(a_flStats) {\r\n\r\n\t\r\n\tvar iTotalErrors = 0;\r\n\r\n\t\r\n\tfor(var i = 1; i < a_flStats.length; i++) {\r\n\t\tvar fls = a_flStats[i];\r\n\r\n\t\t\r\n\t\tfls.sUsrErr = undefined;\r\n\r\n\r\n\t\tvar bTxtPwd = (fls.sType == "text" ||\r\n\t\t\tfls.sType == "password");\r\n\t\tvar bString = (bTxtPwd || fls.sType == "textarea");\r\n\r\n\r\n\t\tif(bString) {\r\n\t\t\t\r\n\t\t\ttrimStringLmnt(fls);\r\n\t\t}\r\n\r\n\r\n\t\t\r\n\t\t\tvar iOptsChosen;\r\n\t\t\tvar vValSnglr;\r\n\t\t\tif(fls.isLmntVal1OrMore()) {\r\n\t\t\t\tvValSnglr = fls.gtLmntValSnglr();\r\n\t\t\t} else {\r\n\t\t\t\tiOptsChosen = fls.gtLmntOptsChosen();\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\r\n\t\tif(hasRequiredError(fls, iOptsChosen, vValSnglr)) {\r\n\t\t\t\r\n\t\t\tiTotalErrors++;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tif((!df(vValSnglr) && !df(iOptsChosen)) ||\r\n\t\t \t(df(iOptsChosen) && iOptsChosen == 0)) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(bString && hasStrLnError(fls, vValSnglr)) {\r\n\t\t\tiTotalErrors++;\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\r\n\t\tif(bTxtPwd) {\r\n\t\t\tif(hasTxtPwdError(fls, vValSnglr)) {\r\n\t\t\t\tiTotalErrors++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\r\n\t\t\t\r\n\r\n\t\t} else if(fls.sType == "checkbox" || fls.sType == "select-multiple") {\r\n\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(hasChkSlmError(fls, iOptsChosen, vValSnglr)) {\r\n\t\t\t\tiTotalErrors++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif(bString) {\r\n\t\t\tif(hasBSSError(fls, vValSnglr)) {\r\n\t\t\t\tiTotalErrors++;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn iTotalErrors;\r\n}\r\n\r\n\r\n\r\nfunction initVF() {\r\n\tfor(var i = 0; i < aVfbc.length; i++) {\r\n\t\tstAFLSvf(undefined, aVfbc[i].sFrmNm)\r\n\t}\r\n\r\n\t\r\n\t\tbCrshd = false;\r\n\t\tsCrshCd = undefined;\r\n\t\tsCrshMsg = undefined;\r\n\t\tfCrsh = undefined;\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\r\n\r\n\t\r\n\t\tvar cotFrm = new CmptblOTA(true, "form");\r\n\t\tvar cotTxt = new CmptblOTA(true, "text");\r\n\t\tvar cotPwd = new CmptblOTA(true, "password");\r\n\t\tvar cotTxa = new CmptblOTA(true, "textarea");\r\n\t\tvar cotRdo = new CmptblOTA(true, "radio");\r\n\t\tvar cotSl1 = new CmptblOTA(true, "select-one");\r\n\t\tvar cotChk = new CmptblOTA(true, "checkbox");\r\n\t\tvar cotSlm = new CmptblOTA(true, "select-multiple");\r\n\r\n\t\tvar asOBJ_TYPES = ["form", "text", "password", "textarea", "radio", "select-one", "checkbox", "select-multiple"];\r\n\t\tvar aCMPTBL_OBJ_TYPES = [cotFrm, cotTxt, cotPwd, cotTxa, cotRdo, cotSl1, cotChk, cotSlm];\r\n\t\r\n\t\r\n\t\tvar ca_sMr = new CmptblOTA(false, "sMsgRequired");\r\n\t\tvar ca_sMtd = new CmptblOTA(false, "sMsgTxtDec");\r\n\t\tvar ca_sMte = new CmptblOTA(false, "sMsgTxtEmail");\r\n\t\tvar ca_sMti = new CmptblOTA(false, "sMsgTxtInt");\r\n\t\tvar ca_sMbl = new CmptblOTA(false, "sMsgBadLength");\r\n\t\tvar ca_sMmcr = new CmptblOTA(false, "sMsgMCRange");\r\n\t\tvar ca_asGbss = new CmptblOTA(false, "asGlobalBadSubStrs");\r\n\t\tvar ca_bsNbss = new CmptblOTA(false, "bsNoBadSubStrs");\r\n\t\tvar ca_asBss = new CmptblOTA(false, "asBadSubStrs");\r\n\t\tvar ca_sMbss = new CmptblOTA(false, "sMsgBadSubStr");\r\n\t\tvar ca_bsGts = new CmptblOTA(false, "bsGlobalTrimSpaces");\r\n\t\tvar ca_bsDts = new CmptblOTA(false, "bsDontTrimSpaces");\r\n\t\tvar ca_bsTs = new CmptblOTA(false, "bsTrimSpaces");\r\n\r\n\t\tvar aCMPTBL_ATTRS = [ca_sMr, ca_sMtd, ca_sMte, ca_sMti, ca_sMbl, ca_sMmcr, ca_asGbss, ca_bsNbss, ca_asBss, ca_sMbss, ca_bsGts, ca_bsDts, ca_bsTs];\r\n\t\tvar asVF_ATTRS = \r\n\t\t\t[ca_sMr.sNm, \r\n\t\t\t ca_sMtd.sNm, \r\n\t\t\t ca_sMte.sNm, \r\n\t\t\t ca_sMti.sNm, \r\n\t\t\t ca_sMbl.sNm, \r\n\t\t\t ca_sMmcr.sNm, \r\n\t\t\t ca_asGbss.sNm, \r\n\t\t\t ca_bsNbss.sNm, \r\n\t\t\t ca_asBss.sNm, \r\n\t\t\t ca_sMbss.sNm, \r\n\t\t\t ca_bsGts.sNm, \r\n\t\t\t ca_bsDts.sNm, \r\n\t\t\t ca_bsTs.sNm]; \r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\r\n\t\r\n\t\t\r\n\t\tvar ca4TxtPwd = [ca_sMr, ca_sMtd, ca_sMte, ca_sMti, ca_sMbl, ca_bsNbss, ca_asBss, ca_sMbss, ca_bsDts, ca_bsTs];\r\n\t\tvar ca4ChkSlm = [ca_sMr, ca_sMmcr];\r\n\r\n\t\tcotFrm.addGdAtts4OT([ca_bsGts, ca_asGbss]);\r\n\r\n\t\tcotTxt.addGdAtts4OT(ca4TxtPwd); \r\n\t\tcotPwd.addGdAtts4OT(ca4TxtPwd); \r\n\r\n\t\tcotTxa.addGdAtts4OT([ca_sMr, ca_sMbl, ca_bsNbss, ca_asBss, ca_sMbss, ca_bsDts, ca_bsTs]);\r\n\t\tcotRdo.addGdAtts4OT([ca_sMr]);\r\n\t\tcotSl1.addGdAtts4OT([ca_sMr]);\r\n\t\tcotChk.addGdAtts4OT(ca4ChkSlm);\r\n\t\tcotSlm.addGdAtts4OT(ca4ChkSlm);\r\n\r\n\t\r\n\t\r\n\t\tvar acotTxtPwd = [cotTxt, cotPwd];\r\n\t\tvar acotStrings = [cotTxt, cotPwd, cotTxa];\r\n\r\n\t\tca_sMr.stGoodOTs4Attr([cotTxt, cotPwd, cotTxa, cotRdo, cotSl1, cotChk, cotSlm]);\r\n\t\tca_sMtd.stGoodOTs4Attr(acotTxtPwd);\r\n\t\tca_sMte.stGoodOTs4Attr(acotTxtPwd);\r\n\t\tca_sMti.stGoodOTs4Attr(acotTxtPwd);\r\n\t\tca_sMbl.stGoodOTs4Attr(acotStrings);\r\n\t\tca_asBss.stGoodOTs4Attr(acotStrings);\r\n\t\tca_sMbss.stGoodOTs4Attr(acotStrings);\r\n\t\tca_bsDts.stGoodOTs4Attr(acotStrings);\r\n\t\tca_bsTs.stGoodOTs4Attr(acotStrings);\r\n\t\tca_bsNbss.stGoodOTs4Attr(acotStrings);\r\n\t\tca_sMmcr.stGoodOTs4Attr([cotChk, cotSlm]);\r\n\t\tca_asGbss.stGoodOTs4Attr([cotFrm]);\r\n\t\tca_bsGts.stGoodOTs4Attr([cotFrm]);\r\n\r\n\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tca_sMtd.addBdAtts4Att([ca_sMte, ca_sMti]); \r\n\t\tca_sMte.addBdAtts4Att([ca_sMtd, ca_sMti]); \r\n\t\tca_sMti.addBdAtts4Att([ca_sMtd, ca_sMte, ca_sMbl]); \r\n\t\tca_sMbl.addBdAtts4Att([ca_sMti]); \r\n\t\t\r\n\t\t\r\n\t\tca_bsNbss.addBdAtts4Att([ca_asBss, ca_sMbss]);\r\n\t\tca_asBss.addBdAtts4Att([ca_bsNbss]);\r\n\t\tca_sMbss.addBdAtts4Att([ca_bsNbss]);\r\n\t\t\r\n\t\tca_bsTs.addBdAtts4Att([ca_bsDts]); \r\n\t\tca_bsDts.addBdAtts4Att([ca_bsTs]); \r\n\r\n\r\n\tfunction gtCOTA(a_cota, s_name) {\r\n\t\tfor(var i = 0; i < a_cota.length; i++) {\r\n\t\t\tif(s_name == a_cota[i].sNm) {\r\n\t\t\t\treturn a_cota[i];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\n\r\n\tfunction gtMsgSSBounds(s_message, i_min, i_max) {\r\n\t\tif(df(i_min)) {\r\n\t\t\ts_message = gtMsgRplcSpclStr(s_message, cSS_DELIM, sSS_BOUND_MIN, i_min);\r\n\t\t}\r\n\r\n\t\tif(df(i_max) && i_max != -1) {\r\n\t\t\t\r\n\t\t\ts_message = gtMsgRplcSpclStr(s_message, cSS_DELIM, sSS_BOUND_MAX, i_max);\r\n\t\t}\r\n\r\n\t\treturn s_message;\r\n\t}\r\n\r\n\tfunction gtMsgRplcSpclStr(s_message, c_delimiter, s_toReplace, s_replaceWith) {\r\n\t\tvar sss = c_delimiter + s_toReplace + c_delimiter;\r\n\t\tif(!df(s_message)) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ts_message = "";\r\n\t\t}\r\n\t\tvar iSSIdx = s_message.indexOf(sss);\r\n\t\tif(iSSIdx != -1) {\r\n\t\t\treturn s_message.substring(0, iSSIdx) + s_replaceWith + s_message.substring((iSSIdx + sss.length), (s_message.length + 1));\r\n\t\t} else {\r\n\t\t\treturn s_message;\r\n\t\t}\r\n\t}\r\n\r\n\r\n\tfunction trimStringLmnt(fls_tpta) {\r\n\t\t\r\n\t\tvar v = fls_tpta.obj.value;\r\n\r\n\t\tif(!df(v)) {\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(fls_tpta.isAttrAssc2Lmnt(ca_bsDts.sNm)) {\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif(fls_tpta.flsFrm.isAttrAssc2Lmnt(ca_bsGts.sNm) ||\r\n\t\t \tfls_tpta.isAttrAssc2Lmnt(ca_bsTs.sNm)) {\r\n\t\t\t\r\n\t\t\tv = trmChr(' ', v);\r\n\t\t\tfls_tpta.obj.value = trmChr('\t', v);\r\n\t\t}\r\n\t}\r\n\r\n\tfunction hasRequiredError(fls_lmnt, i_optsChosen, v_valSnglr) {\r\n\r\n\t\tif(!fls_lmnt.isAttrAssc2Lmnt(ca_sMr.sNm)) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif((fls_lmnt.isLmntVal1OrMore() &&\r\n\t\t \t!df(v_valSnglr)) ||\r\n\t\t \ti_optsChosen == 0) {\r\n\r\n\t\t\tfls_lmnt.sUsrErr = fls_lmnt.gtAttrV(ca_sMr.sNm);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\r\n\tfunction hasTxtPwdError(fls_txtpwd, v_valSnglr) {\r\n\r\n\t\t\r\n\t\t\r\n\r\n\t\tif(fls_txtpwd.isAttrAssc2Lmnt(ca_sMte.sNm)) {\r\n\t\t\t\r\n\t\t\tif(!isEml(fls_txtpwd.gtLmntValSnglr())) {\r\n\t\t\t\tfls_txtpwd.sUsrErr = fls_txtpwd.gtAttrV(ca_sMte.sNm);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(fls_txtpwd.isAttrAssc2Lmnt(ca_sMti.sNm)) {\r\n\t\t\treturn hasDecIntErr("false", fls_txtpwd, ca_sMti.sNm, "iIntMin", "iIntMax");\r\n\t\t}\r\n\r\n\r\n\t\tif(fls_txtpwd.isAttrAssc2Lmnt(ca_sMtd.sNm)) {\r\n\t\t\treturn hasDecIntErr("true", fls_txtpwd, ca_sMtd.sNm, "dDecMin", "dDecMax");\r\n\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\tfor(var i = 13; i < aCMPTBL_ATTRS.length; i++) {\r\n\t\t\tif(fls_txtpwd.isAttrAssc2Lmnt(aCMPTBL_ATTRS[i].sNm)) {\r\n\r\n\t\t\t\t\r\n\t\t\t\tvar sStrpdAndValid = aCMPTBL_ATTRS[i].sif.gtFmtV(fls_txtpwd.obj.value);\r\n\t\t\t\tif(df(sStrpdAndValid)) {\r\n\t\t\t\t\tfls_txtpwd.obj.value = sStrpdAndValid;\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfls_txtpwd.sUsrErr = fls_txtpwd.gtAttrV(aCMPTBL_ATTRS[i].sNm);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\r\n\tfunction hasDecIntErr(bs_decInt, fls_txtpwd, s_msgAttrNm, v_minBound, v_maxBound) {\r\n\t\tvar vMin = fls_txtpwd.gtAttrVRaw(v_minBound);\r\n\t\tvar vMax = fls_txtpwd.gtAttrVRaw(v_maxBound);\r\n\t\tvar vValue = fls_txtpwd.obj.value;\r\n\r\n\t\t\r\n\t\tif(!isNum(fls_txtpwd.obj.value, bs_decInt) ||\r\n\t\t\t\t(df(vMin) && vMin > vValue) ||\r\n\t\t\t\t(df(vMax) && vMax < vValue)) {\r\n\t\t\tfls_txtpwd.sUsrErr = gtMsgSSBounds(\r\n\t\t\t\tfls_txtpwd.gtAttrV(s_msgAttrNm), vMin, vMax);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\r\n\tfunction hasStrLnError(fls_tpta, v_valSnglr) {\r\n\t\tif(fls_tpta.sType != "text" && fls_tpta.sType != "password" &&\r\n\t\t\t\tfls_tpta.sType != "textarea") {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\tif(!fls_tpta.isAttrAssc2Lmnt(ca_sMbl.sNm)) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\tvar iCurrLen = fls_tpta.gtLmntValSnglr().length;\r\n\r\n\t\tif(fls_tpta.isAttrAssc2Lmnt("iMinLength") &&\r\n\t\t\t\t(iCurrLen < fls_tpta.gtAttrV("iMinLength"))) {\r\n\t\t\tstBadLnMsg(fls_tpta, iCurrLen);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tvar iMx = fls_tpta.gtAttrVRaw("iMaxLength");\r\n\r\n\t\tif(df(iMx) && iMx != -1 &&\r\n\t\t\t\t(iCurrLen > iMx)) {\r\n\t\t\tstBadLnMsg(fls_tpta, iCurrLen);\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\tfunction stBadLnMsg(fls_tpta, i_currLen) {\r\n\t\tvar sErr = gtMsgRplcSpclStr(\r\n\t\t\t\t\tfls_tpta.gtAttrV(ca_sMbl.sNm),\r\n\t\t\t\t\tcSS_DELIM, sSS_CURRLEN,\r\n\t\t\t\t\ti_currLen);\r\n\r\n\t\tfls_tpta.sUsrErr = gtMsgSSBounds(sErr,\r\n\t\t\t\tfls_tpta.gtAttrVRaw("iMinLength"),\r\n\t\t\t\tfls_tpta.gtAttrVRaw("iMaxLength"));\r\n\t}\r\n\r\n\r\n\tfunction hasChkSlmError(fls_chkslm, i_optsChosen, v_valSnglr) {\r\n\t\tif(!fls_chkslm.isAttrAssc2Lmnt(ca_sMmcr.sNm)) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\tvar iMn = fls_chkslm.gtAttrVRaw("iMCMin");\r\n\t\tvar iMx = fls_chkslm.gtAttrVRaw("iMCMax");\r\n\r\n\t\tif((df(iMn) &&\r\n\t\t \ti_optsChosen < iMn) ||\r\n\t\t \t(df(iMx) &&\r\n\t\t \t iMx < i_optsChosen)) {\r\n\r\n\t\t\tvar sErr = gtMsgSSBounds(\r\n\t\t\t\tfls_chkslm.gtAttrVRaw(ca_sMmcr.sNm), iMn, iMx);\r\n\t\t\tsErr = gtMsgRplcSpclStr(sErr,\r\n\t\t\t\tcSS_DELIM, sSS_OPTS_TOT, fls_chkslm.iTotOpts);\r\n\t\t\tfls_chkslm.sUsrErr = gtMsgRplcSpclStr(sErr,\r\n\t\t\t\tcSS_DELIM, sSS_OPTS_CHSN, fls_chkslm.gtLmntOptsChosen());\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\r\n\tfunction hasBSSError(fls_tpta, v_valSnglr) {\r\n\r\n\t\tif(fls_tpta.flsFrm.isAttrAssc2Lmnt(ca_asBss.sNm)) {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tvar asBSS;\r\n\t\tif(fls_tpta.isAttrAssc2Lmnt(ca_asBss.sNm)) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tasBSS = fls_tpta.gtAttrV(ca_asBss.sNm)\r\n\r\n\t\t} else if(fls_tpta.flsFrm.isAttrAssc2Lmnt(ca_asGbss.sNm)) {\r\n\t\t\t\r\n\t\t\tasBSS = fls_tpta.flsFrm.gtAttrV(ca_asGbss.sNm)\r\n\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t\r\n\r\n\t\tfor(var i = 0; i < asBSS.length; i++) {\r\n\t\t\tif(v_valSnglr.indexOf(asBSS[i]) != -1) {\r\n\t\t\t\tvar sErr = gtMsgRplcSpclStr(\r\n\t\t\t\t\tfls_tpta.gtAttrV(ca_sMbss.sNm),\r\n\t\t\t\t\tcSS_DELIM, sSS_BSS_LIST,\r\n\t\t\t\t\t"['" + asBSS.join("', '") + "']");\r\n\r\n\t\t\t\tfls_tpta.sUsrErr = gtMsgRplcSpclStr(sErr,\r\n\t\t\t\t\tcSS_DELIM, sSS_BSS_FOUND,\r\n\t\t\t\t\tasBSS[i]);\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction pb_addGdAtts4OT(a_cvfAttribute) {\r\n\tthis.addCVFAttrs("addGdAtts4OT", true, a_cvfAttribute);\r\n}\r\nfunction pb_addBdAtts4Att(a_cvfAttribute) {\r\n\tthis.addCVFAttrs("addBdAtts4Att", false, a_cvfAttribute);\r\n}\r\nfunction pv_addCVFAttrs(s_callingFunc, b_objTypeOrAttr, a_cvfAttribute) {\r\n\tthis.add2RA(s_callingFunc, b_objTypeOrAttr, this.aACAttrs_G4OT_B4A, a_cvfAttribute);\r\n}\r\nfunction pb_stGoodOTs4Attr(a_cvfAttribute) {\r\n\tif(this.aCObjTypes_G4A.length > 1) { \r\n\t\tcrsh("cota.sgot4a1", this.stGoodOTs4Attr, "stGoodOTs4Attr (XCMAX): this.aCObjTypes_G4A.length=" + this.aCObjTypes_G4A.length + ". Can only call this function once. Note the name of this function starts 'st' (meaning 'set'), not 'add'.");\r\n\t} \r\n\tthis.add2RA("stGoodOTs4Attr", false, this.aCObjTypes_G4A, a_cvfAttribute);\r\n}\r\n\r\n\r\nfunction pb_add2RA(s_callingFunc, b_objTypeOrAttr, a_dest, a_cvfAttribute) {\r\n\tcibRA(s_callingFunc + " (XCMAX)", "a_cvfAttribute", a_cvfAttribute);\r\n\r\n\tif(b_objTypeOrAttr != this.bOTorA) { \r\n\t\tcrsh("cota.cincvfa", this.add2RA, s_callingFunc + " (XCMAX): This function is only applicable for " + (b_objTypeOrAttr?"object-types":"vf-attributes") + ". This object represents " + (this.bOTorA?"object-types":"vf-attributes") + ".");\r\n\t} \r\n\r\n\tfor(var i = 0; i < a_cvfAttribute.length; i++) {\r\n\t\ta_dest[a_dest.length] = a_cvfAttribute[i];\r\n\t}\r\n}\r\n\r\nfunction pb_hasAttr(s_attribute) {\r\n\tciMissing(this.hasAttr, "hasAttr (XCMAX)", "s_attribute", s_attribute);\r\n\r\n\tfor(var i = 0; i < this.aACAttrs_G4OT_B4A.length; i++) {\r\n\t\tif(s_attribute == this.aACAttrs_G4OT_B4A.sNm) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\nfunction pb_hasOT(s_objType) {\r\n\tciMissing(this.hasOT, "hasOT (XCMAX)", "s_objType", s_objType);\r\n\r\n\tfor(var i = 0; i < this.aCObjTypes_G4A.length; i++) {\r\n\t\tif(s_objType == this.aCObjTypes_G4A[i].sNm) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\n\r\nfunction CmptblOTA(b_objTypeOrAttr, s_name) {\r\n\tciMissing(CmptblOTA, "CmptblOTA (XCMAX)", "b_objTypeOrAttr", b_objTypeOrAttr);\r\n\tciMissing(CmptblOTA, "CmptblOTA (XCMAX)", "s_name", s_name);\r\n\tif(s_name.length < 1) { \r\n\t\tcrsh("coa.cnstr1", CmptblOTA, "CmptblOTA.constructor (XCMAX): s_name is zero characters in length.");\r\n\t} \r\n\r\n\r\n\tthis.sNm = s_name;\r\n\tthis.bOTorA = b_objTypeOrAttr;\r\n\r\n\tthis.aCObjTypes_G4A = [];\r\n\t\tthis.stGoodOTs4Attr = pb_stGoodOTs4Attr;\r\n\r\n\t\r\n\t\r\n\tthis.aACAttrs_G4OT_B4A = [];\r\n\t\tthis.addBdAtts4Att = pb_addBdAtts4Att;\r\n\t\tthis.addGdAtts4OT = pb_addGdAtts4OT;\r\n\r\n\tthis.addCVFAttrs = pv_addCVFAttrs;\r\n\tthis.add2RA = pb_add2RA;\r\n\tthis.hasAttr = pb_hasAttr;\r\n\tthis.hasOT = pb_hasOT;\r\n\r\n\t\r\n\t\r\n\t\r\n\tthis.sif = undefined;\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction gtVRAIdx(s_callingFunc, v_alue, a_value) {\r\n\tcibRA(s_callingFunc + " (XCMAX) [NOTE THAT THERE ARE THREE PARAMETERS, THE FIRST BEING THE 'CALLING FUNCTION']", "a_value", a_value);\r\n\r\n\tfor(var i = 0; i < a_value.length; i++) {\r\n\t\tif(v_alue == a_value[i]) {\r\n\t\t\treturn i;\r\n\t\t}\r\n\t}\r\n\r\n\treturn -1;\r\n}\r\n\r\n\r\nfunction isInAscRA(v_alue, a_value) {\r\n\tcibRA("isInAscRA (XCMAX)", "a_value", a_value);\r\n\r\n\tfor(var i = 0; i < a_value.length; i++) {\r\n\t\tif(v_alue < a_value[i]) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(v_alue == a_value[i]) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\r\n\treturn false;\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction isRA(o_potentialArray) {\r\n\tciMissing(isRA, 'util_array.isRA (XCMAX)', 'o_potentialArray', o_potentialArray);\r\n\r\n\tif(typeof o_potentialArray != 'object') {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn (o_potentialArray.constructor.toString().match(/array/i) != null);\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nfunction isNum(s_potential, bs_decimalAllowed) {\r\n\tciMissing(isNum, 'util_string.isNum [XCMAX]', 's_potential', s_potential);\r\n\tcibBoolStr('util_string.isNum [XCMAX]', 'bs_decimalAllowed', bs_decimalAllowed);\r\n\r\n\tif(s_potential.length < 1) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(s_potential == '-') {\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(/^-[0]+$/.test(s_potential)) {\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(/^[0]+$/.test(s_potential)) {\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\tif(/^[-]{0,1}[0-9]+$/.test(s_potential)) {\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}\r\n\t\r\n\r\n\tif(bs_decimalAllowed == 'false') {\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\tif(/^[-]{0,1}[0-9]*[.][0-9]+$/.test(s_potential)) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\treturn !(/^-0*[.]0+$/.test(s_potential));\r\n\t}\r\n\r\n\t\r\n\treturn false;\r\n}\r\n\r\n\r\n\r\n\r\nfunction isEml(s_potentialEmail) {\r\n\tif(!df(s_potentialEmail) || \r\n\t \ts_potentialEmail.length < 1) {\r\n\t\tcrsh("us.ie1", isEml, "isEml (XCMAX): s_potentialEmail must be defined, and at least one character in length.");\r\n\t} \r\n\r\n\tif(s_potentialEmail.indexOf(" ") != -1 ||\r\n\t s_potentialEmail.indexOf("/") != -1 ||\r\n\t s_potentialEmail.indexOf("\\\\") != -1 ||\r\n\t s_potentialEmail.indexOf(",") != -1) {\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(/[@.][@.]/.test(s_potentialEmail)) {\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(/^[@.]/.test(s_potentialEmail)) {\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(/[@.]$/.test(s_potentialEmail)) {\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif(!/^[^@]+@[^@]+$/.test(s_potentialEmail)) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\r\n\tif(!/@.*[.]/.test(s_potentialEmail)) {\r\n\t\t\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t\r\n\r\n\r\n\t\r\n\t\r\n\treturn true;\r\n}\r\n\r\n\r\n\r\n\r\nfunction trmChr(c_harToTrim, s_tring) {\r\n\tif(!c_harToTrim || c_harToTrim.length != 1) {\r\n\t\tcrsh("us.tc1", trmChr, "us.trmChr (XCMAX): c_harToTrim must be provided, and must be exactly one character in length. Currently '" + c_harToTrim + "'.");\r\n\t} \r\n\r\n\tciMissing(trmChr, 'us.trmChr [XCMAX]', 's_tring', s_tring);\r\n\r\n\tvar i = 0;\r\n\tvar iStartingSpaces = 0;\r\n\twhile(s_tring.substring(i, (i + 1)) == c_harToTrim) {\r\n\t\tiStartingSpaces++;\r\n\t\ti++;\r\n\t}\r\n\r\n\tif(iStartingSpaces == s_tring.length) {\r\n\t\treturn "";\r\n\t}\r\n\r\n\ti = 0;\r\n\tvar iEndingSpaces = 0;\r\n\twhile(s_tring.substring((s_tring.length - i), (s_tring.length - (i + 1))) == c_harToTrim) {\r\n\t\tiEndingSpaces++;\r\n\t\ti++;\r\n\t}\r\n\r\n\tif(iStartingSpaces == 0 && iEndingSpaces == 0) {\r\n\t\treturn s_tring;\r\n\t}\r\n\r\n\treturn s_tring.substring(iStartingSpaces, (s_tring.length - iEndingSpaces));\r\n}\r\n\r\n\r\n\r\nfunction gtCd4V(s_value) {\r\n\tif(!df(s_value)) {\r\n\t\treturn "undefined";\r\n\r\n\t\r\n\t} else if(isNum(s_value, "true")) {\r\n\t\treturn s_value;\r\n\r\n\t\r\n\t} else if(isRA(s_value)) {\r\n\t\treturn "['" + s_value.join("', '") + "']";\r\n\r\n\t} else {\r\n\t\t\r\n\t\treturn "'" + s_value + "'";\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\r\n\t\r\n\tbLDD_CI = true;\r\n\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tbCRSH_ALRT = true;\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tbCRSH_DGNSTCS = true;\r\n\r\n\t\t\r\n\t\tbCRSH_THROW = true;\r\n\r\n\t\r\n\t\r\n\tvar bCrshd = false;\r\n\r\n\t\r\n\tvar sCrshCd = undefined;\r\n\r\n\tvar fCrsh = undefined;\r\n\r\n\t\r\n\tvar sCrshMsg = undefined;\r\n\r\n\r\n\r\n\r\nfunction crsh(s_code, f_unc, s_error) {\r\n\tif(!df(f_unc)) {\r\n\t\treturn alert("ERROR in utility.crsh: f_unc is undefined. [crsh.caller=" + crsh.caller.name + ", s_code='" + s_code + "', s_error='" + s_error + "']");\r\n\t}\r\n\tif(!df(f_unc.arguments)) {\r\n\t\treturn alert("ERROR in utility.crsh: f_unc.arguments is undefined. Make sure f_unc is a function reference. [crsh.caller=" + crsh.caller.name + ", s_code='" + s_code + "', s_error='" + s_error + "']");\r\n\t}\r\n\tif(!s_code) {\r\n\t\treturn alert("ERROR in utility.crsh: s_code is required and must not equal zero or empty string. [crsh.caller=" + crsh.caller.name + ", f_unc='" + f_unc + "', s_error='" + s_error + "']");\r\n\t}\r\n\r\n\tvar sHdr = "u.crsh() ERROR. ";\r\n\tvar sFncNm = "Function: " + f_unc.name + "()";\r\n\tvar sCode = "Code: " + s_code;\r\n\r\n\tvar sClrNm = "Caller: ";\r\n\tif(df(f_unc.caller)) {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tsClrNm += f_unc.caller.name + "()"\r\n\t} else {\r\n\t\tsClrNm += "[TOP LEVEL CALL. Called by the document itself]";\r\n\t}\r\n\r\n\tvar sCrshClr = "crsh() caller: " + crsh.caller.name;\r\n\r\n\r\n\tvar sArgs = "";\r\n\tvar aFrgs = f_unc.arguments;\r\n\tif(!isRA(aFrgs)) {\r\n\t\tsArgs = "COULD NOT DETERMINE ARGUMENTS. f_unc.arguments is not of type 'array'. WHY?!";\r\n\r\n\t} else {\r\n\t\tfor(var i = 0; i < aFrgs.length; i++) {\r\n\t\t\tsArgs += i + " [" + aFrgs[i] + "]\n";\r\n\t\t}\r\n\t}\r\n\tsArgs = "Argument(s):\n" + sArgs;\r\n\r\n\t\r\n\t\r\n\t\r\n\t\tvar sLrt = sHdr + sCode + "\nbCRSH_DGNSTCS=" + bCRSH_DGNSTCS + " bCRSH_ALRT=" + bCRSH_ALRT + " bCRSH_THROW=" + bCRSH_THROW + "\n";\r\n\t\tif(bCRSH_DGNSTCS) {\r\n\t\t\tsLrt += "\n(About to write this error and code to the document)";\r\n\t\t} else if(bCRSH_ALRT && window.location.hash.length > 0) {\r\n\t\t\tif(bCRSH_THROW) {\r\n\t\t\t\tsLrt += "\n[[[ NOTE: The page may reload to '" + window.location.hash + "', and form values may revert to their defaults. ANYONE KNOW WHY THIS RELOADS IN UNPREDICTABLE LOCATIONS???? ]]]";\r\n\t\t\t} else {\r\n\t\t\t\tsLrt += "\n[[[ NOTE: bCRSH_THROW equals false. Unpredictable behavior may follow this dialog... ]]]";\r\n\t\t\t}\r\n\t\t}\r\n\t\tsLrt += "\n------------------------" +\r\n\t\t\t"\n" + s_error +\r\n\t\t\t"\n---------------------\n" + sFncNm +\r\n\t\t\t"\n" + sClrNm +\r\n\t\t\t"\n" + sCrshClr;\r\n\r\n\t\t\r\n\t\t\tsCrshCd = s_code;\r\n\t\t\tsCrshMsg = sLrt;\r\n\t\t\tfCrsh = f_unc;\r\n\r\n\t\tif(bCRSH_ALRT) {\r\n\t\t\talert(sLrt);\r\n\t\t}\r\n\t\r\n\t\r\n\t\r\n\r\n\tvar sDgnstcs;\r\n\tif(bCRSH_DGNSTCS) {\r\n\t\tvar sb = "\n
";\r\n\t\tvar sTop = "
" + sHdr + sCode + "...";\r\n\t\tvar sBtm = " |
" + s_error + "
" + sCode + sb + sFncNm + sb + sClrNm + sb + sCrshClr + "
\n" + sArgs + "\n" +\r\n\t\t\t"
" + f_unc + "\n
" + f_unc.caller + "\n" +\r\n\t\t\tsTop + "END\n" + sBtm;\r\n\t}\r\n\r\n\t\r\n\t\r\n\tif(bCRSH_THROW) {\r\n\t\tcrshAndThrow(sDgnstcs, sLrt);\r\n\t} else {\r\n\t\tcrshNoThrow(sDgnstcs);\r\n\t}\r\n}\r\nfunction crshAndThrow(s_dgnstcs, s_throwMsg) {\r\n\tif(bCRSH_DGNSTCS) {\r\n\t\twrt(s_dgnstcs);\r\n\t}\r\n\r\n\tthrow s_throwMsg;\r\n}\r\nfunction crshNoThrow(s_dgnstcs) {\r\n\tif(bCRSH_DGNSTCS) {\r\n\t\twrt(s_dgnstcs);\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\nfunction ciMissing(f_calling, s_callingFileFunc, s_varName, v_required) {\r\n\tif(!df(v_required)) {\r\n\t\tcrsh("u.cim1", f_calling, s_callingFileFunc + ': Required parameter ' + s_varName + ' is undefined.');\r\n\t}\r\n}\r\n\r\n\r\nfunction cibBoolStr(s_callingFunc, s_bsName, bs_shouldBe) {\r\n\tciMissing(cibBoolStr, "u.cibBoolStr (s_callingFunc='" + s_callingFunc + "', s_bsName='" + s_bsName + "')", "bs_shouldBe", bs_shouldBe);\r\n\r\n\tif(bs_shouldBe == 'true' || bs_shouldBe == 'false') {\r\n\t\t\r\n\t\treturn;\r\n\t}\r\n\r\n\tcrsh("u.cibbs1", cibBoolStr, s_callingFunc + ": " + s_bsName + " must be a *string* equal to either 'true' or 'false'. EXTRA INFO: bs_shouldBe.toString()='" + bs_shouldBe.toString() + "', bs_shouldBe.type='" + bs_shouldBe.type + "' , value='" + bs_shouldBe + "'.");\r\n}\r\n\r\n\r\n\r\n\r\n\r\nfunction cibAFLS(s_callingFunc, s_aosName, a_flStats) {\r\n\tcibRA(s_callingFunc, s_aosName, a_flStats);\r\n\r\n\tfor(var i = 0; i < a_flStats.length; i++) {\r\n\t\tciNotFLStats(s_callingFunc, s_aosName + "[" + i + "]", a_flStats[i]);\r\n\t}\r\n}\r\n\r\n\r\nfunction ciNotFLStats(s_callingFunc, s_flsName, v_shouldBeFLS) {\r\n\tciMissing(ciNotFLStats, s_callingFunc, s_flsName, v_shouldBeFLS);\r\n\r\n\tif(!df(v_shouldBeFLS.type) ||\r\n\t\t\t\tv_shouldBeFLS.type != "FLStats") {\r\n\t\tcrsh("os.cinos1", ciNotFLStats, s_callingFunc + ": " + s_flsName + " is not of type 'FLStats'. Currently, [" + v_shouldBeFLS + "].");\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\n\r\nfunction ciNotLoaded(s_callingFunc, vfb_cfg) {\r\n\tvar f = ciNotLoaded;\r\n\tvar sF = s_callingFunc;\r\n\tvar sDgnstcsStart = ".\n----------\nDiagnostics:\ns_jsDirUrl='" + sJSDIR + "' (as you provided to loadVF())\n";\r\n\r\n\tif(df(vfb_cfg)) {\r\n\t\tif(vfb_cfg.isVfpdOn() && !bLDD_VFPD) {\r\n\t\t\tcrsh("vf.gfem8", f, sF + "Permanent VF-Diagnostics are currently active, but '" + sJSDIR + "vf_perm_diagnostics.js'could not be loaded" + sDgnstcsStart + "bLDD_VFPD=" + bLDD_VFPD + "\nvfb_cfg.isVfpdOn()=" + vfb_cfg.isVfpdOn() + ", vfb_cfg.bDOnDflt=" + vfb_cfg.bDOnDflt + ", bVFPDInUrl=" + bVFPDInUrl + ", vfb_cfg.sFrmNm='" + vfb_cfg.sFrmNm + "'\nwindow.location.search='" + window.location.search + "'\nvfb_cfg.isVfpdOn()=" + vfb_cfg.isVfpdOn() + "'\nbLDD_VFPD=" + bLDD_VFPD);\r\n\r\n\t\t} else if(vfb_cfg.isCIBCOn() && !bLDD_CIBC) {\r\n\t\t\tcrsh("vf.gfem9", f, sF + "vfb_cfg.isCIBCOn() equals true, but '" + sJSDIR + "vf_cib_config.js' or '" + sJSDIR + " could not be loaded" + sDgnstcsStart + "vfb_cfg.sFrmNm='" + vfb_cfg.sFrmNm + "'\nbLDD_CIBC=" + bLDD_CIBC);\r\n\r\n\r\n\t\t} else if(vfb_cfg.iDDPS != -1 &&\r\n\t\t !bLDD_DBG) {\r\n\t\t\tcrsh("vf.gfem10", f, sF + "vfb_cfg.iDDPS equals something other than -1 (" + vfb_cfg.iDDPS + "), but '" + sJSDIR + "vf_dbgVF.js' could not be loaded" + sDgnstcsStart + "vfb_cfg.sFrmNm='" + vfb_cfg.sFrmNm + "'");\r\n\t\t}\r\n\t}\r\n\r\n\tif((bLDD_CIBC || bLDD_DBG) &&\r\n\t !bLDD_OD) {\r\n\t\tcrsh("vf.gfem11", f, sF + "Either " + sJSDIR + "vf_cib_config.js (" + bLDD_CIBC + ") or " + sJSDIR + "vf_dbgVF.js (" + bLDD_DBG + ") were loaded, but the required sub-file '" + sJSDIR + "vf_obj_dgnstcs.js' could not be loaded" + sDgnstcsStart);\r\n\r\n\t} else if(df(sSifCfgUrl) &&\r\n\t \t(!bLDD_STASIF || !bLDD_SIF_CFG ||\r\n\t \t (aCMPTBL_ATTRS.length == 13))) {\r\n\t\tcrsh("vf.gfem12", f, sF + "s_relUrl2ASIFmt ('" + sSifCfgUrl + "') has at least one of the following problems:\n - It could not be loaded. Verify the path.\n - It does not call stASIF().\n - It does not contain the required variable and value 'bLDD_SIF_CFG=true;'" + sDgnstcsStart + "bLDD_STASIF=" + bLDD_STASIF + "\naCPMTBL_ATTRS.length=" + aCMPTBL_ATTRS.length + "\nbLDD_SIF_CFG=" + bLDD_SIF_CFG);\r\n\t}\r\n}\r\n\r\n\r\n\r\nfunction cibRA(s_callingFunc, s_arrayNm, a_rray) {\r\n\tciMissing(cibRA, s_callingFunc, s_arrayNm, a_rray);\r\n\r\n\tif(!isRA(a_rray)) {\r\n\t\tcrsh("ua.ciba1", cibRA, s_callingFunc + ": " + s_arrayNm + " is not an array according to util_array.isRA(). " + s_arrayNm + "=[" + a_rray.toString() + "].");\r\n\t}\r\n\r\n\tif(a_rray.length < 1) {\r\n\t\tcrsh("ua.ciba2", cibRA, s_callingFunc + ": " + s_arrayNm + " is zero elements in length.");\r\n\t}\r\n\r\n\tfor(var i = 0; i < a_rray.length; i++) {\r\n\t\tif(!df(a_rray[i])) {\r\n\t\tcrsh("ua.ciba3", cibRA, s_callingFunc + ": " + s_arrayNm + "[" + i + "] is undefined. " + s_arrayNm + "=['" + a_rray.join("', '") + "']");\r\n\t\t}\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\nfunction cibLnRng(si_min, si_max, s_minName, s_maxName, s_whenProvided) {\r\n\tcibInt(s_minName, si_min);\r\n\tcibInt(s_maxName, si_max);\r\n\r\n\tif(!df(si_min)) {\r\n\t\t\r\n\t\t\r\n\t\treturn;\r\n\t}\r\n\r\n\t\r\n\r\n\tif(si_min.length != si_max.length) {\r\n\t\tcrsh("snf.cnstr1", cibLnRng, "cibLnRng: " + s_whenProvided + s_minName + " ('" + si_min + "') and " + s_maxName + " ('" + si_max + "') must be the same length.");\r\n\t}\r\n\r\n\tif(parseInt(si_min, 10) > parseInt(si_max, 10)) {\r\n\t\tcrsh("snf.cnstr1", cibLnRng, "cibLnRng: " + s_whenProvided + s_minName + " ('" + si_min + "') must be (numerically) less than or equal to " + s_maxName + " ('" + si_max + "').");\r\n\t}\r\n}\r\n\r\n\r\nfunction cibInt(s_boundName, si_frmtBound) {\r\n\tif(df(si_frmtBound) && !isNum(si_frmtBound, "false") ||\r\n\t \tsi_frmtBound < 0) {\r\n\t\tcrsh("snf.cnstr4", cibInt, "cibLnRng: The value of " + s_boundName + " ('" + si_frmtBound + "') must be an *integer* greater than -1.");\r\n\t}\r\n}\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n