{"version":3,"sources":["logicjs.cookiePolicy.js","AjaxTransfer.js","EnableScrollToTopFix.js","PasswordMeter.js","SessionTimer.js","Twitter.js","ValidationEx.js","ValidationEx_Display.js","ValidationEx_Summary.js","uploader.js","cbox.js","ReadMore.js","ScrollToView.js","SkipLinks.js","DOBControls.js","debug-panel.js","Selenium.js","Selenium-CPC.js","RocktimeInit.js","Misc.js","Help.js","TextArea.js","ControlBaseEx.js","RadGrid.js","RadEditor.js","RadCombobox.js","Extensions.js"],"names":["document","addEventListener","getElementById","onclick","date","Date","setTime","getTime","cookie","toUTCString","style","display","orginalFormAction","EndRequestHandlerAjaxTransfer","theForm","action","_initialAction","RegisterRequestHandlersAjaxTransfer","Sys","WebForms","PageRequestManager","getInstance","add_endRequest","Application","notifyScriptLoaded","add_load","String","prototype","strReverse","newstring","s","length","charAt","pass_createError","value","index","pass_Standards","pass_Mins","output","replace","pass_getBackgroundcolor","score","hexc","Array","redcol_1","redcol_2","greencol_1","greencol_2","bluecol_1","bluecol_2","red","green","blue","Math","round","floor","pass_chkPassKeyPress","pwd","id","val","isvalid","pass_chkPass","ValidatorUpdateDisplay","parent","undefined","parentObj","all","RocktimeValidateEx","oHelp","$","oScore","hide","show","pass_DisplayType","eval","pass_UseHelp","pass_ShowOk","pass_Complexities","pass_ComplexityThresholds","nScore","nLength","nAlphaUC","nAlphaLC","nNumber","nSymbol","nMidChar","nUnqChar","nRepChar","nRepInc","nConsecAlphaUC","nConsecAlphaLC","nConsecNumber","nConsecSymbol","nConsecCharType","nSeqAlpha","nSeqNumber","nSeqSymbol","nSeqChar","nReqChar","nMultConsecCharType","nMultMidChar","nMultConsecAlphaUC","nMultConsecAlphaLC","nMultConsecNumber","nMultSeqAlpha","nMultSeqNumber","nMultSeqSymbol","nMultLength","nMultNumber","nMultSymbol","nTmpAlphaUC","nTmpAlphaLC","nTmpNumber","nTmpSymbol","sAlphas","sNumerics","sSymbols","sComplexity","sStandard","css","text","html","parseInt","arrPwd","split","arrPwdLen","a","match","bCharExists","b","abs","ceil","sFwd","substring","sRev","toLowerCase","indexOf","nTypes","penaltyOffset","isValid","rtSessionTimer","rtNow","rtServerTime","rtEnd","rtWarningTimer","rtUIWarningTimer","rtSessionLength","rtLoggedIn","rtUseUIWarning","rtTimeOffset","rtTime","rtRemaining","rtGetDataWait","rtUseTitle","rtTitle","rtColorBoxIsOpen","rtControl","rtTimerId","rtLastLoggedInState","rtDebugMode","jQuery","get","rtGetLocation","data","title","rtProcessData","rtCalcWait","window","setInterval","rtAction","click","rtContinue","rtLogout","attr","rtUpdateDivs","dyingBreath","mode","encodeURIComponent","location","pathname","isDyingBreath","dataParts","rtFormatTime","rtSetTime","rtShow","divId","divHide","useColorBox","colorbox","close","escKey","overlayClose","inline","href","onOpen","onCleanup","onClosed","timeSecs","Number","isNaN","toFixed","pad","clearInterval","l","join","substr","getTwitterTweets","listId","screenName","tweetCount","includeRetweets","ajax","url","contentType","dataType","responseType","success","twitterCallback","twitters","statusHTML","i","username","user","screen_name","status","reply","push","id_str","relative_time","created_at","innerHTML","time_value","values","parsed_date","parse","relative_to","arguments","delta","getTimezoneOffset","toString","RocktimeValidate","ValidatorName","validator","ValidatorValidate","Page_ClientValidateByControl","controlId","Page_InvalidControlToBeFocused","Page_Validators","controltovalidate","RocktimeCustomResultProcessing","customResultProcessingJavascriptFunction","ValidatorGetValue","RocktimeDropDownListValidatorIsValid","allowCustomText","invalidValue","isLoadOnDemand","isDropDownList","isRadDropDownList","raddropdownlist","$find","get_selectedItem","get_value","combo","get_text","node","findItemByText","_value","RocktimeCheckBoxValidatorIsValid","testType","is","checkBoxCount","find","each","ValidatorTrim","requiredChecked","minimumChecked","maximumChecked","RocktimeListBoxValidatorIsValid","minimumSelected","maximumSelected","RocktimeRadioButtonRequiredValidatorIsValid","checkedClassName","controlToValidate","checkedOptions","RocktimeTextBoxLengthValidatorIsValid","minimumlength","maximumlength","RocktimeTextBoxRequiredValidatorIsValid","IsFileUploadEx","FileExists","IsWYSIWYG","get_html","initialValue","RocktimePasswordStrengthValidatorIsValid","RocktimeNumericValidatorIsValid","RocktimeNumericValidatorAction","allowdecimal","fieldErrorClass","allowDecimal","result","isNumeric","isInt","removeClass","addClass","n","parseFloat","RocktimeTimeValidatorIsValid","RocktimeTimeValidatorValidateTime","minimumtime","maximumtime","RocktimeTimeValidatorGetTime","Time","Parts","Seconds","RocktimeTimeValidateControl","controlToValidateId","RocktimeRegularExpressionValidatorEvaluateIsValid","setCase","toUpperCase","removeChars","pattern","RegExp","rx","validationexpression","matches","exec","CompareValidatorEvaluateIsValidEx","CompareValidatorEvaluateIsValid","RocktimeAjaxValidatorEvaluateIsValid","ajaxIsValid","RocktimeAjaxValidatorKeyUp","timeoutId","clearTimeout","setTimeout","webFormDoCallback","RocktimeAjaxValidatorResult","returnValue","update","LastIsValid","RocktimeAjaxValidatorError","message","alert","decodeHTML","txt","createElement","ValidatorUpdateDisplaySaved","ValidatorUpdateDisplayEx","RocktimeValidateExSetHighlight","getCoreValidator","endsWith","UpdateValidationSummariesAutoAction","ValidatorValidateEx","ValidatorExName","GetCoreIsValid","IsValidationGroupValid","validationGroup","valValidationGroup","enabled","Page_ValidationSummaries","summary","sums","headerSep","first","pre","post","end","AutoUpdateSummaryValidationMessages","showsummary","displaymode","headertext","summaryValidationGroup","errormessage","scrollTo","showmessagebox","lastValIndex","UpdateSummaryWrappers","RocktimeValidateClass","RocktimeValidateBorderCss","borderColorNormal","borderColorError","valueMe","targetCmp","fieldErrorClassCompareTarget","hasCmp","fieldErrorClassTarget","RocktimeValidateClassForMultiLine","RocktimeValidateClassForMultiLineAction","target","borderColor","controltocompare","ValidationSummaryOnSubmitSaved","ValidationSummaryOnSubmit","ValidationSummaryOnSubmitEx","summaryTarget","GetSummaryTarget","SummaryHasEMShowing","SummaryIsVisible","uploader","bind","initFakeInput","cancelBtn","off","on","removeFile","hideFileInput","showFileDetails","replaceBtn","hideFileDetails","showFileInput","container","imageUpload","inputTarget","uploadMsg","parents","containerClass","fileUploadMsgClass","input","files","selected","fileOpts","fileOptsClass","fileOptsHiddenClass","focus","fileDetails","fileDetailsClass","fileDetailsHiddenClass","replaceBtnClass","init","cancelBtnClass","fileInput","cbox","onComplete","width","height","timerInMSecs","minWidth","minHeight","maxHeight","x","y","resize","readToggleButton","readMoreBtn","showText","readLessBtn","hideText","e","preventDefault","stopPropagation","stopImmediatePropagation","innerSpan","parentNode","outerSpan","label","textMin","getElementsByClassName","moreTextMinClass","textMax","moreTextMaxClass","classList","add","remove","scrollToView","elem","speed","scrollTarget","animate","scrollTop","offset","top","actionSkipLink","parentId","senderId","replaceAll","updateSelectValue","changedCheckbox","control","yearValue","monthValue","dayValue","m","d","FiredValidation","updateValue","sender","eventArgs","_uniqueId","getValue","item","listItem","daysInMonth","month","year","getDate","dateControlSetup","isEmpty","isValidDay","showAsValid","isValidMonth","isValidYear","day","maxDate","getMonth","minDate","getFullYear","HideError","$field","max","maxValue","min","minValue","blur","keyup","keyCode","$dataOptions","closest","$previousField","$nextField","maxchars","numbersOnly","isComboBox","allowcomboboxfreetext","fieldVar","trim","Dl","hideDropDown","checkComboBoxValue","previousmaxchars","$previousDataOptions","$nextDataOptions","select","textInTheCombo","get_items","get_count","getItem","toTitleCase","trackChanges","set_text","commitChanges","startsWith","showDropDown","set_selected","inputElement","get_inputDomElement","popoutMessagePanel","ctrl","toggleView","viewClose","view","clearLoadTime","loadTimer","removeEventListener","contains","viewHiddenClass","openView","closeView","innerHeight","load","loadDisplayTime","SIDAction","getKey","codeType","SID","codeFunctions","processKey","event","button","selectedNetCode","shiftKey","ctrlKey","altKey","formatEx","copyFnToClipboard","functionText","navigator","clipboard","writeText","Notification","permission","requestPermission","notification","body","addClickEvent","targetId","fn","addContextMenuEvent","addContextMenuEventAdded","processContextMenuKey","genSIDKey","prefix","name","suffix","slice","getKeyCPC","updateSeleniumInfo","key","addStyle","rootElement","getElementsByTagName","appendChild","nameElement","keyElement","innerText","documentReady","console","log","setupHelp","editorsSetup","iframe","scrolling","closeButton","isOpera","opera","userAgent","isFirefox","InstallTrigger","isSafari","Object","call","HTMLElement","isChrome","chrome","isIE","documentMode","addTrailingDirSlash","urlParts","disableButtonOnClick","waitText","seconds","Page_ClientValidate","Page_IsValid","disableButton","countdownInterval","countdownValue","disableButtonCheck","disabled","rtHelpOpen","HelpMessage","LinkId","rtHelpOpenMessage","Text","initTextAreas","moveCaretToEnd","el","moveCaretTo","selectionStart","selectionEnd","setSelectionRange","adjustOffset","createTextRange","range","collapse","moveEnd","moveStart","selection","createRange","newOffset","Element","active","state","validationActive","eId","vId","ValidatorEnableNoValidate","enable","ToggleRadRadioButtonEx","set_checked","get_checked","onRowDropping","args","destId1","destId2","recycleBinId1","recycleBinId2","alertText","canSort","get_id","get_destinationHtmlElement","isChildOf","confirm","set_destinationHtmlElement","$get","set_cancel","element","setFocus","moveCaretToEndRadEditor","copyRadEditorContent","initRadEditors","ToggleTACEditView","btnView","btnEdit","ToggleRECEditView","FixRECs","rtRECHideEditor","editor","editorFindPart","get_contentArea","margin","padding","border","part","content","FixPTags","set_html","repaint","lastIndexOf","iframewin","contentWindow","contentDocument","get_document","oRange","duplicate","getSelection","sel","startContainer","lastChild","nodeType","localName","tempnode","previousSibling","nodeValue","setStart","setEnd","removeAllRanges","addRange","getRangeAt","getRange","err","src","dest","setIframeDocument","contents","iframeWin","parentWindow","open","write","ComboboxListLocked_OnClientRequestFailedHandler","searchText","isFailedSearch","requestItemsIsRunning","requestItems","ComboboxListLocked_OnClientItemsRequesting","context","get_context","Combobox_OnClientItemsRequested","Combobox_OnClientLoad","toXML","toXMLDate","toXMLTime","timeNow","today","getHours","getMinutes","timeNowSeconds","getSeconds","str","tokens","isArray","search","replacement","defineProperties"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEAA,QAAQ,CAACC,gBAAT,CAA0B,kBAA1B,EAA8C,YAAY;AAEtD,MAAID,QAAQ,CAACE,cAAT,CAAwB,uBAAxB,MAAqD,I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CAACC,SAAP,CAAiBgf,IAAjB,GAAwB,YAAY;AAChC,SAAQ,KAAKpe,OAAL,CAAa,YAAb,EAA2B,EAA3B,EAA+BA,OAA/B,CAAuC,YAAvC,EAAqD,EAArD,CAAR;AACH,CAFD;;AAIAb,MAAM,CAACC,SAAP,CAAiB8b,UAAjB,GAA8B,UAAU6R,MAAV,EAAkBC,WAAlB,EAA+B;AACzD,SAAO,KAAK3nB,KAAL,CAAW0nB,MAAX,EAAmB1iB,IAAnB,CAAwB2iB,WAAxB,CAAP;AACH,CAFD;;AAIA9I,MAAM,CAAC+I,gBAAP,CAAwBnvB,IAAxB,EAA8B;AAC1Byf,EAAAA,QAAQ,EAAE;AAAE5d,IAAAA,KAAK,EAAE,CAAC;AAAV,GADgB;AACc;AACxC0d,EAAAA,QAAQ,EAAE;AAAE1d,IAAAA,KAAK,EAAE;AAAT;AAFgB,CAA9B","file":"core.js","sourcesContent":["/*\r\n cookie policy\r\n Version:2\r\n Dependencies: jQuery\r\n \r\n SUMMARY:\r\n\r\n Controls cookie policy display setting and removing cookies. Currently built to work with RocktimeCore.config setting\r\n EnableNewStyleCookiePolicyVersionNo = 3. This is the default so no settings need to be set in the initialise example below.\r\n\r\n*/\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n\r\n if (document.getElementById(\"CookiePolicyAcceptAll\") !== null) {\r\n document.getElementById(\"CookiePolicyAcceptAll\").onclick = function () {\r\n var date = new Date();\r\n date.setTime(date.getTime() + (90 * 24 * 60 * 60 * 1000));\r\n document.cookie = \"rtCookiePrivacySetting=AcceptedTypes=ALL; expires=\" + date.toUTCString() + \"; SameSite=Strict; path=/;\";\r\n\r\n document.getElementById(\"CookiePolicy\").style.display = 'none';\r\n if (document.getElementById(\"CookiePolicyModal\") !== null) { document.getElementById(\"CookiePolicyModal\").style.display = 'none'; }\r\n };\r\n }\r\n\r\n if (document.getElementById(\"CookieControlCentre\") !== null) {\r\n document.getElementById(\"CookieControlCentre\").onclick = function () {\r\n document.getElementById(\"CookiePolicy\").style.display = 'none';\r\n if (document.getElementById(\"CookiePolicyModal\") !== null) { document.getElementById(\"CookiePolicyModal\").style.display = 'none'; }\r\n };\r\n }\r\n});\r\n","var orginalFormAction = null;\r\nfunction EndRequestHandlerAjaxTransfer() {\r\n theForm.action = orginalFormAction;\r\n theForm._initialAction = orginalFormAction;\r\n}\r\nfunction RegisterRequestHandlersAjaxTransfer() {\r\n if (typeof (Sys) != \"undefined\") {\r\n if (typeof (Sys.WebForms.PageRequestManager.getInstance()) != \"undefined\") {\r\n Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandlerAjaxTransfer);\r\n Sys.Application.notifyScriptLoaded();\r\n }\r\n }\r\n}\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n if (typeof (Sys) != \"undefined\") {\r\n orginalFormAction = theForm.action;\r\n Sys.Application.add_load(RegisterRequestHandlersAjaxTransfer);\r\n }\r\n})","","/*\r\n** Created by: Jeff Todnem (http://www.todnem.com/)http://www.passwordmeter.com/\r\n** Created on: 2007-08-14\r\n** Last modified: 2010-05-17 Kieron Matthews - Rocktime\r\n** \r\n** License Information:\r\n** -------------------------------------------------------------------------\r\n** Copyright (C) 2007 Jeff Todnem\r\n**\r\n** This program is free software; you can redistribute it and/or modify it\r\n** under the terms of the GNU General Public License as published by the\r\n** Free Software Foundation; either version 2 of the License, or (at your\r\n** option) any later version.\r\n** \r\n** This program is distributed in the hope that it will be useful, but\r\n** WITHOUT ANY WARRANTY; without even the implied warranty of\r\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n** General Public License for more details.\r\n** \r\n** You should have received a copy of the GNU General Public License along\r\n** with this program; if not, write to the Free Software Foundation, Inc.,\r\n** 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r\n** \r\n*/\r\n\r\nString.prototype.strReverse = function () {\r\n var newstring = \"\";\r\n for (var s = 0; s < this.length; s++) {\r\n newstring = this.charAt(s) + newstring;\r\n }\r\n return newstring;\r\n};\r\n\r\nfunction pass_createError(value, index, pass_Standards, pass_Mins) {\r\n var output = '
  • ' + pass_Standards[index] + '
  • ';\r\n output = output.replace(/\\{0\\}/gi, pass_Mins[index])\r\n output = output.replace(/\\{1\\}/gi, value)\r\n output = output.replace('/', ' / ')\r\n return output\r\n}\r\n\r\nfunction pass_getBackgroundcolor(score) {\r\n var hexc = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');\r\n var redcol_1;\r\n var redcol_2;\r\n var greencol_1;\r\n var greencol_2;\r\n var bluecol_1;\r\n var bluecol_2;\r\n var red = 0;\r\n var green = 0;\r\n var blue = 0;\r\n\r\n if (score >= 50) {\r\n red = Math.round(255 - ((score - 50) * (255 / 50)));\r\n } else {\r\n red = 255;\r\n }\r\n\r\n if (score <= 50) {\r\n green = Math.round(255 - ((50 - score) * (255 / 50)));\r\n } else {\r\n green = 255;\r\n }\r\n\r\n redcol_1 = hexc[Math.floor(red / 16)];\r\n redcol_2 = hexc[red % 16];\r\n\r\n greencol_1 = hexc[Math.floor(green / 16)];\r\n greencol_2 = hexc[green % 16];\r\n\r\n bluecol_1 = hexc[Math.floor(blue / 16)];\r\n bluecol_2 = hexc[blue % 16];\r\n\r\n return '#' + redcol_1 + redcol_2 + greencol_1 + greencol_2 + bluecol_1 + bluecol_2\r\n}\r\n\r\nfunction pass_chkPassKeyPress(pwd, id) {\r\n var val = document.getElementById(id);\r\n val.isvalid = pass_chkPass(pwd, id);\r\n ValidatorUpdateDisplay(val);\r\n if (val.parent != undefined && val.parent != '') {\r\n val.parentObj = document.all ? document.all[val.parent] : document.getElementById(val.parent)\r\n RocktimeValidateEx(val.parentObj);\r\n };\r\n}\r\n\r\nfunction pass_chkPass(pwd, id) {\r\n\r\n var oHelp = $('#pass_help_' + id);\r\n var oScore = $('#pass_score_' + id);\r\n\r\n if (pwd == '') { oScore.hide(); oHelp.hide(); return true; }\r\n oScore.show();\r\n oHelp.show();\r\n\r\n var pass_DisplayType = eval('pass_DisplayType_' + id);\r\n var pass_UseHelp = eval('pass_UseHelp_' + id);\r\n var pass_ShowOk = eval('pass_ShowOk_' + id);\r\n var pass_Standards = eval('pass_Standards_' + id);\r\n var pass_Complexities = eval('pass_Complexities_' + id);\r\n var pass_ComplexityThresholds = eval('pass_ComplexityThresholds_' + id);\r\n var pass_Mins = eval('pass_Mins_' + id);\r\n\r\n // Simultaneous variable declaration and value assignment aren't supported in IE apparently\r\n // so I'm forced to assign the same value individually per var to support a crappy browser *sigh* \r\n var nScore = 0, nLength = 0, nAlphaUC = 0, nAlphaLC = 0, nNumber = 0, nSymbol = 0, nMidChar = 0, nUnqChar = 0, nRepChar = 0, nRepInc = 0, nConsecAlphaUC = 0, nConsecAlphaLC = 0, nConsecNumber = 0, nConsecSymbol = 0, nConsecCharType = 0, nSeqAlpha = 0, nSeqNumber = 0, nSeqSymbol = 0, nSeqChar = 0, nReqChar = 0, nMultConsecCharType = 0;\r\n var nMultMidChar = 2, nMultConsecAlphaUC = 2, nMultConsecAlphaLC = 2, nMultConsecNumber = 2;\r\n var nMultSeqAlpha = 3, nMultSeqNumber = 3, nMultSeqSymbol = 3;\r\n var nMultLength = 4, nMultNumber = 4;\r\n var nMultSymbol = 6;\r\n var nTmpAlphaUC = \"\", nTmpAlphaLC = \"\", nTmpNumber = \"\", nTmpSymbol = \"\";\r\n var sAlphas = \"abcdefghijklmnopqrstuvwxyzqwertyuiopasdfghjklzxcvbnm\";\r\n var sNumerics = \"01234567890\";\r\n var sSymbols = \")!@#$%^&*()!\\\"�$%\";\r\n\r\n var sComplexity = \"\";\r\n var sStandard = \"\";\r\n\r\n //if (document.all) { var nd = 0; } else { var nd = 1; }\r\n\r\n if (!pwd) {\r\n /* Display default score criteria to client */\r\n oScore.css({ 'backgroundColor': pass_getBackgroundcolor(0) });\r\n switch (pass_DisplayType) {\r\n case 0:\r\n oScore.text(pass_Complexities[0] + ' (0%)');\r\n break;\r\n\r\n case 1:\r\n oScore.text(pass_Complexities[0]);\r\n break;\r\n\r\n case 2:\r\n oScore.text('0%');\r\n break;\r\n case 3:\r\n oScore.text(' ');\r\n break;\r\n }\r\n if (pass_UseHelp) { oHelp.html(\"\"); }\r\n return false;\r\n }\r\n\r\n\r\n nScore = parseInt(pwd.length * nMultLength);\r\n nLength = pwd.length;\r\n var arrPwd = pwd.replace(/\\s+/g, \"\").split(/\\s*/);\r\n var arrPwdLen = arrPwd.length;\r\n\r\n /* Loop through password to check for Symbol, Numeric, Lowercase and Uppercase pattern matches */\r\n for (var a = 0; a < arrPwdLen; a++) {\r\n if (arrPwd[a].match(/[A-Z]/g)) {\r\n if (nTmpAlphaUC !== \"\") { if ((nTmpAlphaUC + 1) == a) { nConsecAlphaUC++; nConsecCharType++; } }\r\n nTmpAlphaUC = a;\r\n nAlphaUC++;\r\n }\r\n else if (arrPwd[a].match(/[a-z]/g)) {\r\n if (nTmpAlphaLC !== \"\") { if ((nTmpAlphaLC + 1) == a) { nConsecAlphaLC++; nConsecCharType++; } }\r\n nTmpAlphaLC = a;\r\n nAlphaLC++;\r\n }\r\n else if (arrPwd[a].match(/[0-9]/g)) {\r\n if (a > 0 && a < (arrPwdLen - 1)) { nMidChar++; }\r\n if (nTmpNumber !== \"\") { if ((nTmpNumber + 1) == a) { nConsecNumber++; nConsecCharType++; } }\r\n nTmpNumber = a;\r\n nNumber++;\r\n }\r\n //else if (arrPwd[a].match(/[^a-zA-Z0-9_]/g)) {\r\n else {\r\n if (a > 0 && a < (arrPwdLen - 1)) { nMidChar++; }\r\n if (nTmpSymbol !== \"\") { if ((nTmpSymbol + 1) == a) { nConsecSymbol++; nConsecCharType++; } }\r\n nTmpSymbol = a;\r\n nSymbol++;\r\n }\r\n /* Internal loop through password to check for repeat characters */\r\n var bCharExists = false;\r\n for (var b = 0; b < arrPwdLen; b++) {\r\n if (arrPwd[a] == arrPwd[b] && a != b) { /* repeat character exists */\r\n bCharExists = true;\r\n /* \r\n Calculate increment deduction based on proximity to identical characters\r\n Deduction is incremented each time a new match is discovered\r\n Deduction amount is based on total password length divided by the\r\n difference of distance between currently selected match\r\n */\r\n nRepInc += Math.abs(arrPwdLen / (b - a));\r\n }\r\n }\r\n if (bCharExists) {\r\n nRepChar++;\r\n nUnqChar = arrPwdLen - nRepChar;\r\n nRepInc = (nUnqChar) ? Math.ceil(nRepInc / nUnqChar) : Math.ceil(nRepInc);\r\n }\r\n }\r\n\r\n /* Check for sequential alpha string patterns (forward and reverse) */\r\n for (var s = 0; s < 49; s++) {\r\n var sFwd = sAlphas.substring(s, parseInt(s + 3));\r\n var sRev = sFwd.strReverse();\r\n if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) { nSeqAlpha++; nSeqChar++; }\r\n }\r\n\r\n /* Check for sequential numeric string patterns (forward and reverse) */\r\n for (var s = 0; s < 8; s++) {\r\n var sFwd = sNumerics.substring(s, parseInt(s + 3));\r\n var sRev = sFwd.strReverse();\r\n if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) { nSeqNumber++; nSeqChar++; }\r\n }\r\n\r\n /* Check for sequential symbol string patterns (forward and reverse) */\r\n for (var s = 0; s < 13; s++) {\r\n var sFwd = sSymbols.substring(s, parseInt(s + 3));\r\n var sRev = sFwd.strReverse();\r\n if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) { nSeqSymbol++; nSeqChar++; }\r\n }\r\n\r\n /* Modify overall score value based on usage vs requirements */\r\n var nTypes = 0;\r\n\r\n /* General point assignment */\r\n if (nAlphaUC > 0) {\r\n nScore = parseInt(nScore + ((nLength - nAlphaUC) * 2));\r\n nTypes += 1;\r\n }\r\n if (nAlphaLC > 0) {\r\n nScore = parseInt(nScore + ((nLength - nAlphaLC) * 2));\r\n nTypes += 1;\r\n }\r\n if (nNumber > 0) {\r\n nScore = parseInt(nScore + (nNumber * nMultNumber));\r\n nTypes += 1;\r\n }\r\n if (nSymbol > 0) {\r\n nScore = parseInt(nScore + (nSymbol * nMultSymbol));\r\n nTypes += 1;\r\n }\r\n if (nMidChar > 0) {\r\n nScore = parseInt(nScore + (nMidChar * nMultMidChar));\r\n }\r\n\r\n /* Point deductions for poor practices */\r\n if ((nAlphaLC > 0 || nAlphaUC > 0) && nSymbol === 0 && nNumber === 0) { // Only Letters\r\n nScore = parseInt(nScore - nLength);\r\n }\r\n if (nAlphaLC === 0 && nAlphaUC === 0 && nSymbol === 0 && nNumber > 0) { // Only Numbers\r\n nScore = parseInt(nScore - nLength);\r\n }\r\n if (nRepChar > 0) { // Same character exists more than once\r\n nScore = parseInt(nScore - nRepInc);\r\n }\r\n if (nConsecAlphaUC > 0) { // Consecutive Uppercase Letters exist\r\n nScore = parseInt(nScore - (nConsecAlphaUC * nMultConsecAlphaUC));\r\n }\r\n if (nConsecAlphaLC > 0) { // Consecutive Lowercase Letters exist\r\n nScore = parseInt(nScore - (nConsecAlphaLC * nMultConsecAlphaLC));\r\n }\r\n if (nConsecNumber > 0) { // Consecutive Numbers exist\r\n nScore = parseInt(nScore - (nConsecNumber * nMultConsecNumber));\r\n }\r\n if (nSeqAlpha > 0) { // Sequential alpha strings exist (3 characters or more)\r\n nScore = parseInt(nScore - (nSeqAlpha * nMultSeqAlpha));\r\n }\r\n if (nSeqNumber > 0) { // Sequential numeric strings exist (3 characters or more)\r\n nScore = parseInt(nScore - (nSeqNumber * nMultSeqNumber));\r\n }\r\n if (nSeqSymbol > 0) { // Sequential symbol strings exist (3 characters or more)\r\n nScore = parseInt(nScore - (nSeqSymbol * nMultSeqSymbol));\r\n }\r\n\r\n sStandard = \"\";\r\n //pass_Standards (0\"length\", 1\"score\", 2\"upper case chars\", 3\"lower case chars\", 4\"numbers\", 5\"symbols\", 6\"%\", 7\"Ok\", 8\"You need to meet the following minimums:\",);\r\n\r\n var penaltyOffset = pass_Mins[0] + pass_Mins[2] + pass_Mins[3] + pass_Mins[4] + pass_Mins[5];\r\n if (!penaltyOffset == 0) { penaltyOffset = 40 / penaltyOffset; }\r\n if (nScore > 100) { nScore = 100; } //ensures you can never get 100% if all criteria aren't met\r\n\r\n\r\n if (nLength < pass_Mins[0]) {\r\n nScore -= (penaltyOffset * (pass_Mins[0] - nLength));\r\n sStandard += pass_createError(nLength, 0, pass_Standards, pass_Mins);\r\n }\r\n\r\n if (nAlphaUC < pass_Mins[2]) {\r\n nScore -= (penaltyOffset * (pass_Mins[2] - nAlphaUC));\r\n sStandard += pass_createError(nAlphaUC, 2, pass_Standards, pass_Mins);\r\n }\r\n\r\n if (nAlphaLC < pass_Mins[3]) {\r\n nScore -= (penaltyOffset * (pass_Mins[3] - nAlphaLC));\r\n sStandard += pass_createError(nAlphaLC, 3, pass_Standards, pass_Mins);\r\n }\r\n\r\n if (nNumber < pass_Mins[4]) {\r\n nScore -= (penaltyOffset * (pass_Mins[4] - nNumber));\r\n sStandard += pass_createError(nNumber, 4, pass_Standards, pass_Mins);\r\n }\r\n\r\n if (nSymbol < pass_Mins[5]) {\r\n nScore -= (penaltyOffset * (pass_Mins[5] - nSymbol));\r\n sStandard += pass_createError(nSymbol, 5, pass_Standards, pass_Mins);\r\n }\r\n\r\n if (nTypes < pass_Mins[6]) {\r\n nScore -= (10 * (pass_Mins[6] - nTypes));\r\n sStandard += pass_createError(nTypes, 6, pass_Standards, pass_Mins);\r\n }\r\n\r\n nScore = Math.round(nScore);\r\n\r\n if (nScore > 100) { nScore = 100; } else if (nScore < 0) { nScore = 0; }\r\n if (nScore < pass_Mins[1]) {\r\n sStandard += pass_createError(nScore, 1, pass_Standards, pass_Mins);\r\n }\r\n\r\n var isValid;\r\n if (sStandard == \"\") {\r\n if (pass_ShowOk == 1) {\r\n sStandard = '' + pass_Standards[7] + '';\r\n } else {\r\n sStandard = '';\r\n }\r\n isValid = true;\r\n } else {\r\n sStandard = '' + pass_Standards[8] + ''\r\n isValid = false;\r\n }\r\n\r\n //for color tesing\r\n //nScore = nLength * 1;\r\n\r\n /* Determine complexity based on overall score */\r\n if (nScore >= 0 && nScore < pass_ComplexityThresholds[0]) { sComplexity = pass_Complexities[0]; }\r\n else if (nScore >= pass_ComplexityThresholds[0] && nScore < pass_ComplexityThresholds[1]) { sComplexity = pass_Complexities[1]; }\r\n else if (nScore >= pass_ComplexityThresholds[1] && nScore < pass_ComplexityThresholds[2]) { sComplexity = pass_Complexities[2]; }\r\n else if (nScore >= pass_ComplexityThresholds[2] && nScore < pass_ComplexityThresholds[3]) { sComplexity = pass_Complexities[3]; }\r\n else if (nScore >= pass_ComplexityThresholds[3] && nScore <= 100) { sComplexity = pass_Complexities[4]; }\r\n\r\n /* Display updated score criteria to client */\r\n oScore.css({ 'backgroundColor': pass_getBackgroundcolor(nScore) });\r\n if (pass_UseHelp) { oHelp.html(sStandard); }\r\n switch (pass_DisplayType) {\r\n case 0:\r\n oScore.text(sComplexity + ' (' + nScore + \"%)\");\r\n break;\r\n\r\n case 1:\r\n oScore.text(sComplexity);\r\n break;\r\n\r\n case 2:\r\n oScore.text(nScore + \"%\");\r\n break;\r\n\r\n case 3:\r\n oScore.text(' ');\r\n break;\r\n }\r\n return isValid;\r\n}","var rtSessionTimer = function () {\r\n var rtNow;\r\n var rtServerTime;\r\n var rtEnd;\r\n var rtWarningTimer = 60;\r\n var rtUIWarningTimer = 300;\r\n var rtSessionLength = 1200;\r\n var rtLoggedIn = false;\r\n var rtUseUIWarning = false;\r\n var rtTimeOffset = 0;\r\n var rtTime = 0;\r\n var rtRemaining = 0;\r\n var rtGetDataWait = 600;\r\n var rtUseTitle = false;\r\n var rtTitle = \"\";\r\n var rtColorBoxIsOpen = false;\r\n var rtControl = false;\r\n var rtTimerId;\r\n var rtLastLoggedInState = false;\r\n var rtDebugMode = 'N';\r\n\r\n if (typeof jQuery == 'undefined') return;\r\n\r\n $.get(rtGetLocation(\"S\"), function (data) {\r\n rtTitle = document.title;\r\n rtNow = new Date().getTime();\r\n rtServerTime = rtNow;\r\n rtEnd = rtNow;\r\n rtProcessData(data);\r\n rtCalcWait();\r\n rtTimerId = window.setInterval(rtAction, 200);\r\n $(\"a.rtSessionContinue\").click(function () { rtContinue(); });\r\n $(\"a.rtSessionLogout\").click(function () { rtLogout(); });\r\n $(\"a.rtSessionContinue\").attr(\"href\", \"javascript:void(0);\");\r\n $(\"a.rtSessionLogout\").attr(\"href\", \"javascript:void(0);\");\r\n\r\n }, \"html\")\r\n\r\n function rtAction() {\r\n rtGetDataWait -= 1;\r\n rtUpdateDivs(false);\r\n if (rtGetDataWait > 0) return\r\n rtCalcWait();\r\n $.get(rtGetLocation(\"S\"), function (data) { rtProcessData(data, false) }, \"html\");\r\n }\r\n\r\n function dyingBreath() {\r\n $.get(rtGetLocation(\"S\"), function (data) { rtProcessData(data, true) }, \"html\");\r\n }\r\n\r\n function rtGetLocation(mode) {\r\n return \"/RocktimeCore.Session.ashx?mode=\" + mode + \"&location=\" + encodeURIComponent(window.location.pathname);\r\n }\r\n\r\n function rtCalcWait() {\r\n rtGetDataWait = ((rtEnd - rtNow) / 1000) - rtUIWarningTimer - 10;\r\n if (rtSessionLength < rtGetDataWait) { rtGetDataWait = rtSessionLength - 10; }\r\n if (rtLoggedIn && rtGetDataWait > 30) { rtGetDataWait = 30; }\r\n if (rtRemaining < rtUIWarningTimer + 20) { rtGetDataWait = 10; }\r\n if (rtRemaining < rtWarningTimer + 4) { rtGetDataWait = 2; }\r\n if (rtRemaining < 10) { rtGetDataWait = 1; }\r\n rtGetDataWait = Math.floor(rtGetDataWait * 5);\r\n }\r\n\r\n function rtProcessData(data, isDyingBreath) {\r\n var dataParts = data.split(\",\");\r\n rtServerTime = parseInt(dataParts[0]);\r\n rtEnd = parseInt(dataParts[1]);\r\n rtWarningTimer = parseInt(dataParts[2]);\r\n rtUIWarningTimer = parseInt(dataParts[3]);\r\n rtLoggedIn = (dataParts[4] == \"True\");\r\n rtUseUIWarning = (dataParts[5] == \"True\");\r\n rtUseTitle = (dataParts[6] == \"True\");\r\n rtSessionLength = parseInt(dataParts[7]);\r\n rtControl = (dataParts[8] == \"True\");\r\n rtDebugMode = dataParts[9];\r\n rtTimeOffset = rtServerTime - rtNow;\r\n if (rtLoggedIn) rtLastLoggedInState = true\r\n rtUpdateDivs(isDyingBreath);\r\n if (isDyingBreath && rtRemaining <= 0) rtLogout()\r\n }\r\n\r\n function rtUpdateDivs(isDyingBreath) {\r\n rtNow = new Date().getTime()\r\n rtTime = rtEnd - rtNow;\r\n rtRemaining = Math.floor((rtTime - rtTimeOffset) / 1000);\r\n if (!isDyingBreath && rtRemaining <= 0) dyingBreath(); //check to see if the session has been updated\r\n\r\n //document.title = rtTitle + \" (\" + rtFormatTime(rtRemaining) + \")\" + rtGetDataWait; //Ajax Call Timer Showing (Debug)\r\n if (rtUseTitle) document.title = rtTitle + \" (\" + rtFormatTime(rtRemaining) + \")\"; //Normal Operation\r\n\r\n if (rtDebugMode == 'N' && !rtLoggedIn) {\r\n if (rtLastLoggedInState) rtLogout()\r\n return;\r\n }\r\n rtSetTime(\"#rtUIDialogTime\");\r\n rtShow(\"#rtUIDialog\", (rtRemaining > rtWarningTimer) && rtDebugMode != 'P', true)\r\n\r\n if (!rtUseUIWarning || rtGetLocation == \"C\") { return; }\r\n rtSetTime(\"#rtUIWarningTime\");\r\n rtShow(\"#rtUIWarning\", (rtRemaining > rtUIWarningTimer) && rtDebugMode != 'B', false);\r\n }\r\n\r\n function rtShow(divId, divHide, useColorBox) {\r\n if ($(divId).length = 0) { return; }\r\n if (useColorBox) {\r\n if (divHide) { if (rtColorBoxIsOpen) { $.colorbox.close(); } }\r\n else {\r\n if (!rtColorBoxIsOpen) {\r\n $.colorbox(\r\n {\r\n close: \"\",\r\n escKey: false,\r\n overlayClose: false,\r\n inline: true,\r\n href: divId,\r\n onOpen: function () { rtColorBoxIsOpen = true; },\r\n onCleanup: function () { rtContinue(); },\r\n onClosed: function () { rtColorBoxIsOpen = false; }\r\n }\r\n );\r\n }\r\n }\r\n }\r\n else {\r\n if (divHide) { $(divId).hide(); }\r\n else { $(divId).show(); }\r\n }\r\n }\r\n\r\n function rtSetTime(divId) {\r\n if ($(divId).length = 0) { return; }\r\n $(divId).html(rtFormatTime(rtRemaining));\r\n }\r\n\r\n function rtFormatTime(timeSecs) {\r\n if (Number.isNaN(timeSecs)) return '0:00';\r\n if (timeSecs < 0) return '0:00';\r\n return Math.floor(timeSecs / 60) + ':' + (timeSecs % 60).toFixed().pad(2, '0');\r\n }\r\n\r\n function rtContinue() {\r\n $.get(rtGetLocation(\"R\"), function () { rtGetDataWait = -1; rtAction(); });\r\n }\r\n\r\n function rtLogout() {\r\n rtRemaining = -1;\r\n rtLastLoggedInState = false;\r\n clearInterval(rtTimerId);\r\n if (rtLoggedIn || rtControl) document.location = rtGetLocation(\"L\"); //Go to logout page for control and logged in site\r\n else $.get(rtGetLocation(\"E\")); // just kill session for non logged in\r\n }\r\n\r\n String.prototype.pad = function (l, s) {\r\n return (l -= this.length) > 0 ? (s = new Array(Math.ceil(l / s.length) + 1).join(s)).substr(0, s.length) + this + s.substr(0, l - s.length) : this;\r\n }\r\n};","\r\nfunction getTwitterTweets(listId, screenName, tweetCount, includeRetweets) {\r\n $.ajax({\r\n url: \"/twitter.ashx?fdScreenName=\" + screenName + \"&fdTweetCount=\" + tweetCount + \"&fdIncludeRetweets=\" + includeRetweets,\r\n contentType: \"application/json; charset=utf-8\",\r\n dataType: \"json\",\r\n responseType: \"json\",\r\n success: twitterCallback\r\n })\r\n\r\n function twitterCallback(twitters) {\r\n var statusHTML = [];\r\n for (var i = 0; i < twitters.length; i++) {\r\n var username = twitters[i].user.screen_name;\r\n var status = twitters[i].text.replace(/((https?|s?ftp|ssh)\\:\\/\\/[^\"\\s\\<\\>]*[^.,;'\">\\:\\s\\<\\>\\)\\]\\!])/g, function (url) {\r\n return '' + url + '';\r\n }).replace(/\\B@([_a-z0-9]+)/ig, function (reply) {\r\n return reply.charAt(0) + '' + reply.substring(1) + '';\r\n });\r\n statusHTML.push('
  • ' + status + ' ' + relative_time(twitters[i].created_at) + '
  • ');\r\n }\r\n document.getElementById(listId).innerHTML = statusHTML.join('');\r\n }\r\n\r\n function relative_time(time_value) {\r\n var values = time_value.split(\" \");\r\n time_value = values[1] + \" \" + values[2] + \", \" + values[5] + \" \" + values[3];\r\n var parsed_date = Date.parse(time_value);\r\n var relative_to = (arguments.length > 1) ? arguments[1] : new Date();\r\n var delta = parseInt((relative_to.getTime() - parsed_date) / 1000);\r\n delta = delta + (relative_to.getTimezoneOffset() * 60);\r\n\r\n if (delta < 60) {\r\n return 'less than a minute ago';\r\n } else if (delta < 120) {\r\n return 'about a minute ago';\r\n } else if (delta < (60 * 60)) {\r\n return (parseInt(delta / 60)).toString() + ' minutes ago';\r\n } else if (delta < (120 * 60)) {\r\n return 'about an hour ago';\r\n } else if (delta < (24 * 60 * 60)) {\r\n return 'about ' + (parseInt(delta / 3600)).toString() + ' hours ago';\r\n } else if (delta < (48 * 60 * 60)) {\r\n return '1 day ago';\r\n } else {\r\n return (parseInt(delta / 86400)).toString() + ' days ago';\r\n }\r\n }\r\n};\r\n\r\n","//\r\n//Trigger Validate\r\n//\r\nfunction RocktimeValidate(ValidatorName) {\r\n var validator = document.getElementById(ValidatorName);\r\n ValidatorValidate(validator);\r\n}\r\n\r\nfunction Page_ClientValidateByControl(controlId) {\r\n if (typeof (Page_InvalidControlToBeFocused) !== \"undefined\") { Page_InvalidControlToBeFocused = null; }\r\n if (typeof (Page_Validators) == \"undefined\") { return true; }\r\n var i;\r\n for (i = 0; i < Page_Validators.length; i++) {\r\n if (Page_Validators[i].controltovalidate == controlId) {\r\n ValidatorValidate(Page_Validators[i]);\r\n return;\r\n }\r\n }\r\n\r\n}\r\n\r\n\r\n//\r\n//Custom Result Processing\r\n//\r\nfunction RocktimeCustomResultProcessing(val) {\r\n if (val.customResultProcessingJavascriptFunction == undefined | val.customResultProcessingJavascriptFunction == '') { return; }\r\n var value = ValidatorGetValue(val.controltovalidate);\r\n value = eval(val.customResultProcessingJavascriptFunction + '(value)');\r\n if (value != undefined) { document.getElementById(val.controltovalidate).value = value };\r\n}\r\n\r\n//\r\n//Core\r\n//\r\nfunction RocktimeValidateEx(val) {\r\n val.isvalid = true;//GetCoreIsValid(val);\r\n return val.isvalid;//true;//prevents default behaviour for core validator\r\n}\r\n\r\n//\r\n//DropDownList\r\n//\r\nfunction RocktimeDropDownListValidatorIsValid(val) {\r\n var value = ValidatorGetValue(val.controltovalidate);\r\n if (val.allowCustomText == \"true\") { return (value != val.invalidValue); }\r\n if (val.isLoadOnDemand == \"true\") { return (value != val.invalidValue); }\r\n if (val.isDropDownList == \"true\") { return (value != val.invalidValue); }\r\n\r\n if (val.isRadDropDownList == \"true\") {\r\n var raddropdownlist = $find(val.controltovalidate);\r\n return (raddropdownlist.get_selectedItem().get_value() != val.invalidValue);\r\n }\r\n\r\n var combo = $find(val.controltovalidate);\r\n var text;\r\n if (combo == null) {\r\n combo = $(\"#\" + val.controltovalidate);\r\n text = combo.val();\r\n return (value != val.invalidValue);\r\n }\r\n\r\n text = combo.get_text();\r\n if (text.length < 1) { return false; }\r\n\r\n var node = combo.findItemByText(text);\r\n if (!node) {\r\n value = combo._value;\r\n return (value != val.invalidValue);\r\n }\r\n\r\n //if (value == node.get_value()) { return true; }//assumes that the please select is not an item\r\n value = node.get_value();\r\n return (value != val.invalidValue);\r\n}\r\n\r\n//\r\n//CheckBox\r\n//\r\nfunction RocktimeCheckBoxValidatorIsValid(val) {\r\n if (val.testType == 'CheckBox') {\r\n return $(\"#\" + val.controltovalidate).is(':checked');\r\n }\r\n var checkBoxCount = 0;\r\n if (val.testType == \"CheckBoxList\") {\r\n $(\"#\" + val.controltovalidate).find(\":checkbox\").each(function () {\r\n if ($(this).is(\":checked\")) { checkBoxCount++; }\r\n });\r\n } else if (val.testType == \"RadListBox\") {\r\n $(\"#\" + val.controltovalidate).find(\":checkbox\").each(function () {\r\n if ($(this).is(\":checked\")) { checkBoxCount++; }\r\n });\r\n } else {\r\n var value = ValidatorGetValue(val.controltovalidate);\r\n if (ValidatorTrim(value).length == 0) { checkBoxCount = 0; }\r\n else { checkBoxCount = value.split(\",\").length; }\r\n }\r\n\r\n if (val.requiredChecked == 'false' && checkBoxCount == 0) { return true; }\r\n if (val.minimumChecked == '' && val.maximumChecked == '') { return true; }\r\n if (val.minimumChecked == '' && checkBoxCount <= val.maximumChecked) { return true; }\r\n if (val.maximumChecked == '' && checkBoxCount >= val.minimumChecked) { return true; }\r\n return (checkBoxCount <= val.maximumChecked && checkBoxCount >= val.minimumChecked);\r\n}\r\n\r\n//\r\n//ListBox\r\n//\r\nfunction RocktimeListBoxValidatorIsValid(val) {\r\n var checkBoxCount = 0;\r\n\r\n if ($(\"#\" + val.controltovalidate + \"_ClientState\").length == 0) {\r\n $(\"#\" + val.controltovalidate).find(\"option\").each(function () {\r\n if ($(this).is(\":selected\")) { checkBoxCount++; }\r\n });\r\n }\r\n else {\r\n checkBoxCount = $(\"#\" + val.controltovalidate + \" .rlbSelected\").length\r\n }\r\n if (val.minimumSelected == '' && val.maximumSelected == '') { return true; }\r\n if (val.minimumSelected == '' && checkBoxCount <= val.maximumSelected) { return true; }\r\n if (val.maximumSelected == '' && checkBoxCount >= val.minimumSelected) { return true; }\r\n return (checkBoxCount <= val.maximumSelected && checkBoxCount >= val.minimumSelected);\r\n}\r\n\r\n//\r\n//RadioButton\r\n//\r\nfunction RocktimeRadioButtonRequiredValidatorIsValid(val) {\r\n var checkedClassName = val.checkedClassName;\r\n var controlToValidate = $(\"#\" + val.controltovalidate);\r\n var checkedOptions = controlToValidate.find(\".\" + checkedClassName);\r\n return (checkedOptions.length == 1);\r\n}\r\n\r\n//\r\n//TextBox Length\r\n//\r\nfunction RocktimeTextBoxLengthValidatorIsValid(val) {\r\n var value = ValidatorGetValue(val.controltovalidate);\r\n if (ValidatorTrim(value).length == 0) { return true; }\r\n if (val.minimumlength == '' && val.maximumlength == '') { return true; }\r\n if (val.minimumlength == '' && value.length <= val.maximumlength) { return true; }\r\n if (val.maximumlength == '' && value.length >= val.minimumlength) { return true; }\r\n return (value.length <= val.maximumlength && value.length >= val.minimumlength);\r\n}\r\n\r\n//\r\n//TextBox Required\r\n//\r\nfunction RocktimeTextBoxRequiredValidatorIsValid(val) {\r\n if (val.IsFileUploadEx == \"true\") {\r\n if (val.FileExists == \"true\") { return true; }\r\n }\r\n var value;\r\n if (val.IsWYSIWYG == \"true\") {\r\n value = $find(val.controltovalidate).get_html();\r\n value = value.replace(/[ \\n\\r\\t]|<[^>]+>| /gmi, '');\r\n value = ValidatorTrim(value);\r\n return (value.length != 0) && (value != ValidatorTrim(val.initialValue));\r\n }\r\n value = ValidatorGetValue(val.controltovalidate);\r\n return (ValidatorTrim(value).length != 0) && (ValidatorTrim(value) != ValidatorTrim(val.initialValue))\r\n}\r\n\r\n//\r\n//TextBox Password Strength\r\n//\r\nfunction RocktimePasswordStrengthValidatorIsValid(val) {\r\n var value = ValidatorGetValue(val.controltovalidate);\r\n return pass_chkPass(value, val.id);\r\n}\r\n\r\n//\r\n//TextBox Numeric\r\n//\r\nfunction RocktimeNumericValidatorIsValid(val) {\r\n return RocktimeNumericValidatorAction(val.controltovalidate, (val.allowdecimal == \"true\"), val.fieldErrorClass);\r\n}\r\n\r\nfunction RocktimeNumericValidatorAction(id, allowDecimal, fieldErrorClass) {\r\n var result;\r\n var val = $(\"#\" + id).val();\r\n val = val.replace(/,/g, \"\");\r\n if (val == \"\") {\r\n result = true;\r\n } else {\r\n if (allowDecimal) { result = $.isNumeric(val); }\r\n else { result = isInt(val); }\r\n }\r\n\r\n if (result) {\r\n $('#' + id).removeClass(fieldErrorClass);\r\n } else {\r\n $('#' + id).addClass(fieldErrorClass);\r\n }\r\n return result;\r\n}\r\n\r\nfunction isInt(n) {\r\n return parseFloat(n) == parseInt(n, 10) && !isNaN(n);\r\n}\r\n\r\n//\r\n//TextBox Time\r\n//\r\nfunction RocktimeTimeValidatorIsValid(val) {\r\n var value = ValidatorGetValue(val.controltovalidate);\r\n if (value == \"\") { return true; }\r\n if (!RocktimeTimeValidatorValidateTime(value)) { return false; }\r\n if (val.minimumtime == '' && val.maximumtime == '') { return true; }\r\n if (val.minimumtime == '' && RocktimeTimeValidatorGetTime(value) <= RocktimeTimeValidatorGetTime(val.maximumtime)) { return true; }\r\n if (val.maximumtime == '' && RocktimeTimeValidatorGetTime(value) >= RocktimeTimeValidatorGetTime(val.minimumtime)) { return true; }\r\n return (RocktimeTimeValidatorGetTime(value) <= RocktimeTimeValidatorGetTime(val.maximumtime)) && RocktimeTimeValidatorGetTime(value) >= RocktimeTimeValidatorGetTime(val.minimumtime);\r\n}\r\n\r\nfunction RocktimeTimeValidatorGetTime(Time) {\r\n var Parts;\r\n\r\n if (Time.indexOf(\"-\") != -1) {\r\n Parts = Time.split(\"-\");\r\n return new Date(2000, 1, 1, Parts[3], Parts[4], Parts[5]);\r\n }\r\n\r\n Parts = Time.split(\":\");\r\n\r\n if (Parts.length == 2) { return new Date(2000, 1, 1, Parts[0], Parts[1], 0); }\r\n if (Parts[2].indexOf(\".\") != -1) { return new Date(2000, 1, 1, Parts[0], Parts[1], Parts[2]); }\r\n\r\n var Seconds = Parts[2].split(\".\");\r\n return new Date(2000, 1, 1, Parts[0], Parts[1], Seconds[0], Seconds[1]);\r\n\r\n}\r\n\r\nfunction RocktimeTimeValidatorValidateTime(Time) {\r\n\r\n var Parts;\r\n if (Time.indexOf(\"-\") != -1) {\r\n Parts = Time.split(\"-\");\r\n return (Parts.length == 6);\r\n\r\n }\r\n\r\n Parts = Time.split(\":\")\r\n if (Parts.length == 2) {\r\n if (Parts[0] < 0) { return false };\r\n if (Parts[0] > 23) { return false };\r\n if (Parts[1] < 0) { return false };\r\n if (Parts[1] > 59) { return false };\r\n return true;\r\n }\r\n if (Parts.length == 3) {\r\n if (Parts[0] < 0) { return false };\r\n if (Parts[0] > 23) { return false };\r\n if (Parts[1] < 0) { return false };\r\n if (Parts[1] > 59) { return false };\r\n if (Parts[2] < 0) { return false };\r\n if (Parts[2] >= 60) { return false };\r\n return true;\r\n }\r\n return false;\r\n\r\n}\r\n\r\nfunction RocktimeTimeValidateControl(controlToValidateId) {\r\n var validator = document.getElementById(controlToValidateId);\r\n RocktimeValidateEx(validator);\r\n}\r\n\r\n//\r\n//TextBox Regular Expression\r\n//\r\nfunction RocktimeRegularExpressionValidatorEvaluateIsValid(val) {\r\n var value = ValidatorGetValue(val.controltovalidate);\r\n switch (val.setCase) {\r\n case \"u\": value = value.toUpperCase(); break;\r\n case \"l\": value = value.toLowerCase(); break;\r\n }\r\n if (val.removeChars != '') {\r\n var pattern = new RegExp('[' + val.removeChars + ']', 'gmi');\r\n value = value.replace(pattern, '');\r\n }\r\n if (ValidatorTrim(value).length == 0)\r\n return true;\r\n var rx = new RegExp(val.validationexpression);\r\n var matches = rx.exec(value);\r\n return (matches != null && value == matches[0]);\r\n}\r\n\r\n//\r\n//TextBox Compare\r\n//\r\nfunction CompareValidatorEvaluateIsValidEx(val) {\r\n var result = CompareValidatorEvaluateIsValid(val)\r\n return result;\r\n\r\n}\r\n\r\n//\r\n//TextBox Compare Ajax\r\n//\r\nfunction RocktimeAjaxValidatorEvaluateIsValid(val) {\r\n return (val.ajaxIsValid.toLowerCase() == 'true');\r\n}\r\n\r\nfunction RocktimeAjaxValidatorKeyUp(val, controlToValidateId) {\r\n val = document.getElementById(controlToValidateId);//Reconect val to validator span after ajax call\r\n if (val.timeoutId) { window.clearTimeout(val.timeoutId); }\r\n val.timeoutId = window.setTimeout(function () {\r\n var value = ValidatorGetValue(val.controltovalidate);\r\n eval(val.webFormDoCallback);\r\n }, 200);\r\n}\r\n\r\n// Called when result is returned from server\r\nfunction RocktimeAjaxValidatorResult(returnValue, val) {\r\n val.update = !(val.LastIsValid == returnValue) ? 'true' : 'false';\r\n val.ajaxIsValid = returnValue;\r\n val.LastIsValid = returnValue;\r\n val.isvalid = (val.ajaxIsValid.toLowerCase() == 'true');\r\n if (val.update == 'true') {\r\n ValidatorUpdateDisplay(val);\r\n if (val.parent != undefined && val.parent != '') {\r\n val.parentObj = document.all ? document.all[val.parent] : document.getElementById(val.parent)\r\n RocktimeValidateEx(val.parentObj);\r\n };\r\n }\r\n}\r\n\r\n// If there is an error, show it\r\nfunction RocktimeAjaxValidatorError(message, val) {\r\n alert('Error: ' + decodeHTML(message));\r\n val.ajaxIsValid = 'false';\r\n}\r\n\r\nvar decodeHTML = function (html) {\r\n var txt = document.createElement('textarea');\r\n txt.innerHTML = html;\r\n return txt.value;\r\n};\r\n","//\r\n//Intercept and extend ValidatorUpdateDisplay\r\n//\r\nvar ValidatorUpdateDisplaySaved;\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n if (typeof (ValidatorUpdateDisplay) == \"function\") {\r\n ValidatorUpdateDisplaySaved = ValidatorUpdateDisplay;\r\n ValidatorUpdateDisplay = ValidatorUpdateDisplayEx;\r\n }\r\n}\r\n)\r\n\r\nfunction ValidatorUpdateDisplayEx(val) {\r\n ValidatorUpdateDisplaySaved(val);\r\n RocktimeValidateExSetHighlight(getCoreValidator(val));\r\n if (!val.id.endsWith('_Core')) UpdateValidationSummariesAutoAction();\r\n return val.isvalid;\r\n}\r\n\r\n// \r\n//Core\r\n//\r\nfunction ValidatorValidateEx(val) {\r\n if ((typeof (Page_Validators) != \"undefined\") && (Page_Validators != null)) {\r\n for (var i = 0; i < Page_Validators.length; i++) {\r\n if (typeof (val.ValidatorExName) != \"undefined\") {\r\n if (val.ValidatorExName == Page_Validators[i].ValidatorExName && !Page_Validators[i].id.endsWith('_Core')) ValidatorValidate(Page_Validators[i]);\r\n }\r\n }\r\n }\r\n return;\r\n}\r\n\r\nfunction GetCoreIsValid(val) {\r\n if ((typeof (Page_Validators) != \"undefined\") && (Page_Validators != null)) {\r\n for (var i = 0; i < Page_Validators.length; i++) {\r\n if (typeof (val.ValidatorExName) != \"undefined\") {\r\n if (val.ValidatorExName == Page_Validators[i].ValidatorExName && val.id != Page_Validators[i].id) {\r\n if (!Page_Validators[i].isvalid) { return false; }\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\n\r\nfunction getCoreValidator(val) {\r\n if ((typeof (Page_Validators) != \"undefined\") && (Page_Validators != null)) {\r\n for (var i = 0; i < Page_Validators.length; i++) {\r\n if (typeof (val.ValidatorExName) != \"undefined\") {\r\n if (val.ValidatorExName == Page_Validators[i].ValidatorExName && Page_Validators[i].id.endsWith('_Core')) return Page_Validators[i];\r\n }\r\n }\r\n }\r\n return;\r\n}\r\n\r\n//\r\n//Misc\r\n//\r\nfunction IsValidationGroupValid(validationGroup) {\r\n if (!validationGroup) validationGroup = '';\r\n if (typeof (Page_Validators) == \"undefined\") return true;\r\n for (var i = 0; i < Page_Validators.length; i++) {\r\n var val = Page_Validators[i];\r\n var valValidationGroup = val.validationGroup;\r\n if (!valValidationGroup) valValidationGroup = '';\r\n if ((typeof (val.enabled) == \"undefined\" || val.enabled != false) && valValidationGroup == validationGroup) {\r\n if (!val.id.endsWith('_Core')) {\r\n if (!val.isvalid) return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\n\r\n//\r\n//Summary Error Highlighting\r\n//\r\nfunction UpdateValidationSummariesAutoAction() {\r\n if (typeof (Page_ValidationSummaries) == \"undefined\") return;\r\n var summary, sums, s;\r\n var headerSep, first, pre, post, end;\r\n for (sums = 0; sums < Page_ValidationSummaries.length; sums++) {\r\n summary = Page_ValidationSummaries[sums];\r\n if (!summary) continue;\r\n if (summary.AutoUpdateSummaryValidationMessages == 'true') {\r\n summary.style.display = \"none\";\r\n if (!IsValidationGroupValid(summary.validationGroup)) {\r\n var i;\r\n if (typeof (summary.showsummary) != \"undefined\") {\r\n if (summary.showsummary.toLowerCase() != \"false\") {\r\n summary.style.display = \"\";\r\n if (typeof (summary.displaymode) != \"string\") {\r\n summary.displaymode = \"BulletList\";\r\n }\r\n switch (summary.displaymode) {\r\n case \"List\":\r\n headerSep = \"
    \";\r\n first = \"\";\r\n pre = \"\";\r\n post = \"
    \";\r\n end = \"\";\r\n break;\r\n case \"BulletList\":\r\n default:\r\n headerSep = \"\";\r\n first = \"\";\r\n break;\r\n case \"SingleParagraph\":\r\n headerSep = \" \";\r\n first = \"\";\r\n pre = \"\";\r\n post = \" \";\r\n end = \"
    \";\r\n break;\r\n }\r\n s = \"\";\r\n if (typeof (summary.headertext) == \"string\") {\r\n s += summary.headertext + headerSep;\r\n }\r\n s += first;\r\n for (i = 0; i < Page_Validators.length; i++) {\r\n var summaryValidationGroup = summary.validationGroup;\r\n if (!summaryValidationGroup) summaryValidationGroup = '';\r\n var valValidationGroup = Page_Validators[i].validationGroup;\r\n if (!valValidationGroup) valValidationGroup = '';\r\n if (!Page_Validators[i].isvalid && typeof (Page_Validators[i].errormessage) == \"string\" && valValidationGroup == summaryValidationGroup) {\r\n s += pre + Page_Validators[i].errormessage + post;\r\n }\r\n }\r\n s += end;\r\n summary.innerHTML = s;\r\n window.scrollTo(0, 0);\r\n }\r\n }\r\n if (typeof (summary.showmessagebox) != \"undefined\") {\r\n if (summary.showmessagebox.toLowerCase() == \"true\") {\r\n s = \"\";\r\n if (typeof (summary.headertext) == \"string\") {\r\n s += summary.headertext + \"\\r\\n\";\r\n }\r\n var lastValIndex = Page_Validators.length - 1;\r\n for (i = 0; i <= lastValIndex; i++) {\r\n var summaryValidationGroup = summary.validationGroup;\r\n if (!summaryValidationGroup) summaryValidationGroup = '';\r\n var valValidationGroup = Page_Validators[i].validationGroup;\r\n if (!valValidationGroup) valValidationGroup = '';\r\n if (!Page_Validators[i].isvalid && typeof (Page_Validators[i].errormessage) == \"string\" && valValidationGroup == summaryValidationGroup) {\r\n switch (summary.displaymode) {\r\n case \"List\":\r\n s += Page_Validators[i].errormessage;\r\n if (i < lastValIndex) {\r\n s += \"\\r\\n\";\r\n }\r\n break;\r\n case \"BulletList\":\r\n default:\r\n s += \"- \" + Page_Validators[i].errormessage;\r\n if (i < lastValIndex) {\r\n s += \"\\r\\n\";\r\n }\r\n break;\r\n case \"SingleParagraph\":\r\n s += Page_Validators[i].errormessage + \" \";\r\n break;\r\n }\r\n }\r\n }\r\n alert(s);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n UpdateSummaryWrappers();\r\n}\r\n\r\n//\r\n//Field Error Highlighting\r\n//\r\nfunction RocktimeValidateExSetHighlight(val) {\r\n if (!val) return;\r\n if (GetCoreIsValid(val)) {\r\n RocktimeValidateClass(val, true);\r\n RocktimeValidateBorderCss(val, val.borderColorNormal);\r\n return;\r\n }\r\n RocktimeValidateClass(val, false);\r\n RocktimeValidateBorderCss(val, val.borderColorError);\r\n}\r\n\r\nfunction RocktimeValidateClass(val, removeClass) {\r\n if (val.fieldErrorClass == '') { return; }\r\n if ($('#' + val.controltovalidate) == undefined) { return; }\r\n if (typeof (val.enabled) != \"undefined\" && !val.enabled) { return; }\r\n\r\n var valueMe = ValidatorGetValue(val.controltovalidate);\r\n //var valueCmp = $('#' + val.controltocompare).val();\r\n var targetCmp = $('#' + val.fieldErrorClassCompareTarget);\r\n var hasCmp = (val.fieldErrorClassCompareTarget != undefined && val.fieldErrorClassCompareTarget != '' && valueMe != '');\r\n\r\n if (removeClass) {\r\n $('#' + val.fieldErrorClassTarget).removeClass(val.fieldErrorClass);\r\n if (hasCmp) targetCmp.removeClass(val.fieldErrorClass);\r\n\r\n }\r\n else {\r\n $('#' + val.fieldErrorClassTarget).addClass(val.fieldErrorClass);\r\n if (hasCmp) targetCmp.addClass(val.fieldErrorClass);\r\n\r\n }\r\n RocktimeValidateClassForMultiLine(val, removeClass);\r\n}\r\n\r\nfunction RocktimeValidateClassForMultiLine(val, removeClass) {\r\n RocktimeValidateClassForMultiLineAction($('#' + val.fieldErrorClassTarget).parent().parent().find(\".rtRECView\"), val, removeClass);\r\n RocktimeValidateClassForMultiLineAction($('#' + val.fieldErrorClassTarget).parent().parent().find(\".rtTACView\"), val, removeClass);\r\n RocktimeValidateClassForMultiLineAction($('#' + val.fieldErrorClassTarget).parent().parent().parent().find(\".rtTACView\"), val, removeClass);\r\n}\r\n\r\nfunction RocktimeValidateClassForMultiLineAction(target, val, removeClass) {\r\n if (target == null) { return };\r\n if (removeClass) {\r\n target.removeClass(val.fieldErrorClass);\r\n }\r\n else {\r\n target.addClass(val.fieldErrorClass);\r\n }\r\n}\r\n\r\nfunction RocktimeValidateBorderCss(val, borderColor) {\r\n if (borderColor == '') { return; }\r\n $('#' + val.fieldErrorClassTarget).css('border-color', borderColor);\r\n if (val.controltocompare != '') { $('#' + val.controltocompare).css('border-color', borderColor); }\r\n}\r\n","//\r\n//Intercept and extend ValidationSummaryOnSubmit\r\n//\r\nvar ValidationSummaryOnSubmitSaved;\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n if (typeof (ValidationSummaryOnSubmit) == \"function\") {\r\n ValidationSummaryOnSubmitSaved = ValidationSummaryOnSubmit;\r\n ValidationSummaryOnSubmit = ValidationSummaryOnSubmitEx;\r\n }\r\n}\r\n)\r\n\r\nfunction ValidationSummaryOnSubmitEx(validationGroup) {\r\n ValidationSummaryOnSubmitSaved(validationGroup);\r\n UpdateSummaryWrappers(validationGroup);\r\n}\r\n\r\n//\r\n//Summary Update\r\n//\r\nfunction UpdateSummaryWrappers() {\r\n if (typeof (Page_ValidationSummaries) == \"undefined\") return;\r\n for (var sums = 0; sums < Page_ValidationSummaries.length; sums++) {\r\n var summary = Page_ValidationSummaries[sums];\r\n if (!summary) continue;\r\n var summaryTarget = GetSummaryTarget(summary.validationGroup);\r\n if (SummaryHasEMShowing(summaryTarget) || SummaryIsVisible(summaryTarget)) $(summaryTarget).show();\r\n else $(summaryTarget).hide();\r\n }\r\n}\r\n\r\nfunction SummaryIsVisible(summaryTarget) {\r\n if ($(summaryTarget + ' .error-componant__validator').css('display') == 'none') return false;\r\n return true;\r\n}\r\n\r\nfunction SummaryHasEMShowing(summaryTarget) {\r\n return ($(summaryTarget).attr('data-state-has-em') == 'true');\r\n}\r\n\r\nfunction GetSummaryTarget(validationGroup) {\r\n var summaryTarget = validationGroup;\r\n if (!summaryTarget || summaryTarget == '') summaryTarget = 'no-group';\r\n summaryTarget = '.error-componant-' + summaryTarget;\r\n return summaryTarget;\r\n}\r\n\r\n","// Custom browser upload feature that hides features upon button clicks, and changes the browser default input file type to use a custom build input workaround\r\nvar uploader = {};\r\n\r\nuploader.bind = function () {\r\n uploader.initFakeInput();\r\n\r\n uploader.cancelBtn.off(\"click\").on(\"click\", function () {\r\n\r\n uploader.removeFile($(this));\r\n uploader.hideFileInput($(this));\r\n uploader.showFileDetails($(this));\r\n });\r\n\r\n uploader.replaceBtn.off(\"click\").on(\"click\", function () {\r\n\r\n uploader.hideFileDetails($(this));\r\n uploader.showFileInput($(this));\r\n });\r\n};\r\n\r\nuploader.initFakeInput = function () {\r\n for (var i = 0; i < uploader.container.length; i++) {\r\n var container = $(uploader.container[i]);\r\n var imageUpload = container.find(uploader.inputTarget);\r\n\r\n imageUpload.on(\"change\", function () {\r\n\r\n var uploadMsg = $(this).parents(\".\" + uploader.containerClass).find(\".\" + uploader.fileUploadMsgClass),\r\n input = this.files[0],\r\n text,\r\n val = $(this).val();\r\n\r\n if (input) {\r\n text = 'Selected File to upload: ' + val.replace(/.*\\\\(.+)/g, \"$1\") + \"\";\r\n } else {\r\n text = 'Please select a file';\r\n }\r\n\r\n uploadMsg.html(text);\r\n });\r\n }\r\n};\r\n\r\nuploader.removeFile = function (selected) {\r\n var container = selected.parents(\".\" + uploader.containerClass);\r\n var input = container.find(uploader.inputTarget);\r\n var uploadMsg = container.find(\".\" + uploader.fileUploadMsgClass);\r\n\r\n input.val(\"\");\r\n uploadMsg.html(\"No File Selected\");\r\n};\r\n\r\nuploader.hideFileInput = function (selected) {\r\n var container = selected.parents(\".\" + uploader.containerClass);\r\n var fileOpts = container.find(\".\" + uploader.fileOptsClass);\r\n fileOpts.addClass(uploader.fileOptsHiddenClass);\r\n};\r\n\r\nuploader.showFileInput = function (selected) {\r\n var container = selected.parents(\".\" + uploader.containerClass);\r\n var fileOpts = container.find(\".\" + uploader.fileOptsClass);\r\n fileOpts.removeClass(uploader.fileOptsHiddenClass);\r\n var input = container.find(uploader.inputTarget);\r\n input.focus();\r\n};\r\n\r\nuploader.hideFileDetails = function (selected) {\r\n var container = selected.parents(\".\" + uploader.containerClass);\r\n var fileDetails = container.find(\".\" + uploader.fileDetailsClass);\r\n fileDetails.addClass(uploader.fileDetailsHiddenClass);\r\n};\r\n\r\nuploader.showFileDetails = function (selected) {\r\n var container = selected.parents(\".\" + uploader.containerClass);\r\n var fileDetails = container.find(\".\" + uploader.fileDetailsClass);\r\n fileDetails.removeClass(uploader.fileDetailsHiddenClass);\r\n fileDetails.find(\".\" + uploader.replaceBtnClass).focus();\r\n};\r\n\r\nuploader.init = function () {\r\n if (typeof jQuery == 'undefined') return;\r\n uploader.containerClass = \"c-file-upload\";\r\n uploader.cancelBtnClass = \"c-file-upload__cancel\";\r\n uploader.replaceBtnClass = \"c-file-upload__replace\";\r\n uploader.fileOptsClass = \"c-file-upload__file-opts\";\r\n uploader.fileOptsHiddenClass = \"c-file-upload__file-opts--hidden\";\r\n uploader.fileDetailsClass = \"c-file-upload__file-details\";\r\n uploader.fileDetailsHiddenClass = \"c-file-upload__file-details--hidden\";\r\n uploader.fileUploadMsgClass = \"c-file-upload__upload-msg\";\r\n uploader.inputTarget = \"input[type=file]\";\r\n\r\n uploader.container = $(\".\" + uploader.containerClass);\r\n uploader.fileInput = uploader.container.find(uploader.inputTarget);\r\n\r\n if (uploader.fileInput.length > 0) {\r\n\r\n uploader.cancelBtn = uploader.container.find(\".\" + uploader.cancelBtnClass);\r\n uploader.replaceBtn = uploader.container.find(\".\" + uploader.replaceBtnClass);\r\n\r\n uploader.bind();\r\n }\r\n};\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n uploader.init();\r\n});\r\n","var cbox = {};\r\n\r\ncbox.onComplete = function (id, width, height, timerInMSecs) {\r\n\r\n var minWidth = 250,\r\n minHeight = 75,\r\n maxHeight = 450,\r\n x = 0,\r\n y=0;\r\n if (width == 'auto') x = $('#' + id).width() + 20; else x = width;\r\n if (timerInMSecs === 0) x += 60;\r\n if (x < minWidth) x = minWidth;\r\n\r\n if (width == 'auto') y = $('#' + id).height() + 15; else y = height;\r\n if (y < minHeight) y = minHeight;\r\n if (y > maxHeight) y = maxHeight;\r\n\r\n $.colorbox.resize({ width: x, height: y })\r\n\r\n}","/*************************************\r\n- The (read) 'more' and (read) 'less' links on the end of some lengthy sentences\r\n**************************************/\r\n\r\nvar readToggleButton = {};\r\n\r\nreadToggleButton.bind = function () {\r\n for (var i = 0; i < readToggleButton.readMoreBtn.length; i++) {\r\n readToggleButton.showText(i);\r\n }\r\n\r\n for (var i = 0; i < readToggleButton.readLessBtn.length; i++) {\r\n readToggleButton.hideText(i);\r\n }\r\n};\r\n\r\nreadToggleButton.showText = function (i) {\r\n $(readToggleButton.readMoreBtn[i])\r\n .off(\"click.show\")\r\n .on(\"click.show\", function (e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n e.stopImmediatePropagation();\r\n\r\n readToggleButton.innerSpan = this.parentNode;\r\n readToggleButton.outerSpan = readToggleButton.innerSpan.parentNode;\r\n readToggleButton.label = readToggleButton.outerSpan.parentNode;\r\n\r\n readToggleButton.textMin = readToggleButton.label.getElementsByClassName(readToggleButton.moreTextMinClass)[0];\r\n readToggleButton.textMax = readToggleButton.label.getElementsByClassName(readToggleButton.moreTextMaxClass)[0];\r\n\r\n readToggleButton.textMin.classList.add(\"hidden\");\r\n readToggleButton.textMax.classList.add(\"show\");\r\n return false;\r\n });\r\n};\r\n\r\nreadToggleButton.hideText = function (i) {\r\n $(readToggleButton.readLessBtn[i])\r\n .off(\"click.hide\")\r\n .on(\"click.hide\", function (e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n e.stopImmediatePropagation();\r\n\r\n readToggleButton.innerSpan = this.parentNode;\r\n readToggleButton.outerSpan = readToggleButton.innerSpan.parentNode;\r\n readToggleButton.label = readToggleButton.outerSpan.parentNode;\r\n\r\n readToggleButton.textMin = readToggleButton.label.getElementsByClassName(readToggleButton.moreTextMinClass)[0];\r\n readToggleButton.textMax = readToggleButton.label.getElementsByClassName(readToggleButton.moreTextMaxClass)[0];\r\n\r\n readToggleButton.textMin.classList.remove(\"hidden\");\r\n readToggleButton.textMax.classList.remove(\"show\");\r\n return false;\r\n });\r\n};\r\n\r\nreadToggleButton.init = function () {\r\n if (document.getElementsByClassName(\"more-text__button-show\").length > 0) {\r\n readToggleButton.moreTextMinClass = \"more-text__min\";\r\n readToggleButton.moreTextMaxClass = \"more-text__max\";\r\n\r\n readToggleButton.readMoreBtn = document.getElementsByClassName(\r\n \"more-text__button-show\"\r\n );\r\n readToggleButton.readLessBtn = document.getElementsByClassName(\r\n \"more-text__button-hide\"\r\n );\r\n\r\n readToggleButton.bind();\r\n }\r\n};\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n readToggleButton.init();\r\n});","var scrollToView = function (elem, speed) {\r\n\r\n var scrollTarget = elem;\r\n\r\n $(\"html,body\").animate({\r\n scrollTop: scrollTarget.offset().top\r\n }, speed);\r\n\r\n return false;\r\n};","var actionSkipLink = function (id) {\r\n var elem = $(\"#\" + id);\r\n\r\n elem.focus();\r\n scrollToView(elem, 0);\r\n};","//Setup DOB Controls\r\nfunction parentId(senderId) {\r\n return senderId.replace(\"_Year\", \"\").replace(\"_Month\", \"\").replace(\"_Day\", \"\").replaceAll(\"$\", \"_\");\r\n}\r\n\r\n//function updateDroplistDays(sender, eventArgs) { \r\n// var senderId = parentId(sender._uniqueId);\r\n// var day = $find(senderId + \"_Day\");\r\n// var month = $find(senderId + \"_Month\");\r\n// var year = $find(senderId + \"_Year\");\r\n// day.trackChanges();\r\n\r\n// var daySelectedItem = day.get_selectedItem();\r\n// var monthSelectedItem = month.get_selectedItem();\r\n// var yearSelectedItem = year.get_selectedItem();\r\n\r\n// var dIM = daysInMonth(monthSelectedItem.get_value(), yearSelectedItem.get_value());\r\n// if (daySelectedItem != undefined) { if (daySelectedItem.get_value() > dIM) { day.getItem(0).set_selected(true); } }\r\n\r\n// var Item29 = day.findItemByValue(29);\r\n// var Item30 = day.findItemByValue(30);\r\n// var Item31 = day.findItemByValue(31);\r\n\r\n// if (Item29 != undefined) { Item29.set_visible(dIM >= 29); }\r\n// if (Item30 != undefined) { Item30.set_visible(dIM >= 30); }\r\n// if (Item31 != undefined) { Item31.set_visible(dIM >= 31); }\r\n\r\n// day.commitChanges();\r\n// updateValue(sender, eventArgs);\r\n//}\r\n\r\nfunction updateSelectValue(changedCheckbox) {\r\n var senderId = parentId(changedCheckbox.id);\r\n var control = document.getElementById(senderId);\r\n if (control.yearValue() == -1 && control.monthValue() == -1 && control.dayValue() == -1) {\r\n control.value = \"-1\";\r\n $(\"#\" + senderId).parents('.' + $('#' + senderId).attr('data-parent')).removeClass($('#' + senderId).attr('data-active-class'));\r\n }\r\n else if (control.yearValue() != \"\" && control.monthValue() != \"\" && control.dayValue() != \"\" && control.yearValue() != -1 && control.monthValue() != -1 && control.dayValue() != -1) {\r\n var y = control.yearValue();\r\n var m = (parseInt(control.monthValue()) > 9 ? \"\" : \"0\") + parseInt(control.monthValue());\r\n var d = (parseInt(control.dayValue()) > 9 ? \"\" : \"0\") + parseInt(control.dayValue());\r\n control.value = y + \"-\" + m + \"-\" + d;\r\n $(\"#\" + senderId).parents('.' + $('#' + senderId).attr('data-parent')).addClass($('#' + senderId).attr('data-active-class'));\r\n }\r\n else {\r\n control.value = \"\";\r\n $(\"#\" + senderId).parents('.' + $('#' + senderId).attr('data-parent')).removeClass($('#' + senderId).attr('data-active-class'));\r\n }\r\n if ((control.FiredValidation == 'true') || (control.yearValue() != \"\" && control.monthValue() != \"\" && control.dayValue() != \"\")) {\r\n control.FiredValidation = 'true';\r\n Page_ClientValidateByControl(parentId(changedCheckbox.id));\r\n }\r\n else {\r\n control.value = \"Error!\";\r\n Page_ClientValidateByControl(parentId(changedCheckbox.id));\r\n control.value = \"\";\r\n }\r\n}\r\n\r\nfunction updateValue(sender, eventArgs) {\r\n var senderId = parentId(sender._uniqueId);\r\n var control = document.getElementById(senderId);\r\n if (control.yearValue() == -1 && control.monthValue() == -1 && control.dayValue() == -1) {\r\n control.value = \"-1\";\r\n $(\"#\" + senderId).parents('.' + $('#' + senderId).attr('data-parent')).removeClass($('#' + senderId).attr('data-active-class'));\r\n }\r\n else if (control.yearValue() != \"\" && control.monthValue() != \"\" && control.dayValue() != \"\" && control.yearValue() != -1 && control.monthValue() != -1 && control.dayValue() != -1) {\r\n var y = control.yearValue();\r\n var m = (parseInt(control.monthValue()) > 9 ? \"\" : \"0\") + parseInt(control.monthValue());\r\n var d = (parseInt(control.dayValue()) > 9 ? \"\" : \"0\") + parseInt(control.dayValue());\r\n control.value = y + \"-\" + m + \"-\" + d;\r\n $(\"#\" + senderId).parents('.' + $('#' + senderId).attr('data-parent')).addClass($('#' + senderId).attr('data-active-class'));\r\n }\r\n else {\r\n control.value = \"\";\r\n $(\"#\" + senderId).parents('.' + $('#' + senderId).attr('data-parent')).removeClass($('#' + senderId).attr('data-active-class'));\r\n }\r\n if ((control.FiredValidation == 'true') || (control.yearValue() != \"\" && control.monthValue() != \"\" && control.dayValue() != \"\")) {\r\n control.FiredValidation = 'true';\r\n Page_ClientValidateByControl(parentId(sender._uniqueId));\r\n }\r\n}\r\n\r\n//function updateComboBoxDays(sender, eventArgs) {\r\n// updateComboBoxDaysAction(sender._uniqueId);\r\n// updateValue(sender, eventArgs);\r\n//}\r\n\r\n//function updateComboBoxDaysAction(senderId) {\r\n\r\n// senderId = parentId(senderId);\r\n// var jqDay = $(\"#\" + senderId + \"_Day\");\r\n// jqDay.removeClass('day-error');\r\n// jqDay.removeClass('day-error--custom');\r\n\r\n// var day = $find(senderId + \"_Day\");\r\n// var month = $find(senderId + \"_Month\");\r\n// var year = $find(senderId + \"_Year\");\r\n// day.trackChanges();\r\n\r\n// var daySelectedItem = day.get_selectedItem();\r\n// var monthSelectedItem = month.get_selectedItem();\r\n// var yearSelectedItem = year.get_selectedItem();\r\n\r\n// var dIM = daysInMonth(getValue(month), getValue(year));\r\n// if ((getValue(day) == -1 && getValue(month) != -1 && getValue(year) != -1) || getValue(day) > dIM) {\r\n// day.get_items().getItem(0).set_selected(true);\r\n// if (typeof day.set_text !== \"undefined\") { day.set_text(\"??\"); }\r\n// jqDay.addClass('day-error');\r\n// jqDay.addClass('day-error--custom');\r\n// }\r\n\r\n// var Item29 = day.findItemByValue(29);\r\n// var Item30 = day.findItemByValue(30);\r\n// var Item31 = day.findItemByValue(31);\r\n\r\n// if (Item29 != undefined) { Item29.set_visible(dIM >= 29); }\r\n// if (Item30 != undefined) { Item30.set_visible(dIM >= 30); }\r\n// if (Item31 != undefined) { Item31.set_visible(dIM >= 31); }\r\n\r\n// //if (dIM >= 29) {\r\n// // if (Item29 == undefined) {\r\n// // var newItem = new Telerik.Web.UI.RadComboBoxItem();\r\n// // newItem.set_text(\"29\");\r\n// // newItem.set_value(\"29\");\r\n// // day.get_items().add(newItem);\r\n// // }\r\n// //}\r\n// //else {\r\n// // if (Item29 != undefined) { day.get_items().remove(Item29); }\r\n// //}\r\n\r\n// //if (dIM >= 30) {\r\n// // if (Item30 == undefined) {\r\n// // var newItem = new Telerik.Web.UI.RadComboBoxItem();\r\n// // newItem.set_text(\"30\");\r\n// // newItem.set_value(\"30\");\r\n// // day.get_items().add(newItem);\r\n// // }\r\n// //}\r\n// //else {\r\n// // if (Item30 != undefined) { day.get_items().remove(Item30); }\r\n// //}\r\n\r\n// //if (dIM >= 31) {\r\n// // if (Item31 == undefined) {\r\n// // var newItem = new Telerik.Web.UI.RadComboBoxItem();\r\n// // newItem.set_text(\"31\");\r\n// // newItem.set_value(\"31\");\r\n// // day.get_items().add(newItem);\r\n// // }\r\n// //}\r\n// //else {\r\n// // if (Item31 != undefined) { day.get_items().remove(Item31); }\r\n// //}\r\n// day.commitChanges();\r\n//}\r\n\r\nfunction getValue(item) {\r\n if (typeof item.get_text !== \"undefined\") {\r\n var listItem = item.findItemByText(item.get_text());\r\n if (listItem) { return listItem.get_value(); }\r\n return \"\";\r\n } else if (typeof item.get_selectedItem === \"function\") {\r\n return item.get_selectedItem().get_value();\r\n } else {\r\n return item.value;\r\n }\r\n return \"\"\r\n}\r\n\r\nfunction daysInMonth(month, year) {\r\n if (month == undefined || year == undefined) { return 31; }\r\n if (isNaN(month)) { month = getValue(month); }\r\n if (isNaN(year)) { year = getValue(year); }\r\n if ((month == '' || month == -1) || (year == '' || year == -1)) { return 31; }\r\n return new Date(year, month, 0).getDate();\r\n}\r\n\r\nfunction dateControlSetup() {\r\n\r\n $('.date-droplist,.date-combobox').each(function () {\r\n document.getElementById(this.id).getValue = function () {\r\n if (this.isEmpty()) { return \"-1\"; }\r\n if (!this.isValid()) { return; }\r\n return (new Date(this.yearValue(), this.monthValue() - 1, this.dayValue()));\r\n };\r\n\r\n document.getElementById(this.id).value = \"\";\r\n\r\n document.getElementById(this.id).isValidDay = function () {\r\n //updateComboBoxDaysAction(this.id);\r\n if (this.isEmpty()) { return this.showAsValid(true); }\r\n if (this.dayValue() == \"\") { return this.showAsValid(false); }\r\n if (!this.isValidMonth) { return this.showAsValid(true); }\r\n if (!this.isValidYear) { return this.showAsValid(true); }\r\n if (daysInMonth(this.month(), this.year()) >= this.day()) { return this.showAsValid(false); }\r\n if (this.maxDate().getMonth() + 1 == this.monthValue()) { return this.showAsValid(this.maxDate().getDate() >= this.dayValue()) };\r\n if (this.minDate().getMonth() + 1 == this.monthValue()) { return this.showAsValid(this.minDate().getDate() <= this.dayValue()) };\r\n return this.showAsValid(true);\r\n };\r\n\r\n document.getElementById(this.id).isValidMonth = function () {\r\n //updateComboBoxDaysAction(this.id);\r\n if (this.isEmpty()) { return this.showAsValid(true); }\r\n if (this.monthValue() == \"\") { return this.showAsValid(false); }\r\n if (!this.isValidYear) { return this.showAsValid(true); } if (this.maxDate().getFullYear() == this.yearValue()) { return this.showAsValid(this.maxDate().getMonth() + 1 >= this.monthValue()) };\r\n if (this.minDate().getFullYear() == this.yearValue()) { return this.showAsValid(this.minDate().getMonth() + 1 <= this.monthValue()) };\r\n return this.showAsValid(true);\r\n };\r\n\r\n document.getElementById(this.id).isValidYear = function () {\r\n //updateComboBoxDaysAction(this.id);\r\n if (this.isEmpty()) { return this.showAsValid(true); }\r\n if (this.yearValue() == \"\") { return this.showAsValid(false); }\r\n if (this.yearValue() == -1) { return this.showAsValid(false); }\r\n return this.showAsValid(this.maxDate().getFullYear() >= this.yearValue()) && (this.minDate().getFullYear() <= this.yearValue());\r\n };\r\n\r\n document.getElementById(this.id).isValid = function () {\r\n //updateComboBoxDaysAction(this.id);\r\n if (this.isEmpty()) { return this.showAsValid(true); }\r\n return this.showAsValid(this.isValidYear() && this.isValidMonth() && this.isValidDay());\r\n };\r\n\r\n document.getElementById(this.id).showAsValid = function (HideError) {\r\n if (HideError) { this.classList.remove(\"RocktimeFieldErrorDate\"); }\r\n else { this.classList.add(\"RocktimeFieldErrorDate\"); }\r\n return (HideError);\r\n };\r\n\r\n document.getElementById(this.id).isEmpty = function () {\r\n return (this.yearValue() == \"-1\") && (this.monthValue() == \"-1\") && (this.dayValue() == \"-1\");\r\n };\r\n\r\n document.getElementById(this.id).maxDate = function () {\r\n var $field = $(this);\r\n var max = Date.parse($field.attr('data-maxdate'));\r\n if (!max) { return new Date(Date.maxValue); }\r\n return new Date(max);\r\n\r\n };\r\n\r\n document.getElementById(this.id).minDate = function () {\r\n var $field = $(this);\r\n var min = Date.parse($field.attr('data-mindate'));\r\n if (!min) { return new Date(Date.minValue); }\r\n return new Date(min);\r\n };\r\n\r\n document.getElementById(this.id).day = function () {\r\n if ($find(this.id + \"_Day\") != undefined) {\r\n return $find(this.id + \"_Day\");\r\n } else {\r\n return document.getElementById(this.id + \"_Day\");\r\n }\r\n };\r\n\r\n document.getElementById(this.id).month = function () {\r\n if ($find(this.id + \"_Month\") != undefined) {\r\n return $find(this.id + \"_Month\");\r\n } else {\r\n return document.getElementById(this.id + \"_Month\");\r\n }\r\n };\r\n\r\n document.getElementById(this.id).year = function () {\r\n if ($find(this.id + \"_Year\") != undefined) {\r\n return $find(this.id + \"_Year\");\r\n } else {\r\n return document.getElementById(this.id + \"_Year\");\r\n }\r\n };\r\n\r\n document.getElementById(this.id).dayValue = function () {\r\n return getValue(this.day());\r\n };\r\n\r\n document.getElementById(this.id).monthValue = function () {\r\n return getValue(this.month());\r\n };\r\n\r\n document.getElementById(this.id).yearValue = function () {\r\n return getValue(this.year());\r\n };\r\n\r\n })\r\n\r\n $('.AutoAdvance Input, Input.AutoAdvance').blur(\r\n function () {\r\n $(this).removeClass('day-error');\r\n $(this).removeClass('day-error--custom');\r\n }\r\n )\r\n\r\n $('.AutoAdvance Input, Input.AutoAdvance').keyup(function (e) {\r\n if (e.keyCode < 48 && e.keyCode != 8) { return }\r\n if (e.keyCode > 105) { return }\r\n var $field = $(this);\r\n var $dataOptions = $(this).closest('.AutoAdvance');\r\n var $previousField = $('#' + $dataOptions.attr('data-autoadvance-previous') + ' Input, Input#' + $dataOptions.attr('data-autoadvance-previous'));\r\n var $nextField = $('#' + $dataOptions.attr('data-autoadvance-next') + ' Input, Input#' + $dataOptions.attr('data-autoadvance-next'));\r\n var maxchars = parseInt($dataOptions.attr('data-autoadvance-maxchars'), 10);\r\n var numbersOnly = ($dataOptions.attr('data-autoadvance-numbersonly') == \"true\");\r\n var isComboBox = ($dataOptions.attr('data-autoadvance-iscombobox') == \"true\");\r\n var allowcomboboxfreetext = ($dataOptions.attr('data-autoadvance-allowcomboboxfreetext') == \"true\");\r\n var fieldVar = $field.val().trim();\r\n\r\n if (isComboBox) {\r\n var Dl = $find(this.id.replace(\"_Input\", \"\"));\r\n if (Dl) {\r\n Dl.hideDropDown();\r\n\r\n if (!allowcomboboxfreetext && fieldVar != '1') {\r\n maxchars = 10;\r\n var result = checkComboBoxValue(Dl);\r\n if (result == -1) { return };\r\n if (result != 0) { fieldVar = result; maxchars = fieldVar.length; }\r\n }\r\n }\r\n }\r\n\r\n if (numbersOnly && isNaN(fieldVar)) {\r\n $field.val(fieldVar.substring(0, previousmaxchars - 1));\r\n return\r\n }\r\n\r\n if (e.keyCode == 8) {\r\n if ($dataOptions.attr('data-autoadvance-previous') != undefined) {\r\n if ($dataOptions.attr('isEmpty') == 'true' && fieldVar == '') {\r\n var $previousDataOptions = $previousField.closest('.AutoAdvance');\r\n var previousmaxchars = parseInt($previousDataOptions.attr('data-autoadvance-maxchars'), 10);\r\n $previousDataOptions.attr('isEmpty', false);\r\n $previousField.focus();\r\n $previousField.val($previousField.val().substring(0, previousmaxchars - 1));\r\n }\r\n $dataOptions.attr('isEmpty', (fieldVar == ''));\r\n }\r\n return;\r\n }\r\n\r\n $dataOptions.attr('isEmpty', true);\r\n if (fieldVar.length >= maxchars) {\r\n if ($dataOptions.attr('data-autoadvance-next') != undefined) {\r\n var $nextDataOptions = $nextField.closest('.AutoAdvance');\r\n $nextField.focus();\r\n $nextField.select();\r\n if (!fieldVar.substring(maxchars) == \"\") { $nextField.val(fieldVar.substring(maxchars)); }\r\n $nextDataOptions.attr('isEmpty', false);\r\n }\r\n $field.val(fieldVar.substring(0, maxchars));\r\n return;\r\n }\r\n });\r\n\r\n function checkComboBoxValue(Dl) {\r\n\r\n var textInTheCombo = Dl.get_text();\r\n for (var i = 0; i < Dl.get_items().get_count(); i++) {\r\n var item = Dl.get_items().getItem(i);\r\n if (item.get_text() == textInTheCombo || item.get_text() == textInTheCombo.toTitleCase() || item.get_value() == textInTheCombo) {\r\n Dl.trackChanges();\r\n Dl.set_text(item.get_text());\r\n Dl.commitChanges();\r\n return item.get_text();\r\n }\r\n if (item.get_text().startsWith(textInTheCombo) || item.get_text().startsWith(textInTheCombo.toTitleCase()) || item.get_value().startsWith(textInTheCombo)) {\r\n return 0;\r\n }\r\n }\r\n\r\n Dl.showDropDown();\r\n Dl.trackChanges();\r\n Dl.get_items().getItem(0).set_selected(true);\r\n Dl.set_text(\"\");\r\n var inputElement = Dl.get_inputDomElement();\r\n inputElement.focus();\r\n Dl.commitChanges();\r\n return -1;\r\n }\r\n\r\n}","var popoutMessagePanel = {};\r\n\r\npopoutMessagePanel.bind = function () {\r\n popoutMessagePanel.ctrl.addEventListener('click', function () { popoutMessagePanel.toggleView(); });\r\n popoutMessagePanel.viewClose.addEventListener('click', function () { popoutMessagePanel.toggleView(); });\r\n popoutMessagePanel.view.addEventListener('click', popoutMessagePanel.clearLoadTime);\r\n};\r\n\r\npopoutMessagePanel.clearLoadTime = function () {\r\n clearTimeout(popoutMessagePanel.loadTimer);\r\n popoutMessagePanel.view.removeEventListener('click', popoutMessagePanel.clearLoadTime);\r\n};\r\n\r\npopoutMessagePanel.toggleView = function () {\r\n if (popoutMessagePanel.view.classList.contains(popoutMessagePanel.viewHiddenClass)) {\r\n popoutMessagePanel.openView();\r\n return;\r\n }\r\n popoutMessagePanel.closeView();\r\n\r\n};\r\n\r\npopoutMessagePanel.closeView = function () {\r\n popoutMessagePanel.view.classList.add(popoutMessagePanel.viewHiddenClass);\r\n popoutMessagePanel.view.style.maxHeight = 0 + \"px\";\r\n};\r\n\r\npopoutMessagePanel.openView = function () {\r\n popoutMessagePanel.view.classList.remove(popoutMessagePanel.viewHiddenClass);\r\n popoutMessagePanel.view.style.maxHeight = window.innerHeight + \"px\";\r\n};\r\n\r\npopoutMessagePanel.load = function () {\r\n popoutMessagePanel.loadTimer = setTimeout(function () {\r\n popoutMessagePanel.closeView();\r\n popoutMessagePanel.view.removeEventListener('click', popoutMessagePanel.clearLoadTime);\r\n }, popoutMessagePanel.loadDisplayTime);\r\n};\r\n\r\npopoutMessagePanel.init = function () {\r\n popoutMessagePanel.view = document.getElementsByClassName('c-popout-message-panel__view')[0];\r\n if (!popoutMessagePanel.view) return;\r\n popoutMessagePanel.ctrl = document.getElementsByClassName('c-popout-message-panel__ctrl-button')[0];\r\n popoutMessagePanel.viewClose = document.getElementsByClassName('c-popout-message-panel__view-close')[0];\r\n popoutMessagePanel.viewHiddenClass = 'c-popout-message-panel__view--hidden';\r\n popoutMessagePanel.loadDisplayTime = 500;\r\n popoutMessagePanel.openView();\r\n popoutMessagePanel.bind();\r\n popoutMessagePanel.load();\r\n\r\n};\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", function () {\r\n popoutMessagePanel.init();\r\n});","if (!SIDAction) { var SIDAction = {}; }\r\n\r\n//Click+ (Result Types)\r\n//Ctrl : Short Default Action(Input -> .Input.TextBox(\"sid\",) or Get -> .Find(\"sid\")\r\n//Alt : Short Get -> .Find(\"sid\")\r\n//Shift : SID only -> \"sid\"\r\n//Ctrl + Shift: Long Default Action(Input -> Driver.Input.TextBox(\"sid\",) or Get -> Driver.Find(\"sid\")\r\n//Alt + Shift : Long Get -> Driver.Get(\"sid\")\r\n\r\nSIDAction.getKey = function (codeType, SID) {\r\n\r\n var codeFunctions;\r\n var preventDefault = false;\r\n switch (codeType) {\r\n\r\n //Standard And Standard Ex Commands =============================================================================================================\r\n case 'TextBox':\r\n case 'TextBoxEx':\r\n case 'UrlTextBoxEx':\r\n codeFunctions = ['.Input.TextBox(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'RadioButtonList':\r\n codeFunctions = ['.Input.RadioButton(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'ListBox':\r\n codeFunctions = ['.Input.ListBox(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'DropDownList':\r\n codeFunctions = ['.Input.Dropdown(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'DateDropList':\r\n codeFunctions = ['.Input.DateDropList(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'CheckBoxList':\r\n codeFunctions = ['.Input.CheckboxList(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'CheckBox':\r\n case 'CheckBoxEx':\r\n codeFunctions = ['.Input.Checkbox(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'FileUpload':\r\n case 'FileUploadEx':\r\n codeFunctions = ['.Input.FileUpload(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'RadioButton':\r\n codeFunctions = ['.Click(\"{0}\")\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'Label':\r\n case 'LabelEx':\r\n codeFunctions = ['.Find(\"{0}\").Text\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'PinButtonEx':\r\n codeFunctions = ['.Click(\"{0}\")\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'AnchorEx':\r\n codeFunctions = ['.Click(\"{0}\")\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'DateDropDownListEx':\r\n codeFunctions = ['.Input.DateDropDownList(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n\r\n\r\n //Rad And Rad Ex Commands =============================================================================================================\r\n //case'AccessibleRadEditor' : \r\n case 'RadCalendar':\r\n codeFunctions = ['.Input.Rad.DateDropDownList(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n //case'RadCheckBox' :\r\n //case'RadCheckBoxList' : \r\n case 'RadComboBox':\r\n codeFunctions = ['.Input.Rad.ComboBox(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'RadDatePicker':\r\n codeFunctions = ['.Input.Rad.DatePicker(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'RadDateTimePicker':\r\n codeFunctions = ['.Input.Rad.DateTimePicker(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'TimePicker':\r\n codeFunctions = ['.Input.Rad.TimePicker(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'RadDropDownList':\r\n codeFunctions = ['.Input.Rad.DropDownList_ByValue(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'RadMonthYearPicker':\r\n codeFunctions = ['.Input.Rad.MonthYearPicker(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'RadEditor':\r\n codeFunctions = ['.Input.Rad.Editor(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n //case'RadLabel' : \r\n case 'RadListBox':\r\n codeFunctions = ['.Input.Rad.Dropdown_ByValue(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n //case'RadMaskedTextBox' : \r\n //case'RadNumericTextBox' : \r\n //case'RadRadioButton' : \r\n //case'RadRadioButtonList' : \r\n //case'RadSlider' : \r\n //case'RadTextBox' : \r\n //case'RadToggleButton' :\r\n //case'RadUpload' : \r\n //case'RadColorPicker' :\r\n\r\n case 'DateRadComboBoxEx':\r\n codeFunctions = ['.Input.Rad.DateComboBox(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n case 'DateRadDropDownListEx':\r\n codeFunctions = ['.Input.Rad.DateDropDownList(\"{0}\",)\\n', '.Find(\"{0}\")', 'Driver'];\r\n break;\r\n\r\n\r\n\r\n //Button Commands =============================================================================================================\r\n case 'Button':\r\n case 'HyperLink':\r\n case 'ImageButton':\r\n case 'LinkButton':\r\n case 'ButtonEx':\r\n case 'HyperLinkEx':\r\n case 'ImageButtonEx':\r\n case 'LinkButtonEx':\r\n case 'RadButtonEx':\r\n case 'RadButton':\r\n case 'RadImageButton':\r\n case 'RadLinkButton':\r\n case 'CPControlButtonEx':\r\n codeFunctions = ['.Click(\"{0}\")\\n', '.Find(\"{0}\")', 'Driver'];\r\n preventDefault = true;\r\n break;\r\n\r\n case 'Validator':\r\n codeFunctions = ['.Get.Validator(\"{0}\").Assert.Is_Valid\\n', '.Get.Validator(\"{0}\")', 'Driver'];\r\n preventDefault = true;\r\n break;\r\n\r\n case 'NavWidget':\r\n codeFunctions = ['.Click_Nav(\"{0}\")', '.Click_Nav(\"{0}\")', 'Driver.Action.Control.Menu'];\r\n preventDefault = true;\r\n break;\r\n\r\n case 'CPControlButtonExNav':\r\n codeFunctions = ['.Click_Button(\"{0}\")', '.Click_Button(\"{0}\")', 'Driver.Action.Control.Menu'];\r\n preventDefault = true;\r\n break;\r\n\r\n case 'CPControlDashboardButtonEx':\r\n codeFunctions = ['.Dashboard()', '.Dashboard()', 'Driver.Action.Control.Menu'];\r\n preventDefault = true;\r\n break;\r\n\r\n case 'CPControlDashboardToggleButtonEx':\r\n codeFunctions = ['.DashboardToggle()', '.DashboardToggle()', 'Driver.Action.Control.Menu'];\r\n preventDefault = true;\r\n break;\r\n\r\n case 'CPControlDashboardBackButtonEx':\r\n codeFunctions = ['.DashboardBack()', '.DashboardBack()', 'Driver.Action.Control.Menu'];\r\n preventDefault = true;\r\n break;\r\n\r\n\r\n //Misc And Default Commands =============================================================================================================\r\n default:\r\n codeFunctions = ['{0}', '{0}', ''];\r\n break;\r\n\r\n }\r\n SIDAction.processKey(codeFunctions, SID, preventDefault)\r\n}\r\n\r\nSIDAction.processKey = function (codeFunctions, SID, preventDefault) {\r\n if (event.button != 2) return false;\r\n var selectedNetCode;\r\n if (event.shiftKey) selectedNetCode = '{0}';\r\n if (event.ctrlKey) selectedNetCode = codeFunctions[0];\r\n if (event.altKey) selectedNetCode = codeFunctions[1];\r\n if (event.ctrlKey && event.shiftKey) selectedNetCode = codeFunctions[2] + codeFunctions[0];\r\n if (event.altKey && event.shiftKey) selectedNetCode = codeFunctions[2] + codeFunctions[1];\r\n if (!selectedNetCode) return true;\r\n selectedNetCode = selectedNetCode.formatEx(SID);\r\n SIDAction.copyFnToClipboard(selectedNetCode);\r\n if (preventDefault) { event.preventDefault(); }\r\n return !preventDefault;\r\n}\r\n\r\nSIDAction.copyFnToClipboard = function (functionText) {\r\n navigator.clipboard.writeText(functionText);\r\n if (!window.Notification) return;\r\n if (Notification.permission !== 'granted') Notification.requestPermission();\r\n var notification = new Notification('Copied Function To Clipboard', { body: functionText, });\r\n setTimeout(() => { notification.close() }, 2500)\r\n};\r\n\r\nSIDAction.addClickEvent = function (targetId, fn) {\r\n var target = document.getElementById(targetId);\r\n if (!target) return;\r\n target.addEventListener('mousedown', fn);\r\n SIDAction.addContextMenuEvent();\r\n}\r\n\r\nSIDAction.addContextMenuEvent = function () {\r\n if (SIDAction.addContextMenuEventAdded) return;\r\n document.addEventListener('contextmenu', function (event) { SIDAction.processContextMenuKey(); }, true);\r\n SIDAction.addContextMenuEventAdded = true;\r\n}\r\n\r\nSIDAction.processContextMenuKey = function () {\r\n var preventDefault = false;\r\n if (event.shiftKey) preventDefault = true;\r\n if (event.ctrlKey) preventDefault = true;\r\n if (event.altKey) preventDefault = true;\r\n if (event.ctrlKey && event.shiftKey) preventDefault = true;\r\n if (event.altKey && event.shiftKey) preventDefault = true;\r\n if (!preventDefault) return true;\r\n event.preventDefault();\r\n return false;\r\n\r\n}\r\n\r\nSIDAction.genSIDKey = function (prefix, name, suffix) {\r\n name = (\"\" + name).match(/([A-Z]?[^A-Z]*)/g).slice(0, -1).join('-').toLowerCase();\r\n if (prefix != undefined) { name = prefix + \"-\" + name }\r\n if (suffix != undefined) { name = name + \"-\" + suffix }\r\n return name;\r\n}\r\n\r\n","if (!SIDAction) var SIDAction = {};\r\n\r\n//Click+ (Result Types)\r\n//Ctrl : Short Default Action(Input -> .Input.TextBox(\"sid\",) or Get -> .Find(\"sid\")\r\n//Alt : Short Get -> .Find(\"sid\")\r\n//Shift : SID only -> \"sid\"\r\n//Ctrl + Shift: Long Default Action(Input -> Driver.Input.TextBox(\"sid\",) or Get -> Driver.Find(\"sid\")\r\n//Alt + Shift : Long Get -> Driver.Get(\"sid\")\r\n\r\nSIDAction.getKeyCPC = function (codeType, SID) {\r\n\r\n switch (codeType) {\r\n case 'cpc-free-text-readonly': SIDAction.processKey(['.Get.CPC(\"{0}\").Get_ReadOnly\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-number-readonly': SIDAction.processKey(['.Get.CPC(\"{0}\").Get_ReadOnly\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-date-readonly': SIDAction.processKey(['.Get.CPC(\"{0}\").Get_ReadOnly\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-time-readonly': SIDAction.processKey(['.Get.CPC(\"{0}\").Get_ReadOnly\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-boolean-readonly': SIDAction.processKey(['.Get.CPC(\"{0}\").Get_ReadOnly\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-string-readonly': SIDAction.processKey(['.Get.CPC(\"{0}\").Get_ReadOnly\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-free-text': SIDAction.processKey(['.Get.CPC(\"{0}\").Input_ByFreeText(\"\")\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-number': SIDAction.processKey(['.Get.CPC(\"{0}\").Input()\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-date': SIDAction.processKey(['.Get.CPC(\"{0}\").Input(New Date())\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-time': SIDAction.processKey(['.Get.CPC(\"{0}\").Input(New TimeSpan())\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n case 'cpc-boolean': SIDAction.processKey(['.Get.CPC(\"{0}\").Input()\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n break;\r\n\r\n default: SIDAction.processKey(['.Get.CPC(\"{0}\").Input(\"\")\\n', '.Get.CPC(\"{0}\")', 'Driver'], SID, false);\r\n }\r\n}\r\n\r\nSIDAction.updateSeleniumInfo = function (name, key, value, addStyle) {\r\n\r\n var rootElement = document.getElementById('selenium-info');\r\n if (rootElement.getElementsByTagName(name).length == 0) { rootElement.appendChild(document.createElement(name)) }\r\n\r\n var nameElement = rootElement.getElementsByTagName(name)[0];\r\n if (nameElement.getElementsByTagName(key).length == 0) { nameElement.appendChild(document.createElement(key)) }\r\n\r\n var keyElement = nameElement.getElementsByTagName(key)[0];\r\n if (addStyle) keyElement.style.display = 'table-row';\r\n keyElement.innerText = value;\r\n\r\n}","document.addEventListener(\"DOMContentLoaded\", function () {\r\n documentReady();\r\n});\r\n\r\n\r\nfunction documentReady() {\r\n\r\n if (typeof jQuery === 'undefined') {\r\n console.log(\"jquery is missing\");\r\n return;\r\n }\r\n //InIt\r\n setupHelp();\r\n editorsSetup();\r\n dateControlSetup();\r\n\r\n //Events\r\n $('.ViewImage').colorbox({ onComplete: function () { $.colorbox.resize(); $('#cboxClose').remove(); } });\r\n $(\"#CookieControlCentre,.CookieControlCentreFooter\").colorbox({ iframe: true, scrolling: true, width: \"80%\", height: \"80%\", closeButton: false, overlayClose: false, escKey: false });\r\n}\r\n\r\n//Init Functions\r\nvar isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0; // Opera 8.0+ (UA detection to detect Blink/v8-powered Opera) \r\nvar isFirefox = typeof InstallTrigger !== 'undefined'; // Firefox 1.0+ \r\nvar isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; // At least Safari 3+: \"[object HTMLElementConstructor]\" \r\nvar isChrome = !!window.chrome && !isOpera; // Chrome 1+ \r\nvar isIE = /*@cc_on!@*/false || document.documentMode;\r\n\r\n\r\n","// For xml date+time;\r\n//Url\r\nfunction addTrailingDirSlash(url) {\r\n if (url == \"\") { return \"\" }\r\n url = url.replace(/\\/\\/+/gi, \"/\").toLowerCase();\r\n if (url.charAt(0) == '/') { url = url.substring(1) }\r\n if (url == \"\" || url == \"/\") { return \"\" }\r\n var urlParts = url.split(\"/\");\r\n if (urlParts[urlParts.length - 1].indexOf(\".\") !== -1) { return url }\r\n return (url + \"/\").replace(/\\/\\/+/gi, \"/\");\r\n}\r\n\r\n\r\n\r\n// Disable button\r\nfunction disableButtonOnClick(target, text, waitText, seconds) {\r\n Page_ClientValidate();\r\n if (!Page_IsValid) return false;\r\n return disableButton(target, text, waitText, seconds);\r\n}\r\n\r\nfunction disableButton(target, text, waitText, seconds) {\r\n if (target.countdownInterval != undefined) return false\r\n target.countdownValue = seconds;\r\n target.text = text;\r\n target.waitText = waitText;\r\n disableButtonCheck(target);\r\n target.countdownInterval = setInterval(() => { disableButtonCheck(target); }, 1000);\r\n return true;\r\n}\r\n\r\nfunction disableButtonCheck(target) {\r\n if (target.countdownValue <= 0) {\r\n target.disabled = false;\r\n target.value = target.text;\r\n target.classList.remove(\"aspNetDisabled\");\r\n clearInterval(target.countdownInterval);\r\n target.countdownInterval = null;\r\n }\r\n else {\r\n //target.disabled = true;\r\n target.value = target.text + \" \" + target.waitText + \" \" + target.countdownValue;\r\n target.classList.add(\"aspNetDisabled\");\r\n }\r\n target.countdownValue -= 1;\r\n}\r\n","//Setup Help\r\nfunction setupHelp() {\r\n $('.rtHelpButton').attr('href', 'javascript:void(0);');\r\n $('.rtHelpButton').attr('target', '');\r\n $('.rtHelpMessage').click(function () { $(this).hide(); });\r\n}\r\n\r\n\r\n//Help\r\nfunction rtHelpOpen(HelpMessage, LinkId) {\r\n $('#' + HelpMessage).text('Loading....');\r\n $('#' + HelpMessage).show();\r\n $('#' + HelpMessage).load('/help/summary/' + LinkId);\r\n}\r\n//Help\r\nfunction rtHelpOpenMessage(HelpMessage, Text) {\r\n $('#' + HelpMessage).html(Text);\r\n $('#' + HelpMessage).show();\r\n}","//TextArea\r\nfunction initTextAreas() {\r\n $(\".rtTACView\").each(function () {\r\n $(this).text($(this).parent().parent().find(\"TextArea\").text().replace(/\\n/gi, \"
    \").replace(/\\r/, \"\"));\r\n $(this).html($(this).html().replace(/<br \\/>/gi, \"
    \"));\r\n });\r\n $(\".rtTACEdit\").hide();\r\n}\r\n\r\nfunction moveCaretToEnd(el) {\r\n moveCaretTo(el, el.val().length, el.val().length)\r\n}\r\n\r\nfunction moveCaretTo(el, selectionStart, selectionEnd) {\r\n el.focus();\r\n var input = el[0];\r\n if (input.setSelectionRange) {\r\n selectionStart = adjustOffset(input, selectionStart);\r\n selectionEnd = adjustOffset(input, selectionEnd);\r\n input.setSelectionRange(selectionStart, selectionEnd);\r\n }\r\n else if (input.createTextRange) {\r\n var range = input.createTextRange();\r\n range.collapse(true);\r\n range.moveEnd('character', selectionEnd);\r\n range.moveStart('character', selectionStart);\r\n range.select();\r\n }\r\n else if (input.selection) {\r\n var range = input.createRange();\r\n range.collapse(true);\r\n range.moveEnd('character', selectionEnd);\r\n range.moveStart('character', selectionStart);\r\n range.select();\r\n }\r\n else {\r\n el.val(el.val());\r\n }\r\n};\r\n\r\nfunction adjustOffset(el, offset) {\r\n var val = el.value, newOffset = offset;\r\n if (val.indexOf(\"\\r\\n\") > -1) {\r\n var matches = val.replace(/\\r\\n/g, \"\\n\").slice(0, offset).match(/\\n/g);\r\n newOffset += matches ? matches.length : 0;\r\n }\r\n return newOffset;\r\n}","//ControlBaseEx\r\nElement.prototype.active = function (state) {\r\n if (state) {\r\n $(this).show();\r\n }\r\n else {\r\n $(this).hide();\r\n }\r\n return this.validationActive(state);\r\n};\r\n\r\nElement.prototype.validationActive = function (state) {\r\n var i;\r\n for (i = 0; i < Page_Validators.length; i++) {\r\n var eId = this.id;\r\n var vId = Page_Validators[i].id;\r\n if (vId.startsWith(eId)) { ValidatorEnableNoValidate(Page_Validators[i], state); }\r\n }\r\n return this;\r\n};\r\n\r\nfunction ValidatorEnableNoValidate(val, enable) {\r\n val.enabled = (enable != false);\r\n}\r\n\r\nfunction ToggleRadRadioButtonEx(val) {\r\n var button = $find(val);\r\n button.set_checked(!button.get_checked());\r\n}\r\n","//Functions\r\n//Grid\r\nfunction onRowDropping(sender, args, senderId, destId1, destId2, recycleBinId1, recycleBinId2, alertText, canSort) {\r\n if (sender.get_id() == senderId) {\r\n var node = args.get_destinationHtmlElement();\r\n if (isChildOf(senderId, node) || isChildOf(destId1, node) || isChildOf(destId2, node)) {\r\n }\r\n else if (isChildOf(recycleBinId1, node)) {\r\n if (confirm(alertText)) { args.set_destinationHtmlElement($get(recycleBinId1)); }\r\n else { args.set_cancel(true); }\r\n }\r\n else if (isChildOf(recycleBinId2, node)) {\r\n if (confirm(alertText)) { args.set_destinationHtmlElement($get(recycleBinId2)); }\r\n else { args.set_cancel(true); }\r\n }\r\n else {\r\n args.set_cancel(true);\r\n }\r\n }\r\n else {\r\n args.set_cancel(true);\r\n }\r\n}\r\n\r\n//Misc\r\nfunction isChildOf(parentId, element) {\r\n if (parentId == \"\") { return false; }\r\n while (element) {\r\n if (element.id && element.id.indexOf(parentId) > -1) {\r\n return true;\r\n }\r\n element = element.parentNode;\r\n }\r\n return false;\r\n}","//RadEditor\r\nfunction editorsSetup() {\r\n\r\n $(\".rtRECView\").click(function () {\r\n $(this).parent().parent().find(\".rtRECEdit\").show();\r\n $(this).parent().parent().find(\".rtRECView\").hide();\r\n $(this).parent().find(\".rtRECEditbtn\").hide();\r\n $(this).parent().find(\".rtRECViewbtn\").show();\r\n $find($(this).parent().find(\".RadEditor\").attr('id')).setFocus();\r\n moveCaretToEndRadEditor($find($(this).parent().find(\".RadEditor\").attr('id')));\r\n });\r\n\r\n $(\".rtRECEditbtn\").click(function () {\r\n $(this).parent().parent().find(\".rtRECEdit\").show();\r\n $(this).parent().parent().find(\".rtRECView\").hide();\r\n $(this).parent().find(\".rtRECEditbtn\").hide();\r\n $(this).parent().find(\".rtRECViewbtn\").show();\r\n $find($(this).parent().parent().find(\".RadEditor\").attr('id')).setFocus();\r\n moveCaretToEndRadEditor($find($(this).parent().parent().find(\".RadEditor\").attr('id')));\r\n });\r\n\r\n $(\".rtRECViewbtn\").click(function () {\r\n $(this).parent().parent().find(\".rtRECEdit\").hide();\r\n $(this).parent().parent().find(\".rtRECView\").show();\r\n $(this).parent().find(\".rtRECEditbtn\").show();\r\n $(this).parent().find(\".rtRECViewbtn\").hide();\r\n copyRadEditorContent($find($(this).parent().parent().find(\".RadEditor\").attr('id')), $(this).parent().parent().find(\".rtRECView\"));\r\n });\r\n\r\n //TextArea\r\n $(\".rtTACView\").click(function () {\r\n $(this).parent().parent().find(\".rtTACEdit\").show();\r\n $(this).parent().parent().find(\".rtTACView\").hide();\r\n $(this).parent().find(\".rtTACEditbtn\").hide();\r\n $(this).parent().find(\".rtTACViewbtn\").show();\r\n $(this).parent().parent().find(\"textarea\").focus();\r\n moveCaretToEnd($(this).parent().parent().find(\"textarea\"));\r\n });\r\n\r\n $(\".rtTACEditbtn\").click(function () {\r\n $(this).parent().parent().find(\".rtTACEdit\").show();\r\n $(this).parent().parent().find(\".rtTACView\").hide();\r\n $(this).parent().find(\".rtTACEditbtn\").hide();\r\n $(this).parent().find(\".rtTACViewbtn\").show();\r\n $(this).parent().parent().find(\"textarea\").focus();\r\n moveCaretToEnd($(this).parent().parent().find(\"textarea\"));\r\n });\r\n\r\n $(\".rtTACViewbtn\").click(function () {\r\n $(this).parent().parent().find(\".rtTACEdit\").hide();\r\n $(this).parent().parent().find(\".rtTACView\").show();\r\n $(this).parent().find(\".rtTACEditbtn\").show();\r\n $(this).parent().find(\".rtTACViewbtn\").hide();\r\n $(this).parent().parent().find(\".rtTACView\").text($(this).parent().parent().find(\"textarea\").val().replace(/\\n/gi, \"
    \").replace(/\\r/, \"\"));\r\n $(this).parent().parent().find(\".rtTACView\").html($(this).parent().parent().find(\".rtTACView\").html().replace(/<br \\/>/gi, \"
    \"));\r\n });\r\n\r\n //Init\r\n initTextAreas();\r\n initRadEditors();\r\n}\r\n\r\nfunction ToggleTACEditView(target) {\r\n var btnView = target.parent().parent().find(\".rtTACViewbtn\");\r\n var btnEdit = target.parent().parent().find(\".rtTACEditbtn\");\r\n if (btnView.is(':visible')) { btnView.click() }\r\n else { btnEdit.click() }\r\n}\r\n\r\nfunction ToggleRECEditView(target) {\r\n var btnView = target.parent().parent().find(\".rtRECViewbtn\");\r\n var btnEdit = target.parent().parent().find(\".rtRECEditbtn\");\r\n if (btnView.is(':visible')) { btnView.click() }\r\n else { btnEdit.click() }\r\n}\r\n\r\n\r\n//RadEditor\r\nfunction initRadEditors() {\r\n FixRECs();\r\n}\r\n\r\n//function onLoadRadEditors() {\r\n// updateContent();\r\n//}\r\n\r\nfunction FixRECs() {\r\n $(\".rtRECViewbtn\").each(function () {\r\n $(this).parent().parent().find(\".rtRECEdit\").hide();\r\n $(this).parent().parent().find(\".rtRECView\").show();\r\n $(this).parent().find(\".rtRECEditbtn\").show();\r\n $(this).parent().find(\".rtRECViewbtn\").hide();\r\n });\r\n}\r\n\r\n//function updateContent() {\r\n// $(\".rtRECViewbtn\").each(function () {\r\n// copyRadEditorContent($find($(this).parent().parent().find(\".RadEditor\").attr('id')), $(this).parent().parent().find(\".rtRECView\"));\r\n// });\r\n//}\r\n\r\nfunction rtRECHideEditor(editor, args) {\r\n copyRadEditorContent(editor, editorFindPart(editor));\r\n editorFindPart(editor, \"rtRECEdit\").hide();\r\n var style = editor.get_contentArea().style;\r\n style.margin = \"0\";\r\n style.padding = \"8px 10px\";\r\n style.border = \"0\";\r\n}\r\n\r\nfunction editorFindPart(editor, part) {\r\n return $(\"#\" + editor.get_id()).parent().parent().find(\".\" + part);\r\n}\r\n\r\nfunction moveCaretToEndRadEditor(editor) {\r\n //editor.set_html('

    0123456789abcdefghijklmnop


    ');\r\n //editor.set_html('

    0123456789abcdefghijklmnop

    ');\r\n //editor.set_html('0123456789abcdefghijklmnop');\r\n var content = editor.get_html();\r\n content = FixPTags(content);\r\n editor.set_html(content);\r\n editor.repaint();\r\n\r\n try {\r\n var selectionStart = content.lastIndexOf(\"

    \");\r\n if (selectionStart == -1) { selectionStart = content.length; }\r\n var selectionEnd = selectionStart;\r\n\r\n var iframe = document.getElementById(editor.get_id() + \"_contentIframe\");\r\n var iframewin = iframe.contentWindow;\r\n var input = (iframe.contentDocument || iframe.contentWindow.document).body;\r\n if (input.setSelectionRange) {\r\n selectionStart = adjustOffset(input, selectionStart);\r\n selectionEnd = adjustOffset(input, selectionEnd);\r\n input.setSelectionRange(selectionStart, selectionEnd);\r\n }\r\n else if (input.selection) {\r\n var range = input.createRange();\r\n range.collapse(true);\r\n range.moveEnd('character', selectionEnd);\r\n range.moveStart('character', selectionStart);\r\n range.select();\r\n }\r\n else if (input.createTextRange) {\r\n var range = input.createTextRange();\r\n range.collapse(true);\r\n range.moveEnd('character', selectionEnd);\r\n range.moveStart('character', selectionStart);\r\n range.select();\r\n }\r\n else if (editor.get_document().selection) {\r\n var range = (editor.get_document().selection.createRange());\r\n var oRange = range.duplicate();\r\n range.moveEnd('character', selectionEnd);\r\n range.moveStart('character', selectionStart);\r\n range.select();\r\n }\r\n else if (iframewin.getSelection && isChrome) {//Chrome\r\n var sel = iframewin.getSelection();\r\n var range = editor.get_document().createRange();\r\n var node = range.startContainer;\r\n var offset = 1;\r\n node = node.lastChild;\r\n node = node.lastChild;\r\n if (node.nodeType != 3) {\r\n if (node.lastChild && node.lastChild.localName == \"p\") {\r\n node = node.lastChild;\r\n }\r\n else {\r\n var tempnode = node.lastChild;\r\n while (tempnode.previousSibling) {\r\n tempnode = tempnode.previousSibling;\r\n if (tempnode.localName == \"p\" || tempnode.nodeType == 3) {\r\n node = tempnode;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n }\r\n if (node.lastChild) { node = node.lastChild; }\r\n if (node.nodeType == 3) { offset = node.nodeValue.length; }\r\n range.setStart(node, offset);\r\n range.setEnd(node, offset);\r\n range.collapse(false);\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n }\r\n else if (iframewin.getSelection && !isChrome) {//firefox\r\n var range = iframewin.getSelection().getRangeAt(0);\r\n var node = range.startContainer;\r\n var offset = 1;\r\n if (node.nodeType != 3) {\r\n if (node.lastChild && node.lastChild.localName == \"p\") {\r\n node = node.lastChild;\r\n }\r\n else {\r\n var tempnode = node.lastChild;\r\n while (tempnode.previousSibling) {\r\n tempnode = tempnode.previousSibling;\r\n if (tempnode.localName == \"p\" || tempnode.nodeType == 3) {\r\n node = tempnode;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (node.nodeType == 3) { offset = node.nodeValue.length; }\r\n range.setEnd(node, offset);\r\n range.setStart(node, offset);\r\n range.collapse(false);\r\n }\r\n else if (editor.getSelection) {\r\n var range = editor.getSelection().getRange();\r\n range.collapse(true);\r\n range.moveEnd('character', selectionEnd);\r\n range.moveStart('character', selectionStart);\r\n range.select();\r\n }\r\n\r\n }\r\n catch (err) {\r\n console.log(\"Needs looking at oneday!\");\r\n console.log(err);\r\n }\r\n}\r\n\r\nfunction copyRadEditorContent(src) {\r\n var dest = $(\"#\" + src.get_id() + \"_contentIframeViewOnly\");\r\n setIframeDocument(document.getElementById(src.get_id() + \"_contentIframeViewOnly\"), src.get_html());\r\n if ($(window).width() < 1024) {\r\n dest.contents().find('body').css(\"min-height\", \"26px\");\r\n }\r\n else {\r\n dest.contents().find('body').css(\"min-height\", \"20px\");\r\n }\r\n dest.height(\"0px\");\r\n dest.contents().find('body').css(\"padding\", \"0\");\r\n dest.contents().find('body').css(\"margin\", \"0\");\r\n dest.contents().find('#iFrameHtml').css(\"padding\", \"8px 10px\");\r\n dest.contents().find('#iFrameHtml').css(\"margin\", \"0\");\r\n dest.contents().find('#iFrameHtml').css(\"cursor\", \"pointer\");\r\n dest.contents().find('#iFrameHtml').click(function () { dest.click() });\r\n dest.height(dest.contents().find('body').height() - 2);\r\n}\r\n\r\nfunction setIframeDocument(iframe, content) {\r\n if (iframe) {\r\n content = FixPTags(content);\r\n var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;\r\n var d = iframeWin.document;\r\n d.open();\r\n d.write('<\\/head>' + content + '<\\/body><\\/html>');\r\n d.close();\r\n }\r\n};\r\n\r\nfunction FixPTags(content) {\r\n\r\n while (content.endsWith(\"
    \")) { content = content.substring(0, content.length - 4); }\r\n while (content.endsWith(\"
    \")) { content = content.substring(0, content.length - 6); }\r\n\r\n // content = content.replace(/| [^>]*>) /gmi, \"| [^>]*>)[\\s\\t\\n\\r]*/gmi, \"/gmi, \"

    \"); //remove white space\r\n // content = content.replace(/<\\/p>[\\s\\t\\n\\r]*| [^>]*>)/gmi, \"

    /gmi, \"

    \"); //remove any end p tags\r\n // content = content.replace(/| [^>]*>)/gmi, \"

    | [^>]*>)/gmi, \"\\s*$/gmi, \"

    \"); //remove white space after ending p tag\r\n\r\n // if (!content.startsWith(\"

    \") && !content.startsWith(\"

    \" + content; } //add missing start p tag\r\n // if (!content.endsWith(\"

    \")) { content = content + \"

    \"; } //add missing end p tag\r\n\r\n // content = content.replace(/| [^>]*>)[\\s\\t\\n\\r]*/gmi, \"/gmi, \"

    \"); //remove white space\r\n\r\n // content = content.replace(/<\\/p>

    <\\/p>| [^>]*>)/gmi, \"

    <\\/p>| [^>]*>)/gmi, \"

    <\\/p>$/gmi, \"

    \"); //remove unwanted empty p tags at end\r\n\r\n // content = content.replace(/| [^>]*>)<\\/p>/gmi, \"\"); //fix empty p tags\r\n\r\n return content;\r\n}\r\n","//RadCombobox LoadOnDemand\r\n\r\nfunction ComboboxListLocked_OnClientRequestFailedHandler(sender, eventArgs) {\r\n eventArgs.set_cancel(true);\r\n var text = sender.get_text();\r\n if (text.length == 0) return\r\n\r\n text = text.substring(0, text.length - 1)\r\n sender.set_text(text);\r\n sender.searchText = text;\r\n sender.isFailedSearch = true;\r\n sender.requestItemsIsRunning = true;\r\n sender.requestItems();\r\n}\r\n\r\nfunction ComboboxListLocked_OnClientItemsRequesting(sender, eventArgs) {\r\n sender.requestItemsIsRunning = true;\r\n if (!sender.isFailedSearch) return\r\n var context = eventArgs.get_context();\r\n context[\"searchText\"] = sender.searchText;\r\n sender.set_text(sender.searchText);\r\n sender.searchText = \"\";\r\n sender.isFailedSearch = false;\r\n}\r\n\r\nfunction Combobox_OnClientItemsRequested(sender, eventArgs) {\r\n sender.requestItemsIsRunning = false;\r\n}\r\n\r\nfunction Combobox_OnClientLoad(sender) {\r\n sender.requestItemsIsRunning = false;\r\n}\r\n\r\n\r\n","Date.prototype.toXML = function () {\r\n return (this.toXMLDate() + \"T\" + this.toXMLTime());\r\n}\r\n\r\n// For xml date;\r\nDate.prototype.toXMLDate = function () {\r\n return this.getFullYear() + \"-\" + (((this.getMonth() + 1) < 10) ? \"0\" : \"\") + (this.getMonth() + 1) + \"-\" + ((this.getDate() < 10) ? \"0\" : \"\") + this.getDate();\r\n}\r\n\r\n// For xml time;\r\nDate.prototype.toXMLTime = function () {\r\n return this.timeNow();\r\n}\r\n\r\n// For todays date;\r\nDate.prototype.today = function () {\r\n return ((this.getDate() < 10) ? \"0\" : \"\") + this.getDate() + \"/\" + (((this.getMonth() + 1) < 10) ? \"0\" : \"\") + (this.getMonth() + 1) + \"/\" + this.getFullYear();\r\n}\r\n\r\n// For the time now\r\nDate.prototype.timeNow = function () {\r\n return ((this.getHours() < 10) ? \"0\" : \"\") + this.getHours() + \":\" + ((this.getMinutes() < 10) ? \"0\" : \"\") + this.getMinutes();\r\n}\r\n\r\n// For the time now\r\nDate.prototype.timeNowSeconds = function () {\r\n return ((this.getHours() < 10) ? \"0\" : \"\") + this.getHours() + \":\" + ((this.getMinutes() < 10) ? \"0\" : \"\") + this.getMinutes() + \":\" + ((this.getSeconds() < 10) ? \"0\" : \"\") + this.getSeconds();\r\n}\r\n\r\nString.prototype.toTitleCase = function () {\r\n return this.replace(/\\w\\S*/g, function (txt) { return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase(); });\r\n}\r\n\r\nString.prototype.endsWith = function (str) {\r\n return (this.match(str + \"$\") == str)\r\n}\r\n\r\nString.prototype.startsWith = function (str) {\r\n return (this.match(\"^\" + str) == str)\r\n}\r\n\r\nString.prototype.formatEx = function (tokens) {\r\n var str = this;\r\n if (!tokens) return str;\r\n if (!Array.isArray(tokens)) return str.replace(new RegExp('\\\\{0\\\\}', 'g'), tokens);\r\n for (var i = 0; i < tokens.length; i++) {\r\n str = str.replace(new RegExp('\\\\{' + i + '\\\\}', 'g'), tokens[i]);\r\n }\r\n return str;\r\n}\r\n\r\nString.prototype.trim = function () {\r\n return (this.replace(/^[\\s\\xA0]+/, \"\").replace(/[\\s\\xA0]+$/, \"\"))\r\n}\r\n\r\nString.prototype.replaceAll = function (search, replacement) {\r\n return this.split(search).join(replacement);\r\n};\r\n\r\nObject.defineProperties(Date, {\r\n minValue: { value: -8640000000000000 }, // A number, not a date\r\n maxValue: { value: 8640000000000000 }\r\n});\r\n\r\n"]}