- var Server = {};
- Server.IsEasi = false;
- Server.IsIWW = false;
- Server.SMSEnabled = true;
- Server.QS = 'wreply\x3dhttp\x3a\x252F\x252Fmail.live.com\x26id\x3d64855\x26mkt\x3den-US\x26lic\x3d1';
- function ER(ec, sec) {
- $BSI.navigateTo("https://signup.live.com/error.aspx?errcode=" + ec + "&scode=" + sec + "&" + Server.QS);
- }
- try {
- var g_sCK = "CkTst=GM" + (new Date()).getTime();
- document.cookie = g_sCK;
- if (document.cookie.indexOf(g_sCK) == -1) {
- ER("251", "")
- } else {
- g_sCK += ';expires=Fri, 01-Jan-1960';
- document.cookie = g_sCK
- }
- } catch (e) {}
- var Key = "e=10001;m=a60f1b66ef4023496137ee371eb24b307642d7351335bc9055c1cd1b6d67ad1b38119579f61276ea82e35e370208567a9667e6cec28df2a3af1a0f64f51405551fe8cd4f92fe103547dd1f75ec64650c4274c9391d394a747b9d0bdc4774ce02ef81c7492ab011734f1adb5f39155ad7d80cb80243024f356be1812f23a043bd";
- var randomNum = "5413a2aa82c56c89ace50ebb97819edbeb7f857da2aa52fae6616267874a511cc101e8d3245b2c7c7a943d82aa88f1c9d57a74a9cefa63c9f1fd8b20c2257d21daf3d4eaad82d3535e0081e9dfdadf46afe801e51feeaf63f5535d7dab67591094d167db";
- var SKI = "1BEF90811CE78A99D0820E87F3BDF1F96622EB40";
- /* Copyright (C) 2012 Microsoft Corporation */
- registerNamespace("SignUp");
- var FIELD = {}, STATE = {}, FT = {
- MN: "Membername",
- PWD: "Password",
- RPWD: "RetypePassword",
- ALT: "AlternateEmail",
- SQ: "SecurityQuestion",
- SA: "SecretAnswer",
- PHN: "Phone",
- FNAME: "FirstName",
- LNAME: "LastName",
- CTY: "Country",
- ZIP: "ZipCode",
- GNDR: "Gender",
- BD: "BirthDate",
- EOI: "EmailOptIn",
- HIP: "HIP",
- PRF: "ProofValidation"
- };
- SignUp.AllChanged = false;
- SignUp.Fields = [];
- SignUp.FieldsOnPage = [];
- SignUp.MsgHandler = null;
- SignUp.CapsOn = null;
- SignUp.IsIWW = Server.IsIWW;
- SignUp.IsEASI = Server.IsEasi;
- SignUp.SMSEnabled = Server.SMSEnabled;
- SignUp.QS = Server.QS;
- function registerNamespace() {
- var g = arguments.length;
- for (var c = 0; c < g; c++) {
- var a = this,
- e = arguments[c].split("."),
- f = e.length;
- for (var d = 0; d < f; d++) {
- var b = e[d];
- if (!a[b]) a[b] = function () {};
- a = a[b]
- }
- }
- return a
- }
- function exists(a) {
- return a ? true : a == 0 || a == false || a == ""
- }
- function isString(a) {
- return typeof a == "string"
- }
- function isFunction(a) {
- return "function" == typeof a
- }
- function isArray(a) {
- return a instanceof Array
- }
- function isDefined(a) {
- return "undefined" != typeof a
- }
- function valOrEmpty(a) {
- return a ? a : ""
- }
- function valOrDefault(a, b) {
- return exists(a) ? a : b
- }
- function strEquals(a, b, c) {
- if (!isString(a) || !isString(b)) return false;
- if (c) return a.toLowerCase() == b.toLowerCase();
- else return a === sString
- }
- function arrExists(c, d) {
- if (!exists(c)) return false;
- var b = isArray(d) ? d : arguments,
- e = isArray(d) ? 0 : 1;
- for (var a = e; a < b.length; a++) {
- if (!exists(b[a]) || !exists(c[b[a]])) return false;
- c = c[b[a]]
- }
- return true
- }
- function Derive(e, a) {
- var b = a.prototype;
- function d() {}
- d.prototype = e.prototype;
- a.prototype = new d;
- for (var c in b) a.prototype[c] = b[c]
- }
- function FormatString(b) {
- for (var a = 1; a < arguments.length; a++) b = b.replace(new RegExp("\\{" + (a - 1) + "\\}", "g"), arguments[a]);
- return b
- }
- function DoTestDelay(a) {
- a();
- return null
- }
- var DOM = {
- create: function (e, a) {
- var b = null;
- if (exists(a) && (a.name || a.type)) if (strEquals(e, "input", true) && !strEquals(a.type, "password", true)) {
- var f = DOM.create("div");
- f.innerHTML = '<input type="' + (exists(a.type) ? a.type : "") + '" name="' + (exists(a.name) ? a.name : "") + '" />';
- b = f.childNodes[0];
- a.type = null;
- a.name = null
- } else try {
- var c = "<" + e;
- if (a.type) c += ' type="' + a.type + '"';
- if (a.name) c += ' name="' + a.name + '"';
- c += ">";
- b = document.createElement(c);
- a.type = null;
- a.name = null
- } catch (g) {
- b = null
- }
- if (!exists(b)) b = document.createElement(e);
- if (exists(a)) for (var d in a) if (exists(a[d])) b[d] = a[d];
- return b
- },
- text: function (a) {
- return document.createTextNode(a)
- },
- clear: function (a) {
- while (exists(a) && a.hasChildNodes()) a.removeChild(a.firstChild)
- },
- isElement: function (a, b) {
- return exists(a) && a.nodeType == NodeType.Element && (!isString(b) || a.tagName.equals(b, true))
- },
- visible: function (a, b) {
- if (DOM.isElement(a)) {
- a.style.visibility = b[1];
- a.style.display = b[0]
- }
- return a
- }
- }, Visibility = {
- Visible: ["block", "visible"],
- Hidden: ["", "hidden"],
- Removed: ["none", ""],
- Default: ["", ""]
- }, NodeType = {
- Element: 1,
- Attribute: 2,
- Text: 3,
- CDATA: 4,
- EntityRef: 5,
- Entity: 6,
- ProcInst: 7,
- Comment: 8,
- Doc: 9,
- DocType: 10,
- DocFrag: 11,
- Notation: 12
- };
- AJAX = {};
- AJAX.BannedPwd = {
- NotBanned: 0,
- Banned: 1,
- Error: 2
- };
- AJAX.State = {
- UNSENT: 0,
- OPEN: 1,
- SENT: 2,
- LOADING: 3,
- DONE: 4
- };
- AJAX.Status = {
- OK: 200,
- NOT_MODIFIED: 304
- };
- AJAX.JSONObject = function (text) {
- var objJSON = {};
- if (text) {
- try {
- if (/^[\],:{}\s]*$/.test(text.replace(/\\./g, "@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) objJSON = eval("(" + text + ")")
- } catch (a) {}
- if (!objJSON) objJSON = {}
- }
- return objJSON
- };
- AJAX.XMLHttpRequest = function () {
- if (isDefined(AJAX.XMLHttpRequest.variantIndex)) return AJAX.XMLHttpRequest.variants[AJAX.XMLHttpRequest.variantIndex]();
- if (!exists(AJAX.XMLHttpRequest.variants)) AJAX.XMLHttpRequest.variants = [function () {
- return new XMLHttpRequest
- }, function () {
- return new ActiveXObject("Msxml2.XMLHTTP")
- }, function () {
- return new ActiveXObject("Msxml3.XMLHTTP")
- }, function () {
- return new ActiveXObject("Microsoft.XMLHTTP")
- }];
- var b = null;
- for (var a = 0; a < AJAX.XMLHttpRequest.variants.length; a++) {
- try {
- b = AJAX.XMLHttpRequest.variants[a]()
- } catch (c) {
- continue
- }
- AJAX.XMLHttpRequest.variantIndex = a;
- break
- }
- return b
- };
- AJAX.AJAXHandler = function (f, g, c, i, e, b, a, h, d) {
- this.m_objXMLHttp = null;
- this.m_urlTarget = valOrEmpty(f);
- this.m_strReqType = valOrEmpty(g);
- this.m_fAsync = c != null ? c : true;
- this.m_strUser = valOrEmpty(i);
- this.m_strPwd = valOrEmpty(e);
- this.m_strHeaderName = b != null ? b : "Content-type";
- this.m_strHeaderValue = a != null ? a : "application/x-www-form-urlencoded";
- this.m_iTimeout = valOrDefault(h, 1e4);
- this.m_iMaxRetries = valOrDefault(d, 0);
- this.m_fRetry = false;
- this.m_iRetries = 0;
- this.m_objTimeout = null;
- this.m_objTestDelay = null;
- this.initialize();
- this.m_strRequest = "";
- this.m_strRespose = "";
- this.m_fnHandleSuccess = null;
- this.m_fnHandleFailure = null;
- this.m_fnTimeout = null;
- this.m_arrHTTPSuccess = [];
- this.m_arrHTTPSuccess[AJAX.Status.OK] = true;
- this.m_arrHTTPSuccess[AJAX.Status.NOT_MODIFIED] = true
- };
- AJAX.AJAXHandler.prototype = {
- initialize: function (a) {
- if (this.m_objXMLHttp == null) this.m_objXMLHttp = new AJAX.XMLHttpRequest;
- try {
- if (this.m_strUser.length > 0) this.m_objXMLHttp.open(this.m_strReqType, this.m_urlTarget, this.m_fAsync, this.m_strUser, this.m_strPwd);
- else this.m_objXMLHttp.open(this.m_strReqType, this.m_urlTarget, this.m_fAsync);
- this.m_strResponse = "";
- this.m_objXMLHttp.setRequestHeader(this.m_strHeaderName, this.m_strHeaderValue)
- } catch (b) {
- if (a) a(this)
- }
- },
- sendRequest: function (b, d, a) {
- var c = this;
- if (this.m_objXMLHttp == null || this.getState() != AJAX.State.OPEN) {
- this.initialize(a);
- this.m_strRequest = b
- }
- if (this.getState() == AJAX.State.DONE) return false;
- this.m_iRetries = 0;
- this.m_objTimeout = null;
- this.m_objTestDelay = null;
- this.enableRetry();
- this.m_fnHandleSuccess = d;
- this.m_fnHandleFailure = a;
- this.m_strRequest = b;
- this.m_objXMLHttp.onreadystatechange = function () {
- c.evt_onreadystatechange()
- };
- this.m_objTimeout = setTimeout(function () {
- c.evt_ontimeout()
- }, this.m_iTimeout);
- this.m_objXMLHttp.send(this.m_strRequest)
- },
- clearTimeout: function () {
- if (this.m_objTimeout) {
- clearTimeout(this.m_objTimeout);
- this.m_objTimeout = null
- }
- if (this.m_objTestDelay) {
- clearTimeout(this.m_objTestDelay);
- this.m_objTestDelay = null
- }
- },
- shouldRetry: function () {
- return this.m_fRetry == true && this.m_iRetries < this.m_iMaxRetries
- },
- evt_onreadystatechange: function () {
- try {
- if (!this.isComplete()) return;
- var a = this;
- this.m_objTestDelay = DoTestDelay(function () {
- a.handleRequestComplete(false)
- })
- } catch (b) {
- this.handleRequestComplete(true)
- }
- },
- handleRequestComplete: function (b) {
- var a = false,
- c = this;
- if (b) a = false;
- else {
- this.clearTimeout();
- this.m_strResponse = this.m_objXMLHttp.responseText;
- a = this.isSuccess()
- }
- if (a) {
- if (isFunction(this.m_fnHandleSuccess)) this.m_fnHandleSuccess(this)
- } else if (this.shouldRetry()) {
- this.m_iRetries++;
- this.initialize(this.m_fnHandleFailure);
- this.m_objTimeout = setTimeout(function () {
- c.evt_ontimeout()
- }, this.m_iTimeout);
- this.m_objXMLHttp.send(this.m_strRequest)
- } else if (isFunction(this.m_fnHandleFailure)) this.m_fnHandleFailure(this)
- },
- evt_ontimeout: function () {
- var a = this;
- this.clearTimeout();
- this.cancel();
- if (this.shouldRetry()) {
- this.m_iRetries++;
- this.m_objXMLHttp.onreadystatechange = function () {
- a.evt_onreadystatechange()
- };
- this.initialize(this.m_fnHandleFailure);
- this.m_objTimeout = setTimeout(function () {
- a.evt_ontimeout()
- }, this.m_iTimeout);
- this.m_objXMLHttp.send(this.m_strRequest)
- } else if (isFunction(this.m_fnHandleFailure)) this.m_fnHandleFailure(this)
- },
- cancel: function () {
- if (this.m_objXMLHttp) {
- this.m_objXMLHttp.onreadystatechange = null;
- this.m_objXMLHttp.abort()
- }
- this.clearTimeout()
- },
- getState: function () {
- if (this.m_objXMLHttp) return this.m_objXMLHttp.readyState;
- return AJAX.State.UNSENT
- },
- getStatus: function () {
- if (this.m_objXMLHttp) return this.m_objXMLHttp.status;
- return 0
- },
- getResponseText: function () {
- return this.m_strResponse
- },
- getResponseJSON: function () {
- return AJAX.JSONObject(this.getResponseText())
- },
- isComplete: function () {
- return this.m_objXMLHttp && this.getState() == AJAX.State.DONE
- },
- isSuccess: function () {
- return this.isComplete() && this.m_arrHTTPSuccess[this.getStatus()]
- },
- enableRetry: function () {
- this.m_fRetry = true
- },
- disableRetry: function () {
- this.m_fRetry = false
- }
- };
- AJAX.BannedPwdHandler = function (b, d, c, a) {
- AJAX.AJAXHandler.apply(this, [b, "POST", d, null, null, null, null, c, a]);
- this._isSuccess = AJAX.AJAXHandler.prototype.isSuccess
- };
- AJAX.BannedPwdHandler.prototype = {
- isSuccess: function () {
- if (this._isSuccess()) return this.getResponseJSON().Result != AJAX.BannedPwd.Error;
- return false
- }
- };
- Derive(AJAX.AJAXHandler, AJAX.BannedPwdHandler);
- var EVENT = {
- NamePrefix: "on",
- Name: {
- OnAbort: "abort",
- OnBlur: "blur",
- OnChange: "change",
- OnClick: "click",
- OnError: "error",
- OnFocus: "focus",
- OnKeyPress: "keypress",
- OnLoad: "load",
- OnMouseOut: "mouseout",
- OnMouseOver: "mouseover",
- OnMouseMove: "mousemove",
- OnSubmit: "submit",
- OnResize: "resize",
- OnKeyDown: "keydown",
- OnReadyStateChange: "readystatechange",
- OnKeyDown: "keydown",
- OnKeyUp: "keyup"
- },
- Key: {
- Enter: 13,
- Caps: 20,
- Escape: 27,
- Spacebar: 32,
- ArrowUp: 38,
- ArrowDown: 40,
- Delete: 46,
- ArrowUp_alt: 63232,
- ArrowDown_alt: 63233
- },
- "get": function (a) {
- return a || window.event
- },
- getTarget: function (b) {
- var a = EVENT.get(b);
- return a.srcElement || a.target
- },
- add: function add(a, d, e, c) {
- var b = e;
- if (exists(c)) b = function (a) {
- return e.call(c, a)
- };
- var f = EVENT.NamePrefix + d;
- if (a.addEventListener) a.addEventListener(d, b, false);
- else if (a.attachEvent) a.attachEvent(f, b)
- },
- remove: function remove(b, a, c) {
- var d = EVENT.NamePrefix + a;
- if (b.removeEventListener) b.removeEventListener(a, c, false);
- else b.detachEvent(d + a, c)
- },
- end: function end(a) {
- a = EVENT.get(a);
- if (isFunction(a.preventDefault)) a.preventDefault();
- a.returnValue = false;
- return false
- },
- getKey: function getKey(a) {
- return a.which || a.keyCode
- },
- isLowerCaseKey: function isLowerCaseKey(b) {
- var a = EVENT.getKey(b);
- return a >= 97 && a <= 122
- },
- isUpperCaseKey: function isUpperCaseKey(b) {
- var a = EVENT.getKey(b);
- return a >= 65 && a <= 90
- },
- isShiftDown: function isShiftDown(a) {
- return a.shiftKey
- },
- isNumberKey: function (a) {
- if (EVENT.isMetaKey(a)) return false;
- if (exists(a.char) && a.char != "" && a.char >= "0" && a.char <= "9") return true;
- var b = EVENT.getKey(a);
- if (!EVENT.isShiftDown(a) && b > 47 && b < 58 || b > 95 && b < 106) return true;
- return false
- },
- isMetaKey: function (a) {
- return a.altKey || a.ctrlKey || a.metaKey
- },
- isCharKey: function (b) {
- if (EVENT.isMetaKey(b)) return false;
- var a = EVENT.getKey(b);
- if (a > 47 && a < 91 || a > 95 && a < 112 || a > 185) return true;
- return false
- }
- }, MSG = {};
- MSG.Type = {
- Error: 1,
- Help: 2,
- Warning: 3,
- Progress: 4,
- Success: 5,
- Failure: 6
- };
- MSG.Part = {
- Holder: 1,
- Message: 2,
- Intro: 4,
- Errors: 8,
- All: 255
- };
- MSG.TypeName = function (b) {
- for (var a in MSG.Type) if (MSG.Type[a] == b) return a;
- return ""
- };
- MSG.Base = function (c, d, b, a) {
- this.type = c;
- this.id = valOrDefault(b, "");
- this.messageId = valOrDefault(a, "");
- this.data = d
- };
- MSG.Base.prototype = {
- getElement: function () {
- return GEId(this.id)
- },
- getMessageElement: function () {
- return GEId(this.messageId)
- },
- show: function (b) {
- b = b || MSG.Part.All;
- if (b & MSG.Part.Message) {
- var a = this.getMessageElement();
- if (DOM.isElement(a) && this.hasData() && exists(this.data.text)) {
- DOM.clear(a);
- this.insertText(a)
- }
- } else {
- var a = this.getMessageElement();
- if (DOM.isElement(a)) DOM.clear(a)
- }
- if (b & MSG.Part.Holder) {
- var c = this.getElement();
- if (DOM.isElement(c)) this.showHolder(c)
- }
- },
- hide: function (a) {
- a = a || MSG.Part.All;
- if (a & MSG.Part.Holder) {
- var b = this.getElement();
- if (DOM.isElement(b)) this.hideHolder(b)
- } else if (a & MSG.Part.Message) {
- var b = this.getMessageElement();
- if (DOM.isElement(b)) DOM.clear(b)
- }
- },
- showHolder: function (a) {
- DOM.visible(a, Visibility.Default)
- },
- hideHolder: function (a) {
- DOM.visible(a, Visibility.Removed)
- },
- insertText: function (a) {
- if (DOM.isElement(this.data.text)) a.appendChild(this.data.text);
- else if (isString(this.data.text)) a.innerHTML = this.data.text
- },
- clear: function () {
- this.clearData();
- this.hide()
- },
- setData: function (a) {
- this.data = a
- },
- hasData: function () {
- return exists(this.data)
- },
- clearData: function () {
- this.data = null
- }
- };
- MSG.Info = function (b, a) {
- this.text = valOrDefault(b, null);
- this.fields = valOrDefault(a, [])
- };
- MSG.Info.prototype = {};
- MSG.Info.Error = function (a, f, e, c, b, d) {
- MSG.Info.call(this, f, e);
- this.error = a;
- this.isFatal = c;
- this.errCode = b;
- this.errUrl = d
- };
- Derive(MSG.Info, MSG.Info.Error);
- MSG.Base.Handler = function () {
- this.messages = [];
- this.messages[MSG.Type.Error] = [];
- this.messages[MSG.Type.Help] = [];
- this.messages[MSG.Type.Warning] = [];
- this.messages[MSG.Type.Progress] = [];
- this.messages[MSG.Type.Success] = [];
- this.messages[MSG.Type.Failure] = [];
- this.currMessage = []
- };
- MSG.Base.Handler.prototype = {
- setMessage: function (a, f, c, b) {
- var e = this.addMessage(a, f, c, b),
- d = "show" + MSG.TypeName(a) + "Message";
- this[d](e, true)
- },
- clearMessage: function (b, d) {
- var a = this.removeMessage(b, d);
- if (!a) return;
- var c = "hide" + MSG.TypeName(b) + "Message";
- this[c](a, true)
- },
- clearMessages: function (c) {
- var b = [];
- for (var a = 0; a < this.messages[c].length; a++) b.push(this.messages[c][a].id);
- for (var a = 0; a < b.length; a++) this.clearMessage(c, b[a])
- },
- showMessage: function (b, d) {
- var a = this.findMessage(b, d);
- if (!a) return;
- var c = "show" + MSG.TypeName(b) + "Message";
- this[c](a, false)
- },
- hideMessage: function (b, d) {
- var a = this.findMessage(b, d);
- if (!a) return;
- var c = "hide" + MSG.TypeName(b) + "Message";
- this[c](a, false)
- },
- findMessage: function (b, d) {
- var c = null;
- for (var a = 0; a < this.messages[b].length; a++) if (this.messages[b][a].id == d) {
- c = this.messages[b][a];
- break
- }
- return c
- },
- addMessage: function (b, e, g, f) {
- var a = {
- id: e,
- fShowCallback: g,
- fHideCallback: f
- };
- a.priority = this.getMessagePriority(a);
- var d = -1;
- for (var c = 0; c < this.messages[b].length; c++) if (this.messages[b][c].id == e) {
- d = c;
- break
- }
- if (d != -1) this.messages[b][d] = a;
- else this.messages[b].push(a);
- this.sort(b);
- return a
- },
- removeMessage: function (b, d) {
- var c = null;
- for (var a = 0; a < this.messages[b].length; a++) if (this.messages[b][a].id == d) {
- c = this.messages[b].splice(a, 1)[0];
- break
- }
- return c
- },
- getMessagePriority: function () {
- return -1
- },
- sort: function (a) {
- var b = function (a, b) {
- return a.priority - b.priority
- };
- this.messages[a].sort(b)
- },
- showErrorMessage: function (a) {
- a.fShowCallback(MSG.Type.Error, MSG.Part.All)
- },
- hideErrorMessage: function (a) {
- a.fHideCallback(MSG.Type.Error, MSG.Part.All)
- },
- showHelpMessage: function (a) {
- a.fShowCallback(MSG.Type.Help, MSG.Part.All)
- },
- hideHelpMessage: function (a) {
- a.fHideCallback(MSG.Type.Help, MSG.Part.All)
- },
- showWarningMessage: function (a) {
- a.fShowCallback(MSG.Type.Warning, MSG.Part.All)
- },
- hideWarningMessage: function (a) {
- a.fHideCallback(MSG.Type.Warning, MSG.Part.All)
- },
- showProgressMessage: function (a) {
- a.fShowCallback(MSG.Type.Progress, MSG.Part.All)
- },
- hideProgressMessage: function (a) {
- a.fHideCallback(MSG.Type.Progress, MSG.Part.All)
- },
- showSuccessMessage: function (a) {
- a.fShowCallback(MSG.Type.Success, MSG.Part.All)
- },
- hideSuccessMessage: function (a) {
- a.fHideCallback(MSG.Type.Success, MSG.Part.All)
- },
- showFailureMessage: function (a) {
- a.fShowCallback(MSG.Type.Failure, MSG.Part.All)
- },
- hideFailureMessage: function (a) {
- a.fHideCallback(MSG.Type.Failure, MSG.Part.All)
- }
- };
- PhoneControl = function (h, g, d, e, f, a, c, b) {
- this.countryDropDownId = d;
- this.phoneHolderId = e;
- this.phoneInputId = f;
- this.phoneInputCSS = a ? a : "";
- this.phoneHintId = c;
- this.phoneHintCSS = c && b ? b : "";
- this.previousPhoneValue = "";
- this.selectedCountry = "US";
- this.phoneFormatMap = [];
- this.countryInfo = g;
- this.updateContent();
- this.initializeCountryDropDown(h)
- };
- PhoneControl.prototype = {
- getPhoneNumber: function () {
- var a = this.getPhoneInput().value;
- if (!a) return a;
- if (this.selectedCountry != "JP") a = a.replace(/[^0-9]/g, "");
- return a
- },
- getCountryISO: function () {
- var a = this.getCountryDropDown();
- return a.options[a.selectedIndex].value.toUpperCase()
- },
- isMobileEmail: function () {
- return this.getCountryISO() == "JP"
- },
- getFullPhoneNumber: function () {
- var a = this.getPhoneNumber();
- if (this.selectedCountry == "JP" || !a) return a;
- var b = this.countryInfo[this.selectedCountry].PhoneCountryCode;
- if (!b) return a;
- return b + a
- },
- validate: function (b, a) {
- if (!a) return true;
- if (exists(this.countryInfo[b])) {
- var c = new RegExp(this.countryInfo[b].PhoneRegEx, "i");
- return a.match(c)
- }
- return true
- },
- updateContent: function () {
- DOM.clear(this.getInputHolder());
- var c = this.countryInfo[this.selectedCountry].InputType,
- a = DOM.create("input", {
- id: this.phoneInputId,
- name: this.phoneInputId,
- type: c,
- maxLength: "60",
- className: this.phoneInputCSS
- });
- this.getInputHolder().appendChild(a);
- this.initializePhoneInput();
- if (this.supportPlaceHolderForHint()) a.placeholder = this.getHintText();
- else {
- var b = DOM.create("div", {
- id: this.phoneHintId,
- className: this.phoneHintCSS
- });
- b.innerHTML = this.getHintText();
- this.getInputHolder().appendChild(b);
- this.initializePhoneHint()
- }
- },
- getCountryDropDown: function () {
- return GEId(this.countryDropDownId)
- },
- getInputHolder: function () {
- return GEId(this.phoneHolderId)
- },
- getPhoneInput: function () {
- return GEId(this.phoneInputId)
- },
- supportPlaceHolderForHint: function () {
- return !this.phoneHintId
- },
- getPhoneHint: function () {
- if (!this.phoneHintId) return null;
- return GEId(this.phoneHintId)
- },
- initializeCountryDropDown: function (b) {
- var a = this.getCountryDropDown();
- for (var c in b.List) {
- var d = strEquals(c, b.Default, true),
- e = DOM.create("option", {
- value: c,
- selected: d,
- defaultSelected: d
- });
- e.innerHTML = b.List[c];
- a.appendChild(e)
- }
- this.setSelectedCountry(a);
- EVENT.add(a, EVENT.Name.OnChange, this.evt_country_onchange, this)
- },
- evt_country_onchange: function () {
- this.setSelectedCountry()
- },
- setSelectedCountry: function () {
- var a = this.getCountryDropDown();
- this.selectedCountry = a.options[a.selectedIndex].value.toUpperCase();
- this.getPhoneInput().value = "";
- this.updateContent()
- },
- initializePhoneHint: function () {
- if (!this.supportPlaceHolderForHint()) EVENT.add(this.getPhoneHint(), EVENT.Name.OnClick, this.evt_hint_onclick, this)
- },
- evt_hint_onclick: function () {
- this.getPhoneInput().focus()
- },
- getHintText: function () {
- var a = this.countryInfo[this.selectedCountry].PhoneNumberExample,
- b = a ? a : "";
- return b
- },
- initializePhoneInput: function () {
- var a = this.getPhoneInput();
- EVENT.add(a, EVENT.Name.OnKeyDown, this.evt_onkeydown, this);
- EVENT.add(a, EVENT.Name.OnFocus, this.evt_onfocus, this);
- EVENT.add(a, EVENT.Name.OnBlur, this.evt_onblur, this);
- EVENT.add(a, EVENT.Name.OnKeyUp, this.evt_onkeyup, this)
- },
- evt_onkeydown: function (a) {
- return this.validateKey(a)
- },
- evt_onfocus: function () {
- this.updatePhoneFormatMap();
- if (!this.supportPlaceHolderForHint()) DOM.visible(this.getPhoneHint(), Visibility.Removed);
- EVENT.add(this.getPhoneInput(), EVENT.Name.OnMouseMove, this.evt_onmousemove, this)
- },
- evt_onblur: function () {
- this.formatPhoneNumber();
- if (!this.getPhoneNumber()) if (this.supportPlaceHolderForHint()) this.getPhoneInput().placeholder = this.getHintText();
- else DOM.visible(this.getPhoneHint(), Visibility.Default);
- EVENT.remove(this.getPhoneInput(), EVENT.Name.OnMouseMove, this.evt_onmousemove)
- },
- evt_onkeyup: function () {
- this.formatPhoneNumber()
- },
- evt_onmousemove: function () {
- this.formatPhoneNumber()
- },
- validateKey: function (a) {
- if (this.selectedCountry != "JP") {
- if (EVENT.isNumberKey(a) || !EVENT.isCharKey(a)) return true;
- EVENT.end(a);
- return false
- }
- return true
- },
- updatePhoneFormatMap: function () {
- this.phoneFormatMap = null;
- var d = this.countryInfo[this.selectedCountry].PhoneFormat;
- if (!d) return;
- var a = d.split(",");
- if (a.length > 0) {
- this.phoneFormatMap = [];
- for (var c = 0; c < a.length; c++) {
- var e = a[c].split("="),
- b = e[0],
- f = parseInt(e[1]);
- if (b == "") b = " ";
- this.phoneFormatMap[f] = b
- }
- }
- },
- formatPhoneNumber: function () {
- var c = this.getPhoneNumber(),
- d = this.getPhoneInput().value;
- if (!this.phoneFormatMap || this.previousPhoneValue == d) return;
- var b = "";
- for (var a = 0; a < c.length; a++) {
- if (arrExists(this.phoneFormatMap, a)) b += this.phoneFormatMap[a];
- b += c.charAt(a)
- }
- this.getPhoneInput().value = b;
- this.previousPhoneValue = b
- }
- };
- MSG.SignUp = {};
- MSG.SignUp.Info = {};
- MSG.SignUp.Info.Help = function (a, b) {
- var c = GetString("live.accounts.strings." + a);
- MSG.Info.apply(this, [c, b])
- };
- MSG.SignUp.Info.Help.prototype = {};
- Derive(MSG.Info, MSG.SignUp.Info.Help);
- MSG.SignUp.Help = function (b, a) {
- MSG.Base.apply(this, [MSG.Type.Help, null, b, a])
- };
- MSG.SignUp.Help.prototype = {
- showHolder: function (a) {
- DOM.visible(a, Visibility.Default);
- a.parentNode.style.zIndex = 10
- },
- hideHolder: function (a) {
- DOM.visible(a, Visibility.Removed);
- a.parentNode.style.zIndex = 1;
- a.parentNode.style.height = "auto"
- },
- insertText: function (a) {
- if (exists(this.data.text)) a.innerHTML = "<p>" + this.data.text + "</p>"
- }
- };
- Derive(MSG.Base, MSG.SignUp.Help);
- MSG.SignUp.LiveMNHelp = function (b, a) {
- MSG.SignUp.Help.apply(this, [b, a])
- };
- MSG.SignUp.LiveMNHelp.prototype = {
- hideHolder: function (a) {
- DOM.visible(a, Visibility.Removed);
- a.parentNode.style.zIndex = 200;
- a.parentNode.style.height = "auto"
- }
- };
- Derive(MSG.SignUp.Help, MSG.SignUp.LiveMNHelp);
- MSG.SignUp.CapsWarning = function (a) {
- MSG.Base.apply(this, [MSG.Type.Warning, null, a, null])
- };
- MSG.SignUp.CapsWarning.prototype = {
- hideHolder: function (a) {
- DOM.visible(a, Visibility.Hidden)
- }
- };
- Derive(MSG.Base, MSG.SignUp.CapsWarning);
- MSG.SignUp.Progress = function (a) {
- MSG.Base.apply(this, [MSG.Type.Progress, null, a, null])
- };
- MSG.SignUp.Progress.prototype = {};
- Derive(MSG.Base, MSG.SignUp.Progress);
- MSG.SignUp.Success = function (a) {
- MSG.Base.apply(this, [MSG.Type.Success, null, a, a])
- };
- MSG.SignUp.Success.prototype = {};
- Derive(MSG.Base, MSG.SignUp.Success);
- MSG.SignUp.Failure = function (a) {
- MSG.Base.apply(this, [MSG.Type.Failure, null, a, a])
- };
- MSG.SignUp.Failure.prototype = {};
- Derive(MSG.Base, MSG.SignUp.Failure);
- MSG.SignUp.Error = function (b, a) {
- MSG.Base.apply(this, [MSG.Type.Error, null, b, a])
- };
- MSG.SignUp.Error.prototype = {
- setData: function (a) {
- this.data = a;
- if (a.isFatal) {
- ER(null, null, a.errCode, a.text, a.errUrl);
- this.data.text = null
- }
- }
- };
- Derive(MSG.Base, MSG.SignUp.Error);
- FIELD.VState = {
- Pending: 0,
- Running: 1,
- Done: 2,
- Error: 3
- };
- FIELD.DState = {
- None: 0,
- User: 1,
- Auto: 2
- };
- FIELD.Base = function (b, a, c) {
- this.m_eVState = FIELD.VState.Pending;
- this.m_eDState = FIELD.DState.None;
- this.m_elementId = b;
- this.m_helpStringId = a;
- this.m_holderId = c;
- this.m_arrMessages = [];
- this.m_bDisplayed = true
- };
- FIELD.Base.prototype = {
- getElement: function () {
- return GEId(this.m_elementId)
- },
- getHolder: function () {
- return GEId(this.m_holderId)
- },
- getErrHolder: function () {
- if (exists(this.m_arrMessages[MSG.Type.Error])) return this.m_arrMessages[MSG.Type.Error].getElement();
- return null
- },
- getValue: function () {
- var a = this.getElement();
- if (exists(a)) return a.value;
- return null
- },
- setValue: function (b) {
- var a = this.getElement();
- if (exists(a)) {
- a.value = b;
- SignUp.SetChanged(a.id);
- this.onValueChangeAuto()
- }
- },
- clearValue: function () {
- var a = this.getElement();
- if (DOM.isElement(a)) {
- a.value = "";
- if (a.placeholder) a.placeholder = a.placeholder;
- this.onValueChangeAuto()
- }
- },
- hasValue: function () {
- return this.isDisplayed() && exists(this.getValue()) && this.getValue() != ""
- },
- getVState: function () {
- return this.m_eVState
- },
- setVState: function (a) {
- this.m_eVState = a
- },
- getDState: function () {
- return this.m_eDState
- },
- onValueChangeUser: function () {
- this.m_eDState = FIELD.DState.User
- },
- onValueChangeAuto: function () {
- this.m_eDState = FIELD.DState.Auto
- },
- getErrInfo: function (a) {
- var c = new MSG.Info.Error;
- if (a instanceof SignUp.Error) {
- var b = [GetString("live.accounts.strings." + a.stringid)];
- b = b.concat(a.formatarray);
- c = new MSG.Info.Error(a.stringid, FormatString.apply(null, b), [this], a.isFatal, a.errCode, a.errUrl)
- }
- return c
- },
- disable: function () {
- this.getElement().disabled = true
- },
- enable: function () {
- this.getElement().disabled = false
- },
- remove: function () {
- this.clearMessage(MSG.Type.Error);
- DOM.visible(this.getHolder(), Visibility.Removed);
- this.clearValue();
- SignUp.RemoveChanged(this.getElement());
- this.m_bDisplayed = false
- },
- display: function (a) {
- DOM.visible(this.getHolder(), Visibility.Visible);
- if (a) this.setFocus();
- this.m_bDisplayed = true
- },
- isDisplayed: function () {
- return this.exists() && this.m_bDisplayed
- },
- isFocusAllowed: function () {
- return true
- },
- setFocus: function (b) {
- if (this.isFocusAllowed()) {
- var a = this.getElement();
- if (DOM.isElement(a)) {
- SignUp.FocusSet = {
- f: a,
- s: a
- };
- if (!b) SignUp.SetFocus()
- }
- }
- },
- exists: function () {
- return exists(this.getElement())
- },
- update: function () {},
- updateForSubmit: function () {
- this.update()
- },
- validate: function () {},
- isValid: function () {
- try {
- this.validate.apply(this, arguments);
- return true
- } catch (a) {
- return false
- }
- },
- showHelp: function () {
- SignUp.MsgHandler.clearMessages(MSG.Type.Help);
- this.setMessage(MSG.Type.Help, new MSG.SignUp.Info.Help(this.m_helpStringId, [this]))
- },
- setMessage: function (a, c) {
- if (arrExists(this.m_arrMessages, a)) {
- this.m_arrMessages[a].setData(c);
- var b = this;
- SignUp.MsgHandler.setMessage(a, this, function (a, c) {
- b.showMessage(a, c)
- }, function (a, c) {
- b.hideMessage(a, c)
- })
- }
- },
- clearMessage: function (a) {
- if (arrExists(this.m_arrMessages, a)) {
- this.m_arrMessages[a].clearData();
- SignUp.MsgHandler.clearMessage(a, this)
- }
- },
- clearMessages: function () {
- for (var a = 0; a < this.m_arrMessages.length; a++) this.clearMessage(a)
- },
- hideMessage: function (a, b) {
- if (arrExists(this.m_arrMessages, a)) this.m_arrMessages[a].hide(b)
- },
- showMessage: function (a, b) {
- if (arrExists(this.m_arrMessages, a)) this.m_arrMessages[a].show(b)
- },
- hasMessage: function (a) {
- if (arrExists(this.m_arrMessages, a)) return this.m_arrMessages[a].hasData();
- return false
- }
- };
- SignUp.Error = function (b, a, d, c, e) {
- if (!exists(a)) a = [];
- this.stringid = b;
- this.formatarray = a;
- this.isFatal = d;
- this.errCode = c;
- this.errUrl = e
- };
- SignUp.ValidateField = function (a) {
- SignUp.SetChanged(a.id);
- if (a.type == "text") a.value = Trim(a.value);
- SignUp.ValidateForm(false)
- };
- SignUp.SetChanged = function (a) {
- if (!exists(SignUp.FieldsChanged)) SignUp.FieldsChanged = {};
- SignUp.FieldsChanged[a] = true
- };
- SignUp.RemoveChanged = function (a) {
- if (a == null || typeof SignUp.FieldsChanged == "undefined" || typeof SignUp.FieldsChanged[a.id] == "undefined") return;
- SignUp.FieldsChanged[a.id] = false
- };
- SignUp.Changed = function (a) {
- if (SignUp.AllChanged) return true;
- if (a == null || typeof SignUp.FieldsChanged == "undefined" || typeof SignUp.FieldsChanged[a.id] == "undefined" || !SignUp.FieldsChanged[a.id]) return false;
- return true
- };
- SignUp.ValidateForm = function (d) {
- var c = "update";
- if (d) c += "ForSubmit";
- for (var a = 0; a < SignUp.FieldsOnPage.length; a++) for (var b = 0; b < SignUp.FieldsOnPage[a].length; b++) SignUp.FieldsOnPage[a][b][c]();
- SignUp.AllChanged = false
- };
- SignUp.WaitForAsync = function (a, c) {
- var d = true;
- for (var b = 0; b < a.length; b++) if (a[b].getVState() == FIELD.VState.Running) {
- d = false;
- break
- }
- if (!d) setTimeout(function () {
- SignUp.WaitForAsync(a, c)
- }, 100);
- else c()
- };
- SignUp.PrefillCountry = function () {
- if (exists(SignUp.Prefill.Country) && SignUp.Fields[FT.CTY].isValid(SignUp.Prefill.Country)) SignUp.DefCountry = SignUp.Prefill.Country.toUpperCase()
- };
- SignUp.PrefillForm = function () {
- if (exists(SignUp.Prefill.Membername)) {
- if (SignUp.Prefill.Membername.indexOf("@") == -1) {
- if (SignUp.Fields[FT.MN].isValid(SignUp.Prefill.Membername, STATE.MN.Live)) SignUp.Fields[FT.MN].setMembername(SignUp.Prefill.Membername)
- } else if (SignUp.Fields[FT.MN].isValid(SignUp.Prefill.Membername, STATE.MN.EASI)) SignUp.Fields[FT.MN].setMembername(SignUp.Prefill.Membername);
- if (SignUp.Fields[FT.MN].getVState() == FIELD.VState.Running) SignUp.Fields[FT.MN].disable(true)
- }
- if (exists(SignUp.Prefill.FName) && SignUp.Fields[FT.FNAME].isValid(SignUp.Prefill.FName)) SignUp.Fields[FT.FNAME].setValue(SignUp.Prefill.FName);
- if (exists(SignUp.Prefill.LName) && SignUp.Fields[FT.LNAME].isValid(SignUp.Prefill.LName)) SignUp.Fields[FT.LNAME].setValue(SignUp.Prefill.LName);
- if (exists(SignUp.Prefill.Zip) && SignUp.Fields[FT.ZIP].isValid(SignUp.Prefill.Zip)) SignUp.Fields[FT.ZIP].setValue(SignUp.Prefill.Zip);
- if (exists(SignUp.Prefill.Gender) && SignUp.Fields[FT.GNDR].isValid(SignUp.Prefill.Gender)) SignUp.Fields[FT.GNDR].setValue(SignUp.Prefill.Gender);
- if (exists(SignUp.Prefill.BDate) && SignUp.Prefill.BDate.length == 8) {
- var c = parseInt(SignUp.Prefill.BDate.substring(0, 2)),
- a = parseInt(SignUp.Prefill.BDate.substring(2, 4)),
- b = parseInt(SignUp.Prefill.BDate.substring(4, 8));
- if (SignUp.Fields[FT.BD].isValid(a, null, null)) SignUp.Fields[FT.BD].setValue(a.toString(), null, null);
- if (SignUp.Fields[FT.BD].isValid(null, c, null)) SignUp.Fields[FT.BD].setValue(null, c.toString(), null);
- if (SignUp.Fields[FT.BD].isValid(null, null, b)) SignUp.Fields[FT.BD].setValue(null, null, b.toString())
- }
- };
- SignUp.AddError = function (d, f, e) {
- var a = null;
- for (var b = 0; b < SignUp.FieldsOnPage.length; b++) {
- for (var c = 0; c < SignUp.FieldsOnPage[b].length; c++) if (SignUp.FieldsOnPage[b][c].getErrHolder() == d) {
- a = SignUp.FieldsOnPage[b][c];
- break
- }
- if (a) break
- }
- if (a) a.setMessage(MSG.Type.Error, a.getErrInfo(new SignUp.Error(f, e)))
- };
- SignUp.HandleServerError = function (g) {
- if (Trim(g).length == 0) return;
- var c = Trim(g);
- if (c.indexOf("$") != -1) {
- var d = c.split("$"),
- h = d[0];
- switch (h.toLowerCase()) {
- case "easilive":
- if (SignUp.Fields[FT.MN].getState() == STATE.MN.EASI) c = d[2];
- else c = d[1]
- }
- }
- var e = c.split(","),
- i = e[0],
- a = "Error_" + e[1],
- j = e[2];
- if (SignUp.IsIWW) {
- if (a == "Error_1058" || a == "Error_1242") a = SignUp.ErrorMap.Error1245
- } else if (SignUp.CheckOOBE()) if (a == "Error_1242") a = "Error_1159";
- if (a == "Error_1220") a = "Error_1058";
- var b = null;
- switch (a) {
- case "Error_Hip":
- live.accounts.strings.error_hip = "";
- if (HIP) {
- HIP.error = 1;
- live.accounts.strings.error_hip = HIP.getError();
- HIP.error = 0
- }
- if (!SignUp.IsInline) SignUp.HIPControl.setError(SignUp.HIPControl.ErrorEnum().ServerValidationError);
- break;
- case "Error_1159":
- case "Error_1058":
- b = [SignUp.Fields[FT.MN].getValue()];
- break;
- case "Error_1242":
- b = [SignUp.Fields[FT.MN].getValue(), 'href="' + SignUp.SignInLink + '" id="iSignInLink"'];
- break;
- case "Error_1245":
- b = ['href="" id="iSignInLink" onclick="SignUp.GoToSignIn();return false"'];
- break;
- case "Error_1254":
- b = ['href="" id="iNewEmailLink_1254" onclick="SignUp.Fields[FT.MN].updateState(STATE.MN.Live);return false"'];
- break;
- case "Error_1041":
- case "Error_1233":
- case "Error_1044":
- if (SignUp.Fields[FT.CTY].ipDataUsed) {
- var f = GEId("PostalContainer");
- if (f.innerHTML.length > 10) {
- SignUp.Fields[FT.ZIP].getElement().clearValue();
- f.style.display = "block";
- SignUp.Fields[FT.ZIP].setMessage(MSG.Type.Error, SignUp.Fields[FT.ZIP].getErrInfo(new SignUp.Error("Error_1228")))
- }
- return false
- }
- }
- SignUp.AddError(GEId(i), a, b, true);
- return true
- };
- SignUp.HaveErrors = function () {
- for (var a = 0; a < SignUp.FieldsOnPage.length; a++) for (var b = 0; b < SignUp.FieldsOnPage[a].length; b++) if (SignUp.FieldsOnPage[a][b].hasMessage(MSG.Type.Error)) return true;
- return false
- };
- SignUp.SetFocus = function () {
- if (typeof SignUp.FocusSet == "undefined" || SignUp.FocusSet == null) return;
- try {
- SignUp.FocusSet.f.focus()
- } catch (a) {}
- try {
- if (typeof SignUp.FocusSet.s.scrollIntoView == "undefined") window.scrollBy(0, - 75);
- else {
- SignUp.FocusSet.s.scrollIntoView(true);
- window.scrollBy(0, - 10)
- }
- } catch (a) {}
- SignUp.FocusSet = null
- };
- SignUp.HandleHintFocusOn = function (a, h, g, c) {
- if (SignUp.IsIWW) return;
- var b = GetString("live.accounts.strings." + h),
- d = b.match(/\{\d\}/g),
- f = false;
- if (d && d.length > 0) if (c && c.length == d.length) {
- var e = [b];
- e = e.concat(c);
- b = FormatString.apply(null, e)
- } else f = true;
- if (!f && a.value == b) {
- a.value = "";
- a.maxLength = g;
- a.className = "";
- try {
- a.focus();
- a.select()
- } catch (i) {}
- }
- };
- SignUp.HandleHintFocusOff = function (a, h, g, c) {
- if (SignUp.IsIWW) return;
- if (a.value.length < 1) {
- var b = GetString("live.accounts.strings." + h),
- d = b.match(/\{\d\}/g),
- f = false;
- if (d && d.length > 0) if (c && c.length == d.length) {
- var e = [b];
- e = e.concat(c);
- b = FormatString.apply(null, e)
- } else f = true;
- if (f) {
- a.value = "";
- a.maxLength = g;
- a.className = ""
- } else {
- a.className = "inputhint";
- a.maxLength = 100;
- a.value = b
- }
- }
- };
- SignUp.RegExValMatch = function (a, b) {
- return a.match(b) ? true : false
- };
- SignUp.Contains = function (a, b, c) {
- if (a.length == 0 || b.length == 0) return false;
- if (c) {
- a = a.toLowerCase();
- b = b.toLowerCase()
- }
- if (a.indexOf(b) == -1) return false;
- return true
- };
- SignUp.Membername = function () {
- return SignUp.Fields[FT.MN].getValue().split("@")[0]
- };
- SignUp.Domain = function () {
- var a = SignUp.Fields[FT.MN].getValue(),
- b = a.indexOf("@");
- if (b != -1 && a.length > b + 1) return a.substring(b + 1);
- return ""
- };
- SignUp.IsLiveDomain = function (b) {
- if (isString(b) && exists(SignUp.LiveDomains)) for (var a = 0; a < SignUp.LiveDomains.length; a++) if (strEquals(b, SignUp.LiveDomains[a], true)) return true;
- return false
- };
- SignUp.OnlyNumbers = function (a) {
- try {
- if (a.keyCode && a.keyCode != 0 && typeof a.charCode == "undefined") return b(a.keyCode);
- else if (a.charCode && a.charCode != 0) return b(a.charCode)
- } catch (c) {}
- return true;
- function b(a) {
- return a >= 48 && a <= 57
- }
- };
- SignUp.CookieString = "";
- SignUp.Cookies = {};
- SignUp.CookieValue = function (f) {
- var c = document.cookie;
- if (c !== SignUp.CookieString) {
- SignUp.Cookies = {};
- var e = c.split(";");
- for (var d = 0; d < e.length; d++) {
- var b = e[d],
- a = b.indexOf("=");
- if (a !== -1) SignUp.Cookies[Trim(b.substring(0, a))] = Trim(decodeURIComponent(b.substring(a + 1)))
- }
- SignUp.CookieString = c
- }
- return SignUp.Cookies[f]
- };
- SignUp.RemoveCookie = function (b) {
- var a;
- a = b + "= ";
- a += "; path=/; domain=" + SignUp.SiteDomain + "; expires=Fri, 11-Feb-2000 01:30:00 GMT";
- document.cookie = a
- };
- SignUp.AddCookie = function (c, b) {
- var a = c + "=" + escape(b);
- a += "; path=/; domain=" + SignUp.SiteDomain;
- a += "; secure";
- document.cookie = a
- };
- SignUp.Show = function (c) {
- for (var b = 0; b < c.length; b++) {
- var a = GEId(c[b]);
- if (typeof a != "undefined" && a != null) a.style.display = "block"
- }
- };
- SignUp.Hide = function (c) {
- for (var b = 0; b < c.length; b++) {
- var a = GEId(c[b]);
- if (typeof a != "undefined" && a != null) a.style.display = "none"
- }
- };
- SignUp.SetQSValue = function (a, d, f) {
- var c = "&" + d.toLowerCase() + "=",
- b = a.toLowerCase().indexOf(c);
- if (b == -1) {
- c = "?" + d.toLowerCase() + "=";
- b = a.toLowerCase().indexOf(c);
- if (b == -1) {
- var g = "&";
- if (a.indexOf("?") == -1) g = "?";
- return a + g + d + "=" + f
- }
- }
- var e = a.indexOf("&", b + 1);
- if (e == -1) e = a.length;
- return a.substring(0, b) + c + f + a.substring(e)
- };
- SignUp.CheckOOBE = function () {
- return SignUp.IsInline && !SignUp.IsIWW
- };
- SignUp.isIE = function () {
- return window.ActiveXObject ? true : false
- };
- function GEId(a) {
- return document.getElementById(a)
- }
- function Trim(a) {
- return a.replace(/^\s+|\s+$/g, "")
- }
- SignUp.WizardResult = {
- GenericError: 1,
- Interrupt: 2,
- NoActiveX: 3
- };
- SignUp.DownloadPrivacyText = function () {
- var c = new AJAX.AJAXHandler(SignUp.SitePath + "/query.aspx?" + SignUp.QS, "POST", true),
- b = "command=privacy";
- c.sendRequest(b, a);
- function a(b) {
- var a = b.getResponseText();
- if (a) GEId("iPriv").innerHTML = a
- }
- };
- SignUp.DownloadEUPrivacyText = function () {
- var c = new AJAX.AJAXHandler(SignUp.SitePath + "/query.aspx?" + SignUp.QS, "POST", true),
- b = "command=euprivacy";
- c.sendRequest(b, a);
- function a(b) {
- var a = b.getResponseText();
- if (a) GEId("iEUPrivacy").innerHTML = a
- }
- };
- SignUp.DownloadTOUText = function () {
- var c = new AJAX.AJAXHandler(SignUp.SitePath + "/query.aspx?" + SignUp.QS, "POST", true),
- b = "command=tou";
- c.sendRequest(b, a);
- function a(b) {
- var a = b.getResponseText();
- if (a) GEId("iTOU").innerHTML = a
- }
- };
- SignUp.SwitchPanes = function (d) {
- var c = d - 1,
- a = [];
- a[0] = GEId("page1");
- a[1] = GEId("page2");
- if (SignUp.IsIWW) {
- a[2] = GEId("page3");
- a[3] = GEId("page4");
- a[4] = GEId("page5");
- a[5] = GEId("page6")
- }
- for (var b = 0, e = a.length; b < e; b++) a[b].style.display = b == c ? "block" : "none";
- if (SignUp.PaneShown != d && SignUp.FieldsOnPage[c]) for (var b = 0; b < SignUp.FieldsOnPage[c].length; b++) if (SignUp.FieldsOnPage[c][b].isFocusAllowed()) {
- SignUp.FieldsOnPage[c][b].setFocus(true);
- break
- }
- SignUp.PaneShown = d;
- if (SignUp.IsIWW) SignUp.SetButtonStatesAndHeader()
- };
- SignUp.DetectHeader = function () {
- var a = "";
- switch (SignUp.PaneShown) {
- case 5:
- case 4:
- case 3:
- a = "IWW_Signup_Heading3";
- break;
- case 2:
- a = "IWW_Signup_Heading2";
- break;
- case 6:
- case 1:
- default:
- if (SignUp.Fields[FT.MN].getState() == STATE.MN.Live) a = "IWW_Signup_Heading1_Live";
- else a = "IWW_Signup_Heading1_Easi"
- }
- return GetString("live.accounts.strings." + a)
- };
- SignUp.SetButtonStatesAndHeader = function () {
- var e = SignUp.DetectHeader(),
- a = true,
- b = false,
- d = false,
- c = SignUp.PaneShown;
- if (c == 1) a = false;
- b = true;
- if (c == 3) d = true;
- try {
- window.external.SetWizardButtons(a, b, d);
- window.external.SetHeaderText(e, "")
- } catch (f) {}
- };
- SignUp.ShowFirstErrorPane = function () {
- for (var a = 0; a < SignUp.FieldsOnPage.length; a++) for (var b = 0; b < SignUp.FieldsOnPage[a].length; b++) if (SignUp.FieldsOnPage[a][b].hasMessage(MSG.Type.Error)) {
- SignUp.SwitchPanes(a + 1);
- return
- }
- };
- SignUp.ValidatePane = function (a, g) {
- var d = [];
- DOM.visible(GEId("page" + SignUp.PaneShown), Visibility.Removed);
- DOM.visible(GEId("page" + SignUp.PaneShown), Visibility.Visible);
- SignUp.AllChanged = true;
- for (var c = 0; c < SignUp.FieldsOnPage[a - 1].length; c++) {
- var b = SignUp.FieldsOnPage[a - 1][c];
- b.updateForSubmit();
- if (SignUp.IsIWW && b.getVState() == FIELD.VState.Running) d.push(b)
- }
- SignUp.AllChanged = false;
- var f = e();
- if (f > 0) {
- g(f);
- return
- }
- if (SignUp.IsIWW) SignUp.ShowPageProgress();
- SignUp.WaitForAsync(d, h);
- function h() {
- if (SignUp.IsIWW) SignUp.HidePageProgress();
- var a = e();
- if (a == 1 || SignUp.IsIWW && a != 0) SignUp.SetFocus();
- g(a > 0)
- }
- function e() {
- var c = 0;
- for (var b = 0; b < SignUp.FieldsOnPage[a - 1].length; b++) if (SignUp.FieldsOnPage[a - 1][b].hasMessage(MSG.Type.Error)) c++;
- return c
- }
- };
- SignUp.NextButtonClick = function () {
- if (SignUp.PaneShown == 1) SignUp.ValidatePane(1, a);
- else SignUp.DoPost();
- function a(a) {
- if (!a) SignUp.SwitchPanes(2)
- }
- };
- SignUp.BackButtonClick = function () {
- if (SignUp.PaneShown == 2) SignUp.SwitchPanes(1)
- };
- SignUp.OnIWWNext = function () {
- switch (SignUp.PaneShown) {
- case 3:
- SignUp.DoPost(false, SignUp.PopulateIWWPropertyBag);
- break;
- case 4:
- case 5:
- SignUp.SwitchPanes(3);
- SignUp.SetFocus();
- window.scrollTo(0, 0);
- break;
- case 6:
- SignUp.SwitchPanes(1);
- SignUp.SetFocus();
- window.scrollTo(0, 0);
- break;
- default:
- SignUp.ValidatePane(SignUp.PaneShown, a)
- }
- function a(a) {
- if (!a) {
- SignUp.SwitchPanes(SignUp.PaneShown + 1);
- SignUp.SetFocus();
- window.scrollTo(0, 0)
- }
- }
- };
- SignUp.OnIWWBack = function () {
- switch (SignUp.PaneShown) {
- case 1:
- try {
- window.external.FinalBack()
- } catch (a) {}
- break;
- case 5:
- SignUp.SwitchPanes(3);
- SignUp.SetFocus();
- window.scrollTo(0, 0);
- break;
- case 6:
- SignUp.SwitchPanes(1);
- SignUp.SetFocus();
- window.scrollTo(0, 0);
- break;
- default:
- SignUp.SwitchPanes(SignUp.PaneShown - 1);
- SignUp.SetFocus();
- window.scrollTo(0, 0)
- }
- };
- SignUp.PopulateIWWPropertyBag = function (b, d, c) {
- try {
- if (b) {
- window.external.Property("ErrorCode") = parseInt(b);
- window.external.Property("ErrorString") = d;
- if (c) window.external.Property("ErrorURL") = c
- } else {
- var a = SignUp.GetAuthBuffer(SignUp.Fields[FT.MN].getValue(), SignUp.Fields[FT.PWD].getValue());
- if (!a) {
- window.external.Property("ErrorCode") = parseInt(SignUp.WizardResult.GenericError);
- window.external.Property("ErrorString") = GetString("live.accounts.strings.Inline_GenericError")
- } else {
- window.external.Property("FirstName") = SignUp.Fields[FT.FNAME].getValue();
- window.external.Property("LastName") = SignUp.Fields[FT.LNAME].getValue();
- window.external.Property("Username") = SignUp.Fields[FT.MN].getValue();
- window.external.Property("AuthenticationBuffer") = a
- }
- }
- window.external.SetWizardButtons(false, false, true);
- window.external.FinalNext()
- } catch (e) {}
- };
- SignUp.GoToSignIn = function () {
- var c = SignUp.Fields[FT.MN].getValue(),
- a = b();
- if (!a) {
- SignUp.PopulateIWWPropertyBag(SignUp.WizardResult.GenericError, GetString("live.accounts.strings.Inline_GenericError"));
- return
- }
- $BSI.navigateTo(SignUp.SetQSValue(a, "username", encodeURIComponent(c)));
- function b() {
- var a = "";
- try {
- a = window.external.Property("SignInURL")
- } catch (b) {}
- if (!a) try {
- a = window.external.Property("AlternativeURL");
- window.external.Property("AlternativeURL") = document.location.href
- } catch (b) {}
- return a
- }
- };
- SignUp.GetSignInUrl = function () {};
- SignUp.ShowPageProgress = function () {
- DOM.visible(GEId("page" + SignUp.PaneShown), Visibility.Removed);
- DOM.visible(GEId("pageProgress"), Visibility.Visible);
- setTimeout(a, 2e3);
- function a() {
- if (GEId("pageProgress").style.display == "block") DOM.visible(GEId("iPageProgress"), Visibility.Visible)
- }
- };
- SignUp.HidePageProgress = function () {
- DOM.visible(GEId("iPageProgress"), Visibility.Removed);
- DOM.visible(GEId("pageProgress"), Visibility.Removed);
- DOM.visible(GEId("page" + SignUp.PaneShown), Visibility.Visible)
- };
- function OnNext() {
- if (SignUp.IsIWW) SignUp.OnIWWNext()
- }
- function OnBack() {
- if (SignUp.IsIWW) SignUp.OnIWWBack()
- }
- SignUp.PaneHelpLink = function (b, a) {
- return "<p><a href=\"javascript:SignUp.LaunchHelp('" + SignUp.HelpUrl + "')\">" + a + "</a></p>"
- };
- SignUp.Encrypt = function () {
- this.EncryptData = function (b, c, j) {
- var a = [];
- switch (j.toLowerCase()) {
- case "pwdsa":
- if (b == null || c == null) return null;
- a = e(b, c);
- break;
- case "pwd":
- if (b == null) return null;
- a = d(b)
- }
- if (a == null || typeof a == "undefined") return a;
- if (typeof Key != "undefined" && typeof f != "undefined") var i = f(Key);
- var h = x(a, i, randomNum),
- g = m(h);
- return g;
- function e(d, e) {
- var a = [],
- c = 0;
- a[c++] = 1;
- a[c++] = 1;
- var g = d.length;
- a[c++] = d.length;
- var b;
- for (b = 0; b < g; b++) a[c++] = d.charCodeAt(b) & 127;
- var f = e.length;
- a[c++] = f * 2;
- for (b = 0; b < f; b++) {
- a[c++] = e.charCodeAt(b) & 255;
- a[c++] = (e.charCodeAt(b) & 65280) >> 8
- }
- a[c] = 0;
- return a
- }
- function d(d) {
- var a = [],
- b = 0;
- a[b++] = 1;
- a[b++] = 1;
- var c, e = d.length;
- a[b++] = e;
- for (c = 0; c < e; c++) a[b++] = d.charCodeAt(c) & 127;
- a[b++] = 0;
- a[b++] = 0;
- return a
- }
- };
- function o(a) {
- if (a >= 0 && a < 26) return String.fromCharCode(65 + a);
- else if (a >= 26 && a < 52) return String.fromCharCode(97 + a - 26);
- else if (a >= 52 && a < 62) return String.fromCharCode(48 + a - 52);
- else if (a == 62) return "+";
- else if (a == 63) return "/"
- }
- function d(b, d) {
- var a, c = "";
- for (a = d; a < 4; a++) b = b >> 6;
- for (a = 0; a < d; a++) {
- c = o(b & 63) + c;
- b = b >> 6
- }
- return c
- }
- function m(e) {
- var g = e.length,
- b = "",
- a, c;
- for (a = g - 3; a >= 0; a -= 3) {
- c = e[a] | e[a + 1] << 8 | e[a + 2] << 16;
- b = b + d(c, 4)
- }
- var f = g % 3;
- c = 0;
- for (a += 2; a >= 0; a--) c = c << 8 | e[a];
- if (f == 0) b = b + d(c, 4);
- else if (f == 1) b = b + d(c << 16, 2) + "==";
- else if (f == 2) b = b + d(c << 8, 3) + "=";
- return b
- }
- function f(b) {
- var c = b.indexOf(";");
- if (c < 0) return null;
- var f = b.substr(0, c),
- e = b.substr(c + 1),
- a = f.indexOf("=");
- if (a < 0) return null;
- var g = f.substr(a + 1);
- a = e.indexOf("=");
- if (a < 0) return null;
- var h = e.substr(a + 1),
- d = {};
- d["n"] = q(h);
- d["e"] = parseInt(g, 16);
- return d
- }
- function x(a, e, h) {
- var c = e.n,
- i = e.e,
- j = a.length,
- f = c.size * 2,
- g = 42;
- if (j + g > f) return null;
- l(a, f, h);
- a = a.reverse();
- var k = p(a),
- d = v(k, i, c);
- d.size = c.size;
- var b = r(d);
- b = b.reverse();
- return b
- }
- function c() {
- this.size = 1;
- this.data = [];
- this.data[0] = 0
- }
- function u(b) {
- var a = new c;
- a.size = b.size;
- a.data = b.data.slice(0);
- return a
- }
- function p(d) {
- var b = new c,
- a = 0,
- e = d.length,
- f = e >> 1;
- for (a = 0; a < f; a++) b.data[a] = d[2 * a] + (d[1 + 2 * a] << 8);
- if (e % 2) b.data[a++] = d[e - 1];
- b.size = a;
- return b
- }
- function r(c) {
- var b = [],
- a = 0,
- d = c.size;
- for (a = 0; a < d; a++) {
- b[a * 2] = c.data[a] & 255;
- var e = c.data[a] >>> 8;
- b[a * 2 + 1] = e
- }
- return b
- }
- function v(f, b, e) {
- var h = [],
- c = 0;
- while (b > 0) {
- h[c] = b & 1;
- b = b >>> 1;
- c++
- }
- var a = u(f);
- for (var d = c - 2; d >= 0; d--) {
- a = g(a, a, e);
- if (h[d] == 1) a = g(a, f, e)
- }
- return a
- }
- function g(e, d, b) {
- var c = w(e, d),
- a = y(c, b);
- return a.r
- }
- function w(e, g) {
- var d = new c;
- d.size = e.size + g.size;
- var a, b;
- for (a = 0; a < d.size; a++) d.data[a] = 0;
- var f = e.data,
- i = g.data,
- h = d.data;
- if (e == g) {
- for (a = 0; a < e.size; a++) h[2 * a] += f[a] * f[a];
- for (a = 1; a < e.size; a++) for (b = 0; b < a; b++) h[a + b] += 2 * f[a] * f[b]
- } else for (a = 0; a < e.size; a++) for (b = 0; b < g.size; b++) h[a + b] += f[a] * i[b];
- s(d);
- return d
- }
- function s(d) {
- var b, c, e, a, g, f;
- e = d.size;
- c = 0;
- for (b = 0; b < e; b++) {
- a = d.data[b];
- a += c;
- f = a;
- c = Math.floor(a / 65536);
- a -= c * 65536;
- d.data[b] = a
- }
- }
- function k(a) {
- var b = a.size - 1;
- while (b > 0 && a.data[b--] == 0) a.size--
- }
- function y(a, b) {
- var m = a.size,
- f = b.size,
- o = b.data[f - 1],
- n = b.data[f - 1] + b.data[f - 2] / 65536,
- j = new c;
- j.size = m - f + 1;
- a.data[m] = 0;
- for (var g = m - 1; g >= f - 1; g--) {
- var h = g - f + 1,
- d = Math.floor((a.data[g + 1] * 65536 + a.data[g]) / n);
- if (d > 0) {
- var i = e(a, d, b, h);
- if (i < 0) {
- d--;
- e(a, d, b, h)
- }
- while (i > 0 && a.data[g] >= o) {
- i = e(a, 1, b, h);
- if (i > 0) d++
- }
- }
- j.data[h] = d
- }
- var l = {};
- l["q"] = j;
- k(a);
- l["r"] = a;
- return l
- }
- function e(f, i, g, d) {
- var a, h = f.data.slice(0),
- b = 0,
- e = f.data;
- for (a = 0; a < g.size; a++) {
- var c = b + g.data[a] * i;
- b = c >>> 16;
- c = c - b * 65536;
- if (c > e[a + d]) {
- e[a + d] += 65536 - c;
- b++
- } else e[a + d] -= c
- }
- if (b > 0) e[a + d] -= b;
- if (e[a + d] < 0) {
- f.data = h.slice(0);
- return -1
- }
- return +1
- }
- function l(d, f, o) {
- var q = d.length,
- a, p = [218, 57, 163, 238, 94, 107, 75, 13, 50, 85, 191, 239, 149, 96, 24, 144, 175, 216, 7, 9],
- k = f - q - 40 - 2,
- e = [];
- for (a = 0; a < k; a++) e[a] = 0;
- e[k] = 1;
- var r = p.concat(e, d),
- c = [];
- for (a = 0; a < 20; a++) c[a] = Math.floor(Math.random() * 256);
- c = i(c.concat(o));
- var n = j(c, f - 21),
- g = h(r, n),
- m = j(g, 20),
- l = h(c, m),
- b = [];
- b[0] = 0;
- b = b.concat(l, g);
- for (a = 0; a < b.length; a++) d[a] = b[a]
- }
- function j(f, d) {
- if (d > 4096) return null;
- var a = f.slice(0),
- b = a.length;
- a[b++] = 0;
- a[b++] = 0;
- a[b++] = 0;
- a[b] = 0;
- var e = 0,
- c = [];
- while (c.length < d) {
- a[b] = e++;
- c = c.concat(i(a))
- }
- return c.slice(0, d)
- }
- function h(b, d) {
- if (b.length != d.length) return null;
- var c = [],
- e = b.length;
- for (var a = 0; a < e; a++) c[a] = b[a] ^ d[a];
- return c
- }
- function i(f) {
- var d, e = f.slice(0);
- t(e);
- var a = {};
- a["A"] = 1732584193;
- a["B"] = 4023233417;
- a["C"] = 2562383102;
- a["D"] = 271733878;
- a["E"] = 3285377520;
- for (d = 0; d < e.length; d += 64) n(a, e, d);
- var c = [];
- b(a.A, c, 0);
- b(a.B, c, 4);
- b(a.C, c, 8);
- b(a.D, c, 12);
- b(a.E, c, 16);
- return c
- }
- function b(b, d, c) {
- var a;
- for (a = 3; a >= 0; a--) {
- d[c + a] = b & 255;
- b = b >>> 8
- }
- }
- function t(b) {
- var d = b.length,
- e = d,
- f = d % 64,
- g = f < 55 ? 56 : 120,
- a;
- b[e++] = 128;
- for (a = f + 1; a < g; a++) b[e++] = 0;
- var c = d * 8;
- for (a = 1; a < 8; a++) {
- b[e + 8 - a] = c & 255;
- c = c >>> 8
- }
- }
- function n(c, m, n) {
- var o = 1518500249,
- p = 1859775393,
- q = 2400959708,
- r = 3395469782,
- b, h, l, i = [],
- g = c.A,
- d = c.B,
- e = c.C,
- f = c.D,
- j = c.E;
- for (h = 0, l = n; h < 16; h++, l += 4) i[h] = m[l] << 24 | m[l + 1] << 16 | m[l + 2] << 8 | m[l + 3] << 0;
- for (h = 16; h < 80; h++) i[h] = a(i[h - 3] ^ i[h - 8] ^ i[h - 14] ^ i[h - 16], 1);
- var k;
- for (b = 0; b < 20; b++) {
- k = a(g, 5) + (d & e | ~d & f) + j + i[b] + o & 4294967295;
- j = f;
- f = e;
- e = a(d, 30);
- d = g;
- g = k
- }
- for (b = 20; b < 40; b++) {
- k = a(g, 5) + (d ^ e ^ f) + j + i[b] + p & 4294967295;
- j = f;
- f = e;
- e = a(d, 30);
- d = g;
- g = k
- }
- for (b = 40; b < 60; b++) {
- k = a(g, 5) + (d & e | d & f | e & f) + j + i[b] + q & 4294967295;
- j = f;
- f = e;
- e = a(d, 30);
- d = g;
- g = k
- }
- for (b = 60; b < 80; b++) {
- k = a(g, 5) + (d ^ e ^ f) + j + i[b] + r & 4294967295;
- j = f;
- f = e;
- e = a(d, 30);
- d = g;
- g = k
- }
- c.A = c.A + g & 4294967295;
- c.B = c.B + d & 4294967295;
- c.C = c.C + e & 4294967295;
- c.D = c.D + f & 4294967295;
- c.E = c.E + j & 4294967295
- }
- function a(b, a) {
- var c = b >>> 32 - a,
- e = (1 << 32 - a) - 1,
- d = b & e;
- return d << a | c
- }
- function q(f) {
- var a, e, b = Math.ceil(f.length / 4),
- d = new c;
- d.size = b;
- for (a = 0; a < b; a++) {
- e = f.substr(a * 4, 4);
- d.data[b - 1 - a] = parseInt(e, 16)
- }
- return d
- }
- };
- STATE.MN = {
- EASI: "easi",
- Live: "live"
- };
- FIELD.Membername = function () {
- FIELD.Base.apply(this, arguments);
- this.m_sLastMembername = "unchecked";
- this.m_sCheckMembername = "";
- this.m_iMaxLength = 112;
- this.m_oCheckAvailHandler = null;
- this.m_eState = SignUp.IsEASI ? STATE.MN.EASI : STATE.MN.Live;
- this.m_arrStateIDs = [];
- this.m_arrStateMessages = []
- };
- FIELD.Membername.prototype = {
- getElement: function () {
- return GEId(this.m_arrStateIDs[this.m_eState].element)
- },
- getLiveElement: function () {
- return GEId(this.m_arrStateIDs[STATE.MN.Live].element)
- },
- getEasiElement: function () {
- return GEId(this.m_arrStateIDs[STATE.MN.EASI].element)
- },
- getMaxLength: function () {
- var a = this.getEasiElement();
- if (a) return a.maxLength;
- else return this.m_iMaxLength
- },
- getCheckAvailButton: function () {
- return GEId(this.m_arrStateIDs[STATE.MN.EASI].checkavail)
- },
- getValue: function () {
- var a = this.getElement();
- if (a.value == "") return "";
- var b = this.getDomainDDSelected(),
- c = exists(b) ? b.value : "";
- if (this.m_eState == STATE.MN.Live && c != "") return a.value + "@" + c;
- else return a.value
- },
- getDomainDD: function () {
- return GEId(this.m_arrStateIDs[STATE.MN.EASI].domain)
- },
- getDomainDDSelected: function () {
- var a = this.getDomainDD();
- if (exists(a)) return a.options[a.selectedIndex];
- return null
- },
- getIndexOfDomain: function (c) {
- var b = this.getDomainDD();
- for (var a = 0; a < b.options.length; a++) if (strEquals(b.options[a].value, c, true)) return a;
- return -1
- },
- getState: function () {
- return this.m_eState
- },
- updateState: function (a) {
- if (this.m_eState == a) return;
- if (SignUp.IsIWW && SignUp.Fields[FT.ALT].getDState() == FIELD.DState.Auto) SignUp.Fields[FT.ALT].clearValue();
- this.clearValue();
- this.clearMessages();
- this.m_sLastMembername = "unchecked";
- SignUp.HideMNS();
- switch (a) {
- case STATE.MN.Live:
- SignUp.Hide(["cmembernameeasi", "livelinkctr"]);
- SignUp.Show(["cmembernamelive", "easilinkctr"]);
- PWDR.Update(PWDR.LiveState, true);
- break;
- case STATE.MN.EASI:
- default:
- SignUp.Hide(["cmembernamelive", "easilinkctr"]);
- SignUp.Show(["cmembernameeasi", "livelinkctr"]);
- PWDR.Update(PWDR.EasiState, true);
- SignUp.HandleHintFocusOff(this.getEasiElement(), "PWRHIP_EmailExample", 112)
- }
- this.m_arrMessages = this.m_arrStateMessages[a];
- this.clearMessage(MSG.Type.Error);
- this.showHelp(a, true);
- this.setVState(FIELD.VState.Pending);
- this.enable();
- this.disableSpinner();
- SignUp.RemoveChanged(this.getEasiElement());
- SignUp.RemoveChanged(this.getLiveElement());
- this.m_eState = a;
- if (SignUp.IsIWW) SignUp.SetButtonStatesAndHeader();
- return true
- },
- update: function () {
- this.runValidation()
- },
- updateForSubmit: function () {
- if (this.getVState() == FIELD.VState.Error) this.setVState(FIELD.VState.Pending);
- this.runValidation();
- if (this.getVState() == FIELD.VState.Running && exists(this.m_oCheckAvailHandler)) this.m_oCheckAvailHandler.disableRetry()
- },
- runValidation: function () {
- var a = this.getElement();
- if (!SignUp.Changed(a)) return;
- SignUp.HideMNS();
- try {
- this.validate(a.value, this.getValue(), this.getState(), this.getMaxLength());
- this.checkAvailable();
- if (this.getVState() == FIELD.VState.Pending) this.setVState(FIELD.VState.Done)
- } catch (b) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(b));
- this.clearMessage(MSG.Type.Failure);
- this.clearMessage(MSG.Type.Success);
- this.m_sLastMembername = "";
- if (b.description == "Error_1058") SignUp.DisplayMNS()
- }
- },
- validate: function (a, c, b, d) {
- if (!b) b = this.getState();
- switch (b) {
- case STATE.MN.EASI:
- if (a == "" || a == GetString("live.accounts.strings.PWRHIP_EmailExample")) throw new SignUp.Error("Error_1240");
- else if (!SignUp.RegExValMatch(a, "^[\\w\\.\\-\\@]+$")) throw new SignUp.Error("Error_1062");
- else if (!SignUp.RegExValMatch(a, "^$|^(?:(?:(?![\\.]{2,})[\\w\\.\\-])*)@(?:(?:(?![\\.]{2,})[\\w\\.\\-])*)([\\.][a-zA-Z]{2,4})$") || !SignUp.RegExValMatch(a, "^$|^[\\w\\-\\.]*[\\w]@[\\w][\\w\\-\\.]*$") || !SignUp.RegExValMatch(a, "^$|^[\\w\\-].+[\\w]$")) throw new SignUp.Error("Error_1240");
- else if (!SignUp.RegExValMatch(a, "^$|^[\\w\\.\\-]+@[\\w\\.\\-]+$")) throw new SignUp.Error("Error_1062");
- else if (!SignUp.RegExValMatch(a, "^.{1,64}@.{1,48}$") || a.length > d) throw new SignUp.Error("Error_1145");
- break;
- case STATE.MN.Live:
- if (a == "") if (SignUp.IsIWW) throw new SignUp.Error("Error_1018");
- else throw new SignUp.Error("Error_1219");
- else if (typeof SignUp.OpenDomain == "undefined" && (SignUp.RegExValMatch(a, "^[0-9]{8,12}$") || SignUp.RegExValMatch(a, "^[0-9]{1}$"))) throw new SignUp.Error("Error_1058", [c]);
- else if (!SignUp.RegExValMatch(a, "^(?:(?:[a-zA-Z])|(?:[\\w\\-](?:(?![\\.]{2,})[\\w\\.\\-]){0,62}[\\w\\-]))$")) throw new SignUp.Error("Error_1062");
- }
- },
- isValid: function (a, b) {
- try {
- this.validate(a, a, b, this.getMaxLength());
- return true
- } catch (c) {
- return false
- }
- },
- disable: function (a) {
- this.setUIState(false);
- if (a) this.setDomainDDState(false)
- },
- enable: function () {
- this.setUIState(true);
- this.setDomainDDState(true)
- },
- setUIState: function (a) {
- if (this.getCheckAvailButton()) this.getCheckAvailButton().disabled = !a;
- this.getElement().disabled = !a
- },
- setDomainDDState: function (a) {
- if (this.getDomainDD()) this.getDomainDD().disabled = !a
- },
- enableSpinner: function () {
- this.setMessage(MSG.Type.Progress, new MSG.Info(null, [this]))
- },
- disableSpinner: function () {
- this.clearMessage(MSG.Type.Progress)
- },
- setMembername: function (a) {
- if (!exists(a) || a == "") return;
- sUsername = a.split("@")[0];
- if (a.length <= sUsername.length + 1) {
- this.updateState(STATE.MN.Live);
- this.getElement().value = sUsername
- } else {
- sDomain = a.split("@")[1];
- if (SignUp.IsLiveDomain(sDomain)) {
- this.updateState(STATE.MN.Live);
- this.getElement().value = sUsername;
- var b = this.getIndexOfDomain(sDomain);
- if (b != -1) this.getDomainDD().selectedIndex = b
- } else {
- this.updateState(STATE.MN.EASI);
- this.getElement().value = a;
- this.getElement().className = ""
- }
- }
- this.checkAvailable()
- },
- showHelp: function (b, c) {
- SignUp.MsgHandler.clearMessages(MSG.Type.Help);
- var a = this.m_arrStateIDs[b].helpString;
- if (c) a = this.m_arrStateIDs[b].altHelpString;
- this.setMessage(MSG.Type.Help, new MSG.SignUp.Info.Help(a, [this]))
- },
- resetValidation: function () {
- if (this.getVState() == FIELD.VState.Running && exists(this.m_oCheckAvailHandler)) this.m_oCheckAvailHandler.cancel();
- this.setVState(FIELD.VState.Pending);
- this.clearMessage(MSG.Type.Failure);
- this.clearMessage(MSG.Type.Success)
- },
- evt_EASI_onfocus: function (b) {
- var a = EVENT.getTarget(b);
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this);
- SignUp.HandleHintFocusOn(a, "PWRHIP_EmailExample", 112);
- this.showHelp(this.m_eState, false)
- },
- evt_EASI_onblur: function (b) {
- var a = EVENT.getTarget(b);
- if (this.getVState() == FIELD.VState.Running) this.disable();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.hideMessage(MSG.Type.Error, this);
- SignUp.HandleHintFocusOff(a, "PWRHIP_EmailExample", 112)
- },
- evt_EASI_onchange: function (a) {
- this.resetValidation();
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_Live_onfocus: function () {
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this);
- this.showHelp(this.m_eState, false)
- },
- evt_Live_onblur: function () {
- if (this.getVState() == FIELD.VState.Running) this.disable();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.hideMessage(MSG.Type.Error, this)
- },
- evt_Live_onchange: function (a) {
- this.resetValidation();
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_Domain_onchange: function (a) {
- this.resetValidation();
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a));
- if (this.getVState == FIELD.VState.Running) this.disable(true)
- },
- evt_Domain_onfocus: function () {
- if (this.getElement().disabled) {
- this.setDomainDDState(false);
- SignUp.FocusSet = {
- f: SignUp.Fields[FT.PWD].getElement()
- };
- SignUp.SetFocus()
- }
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this);
- this.showHelp(this.m_eState, false)
- },
- evt_Domain_onblur: function () {
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.hideMessage(MSG.Type.Error, this)
- },
- checkAvailable: function () {
- this.m_sCheckMembername = this.getValue();
- if (this.getVState() != FIELD.VState.Pending || this.m_sLastMembername == this.m_sCheckMembername) return;
- this.clearMessage(MSG.Type.Error);
- this.clearMessage(MSG.Type.Failure);
- this.clearMessage(MSG.Type.Success);
- if (SignUp.DisableCheckavail) {
- this.setVState(FIELD.VState.Done);
- this.m_sLastMembername = this.m_sCheckMembername
- } else {
- this.m_sLastMembername = "unchecked";
- this.setVState(FIELD.VState.Running);
- this.enableSpinner();
- var a = this,
- b = SignUp.SitePath + "/checkavail.aspx?chkavail=" + this.m_sCheckMembername + (this.m_eState == STATE.MN.EASI ? "&chkeasi=1" : "") + "&tk=" + (new Date).getTime() + "&" + SignUp.QS;
- this.m_oCheckAvailHandler = new AJAX.CheckAvailHandler(b, true, 1e4, SignUp.IsIWW ? 2 : 0);
- this.m_oCheckAvailHandler.sendRequest("", function () {
- a.evt_Image_onload.call(a)
- }, function () {
- a.evt_Image_onabort.call(a)
- })
- }
- },
- evt_Image_onload: function () {
- var e = this.getElement(),
- b = FIELD.VState.Pending,
- a = SignUp.CookieValue("CheckAvail");
- SignUp.RemoveCookie("CheckAvail");
- if (this.getVState() == FIELD.VState.Running) {
- if (a == "Error_1242") if (SignUp.IsIWW) this.setMessage(MSG.Type.Error, this.getErrInfo(new SignUp.Error("Error_1245", ['href="" id="iSignInLink" onclick="SignUp.GoToSignIn();return false"'])));
- else if (SignUp.IsInline) this.setMessage(MSG.Type.Error, this.getErrInfo(new SignUp.Error("Error_1159", [this.m_sCheckMembername])));
- else this.setMessage(MSG.Type.Error, this.getErrInfo(new SignUp.Error(a, [this.m_sCheckMembername, 'href="' + SignUp.SignInLink + '" id="iSignInLink"'])));
- else if (a == "Error_1058") {
- if (SignUp.IsIWW) this.setMessage(MSG.Type.Error, this.getErrInfo(new SignUp.Error("Error_1245", ['href="" id="iSignInLink" onclick="SignUp.GoToSignIn();return false"'])));
- else this.setMessage(MSG.Type.Error, this.getErrInfo(new SignUp.Error(a, [this.m_sCheckMembername])));
- if (typeof SignUp.OpenDomain == "undefined") SignUp.DisplayMNS()
- } else if (a == "Error_1220" || a == "Error_1062" || a == "Error_1181") if (a == "Error_1220") this.setMessage(MSG.Type.Error, this.getErrInfo(new SignUp.Error("Error_1058", [this.m_sCheckMembername])));
- else this.setMessage(MSG.Type.Error, this.getErrInfo(new SignUp.Error(a)));
- else {
- this.clearMessage(MSG.Type.Error);
- var c = MSG.Type.Success;
- b = FIELD.VState.Done;
- if (!(a == "Error_1081" || a == "Error_1239")) {
- a = "Error_6";
- c = MSG.Type.Failure;
- b = FIELD.VState.Error
- }
- var d = new MSG.Info(FormatString(GetString("live.accounts.strings." + a), this.m_sCheckMembername), [this]);
- this.setMessage(c, d)
- }
- this.m_sLastMembername = this.m_sCheckMembername
- }
- this.setVState(b);
- this.resetCheckAvail()
- },
- evt_Image_onabort: function () {
- var a = new MSG.Info(GetString("live.accounts.strings.Error_6"), [self]);
- this.setMessage(MSG.Type.Failure, a);
- this.setVState(FIELD.VState.Error);
- this.resetCheckAvail()
- },
- resetCheckAvail: function () {
- this.enable();
- this.disableSpinner()
- }
- };
- Derive(FIELD.Base, FIELD.Membername);
- SignUp.MNSDownloading = false;
- SignUp.DisplayMNS = function () {
- if (!SignUp.IsWeb || SignUp.IsInline) return;
- if (SignUp.MNSDownloading || SignUp.Fields[FT.MN].getVState() == FIELD.VState.Done && SignUp.Membername() != "") return;
- if (SignUp.Fields[FT.MN].hasMessage(MSG.Type.Failure)) return;
- SignUp.Hide(["sugadv", "sugavail", "sugdont"]);
- SignUp.Show(["sugcont", "sugwait"]);
- if (SignUp.Membername() == "") {
- e();
- return
- }
- SignUp.MNSDownloading = true;
- var a = new Image(1, 1);
- GEId("tempimgcontainer").appendChild(a);
- a.onerror = b;
- a.onload = f;
- a.onabort = b;
- var g = SignUp.Membername().replace(/[^0-9A-Za-z]/g, "-"),
- i = SignUp.SitePath + "/mns.aspx?mnsname=" + g + "&mnsdomain=" + SignUp.Domain() + "&tk=" + (new Date).getTime() + "&" + SignUp.QS;
- a.src = i;
- var c = setTimeout(h, 3e4);
- function f() {
- d();
- var c = SignUp.CookieValue("MNS");
- SignUp.RemoveCookie("MNS");
- if (SignUp.MNSDownloading) if (!c) e();
- else {
- var f = "",
- g = c.split("~");
- for (var a = 0; a < g.length; a++) f += '<p><a href="#" onclick="SignUp.LoadMNS(this);return false;">' + g[a] + "</a></p>";
- SignUp.Hide(["sugwait", "sugadv"]);
- var h = GEId("mysugs");
- h.innerHTML = f;
- SignUp.Show(["mysugs", "sugavail", "sugdont"]);
- SignUp.AddIFrame(true);
- SignUp.FocusSet = {
- f: SignUp.Fields[FT.MN].getDomainDD()
- };
- SignUp.SetFocus()
- }
- b()
- }
- function e() {
- SignUp.Hide(["sugwait", "sugavail", "sugdont"]);
- SignUp.Show(["sugadv"]);
- SignUp.FocusSet = {
- f: SignUp.Fields[FT.MN].getDomainDD()
- };
- SignUp.SetFocus()
- }
- function h() {
- d();
- SignUp.HideMNS();
- b()
- }
- function b() {
- d();
- SignUp.MNSDownloading = false
- }
- function d() {
- a.onerror = a.onload = a.onabort = null;
- if (typeof c == "number") {
- clearTimeout(c);
- c = null
- }
- }
- };
- SignUp.HideMNS = function () {
- if (GEId("sugcont") != null) {
- SignUp.Hide(["sugcont", "sugerror"]);
- GEId("mysugs").innerHTML = "";
- SignUp.AddIFrame(false)
- }
- };
- SignUp.LoadMNS = function (e) {
- var a = e.innerHTML,
- b = a.split("@")[0],
- d = a.split("@")[1];
- SignUp.Fields[FT.MN].getLiveElement().value = b;
- SignUp.Fields[FT.MN].getDomainDD().value = d;
- SignUp.Fields[FT.MN].clearMessage(MSG.Type.Error);
- SignUp.Fields[FT.MN].setVState(FIELD.VState.Done);
- SignUp.Fields[FT.MN].clearMessage(MSG.Type.Failure);
- var c = new MSG.Info(FormatString(GetString("live.accounts.strings.error_1081"), a), [SignUp.Fields[FT.MN]]);
- SignUp.Fields[FT.MN].setMessage(MSG.Type.Success, c);
- GEId("isug1").value = GEId("isug2").value = GEId("isug3").value = "";
- SignUp.Fields[FT.MN].m_sLastMembername = a;
- SignUp.PickedMNSName = a;
- SignUp.HideMNS()
- };
- SignUp.MNSAdvDownloading = false;
- SignUp.MNSAdv = function () {
- if (SignUp.MNSAdvDownloading) return;
- SignUp.ValidateMNS();
- if (!SignUp.ValidMNS) return;
- SignUp.MNSAdvDownloading = true;
- SignUp.Hide(["sugerror"]);
- SignUp.Show(["sugwait"]);
- var a = new Image(1, 1);
- GEId("tempimgcontainer").appendChild(a);
- a.onerror = c;
- a.onload = i;
- a.onabort = c;
- var b = "";
- for (var f = 1; f <= 3; f++) {
- var h = GEId("isug" + f);
- if (SignUp.MNSTouched[h.id]) {
- if (b != "") b += "~";
- b += h.value
- }
- }
- if (b == "") {
- g();
- return
- }
- var j = SignUp.SitePath + "/mns.aspx?mnstokens=" + b + "&mnsdomain=" + SignUp.Domain() + "&tk=" + (new Date).getTime() + "&" + SignUp.QS;
- a.src = j;
- var d = setTimeout(g, 3e4);
- function i() {
- e();
- var b = SignUp.CookieValue("MNS");
- SignUp.RemoveCookie("MNS");
- if (SignUp.MNSAdvDownloading) {
- if (!b) SignUp.MNSTimeout();
- else {
- var d = "",
- f = b.split("~");
- for (var a = 0; a < f.length; a++) d += '<p><a href="#" onclick="SignUp.LoadMNS(this);return false;">' + f[a] + "</a></p>";
- SignUp.Hide(["sugwait"]);
- var g = GEId("mysugs");
- g.innerHTML = d;
- SignUp.Show(["mysugs", "sugavail"])
- }
- SignUp.AddIFrame(true)
- }
- c()
- }
- function g() {
- e();
- SignUp.MNSTimeout();
- SignUp.AddIFrame(true);
- c()
- }
- function c() {
- e();
- SignUp.MNSAdvDownloading = false;
- SignUp.ValidMNS = false
- }
- function e() {
- a.onerror = a.onload = a.onabort = null;
- if (typeof d == "number") {
- clearTimeout(d);
- d = null
- }
- }
- };
- SignUp.MNSTimeout = function () {
- SignUp.Hide(["sugwait"]);
- var a = GEId("sugerror");
- a.innerHTML = GetString("live.accounts.strings.error_1237");
- SignUp.Hide(["sugavail"]);
- SignUp.Show(["sugerror"])
- };
- SignUp.DisplayAdvMNS = function () {
- SignUp.Hide(["sugwait", "sugdont"]);
- SignUp.Show(["sugadv", "sugavail"]);
- SignUp.AddIFrame(true)
- };
- SignUp.MNSTouch = function (a) {
- if (typeof SignUp.MNSTouched == "undefined") SignUp.MNSTouched = {};
- if (!SignUp.MNSTouched[a.id]) {
- SignUp.MNSTouched[a.id] = true;
- a.value = "";
- a.className = "";
- a.maxLength = 20;
- a.focus();
- a.select()
- }
- };
- SignUp.ValidMNS = false;
- SignUp.ValidateMNS = function () {
- for (var b in SignUp.MNSTouched) {
- var a = GEId(b);
- a.value = Trim(a.value)
- }
- for (var b in SignUp.MNSTouched) if (!c(GEId(b))) break;
- SignUp.AddIFrame(true);
- function c(a) {
- if (a.value.length > 0 && !SignUp.RegExValMatch(a.value, "^[\\w\\.\\-]+$")) {
- var b = GEId("sugerror");
- b.innerHTML = GetString("live.accounts.strings.Error_1241");
- SignUp.Hide(["sugavail"]);
- SignUp.Show(["sugerror"]);
- SignUp.ValidMNS = false;
- return false
- } else {
- SignUp.Hide(["sugerror"]);
- GEId("sugerror").innerHTML = "";
- SignUp.ValidMNS = true;
- return true
- }
- }
- };
- SignUp.IFrame = null;
- SignUp.AddIFrame = function (b) {
- if (!SignUp.isIE()) return;
- if (b) if (SignUp.IFrame == null) {
- SignUp.IFrame = document.createElement("IFRAME");
- SignUp.IFrame.src = SignUp.RemoteSitePath + "/images/hig_progcircle_animated.gif";
- a();
- GEId("sugcont").appendChild(SignUp.IFrame)
- } else a();
- else if (SignUp.IFrame != null) {
- GEId("sugcont").removeChild(SignUp.IFrame);
- SignUp.IFrame = null
- }
- function a() {
- var a = GEId("sug");
- SignUp.IFrame.className = "sugiframe";
- SignUp.IFrame.style.height = a.clientHeight + 2 + "px";
- SignUp.IFrame.style.width = a.clientWidth + 3 + "px"
- }
- };
- AJAX.CheckAvailHandler = function (b, d, c, a) {
- AJAX.AJAXHandler.apply(this, [b, "POST", d, null, null, null, null, c, a]);
- this._isSuccess = AJAX.AJAXHandler.prototype.isSuccess
- };
- AJAX.CheckAvailHandler.prototype = {
- isSuccess: function () {
- if (this._isSuccess()) {
- var a = SignUp.CookieValue("CheckAvail");
- return a != "Error_6"
- }
- return false
- }
- };
- Derive(AJAX.AJAXHandler, AJAX.CheckAvailHandler);
- FIELD.Password = function () {
- FIELD.Base.apply(this, arguments);
- this.m_bannedCache = [];
- this.m_oBannedPwdHandler = null
- };
- FIELD.Password.prototype = {
- update: function () {
- this.runValidation()
- },
- updateForSubmit: function () {
- if (this.getVState() == FIELD.VState.Error) this.setVState(FIELD.VState.Pending);
- this.runValidation();
- if (this.getVState() == FIELD.VState.Running && exists(this.m_oBannedPwdHandler)) this.m_oBannedPwdHandler.disableRetry()
- },
- runValidation: function () {
- var d = this.getElement(),
- c = SignUp.Fields[FT.RPWD].getElement(),
- a = SignUp.Fields[FT.SQ].getElement(),
- b = SignUp.Fields[FT.SA].getElement(),
- f = SignUp.Fields[FT.FNAME].getElement(),
- g = SignUp.Fields[FT.LNAME].getElement();
- if (!SignUp.Changed(d)) return;
- var e = null;
- if (SignUp.Changed(c)) e = c.value;
- var h = a ? a[a.selectedIndex].value : null,
- i = b ? b.value : null;
- try {
- this.validate(d.value, e, h, i, f.value, g.value, SignUp.Membername());
- this.clearMessage(MSG.Type.Error);
- this.checkBanned();
- if (this.getVState() == FIELD.VState.Pending) this.setVState(FIELD.VState.Done)
- } catch (j) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(j))
- }
- },
- validate: function (a, b, f, c, d, e, g) {
- if (a != "" && a.length < 6) throw new SignUp.Error("Error_1007");
- if (a.length > 16) throw new SignUp.Error("Error_1010");
- if (a != "" && !SignUp.RegExValMatch(a, "^[\\x21-\\x7e]+$")) throw new SignUp.Error("Error_1008");
- if (f != null && SignUp.Contains(f, a, true)) throw new SignUp.Error("Error_1025");
- if (c != null && (SignUp.Contains(c, a, true) || SignUp.Contains(a, c, true))) throw new SignUp.Error("Error_1012");
- if (d.length > 2 && SignUp.Contains(a, d, true)) throw new SignUp.Error("Error_1243");
- if (e.length > 2 && SignUp.Contains(a, e, true)) throw new SignUp.Error("Error_1222");
- if (SignUp.Contains(a, g, true)) throw new SignUp.Error("Error_1088");
- if (exists(b)) if (a == "" || b == "") throw new SignUp.Error("Error_1005");
- else if (a != b) throw new SignUp.Error("Error_1006");
- if (exists(this.m_bannedCache[a])) if (this.m_bannedCache[a]) throw new SignUp.Error("Error_1217");
- },
- checkBanned: function () {
- if (SignUp.DisableBannedPwd) return;
- var b = this.getValue();
- if (this.getVState() != FIELD.VState.Pending) return;
- this.setVState(FIELD.VState.Running);
- this.setMessage(MSG.Type.Progress, new MSG.Info(null, [this]));
- var a = this,
- f = "command=bannedPwd&pwd=" + this.getValue();
- if (!exists(this.m_oBannedPwdHandler)) this.m_oBannedPwdHandler = new AJAX.BannedPwdHandler(SignUp.SitePath + "/query.aspx?" + SignUp.QS, true, SignUp.BannedPwdAJAXTimeout, SignUp.IsIWW ? 2 : 0);
- this.m_oBannedPwdHandler.sendRequest(f, e, d);
- function e(f) {
- var e = FIELD.VState.Pending,
- d = f.getResponseJSON();
- if (exists(d.Result)) if (d.Result == AJAX.BannedPwd.Banned) {
- a.m_bannedCache[b] = true;
- a.setMessage(MSG.Type.Error, a.getErrInfo(new SignUp.Error("Error_1217")))
- } else if (d.Result == AJAX.BannedPwd.NotBanned) {
- a.m_bannedCache[b] = false;
- e = FIELD.VState.Done
- }
- c(e)
- }
- function d() {
- c(FIELD.VState.Error)
- }
- function c(b) {
- a.setVState(b);
- a.enable();
- a.clearMessage(MSG.Type.Progress)
- }
- },
- evt_onkeyup: function (a) {
- SignUp.SetPasswordStrength();
- if (SignUp.CapsOn != null) {
- a = EVENT.get(a);
- if (EVENT.getKey(a) == EVENT.Key.Caps) if (!SignUp.CapsOn) this.setMessage(MSG.Type.Warning, new MSG.Info(null, [this]));
- else this.clearMessage(MSG.Type.Warning)
- }
- },
- evt_onkeypress: function (a) {
- a = EVENT.get(a);
- if (EVENT.isLowerCaseKey(a) && EVENT.isShiftDown(a) || EVENT.isUpperCaseKey(a) && !EVENT.isShiftDown(a)) {
- SignUp.CapsOn = true;
- this.setMessage(MSG.Type.Warning, new MSG.Info(null, [this]))
- } else if (EVENT.isLowerCaseKey(a) && !EVENT.isShiftDown(a) || EVENT.isUpperCaseKey(a) && EVENT.isShiftDown(a)) {
- SignUp.CapsOn = false;
- this.clearMessage(MSG.Type.Warning)
- }
- },
- evt_onblur: function () {
- if (this.getVState() == FIELD.VState.Running) this.disable();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.hideMessage(MSG.Type.Error, this);
- this.clearMessage(MSG.Type.Warning)
- },
- evt_onfocus: function () {
- if (SignUp.CapsOn) this.setMessage(MSG.Type.Warning, new MSG.Info(null, [this]));
- this.showHelp();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this);
- else if (SignUp.IsWeb) SignUp.SetPasswordStrength()
- },
- evt_onchange: function (a) {
- if (this.getVState() == FIELD.VState.Running && exists(this.m_oBannedPwdHandler)) this.m_oBannedPwdHandler.cancel();
- this.setVState(FIELD.VState.Pending);
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- }
- };
- Derive(FIELD.Base, FIELD.Password);
- FIELD.RetypePassword = function () {
- FIELD.Base.apply(this, arguments)
- };
- FIELD.RetypePassword.prototype = {
- evt_onkeyup: function (a) {
- if (SignUp.CapsOn != null) {
- a = EVENT.get(a);
- if (EVENT.getKey(a) == EVENT.Key.Caps) if (!SignUp.CapsOn) this.setMessage(MSG.Type.Warning, new MSG.Info(null, [this]));
- else this.clearMessage(MSG.Type.Warning)
- }
- },
- evt_onkeypress: function (a) {
- a = EVENT.get(a);
- if (EVENT.isLowerCaseKey(a) && EVENT.isShiftDown(a) || EVENT.isUpperCaseKey(a) && !EVENT.isShiftDown(a)) {
- SignUp.CapsOn = true;
- this.setMessage(MSG.Type.Warning, new MSG.Info(null, [this]))
- } else if (EVENT.isLowerCaseKey(a) && !EVENT.isShiftDown(a) || EVENT.isUpperCaseKey(a) && EVENT.isShiftDown(a)) {
- SignUp.CapsOn = false;
- this.clearMessage(MSG.Type.Warning)
- }
- },
- evt_onblur: function () {
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.hideMessage(MSG.Type.Error, this);
- this.clearMessage(MSG.Type.Warning)
- },
- evt_onfocus: function () {
- if (SignUp.CapsOn) this.setMessage(MSG.Type.Warning, new MSG.Info(null, [this]));
- this.showHelp();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this);
- else if (SignUp.IsWeb) SignUp.SetPasswordStrength()
- },
- evt_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- }
- };
- Derive(FIELD.Base, FIELD.RetypePassword);
- SignUp.evt_document_onkeyup = function (a) {
- if (SignUp.CapsOn != null) {
- a = EVENT.get(a);
- if (EVENT.getKey(a) == EVENT.Key.Caps) SignUp.CapsOn = !SignUp.CapsOn
- }
- };
- EVENT.add(document, EVENT.Name.OnKeyUp, SignUp.evt_document_onkeyup);
- SignUp.strgmtrLoading = false;
- SignUp.SetPasswordStrength = function () {
- var a = 0,
- c = GEId("iPwdMeter");
- if (!c) return;
- a = o(SignUp.Fields[FT.PWD].getValue());
- var i = " ",
- h = "";
- if (a >= 1 && a <= 3) {
- if (typeof SignUp.StrengthText == "undefined") {
- SignUp.StrengthText = [];
- SignUp.StrengthText.push(GetString("live.accounts.strings.PWDStrengthMeter_PasswordWeak"));
- SignUp.StrengthText.push(GetString("live.accounts.strings.PWDStrengthMeter_PasswordMedium"));
- SignUp.StrengthText.push(GetString("live.accounts.strings.PWDStrengthMeter_PasswordStrong"))
- }
- i = " " + SignUp.StrengthText[a - 1];
- h = "url(" + SignUp.RemoteSitePath + "/images/password_meter.png)"
- }
- c.style.width = 68 * a + "px";
- c.innerHTML = i;
- c.style.backgroundImage = h;
- if (typeof SignUp.Strength == "undefined") SignUp.Strength = {
- kNoCanonicalCounterpart: 0,
- kCapitalLetter: 0,
- kSmallLetter: 1,
- kDigit: 2,
- kPunctuation: 3,
- kAlpha: 4,
- kCanonicalizeLettersOnly: true,
- kCananicalizeEverything: false
- };
- function b(b, a) {
- this.type = b;
- this.fResult = a
- }
- function e(a, c) {
- var b = false;
- switch (c) {
- case SignUp.Strength.kCapitalLetter:
- if (a >= "A" && a <= "Z") b = true;
- break;
- case SignUp.Strength.kSmallLetter:
- if (a >= "a" && a <= "z") b = true;
- break;
- case SignUp.Strength.kDigit:
- if (a >= "0" && a <= "9") b = true;
- break;
- case SignUp.Strength.kPunctuation:
- if ("!@#$%^&*()_+-='\";:[{]}|.>,</?`~".indexOf(a) >= 0) b = true;
- break;
- case SignUp.Strength.kAlpha:
- if (e(a, SignUp.Strength.kCapitalLetter) || e(a, SignUp.Strength.kSmallLetter)) b = true
- }
- return b
- }
- function g(f, g, h) {
- var c = SignUp.Strength.kNoCanonicalCounterpart,
- a = "",
- d = 0;
- if (f != null && f.length > 0) {
- a = f;
- a = a.toLowerCase();
- if (g.GetCount() > 0) {
- d = a.length;
- for (var b = 0; b < d; b++) {
- if (h && !e(a.charAt(b), SignUp.Strength.kSmallLetter)) continue;
- c = g.Lookup(a.charAt(b));
- if (c != SignUp.Strength.kNoCanonicalCounterpart) a = a.substring(0, b) + c + a.substring(b + 1, d)
- }
- }
- }
- return a
- }
- function d(b, a) {
- if (b == null || isNaN(a)) return false;
- else if (b.length < a) return false;
- return true
- }
- function f(d, g) {
- var h = 0,
- a, c = [new b(SignUp.Strength.kCapitalLetter, false), new b(SignUp.Strength.kSmallLetter, false), new b(SignUp.Strength.kDigit, false), new b(SignUp.Strength.kPunctuation, false)];
- if (d == null || isNaN(g)) return false;
- for (var f = 0; f < d.length; f++) for (a = 0; a < c.length; a++) if (!c[a].fResult && e(d.charAt(f), c[a].type)) {
- c[a].fResult = true;
- break
- }
- for (a = 0; a < c.length; a++) if (c[a].fResult) h++;
- if (h < g) return false;
- return true
- }
- function p(d, b, c) {
- var a = "";
- if (d == null || b == null || c == null) return true;
- a = g(d, b, SignUp.Strength.kCanonicalizeLettersOnly);
- if (c.Lookup(a)) return true;
- return false
- }
- function k(i, h, e, f) {
- var a = "",
- b = 0;
- if (i == null || isNaN(h) || e == null || f == null) return true;
- a = g(i, e, SignUp.Strength.kCananicalizeEverything);
- b = Math.floor(h * a.length);
- for (var c = a.length; c >= b; c--) for (var d = 0; d + b < a.length; d++) {
- var j = a.substr(d, c);
- if (f.Lookup(j)) return true
- }
- return false
- }
- function j() {
- if (typeof SignUp.SM == "undefined") SignUp.SM = new SignUp.SimilarityMap;
- if (typeof SignUp.DT == "undefined") SignUp.DT = new SignUp.Dictionary;
- if (SignUp.SM.GetCount() == 0) {
- SignUp.SM.Add("3", "e");
- SignUp.SM.Add("x", "k");
- SignUp.SM.Add("5", "s");
- SignUp.SM.Add("$", "s");
- SignUp.SM.Add("6", "g");
- SignUp.SM.Add("7", "t");
- SignUp.SM.Add("8", "b");
- SignUp.SM.Add("|", "l");
- SignUp.SM.Add("9", "g");
- SignUp.SM.Add("+", "t");
- SignUp.SM.Add("@", "a");
- SignUp.SM.Add("0", "o");
- SignUp.SM.Add("1", "l");
- SignUp.SM.Add("2", "z");
- SignUp.SM.Add("!", "i")
- }
- try {
- if (!SignUp.strgmtrLoading) {
- SignUp.strgmtrLoading = true;
- var a = document.createElement("script");
- a.setAttribute("type", "text/javascript");
- a.setAttribute("src", SignUp.RemoteSitePath + "/js/strgmtr.js?sunx=" + SignUp.SUNX);
- document.getElementsByTagName("head")[0].appendChild(a)
- }
- } catch (b) {}
- }
- function m(a) {
- j();
- return d(a, "7") && f(a, "3") && !k(a, "0.6", SignUp.SM, SignUp.DT)
- }
- function l(a) {
- j();
- return d(a, "7") && f(a, "2") && !p(a, SignUp.SM, SignUp.DT)
- }
- function n(a) {
- return d(a, "6") || !d(a, "0")
- }
- function o(a) {
- try {
- if (m(a)) return 3;
- else if (l(a)) return 2;
- else if (n(a)) return 1
- } catch (b) {}
- return 0
- }
- };
- SignUp.SimilarityMap = function () {
- this.m_elements = "";
- this.m_canonicalCounterparts = ""
- };
- SignUp.SimilarityMap.prototype.Add = function (b, a) {
- this.m_elements += b;
- this.m_canonicalCounterparts += a
- };
- SignUp.SimilarityMap.prototype.Lookup = function (c) {
- var a = SignUp.Strength.kNoCanonicalCounterpart,
- b = this.m_elements.indexOf(c);
- if (b >= 0) a = this.m_canonicalCounterparts.charAt(b);
- return a
- };
- SignUp.SimilarityMap.prototype.GetCount = function () {
- return this.m_elements.length
- };
- SignUp.Dictionary = function () {
- this.m_entries = []
- };
- SignUp.Dictionary.prototype.Lookup = function (b) {
- for (var a = 0; a < this.m_entries.length; a++) if (this.m_entries[a].Lookup(b)) return true
- };
- SignUp.Dictionary.prototype.Add = function (b, a) {
- var d = this.m_entries.length,
- c = new SignUp.DictionaryEntry(b, a);
- this.m_entries[d] = c
- };
- SignUp.DictionaryEntry = function (b, a) {
- this.m_length = b;
- this.m_wordList = a
- };
- SignUp.DictionaryEntry.prototype.Lookup = function (b) {
- var e = false;
- if (b.length == this.m_length) {
- var c = 0,
- d = this.m_wordList.length - 1;
- while (c <= d) {
- var a = Math.floor((c + d) / 2);
- if (b == this.m_wordList[a]) {
- e = true;
- break
- } else if (b > this.m_wordList[a]) d = a - 1;
- else c = a + 1
- }
- }
- return e
- };
- var PWDR = {
- FT: {
- None: 0,
- Alt: 1,
- Phone: 2,
- SQSA: 4,
- All: 7
- },
- Update: function (b, c) {
- if (PWDR.State == b) return;
- var a = !c;
- if (exists(SignUp.Fields[FT.PHN]) && SignUp.Fields[FT.PHN].exists()) if (b & PWDR.FT.Phone) {
- if (!SignUp.Fields[FT.PHN].isDisplayed()) {
- SignUp.Fields[FT.PHN].display(a);
- a = false
- }
- } else if (SignUp.Fields[FT.PHN].isDisplayed()) SignUp.Fields[FT.PHN].remove();
- if (b & PWDR.FT.Alt) {
- if (!SignUp.Fields[FT.ALT].isDisplayed()) {
- SignUp.Fields[FT.ALT].display(a);
- a = false
- }
- } else if (SignUp.Fields[FT.ALT].isDisplayed()) SignUp.Fields[FT.ALT].remove();
- if (b & PWDR.FT.SQSA) {
- if (!SignUp.Fields[FT.SQ].isDisplayed()) {
- SignUp.Fields[FT.SQ].display(a);
- SignUp.Fields[FT.SA].display()
- }
- } else if (SignUp.Fields[FT.SQ].isDisplayed()) {
- SignUp.Fields[FT.SQ].remove();
- SignUp.Fields[FT.SA].remove()
- }
- PWDR.State = b
- }
- };
- if (SignUp.IsIWW) {
- PWDR.LiveState = SignUp.SMSEnabled ? PWDR.FT.All : PWDR.FT.Alt | PWDR.FT.SQSA;
- PWDR.EasiState = PWDR.LiveState
- } else {
- PWDR.LiveState = SignUp.SMSEnabled ? PWDR.FT.Alt | PWDR.FT.Phone : PWDR.FT.Alt;
- PWDR.EasiState = SignUp.SMSEnabled ? PWDR.FT.Phone : PWDR.FT.None
- }
- PWDR.State = SignUp.IsEASI ? PWDR.EasiState : PWDR.LiveState;
- FIELD.AltEmail = function () {
- FIELD.Base.apply(this, arguments);
- if (!(PWDR.State & PWDR.FT.Alt)) this.m_bDisplayed = false
- };
- FIELD.AltEmail.prototype = {
- isValidationNeeded: function () {
- var a = this.getElement();
- if (a == null || !this.isDisplayed() || !SignUp.Changed(a)) return false;
- return true
- },
- update: function () {
- if (this.isValidationNeeded()) try {
- this.validate(this.getElement().value, SignUp.Fields[FT.MN].getValue());
- this.clearMessage(MSG.Type.Error)
- } catch (a) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(a))
- }
- },
- validate: function (a, b) {
- if (a == "") throw new SignUp.Error("Error_1232");
- if (a.length > 113) throw new SignUp.Error("Error_1224");
- if (b != GetString("live.accounts.strings.PWRHIP_EmailExample") && strEquals(a, b, true)) throw new SignUp.Error("Error_1020");
- if (!SignUp.RegExValMatch(a, "^$|^(?:(?:(?![\\.]{2,}).)*)@(?:(?:(?![\\.]{2,}).)*)([\\.][a-zA-Z]{2,4})$") || !SignUp.RegExValMatch(a, "^$|^[^@]*[\\w][@][\\w][^@]*$")) throw new SignUp.Error("Error_1161");
- if (!SignUp.RegExValMatch(a, "^$|^[\\w\\-\\.\\@]{1,64}@[\\w\\-\\.]{1,48}$")) throw new SignUp.Error("Error_1224");
- if (!SignUp.RegExValMatch(a, "^$|^[\\w].+[\\w]$")) throw new SignUp.Error("Error_1161");
- },
- evt_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_onfocus: function () {
- this.showHelp();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this)
- },
- evt_onblur: function () {
- SignUp.MsgHandler.hideMessage(MSG.Type.Error, this)
- },
- evt_switch_onclick: function () {
- if (SignUp.SMSEnabled) PWDR.Update(PWDR.FT.SQSA | PWDR.FT.Phone);
- else PWDR.Update(PWDR.FT.SQSA);
- return false
- }
- };
- Derive(FIELD.Base, FIELD.AltEmail);
- FIELD.SecurityQuestion = function (c, b, a, d) {
- FIELD.Base.apply(this, [c, a, d]);
- this.m_errHolderId = b;
- if (!(PWDR.State & PWDR.FT.SQSA)) this.m_bDisplayed = false
- };
- FIELD.SecurityQuestion.prototype = {
- getValue: function () {
- var a = this.getElement(),
- b = a.options[a.selectedIndex].value;
- if (b != "0") return b;
- return null
- },
- clearValue: function () {
- var a = this.getElement();
- a.value = "0"
- },
- isValidationNeeded: function () {
- var a = this.getElement();
- if (a == null || !this.isDisplayed() || !SignUp.Changed(a)) return false;
- return true
- },
- update: function () {
- if (this.isValidationNeeded()) try {
- var a = this.getElement();
- this.validate(a.options[a.selectedIndex].value, SignUp.Fields[FT.PWD].getValue());
- this.clearMessage(MSG.Type.Error)
- } catch (b) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(b))
- }
- },
- validate: function (a, b) {
- if (a == "0") throw new SignUp.Error("Error_1026");
- else if (SignUp.Contains(a, b, true)) throw new SignUp.Error("Error_1025");
- },
- evt_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a));
- this.showHelp()
- },
- evt_onfocus: function () {
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this);
- this.showHelp()
- },
- evt_onblur: function () {
- SignUp.MsgHandler.hideMessage(MSG.Type.Error, this)
- },
- populate: function (d) {
- var a = GEId("SecretQuestionContainer");
- if (!exists(a)) return;
- DOM.clear(a);
- if (d.questions.length > 0) {
- if (!SignUp.IsInline) {
- var i = DOM.create("p", {
- id: this.m_errHolderId,
- className: "error"
- });
- i.style.display = "none";
- a.appendChild(i)
- }
- var h = DOM.create("label", {
- htmlFor: this.m_elementId
- });
- h.appendChild(DOM.text(GetString(SignUp.IsIWW ? "live.accounts.strings.IWW_Signup_FieldLabel_SQ" : "live.accounts.strings.FieldLabel_Question")));
- a.appendChild(h);
- if (!SignUp.IsWeb && !SignUp.IsInline) a.appendChild(DOM.create("br"));
- var e = DOM.create("div", {
- className: "value"
- });
- a.appendChild(e);
- var b = DOM.create("select", {
- id: this.m_elementId,
- name: this.m_elementId
- });
- EVENT.add(b, EVENT.Name.OnChange, this.evt_onchange, this);
- if (SignUp.IsWeb || SignUp.IsInline) EVENT.add(b, EVENT.Name.OnFocus, this.evt_onfocus, this);
- if (SignUp.CheckOOBE()) EVENT.add(b, EVENT.Name.OnBlur, this.evt_onblur, this);
- var c = DOM.create("option", {
- value: 0,
- selected: true,
- defaultSelected: true
- });
- c.innerHTML = GetString("live.accounts.strings.Label_Proofs_SelectPhoneNumber");
- b.appendChild(c);
- for (var f = 0; f < d.questions.length; f++) {
- c = DOM.create("option", {
- value: d.questions[f]
- });
- c.innerHTML = d.questions[f];
- b.appendChild(c)
- }
- e.appendChild(b);
- if (SignUp.CheckOOBE()) {
- var g = DOM.create("img", {
- className: "erroricon",
- id: this.m_errHolderId,
- alt: "",
- src: SignUp.InlineErrorIcon
- });
- g.style.display = "none";
- e.appendChild(g)
- }
- if (!SignUp.IsIWW) e.appendChild(DOM.create("br"))
- }
- SignUp.RemoveChanged(this.getElement())
- }
- };
- Derive(FIELD.Base, FIELD.SecurityQuestion);
- FIELD.SecretAnswer = function () {
- FIELD.Base.apply(this, arguments);
- if (!(PWDR.State & PWDR.FT.SQSA)) this.m_bDisplayed = false
- };
- FIELD.SecretAnswer.prototype = {
- isValidationNeeded: function () {
- var a = this.getElement();
- if (a == null || !this.isDisplayed() || !SignUp.Changed(a)) return false;
- return true
- },
- update: function () {
- if (this.isValidationNeeded()) try {
- this.validate(this.getValue(), SignUp.Fields[FT.SQ].getValue(), SignUp.Fields[FT.PWD].getValue(), SignUp.Membername());
- this.clearMessage(MSG.Type.Error)
- } catch (a) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(a))
- }
- },
- validate: function (a, c, b, d) {
- if (a == GetString("live.accounts.strings.General_SecretAnswerHelp")) a = "";
- if (a == "") throw new SignUp.Error("Error_1223");
- else if (a.length < SignUp.SecretAnswerMinLength) throw new SignUp.Error("Error_1029");
- else if (a.length > 32) throw new SignUp.Error("Error_1031");
- else if (SignUp.RegExValMatch(a, "[\\x24\\x22\\x3C\\x3E\\x28\\x29\\x3B\\x26\\x25\\x23\\x3A\\x5C\\x7B\\x7D]+")) throw new SignUp.Error("Error_1030");
- else if (SignUp.Fields[FT.SQ].getElement().value != "0" && (SignUp.Contains(c, a, true) || SignUp.Contains(a, c, true))) throw new SignUp.Error("Error_1023");
- else if (SignUp.Contains(b, a, true) || SignUp.Contains(a, b, true)) throw new SignUp.Error("Error_1012");
- else if (SignUp.Contains(a, d, true)) throw new SignUp.Error("Error_1027");
- },
- evt_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_onfocus: function (a) {
- this.showHelp();
- if (SignUp.CheckOOBE()) {
- SignUp.MsgHandler.showMessage(MSG.Type.Error, this);
- SignUp.HandleHintFocusOn(EVENT.getTarget(a), "General_SecretAnswerHelp", 32)
- }
- },
- evt_onblur: function (a) {
- SignUp.MsgHandler.hideMessage(MSG.Type.Error, this);
- SignUp.HandleHintFocusOff(EVENT.getTarget(a), "General_SecretAnswerHelp", 32)
- },
- evt_switch_onclick: function () {
- if (SignUp.SMSEnabled) PWDR.Update(PWDR.FT.Alt | PWDR.FT.Phone);
- else PWDR.Update(PWDR.FT.Alt);
- return false
- }
- };
- Derive(FIELD.Base, FIELD.SecretAnswer);
- FIELD.Phone = function (f, e, b, a, g, d, c) {
- FIELD.Base.apply(this, [f, null, g]);
- this.m_countryDDId = e;
- this.m_mobilePhoneHelpStringId = b;
- this.m_mobileEmailHelpStringId = a;
- this.m_mobilePhoneLabelId = d;
- this.m_mobileEmailLabelId = c;
- if (!(PWDR.State & PWDR.FT.Phone)) this.m_bDisplayed = false
- };
- FIELD.Phone.prototype = {
- initialize: function (c) {
- this.m_phoneControl = c;
- var b = this.getCountryDD();
- EVENT.add(b, EVENT.Name.OnFocus, this.evt_Phone_SMSCountry_onfocus, this);
- EVENT.add(b, EVENT.Name.OnChange, this.evt_Phone_SMSCountry_onchange, this);
- var a = this.getElement();
- EVENT.add(a, EVENT.Name.OnChange, this.evt_onchange, this);
- EVENT.add(a, EVENT.Name.OnFocus, this.evt_onfocus, this);
- EVENT.add(a, EVENT.Name.OnBlur, this.evt_onblur, this)
- },
- getValue: function () {
- return this.m_phoneControl.getPhoneNumber()
- },
- getCountryDD: function () {
- return GEId(this.m_countryDDId)
- },
- getCountryDDSelected: function () {
- return this.m_phoneControl.getCountryISO()
- },
- getMobilePhoneLabel: function () {
- return GEId(this.m_mobilePhoneLabelId)
- },
- getMobileEmailLabel: function () {
- return GEId(this.m_mobileEmailLabelId)
- },
- isValidationNeeded: function () {
- var a = this.getElement();
- if (a == null || !this.isDisplayed() || !SignUp.Changed(a)) return false;
- return true
- },
- update: function () {
- if (this.isValidationNeeded()) try {
- this.validate(this.getCountryDDSelected(), this.getValue());
- this.clearMessage(MSG.Type.Error)
- } catch (a) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(a))
- }
- },
- validate: function (b, a) {
- if (!this.m_phoneControl.validate(b, a)) throw new SignUp.Error(this.m_phoneControl.isMobileEmail() ? "Error_1252" : "Error_1208");
- },
- showHelp: function () {
- var a = this.m_phoneControl.isMobileEmail() ? this.m_mobileEmailHelpStringId : this.m_mobilePhoneHelpStringId;
- SignUp.MsgHandler.clearMessages(MSG.Type.Help);
- this.setMessage(MSG.Type.Help, new MSG.SignUp.Info.Help(a, [this]))
- },
- setFocus: function (b) {
- var a = this.getCountryDD();
- if (DOM.isElement(a)) {
- SignUp.FocusSet = {
- f: a,
- s: a
- };
- if (!b) SignUp.SetFocus()
- }
- },
- evt_Phone_SMSCountry_onfocus: function () {
- this.showHelp()
- },
- evt_Phone_SMSCountry_onchange: function () {
- this.clearMessage(MSG.Type.Error);
- SignUp.RemoveChanged(this.getElement().id);
- if (this.m_phoneControl.isMobileEmail()) {
- DOM.visible(this.getMobilePhoneLabel(), Visibility.Removed);
- DOM.visible(this.getMobileEmailLabel(), Visibility.Visible)
- } else {
- DOM.visible(this.getMobileEmailLabel(), Visibility.Removed);
- DOM.visible(this.getMobilePhoneLabel(), Visibility.Visible)
- }
- this.showHelp()
- },
- evt_onfocus: function () {
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this);
- this.showHelp()
- },
- evt_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_onblur: function (a) {
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.hideMessage(MSG.Type.Error, this);
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- }
- };
- Derive(FIELD.Base, FIELD.Phone);
- FIELD.FirstName = function () {
- FIELD.Base.apply(this, arguments)
- };
- FIELD.FirstName.prototype = {
- setValue: function (a) {
- if (isString(a)) {
- if (a.length > 40) a = a.substring(0, 39);
- this.getElement().value = a;
- SignUp.SetChanged(this.getElement().id)
- }
- },
- update: function () {
- var a = this.getElement();
- if (!SignUp.Changed(a)) return;
- try {
- this.validate(a.value);
- this.clearMessage(MSG.Type.Error)
- } catch (b) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(b))
- }
- },
- validate: function (a) {
- if (a == "") throw new SignUp.Error("Error_1229");
- else if (SignUp.RegExValMatch(a, "[\\x00-\\x1f]|[\\x21-\\x26]|[\\x28-\\x2c]|[\\x2f]|[\\x3a-\\x40]|[\\x5b-\\x5e]|[\\x7b-\\x7f]|[\\x81]|[\\xa0]|[\\xad]+")) throw new SignUp.Error("Error_1234");
- else if (SignUp.Contains(a, "www.", true) || SignUp.Contains(a, "http", true)) throw new SignUp.Error("Error_1236");
- else if (a.length > 2 && SignUp.Contains(SignUp.Fields[FT.PWD].getValue(), a, true)) throw new SignUp.Error("Error_1243");
- },
- evt_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_onfocus: function () {
- this.showHelp();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this)
- },
- evt_onblur: function () {
- SignUp.MsgHandler.hideMessage(MSG.Type.Error, this)
- }
- };
- Derive(FIELD.Base, FIELD.FirstName);
- FIELD.LastName = function () {
- FIELD.Base.apply(this, arguments)
- };
- FIELD.LastName.prototype = {
- setValue: function (a) {
- if (isString(a)) {
- if (a.length > 40) a = a.substring(0, 39);
- this.getElement().value = a;
- SignUp.SetChanged(this.getElement().id)
- }
- },
- update: function () {
- var a = this.getElement();
- if (!SignUp.Changed(a)) return;
- try {
- this.validate(a.value);
- this.clearMessage(MSG.Type.Error)
- } catch (b) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(b))
- }
- },
- validate: function (a) {
- if (a == "") throw new SignUp.Error("Error_1230");
- else if (SignUp.RegExValMatch(a, "[\\x00-\\x1f]|[\\x21-\\x26]|[\\x28-\\x2c]|[\\x2f]|[\\x3a-\\x40]|[\\x5b-\\x5e]|[\\x7b-\\x7f]|[\\x81]|[\\xa0]|[\\xad]+")) throw new SignUp.Error("Error_1235");
- else if (SignUp.Contains(a, "www.", true) || SignUp.Contains(a, "http", true)) throw new SignUp.Error("Error_1236");
- else if (a.length > 2 && SignUp.Contains(SignUp.Fields[FT.PWD].getValue(), a, true)) throw new SignUp.Error("Error_1222");
- },
- evt_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_onfocus: function () {
- this.showHelp();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this)
- },
- evt_onblur: function () {
- SignUp.MsgHandler.hideMessage(MSG.Type.Error, this)
- }
- };
- Derive(FIELD.Base, FIELD.LastName);
- FIELD.Gender = function (b, a) {
- FIELD.Base.apply(this, [b]);
- this.m_elementFemaleId = a
- };
- FIELD.Gender.prototype = {
- getElementMale: function () {
- return this.getElement()
- },
- getElementFemale: function () {
- return GEId(this.m_elementFemaleId)
- },
- getValue: function () {
- var b = this.getElementMale(),
- a = this.getElementFemale();
- if (b.checked) return b.value;
- else if (a.checked) return a.value;
- return null
- },
- setValue: function (a) {
- if (isString(a)) if (strEquals(a, "m", true)) {
- this.getElementMale().checked = true;
- SignUp.SetChanged(this.getElementMale().id)
- } else if (strEquals(a, "f", true)) {
- this.getElementFemale().checked = true;
- SignUp.SetChanged(this.getElementFemale().id)
- }
- },
- update: function () {
- var b = this.getElementMale(),
- a = this.getElementFemale();
- if (!(SignUp.Changed(b) || SignUp.Changed(a))) return;
- var c = this.getValue();
- try {
- this.validate(c);
- this.clearMessage(MSG.Type.Error)
- } catch (d) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(d))
- }
- },
- validate: function (a) {
- if (!exists(a) || a.toLowerCase() != "m" && a.toLowerCase() != "f") throw new SignUp.Error("Error_1226");
- },
- evt_onclick: function (a) {
- this.onValueChangeUser();
- SignUp.MsgHandler.clearMessages(MSG.Type.Help);
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_onfocus: function () {
- SignUp.MsgHandler.clearMessages(MSG.Type.Help)
- }
- };
- Derive(FIELD.Base, FIELD.Gender);
- FIELD.BirthDate = function (a, c, b) {
- FIELD.Base.apply(this, [a]);
- this.m_elementDayId = c;
- this.m_elementYearId = b
- };
- FIELD.BirthDate.prototype = {
- getMonthElement: function () {
- return this.getElement()
- },
- getDayElement: function () {
- return GEId(this.m_elementDayId)
- },
- getYearElement: function () {
- return GEId(this.m_elementYearId)
- },
- getValue: function () {
- var a = this.getMonthElement(),
- c = this.getDayElement(),
- b = this.getYearElement(),
- d = a[a.selectedIndex].value,
- f = c[c.selectedIndex].value,
- e = b[b.selectedIndex].value;
- return f + ":" + d + ":" + e
- },
- hasValue: function () {
- var a = this.getMonthElement(),
- c = this.getDayElement(),
- b = this.getYearElement();
- return exists(a) && a.value != "" && exists(c) && c.value != "" && exists(b) && b.value != ""
- },
- setValue: function (e, g, f) {
- var b = this.getMonthElement(),
- d = this.getDayElement(),
- c = this.getYearElement(),
- a = this.getIndexOf("month", e);
- if (a > -1) b.selectedIndex = a;
- a = this.getIndexOf("day", g);
- if (a > -1) d.selectedIndex = a;
- a = this.getIndexOf("year", f);
- if (a > -1) c.selectedIndex = a;
- SignUp.SetChanged(b.id);
- SignUp.SetChanged(d.id);
- SignUp.SetChanged(c.id)
- },
- getIndexOf: function (b, e) {
- var c = -1,
- d = b == "month" ? this.getMonthElement() : b == "day" ? this.getDayElement() : this.getYearElement();
- for (var a = 0; a < d.options.length; a++) if (strEquals(e, d.options[a].value, true)) {
- c = a;
- break
- }
- return c
- },
- populate: function (a, c, b) {
- this.populateDD("month", a);
- this.populateDD("day", c);
- this.populateDD("year", b)
- },
- populateDD: function (c, b) {
- var e = c == "month" ? this.getMonthElement() : c == "day" ? this.getDayElement() : this.getYearElement();
- for (var a = 0; a < b.Values.length; a++) {
- var d = new Option(b.Text[a], b.Values[a]);
- e.options[a] = d
- }
- },
- setFocus: function (d) {
- var e = this.getMonthElement(),
- c = this.getDayElement(),
- b = this.getYearElement(),
- a = e;
- if (c.className == "datepart0") a = c;
- else if (b.className == "datepart0") a = b;
- if (DOM.isElement(a)) {
- SignUp.FocusSet = {
- f: a,
- s: a
- };
- if (!d) SignUp.SetFocus()
- }
- },
- update: function (h) {
- var a = this.getMonthElement(),
- c = this.getDayElement(),
- b = this.getYearElement(),
- g = SignUp.Changed(a) ? a.value : null,
- f = SignUp.Changed(c) ? c.value : null,
- e = SignUp.Changed(b) ? b.value : null,
- d = h ? parseInt(SignUp.Countries[SignUp.Fields[FT.CTY].getValue()].childAge) : null;
- try {
- this.validate(g, f, e, d);
- if (this.hasMessage(MSG.Type.Error) && (!exists(g) || !exists(f) || !exists(e))) this.validate(a.value, c.value, b.value, d);
- this.clearMessage(MSG.Type.Error)
- } catch (i) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(i))
- }
- },
- validate: function (c, d, b, f) {
- if (c != null) this.validateInput("month", c);
- if (d != null) this.validateInput("day", d);
- if (b != null) this.validateInput("year", b);
- if (c != null && d != null && b != null) {
- var g = parseInt(c),
- i = parseInt(d),
- h = SignUp.Market.toLowerCase() == "th-th" ? parseInt(b) - 543 : parseInt(b),
- a = new Date(h, g - 1, i);
- if (!(i == a.getDate() && g - 1 == a.getMonth() && h == a.getFullYear())) throw new SignUp.Error("Error_1244");
- }
- if (f) {
- var e = new Date,
- a = new Date(parseInt(b), parseInt(c) - 1, parseInt(d)),
- j = e.getFullYear() - a.getFullYear() + parseFloat((e.getMonth() - a.getMonth()) / 12) + parseFloat((e.getDate() - a.getDate()) / 365);
- if (j < f) throw new SignUp.Error(SignUp.ErrorMap.KidsError, null, true, SignUp.WizardResult.Interrupt, SignUp.KidsErrorUrl);
- }
- },
- validateInput: function (b, a) {
- if (!a || a == 0) throw new SignUp.Error("Error_1249");
- var c = this.getIndexOf(b, a.toString());
- if (c == -1) throw new SignUp.Error("Error_1249");
- },
- evt_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_onfocus: function () {
- SignUp.MsgHandler.clearMessages(MSG.Type.Help);
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this)
- },
- evt_onblur: function () {
- SignUp.MsgHandler.hideMessage(MSG.Type.Error, this)
- }
- };
- Derive(FIELD.Base, FIELD.BirthDate);
- FIELD.Hip = function () {
- FIELD.Base.apply(this, arguments)
- };
- FIELD.Hip.prototype = {
- getValue: function () {
- return "dummy"
- },
- update: function () {
- var a = this.getElement();
- if (!this.isDisplayed() || !SignUp.Changed(a)) return;
- try {
- this.validate();
- this.clearMessage(MSG.Type.Error)
- } catch (b) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(b))
- }
- },
- validate: function () {
- if (!SignUp.HIPControl.clientValidate(!SignUp.IsInline)) {
- live.accounts.strings.error_hip = SignUp.HIPControl.getErrorString();
- throw new SignUp.Error("Error_Hip");
- }
- },
- evt_onfocus: function () {
- SignUp.MsgHandler.clearMessages(MSG.Type.Help);
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this)
- },
- evt_onchange: function (a) {
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- evt_RefreshHip_onclick: function () {
- SignUp.HIPControl.RefreshHIP();
- return false
- },
- evt_HipControl_onload: function () {
- if (SignUp.IsIWW) {
- var d = GEId(HIP.holder),
- c = d.getElementsByTagName("input"),
- a = null;
- for (var b = 0; b < c.length; b++) if (c[b].className == HIP.cssSet.cssCdHIPInput) {
- a = c[b];
- break
- }
- if (a) {
- this.m_elementId = a.id;
- GEId("hipimagelabel").htmlFor = a.id;
- GEId("hipaudiolabel").htmlFor = a.id;
- EVENT.add(a, EVENT.Name.OnFocus, this.evt_onfocus, this);
- EVENT.add(a, EVENT.Name.OnChange, this.evt_onchange, this)
- }
- }
- }
- };
- Derive(FIELD.Base, FIELD.Hip);
- FIELD.Country = function () {
- FIELD.Base.apply(this, arguments);
- this.m_oDownloadTimeout = null;
- this.m_iWaitTime = 0
- };
- FIELD.Country.prototype = {
- getValue: function () {
- if (this.hasValue()) return this.getSelectedOption().value;
- return SignUp.DefCountry
- },
- setValue: function (b) {
- var a = this.getIndexOf(b);
- if (a > -1) this.getElement().selectedIndex = a
- },
- hasValue: function () {
- try {
- if (exists(this.getSelectedOption().value)) return true
- } catch (a) {}
- return false
- },
- getSelectedOption: function () {
- return this.getElement()[this.getElement().selectedIndex]
- },
- getIndexOf: function (d) {
- var c = -1,
- b = this.getElement();
- for (var a = 0; a < b.options.length; a++) if (strEquals(d, b.options[a].value, true)) {
- c = a;
- break
- }
- return c
- },
- update: function () {
- if (this.getVState() == FIELD.VState.Error && typeof SignUp.RegionData != "undefined") this.loadExtendedData()
- },
- validate: function (a) {
- if (!exists(SignUp.Countries[a.toUpperCase()])) throw new SignUp.Error("Invalid_ISO");
- },
- showHelp: function () {
- SignUp.MsgHandler.clearMessages(MSG.Type.Help);
- if (SignUp.Countries[this.getValue()].showPrivacy) this.setMessage(MSG.Type.Help, new MSG.SignUp.Info.Help(this.m_helpStringId, [this]))
- },
- evt_Country_onfocus: function () {
- this.showHelp()
- },
- evt_Country_onchange: function () {
- this.onValueChangeUser();
- this.showHelp();
- this.updatePostal()
- },
- evt_Country_onkeyup: function () {
- this.showHelp();
- this.updatePostal()
- },
- populate: function () {
- var b = GEId("CountryRegionContainer"),
- f = DOM.create("label", {
- htmlFor: this.m_elementId
- });
- if (SignUp.IsIWW) f.appendChild(DOM.text(GetString("live.accounts.strings.IWW_Signup_FieldLabel_Country")));
- else f.appendChild(DOM.text(GetString("live.accounts.strings.FieldLabel_CountryRegion")));
- b.appendChild(f);
- if (!SignUp.IsWeb && !SignUp.IsInline) b.appendChild(DOM.create("br"));
- var d = DOM.create("div", {
- className: "value"
- });
- b.appendChild(d);
- var a = DOM.create("select", {
- id: this.m_elementId,
- name: this.m_elementId
- });
- EVENT.add(a, EVENT.Name.OnFocus, this.evt_Country_onfocus, this);
- EVENT.add(a, EVENT.Name.OnChange, this.evt_Country_onchange, this);
- EVENT.add(a, EVENT.Name.OnKeyUp, this.evt_Country_onkeyup, this);
- for (var e in SignUp.Countries) {
- var h = SignUp.DefCountry == e,
- g = DOM.create("option", {
- value: e,
- selected: h,
- defaultSelected: h
- });
- g.innerHTML = SignUp.Countries[e].name;
- a.appendChild(g)
- }
- d.appendChild(a);
- d.appendChild(DOM.create("br"));
- var c = DOM.create("div", {
- className: "helppop",
- id: "ctryhelp_pop"
- });
- c.style.display = "none";
- var i = DOM.create("div", {
- id: "ctryhelp",
- className: "helpctr"
- });
- c.appendChild(i);
- b.appendChild(c);
- this.updatePostal();
- this.updateQuestions()
- },
- updateQuestions: function () {
- SignUp.Fields[FT.SQ].populate(SignUp.Countries[this.getValue()])
- },
- updatePostal: function () {
- var a = this.getValue();
- if (a != SignUp.Fields[FT.ZIP].countryISO) if (a.toUpperCase() != SignUp.DefCountry.toUpperCase() && this.getVState() == FIELD.VState.Pending) {
- this.setVState(FIELD.VState.Running);
- this.disable();
- this.setMessage(MSG.Type.Progress, new MSG.Info(null, [this]));
- var b = DOM.create("script", {
- type: "text/javascript",
- src: SignUp.SitePath + "/regiondata.aspx?sunx=" + SignUp.SUNX + "&mktcache=" + SignUp.Market + "&" + SignUp.QS
- });
- document.getElementsByTagName("head")[0].appendChild(b);
- this.waitForExtendedData()
- } else {
- SignUp.Fields[FT.ZIP].populate(SignUp.Countries[a]);
- this.processIPData();
- SignUp.Fields[FT.EOI].refresh()
- }
- },
- waitForExtendedData: function () {
- var a = this;
- if (typeof this.m_oDownloadTimeout != "undefined") clearTimeout(a.m_oDownloadTimeout);
- if (typeof SignUp.RegionData != "undefined") DoTestDelay(function () {
- a.loadExtendedData()
- });
- else {
- a.m_iWaitTime += 100;
- if (a.m_iWaitTime < 3e4) a.m_oDownloadTimeout = setTimeout(function () {
- a.waitForExtendedData.call(a)
- }, 100);
- else {
- a.setVState(FIELD.VState.Error);
- a.clearMessage(MSG.Type.Progress);
- a.setValue(SignUp.DefCountry.toUpperCase());
- if (this.hasMessage(MSG.Type.Help)) this.showHelp()
- }
- }
- },
- loadExtendedData: function () {
- this.setVState(FIELD.VState.Done);
- this.enable();
- this.clearMessage(MSG.Type.Progress);
- SignUp.ParseExtendedData(SignUp.Countries, SignUp.RegionData);
- SignUp.Fields[FT.ZIP].populate(SignUp.Countries[this.getValue()]);
- this.processIPData();
- SignUp.Fields[FT.EOI].refresh()
- },
- processIPData: function () {
- if (this.getValue().toUpperCase() == SignUp.Location.country.toUpperCase() && (SignUp.Location.postal.toLowerCase() != "nodata" && SignUp.Fields[FT.ZIP].isValid(SignUp.Location.postal.toLowerCase()))) {
- this.ipDataUsed = true;
- if (SignUp.Fields[FT.ZIP].displayed && SignUp.Location.postal.toLowerCase() != "nodata" && SignUp.Fields[FT.ZIP].isValid(SignUp.Location.postal.toLowerCase())) SignUp.Fields[FT.ZIP].getElement().value = SignUp.Location.postal;
- SignUp.Fields[FT.ZIP].hide()
- } else this.ipDataUsed = false
- }
- };
- Derive(FIELD.Base, FIELD.Country);
- FIELD.ZipCode = function (c, b, a) {
- FIELD.Base.apply(this, [c, a]);
- this.displayed = false;
- this.countryISO = "";
- this.m_errHolderId = b
- };
- FIELD.ZipCode.prototype = {
- getValue: function () {
- var a = this.getElement();
- if (exists(a) && SignUp.Fields[FT.CTY].getVState() != FIELD.VState.Running) return a.value;
- return null
- },
- update: function () {
- var a = this.getElement();
- if (!a || SignUp.Fields[FT.CTY].getVState() == FIELD.VState.Running) {
- this.clearMessage(MSG.Type.Error);
- return
- }
- if (!SignUp.Changed(a)) return;
- try {
- this.validate(a.value, SignUp.Fields[FT.CTY].getValue());
- this.clearMessage(MSG.Type.Error)
- } catch (b) {
- this.setMessage(MSG.Type.Error, this.getErrInfo(b))
- }
- },
- validate: function (a, b) {
- if (a == "") throw new SignUp.Error("Error_1227");
- else if (SignUp.RegExValMatch(a, "[\\x26\\x3C]+")) throw new SignUp.Error("Error_1233");
- else if (exists(SignUp.Countries[b]) && !SignUp.RegExValMatch(a, SignUp.Countries[b].postalRegex)) throw new SignUp.Error("Error_1233");
- },
- isValid: function (a) {
- try {
- this.validate(a, SignUp.Fields[FT.CTY].getValue());
- return true
- } catch (b) {
- return false
- }
- },
- showHelp: function () {
- SignUp.MsgHandler.clearMessages(MSG.Type.Help);
- if (SignUp.Countries[SignUp.Fields[FT.CTY].getValue()].showPrivacy) this.setMessage(MSG.Type.Help, new MSG.SignUp.Info.Help(this.m_helpStringId, [this]))
- },
- evt_Postal_onfocus: function () {
- this.showHelp();
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.showMessage(MSG.Type.Error, this)
- },
- evt_Postal_onblur: function () {
- if (SignUp.CheckOOBE()) SignUp.MsgHandler.hideMessage(MSG.Type.Error, this)
- },
- evt_Postal_onchange: function (a) {
- this.onValueChangeUser();
- SignUp.ValidateField(EVENT.getTarget(a))
- },
- populate: function (d) {
- this.countryISO = d.iso;
- var f = GEId("PostalContainer");
- DOM.clear(f);
- var b = f;
- if (d.postalLabel) {
- if (SignUp.IsIWW) {
- var g = DOM.create("div", {
- className: "helppop"
- }),
- c = DOM.create("p", {
- id: this.m_errHolderId,
- className: "error"
- });
- c.style.display = "none";
- g.appendChild(c);
- b.appendChild(g)
- } else if (!SignUp.IsInline) {
- var c = DOM.create("p", {
- id: this.m_errHolderId,
- className: "error"
- });
- c.style.display = "none";
- b.appendChild(c)
- }
- var i = DOM.create("label", {
- htmlFor: this.m_elementId
- });
- i.appendChild(DOM.text(d.postalLabel + (SignUp.IsIWW ? "" : GetString("live.accounts.strings.Profile_Separator"))));
- b.appendChild(i);
- var e = DOM.create("div", {
- className: "value"
- });
- b.appendChild(e);
- var a = DOM.create("input", {
- type: "text",
- id: this.m_elementId,
- name: this.m_elementId,
- maxlength: 15,
- value: ""
- });
- EVENT.add(a, EVENT.Name.OnFocus, this.evt_Postal_onfocus, this);
- EVENT.add(a, EVENT.Name.OnChange, this.evt_Postal_onchange, this);
- if (SignUp.IsInline) EVENT.add(a, EVENT.Name.OnBlur, this.evt_Postal_onblur, this);
- e.appendChild(a);
- if (SignUp.CheckOOBE()) {
- var h = DOM.create("img", {
- id: this.m_errHolderId,
- className: "erroricon",
- alt: "",
- src: SignUp.InlineErrorIcon
- });
- h.style.display = "none";
- e.appendChild(h)
- }
- this.show()
- } else this.hide();
- this.clearMessage(MSG.Type.Error);
- SignUp.RemoveChanged(this.getElement())
- },
- hide: function () {
- GEId("PostalContainer").style.display = "none";
- this.displayed = false
- },
- show: function () {
- GEId("PostalContainer").style.display = "block";
- this.displayed = true
- }
- };
- Derive(FIELD.Base, FIELD.ZipCode);
- STATE.EOI = {
- ClassA: "A",
- ClassB: "B",
- ClassC: "C"
- };
- FIELD.EmailOptIn = function (c, b, a) {
- FIELD.Base.apply(this, [c]);
- this.m_eState = STATE.EOI.ClassC;
- this.m_elementContainerId = b;
- this.m_elementAgreementId = a
- };
- FIELD.EmailOptIn.prototype = {
- getValue: function () {
- return this.getElement().checked ? "1" : "0"
- },
- setValue: function (a) {
- this.getElement().checked = a.toLowerCase() == "true"
- },
- refresh: function () {
- this.updateState();
- this.updateUI()
- },
- updateState: function () {
- var a = SignUp.Fields[FT.CTY].getValue();
- this.m_eState = SignUp.Countries[a].optInClass || ""
- },
- updateUI: function () {
- switch (this.m_eState) {
- case STATE.EOI.ClassA:
- case STATE.EOI.ClassB:
- GEId(this.m_elementContainerId).style.display = "block";
- GEId(this.m_elementAgreementId).style.display = "none";
- this.getElement().checked = this.m_eState == STATE.EOI.ClassB;
- break;
- default:
- GEId(this.m_elementContainerId).style.display = "none";
- this.getElement().checked = true;
- GEId(this.m_elementAgreementId).style.display = "inline"
- }
- }
- };
- Derive(FIELD.Base, FIELD.EmailOptIn);
- SignUp.ParseCountryData = function (c) {
- var b = {};
- for (var a in c) b[a] = new SignUp.CountryInfo(a, c[a]);
- return b
- };
- SignUp.ParseExtendedData = function (c, b) {
- for (var a in b) c[a].loadExtendedData(b[a])
- };
- SignUp.CountryInfo = function (b, a) {
- this.iso = b;
- this.name = exists(a.nm) ? a.nm : "";
- this.showPrivacy = exists(a.eu) ? a.eu == "1" : false;
- this.optInClass = exists(a.eoi) ? a.eoi : STATE.EOI.ClassC;
- this.postalRegex = exists(a.pcr) ? a.pcr : "";
- this.postalLabel = "";
- this.questions = [];
- this.childAge = exists(a.chld) ? a.chld : "0";
- if (exists(a.data)) this.loadExtendedData(a.data);
- this.regionDataLoaded = false
- };
- SignUp.CountryInfo.prototype = {
- loadExtendedData: function (a) {
- this.postalLabel = exists(a.pl) ? a.pl : this.postalLabel;
- this.questions = exists(a.ql) ? a.ql : this.questions;
- this.regionDataLoaded = true
- }
- };
- SignUp.LaunchHelp = function (c) {
- var b = screen.availWidth > 1050 ? 1050 : screen.availWidth,
- f = screen.availHeight,
- g = screen.availWidth > 1050 ? screen.availWidth - b : 0,
- e = "resizable=1,top=" + 0 + ", width=" + b + ", height=" + f + ", left=" + g + ", scrollbars=1, menubar=1",
- d = navigator.userAgent.toLowerCase();
- if (d.indexOf("msn ") > -1 || d.indexOf("msmoney") > -1) window.external.showHelpPane(c, b);
- else {
- var a;
- a = window.open(c, "_new", e);
- if (a != null && typeof a == "object") a.focus()
- }
- };
- SignUp.CreateDownloading = false;
- SignUp.DoPost = function (h, a) {
- SignUp.AllChanged = true;
- SignUp.ValidateForm(true);
- if (!c()) return;
- var b = [SignUp.Fields[FT.MN]];
- if (SignUp.IsIWW) b.push(SignUp.Fields[FT.PWD], SignUp.Fields[FT.CTY]);
- if (SignUp.IsIWW) SignUp.ShowPageProgress();
- SignUp.WaitForAsync(b, f);
- function c() {
- if (SignUp.HaveErrors()) {
- if (SignUp.IsInline) SignUp.ShowFirstErrorPane();
- if (!SignUp.IsInline || SignUp.IsIWW) SignUp.SetFocus();
- return false
- }
- return true
- }
- function f() {
- if (!c()) {
- if (SignUp.IsIWW) SignUp.HidePageProgress();
- return
- }
- if (SignUp.Fields[FT.HIP].isDisplayed()) SignUp.HIPControl.validate(d);
- else d()
- }
- function d() {
- if (SignUp.Fields[FT.MN].getVState() == FIELD.VState.Running) {
- if (SignUp.IsIWW) SignUp.HidePageProgress();
- return
- }
- SignUp.FieldsChanged = {};
- SignUp.CreateDownloading = true;
- SignUp.Hide(["createbuttons"]);
- SignUp.Show(["creatingacct"]);
- var b = new Image(1, 1);
- GEId("tempimgcontainer").appendChild(b);
- b.onerror = i;
- b.onload = k;
- b.onabort = i;
- var f = SignUp.SitePath + "/create.aspx?" + SignUp.QS + "&sutk=" + (new Date).getTime();
- if (SignUp.IsInline) {
- f += "&inline=1";
- var h = GEId("iAddDevice");
- if (h) f += "&associateDevice=" + (h.checked ? "true" : "false")
- }
- e();
- b.src = f;
- var c = setTimeout(l, 6e4);
- function k() {
- DoTestDelay(j)
- }
- function j() {
- d();
- var f = SignUp.CookieValue("signupdata");
- SignUp.RemoveCookie("signupdata");
- if (f) {
- var b = f.split("~"),
- c = b[0].toLowerCase();
- if (c == "loginurl") try {
- var j = b[2].toLowerCase();
- if (typeof SignUp.AtlasCreate != "undefined" && typeof SignUp.AtlasCreateEasi != "undefined") {
- var h = new Image(1, 1);
- GEId("tempimgcontainer").appendChild(h);
- if (j == "noteasi") h.src = b[3] == "1" ? SignUp.AtlasCreate : SignUp.AtlasCreateEasi
- }
- if (a) window.setTimeout(a, 1e3);
- else window.setTimeout(function () {
- $BSI.navigateTo(unescape(b[1]))
- }, 1e3)
- } catch (k) {
- if (a) a();
- else $BSI.navigateTo(unescape(b[1]))
- } else if (c == "error") {
- var i = unescape(b[1]).split("::");
- for (var e = 0; e < i.length; e++) if (!SignUp.HandleServerError(i[e])) continue;
- SignUp.Fields[FT.MN].clearMessage(MSG.Type.Failure);
- SignUp.Fields[FT.MN].clearMessage(MSG.Type.Success);
- SignUp.Fields[FT.HIP].display();
- if (HIP && HIP.done) HIP.reloadHIP(HIP.error);
- if (SignUp.IsInline) SignUp.ShowFirstErrorPane();
- g()
- } else if (c == "errorredirect") if (b[5]) ER(unescape(b[1]), unescape(b[2]), unescape(b[3]), unescape(b[4]), unescape(b[5]));
- else ER(unescape(b[1]), unescape(b[2]), unescape(b[3]), unescape(b[4]))
- } else {
- g();
- ER("100", "460INVC", SignUp.WizardResult.GenericError, GetString("live.accounts.strings.Inline_GenericError"))
- }
- }
- function l() {
- d();
- ER("100", "325TO", SignUp.WizardResult.GenericError, GetString("live.accounts.strings.Inline_GenericError"))
- }
- function i() {
- g();
- if (SignUp.IsIWW) ER("100", "325ERR", SignUp.WizardResult.GenericError, GetString("live.accounts.strings.Inline_GenericError"))
- }
- function g() {
- d();
- if (SignUp.IsIWW) SignUp.HidePageProgress();
- SignUp.CreateDownloading = false;
- SignUp.Hide(["creatingacct"]);
- SignUp.Show(["createbuttons"]);
- SignUp.SetFocus()
- }
- function d() {
- b.onerror = b.onload = b.onabort = null;
- if (typeof c == "number") {
- clearTimeout(c);
- c = null
- }
- }
- }
- function e() {
- var a = "{~~$$}",
- b = SignUp.Fields[FT.MN].getValue() + a;
- if (SignUp.Fields[FT.ALT].isDisplayed() && !strEquals(SignUp.Fields[FT.MN].getValue(), SignUp.Fields[FT.ALT].getValue(), true)) b += SignUp.Fields[FT.ALT].getValue() + a;
- else b += a;
- if (SignUp.Fields[FT.SA].isDisplayed() && SignUp.Fields[FT.SQ].isDisplayed() && SignUp.Fields[FT.SA].hasValue() && SignUp.Fields[FT.SQ].hasValue()) b += SignUp.Fields[FT.SQ].getValue() + a + (new SignUp.Encrypt).EncryptData(SignUp.Fields[FT.PWD].getValue(), SignUp.Fields[FT.SA].getValue(), "pwdsa") + a;
- else b += a + (new SignUp.Encrypt).EncryptData(SignUp.Fields[FT.PWD].getValue(), null, "pwd") + a;
- b += SKI + a;
- if (SignUp.Fields[FT.HIP].isDisplayed()) {
- var c = SignUp.HIPControl.getSolutionDetails();
- b += c.userSol + a;
- b += c.challenge + a;
- b += c.flowId + a
- } else b += a + a + a;
- b += SignUp.Fields[FT.CTY].getValue() + a;
- b += valOrEmpty(SignUp.Fields[FT.ZIP].getValue()) + a;
- b += SignUp.Fields[FT.BD].getValue() + a;
- b += SignUp.Fields[FT.GNDR].getValue() + a;
- b += SignUp.Fields[FT.FNAME].getValue() + a;
- b += SignUp.Fields[FT.LNAME].getValue() + a;
- var d = "d";
- try {
- d = g()
- } catch (e) {}
- b += d + a;
- b += (SignUp.Fields[FT.MN].getState() == STATE.MN.EASI ? "1" : "0") + a;
- b += SignUp.Fields[FT.EOI].getValue() + a;
- b += (SignUp.Fields[FT.MN].getValue() == SignUp.PickedMNSName ? "1" : "0") + a;
- if (exists(SignUp.Fields[FT.PHN]) && SignUp.Fields[FT.PHN].isDisplayed() && SignUp.Fields[FT.PHN].hasValue()) {
- b += SignUp.Fields[FT.PHN].getCountryDDSelected() + a;
- b += SignUp.Fields[FT.PHN].getValue() + a
- } else b += a + a;
- SignUp.AddCookie("signupdata", b)
- }
- function g() {
- var a = new Date("1/1/" + (new Date).getUTCFullYear()),
- b = 1e4;
- for (var d = 1; d <= 12; d++) {
- var c = -1 * a.getTimezoneOffset();
- if (b > c) b = c;
- a.setUTCMonth(a.getUTCMonth() + 1)
- }
- return b
- }
- };
- SignUp.GoBack = function () {
- window.location = SignUp.RX
- };
- MSG.Web = {};
- MSG.Web.Error = function (a) {
- MSG.SignUp.Error.apply(this, [a, a])
- };
- MSG.Web.Error.prototype = {};
- Derive(MSG.SignUp.Error, MSG.Web.Error);
- MSG.Web.HipError = function () {
- MSG.Web.Error.apply(this, [MSG.Type.Error])
- };
- MSG.Web.HipError.prototype = {
- show: function () {},
- hide: function () {
- if (SignUp.HIPControl.hipLoaded) SignUp.HIPControl.setError(SignUp.HIPControl.ErrorEnum().None)
- }
- };
- Derive(MSG.Web.Error, MSG.Web.HipError);
- MSG.Web.PwdStrengthHelp = function (b, a) {
- MSG.SignUp.Help.apply(this, [b, a])
- };
- MSG.Web.PwdStrengthHelp.prototype = {
- insertText: function (a) {
- if (exists(this.data.text)) a.innerHTML = '<div id="StrengthMeter"><div id="iPwdMeter"></div></div><p>' + this.data.text + "</p>"
- }
- };
- Derive(MSG.SignUp.Help, MSG.Web.PwdStrengthHelp);
- MSG.Web.EUCountryHelp = function (b, a) {
- MSG.SignUp.Help.apply(this, [b, a])
- };
- MSG.Web.EUCountryHelp.prototype = {
- insertText: function (a) {
- if (exists(this.data.text)) a.innerHTML = SignUp.PaneHelpLink("ycavirpue", this.data.text)
- }
- };
- Derive(MSG.SignUp.Help, MSG.Web.EUCountryHelp);
- MSG.Web.Handler = function () {
- MSG.Base.Handler.apply(this)
- };
- MSG.Web.Handler.prototype = {
- getMessagePriority: function (c) {
- for (var a = 0; a < SignUp.FieldsOnPage.length; a++) for (var b = 0; b < SignUp.FieldsOnPage[a].length; b++) if (c.id == SignUp.FieldsOnPage[a][b]) return a * 1e3 + b;
- return -1
- },
- showHelpMessage: function (c) {
- var a = MSG.Type.Help,
- b = this.currMessage[a];
- if (exists(b)) b.fHideCallback(a, MSG.Part.All);
- c.fShowCallback(a, MSG.Part.All);
- this.currMessage[a] = c
- },
- hideHelpMessage: function (c) {
- var a = MSG.Type.Help,
- b = this.currMessage[a];
- c.fHideCallback(a, MSG.Part.All);
- if (exists(b) && b == c) delete this.currMessage[a]
- },
- showWarningMessage: function () {
- var a = MSG.Type.Warning,
- c = this.currMessage[a],
- b = this.messages[a][0];
- if (exists(c)) {
- if (c != b) {
- c.fHideCallback(a, MSG.Part.All);
- b.fShowCallback(a, MSG.Part.All);
- this.currMessage[a] = b
- }
- } else {
- b.fShowCallback(a, MSG.Part.All);
- this.currMessage[a] = b
- }
- },
- hideWarningMessage: function (d) {
- var a = MSG.Type.Warning,
- c = this.currMessage[a],
- b = this.messages[a][0];
- d.fHideCallback(a, MSG.Part.All);
- if (exists(c)) if (c == d) {
- if (exists(b)) b.fShowCallback(a, MSG.Part.All);
- this.currMessage[a] = b
- }
- }
- };
- Derive(MSG.Base.Handler, MSG.Web.Handler);
- SignUp.MsgHandler = new MSG.Web.Handler;
- FIELD.Web = {};
- FIELD.Web.Country = function () {
- FIELD.Country.apply(this, ["iCountry", "EditProfile_MapLinkText_EUPrivacyLink"]);
- this.m_arrMessages[MSG.Type.Help] = new MSG.Web.EUCountryHelp("ctryhelp_pop", "ctryhelp")
- };
- Derive(FIELD.Country, FIELD.Web.Country);
- SignUp.Fields[FT.CTY] = new FIELD.Web.Country;
- FIELD.Web.ZipCode = function () {
- FIELD.ZipCode.apply(this, ["iZipCode", "iZipCodeError", "EditProfile_MapLinkText_EUPrivacyLink"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iZipCodeError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.Web.EUCountryHelp("ctryhelp_pop", "ctryhelp")
- };
- Derive(FIELD.ZipCode, FIELD.Web.ZipCode);
- SignUp.Fields[FT.ZIP] = new FIELD.Web.ZipCode;
- FIELD.Web.EmailOptIn = function () {
- FIELD.EmailOptIn.apply(this, ["iOptinEmail", "iOptinEmailContainer", "iOptinEmailAgreement"])
- };
- Derive(FIELD.EmailOptIn, FIELD.Web.EmailOptIn);
- SignUp.Fields[FT.EOI] = new FIELD.Web.EmailOptIn;
- FIELD.Web.Hip = function () {
- FIELD.Hip.apply(this, ["iHipHolder"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.HipError
- };
- Derive(FIELD.Hip, FIELD.Web.Hip);
- SignUp.Fields[FT.HIP] = new FIELD.Web.Hip;
- FIELD.Web.Membername = function () {
- FIELD.Membername.apply(this);
- var a = {
- element: "imembernameeasi",
- checkavail: "ichkavailbutton",
- domain: "idomain",
- helpString: "Help_EasiName",
- altHelpString: "Help_EasiOption"
- }, b = {
- element: "imembernamelive",
- checkavail: "ichkavailbutton",
- domain: "idomain",
- helpString: "Help_Membername",
- altHelpString: "Help_WLIDOption"
- };
- this.m_arrStateIDs[STATE.MN.EASI] = a;
- this.m_arrStateIDs[STATE.MN.Live] = b;
- this.m_arrStateMessages[STATE.MN.EASI] = [];
- this.m_arrStateMessages[STATE.MN.EASI][MSG.Type.Error] = new MSG.Web.Error("iMembernameEasiError");
- this.m_arrStateMessages[STATE.MN.EASI][MSG.Type.Success] = new MSG.SignUp.Success("iEasiMessage");
- this.m_arrStateMessages[STATE.MN.EASI][MSG.Type.Failure] = new MSG.SignUp.Failure("iEasiMessageError");
- this.m_arrStateMessages[STATE.MN.EASI][MSG.Type.Help] = new MSG.SignUp.Help("membernameeasihelp_pop", "membernameeasihelp");
- this.m_arrStateMessages[STATE.MN.EASI][MSG.Type.Progress] = new MSG.SignUp.Progress("chkavailwkeasi");
- this.m_arrStateMessages[STATE.MN.Live] = [];
- this.m_arrStateMessages[STATE.MN.Live][MSG.Type.Error] = new MSG.Web.Error("iMembernameLiveError");
- this.m_arrStateMessages[STATE.MN.Live][MSG.Type.Success] = new MSG.SignUp.Success("iLiveMessage");
- this.m_arrStateMessages[STATE.MN.Live][MSG.Type.Failure] = new MSG.SignUp.Failure("iLiveMessageError");
- this.m_arrStateMessages[STATE.MN.Live][MSG.Type.Help] = new MSG.SignUp.LiveMNHelp("membernamelivehelp_pop", "membernamelivehelp");
- this.m_arrStateMessages[STATE.MN.Live][MSG.Type.Progress] = new MSG.SignUp.Progress("chkavailwkwld");
- this.m_arrMessages = SignUp.IsEASI ? this.m_arrStateMessages[STATE.MN.EASI] : this.m_arrStateMessages[STATE.MN.Live]
- };
- Derive(FIELD.Membername, FIELD.Web.Membername);
- SignUp.Fields[FT.MN] = new FIELD.Web.Membername;
- FIELD.Web.Password = function () {
- FIELD.Password.apply(this, ["iPwd", "Help_pwdm"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iPwdError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.Web.PwdStrengthHelp("passwordhelp_pop", "passwordhelp");
- this.m_arrMessages[MSG.Type.Warning] = new MSG.SignUp.CapsWarning("dCapsLock")
- };
- Derive(FIELD.Password, FIELD.Web.Password);
- SignUp.Fields[FT.PWD] = new FIELD.Web.Password;
- FIELD.Web.RetypePassword = function () {
- FIELD.RetypePassword.apply(this, ["iRetypePwd", "Help_pwdm"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iPwdError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.Web.PwdStrengthHelp("passwordhelp_pop", "passwordhelp");
- this.m_arrMessages[MSG.Type.Warning] = new MSG.SignUp.CapsWarning("dCapsLock")
- };
- Derive(FIELD.RetypePassword, FIELD.Web.RetypePassword);
- SignUp.Fields[FT.RPWD] = new FIELD.Web.RetypePassword;
- FIELD.Web.Phone = function () {
- FIELD.Phone.apply(this, ["iPhone", "iSMSCountry", "IWW_Signup_Help_Phone", "IWW_Signup_Help_MobileEmail", "phoneinput", "iSMSCountryLabelPhone", "iSMSCountryLabelEmail"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iPhoneError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.SignUp.Help("phonehelp_pop", "phonehelp")
- };
- Derive(FIELD.Phone, FIELD.Web.Phone);
- SignUp.Fields[FT.PHN] = new FIELD.Web.Phone;
- FIELD.Web.AltEmail = function () {
- FIELD.AltEmail.apply(this, ["iAltEmail", "Help_AltEmail", "altinput"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iAltEmailError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.SignUp.Help("resethelp_pop", "resethelp")
- };
- Derive(FIELD.AltEmail, FIELD.Web.AltEmail);
- SignUp.Fields[FT.ALT] = new FIELD.Web.AltEmail;
- FIELD.Web.SecurityQuestion = function () {
- FIELD.SecurityQuestion.apply(this, ["iSQ", "iSQError", "ChangeSQSA_SQSAExplanation", "qsainput"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iSQError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.SignUp.Help("qsahelp_pop", "qsahelp")
- };
- Derive(FIELD.SecurityQuestion, FIELD.Web.SecurityQuestion);
- SignUp.Fields[FT.SQ] = new FIELD.Web.SecurityQuestion;
- FIELD.Web.SecretAnswer = function () {
- FIELD.SecretAnswer.apply(this, ["iSA", "ChangeSQSA_SQSAExplanation", "qsainput"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iSAError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.SignUp.Help("qsahelp_pop", "qsahelp")
- };
- Derive(FIELD.SecretAnswer, FIELD.Web.SecretAnswer);
- SignUp.Fields[FT.SA] = new FIELD.Web.SecretAnswer;
- FIELD.Web.FirstName = function () {
- FIELD.FirstName.apply(this, ["iFirstName", "Help_Name"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iFirstNameError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.SignUp.Help("namehelp_pop", "namehelp")
- };
- Derive(FIELD.FirstName, FIELD.Web.FirstName);
- SignUp.Fields[FT.FNAME] = new FIELD.Web.FirstName;
- FIELD.Web.LastName = function () {
- FIELD.LastName.apply(this, ["iLastName", "Help_Name"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iLastNameError");
- this.m_arrMessages[MSG.Type.Help] = new MSG.SignUp.Help("namehelp_pop", "namehelp")
- };
- Derive(FIELD.LastName, FIELD.Web.LastName);
- SignUp.Fields[FT.LNAME] = new FIELD.Web.LastName;
- FIELD.Web.Gender = function () {
- FIELD.Gender.apply(this, ["iGenderMale", "iGenderFemale"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("profile_genderError")
- };
- Derive(FIELD.Gender, FIELD.Web.Gender);
- SignUp.Fields[FT.GNDR] = new FIELD.Web.Gender;
- FIELD.Web.BirthDate = function () {
- FIELD.BirthDate.apply(this, ["iBirthMonth", "iBirthDay", "iBirthYear"]);
- this.m_arrMessages[MSG.Type.Error] = new MSG.Web.Error("iBirthDateError")
- };
- Derive(FIELD.BirthDate, FIELD.Web.BirthDate);
- SignUp.Fields[FT.BD] = new FIELD.Web.BirthDate;
- var SignUpJsComplete = true
- function GetString(s) {
- var rootObject = this,
- parts = s.toLowerCase().split('.'),
- iCount = parts.length;
- for (var i = 0; i < iCount; i++) {
- var currentPart = parts[i];
- rootObject = rootObject[currentPart];
- if (rootObject == null) {
- return '';
- }
- }
- return rootObject.toString();
- }
- registerNamespace("live.accounts.strings");
- live.accounts.strings.autocsr_questionnaire_birthdate_helptext = "דוגמה: 1990";
- live.accounts.strings.iww_signup_fieldlabel_country = "Country/region";
- live.accounts.strings.iww_signup_fieldlabel_sq = "Secret question";
- live.accounts.strings.iww_signup_heading1_easi = "Set up your Windows Live ID";
- live.accounts.strings.iww_signup_heading1_live = "Sign up for a new email address";
- live.accounts.strings.iww_signup_help_altemail = "You can get a message sent to this email address to help you reset your password in case you can't log in.";
- live.accounts.strings.iww_signup_help_mobileemail = "באפשרותך לקבל קוד הנשלח לכתובת הדואר האלקטרוני של הטלפון הנייד כדי לעזור לאפס את הסיסמה במקרה שאינך מצליח להיכנס. חיובי הודעות טקסט עשויים לחול.";
- live.accounts.strings.iww_signup_help_password = "To make your password more secure use 7-16 characters and combine uppercase letters, lowercase letters, numbers, and symbols.";
- live.accounts.strings.iww_signup_help_phone = "באפשרותך לקבוע שיישלח קוד למספר הטלפון הנייד שלך כדי שיעזור לך באיפוס הסיסמה שלך במקרה שלא תוכל להיכנס. ייתכן שתחויב בתשלום עבור העברת הודעות טקסט.";
- live.accounts.strings.iww_signup_help_sqsa = "You can use the answer to your secret question if you have trouble logging in.";
- live.accounts.strings.editprofile_maplinktext_euprivacylink = "פרטיות עבור תושבי האיחוד האירופי";
- live.accounts.strings.error_1245_moset = "This email address is already a Microsoft account.";
- live.accounts.strings.iww_navigation_fullpage = "Please wait";
- live.accounts.strings.iww_navigation_working = "Checking...";
- live.accounts.strings.iww_signup_heading2 = "Keep your account safer";
- live.accounts.strings.iww_signup_heading3 = "Finish up";
- live.accounts.strings.iww_signup_kidserror = "You cannot create a child's Microsoft account here.";
- live.accounts.strings.iww_signup_kidserror2 = "You cannot create a child's Microsoft account here. To create a child account visit the sign up flow on the web.";
- live.accounts.strings.label_proofs_selectphonenumber = "בחר אחד";
- live.accounts.strings.page_title_inlinepage2 = "עוד קצת מידע אודותיך";
- live.accounts.strings.sqsa_secretanswer_details = "חמישה תווים לפחות; לא תלויית רישיות";
- live.accounts.strings.changesqsa_sqsaexplanation = "אם תשכח את הסיסמה שלך, נבקש את התשובה הסודית כדי לאמת את זהותך.";
- live.accounts.strings.error_1005 = "נא הקלד סיסמה ולאחר מכן הקלד אותה שוב לצורך אישור.";
- live.accounts.strings.error_1006 = "סיסמה זו אינה תואמת לסיסמת האישור.";
- live.accounts.strings.error_1007 = "הסיסמה שלך חייבת להיות ארוכה מ- 5 תווים.";
- live.accounts.strings.error_1008 = "הסיסמה מכילה תווים שאינם מותרים.";
- live.accounts.strings.error_1010 = "הסיסמה שלך אינה יכולה להיות ארוכה מ- 16 תווים.";
- live.accounts.strings.error_1012 = "הסיסמה שלך אינה יכולה להכיל את התשובה הסודית שלך או חלק ממנה. הזן סיסמה שונה או בחר תשובה סודית אחרת.";
- live.accounts.strings.error_1018 = "מידע זה נדרש.";
- live.accounts.strings.error_1020 = "מזהה Windows Live שלך אינו יכול להיות כתובת הדואר האלקטרוני החלופית שלך.";
- live.accounts.strings.error_1023 = "התשובה הסודית שלך אינה יכולה להכיל את השאלה שלך או חלק ממנה.";
- live.accounts.strings.error_1025 = "הסיסמה שלך אינה יכולה להכיל את השאלה שלך או חלק ממנה. הזן סיסמה שונה או בחר שאלה אחרת.";
- live.accounts.strings.error_1026 = "נא בחר שאלה.";
- live.accounts.strings.error_1027 = "התשובה הסודית שלך אינה יכולה להכיל את מזהה Windows Live שלך או חלק ממנו.";
- live.accounts.strings.error_1029 = "התשובה הסודית שלך חייבת להיות באורך של 5 תווים לפחות.";
- live.accounts.strings.error_1030 = "התשובה הסודית שלך אינה יכולה להכיל אף אחד מהתווים הבאים: $ \" < > ( ) ; & % # : \\ { }";
- live.accounts.strings.error_1031 = "התשובה הסודית שלך אינה יכולה להכיל יותר מ- 32 תווים.";
- live.accounts.strings.error_1037 = "{0} אינו חוקי. נא ודא שהזנת את המידע הנכון.";
- live.accounts.strings.error_1058 = "{0} אינו זמין.";
- live.accounts.strings.error_1062 = "מזהה Windows Live שלך יכול להכיל רק אותיות, מספרים, נקודות (.), מקפים (-) ומקפים תחתונים (_). המזהה אינו יכול להכיל תווים מיוחדים או אותיות עם סימוני הטעמה.";
- live.accounts.strings.error_1081 = "{0} זמין.";
- live.accounts.strings.error_1088 = "הסיסמה שלך אינה יכולה להכיל את החלק של מזהה Windows Live שלך המופיע לפני הסימן @.";
- live.accounts.strings.error_1145 = "כתובת הדואר האלקטרוני שהזנת ארוכה מדי. נא נסה שוב.";
- live.accounts.strings.error_1159 = "{0} מהווה כבר מזהה Windows Live. נסה מזהה אחר.";
- live.accounts.strings.error_1161 = "הזן את כתובת הדואר האלקטרוני שלך בתבנית yourname@example.com.";
- live.accounts.strings.error_1181 = "כתובת דואר אלקטרוני זו מהווה חלק מתחום שמור, כגון live.com, hotmail.com או msn.com. הזן כתובת דואר אלקטרוני שונה.";
- live.accounts.strings.error_1208 = "מספר טלפון נייד זה אינו חוקי עבור המדינה/האזור שלך. נסה שוב או השתמש בשם אחר.";
- live.accounts.strings.error_1217 = "בחר סיסמה קשה יותר לניחוש.";
- live.accounts.strings.error_1219 = "הזן את מזהה Windows Live שלך.";
- live.accounts.strings.error_1220 = "מזהה Windows Live מכיל מילה או צירוף מילים שאינם מותרים.";
- live.accounts.strings.error_1221 = "שלחנו את מספר הקודים המרבי לכתובת הדואר האלקטרוני שלך ליום זה. נסה שוב מחר.";
- live.accounts.strings.error_1222 = "הסיסמה שלך אינה יכולה להכיל את שם המשפחה שלך.";
- live.accounts.strings.error_1223 = "הזן תשובה סודית עבור השאלה שלך.";
- live.accounts.strings.error_1224 = "כתובת הדואר האלקטרוני החלופית אינה חוקית. ייתכן שהיא ארוכה מדי או קצרה מדי, או שהיא מכילה תווים שאינם מותרים.";
- live.accounts.strings.error_1225 = "מידע זה נדרש.";
- live.accounts.strings.error_1226 = "מידע זה נדרש.";
- live.accounts.strings.error_1227 = "מידע זה נדרש.";
- live.accounts.strings.error_1228 = "מידע זה נדרש.";
- live.accounts.strings.error_1229 = "מידע זה נדרש.";
- live.accounts.strings.error_1230 = "מידע זה נדרש.";
- live.accounts.strings.error_1232 = "מידע זה נדרש.";
- live.accounts.strings.error_1233 = "ודא שהזנת את המידע הנכון.";
- live.accounts.strings.error_1234 = "השם שלך מכיל תווים שאינם מותרים.";
- live.accounts.strings.error_1235 = "השם שלך מכיל תווים שאינם מותרים.";
- live.accounts.strings.error_1236 = "שם זה מכיל מילה שאינה מותרת. הזן שם אחר.";
- live.accounts.strings.error_1237 = "לא מצאנו אפשרויות זמינות. נסה להשתמש במילים אחרות.";
- live.accounts.strings.error_1239 = "לאחר שתירשם, נשלח לך הודעה עם קישור כדי לאמת מזהה זה.";
- live.accounts.strings.error_1240 = "הזן את כתובת הדואר האלקטרוני שלך בתבנית yourname@example.com.";
- live.accounts.strings.error_1241 = "מזהה Windows Live שלך יכול להכיל רק אותיות, מספרים, נקודות (.), מקפים (-) ומקפים תחתונים (_). המזהה אינו יכול להכיל תווים מיוחדים או אותיות עם סימוני הטעמה.";
- live.accounts.strings.error_1242 = "{0} מהווה כבר מזהה Windows Live. אם זהו המזהה שלך, באפשרותך להשתמש בו כדי <a {1}>להיכנס</a>.";
- live.accounts.strings.error_1243 = "הסיסמה שלך אינה יכולה להכיל את שמך הפרטי.";
- live.accounts.strings.error_1244 = "תאריך הלידה שהוזן אינו חוקי.";
- live.accounts.strings.error_1245 = "This email address is already a Windows Live ID. You can <a {0}>use it if it's yours.</a>";
- live.accounts.strings.error_1249 = "מידע זה נדרש.";
- live.accounts.strings.error_1250 = "You must provide at least two ways for us to confirm it's you.";
- live.accounts.strings.error_1251 = "You must provide this info so we have two ways to confirm it's you.";
- live.accounts.strings.error_1252 = "כתובת דואר אלקטרוני זו של טלפון נייד אינה חוקית עבור המדינה/אזור שלך. נסה שוב או השתמש בכתובת דואר אלקטרוני אחרת.";
- live.accounts.strings.error_1254 = "The domain of your email is owned by an organization and cannot be used for this purpose. Please try a different email or <a {0}>create a new email address</a>.";
- live.accounts.strings.error_6 = "אין באפשרותנו לבדוק אם מזהה זה זמין כעת. נסה שוב מאוחר יותר.";
- live.accounts.strings.error_multiple = "שגיאות ביותר משדה אחד. לחץ על כל שדה מסומן כדי לוודא שהמידע נכון.";
- live.accounts.strings.fieldlabel_birthyear = "שנת לידה:";
- live.accounts.strings.fieldlabel_countryregion = "מדינה/אזור:";
- live.accounts.strings.fieldlabel_question = "שאלה:";
- live.accounts.strings.general_secretanswerhelp = "חמישה תווים לפחות; לא תלויית רישיות";
- live.accounts.strings.help_altemail = "השתמש בכתובת שונה ממזהה Windows Live שלך. אם תשכח את הסיסמה, נשלח מידע לאיפוס הסיסמה לכתובת זו.";
- live.accounts.strings.help_easiname = "כתובת הדואר האלקטרוני שלך תהיה מזהה Windows Live שלך. השתמש בה כדי להיכנס לכל שירותי Windows Live. אם תשכח את הסיסמה, נשלח מידע לאיפוס הסיסמה לכתובת זו.";
- live.accounts.strings.help_easioption = "אם תשתמש בכתובת דואר אלקטרוני משלך, לא תהיה לך גישה לשירותי הדואר שלנו. יצירת כתובת דואר אלקטרוני של Windows Live מעניקה לך גישה לכל שירותי מזהה Windows Live.";
- live.accounts.strings.help_membername = "השתמש במזהה Windows Live זה כדי להיכנס לאתרים ולשירותים של Windows Live.";
- live.accounts.strings.help_name = "שמך מאפשר לחברים, עמיתים לעבודה, בני משפחה ואחרים לזהות אותך ב- Windows Live.";
- live.accounts.strings.help_pwdm = "סיסמאות חזקות מכילות 7-16 תווים, אינן כוללות מילים או שמות נפוצים, ומשלבות אותיות רישיות, אותיות קטנות, מספרים וסימנים.";
- live.accounts.strings.help_wlidoption = "יצירת כתובת דואר אלקטרוני של Windows Live מעניקה לך גישה לכל שירותי מזהה Windows Live.";
- live.accounts.strings.inline_activexdisabled = "The Windows Live ID Sign-in Control is disabled. Please go to Internet Explorer to enable this ActiveX control.";
- live.accounts.strings.inline_genericerror = "This service isn't available right now—please try again later.";
- live.accounts.strings.navigation_working = "פועל...";
- live.accounts.strings.page_title = "יצירת מזהה Windows Live שלך";
- live.accounts.strings.profile_separator = ":";
- live.accounts.strings.pwdstrengthmeter_passwordmedium = "בינונית";
- live.accounts.strings.pwdstrengthmeter_passwordstrong = "חזקה";
- live.accounts.strings.pwdstrengthmeter_passwordweak = "חלשה";
- live.accounts.strings.pwrhip_emailexample = "someone@example.com";
- < /script>
- <!-- Hotmail customized strings if needed -->