{"version":3,"sources":["JavaScript/common/FourDConfiguration.js","JavaScript/config.js","JavaScript/Controls/Location.js","JavaScript/Controls/Cli.js","JavaScript/Pages/Register.js","JavaScript/Pages/RegisterSimplified.js","JavaScript/Pages/PasswordReset.js","JavaScript/main.js"],"names":["FourDConfigurationHelper","constructor","this","endpoints","applePayInitialisePayment","applePayValidateSession","applePayRequestPayment","cybersourceCardRequestPaymentFields","cybersourceCardRequestAuthorisationFields","cybersourceCardRequestSubscriptionAuthorisationFields","googlePayInitialisePayment","googlePayRequestPayment","paypalCreatePayment","paypalExecutePayment","initialise","options","callbacks","FourDConfiguration","onError","err","stageText","GETADDRESSESBYPOSTCODE","GETCLIECAPABILITY","INITIALISECLIVERIFICATION","GETCLIVERIFICATION","CANCELCLIVERIFICATION","LOGIN","LOGOUT","REGISTERLOGIN","fourdLogError","AddressesByPostcode","Get","Postcode","CountryCode","CallBackFunction","data","toUpperCase","_storedElement","GetStoredElement","status","Status","loaded","empty","error","waiting","postcode","countryCode","$","ajax","JSON","stringify","type","contentType","url","dataType","timeout","success","response","textStatus","jqXHR","fourdHandleAjaxSuccess","responseData","GetNormalisedAjaxResponse","_status","ServiceOperationOutcome","PostCodeDataStorage","push","id","errorThrown","fourdHandleAjaxError","_element","map","indexOf","undefined","Cli","GetCliType","cli","callBackFunction","storedElement","DataStorage","InitialiseCliVerification","memberId","cliVerificationTypeId","GetCliVerification","CancelCliVerification","element","CliType","fixedLine","mobile","all","CliVerificationType","inboundCallPlayPassword","outboundCallPlayPassword","CliVerification","Requested","AttemptFailedCouldRetry","Queued","InProgress","Cancelled","Expired","MaximumFailedAttempts","InvalidMemberId","RequestCompleted","StatusType","completed","StatusConfiguration","label","icon","ClientConfigurations","DefaultPollingTime","validateTerms","validators","i","length","validator","ValidatorValidate","validationGroup","ValidatorUpdateIsValid","FourDTermsValidate","source","args","checkBox","$get","IsValid","checked","InitialiseRegisterPage","change","InitialiseRegisterSimplifiedPage","phoneNumber","text","email","ShowSimplifiedSignup","Heading","StoreCurrent","val","CheckCliType","on","value","CliVerificationDto","CliVerificationTypeId","pollingOnRunning","CheckCliVerification","ShowCliVerificationStatus","CliVerificationStatusId","CliVerficationStatusId","cliVerficationStatusId","ResetCliVerificationLandLine","addClass","children","attr","click","event","preventDefault","removeClass","Page_ClientValidate","login","password","RegisterSimplifiedLoginStarted","isLoggedIn","IsAuthenticated","RedirectUrl","window","location","host","hostname","protocol","port","currentHostname","off","removeAttr","RegisterSimplifiedLoginSuccessful","RegisterSimplifiedLoginEnded","statusConfiguration","RequestCanBeCancelled","setTimeout","show","Reset","hide","html","htmlTemplate","Set","h1","p","showVerifyingHeading","InitialiseResetPasswordPage","ShowLandline","ShowMobile","CliTypeId","endRequestHandler_ServerErrorCount","endRequestHandler_RefreshPageAfterServerErrorCountReaches","hideelement","elementId","showelement","document","getElementById","style","visibility","textAreaMaxLength","textArea","maxLength","$textArea","textAreaValue","substring","textBoxRemainingCount","textBox","countControl","$textBox","$countControl","countLeft","textBoxValue","initialiseTextAreaMaxLength","selector","each","isNaN","maxLengthInt","parseInt","initialiseTextBoxCount","parent","addClickToLinkButton","button","result","onclick","eval","getAttribute","addClickToDefaultButtons","defaultButtons","getComputedHeight","getComputedHeightAsFloat","obj","getComputedStyle","height","getPropertyValue","stringHeight","replace","parseFloat","jquery","totalHeight","elementHeight","endRequestHandler","sender","get_error","get_response","get_timedOut","set_errorHandled","get_responseAvailable","get_statusCode","href","d","initSingleListMenu","accList","accListUl","checkElement","next","is","slideUp","slideDown","initMultiListMenu","prev","layoutWidgets","mainWidgetContainer","repeatingSectionContainers","hideIfNoRoomElements","hideIfNoRoomLastElements","parentAsideControl","closest","associatedSectionControl","parentAsideControlOffset","offset","parentAsideControlLeft","left","associatedSectionControlOffset","outerWidth","heightOfAssociatedSectionControl","heightOfWidgetContainer","heightOfWidgetContainerSiblings","siblings","availableHeightInParentAsideControl","heightOfRepeatingSectionContainer","repeatingSectionContainer","first","repeatingSections","countOfRepeatingSections","firstRepeatingSection","heightOfRepeatingSection","heightOfContainer","totalHeightOfRepeatingSections","gapToFill","numberOfAdditionalRepeatingSections","Math","ceil","clone","appendTo","heightToReduceBy","widgetsInFirstRepeatingSection","numberOfWidgetsPerRepeatingSection","widthOfFirstWidget","width","widthOfRepeatingSection","numberOfWidgetsWide","floor","heightOfOneWidget","adjustedHeightToReduceBy","get","reverse","getSessionStorageItem","key","itemValue","sessionStorage","getItem","getSessionStorageItemAsync","done","when","then","setSessionStorageItem","itemSet","setItem","removeSessionStorageItem","itemRemoved","removeItem","isSingleColumnView","columnsInCurrentView","columnCountIndicator","divIsVisible","divId","css","IsKeyPressed","which","keyCode","resize","target","anchorItem","nodeName","hrefVal","eventTargetLocation","charAt","pathname","pageSectionVal","eventName","eventLabel","gtag","event_action","event_category","event_label","target_location","page_section","clear","Sys","WebForms","PageRequestManager","getInstance","add_endRequest","passwordControl","toggleClass","e"],"mappings":"AAAA,MAAAA,yBACA,WAAAC,GACAC,KAAAC,UAAA,CACAC,0BAAA,4CACAC,wBAAA,0CACAC,uBAAA,yCACAC,oCAAA,uCACAC,0CAAA,6CACAC,sDAAA,yDACAC,2BAAA,6CACAC,wBAAA,0CACAC,oBAAA,yBACAC,qBAAA,yBAEA,CAEA,UAAAC,CAAAC,GAGA,IACAA,IAAAA,EAAA,CAAA,GACAA,EAAAC,YAAAD,EAAAC,UAAA,CAAA,GACA,mBAAAD,EAAAC,UAAA,UAAAC,mBAAAC,QAAAH,EAAAC,UAAAE,SACAH,EAAAZ,YAAAY,EAAAZ,UAAA,CAAA,GACA,iBAAAY,EAAAZ,UAAA,4BAAAc,mBAAAb,0BAAAW,EAAAZ,UAAAC,2BACA,iBAAAW,EAAAZ,UAAA,0BAAAc,mBAAAZ,wBAAAU,EAAAZ,UAAAE,yBACA,iBAAAU,EAAAZ,UAAA,yBAAAc,mBAAAX,uBAAAS,EAAAZ,UAAAG,wBACA,iBAAAS,EAAAZ,UAAA,sCAAAc,mBAAAV,oCAAAQ,EAAAZ,UAA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M,EAAA1M,KAAA,OAAA,YACAtG,EAAA7C,MAAAiJ,SAAA,YACApG,EAAA7C,MAAAuJ,YAAA,oBAEA,IAGA1G,EAAA,kBAAAyF,GAAA,SAAA,WACAzF,EAAA7C,MAAA8V,YAAA,aACAjT,EAAA,oBAAAiT,YAAA,WACA,IAEAjT,EAAA,gBAAAuG,OAAA,WACAvG,EAAA,cAAAkI,OACAlI,EAAA,aAAAA,EAAA7C,MAAAsQ,QAAA,cAAAzF,MACA,IAEAhI,EAAA,WAAAyF,GAAA,SAAA,SAAAyN,GACAA,EAAAzM,iBACAzG,EAAA,cAAAkI,MACA,IAGA,mBAAA,wBAAAlI,EAAA,iBAAAkE,OAAA,GACAY,yBACA,mBAAA,kCAAA9E,EAAA,iBAAAkE,OAAA,GACAc,mCACA,mBAAA,6BAAAhF,EAAA,kBAAAkE,OAAA,GACAuE,6BAEA","file":"JavaScript/min/MainJs.min.js","sourcesContent":["class FourDConfigurationHelper {\r\n constructor() {\r\n this.endpoints = {\r\n applePayInitialisePayment: \"/CyberSourceSop/InitialiseApplePayPayment\",\r\n applePayValidateSession: \"/CyberSourceSop/ValidateApplePaySession\",\r\n applePayRequestPayment: \"/CyberSourceSop/RequestApplePayPayment\",\r\n cybersourceCardRequestPaymentFields: \"/CyberSourceSop/RequestPaymentFields\",\r\n cybersourceCardRequestAuthorisationFields: \"/CyberSourceSop/RequestAuthorisationFields\",\r\n cybersourceCardRequestSubscriptionAuthorisationFields: \"/CyberSourceSop/RequestSubscriptionAuthorisationFields\",\r\n googlePayInitialisePayment: \"/CyberSourceSop/InitialiseGooglePayPayment\",\r\n googlePayRequestPayment: \"/CyberSourceSop/RequestGooglePayPayment\",\r\n paypalCreatePayment: \"/PayPal/RequestPayment\",\r\n paypalExecutePayment: \"/PayPal/ExecutePayment\"\r\n };\r\n }\r\n\r\n initialise(options) {\r\n var result = false;\r\n\r\n try {\r\n if (!options) options = {};\r\n if (!options.callbacks) options.callbacks = {};\r\n if (typeof (options.callbacks.onError) == 'function') FourDConfiguration.onError = options.callbacks.onError;\r\n if (!options.endpoints) options.endpoints = {};\r\n if (typeof (options.endpoints.applePayInitialisePayment) == 'string') FourDConfiguration.applePayInitialisePayment = options.endpoints.applePayInitialisePayment;\r\n if (typeof (options.endpoints.applePayValidateSession) == 'string') FourDConfiguration.applePayValidateSession = options.endpoints.applePayValidateSession;\r\n if (typeof (options.endpoints.applePayRequestPayment) == 'string') FourDConfiguration.applePayRequestPayment = options.endpoints.applePayRequestPayment;\r\n if (typeof (options.endpoints.cybersourceCardRequestPaymentFields) == 'string') FourDConfiguration.cybersourceCardRequestPaymentFields = options.endpoints.cybersourceCardRequestPaymentFields;\r\n if (typeof (options.endpoints.cybersourceCardRequestAuthorisationFields) == 'string') FourDConfiguration.cybersourceCardRequestAuthorisationFields = options.endpoints.cybersourceCardRequestAuthorisationFields;\r\n if (typeof (options.endpoints.cybersourceCardRequestSubscriptionAuthorisationFields) == 'string') FourDConfiguration.cybersourceCardRequestSubscriptionAuthorisationFields = options.endpoints.cybersourceCardRequestSubscriptionAuthorisationFields;\r\n if (typeof (options.endpoints.googlePayInitialisePayment) == 'string') FourDConfiguration.googlePayInitialisePayment = options.endpoints.googlePayInitialisePayment;\r\n if (typeof (options.endpoints.googlePayRequestPayment) == 'string') FourDConfiguration.googlePayRequestPayment = options.endpoints.googlePayRequestPayment;\r\n if (typeof (options.endpoints.paypalCreatePayment) == 'string') FourDConfiguration.paypalCreatePayment = options.endpoints.paypalCreatePayment;\r\n if (typeof (options.endpoints.paypalExecutePayment) == 'string') FourDConfiguration.paypalExecutePayment = options.endpoints.paypalExecutePayment;\r\n\r\n }\r\n catch (err) {\r\n FourDConfiguration.onError(err, 'FourDConfiguration/initialise');\r\n }\r\n return result;\r\n }\r\n\r\n onError(err, stageText) { }\r\n};\r\n\r\nconst FourDConfiguration = new FourDConfigurationHelper();","// Endpoints\r\nvar GETADDRESSESBYPOSTCODE = \"/Location/GetAddressesByPostcode\";\r\n\r\nvar GETCLIECAPABILITY = \"/Member/GetCliCapability\";\r\nvar INITIALISECLIVERIFICATION = \"/Member/InitialiseCliVerification\";\r\nvar GETCLIVERIFICATION = \"/Member/GetCliVerification\";\r\nvar CANCELCLIVERIFICATION = \"/Member/CancelCliVerification\";\r\n\r\nvar LOGIN = \"/Member/LoginRequest\";\r\nvar LOGOUT = \"/Member/LogOutRequest\";\r\n\r\n//var ANALYTICSLOGCLIENT = \"/GoogleAnalytics/LogClientId\";\r\nvar REGISTERLOGIN = \"/Register/LoginRequest\";\r\n\r\nif (typeof (FourDConfiguration) !== 'undefined') {\r\n // Already exists as expected\r\n let options = {\r\n onError: function (err, stageText) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at stage '${stageText}'`, err);\r\n }\r\n },\r\n };\r\n FourDConfiguration.initialise(options);\r\n}\r\nelse {\r\n // Doesn't exist, create blank\r\n FourDConfiguration = {\r\n endpoints: {},\r\n };\r\n}","\r\nvar AddressesByPostcode = {\r\n Get: function (Postcode, CountryCode, CallBackFunction) {\r\n if (!CallBackFunction) { CallBackFunction = function (data) { }; }\r\n\r\n Postcode = Postcode.toUpperCase();\r\n CountryCode = CountryCode.toUpperCase();\r\n\r\n var _storedElement = AddressesByPostcode.GetStoredElement(Postcode, CountryCode);\r\n\r\n if (_storedElement.status == AddressesByPostcode.Status.loaded) {\r\n CallBackFunction(_storedElement.data);\r\n }\r\n\r\n else if (_storedElement.status == AddressesByPostcode.Status.empty ||\r\n _storedElement.status == AddressesByPostcode.Status.error\r\n ) {\r\n\r\n _storedElement.status = AddressesByPostcode.Status.waiting;\r\n\r\n var data = { postcode: Postcode, countryCode: CountryCode };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: GETADDRESSESBYPOSTCODE,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n var responseData = GetNormalisedAjaxResponse(response);\r\n var _status = AddressesByPostcode.Status.error;\r\n\r\n if (responseData) {\r\n if (responseData.ServiceOperationOutcome == 10 || responseData.ServiceOperationOutcome == 40) {\r\n _status = AddressesByPostcode.Status.loaded;\r\n }\r\n }\r\n\r\n if (_storedElement) {\r\n if (_storedElement.status != AddressesByPostcode.Status.loaded) {\r\n _storedElement.data = responseData ? responseData : null;\r\n _storedElement.status = _status;\r\n }\r\n }\r\n else {\r\n AddressesByPostcode.PostCodeDataStorage.push({\r\n id: Postcode + CountryCode,\r\n data: responseData ? responseData : null,\r\n status: _status\r\n });\r\n }\r\n CallBackFunction(_storedElement.data);\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (_storedElement.status != AddressesByPostcode.Status.loaded) {\r\n _storedElement.status = AddressesByPostcode.Status.error;\r\n }\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n , GetStoredElement: function (Postcode, CountryCode) {\r\n var _element;\r\n _element = AddressesByPostcode.PostCodeDataStorage[AddressesByPostcode.PostCodeDataStorage.map(function (data) {\r\n return data.id;\r\n }).indexOf(Postcode + CountryCode)];\r\n\r\n if (!_element) {\r\n AddressesByPostcode.PostCodeDataStorage.push({\r\n id: Postcode + CountryCode,\r\n data: null,\r\n status: AddressesByPostcode.Status.empty\r\n });\r\n _element = AddressesByPostcode.PostCodeDataStorage[AddressesByPostcode.PostCodeDataStorage.map(function (data) {\r\n return data.id;\r\n }).indexOf(Postcode + CountryCode)];\r\n }\r\n\r\n return _element;\r\n }\r\n , PostCodeDataStorage: [{ id: \"\", data: undefined, status: null }]\r\n , Status: { empty: 0, waiting: 1, error: 2, loaded: 3 }\r\n}\r\n","var Cli = {\r\n GetCliType: function (cli, callBackFunction) {\r\n if (!callBackFunction) { callBackFunction = function (data) { }; }\r\n\r\n var storedElement = Cli.GetStoredElement(cli);\r\n\r\n if (storedElement.status == Cli.Status.loaded) {\r\n callBackFunction(storedElement.data);\r\n }\r\n\r\n else if (storedElement.status == Cli.Status.empty ||\r\n storedElement.status == Cli.Status.error\r\n ) {\r\n\r\n storedElement.status = Cli.Status.waiting;\r\n\r\n var data = { cli: cli };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: GETCLIECAPABILITY,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n var responseData = GetNormalisedAjaxResponse(response);\r\n\r\n var status = Cli.Status.error;\r\n\r\n if (responseData) {\r\n if (responseData.ServiceOperationOutcome == 10 || responseData.ServiceOperationOutcome == 40) {\r\n status = Cli.Status.loaded;\r\n }\r\n }\r\n\r\n if (storedElement) {\r\n if (storedElement.status != Cli.Status.loaded) {\r\n storedElement.data = responseData ? responseData : null;\r\n storedElement.status = status;\r\n }\r\n }\r\n else {\r\n Cli.DataStorage.push({\r\n id: cli,\r\n data: responseData ? responseData : null,\r\n status: status\r\n });\r\n }\r\n callBackFunction(storedElement.data);\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (storedElement.status != Cli.Status.loaded) {\r\n storedElement.status = Cli.Status.error;\r\n }\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n , InitialiseCliVerification: function (memberId, cli, cliVerificationTypeId, callBackFunction) {\r\n if (!callBackFunction) { callBackFunction = function (data) { }; }\r\n var data = { memberId: memberId, cli: cli, cliVerificationTypeId: cliVerificationTypeId };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: INITIALISECLIVERIFICATION,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n callBackFunction(GetNormalisedAjaxResponse(response));\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n , GetCliVerification: function (memberId, cli, callBackFunction) {\r\n if (!callBackFunction) { callBackFunction = function (data) { }; }\r\n var data = { memberId: memberId, cli: cli };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: GETCLIVERIFICATION,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n callBackFunction(GetNormalisedAjaxResponse(response));\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n , CancelCliVerification: function (memberId, cli, callBackFunction) {\r\n if (!callBackFunction) { callBackFunction = function (data) { }; }\r\n var data = { memberId: memberId, cli: cli };\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: CANCELCLIVERIFICATION,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n callBackFunction(GetNormalisedAjaxResponse(response));\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n }\r\n });\r\n }\r\n , GetStoredElement: function (cli) {\r\n var element;\r\n element = Cli.DataStorage[Cli.DataStorage.map(function (data) {\r\n return data.id;\r\n }).indexOf(cli)];\r\n\r\n if (!element) {\r\n Cli.DataStorage.push({\r\n id: cli,\r\n data: null,\r\n status: Cli.Status.empty\r\n });\r\n element = Cli.DataStorage[Cli.DataStorage.map(function (data) {\r\n return data.id;\r\n }).indexOf(cli)];\r\n }\r\n\r\n return element;\r\n }\r\n , DataStorage: [{ id: \"\", data: undefined, status: null }]\r\n , Status: {\r\n empty: 0\r\n , waiting: 1\r\n , error: 2\r\n , loaded: 3\r\n }\r\n , CliType: {\r\n fixedLine: 1\r\n , mobile: 2\r\n , all: 3\r\n }\r\n , CliVerificationType: {\r\n inboundCallPlayPassword: 2\r\n , outboundCallPlayPassword: 3\r\n }\r\n , CliVerification: {\r\n Status: {\r\n Requested: 10\r\n , AttemptFailedCouldRetry: 11\r\n , Queued: 20\r\n , InProgress: 30\r\n , Cancelled: 100\r\n , Expired: 110\r\n , MaximumFailedAttempts: 120\r\n , InvalidMemberId: 130\r\n , RequestCompleted: 200\r\n }\r\n , StatusType: {\r\n waiting: 1\r\n , error: 2\r\n , completed: 3\r\n }\r\n , StatusConfiguration: [\r\n { status: 10, type: 1, label: \"Requested\", icon: \"icon-wait\" }\r\n , { status: 11, type: 1, label: \"Attempt failed\", icon: \"icon-wait\" }\r\n , { status: 20, type: 1, label: \"Queued\", icon: \"icon-wait\" }\r\n , { status: 30, type: 1, label: \"In progress\", icon: \"icon-wait\" }\r\n , { status: 100, type: 3, label: \"Cancelled\", icon: \"icon-exclamation-circle\" }\r\n , { status: 110, type: 2, label: \"Expired\", icon: \"icon-exclamation-circle\" }\r\n , { status: 120, type: 2, label: \"Maximum failed attempts\", icon: \"icon-exclamation-circle\" }\r\n , { status: 130, type: 2, label: \"Error\", icon: \"icon-exclamation-circle\" } //to set a proper label\r\n , { status: 200, type: 3, label: \"Request completed\", icon: \"icon-exclamation-circle\" }\r\n , { status: -1, type: -1, label: \"Error\", icon: \"icon-exclamation-circle\" } //to set a proper label\r\n ]\r\n }\r\n , ClientConfigurations: {\r\n DefaultPollingTime: 3000\r\n }\r\n}\r\n","function validateTerms() {\r\n var validators = $('.registrationTermsValidator');\r\n for (var i = 0; i < validators.length; i++) {\r\n var validator = validators[i];\r\n ValidatorValidate(validator, validator.validationGroup, null);\r\n }\r\n ValidatorUpdateIsValid();\r\n}\r\n\r\nfunction FourDTermsValidate(source, args) {\r\n var checkBox = $get(\"cbTerms\");\r\n if (checkBox) args.IsValid = checkBox.checked;\r\n else args.IsValid = true; //let server check\r\n}\r\n\r\nvar InitialiseRegisterPage = function () {\r\n $('.registrationTerms').change(validateTerms);\r\n}\r\n","/// \r\n\r\nvar InitialiseRegisterSimplifiedPage = function () {\r\n\r\n var phoneNumber = $(\"#lblPhoneNumber\").text();\r\n var email = $(\"#lblEmail\").text();\r\n ShowSimplifiedSignup();\r\n\r\n Heading.StoreCurrent();\r\n\r\n if ($(\"#txtMobile\").val()) {\r\n CheckCliType($(\"#txtMobile\").val());\r\n }\r\n\r\n $(\"#txtMobile\").on(\"keyup\", function () {\r\n CheckCliType(this.value);\r\n }).on(\"change\", function () {\r\n CheckCliType(this.value);\r\n });\r\n\r\n Cli.GetCliVerification(null, phoneNumber, function (data) {\r\n if (data.CliVerificationDto) {\r\n if (data.CliVerificationDto.CliVerificationTypeId) {\r\n pollingOnRunning = true;\r\n CheckCliVerification(phoneNumber);\r\n ShowCliVerificationStatus(data.CliVerificationDto.CliVerificationTypeId, data.CliVerificationDto.CliVerificationStatusId, true);\r\n }\r\n }\r\n });\r\n\r\n $(\"#btnYouCallUs\").on(\"click\", function () {\r\n Cli.InitialiseCliVerification(null, phoneNumber, Cli.CliVerificationType.inboundCallPlayPassword, function (data) {\r\n if (data.CliVerificationDto && data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Requested &&\r\n data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.inboundCallPlayPassword) {\r\n pollingOnRunning = true;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.inboundCallPlayPassword, data.CliVerificationDto.CliVerficationStatusId, true);\r\n CheckCliVerification(phoneNumber);\r\n }\r\n else {\r\n // Error\r\n var cliVerficationStatusId = -1;\r\n if (data.CliVerificationDto) cliVerficationStatusId = data.CliVerificationDto.CliVerficationStatusId;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.inboundCallPlayPassword, cliVerficationStatusId, false);\r\n }\r\n });\r\n });\r\n\r\n $(\"#btnWeCallYou\").on(\"click\", function () {\r\n Cli.InitialiseCliVerification(null, phoneNumber, Cli.CliVerificationType.outboundCallPlayPassword, function (data) {\r\n if (data.CliVerificationDto && data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Requested &&\r\n data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n pollingOnRunning = true;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.outboundCallPlayPassword, data.CliVerificationDto.CliVerficationStatusId, true);\r\n CheckCliVerification(phoneNumber);\r\n }\r\n else {\r\n // Error\r\n var cliVerficationStatusId = -1;\r\n if (data.CliVerificationDto) cliVerficationStatusId = data.CliVerificationDto.CliVerficationStatusId;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.outboundCallPlayPassword, cliVerficationStatusId, false);\r\n }\r\n });\r\n });\r\n\r\n $(\"#btnResetLandline\").on(\"click\", function () {\r\n Cli.CancelCliVerification(null, phoneNumber, function (data) {\r\n if (data.CliVerificationDto) {\r\n if (data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Cancelled) {\r\n ResetCliVerificationLandLine();\r\n }\r\n }\r\n else {\r\n ResetCliVerificationLandLine();\r\n }\r\n });\r\n\r\n });\r\n\r\n $(\".buy_button\").addClass(\"aspNetDisabled\").children(\"a\").attr('disabled', 'disabled');\r\n\r\n $(\".buy_button > a\").click(function (event) {\r\n if ($(this).attr(\"disabled\") == \"disabled\") {\r\n event.preventDefault();\r\n $(\"#needLoginMessage\").removeClass(\"hidden\");\r\n\r\n // alert($(\"#msg-login-needed\").val());\r\n }\r\n });\r\n\r\n $(\"#btnLoginRegisterNew\").click(function () {\r\n if (Page_ClientValidate(\"AllValidators\")) {\r\n var login = phoneNumber;\r\n var password = $(\"#txtPassword\").val();\r\n\r\n var data = { login: login, password: password };\r\n RegisterSimplifiedLoginStarted();\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: REGISTERLOGIN,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n var responseData = GetNormalisedAjaxResponse(response);\r\n var isLoggedIn = false;\r\n if (responseData) {\r\n if (responseData.IsAuthenticated) {\r\n if (responseData.RedirectUrl != null && responseData.RedirectUrl.length > 0) {\r\n // TODO - remove/update temp offer check logic\r\n var currentURL = window.location;\r\n var host = window.location.host;\r\n var hostname = window.location.hostname;\r\n var protocol = window.location.protocol;\r\n var port = window.location.port;\r\n\r\n var currentHostname = (port === 80 || port === 443) ? hostname : host;\r\n\r\n window.location = protocol + '//' + currentHostname + responseData.RedirectUrl;\r\n }\r\n else {\r\n //remove click event for login\r\n $(\"#btnLoginRegisterNew\").off(\"click\");\r\n\r\n //disable login controls\r\n $(\"#btnLoginRegisterNew\").addClass(\"aspNetDisabled\").removeAttr(\"href\");\r\n $(\".register-new.mobile-number\").addClass(\"aspNetDisabled\").attr('disabled', 'disabled');\r\n $(\".register-new.password\").addClass(\"aspNetDisabled\").attr('disabled', 'disabled');\r\n\r\n //Enable buy buttons \r\n $(\".buy_button\").removeClass(\"aspNetDisabled\").children(\"a\").removeAttr(\"disabled\");\r\n isLoggedIn = true;\r\n RegisterSimplifiedLoginSuccessful();\r\n }\r\n }\r\n else {\r\n //set login error message\r\n $(\"#valPasswordAsync\").attr(\"style\", \"\");\r\n }\r\n }\r\n RegisterSimplifiedLoginEnded(isLoggedIn);\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n //callback({}); //looks like a bxslider function\r\n RegisterSimplifiedLoginEnded(false);\r\n }\r\n });\r\n\r\n }\r\n\r\n });\r\n\r\n $(\"#btnLoginRegisterNewV2\").click(function () {\r\n if (Page_ClientValidate(\"AllValidators\")) {\r\n var login = email;\r\n var password = $(\"#txtPassword\").val();\r\n\r\n var data = { login: login, password: password };\r\n RegisterSimplifiedLoginStarted();\r\n $.ajax({\r\n data: JSON.stringify(data),\r\n type: \"POST\",\r\n contentType: \"application/json; charset=utf-8\",\r\n url: REGISTERLOGIN,\r\n dataType: \"json\",\r\n timeout: 60000,\r\n success: function (response, textStatus, jqXHR) {\r\n if (typeof (fourdHandleAjaxSuccess) != 'undefined') {\r\n fourdHandleAjaxSuccess(response, textStatus, jqXHR, this);\r\n }\r\n var responseData = GetNormalisedAjaxResponse(response);\r\n var isLoggedIn = false;\r\n if (responseData) {\r\n if (responseData.IsAuthenticated) {\r\n if (responseData.RedirectUrl != null && responseData.RedirectUrl.length > 0) {\r\n // TODO - remove/update temp offer check logic\r\n var currentURL = window.location;\r\n var host = window.location.host;\r\n var hostname = window.location.hostname;\r\n var protocol = window.location.protocol;\r\n var port = window.location.port;\r\n\r\n var currentHostname = (port === 80 || port === 443) ? hostname : host;\r\n\r\n window.location = protocol + '//' + currentHostname + responseData.RedirectUrl;\r\n }\r\n else {\r\n //remove click event for login\r\n $(\"#btnLoginRegisterNew\").off(\"click\");\r\n\r\n //disable login controls\r\n $(\"#btnLoginRegisterNew\").addClass(\"aspNetDisabled\").removeAttr(\"href\");\r\n $(\".register-new.mobile-number\").addClass(\"aspNetDisabled\").attr('disabled', 'disabled');\r\n $(\".register-new.password\").addClass(\"aspNetDisabled\").attr('disabled', 'disabled');\r\n\r\n //Enable buy buttons \r\n $(\".buy_button\").removeClass(\"aspNetDisabled\").children(\"a\").removeAttr(\"disabled\");\r\n isLoggedIn = true;\r\n RegisterSimplifiedLoginSuccessful();\r\n }\r\n }\r\n else {\r\n //set login error message\r\n $(\"#valPasswordAsync\").attr(\"style\", \"\");\r\n }\r\n }\r\n RegisterSimplifiedLoginEnded(isLoggedIn);\r\n },\r\n error: function (jqXHR, textStatus, errorThrown) {\r\n if (typeof (fourdHandleAjaxError) != 'undefined') {\r\n fourdHandleAjaxError(jqXHR, textStatus, errorThrown, this);\r\n }\r\n //callback({}); //looks like a bxslider function\r\n RegisterSimplifiedLoginEnded(false);\r\n }\r\n });\r\n\r\n }\r\n\r\n });\r\n\r\n}\r\n\r\nvar pollingOnRunning = false;\r\n\r\nfunction CheckCliType(cli) {\r\n if (cli.length > 9) {\r\n Cli.GetCliType(cli, function (data) { });\r\n }\r\n}\r\n\r\nfunction CheckCliVerification(cli) {\r\n\r\n Cli.GetCliVerification(null, cli, function (data) {\r\n if (pollingOnRunning) {\r\n if (data.CliVerificationDto) {\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(data.CliVerificationDto.CliVerficationStatusId)];\r\n\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n if (statusConfiguration.type == Cli.CliVerification.StatusType.waiting) {\r\n\r\n if (data.CliVerificationDto.RequestCanBeCancelled) {\r\n $(\"#divResetLandline\").removeClass(\"hidden\");\r\n }\r\n else {\r\n $(\"#divResetLandline\").addClass(\"hidden\");\r\n }\r\n setTimeout(function () { CheckCliVerification(cli); }, Cli.ClientConfigurations.DefaultPollingTime);\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divResetLandline\").removeClass(\"hidden\");\r\n }\r\n $(\"#iconStatus\").removeClass().addClass(statusConfiguration.icon);\r\n $(\"#spanStatusText\").text(statusConfiguration.label);\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divResetLandline\").removeClass(\"hidden\");\r\n }\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divResetLandline\").removeClass(\"hidden\");\r\n }\r\n }\r\n });\r\n}\r\n\r\nfunction ResetCliVerificationLandLine() {\r\n pollingOnRunning = false;\r\n $(\"#btnWeCallYou\").attr(\"disabled\", false).show();\r\n $(\"#btnYouCallUs\").attr(\"disabled\", false).show();\r\n $(\"#liPassw0rd\").addClass(\"hidden\");\r\n $(\"#contentWeCallYou\").addClass(\"hidden\");\r\n $(\"#contentCallUs\").addClass(\"hidden\");\r\n $(\"#buttonLoginContent\").addClass(\"hidden\");\r\n $(\"#divStatus\").addClass(\"hidden\");\r\n $(\"#divResetLandline\").addClass(\"hidden\");\r\n $(\"#spanStatusText\").text(\"Requested\");\r\n $(\"#iconStatus\").removeClass().addClass(\"icon-wait\");\r\n Heading.Reset();\r\n}\r\n\r\nfunction ShowSimplifiedSignup() {\r\n $(\".buttons.simplified-signup-register\").show();\r\n $(\".age.signup\").hide();\r\n}\r\n\r\nfunction RegisterSimplifiedLoginSuccessful() {\r\n $(\"#loginForm\").hide();\r\n $(\"#paymentOptions\").removeClass(\"disabled\");\r\n $(\"#needLoginMessage\").addClass(\"hidden\");\r\n $(\"#notLoggedInContent\").addClass(\"hidden\");\r\n $(\"#LoggedInContent\").removeClass(\"hidden\");\r\n}\r\n\r\nfunction RegisterSimplifiedLoginStarted() {\r\n $(\"#btnLoginRegisterNew\").addClass(\"aspNetDisabled\").attr(\"disabled\", \"disabled\");\r\n $(\"#Loginspan\").addClass(\"hidden\");\r\n $(\"#loading\").removeClass(\"hidden\");\r\n}\r\n\r\nfunction RegisterSimplifiedLoginEnded(isLoggedIn) {\r\n if (isLoggedIn == false)\r\n $(\"#btnLoginRegisterNew\").removeClass(\"aspNetDisabled\").removeAttr(\"disabled\");\r\n $(\"#loading\").addClass(\"hidden\");\r\n $(\"#Loginspan\").removeClass(\"hidden\");\r\n}\r\n\r\nvar Heading = {\r\n element: $(\"#notLoggedInContent\")\r\n , html: null\r\n , htmlTemplate: \"


\"\r\n , StoreCurrent: function () {\r\n Heading.html = Heading.element.html();\r\n }\r\n , Set: function (h1, p) {\r\n Heading.element.html(Heading.htmlTemplate);\r\n Heading.element.children(\"h1\").text(h1);\r\n Heading.element.children(\"p\").text(p);\r\n }\r\n , Reset: function () {\r\n Heading.element.html(Heading.html);\r\n }\r\n}\r\n\r\nfunction ShowCliVerificationStatus(cliVerificationTypeId, cliVerficationStatusId, showVerifyingHeading) {\r\n $(\"#btnYouCallUs\").hide();\r\n $(\"#btnWeCallYou\").hide();\r\n $(\"#liPassw0rd\").removeClass(\"hidden\");\r\n $(\"#buttonLoginContent\").removeClass(\"hidden\");\r\n $(\"#divStatus\").removeClass(\"hidden\");\r\n\r\n if (cliVerificationTypeId == Cli.CliVerificationType.inboundCallPlayPassword) {\r\n $(\"#contentWeCallYou\").addClass(\"hidden\");\r\n $(\"#contentCallUs\").removeClass(\"hidden\");\r\n } else if (cliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n $(\"#contentWeCallYou\").removeClass(\"hidden\");\r\n $(\"#contentCallUs\").addClass(\"hidden\");\r\n }\r\n\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(cliVerficationStatusId)];\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n $(\"#iconStatus\").removeClass().addClass(statusConfiguration.icon);\r\n $(\"#spanStatusText\").text(statusConfiguration.label);\r\n }\r\n\r\n if (showVerifyingHeading) {\r\n Heading.Set(\"Verifying your phone number\", \"Please now enter the password issued by our service to continue.\");\r\n }\r\n}","var InitialiseResetPasswordPage = function () {\r\n\r\n var pollingOnRunning = false;\r\n var phoneNumber;\r\n\r\n CheckCliType($(\"#txtMobileNumber\").val());\r\n\r\n $(\"#divBtnWeCallYou\").on(\"click\", function () {\r\n phoneNumber = $(\"#txtMobileNumber\").val();\r\n\r\n Cli.InitialiseCliVerification(null, phoneNumber, Cli.CliVerificationType.outboundCallPlayPassword, function (data) {\r\n if (data.CliVerificationDto && data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Requested &&\r\n data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n pollingOnRunning = true;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.outboundCallPlayPassword, data.CliVerificationDto.CliVerficationStatusId);\r\n CheckCliVerification(phoneNumber);\r\n }\r\n else {\r\n // Error\r\n var cliVerficationStatusId = -1;\r\n if (data.CliVerificationDto) cliVerficationStatusId = data.CliVerificationDto.CliVerficationStatusId;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.outboundCallPlayPassword, cliVerficationStatusId);\r\n }\r\n });\r\n });\r\n\r\n $(\"#divBtnYouCallUs\").on(\"click\", function () {\r\n phoneNumber = $(\"#txtMobileNumber\").val();\r\n\r\n Cli.InitialiseCliVerification(null, phoneNumber, Cli.CliVerificationType.inboundCallPlayPassword, function (data) {\r\n if (data.CliVerificationDto && data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Requested &&\r\n data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.inboundCallPlayPassword) {\r\n pollingOnRunning = true;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.inboundCallPlayPassword, data.CliVerificationDto.CliVerficationStatusId);\r\n CheckCliVerification(phoneNumber);\r\n }\r\n else {\r\n // Error\r\n var cliVerficationStatusId = -1;\r\n if (data.CliVerificationDto) cliVerficationStatusId = data.CliVerificationDto.CliVerficationStatusId;\r\n ShowCliVerificationStatus(Cli.CliVerificationType.inboundCallPlayPassword, cliVerficationStatusId);\r\n }\r\n });\r\n });\r\n\r\n $(\"#btnResetLandline\").on(\"click\", function () {\r\n phoneNumber = $(\"#txtMobileNumber\").val();\r\n\r\n Cli.CancelCliVerification(null, phoneNumber, function (data) {\r\n if (data.CliVerificationDto) {\r\n if (data.CliVerificationDto.CliVerficationStatusId == Cli.CliVerification.Status.Cancelled) {\r\n pollingOnRunning = false;\r\n ShowLandline();\r\n }\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n ShowLandline();\r\n }\r\n });\r\n });\r\n\r\n\r\n function CheckCliType(cli) {\r\n\r\n var action = function (data) {\r\n if (data.CliTypeId == Cli.CliType.fixedLine) {\r\n ShowLandline()\r\n }\r\n else {\r\n ShowMobile()\r\n }\r\n };\r\n\r\n if (cli.length > 9) {\r\n Cli.GetCliType(cli, action);\r\n }\r\n else {\r\n ShowMobile()\r\n }\r\n }\r\n\r\n\r\n\r\n function CheckCliVerification(cli) {\r\n\r\n Cli.GetCliVerification(null, cli, function (data) {\r\n if (pollingOnRunning) {\r\n if (data.CliVerificationDto) {\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(data.CliVerificationDto.CliVerficationStatusId)];\r\n\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n if (statusConfiguration.type == Cli.CliVerification.StatusType.waiting) {\r\n\r\n if (data.CliVerificationDto.RequestCanBeCancelled) {\r\n $(\"#divLinksLandLine\").removeClass(\"hidden\");\r\n }\r\n else {\r\n $(\"#divLinksLandLine\").addClass(\"hidden\");\r\n }\r\n setTimeout(function () { CheckCliVerification(cli); }, Cli.ClientConfigurations.DefaultPollingTime);\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divLinksLandLine\").removeClass(\"hidden\");\r\n }\r\n $(\"#iconStatus\").removeClass().addClass(statusConfiguration.icon);\r\n $(\"#spanStatusText\").text(statusConfiguration.label);\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divLinksLandLine\").removeClass(\"hidden\");\r\n }\r\n }\r\n else {\r\n pollingOnRunning = false;\r\n $(\"#divLinksLandLine\").removeClass(\"hidden\");\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n\r\n function ShowLandline() {\r\n var baseAction = function () {\r\n if ($(\"#txtMobileNumber\").val()) {\r\n\r\n $(\"#divRequestMobile\").hide();\r\n $(\"#divLinksMobile\").hide();\r\n $(\".ValidationHeader\").addClass(\"hidden\");\r\n\r\n $(\"#divTxtWeCallYou\").addClass(\"hidden\");\r\n $(\"#divTxtYouCallUs\").addClass(\"hidden\");\r\n $(\"#divLinksLandLine\").addClass(\"hidden\");\r\n $(\"#divStatus\").addClass(\"hidden\");\r\n\r\n $(\"#landLineResetRequestContent\").removeClass(\"hidden\");\r\n $(\"#divBtnWeCallYou\").removeClass(\"hidden\");\r\n $(\"#divBtnYouCallUs\").removeClass(\"hidden\");\r\n $(\"#txtMobileNumber\").attr(\"disabled\", false);\r\n\r\n $(\"#spanStatusText\").text(\"Requested\");\r\n $(\"#iconStatus\").removeClass().addClass(\"icon-wait\");\r\n }\r\n else {\r\n ShowMobile();\r\n }\r\n }\r\n\r\n $(\"#divRequestMobile\").hide();\r\n $(\"#divLinksMobile\").hide();\r\n $(\".ValidationHeader\").addClass(\"hidden\");\r\n\r\n phoneNumber = $(\"#txtMobileNumber\").val();\r\n\r\n Cli.GetCliVerification(null, phoneNumber, function (data) {\r\n if (data.CliVerificationDto) {\r\n if (data.CliVerificationDto.CliVerificationTypeId) {\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(data.CliVerificationDto.CliVerficationStatusId)];\r\n\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n if (statusConfiguration.type == Cli.CliVerification.StatusType.waiting) {\r\n pollingOnRunning = true;\r\n CheckCliVerification(phoneNumber);\r\n\r\n $(\"#divStatus\").removeClass(\"hidden\");\r\n $(\"#txtMobileNumber\").attr(\"disabled\", true);\r\n\r\n if (data.CliVerificationDto.CliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n $(\"#divTxtWeCallYou\").removeClass(\"hidden\");\r\n }\r\n else {\r\n $(\"#divTxtYouCallUs\").removeClass(\"hidden\");\r\n }\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n baseAction();\r\n });\r\n\r\n }\r\n\r\n function ShowMobile() {\r\n $(\"#landLineResetRequestContent\").addClass(\"hidden\");\r\n $(\"#divBtnWeCallYou\").addClass(\"hidden\");\r\n $(\"#divBtnYouCallUs\").addClass(\"hidden\");\r\n $(\"#divTxtWeCallYou\").addClass(\"hidden\");\r\n $(\"#divTxtYouCallUs\").addClass(\"hidden\");\r\n $(\"#divLinksLandLine\").addClass(\"hidden\");\r\n $(\"#divStatus\").addClass(\"hidden\");\r\n $(\"#divLinksMobile\").show();\r\n $(\"#divRequestMobile\").show();\r\n $(\".ValidationHeader\").removeClass(\"hidden\");\r\n $(\"#txtMobileNumber\").attr(\"disabled\", false);\r\n\r\n $(\"#spanStatusText\").text(\"Requested\");\r\n $(\"#iconStatus\").removeClass().addClass(\"icon-wait\");\r\n }\r\n\r\n function ShowCliVerificationStatus(cliVerificationTypeId, cliVerficationStatusId) { \r\n $(\"#txtMobileNumber\").attr(\"disabled\", true);\r\n $(\"#divBtnWeCallYou\").addClass(\"hidden\");\r\n $(\"#divBtnYouCallUs\").addClass(\"hidden\");\r\n $(\"#divStatus\").removeClass(\"hidden\");\r\n\r\n if (cliVerificationTypeId == Cli.CliVerificationType.inboundCallPlayPassword) {\r\n $(\"#divTxtWeCallYou\").addClass(\"hidden\");\r\n $(\"#divTxtYouCallUs\").removeClass(\"hidden\");\r\n } else if (cliVerificationTypeId == Cli.CliVerificationType.outboundCallPlayPassword) {\r\n $(\"#divTxtYouCallUs\").addClass(\"hidden\");\r\n $(\"#divTxtWeCallYou\").removeClass(\"hidden\");\r\n }\r\n\r\n var statusConfiguration = Cli.CliVerification.StatusConfiguration[Cli.CliVerification.StatusConfiguration.map(function (element) { return element.status; }).indexOf(cliVerficationStatusId)];\r\n if (statusConfiguration && statusConfiguration != \"\") {\r\n $(\"#iconStatus\").removeClass().addClass(statusConfiguration.icon);\r\n $(\"#spanStatusText\").text(statusConfiguration.label);\r\n }\r\n }\r\n}","var endRequestHandler_ServerErrorCount = 0;\r\nvar endRequestHandler_RefreshPageAfterServerErrorCountReaches = 50;\r\n\r\nfunction hideelement(elementId) {\r\n\t$('#' + elementId).hide();\r\n\t//var element = document.getElementById(elementId);\r\n\t//element.style.visibility = 'hidden';\r\n}\r\n\r\nfunction showelement(elementId) {\r\n\tvar element = document.getElementById(elementId);\r\n\tif (element != null) {\r\n\t\telement.style.visibility = 'visible';\r\n\t}\r\n}\r\n\r\nfunction textAreaMaxLength(textArea, maxLength) {\r\n var $textArea = $(textArea);\r\n if ($textArea.length > 0) {\r\n var textAreaValue = $textArea.val();\r\n if (textAreaValue != null && textAreaValue.length > maxLength) {\r\n $textArea.val(textAreaValue.substring(0, maxLength));\r\n }\r\n }\r\n}\r\n\r\nfunction textBoxRemainingCount(textBox, countControl, maxLength) {\r\n var $textBox = $(textBox);\r\n var $countControl = $(countControl);\r\n if ($textBox.length > 0 && $countControl.length > 0) {\r\n var countLeft = maxLength;\r\n var textBoxValue = $textBox.val();\r\n if (textBoxValue != null) {\r\n countLeft = maxLength - textBoxValue.length;\r\n }\r\n $countControl.val(countLeft);\r\n }\r\n}\r\n\r\nfunction initialiseTextAreaMaxLength(selector) {\r\n selector.each(function () {\r\n var maxLength = $(this).attr(\"data-maxlength\");\r\n if (maxLength !== undefined && !isNaN(maxLength)) {\r\n var maxLengthInt = parseInt(maxLength);\r\n $(this).on(\"keyup, keydown\", function () {\r\n textAreaMaxLength(this, maxLengthInt);\r\n });\r\n }\r\n });\r\n}\r\n\r\nfunction initialiseTextBoxCount(selector) {\r\n selector.each(function () {\r\n var maxLength = $(this).attr(\"data-maxlength\");\r\n if (maxLength !== undefined && !isNaN(maxLength)) {\r\n var maxLengthInt = parseInt(maxLength);\r\n $(this).on(\"keyup, keydown\", function () {\r\n textBoxRemainingCount($(this), $(\".textBoxCount\", $(this).parent()), maxLengthInt);\r\n });\r\n }\r\n });\r\n}\r\n\r\n// Adds .click() function to an anchor control if it is not supported (e.g. in Firefox).\r\n// This enables the DefaultButton functionality to work for an ASP.NET LinkButton control.\r\nfunction addClickToLinkButton(button) {\r\n\tif (button && typeof (button.click) == 'undefined') {\r\n\t\tbutton.click = function() {\r\n\t\t\tvar result = true;\r\n\t\t\tif (button.onclick) result = button.onclick();\r\n\t\t\tif (typeof (result) == 'undefined' || result) { eval(button.getAttribute('href')); }\r\n\t\t}\r\n\t}\r\n}\r\n\r\n// Adds .click() function to any controls with the CSS class \"defaultButton\"\r\nfunction addClickToDefaultButtons() {\r\n\tvar defaultButtons = $('.defaultButton');\r\n\tfor (var i = 0; i < defaultButtons.length; i++) {\r\n\t\tvar defaultButton = defaultButtons[i];\r\n\t\taddClickToLinkButton(defaultButton);\r\n\t}\r\n}\r\n\r\nfunction getComputedHeight(element) {\r\n if (element) {\r\n var getComputedHeightAsFloat = function (obj) {\r\n var style = window.getComputedStyle(obj, null);\r\n if (style && style != null) {\r\n var height = style.getPropertyValue(\"height\");\r\n if (height && height != null) {\r\n var stringHeight = height.replace(\"px\", \"\");\r\n if (!isNaN(stringHeight)) {\r\n return parseFloat(stringHeight);\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n // Element is defined\r\n if (element.jquery) {\r\n // Element is jQuery object\r\n if (window.getComputedStyle && element.length > 0) {\r\n var totalHeight = 0.0;\r\n for (var i = 0; i < element.length; i++) {\r\n totalHeight += getComputedHeightAsFloat(element[i]);\r\n }\r\n return totalHeight;\r\n }\r\n else {\r\n // Use standard jQuery function\r\n var elementHeight = element.height();\r\n return elementHeight === undefined ? null : elementHeight;\r\n }\r\n }\r\n else {\r\n // Element is not jQuery object\r\n if (window.getComputedStyle) {\r\n return getComputedHeightAsFloat(element);\r\n }\r\n }\r\n }\r\n return null;\r\n}\r\n\r\nfunction endRequestHandler(sender, args) {\r\n try {\r\n if (args != null) {\r\n var error = args.get_error()\r\n if (error != null) {\r\n var response = args.get_response();\r\n if (response != null) {\r\n if (response.get_timedOut()) {\r\n args.set_errorHandled(true);\r\n }\r\n else if (response.get_responseAvailable()) {\r\n var statusCode = response.get_statusCode();\r\n switch (statusCode) {\r\n case 12002:\r\n // ERROR_INTERNET_TIMEOUT\r\n args.set_errorHandled(true);\r\n break;\r\n case 12007:\r\n // ERROR_INTERNET_NAME_NOT_RESOLVED\r\n args.set_errorHandled(true);\r\n break;\r\n case 12029:\r\n // ERROR_INTERNET_CANNOT_CONNECT\r\n args.set_errorHandled(true);\r\n break;\r\n case 500:\r\n // Server error\r\n endRequestHandler_ServerErrorCount += 1;\r\n break;\r\n }\r\n if (endRequestHandler_ServerErrorCount >= endRequestHandler_RefreshPageAfterServerErrorCountReaches) {\r\n // Server continuing to raise errors, try refreshing the page\r\n window.location.href = window.location.href;\r\n // Reset server error count\r\n endRequestHandler_ServerErrorCount = 0;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at endRequestHandler`, err);\r\n }\r\n }\r\n}\r\nfunction GetNormalisedAjaxResponse(response) {\r\n var result = response;\r\n if (result && result.d) { result = result.d; }\r\n return result;\r\n}\r\n\r\nfunction initSingleListMenu() {\r\n var accList = $('.singleActiveList .acclist');\r\n var accListUl = $('ul', accList);\r\n\r\n if (accListUl[0]) {\r\n // Hide all\r\n accListUl.hide();\r\n // Add click event\r\n $('li a', accList).click(function () {\r\n var checkElement = $(this).next();\r\n if (checkElement.is('ul')) {\r\n if (checkElement.is(':visible')) {\r\n // Already visible, hide\r\n $(this).removeClass(\"active\");\r\n checkElement.slideUp('normal');\r\n return false;\r\n }\r\n else {\r\n // Hide all in list currently visible\r\n $('ul:visible', accList).slideUp('normal');\r\n // Show selected list\r\n checkElement.slideDown('normal');\r\n // Set current class as active\r\n $(\"li a\", accList).removeClass(\"active\");\r\n $(this).addClass(\"active\");\r\n return false;\r\n }\r\n }\r\n });\r\n }\r\n}\r\n\r\nfunction initMultiListMenu() {\r\n var accList = $('.multiActiveList .acclist');\r\n var accListUl = $('ul', accList);\r\n\r\n if (accListUl[0]) {\r\n // Hide all\r\n accListUl.hide();\r\n // Show any marked as active\r\n $('ul.act', accList).show().prev(\"a\").addClass(\"active\");\r\n // Add click event\r\n $('li a', accList).click(\r\n function () {\r\n var checkElement = $(this).next();\r\n if (checkElement.is('ul')) {\r\n if (checkElement.is(':visible')) {\r\n // Currently visible, hide\r\n checkElement.slideUp('normal');\r\n $(this).removeClass(\"active\");\r\n return false;\r\n }\r\n else {\r\n // Not currently visible, show\r\n checkElement.slideDown('normal');\r\n $(this).addClass(\"active\");\r\n return false;\r\n }\r\n }\r\n }\r\n );\r\n }\r\n}\r\n\r\n// Expandable widget container\r\nfunction layoutWidgets() {\r\n // Check if too many or too few widgets to fill page\r\n\r\n /* Assumes a structure as follows:\r\n
\r\n \r\n */\r\n\r\n $(\"#adcont\").each(function () {\r\n // Check for any dynamic elements in this widget container\r\n var mainWidgetContainer = $(this);\r\n var repeatingSectionContainers = $(\".repeatingSectionContainer\", mainWidgetContainer);\r\n var hideIfNoRoomElements = $(\".hideIfNoRoom\", mainWidgetContainer);\r\n var hideIfNoRoomLastElements = $(\".hideIfNoRoomLast\", mainWidgetContainer);\r\n\r\n if (repeatingSectionContainers.length == 1 || hideIfNoRoomElements.length > 0 || hideIfNoRoomLastElements.length > 0) {\r\n\r\n var parentAsideControl = mainWidgetContainer.closest(\"aside\");\r\n\r\n if (!(mainWidgetContainer.is(':visible'))) {\r\n // Not currently visible, so set heights to auto\r\n parentAsideControl.height(\"auto\");\r\n mainWidgetContainer.height(\"auto\");\r\n return false;\r\n }\r\n\r\n var associatedSectionControl = parentAsideControl.prev(\"section\");\r\n\r\n var parentAsideControlOffset = parentAsideControl.offset();\r\n //var parentAsideControlTop = parentAsideControlOffset == null ? null : parentAsideControlOffset.top;\r\n //var parentAsideControlBottom = parentAsideControlTop + parentAsideControl.outerHeight();\r\n var parentAsideControlLeft = parentAsideControlOffset == null ? null : parentAsideControlOffset.left;\r\n //var parentAsideControlRight = parentAsideControlLeft + parentAsideControl.outerWidth();\r\n\r\n var associatedSectionControlOffset = associatedSectionControl.offset();\r\n //var associatedSectionControlTop = associatedSectionControlOffset == null ? null : associatedSectionControlOffset.top;\r\n //var associatedSectionControlBottom = associatedSectionControlTop + associatedSectionControl.outerHeight();\r\n var associatedSectionControlLeft = associatedSectionControlOffset == null ? null : associatedSectionControlOffset.left;\r\n var associatedSectionControlRight = associatedSectionControlLeft + associatedSectionControl.outerWidth();\r\n\r\n if (parentAsideControlLeft < associatedSectionControlRight) {\r\n // Currently visible, but below content, so no resizing needed\r\n parentAsideControl.height(\"auto\");\r\n mainWidgetContainer.height(\"auto\");\r\n hideIfNoRoomElements.hide();\r\n hideIfNoRoomLastElements.show();\r\n }\r\n else {\r\n // May need to adjust widgets\r\n\r\n // Show any hideable elements that may have been previously hidden\r\n hideIfNoRoomElements.show();\r\n hideIfNoRoomLastElements.show();\r\n\r\n // Set height of containing aside control to match the associated section control\r\n var heightOfAssociatedSectionControl = getComputedHeight(associatedSectionControl); // associatedSectionControl.height();\r\n\r\n parentAsideControl.height(heightOfAssociatedSectionControl);\r\n\r\n var heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n var heightOfWidgetContainerSiblings = getComputedHeight(mainWidgetContainer.siblings()); // mainWidgetContainer.siblings().height();\r\n var heightOfParentAsideControl = getComputedHeight(parentAsideControl); // parentAsideControl.height();\r\n var availableHeightInParentAsideControl = heightOfParentAsideControl - heightOfWidgetContainerSiblings;\r\n var heightOfRepeatingSectionContainer = 0;\r\n\r\n // Add any extra repeating sections first\r\n if (repeatingSectionContainers.length == 1) {\r\n var repeatingSectionContainer = repeatingSectionContainers.first();\r\n var repeatingSections = $(\".repeatingSection\", repeatingSectionContainer);\r\n var countOfRepeatingSections = repeatingSections.length;\r\n\r\n if (countOfRepeatingSections > 0) {\r\n // Set heights to 100% to fill container\r\n mainWidgetContainer.height(\"100%\");\r\n repeatingSectionContainer.height(\"100%\");\r\n\r\n // Work out if any more repeating sections need adding\r\n var firstRepeatingSection = repeatingSections.first();\r\n var heightOfRepeatingSection = getComputedHeight(firstRepeatingSection); // firstRepeatingSection.height();\r\n\r\n if (heightOfRepeatingSection > 0) {\r\n var heightOfContainer = getComputedHeight(repeatingSectionContainer); // repeatingSectionContainer.height();\r\n var totalHeightOfRepeatingSections = countOfRepeatingSections * heightOfRepeatingSection;\r\n\r\n if (heightOfContainer > totalHeightOfRepeatingSections) {\r\n // We need to add more repeating sections, but how many?\r\n var gapToFill = heightOfContainer - totalHeightOfRepeatingSections;\r\n var numberOfAdditionalRepeatingSections = Math.ceil(gapToFill / heightOfRepeatingSection);\r\n\r\n // Add extra sections\r\n for (var i = 0; i < numberOfAdditionalRepeatingSections; i++) {\r\n firstRepeatingSection.clone().appendTo(repeatingSectionContainer);\r\n }\r\n }\r\n }\r\n\r\n // Remove 100% heights again\r\n repeatingSectionContainer.height(\"auto\");\r\n mainWidgetContainer.height(\"auto\");\r\n\r\n // Set height of repeating section container if needed\r\n heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n\r\n if (heightOfWidgetContainer > availableHeightInParentAsideControl) {\r\n // Need to reduce height of main widget container\r\n\r\n // First, reduce height of repeating section container\r\n var heightToReduceBy = heightOfWidgetContainer - availableHeightInParentAsideControl;\r\n var widgetsInFirstRepeatingSection = $(\".widget\", firstRepeatingSection);\r\n var numberOfWidgetsPerRepeatingSection = widgetsInFirstRepeatingSection.length;\r\n if (numberOfWidgetsPerRepeatingSection > 0) {\r\n var widthOfFirstWidget = widgetsInFirstRepeatingSection.first().width();\r\n var widthOfRepeatingSection = firstRepeatingSection.width();\r\n if (widthOfFirstWidget > 0) {\r\n var numberOfWidgetsWide = Math.floor(widthOfRepeatingSection / widthOfFirstWidget);\r\n if (numberOfWidgetsWide > 0) {\r\n var heightOfOneWidget = heightOfRepeatingSection / numberOfWidgetsPerRepeatingSection * numberOfWidgetsWide;\r\n var numberOfWidgetsToReduceBy = Math.ceil(heightToReduceBy / heightOfOneWidget);\r\n var adjustedHeightToReduceBy = numberOfWidgetsToReduceBy * heightOfOneWidget;\r\n\r\n heightOfRepeatingSectionContainer = getComputedHeight(repeatingSectionContainer); // repeatingSectionContainer.height()\r\n repeatingSectionContainer.height(Math.floor(heightOfRepeatingSectionContainer - adjustedHeightToReduceBy));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n heightOfRepeatingSectionContainer = getComputedHeight(repeatingSectionContainer); // repeatingSectionContainer.height();\r\n }\r\n\r\n heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n\r\n // Check height of main widget container\r\n if (heightOfWidgetContainer > availableHeightInParentAsideControl && heightOfRepeatingSectionContainer == 0) {\r\n // Repeating section as small as it can go, but still need to lose height\r\n // Iterate backwards through any elements marked as hideable and hide until enough height lost\r\n $($(\".hideIfNoRoom\", mainWidgetContainer).get().reverse()).each(function () {\r\n $(this).hide();\r\n heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n if (heightOfWidgetContainer <= availableHeightInParentAsideControl) {\r\n return false;\r\n }\r\n });\r\n if (heightOfWidgetContainer > availableHeightInParentAsideControl) {\r\n // Still need to lose more height\r\n $($(\".hideIfNoRoomLast\", mainWidgetContainer).get().reverse()).each(function () {\r\n $(this).hide();\r\n heightOfWidgetContainer = getComputedHeight(mainWidgetContainer); // mainWidgetContainer.height();\r\n if (heightOfWidgetContainer <= availableHeightInParentAsideControl) {\r\n return false;\r\n }\r\n });\r\n }\r\n }\r\n\r\n }\r\n }\r\n });\r\n //$(window).trigger(\"layoutWidgetsComplete\");\r\n};\r\n\r\nfunction getSessionStorageItem(key) {\r\n if (typeof key != \"object\") {\r\n var itemValue = null;\r\n if (sessionStorage) {\r\n try {\r\n itemValue = sessionStorage.getItem(key);\r\n }\r\n catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at getSessionStorageItem`, err);\r\n }\r\n }\r\n }\r\n return itemValue;\r\n } else {\r\n // Return an error \r\n var obj = {};\r\n for (var i = 0; i < key.length; i++) {\r\n obj[key[i]] = getSessionStorageItem(key[i]);\r\n }\r\n \r\n return obj;\r\n }\r\n}\r\n\r\nfunction getSessionStorageItemAsync(key, done, error) {\r\n $.when(getSessionStorageItem(key)).then(done, error);\r\n}\r\n\r\nfunction setSessionStorageItem(key, data) {\r\n var itemSet = false;\r\n if (sessionStorage) {\r\n try {\r\n sessionStorage.setItem(key, data);\r\n itemSet = true;\r\n }\r\n catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at setSessionStorageItem`, err);\r\n }\r\n }\r\n }\r\n return itemSet;\r\n}\r\n\r\nfunction removeSessionStorageItem(key) {\r\n var itemRemoved = false;\r\n if (sessionStorage) {\r\n try {\r\n sessionStorage.removeItem(key);\r\n itemRemoved = true;\r\n }\r\n catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at removeSessionStorageItem`, err);\r\n }\r\n }\r\n }\r\n return itemRemoved;\r\n}\r\n\r\nfunction isSingleColumnView() {\r\n return columnsInCurrentView() == 1;\r\n}\r\n\r\nfunction columnsInCurrentView() {\r\n var columnCountIndicator = $(\"#columnCountIndicator\");\r\n if (columnCountIndicator.length > 0) {\r\n var divIsVisible = function (divId) { return $(\"#\" + divId, columnCountIndicator).css(\"display\") == \"block\"; };\r\n if (divIsVisible(\"oneColumn\")) {\r\n return 1;\r\n } else if (divIsVisible(\"twoColumn\")) {\r\n return 2;\r\n } else if (divIsVisible(\"threeColumn\")) {\r\n return 3;\r\n } else if (divIsVisible(\"fourColumn\")) {\r\n return 4;\r\n } else if (divIsVisible(\"fiveColumn\")) {\r\n return 5;\r\n }\r\n }\r\n return 0;\r\n}\r\n\r\nfunction IsKeyPressed(event, key) {\r\n return (\r\n (event.which ? event.which === key : false) ||\r\n (event.keyCode ? event.keyCode === key : false) ||\r\n (event.key ? event.key === key : false)\r\n );\r\n}\r\n\r\n$(function () {\r\n // executes when HTML-Document is loaded and DOM is ready\r\n\r\n initSingleListMenu();\r\n initMultiListMenu();\r\n\r\n layoutWidgets();\r\n $(window).resize(layoutWidgets);\r\n\r\n // global click handler\r\n $(document).click(function (event) {\r\n try {\r\n if (typeof (event) !== 'undefined'\r\n && event.target\r\n //&& event.target.nodeName === 'A'\r\n && typeof (gtag) !== 'undefined') {\r\n //target can be element inside the \r\n anchorItem = null\r\n if (event.target.nodeName === 'A') {\r\n anchorItem = $(event.target);\r\n }\r\n else {\r\n anchorItem = $(event.target).closest('a');\r\n }\r\n\r\n if (anchorItem.length > 0) {\r\n hrefVal = anchorItem.attr('href');\r\n eventTargetLocation = hrefVal;\r\n\r\n if (!hrefVal) { eventTargetLocation = window.location.pathname; }\r\n else if (hrefVal.charAt(0) === '#') { eventTargetLocation = window.location.pathname + hrefVal; }\r\n\r\n pageSectionVal = anchorItem.closest('[data-page-section]').attr('data-page-section');\r\n\r\n eventName = 'Links';\r\n eventLabel = anchorItem.text();\r\n\r\n gtag('event', eventName, {\r\n 'event_action': 'Click',\r\n 'event_category': eventName,\r\n 'event_label': eventLabel,\r\n 'target_location': eventTargetLocation,\r\n 'page_section': pageSectionVal\r\n });\r\n }\r\n }\r\n }\r\n catch (err) {\r\n if (typeof (fourdLogError) !== 'undefined') {\r\n fourdLogError(`Error '${err}' at document click`, err);\r\n }\r\n }\r\n });\r\n\r\n initialiseTextAreaMaxLength($(\"textarea\"));\r\n initialiseTextBoxCount($(\"textarea, input[type=text]\"));\r\n\r\n $(\"#btnLogOut\").on(\"click\", function () {\r\n if (sessionStorage) {\r\n sessionStorage.clear();\r\n }\r\n });\r\n\r\n addClickToDefaultButtons();\r\n\r\n\tif (typeof (Sys) != 'undefined' && typeof (Sys.WebForms) != 'undefined' && typeof (Sys.WebForms.PageRequestManager) != 'undefined' && typeof (endRequestHandler) != 'undefined') {\r\n\t\tSys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);\r\n\t}\r\n \r\n $('.toggle_password').click(function () {\r\n let passwordControl = $(\"#\" + $(this).data(\"password-control\"));\r\n\r\n if (passwordControl.attr(\"type\") === \"password\") {\r\n // Currently password, toggle to text\r\n passwordControl.attr(\"type\", \"text\");\r\n $(this).addClass(\"icon-eye-blocked\");\r\n $(this).removeClass(\"icon-eye\");\r\n }\r\n else {\r\n // Currently text, toggle to password\r\n passwordControl.attr(\"type\", \"password\");\r\n $(this).addClass(\"icon-eye\");\r\n $(this).removeClass(\"icon-eye-blocked\");\r\n }\r\n });\r\n\r\n // toggle the navigation open and closed\r\n $('.navbar-toggle').on('click', function () {\r\n $(this).toggleClass('collapsed');\r\n $('#js-nav-collapse').toggleClass('is-shown');\r\n });\r\n\r\n $('.large-popup').click(function () {\r\n $('.chatpopbx').hide();\r\n $('.chatpopbx', $(this).closest('.chtcolbx')).show();\r\n });\r\n\r\n $('a.close').on('click', function (e) {\r\n e.preventDefault();\r\n $('.chatpopbx').hide();\r\n });\r\n \r\n //Initialise Controls and Pages\r\n if (typeof (InitialiseRegisterPage) == 'function' && $('.registerPage').length > 0)\r\n InitialiseRegisterPage();\r\n if (typeof (InitialiseRegisterSimplifiedPage) == 'function' && $('.registerPage').length > 0)\r\n InitialiseRegisterSimplifiedPage();\r\n if (typeof (InitialiseResetPasswordPage) == 'function' && $('.resetPassword').length > 0)\r\n InitialiseResetPasswordPage();\r\n\r\n});\r\n\r\n"]}