/*Line 96 - 'AtomControl.js'
322643
function (element, value) {
/*Line 97 - 'AtomControl.js' */        //clears everything..
/*Line 98 - 'AtomControl.js' */        element.innerHTML = "";
/*Line 99 - 'AtomControl.js' */        var a = document.createTextNode(value);
/*Line 100 - 'AtomControl.js' */        element.appendChild(a);
/*Line 101 - 'AtomControl.js' */    }
1061804
function (v) {
/*Line 77 - 'AtomFormField.js' */                if (this._required) {
/*Line 78 - 'AtomFormField.js' */                    if (!v) {
/*Line 79 - 'AtomFormField.js' */                        AtomBinder.setValue(this, "error", this._requiredMessage);
/*Line 80 - 'AtomFormField.js' */                        this._isValid = false;
/*Line 81 - 'AtomFormField.js' */                        return;
/*Line 82 - 'AtomFormField.js' */                    }
/*Line 83 - 'AtomFormField.js' */                } else {
/*Line 84 - 'AtomFormField.js' */                    // if value is not required
/*Line 85 - 'AtomFormField.js' */                    // and if value is empty
/*Line 86 - 'AtomFormField.js' */                    // it is a valid value
/*Line 87 - 'AtomFormField.js' */                    if (!v) {
/*Line 88 - 'AtomFormField.js' */                        this._isValid = true;
/*Line 89 - 'AtomFormField.js' */                        return;
/*Line 90 - 'AtomFormField.js' */                    }
/*Line 91 - 'AtomFormField.js' */                }

/*Line 93 - 'AtomFormField.js' */                var re = null;

/*Line 95 - 'AtomFormField.js' */                if (/email/gi.test(this._dataType)) {
/*Line 96 - 'AtomFormField.js' */                    re = /^(([^<>()\[\]\\.,;:\s@\"]+(\.[^<>()\[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
/*Line 97 - 'AtomFormField.js' */                } else {
/*Line 98 - 'AtomFormField.js' */                    if (this._regex) {
/*Line 99 - 'AtomFormField.js' */                        re = eval("(" + this._regex + ")");
/*Line 100 - 'AtomFormField.js' */                    }
/*Line 101 - 'AtomFormField.js' */                }

/*Line 103 - 'AtomFormField.js' */                if (re) {
/*Line 104 - 'AtomFormField.js' */                    if (!re.test(v)) {
/*Line 105 - 'AtomFormField.js' */                        AtomBinder.setValue(this, "error", this._invalidMessage);
/*Line 106 - 'AtomFormField.js' */                        this._isValid = false;
/*Line 107 - 'AtomFormField.js' */                        return;
/*Line 108 - 'AtomFormField.js' */                    }
/*Line 109 - 'AtomFormField.js' */                }
/*Line 110 - 'AtomFormField.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' */            }
102445
function () {
/*Line 416 - 'AtomItemsControl.js' */                if (this.scrollTimeout) {
/*Line 417 - 'AtomItemsControl.js' */                    clearTimeout(this.scrollTimeout);
/*Line 418 - 'AtomItemsControl.js' */                }
/*Line 419 - 'AtomItemsControl.js' */                var _this = this;
/*Line 420 - 'AtomItemsControl.js' */                this.scrollTimeout = setTimeout(function () {
/*Line 421 - 'AtomItemsControl.js' */                    _this.scrollTimeout = 0;
/*Line 422 - 'AtomItemsControl.js' */                    _this.onCollectionChangedInternal("refresh", -1, null);
/*Line 423 - 'AtomItemsControl.js' */                }, 1000);
/*Line 424 - 'AtomItemsControl.js' */            }
1286877
function (element) {
/*Line 271 - 'AtomUI.js' */        while (element.hasChildNodes()) {
/*Line 272 - 'AtomUI.js' */            var lc = element.lastChild;
/*Line 273 - 'AtomUI.js' */            if (!lc)
/*Line 274 - 'AtomUI.js' */                break;
/*Line 275 - 'AtomUI.js' */            //element.removeChild(lc);
/*Line 276 - 'AtomUI.js' */            if (lc.atomControl) {
/*Line 277 - 'AtomUI.js' */                lc.atomControl.dispose();
/*Line 278 - 'AtomUI.js' */                delete lc.atomControl;
/*Line 279 - 'AtomUI.js' */            }
/*Line 280 - 'AtomUI.js' */            $(lc).remove();
/*Line 281 - 'AtomUI.js' */            //delete lc;
/*Line 282 - 'AtomUI.js' */        }
/*Line 283 - 'AtomUI.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' */            }
908274
function () {

/*Line 59 - 'AtomItemsControl.js' */                if (this._allowMultipleSelection) {
/*Line 60 - 'AtomItemsControl.js' */                    var items = this._selectedItems;
/*Line 61 - 'AtomItemsControl.js' */                    if (items.length == 0) {
/*Line 62 - 'AtomItemsControl.js' */                        if (this._value !== undefined)
/*Line 63 - 'AtomItemsControl.js' */                            return this._value;
/*Line 64 - 'AtomItemsControl.js' */                        return null;
/*Line 65 - 'AtomItemsControl.js' */                    }
/*Line 66 - 'AtomItemsControl.js' */                    items = AtomArray.getValues(items, this._valuePath);
/*Line 67 - 'AtomItemsControl.js' */                    if (this._valueSeparator)
/*Line 68 - 'AtomItemsControl.js' */                        items = items.join(this._valueSeparator);
/*Line 69 - 'AtomItemsControl.js' */                    return items;
/*Line 70 - 'AtomItemsControl.js' */                }

/*Line 72 - 'AtomItemsControl.js' */                var s = this.get_selectedItem();
/*Line 73 - 'AtomItemsControl.js' */                if (!s) {
/*Line 74 - 'AtomItemsControl.js' */                    if (this._value !== undefined)
/*Line 75 - 'AtomItemsControl.js' */                        return this._value;
/*Line 76 - 'AtomItemsControl.js' */                    return null;
/*Line 77 - 'AtomItemsControl.js' */                }
/*Line 78 - 'AtomItemsControl.js' */                if (this._valuePath) {
/*Line 79 - 'AtomItemsControl.js' */                    s = s[this._valuePath];
/*Line 80 - 'AtomItemsControl.js' */                }
/*Line 81 - 'AtomItemsControl.js' */                return s;
/*Line 82 - 'AtomItemsControl.js' */            }
963572
function (e, ef) {

/*Line 118 - 'AtomForm.js' */                if (!ef)
/*Line 119 - 'AtomForm.js' */                    ef = $(e).data("field-error");

/*Line 121 - 'AtomForm.js' */                var ctrl = e.atomControl;
/*Line 122 - 'AtomForm.js' */                var val = null;
/*Line 123 - 'AtomForm.js' */                var skip = false;
/*Line 124 - 'AtomForm.js' */                if (!ctrl) {
/*Line 125 - 'AtomForm.js' */                    if ((/input|select|textarea/i).test(e.nodeName)) {
/*Line 126 - 'AtomForm.js' */                        val = $(e).val();
/*Line 127 - 'AtomForm.js' */                    } else {
/*Line 128 - 'AtomForm.js' */                        skip = true;
/*Line 129 - 'AtomForm.js' */                    }
/*Line 130 - 'AtomForm.js' */                } else {
/*Line 131 - 'AtomForm.js' */                    if (ctrl.constructor == WebAtoms.AtomFormField) {
/*Line 132 - 'AtomForm.js' */                        return ctrl.validate();
/*Line 133 - 'AtomForm.js' */                    }
/*Line 134 - 'AtomForm.js' */                    val = AtomBinder.getValue(ctrl, "value");
/*Line 135 - 'AtomForm.js' */                }

/*Line 137 - 'AtomForm.js' */                if (!skip) {

/*Line 139 - 'AtomForm.js' */                    var req = AtomUI.attr(e,"atom-required");
/*Line 140 - 'AtomForm.js' */                    if (req && !val) {
/*Line 141 - 'AtomForm.js' */                        // error...
/*Line 142 - 'AtomForm.js' */                        AtomProperties.text(ef, "Required");
/*Line 143 - 'AtomForm.js' */                        $(e).addClass("atom-data-error");
/*Line 144 - 'AtomForm.js' */                        return false;
/*Line 145 - 'AtomForm.js' */                    }


/*Line 148 - 'AtomForm.js' */                    var re = AtomUI.attr(e, "atom-regex");
/*Line 149 - 'AtomForm.js' */                    if (!re) {
/*Line 150 - 'AtomForm.js' */                        var dt = AtomUI.attr(e, "atom-data-type");
/*Line 151 - 'AtomForm.js' */                        if (dt) {
/*Line 152 - 'AtomForm.js' */                            switch (dt) {
/*Line 153 - 'AtomForm.js' */                                case "email":
/*Line 154 - 'AtomForm.js' */                                    re = /^(([^<>()\[\]\\.,;:\s@\"]+(\.[^<>()\[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
/*Line 155 - 'AtomForm.js' */                                    break;
/*Line 156 - 'AtomForm.js' */                            }
/*Line 157 - 'AtomForm.js' */                        }
/*Line 158 - 'AtomForm.js' */                    } else {
/*Line 159 - 'AtomForm.js' */                        re = eval("(" + re + ")");
/*Line 160 - 'AtomForm.js' */                    }

/*Line 162 - 'AtomForm.js' */                    if (re) {
/*Line 163 - 'AtomForm.js' */                        if (!re.test(val)) {
/*Line 164 - 'AtomForm.js' */                            $(ef).text("Invalid");
/*Line 165 - 'AtomForm.js' */                            $(e).addClass("atom-data-error");
/*Line 166 - 'AtomForm.js' */                            return false;
/*Line 167 - 'AtomForm.js' */                        }
/*Line 168 - 'AtomForm.js' */                    }

/*Line 170 - 'AtomForm.js' */                    $(ef).text("");
/*Line 171 - 'AtomForm.js' */                    $(e).removeClass("atom-data-error");
/*Line 172 - 'AtomForm.js' */                }

/*Line 174 - 'AtomForm.js' */                // return for every children??
/*Line 175 - 'AtomForm.js' */                var ae = new ChildEnumerator(e);
/*Line 176 - 'AtomForm.js' */                var isValid = true;
/*Line 177 - 'AtomForm.js' */                while (ae.next()) {
/*Line 178 - 'AtomForm.js' */                    if (!this.validate(ae.current(), ef)) {
/*Line 179 - 'AtomForm.js' */                        isValid = false;
/*Line 180 - 'AtomForm.js' */                    }
/*Line 181 - 'AtomForm.js' */                }

/*Line 183 - 'AtomForm.js' */                return isValid;
/*Line 184 - 'AtomForm.js' */            }
681792
function (item) {
/*Line 244 - 'AtomItemsControl.js' */                if (item == null)
/*Line 245 - 'AtomItemsControl.js' */                    return -1;
/*Line 246 - 'AtomItemsControl.js' */                var array = this.get_dataItems();
/*Line 247 - 'AtomItemsControl.js' */                var ae = new AtomEnumerator(array);
/*Line 248 - 'AtomItemsControl.js' */                while (ae.next()) {
/*Line 249 - 'AtomItemsControl.js' */                    if (ae.current() == item)
/*Line 250 - 'AtomItemsControl.js' */                        return ae.currentIndex();
/*Line 251 - 'AtomItemsControl.js' */                }
/*Line 252 - 'AtomItemsControl.js' */                return -1;
/*Line 253 - 'AtomItemsControl.js' */            }
100906
function () {

/*Line 466 - 'AtomControl.js' */                this.onCreateChildren(this._element);

/*Line 468 - 'AtomControl.js' */                var t = this.getTemplate("template");

/*Line 470 - 'AtomControl.js' */                if (t) {
/*Line 471 - 'AtomControl.js' */                    var ce = new ChildEnumerator(this._element);
/*Line 472 - 'AtomControl.js' */                    // check if there is any children or not..
/*Line 473 - 'AtomControl.js' */                    if (!ce.next()) {
/*Line 474 - 'AtomControl.js' */                        if (t.constructor == String) {
/*Line 475 - 'AtomControl.js' */                            this._element.innerHTML = t;
/*Line 476 - 'AtomControl.js' */                            var caller = this;
/*Line 477 - 'AtomControl.js' */                            $(this._element).children().each(function () {
/*Line 478 - 'AtomControl.js' */                                this._templateParent = caller;
/*Line 479 - 'AtomControl.js' */                            });
/*Line 480 - 'AtomControl.js' */                        } else {
/*Line 481 - 'AtomControl.js' */                            //this._element.innerHTML = this._template;
/*Line 482 - 'AtomControl.js' */                            if (AtomUI.isNode(t)) {
/*Line 483 - 'AtomControl.js' */                                t = AtomUI.cloneNode(t);
/*Line 484 - 'AtomControl.js' */                                t._templateParent = this;
/*Line 485 - 'AtomControl.js' */                                this._element.appendChild(t);
/*Line 486 - 'AtomControl.js' */                            } else {
/*Line 487 - 'AtomControl.js' */                                // should be an array...
/*Line 488 - 'AtomControl.js' */                                var ae = new AtomEnumerator(t);
/*Line 489 - 'AtomControl.js' */                                while (ae.next()) {
/*Line 490 - 'AtomControl.js' */                                    var tc = ae.current();
/*Line 491 - 'AtomControl.js' */                                    tc = AtomUI.cloneNode(tc);
/*Line 492 - 'AtomControl.js' */                                    tc._templateParent = this;
/*Line 493 - 'AtomControl.js' */                                    this._element.appendChild(tc);
/*Line 494 - 'AtomControl.js' */                                }
/*Line 495 - 'AtomControl.js' */                            }
/*Line 496 - 'AtomControl.js' */                        }
/*Line 497 - 'AtomControl.js' */                        this.onCreateChildren(this._element);
/*Line 498 - 'AtomControl.js' */                    }
/*Line 499 - 'AtomControl.js' */                }
/*Line 500 - 'AtomControl.js' */            }
1265077
function () {
/*Line 30 - 'AtomYesNoCustom.js' */                this._onUIChanged = true;
/*Line 31 - 'AtomYesNoCustom.js' */                var val = $(this._input).val();
/*Line 32 - 'AtomYesNoCustom.js' */                AtomBinder.setValue(this, "value", val);
/*Line 33 - 'AtomYesNoCustom.js' */                this._onUIChanged = false;
/*Line 34 - 'AtomYesNoCustom.js' */            }
532478
function (f) {
/*Line 171 - 'AtomItemsControl.js' */                if (f == this._filter)
/*Line 172 - 'AtomItemsControl.js' */                    return;
/*Line 173 - 'AtomItemsControl.js' */                this._filter = f;
/*Line 174 - 'AtomItemsControl.js' */                this._filteredItems = null;
/*Line 175 - 'AtomItemsControl.js' */                if (this.hasItems()) {
/*Line 176 - 'AtomItemsControl.js' */                    this.onCollectionChangedInternal("refresh", -1, null);
/*Line 177 - 'AtomItemsControl.js' */                }
/*Line 178 - 'AtomItemsControl.js' */            }
77411
function (v) {

/*Line 486 - 'AtomControl.js' */                var vm = this._localViewModel;
/*Line 487 - 'AtomControl.js' */                if (vm && vm.dispose) {
/*Line 488 - 'AtomControl.js' */                    vm.dispose();
/*Line 489 - 'AtomControl.js' */                }

/*Line 491 - 'AtomControl.js' */                this._localViewModel = v;

/*Line 493 - 'AtomControl.js' */                function propogate(e) {
/*Line 494 - 'AtomControl.js' */                    var ae = new ChildEnumerator(e);
/*Line 495 - 'AtomControl.js' */                    while (ae.next()) {
/*Line 496 - 'AtomControl.js' */                        var child = ae.current();
/*Line 497 - 'AtomControl.js' */                        if (child.atomControl && child.atomControl._created) {
/*Line 498 - 'AtomControl.js' */                            var ctrl = child.atomControl;
/*Line 499 - 'AtomControl.js' */                            if (ctrl._localViewModel !== undefined)
/*Line 500 - 'AtomControl.js' */                                continue;
/*Line 501 - 'AtomControl.js' */                            Atom.refresh(ctrl, "localViewModel");
/*Line 502 - 'AtomControl.js' */                        }
/*Line 503 - 'AtomControl.js' */                        propogate(child);
/*Line 504 - 'AtomControl.js' */                    }
/*Line 505 - 'AtomControl.js' */                };
/*Line 506 - 'AtomControl.js' */                propogate(this._element);
/*Line 507 - 'AtomControl.js' */            }
19117
function (control, element, key, path, twoWays, jq, vf, events) {
/*Line 8 - 'AtomBinding.js' */            this.element = element;
/*Line 9 - 'AtomBinding.js' */            this.control = control;
/*Line 10 - 'AtomBinding.js' */            this.vf = vf;
/*Line 11 - 'AtomBinding.js' */            this.key = key;
/*Line 12 - 'AtomBinding.js' */            this.events = events;

/*Line 14 - 'AtomBinding.js' */            if ($.isArray(path)) {
/*Line 15 - 'AtomBinding.js' */                this.pathList = [];
/*Line 16 - 'AtomBinding.js' */                this.path = [];
/*Line 17 - 'AtomBinding.js' */                var ae = new AtomEnumerator(path);
/*Line 18 - 'AtomBinding.js' */                while (ae.next()) {
/*Line 19 - 'AtomBinding.js' */                    var item = ae.current();
/*Line 20 - 'AtomBinding.js' */                    if (!$.isArray(item)) {
/*Line 21 - 'AtomBinding.js' */                        this.path.push({ path: item, value: null });
/*Line 22 - 'AtomBinding.js' */                        continue;
/*Line 23 - 'AtomBinding.js' */                    }
/*Line 24 - 'AtomBinding.js' */                    var pe = new AtomEnumerator(item);
/*Line 25 - 'AtomBinding.js' */                    var p = [];
/*Line 26 - 'AtomBinding.js' */                    while (pe.next()) {
/*Line 27 - 'AtomBinding.js' */                        p.push({ path: pe.current(), value: null });
/*Line 28 - 'AtomBinding.js' */                    }
/*Line 29 - 'AtomBinding.js' */                    this.pathList.push(p);
/*Line 30 - 'AtomBinding.js' */                }
/*Line 31 - 'AtomBinding.js' */                if (this.path.length) {
/*Line 32 - 'AtomBinding.js' */                    this.pathList = null;
/*Line 33 - 'AtomBinding.js' */                } else {
/*Line 34 - 'AtomBinding.js' */                    this.path = null;
/*Line 35 - 'AtomBinding.js' */                }

/*Line 37 - 'AtomBinding.js' */            } else {
/*Line 38 - 'AtomBinding.js' */                var ae = new AtomEnumerator(path.split("."));
/*Line 39 - 'AtomBinding.js' */                this.path = [];
/*Line 40 - 'AtomBinding.js' */                while (ae.next()) {
/*Line 41 - 'AtomBinding.js' */                    this.path.push({ path: ae.current(), value: null });
/*Line 42 - 'AtomBinding.js' */                }
/*Line 43 - 'AtomBinding.js' */            }
/*Line 44 - 'AtomBinding.js' */            this.twoWays = twoWays;
/*Line 45 - 'AtomBinding.js' */            this.jq = jq;
/*Line 46 - 'AtomBinding.js' */            this._isUpdating = false;
/*Line 47 - 'AtomBinding.js' */        }
914806
function (element, value) {
/*Line 83 - 'AtomControl.js' */        if (element.checked != value) {
/*Line 84 - 'AtomControl.js' */            element.checked = value ? true : false;
/*Line 85 - 'AtomControl.js' */        }
/*Line 86 - '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' */            }
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' */            }