/*Line 132 - 'AtomPhoneControl.js'
178940
function () {
/*Line 133 - 'AtomPhoneControl.js' */                if (this._isFormatting) return;
/*Line 134 - 'AtomPhoneControl.js' */                this._isFormatting = true;

/*Line 136 - 'AtomPhoneControl.js' */                var r = this._countries;
/*Line 137 - 'AtomPhoneControl.js' */                var options = this.cs.options;
/*Line 138 - 'AtomPhoneControl.js' */                options.length = r.length;
/*Line 139 - 'AtomPhoneControl.js' */                var last = this.cs.selectedIndex;
/*Line 140 - 'AtomPhoneControl.js' */                var ae = new AtomEnumerator(r);
/*Line 141 - 'AtomPhoneControl.js' */                while (ae.next()) {
/*Line 142 - 'AtomPhoneControl.js' */                    var ci = ae.current();
/*Line 143 - 'AtomPhoneControl.js' */                    if (!ci.valueIndex) {
/*Line 144 - 'AtomPhoneControl.js' */                        ci.label = ci.label;
/*Line 145 - 'AtomPhoneControl.js' */                        ci.valueIndex = ae.currentIndex();
/*Line 146 - 'AtomPhoneControl.js' */                    }
/*Line 147 - 'AtomPhoneControl.js' */                    options[ae.currentIndex()] = new Option(ci.label, ci.valueIndex, false, false);
/*Line 148 - 'AtomPhoneControl.js' */                }

/*Line 150 - 'AtomPhoneControl.js' */                this.setupValues();
/*Line 151 - 'AtomPhoneControl.js' */                this.cs.selectedIndex = last;

/*Line 153 - 'AtomPhoneControl.js' */                var cs = this.cs;
/*Line 154 - 'AtomPhoneControl.js' */                if (cs.selectedIndex == -1)
/*Line 155 - 'AtomPhoneControl.js' */                    return;
/*Line 156 - 'AtomPhoneControl.js' */                var ci = this._countries[cs.selectedIndex];

/*Line 158 - 'AtomPhoneControl.js' */                if (ci.format) {
/*Line 159 - 'AtomPhoneControl.js' */                    $(this.num).mask(ci.format);
/*Line 160 - 'AtomPhoneControl.js' */                } else {
/*Line 161 - 'AtomPhoneControl.js' */                    $(this.num).unmask();
/*Line 162 - 'AtomPhoneControl.js' */                }
/*Line 163 - 'AtomPhoneControl.js' */                this._isFormatting = false;
/*Line 164 - 'AtomPhoneControl.js' */            }
1187593
function (element, v) {
/*Line 156 - 'AtomControl.js' */        var self = this;
/*Line 157 - 'AtomControl.js' */        AtomProperties.validate({
/*Line 158 - 'AtomControl.js' */            value: v,
/*Line 159 - 'AtomControl.js' */            key: "invalid",
/*Line 160 - 'AtomControl.js' */            valueFunction: function () {
/*Line 161 - 'AtomControl.js' */                return v;
/*Line 162 - 'AtomControl.js' */            },
/*Line 163 - 'AtomControl.js' */            validator: function (v) {
/*Line 164 - 'AtomControl.js' */                if (v) {
/*Line 165 - 'AtomControl.js' */                    if ($.isArray(v)) {
/*Line 166 - 'AtomControl.js' */                        return v.join(",");
/*Line 167 - 'AtomControl.js' */                    }
/*Line 168 - 'AtomControl.js' */                }
/*Line 169 - 'AtomControl.js' */                return v;
/*Line 170 - 'AtomControl.js' */            },
/*Line 171 - 'AtomControl.js' */            control: this,
/*Line 172 - 'AtomControl.js' */            element: element
/*Line 173 - 'AtomControl.js' */        });
/*Line 174 - 'AtomControl.js' */        if (this._created) {
/*Line 175 - 'AtomControl.js' */            errors.reset(element);
/*Line 176 - 'AtomControl.js' */        }
/*Line 177 - 'AtomControl.js' */    }
926665
function (target, key) {
/*Line 55 - 'AtomBindingHelper.js' */        var handlers = AtomBinder.get_WatchHandler(target, key);
/*Line 56 - 'AtomBindingHelper.js' */        if (handlers == undefined || handlers == null)
/*Line 57 - 'AtomBindingHelper.js' */            return;
/*Line 58 - 'AtomBindingHelper.js' */        var ae = new AtomEnumerator(handlers);
/*Line 59 - 'AtomBindingHelper.js' */        while (ae.next()) {
/*Line 60 - 'AtomBindingHelper.js' */            var item = ae.current();
/*Line 61 - 'AtomBindingHelper.js' */            item(target, key);
/*Line 62 - 'AtomBindingHelper.js' */        }

/*Line 64 - 'AtomBindingHelper.js' */        if (target._$_watcher) {
/*Line 65 - 'AtomBindingHelper.js' */            target._$_watcher._onRefreshValue(target, key);
/*Line 66 - 'AtomBindingHelper.js' */        }
/*Line 67 - 'AtomBindingHelper.js' */    }
1146425
function (e) {


/*Line 36 - 'AtomPostButton.js' */                if (!this._postUrl) {
/*Line 37 - 'AtomPostButton.js' */                    base.onClickHandler.apply(this, arguments);
/*Line 38 - 'AtomPostButton.js' */                    return;
/*Line 39 - 'AtomPostButton.js' */                }

/*Line 41 - 'AtomPostButton.js' */                var data = this.get_postData();

/*Line 43 - 'AtomPostButton.js' */                if (data === null || data === undefined)
/*Line 44 - 'AtomPostButton.js' */                    return;

/*Line 46 - 'AtomPostButton.js' */                var m = this._mergeData;
/*Line 47 - 'AtomPostButton.js' */                if (m) {
/*Line 48 - 'AtomPostButton.js' */                    for (var i in m) {
/*Line 49 - 'AtomPostButton.js' */                        data[i] = m[i];
/*Line 50 - 'AtomPostButton.js' */                    }
/*Line 51 - 'AtomPostButton.js' */                }

/*Line 53 - 'AtomPostButton.js' */                //data = AtomBinder.getClone(data);

/*Line 55 - 'AtomPostButton.js' */                var caller = this;
/*Line 56 - 'AtomPostButton.js' */                var invokeNext = function (p) {
/*Line 57 - 'AtomPostButton.js' */                    AtomBinder.setValue(caller, "postResult", p.value());
/*Line 58 - 'AtomPostButton.js' */                    caller.invokeAction(caller._next);
/*Line 59 - 'AtomPostButton.js' */                };

/*Line 61 - 'AtomPostButton.js' */                //this.invokeAjax(this._postUrl, { type: "POST", data: data, success: invokeNext });
/*Line 62 - 'AtomPostButton.js' */                AtomPromise.json(this._postUrl, null, { type: "POST", data: data }).then(invokeNext).invoke();

/*Line 64 - 'AtomPostButton.js' */            }
170415
function () {
/*Line 153 - 'AtomBinding.js' */                if (this.twoWays) {
/*Line 154 - 'AtomBinding.js' */                    if (this.jq) {
/*Line 155 - 'AtomBinding.js' */                        this.bindEvent(this.element, "change", "onValChanged");
/*Line 156 - 'AtomBinding.js' */                        this.bindEvent(this.element, "blur", "onValChanged");
/*Line 157 - 'AtomBinding.js' */                        if (this.events) {
/*Line 158 - 'AtomBinding.js' */                            var list = new AtomEnumerator(this.events.split(","));
/*Line 159 - 'AtomBinding.js' */                            while (list.next()) {
/*Line 160 - 'AtomBinding.js' */                                this.bindEvent(this.element, list.current(), "onValChanged");
/*Line 161 - 'AtomBinding.js' */                            }
/*Line 162 - 'AtomBinding.js' */                        }
/*Line 163 - 'AtomBinding.js' */                    } else {
/*Line 164 - 'AtomBinding.js' */                        this.bindEvent(this.control, "WatchHandler", "onPropChanged", this.key);
/*Line 165 - 'AtomBinding.js' */                    }
/*Line 166 - 'AtomBinding.js' */                }

/*Line 168 - 'AtomBinding.js' */                this.onDataChanged(this, null);

/*Line 170 - 'AtomBinding.js' */            }
1001410
function () {
/*Line 16 - 'AtomUIComponent.js' */                if (this._scope === undefined) {
/*Line 17 - 'AtomUIComponent.js' */                    var ap = this.get_atomParent(this._element._logicalParent || this._element.parentNode);
/*Line 18 - 'AtomUIComponent.js' */                    if (ap) {
/*Line 19 - 'AtomUIComponent.js' */                        return ap._localScope || ap.get_scope();
/*Line 20 - 'AtomUIComponent.js' */                    }
/*Line 21 - 'AtomUIComponent.js' */                    else {
/*Line 22 - 'AtomUIComponent.js' */                        return appScope;
/*Line 23 - 'AtomUIComponent.js' */                    }
/*Line 24 - 'AtomUIComponent.js' */                }
/*Line 25 - 'AtomUIComponent.js' */                return this._scope;
/*Line 26 - 'AtomUIComponent.js' */            }
1082919
function (v) {
/*Line 113 - 'AtomItemsControl.js' */                if (v === undefined || v === null)
/*Line 114 - 'AtomItemsControl.js' */                    return;
/*Line 115 - 'AtomItemsControl.js' */                this._selectedItems.length = 0;
/*Line 116 - 'AtomItemsControl.js' */                var items = this.get_dataItems();
/*Line 117 - 'AtomItemsControl.js' */                if (v && items) {
/*Line 118 - 'AtomItemsControl.js' */                    var ae = new AtomEnumerator(items);
/*Line 119 - 'AtomItemsControl.js' */                    while (ae.next()) {
/*Line 120 - 'AtomItemsControl.js' */                        this._selectedItems.push(ae.current());
/*Line 121 - 'AtomItemsControl.js' */                    }
/*Line 122 - 'AtomItemsControl.js' */                }
/*Line 123 - 'AtomItemsControl.js' */                AtomBinder.refreshItems(this._selectedItems);
/*Line 124 - 'AtomItemsControl.js' */            }
105734
function () {

/*Line 266 - 'AtomAutoCompleteBox.js' */                base.init.apply(this, arguments);
/*Line 267 - 'AtomAutoCompleteBox.js' */                this.bindEvent(this._inputBox, "focus", "onInputFocus");
/*Line 268 - 'AtomAutoCompleteBox.js' */                this.bindEvent(this._inputBox, "blur", "onInputBlur");
/*Line 269 - 'AtomAutoCompleteBox.js' */                this.bindEvent(this._inputBox, "keyup", "onKeyUp");
/*Line 270 - 'AtomAutoCompleteBox.js' */            }
616382
function () {
/*Line 146 - 'AtomFormField.js' */                if (!this._created)
/*Line 147 - 'AtomFormField.js' */                    return;

/*Line 149 - 'AtomFormField.js' */                // find two way bindings...
/*Line 150 - 'AtomFormField.js' */                var e = this._element;

/*Line 152 - 'AtomFormField.js' */                if (this._contentPresenter) {
/*Line 153 - 'AtomFormField.js' */                    this._contentPresenter.appendChild(this._element.contentElement);
/*Line 154 - 'AtomFormField.js' */                }

/*Line 156 - 'AtomFormField.js' */                var ae = new AtomEnumerator($(e).find("input,select,textarea"));
/*Line 157 - 'AtomFormField.js' */                while (ae.next()) {
/*Line 158 - 'AtomFormField.js' */                    var item = ae.current();
/*Line 159 - 'AtomFormField.js' */                    this.bindEvent(item, "blur", "onFocusOut");
/*Line 160 - 'AtomFormField.js' */                    this.bindEvent(item, "change", "onFocusOut");
/*Line 161 - 'AtomFormField.js' */                }

/*Line 163 - 'AtomFormField.js' */                AtomBinder.refreshValue(this, "fieldClass");
/*Line 164 - 'AtomFormField.js' */            }
865511
function (v) {
/*Line 83 - 'AtomItemsControl.js' */                this._value = v;
/*Line 84 - 'AtomItemsControl.js' */                if (v === undefined || v === null) {
/*Line 85 - 'AtomItemsControl.js' */                    // reset...
/*Line 86 - 'AtomItemsControl.js' */                    AtomBinder.clear(this._selectedItems);
/*Line 87 - 'AtomItemsControl.js' */                    return;
/*Line 88 - 'AtomItemsControl.js' */                }
/*Line 89 - 'AtomItemsControl.js' */                var dataItems = this.get_dataItems();
/*Line 90 - 'AtomItemsControl.js' */                if (this._allowMultipleSelection && this._valueSeparator) {
/*Line 91 - 'AtomItemsControl.js' */                    if (v.constructor != String) {
/*Line 92 - 'AtomItemsControl.js' */                        v = "" + v;
/*Line 93 - 'AtomItemsControl.js' */                    }
/*Line 94 - 'AtomItemsControl.js' */                    v = AtomArray.split(v, this._valueSeparator);
/*Line 95 - 'AtomItemsControl.js' */                } else {
/*Line 96 - 'AtomItemsControl.js' */                    v = [v];
/*Line 97 - 'AtomItemsControl.js' */                }
/*Line 98 - 'AtomItemsControl.js' */                var items = AtomArray.intersect(dataItems, this._valuePath, v);
/*Line 99 - 'AtomItemsControl.js' */                this._selectedItems.length = 0;
/*Line 100 - 'AtomItemsControl.js' */                var ae = new AtomEnumerator(items);
/*Line 101 - 'AtomItemsControl.js' */                while (ae.next()) {
/*Line 102 - 'AtomItemsControl.js' */                    this._selectedItems.push(ae.current());
/*Line 103 - 'AtomItemsControl.js' */                }
/*Line 104 - 'AtomItemsControl.js' */                AtomBinder.refreshItems(this._selectedItems);
/*Line 105 - 'AtomItemsControl.js' */            }
625281
function (parent) {
/*Line 567 - 'AtomControl.js' */                if (!parent)
/*Line 568 - 'AtomControl.js' */                    parent = this._element;
/*Line 569 - 'AtomControl.js' */                var ae = new ChildEnumerator(parent);
/*Line 570 - 'AtomControl.js' */                while (ae.next()) {
/*Line 571 - 'AtomControl.js' */                    var child = ae.current();
/*Line 572 - 'AtomControl.js' */                    if (child.atomControl) {
/*Line 573 - 'AtomControl.js' */                        child.atomControl.updateUI();
/*Line 574 - 'AtomControl.js' */                        continue;
/*Line 575 - 'AtomControl.js' */                    }
/*Line 576 - 'AtomControl.js' */                    this.updateChildUI(child);
/*Line 577 - 'AtomControl.js' */                }
/*Line 578 - 'AtomControl.js' */            }
281193
function (target, element, key, path, twoWays, jq, valueFunction, events) {
/*Line 378 - 'AtomControl.js' */                this.clearBinding(element, key);
/*Line 379 - 'AtomControl.js' */                var ab = new WebAtoms.AtomBinding(target, element, key, path, twoWays, jq, valueFunction, events);
/*Line 380 - 'AtomControl.js' */                this.bindings.push(ab);
/*Line 381 - 'AtomControl.js' */                ab.setup();
/*Line 382 - 'AtomControl.js' */            }
299987
function (e) {

/*Line 49 - 'AtomUploadButton.js' */                if (this._confirm) {
/*Line 50 - 'AtomUploadButton.js' */                    if (!confirm(this._confirmMessage))
/*Line 51 - 'AtomUploadButton.js' */                        return;
/*Line 52 - 'AtomUploadButton.js' */                }

/*Line 54 - 'AtomUploadButton.js' */                if (!this._postUrl) {
/*Line 55 - 'AtomUploadButton.js' */                    //WebAtoms.AtomUploadButton.callBaseMethod(this, "onClickHandler", [e]);
/*Line 56 - 'AtomUploadButton.js' */                    return;
/*Line 57 - 'AtomUploadButton.js' */                }

/*Line 59 - 'AtomUploadButton.js' */                if (this._filePresenter == this._element) {
/*Line 60 - 'AtomUploadButton.js' */                    return;
/*Line 61 - 'AtomUploadButton.js' */                }

/*Line 63 - 'AtomUploadButton.js' */                $(this._filePresenter).trigger("click");
/*Line 64 - 'AtomUploadButton.js' */                AtomUI.cancelEvent(e);
/*Line 65 - 'AtomUploadButton.js' */            }
748236
function (v) {
/*Line 86 - 'AtomDateField.js' */                if (this._set_timeCalled)
/*Line 87 - 'AtomDateField.js' */                    return;
/*Line 88 - 'AtomDateField.js' */                this._set_timeCalled = true;
/*Line 89 - 'AtomDateField.js' */                if (v) {
/*Line 90 - 'AtomDateField.js' */                    this._time = v;
/*Line 91 - 'AtomDateField.js' */                    var d = AtomDate.setTime(this.get_value(), v);
/*Line 92 - 'AtomDateField.js' */                    AtomBinder.setValue(this, "value", d);
/*Line 93 - 'AtomDateField.js' */                }
/*Line 94 - 'AtomDateField.js' */                this._set_timeCalled = false;
/*Line 95 - 'AtomDateField.js' */            }
765505
function () {
/*Line 187 - 'AtomForm.js' */                baseType.init.call(this);

/*Line 189 - 'AtomForm.js' */                var _this = this;
/*Line 190 - 'AtomForm.js' */                this._success = function () {
/*Line 191 - 'AtomForm.js' */                    _this.onSuccess.apply(_this, arguments);
/*Line 192 - 'AtomForm.js' */                };

/*Line 194 - 'AtomForm.js' */                this._submit = function () {
/*Line 195 - 'AtomForm.js' */                    WebAtoms.dispatcher.callLater(function () {
/*Line 196 - 'AtomForm.js' */                        _this.onSubmit.apply(_this, arguments);
/*Line 197 - 'AtomForm.js' */                    });
/*Line 198 - 'AtomForm.js' */                };

/*Line 200 - 'AtomForm.js' */                var element = this.get_element();

/*Line 202 - 'AtomForm.js' */                this.submitCommand = this._submit;

/*Line 204 - 'AtomForm.js' */                this.bindEvent(element, "keyup", "onKeyUp");

/*Line 206 - 'AtomForm.js' */                $(element).find("input[type=submit]").bind("click", null, this._submit);
/*Line 207 - 'AtomForm.js' */                $(element).find("button[type=submit]").bind("click", null, this._submit);


/*Line 210 - 'AtomForm.js' */                var _this = this;
/*Line 211 - 'AtomForm.js' */                this._vh = function () {
/*Line 212 - 'AtomForm.js' */                    _this.validateField.apply(_this, arguments);
/*Line 213 - 'AtomForm.js' */                };

/*Line 215 - 'AtomForm.js' */                $(element).find("input,select,textarea").bind("blur", null, this._vh);



/*Line 219 - 'AtomForm.js' */            }
699986
function (value) {

/*Line 174 - 'AtomBinding.js' */                if (!this.pathList && this.vf) {
/*Line 175 - 'AtomBinding.js' */                    value = [value];
/*Line 176 - 'AtomBinding.js' */                }

/*Line 178 - 'AtomBinding.js' */                if (this.vf) {
/*Line 179 - 'AtomBinding.js' */                    value.push(Atom);
/*Line 180 - 'AtomBinding.js' */                    value.push(AtomPromise);
/*Line 181 - 'AtomBinding.js' */                    value.push($x);
/*Line 182 - 'AtomBinding.js' */                    value = this.vf.apply(this, value);
/*Line 183 - 'AtomBinding.js' */                }

/*Line 185 - 'AtomBinding.js' */                if (value instanceof AtomPromise) {
/*Line 186 - 'AtomBinding.js' */                    value._persist = true;
/*Line 187 - 'AtomBinding.js' */                }

/*Line 189 - 'AtomBinding.js' */                this._lastValue = value;
/*Line 190 - 'AtomBinding.js' */                this._isUpdating = true;
/*Line 191 - 'AtomBinding.js' */                this.control.setLocalValue(this.key, value, this.element, true);
/*Line 192 - 'AtomBinding.js' */                this._isUpdating = false;
/*Line 193 - 'AtomBinding.js' */            }
166122
function () {
/*Line 256 - 'AtomItemsControl.js' */                var item = this.get_selectedItem();
/*Line 257 - 'AtomItemsControl.js' */                if (!this.hasItems())
/*Line 258 - 'AtomItemsControl.js' */                    return item;
/*Line 259 - 'AtomItemsControl.js' */                var ce = new ChildEnumerator(this._itemsPresenter);
/*Line 260 - 'AtomItemsControl.js' */                while (ce.next()) {
/*Line 261 - 'AtomItemsControl.js' */                    var child = ce.current();
/*Line 262 - 'AtomItemsControl.js' */                    if (child.atomControl.get_data() == item)
/*Line 263 - 'AtomItemsControl.js' */                        return child;
/*Line 264 - 'AtomItemsControl.js' */                }
/*Line 265 - 'AtomItemsControl.js' */                return null;
/*Line 266 - 'AtomItemsControl.js' */            }