//-----------------------------------------------------------------------
// Copyright (C) Motorwebs Corporation. All rights reserved.
//-----------------------------------------------------------------------
// Vehicle Configurator Class

Type.registerNamespace('Motorwebs.UI');

Motorwebs.UI.Config = function(element) {
    Motorwebs.UI.Config.initializeBase(this, [element]);

    this._json = "";
    this._index = 0;
    this._timer = null;
    this._rotator = null;
    this._formName = "";
    this._tickHandler = null;
    this._navHookedUp = false;
    this._formMessageTitle = "";

    // --------- elements ------------------------
    this._state = null;
    this._head = null;
    this._body = null;
    this._form = null;
    this._stockImage = null;
    this._colorName = null;
    this._stylesSelect = null;
    this._stylesSelectImage = null;

    // -------overlay / loader -----
    this._loader = null;
    this._overlay = null;
    this._loaderImagePath = "";
    this._loaderImageWidth = "";
    this._loaderImageHeight = "";

    // --------- nav/ subnav ----------
    this._nav = null;
    this._subNav = null;
    this._buildNav = null;
    this._consumerNav = null;
    this._techSpecsNav = null;
    this._standardOptionsNav = null;
    this._editorialsNav = null;
    this._navHookedUp = false;
    this._subNavMessage = null;
    this._colorsSubNav = null;
    this._optionsSubNav = null;
    this._quoteSubNav = null;

    // ------- totals ------
    this._totalMsrp = null;
    this._baseMrsp = null;
    this._destination = null;
    this._optionsMsrp = null;

    // ------- conflict ------
    this._conflict = null;
    this._optionCode = "";
}

Motorwebs.UI.Config.prototype = {

    initialize: function() {
        Motorwebs.UI.Config.callBaseMethod(this, 'initialize');

        $addHandlers(this._nav, { click: this._onNavClick }, this);
        $addHandlers(this._stylesSelect, { change: this._onStylesSelectChange }, this);

        this._rotator = eval('(' + this._json + ')');
        this._stockImage.src = this._rotator[0].url;

        // need this to make the tick handler scope  class members
        this._tickHandler = Function.createDelegate(this, this._onTimerTick);
        this._timer = new Sys.Timer();
        this._timer.add_tick(this._tickHandler);
        this._timer.set_interval(3000);
        this._timer.set_enabled(true);
    },

    dispose: function() {
        $clearHandlers(this._nav);
        $clearHandlers(this._stylesSelect);

        if (this._timer) {
            this._timer.dispose();
            this._timer = null;
        }

        Motorwebs.UI.Config.callBaseMethod(this, 'dispose');
    },

    // service request event handlers /////////////////////////////////////////////////
    _onStylesSelectChange: function(e) {
        Sys.Application.addHistoryPoint({ type: "styleSelected", index: __stateHistoryIndex, "sid": e.target.value });
    },

    _onBuildNavClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "build", index: __stateHistoryIndex });
    },

    _onConsumerNavClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "consumerInfo", index: __stateHistoryIndex });
    },

    _onTechSpecsNavClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "techSpecs", index: __stateHistoryIndex });
    },

    _onStandardOptionsNavClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "standardOptions", index: __stateHistoryIndex });
    },

    _onEditorialsNavClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "editorials", index: __stateHistoryIndex });
    },

    _onColorsSubNavClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "colors-subnav", index: __stateHistoryIndex });
    },

    _onOptionsSubNavClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "options-subnav", index: __stateHistoryIndex });
    },

    _onQuoteSubNavClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "quote-subnav", index: __stateHistoryIndex });
    },

    _onPrintClick: function() {
        Sys.Application.addHistoryPoint({ type: "print", index: __stateHistoryIndex });
    },

    _onColorClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "selectColor", index: __stateHistoryIndex, colorID: e.target.id });
    },

    _onColorInteriorClick: function(e) {
        Sys.Application.addHistoryPoint({ type: "selectColorInterior", index: __stateHistoryIndex, colorID: e.target.innerHTML });
    },

    _onOptionClick: function(e) {
        var i = 0;
        var el = e.target;
        while (el.title == "" && i < 5) {
            el = el.parentNode;
            i += 1;
        }
        this._optionCode = el.title;
        Sys.Application.addHistoryPoint({ type: "optionToggle", index: __stateHistoryIndex, code: this._optionCode });
    },

    _onQuoteFormSubmit: function(e) {

        if (!this._validateForm()) return false;

        if (this._loader) {
            var formBounds = $common.getBounds(this._form);
            this._overlay.style.width = formBounds.width + "px";
            this._overlay.style.height = formBounds.height + "px";
            $common.setLocation(this._overlay, { x: formBounds.x, y: formBounds.y });
            $common.setElementOpacity(this._overlay, .6);
            this._overlay.style.display = "block";
            this._loaderShow(formBounds);
        }

        // create form post
        var names = "FormName|Section_Contact|First Name|Last Name|Email|Phone|Comments";

        var sb = new Sys.StringBuilder();
        sb.append(this._formName);
        sb.append("|");
        sb.append(this._formMessageTitle);
        sb.append("|");
        sb.append($get("cf-firstName").value);
        sb.append("|");
        sb.append($get("cf-lastName").value);
        sb.append("|");
        sb.append($get("cf-email").value);
        sb.append("|");
        sb.append($get("cf-phone").value);
        sb.append("|");
        sb.append($get("cf-comments").innerHTML);
        var values = sb.toString();

        var request = new Motorwebs.NET35.VehicleConstruct.ConfigRequest();
        request.Type = "quoteFormSubmit";
        request.FormNames = names;
        request.FormValues = values;
        request.ConfigState = this._state.value;
        VehicleConstruct.Configure(request, onSuccess, onFailure, 'quoteFormSubmit');
    },

    _onConflictConfirmAcceptClick: function() {
        this._conflict.style.display = "none";
        this._overlay.style.display = "none";
        var request = new Motorwebs.NET35.VehicleConstruct.ConfigRequest();
        request.Type = "optionToggle";
        request.ConfigState = this._state.value;
        request.OptionCode = this._optionCode;
        VehicleConstruct.Configure(request, onSuccess, onFailure, 'optionToggle');
    },

    _onConflictChoiceAcceptClick: function() {
        this._conflict.style.display = "none";
        this._overlay.style.display = "none";
        var request = new Motorwebs.NET35.VehicleConstruct.ConfigRequest();
        request.Type = "optionToggle";
        request.ConfigState = this._state.value;

        var optionCode = "";
        var radio = document.forms[0].elements["ChoiceOptionCode"];
        for (var i = 0; i < radio.length; i++) {
            if (radio[i].checked) {
                optionCode = radio[i].value;
                break;
            }
        }
        request.OptionCode = optionCode;
        VehicleConstruct.Configure(request, onSuccess, onFailure, 'optionToggle');
    },

    // event handlers ////////////////////////////////////////////////////////////////
    _onTimerTick: function(e) {
        if (this._index == this._rotator.length - 1)
            this._index = 0;
        else
            this._index += 1;
        this._stockImage.src = this._rotator[this._index].url;
        if (document.all) {
            this._stockImage.className = "configStockImageFilter";
            this._stockImage.filters[0].apply();
            this._stockImage.filters[0].play();
        }
    },

    _onNavClick: function(e) {
        alert("Please Select a Style First!");
    },

    _onBuildNavMouseOver: function() {
        if (__selectedNav != this) this.className = "buildNavOn";
    },

    _onBuildNavMouseOut: function(e) {
        if (__selectedNav != this) this.className = "buildNavOff";
    },

    _onConsumerNavMouseOver: function() {
        if (__selectedNav != this) this.className = "consumerInfoNavOn";
    },

    _onConsumerNavMouseOut: function(e) {
        if (__selectedNav != this) this.className = "consumerInfoNavOff";
    },

    _onTechSpecsNavMouseOver: function() {
        if (__selectedNav != this) this.className = "techSpecsNavOn";
    },

    _onTechSpecsNavMouseOut: function(e) {
        if (__selectedNav != this) this.className = "techSpecsNavOff";
    },

    _onStandardOptionsNavMouseOver: function() {
        if (__selectedNav != this) this.className = "standardOptionsNavOn";
    },

    _onStandardOptionsNavMouseOut: function(e) {
        if (__selectedNav != this) this.className = "standardOptionsNavOff";
    },

    _onEditorialsNavMouseOver: function() {
        if (__selectedNav != this) this.className = "editorialsNavOn";
    },

    _onEditorialsNavMouseOut: function(e) {
        if (__selectedNav != this) this.className = "editorialsNavOff";
    },

    _onColorMouseOut: function(e) {
        //Sys.Debug.traceDump(e.target);
        var img = e.target;
        if (img != __selectedColor) img.parentNode.className = "configColor";
    },

    _onColorMouseOver: function(e) {
        //Sys.Debug.traceDump(e.target);
        var img = e.target;
        if (img != __selectedColor) {

            img.parentNode.className = "configColorSelected";

            // if no selected color swap out image and name
            if (!__selectedColor) {
                var index = parseInt(img.parentNode.id) - 1;

                // get interior colors
                var interiorColors = $get("configColorsInterior");
                var arr = this._rotator[index].interior;
                var sb = new Sys.StringBuilder();
                sb.append("<ul>");
                for (var i = 0; i < arr.length; i++) {
                    sb.append("<li id=\"");
                    sb.append(arr[i]);
                    sb.append("\" class=\"configColorInterior\">");
                    sb.append(arr[i]);
                    sb.append("</li>");
                }
                sb.append("</ul>");
                interiorColors.innerHTML = sb.toString();
                this._hookupColorsInterior();

                this._stockImage.src = this._rotator[index].url;
                this._colorName.innerHTML = " - " + this._rotator[index].name;
            }
        }
    },

    _onColorInteriorMouseOver: function() {
        if (this != __selectedColorInterior) this.className = "configColorInteriorSelected";
    },

    _onColorInteriorMouseOut: function() {
        if (this != __selectedColorInterior) this.className = "configColorInterior";
    },

    _onOptionMouseOver: function() {
        Sys.UI.DomElement.addCssClass(this, "configOptionSelected");
    },

    _onOptionMouseOut: function() {
        Sys.UI.DomElement.removeCssClass(this, "configOptionSelected");
    },

    _onQuoteFormClick: function() {
        this.value = "";
    },

    _onConflictCancelClick: function() {
        this._conflict.style.display = "none";
        this._overlay.style.display = "none";
    },

    _onColorsSubNavMouseOver: function() {
        if (__selectedSubNav != this) this.className = "colorsSubNavOn";
    },

    _onColorsSubNavMouseOut: function() {
        if (__selectedSubNav != this) this.className = "colorsSubNavOff";
    },

    _onOptionsSubNavMouseOver: function() {
        if (__selectedSubNav != this) this.className = "optionsSubNavOn";
    },

    _onOptionsSubNavMouseOut: function() {
        if (__selectedSubNav != this) this.className = "optionsSubNavOff";
    },

    _onQuoteSubNavMouseOver: function() {
        if (__selectedSubNav != this) this.className = "quoteSubNavOn";
    },

    _onQuoteSubNavMouseOut: function() {
        if (__selectedSubNav != this) this.className = "quoteSubNavOff";
    },

    _onPrintCloseClick: function() {
        this._overlay.innerHTML = "";
        this._overlay.style.display = "none";
    },

    // public methods ////////////////////////////////////////////////////////////////
    onServiceSuccess: function(response, context) {
        switch (context) {
            case "styleSelected":
                __selectedColor = null;
                this._state.value = response.ConfigState;
                this._head.innerHTML = response.HeadHtml;
                $get("configLinks").innerHTML = response.LinksHtml;
                this._body.innerHTML = response.BodyHtml;
                if (response.RotatorJson != "") {
                    this._rotator = eval('(' + response.RotatorJson + ')');
                    this._stockImage.src = this._rotator[0].url;
                }
                this._hookupTotals();
                this._hookupNavItems();
                this._hookupSubNavItems();
                this._hookupColors();
                this._hookupColorsInterior();
                this._timer.set_enabled(false);
                break;
            case "optionToggle":
                this._state.value = response.ConfigState;
                if (response.HasConflict == "true")
                    this._showConflict(response);
                else {
                    this._body.innerHTML = response.BodyHtml;
                    this._baseMrsp.innerHTML = response.BaseMsrp;
                    this._destination.innerHTML = response.Destination;
                    this._optionsMsrp.innerHTML = response.OptionsMsrp;
                    this._totalMsrp.innerHTML = response.TotalMsrp;
                    this._hookupOptions();
                }
                break;
            case "selectColorInterior":
                this._state.value = response.ConfigState;
                break;
            case "selectColor":
                this._state.value = response.ConfigState;
                break;
            case "build":
                this._subNav.style.display = "block";
                this._body.innerHTML = response.BodyHtml;
                this._hookupColors();
                this._hookupColorsInterior();
                break;
            case "consumerInfo":
                this._subNav.style.display = "none";
                this._body.innerHTML = response.BodyHtml;
                break;
            case "techSpecs":
                this._subNav.style.display = "none";
                this._body.innerHTML = response.BodyHtml;
                break;
            case "standardOptions":
                this._subNav.style.display = "none";
                this._body.innerHTML = response.BodyHtml;
                break;
            case "editorials":
                this._subNav.style.display = "none";
                this._body.innerHTML = response.BodyHtml;
                break;
            case "colors-subnav":
                this._subNav.style.display = "block";
                this._body.innerHTML = response.BodyHtml;
                this._hookupColors();
                this._hookupColorsInterior();
                break;
            case "options-subnav":
                this._subNav.style.display = "block";
                this._body.innerHTML = response.BodyHtml;
                this._hookupOptions();
                break;
            case "quote-subnav":
                this._subNav.style.display = "block";
                this._body.innerHTML = response.BodyHtml;
                this._hookupQuoteForm();
                break;
            case "quoteFormSubmit":
                this._hideLoader();
                this._form.innerHTML = "<p style='font-weight: bold; font-size: 12px; padding: 15px;'>" + response.BodyHtml + "<br /><br /></p>";
                break;
            case "print-subnav":
                this._showPrint(response);
                break;
        }
    },

    setColorizedImage: function(index) {
        this._stockImage.src = this._rotator[index].url;
        this._colorName.innerHTML = " - " + this._rotator[index].name;
    },

    // private methods ////////////////////////////////////////////////////////////////
    _hookupNavItems: function() {

        if (!this._navHookedUp) {
            $clearHandlers(this._nav);

            $addHandlers(this._buildNav, { click: this._onBuildNavClick }, this);
            $addHandlers(this._buildNav, { mouseover: this._onBuildNavMouseOver, mouseout: this._onBuildNavMouseOut }, this._buildNav);

            $addHandlers(this._consumerNav, { click: this._onConsumerNavClick }, this);
            $addHandlers(this._consumerNav, { mouseover: this._onConsumerNavMouseOver, mouseout: this._onConsumerNavMouseOut }, this._consumerNav);

            $addHandlers(this._techSpecsNav, { click: this._onTechSpecsNavClick }, this);
            $addHandlers(this._techSpecsNav, { mouseover: this._onTechSpecsNavMouseOver, mouseout: this._onTechSpecsNavMouseOut }, this._techSpecsNav);

            $addHandlers(this._standardOptionsNav, { click: this._onStandardOptionsNavClick }, this);
            $addHandlers(this._standardOptionsNav, { mouseover: this._onStandardOptionsNavMouseOver, mouseout: this._onStandardOptionsNavMouseOut }, this._standardOptionsNav);

            $addHandlers(this._editorialsNav, { click: this._onEditorialsNavClick }, this);
            $addHandlers(this._editorialsNav, { mouseover: this._onEditorialsNavMouseOver, mouseout: this._onEditorialsNavMouseOut }, this._editorialsNav);

            this._navHookedUp = true;
        }

        if (__selectedNav) {
            if (__selectedNav != this._buildNav) __selectedNav.className = __selectedNavClass;
        }

        this._buildNav.className = "buildNavOn";
        __selectedNav = this._buildNav;
        __selectedNavClass = "buildNavOff";
    },

    _hookupSubNavItems: function() {

        this._subNav.style.display = "block";
        this._subNavMessage = $get("configSubNavMessage");

        this._colorsSubNav = $get("configSubNavColors");
        $addHandlers(this._colorsSubNav, { click: this._onColorsSubNavClick }, this);
        $addHandlers(this._colorsSubNav, { mouseover: this._onColorsSubNavMouseOver, mouseout: this._onColorsSubNavMouseOut }, this._colorsSubNav);

        this._optionsSubNav = $get("configSubNavOptions");
        $addHandlers(this._optionsSubNav, { click: this._onOptionsSubNavClick }, this);
        $addHandlers(this._optionsSubNav, { mouseover: this._onOptionsSubNavMouseOver, mouseout: this._onOptionsSubNavMouseOut }, this._optionsSubNav);

        this._quoteSubNav = $get("configSubNavQuote");
        $addHandlers(this._quoteSubNav, { click: this._onQuoteSubNavClick }, this);
        $addHandlers(this._quoteSubNav, { mouseover: this._onQuoteSubNavMouseOver, mouseout: this._onQuoteSubNavMouseOut }, this._quoteSubNav);

        if (__selectedSubNav) {
            if (__selectedSubNav != this._colorsSubNav) __selectedSubNav.className = __selectedSubNavClass;
        }

        this._colorsSubNav.className = "colorsSubNavOn";
        __selectedSubNav = this._colorsSubNav;
        __selectedSubNavClass = "colorsSubNavOff";
    },

    _hookupTotals: function() {
        this._baseMrsp = $get("ct-baseMsrp");
        this._optionsMsrp = $get("ct-optionsMsrp");
        this._destination = $get("ct-destination");
        this._totalMsrp = $get("ct-totalMsrp");
        this._links = $get("configLinks");
    },

    _showConflict: function(response) {
        this._overlayShow();

        this._conflict = $get("configConflict");
        this._conflict.innerHTML = response.BodyHtml;

        var accept = $get("configConflictAccept");
        var cancel = $get("configConflictCancel");

        switch (response.ConflictStatus) {
            case "UserConfirmationNeeded":
                $addHandlers(accept, { click: this._onConflictConfirmAcceptClick }, this);
                $addHandlers(cancel, { click: this._onConflictCancelClick }, this);
                break;
            case "UserChoiceNeeded":
                $addHandlers(accept, { click: this._onConflictChoiceAcceptClick }, this);
                $addHandlers(cancel, { click: this._onConflictCancelClick }, this);
                break;
            default:
                break;
        }

        var width = $common.parseUnit($common.getCurrentStyle(this._conflict, "width"));
        var height = $common.parseUnit($common.getCurrentStyle(this._conflict, "height"));
        var scrollTop = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);

        var cb = $common.getClientBounds();
        var x = Math.round(cb.width / 2 - width.size / 2);
        var y = Math.round(scrollTop + (cb.height / 2 - height.size / 2) + 100);
        if (y < 0) y = 0;
        Sys.UI.DomElement.setLocation(this._conflict, x, y);

        this._conflict.style.display = "block";
    },

    _showPrint: function(response) {

        Sys.UI.DomElement.setLocation(this._overlay, 0, 0);
        $common.setElementOpacity(this._overlay, 1);
        this._overlay.innerHTML = response.BodyHtml;
        this._overlay.style.display = "block";
        this._overlay.style.width = "100%";

        var close = $get("configPrintClose");
        $addHandlers(close, { click: this._onPrintCloseClick }, this);
    },

    _hookupColors: function() {
        var img = null;
        var child = null;
        this._colorName = $get("configColorName");
        var colors = $get("configColors");
        if (colors) {
            colors = $common.getFirstChild(colors);
            for (var i = 0; i < colors.childNodes.length; i++) {
                child = colors.childNodes[i];
                if (child.nodeType == 1) {
                    img = $common.getFirstChild(child);
                    if (child.className == "configColorSelected") {
                        __selectedColor = img;
                        this._colorName.innerHTML = " - " + this._rotator[parseInt(child.id) - 1].name;
                    }
                    $addHandlers(img, { click: this._onColorClick }, this);
                    $addHandlers(img, { mouseover: this._onColorMouseOver, mouseout: this._onColorMouseOut }, this);
                }
            }
        }
    },

    _hookupColorsInterior: function() {
        var img = null;
        var child = null;
        var colors = $get("configColorsInterior");
        if (colors) {
            colors = $common.getFirstChild(colors);
            for (var i = 0; i < colors.childNodes.length; i++) {
                child = colors.childNodes[i];
                if (child.nodeType == 1) {
                    if (child.className == "configColorSelected") __selectedColorInterior = child;
                    $addHandlers(child, { click: this._onColorInteriorClick }, this);
                    $addHandlers(child, { mouseover: this._onColorInteriorMouseOver, mouseout: this._onColorInteriorMouseOut }, child);
                }
            }
        }
    },

    _hookupOptions: function() {
        var code = "";
        var child = null;
        var options = $get("configOptions");
        if (options) {
            for (var i = 0; i < options.childNodes.length; i++) {
                child = options.childNodes[i];
                if (child.nodeType == 1 && child.tagName == "DIV") {
                    $addHandlers(child, { click: this._onOptionClick }, this);
                    $addHandlers(child, { mouseover: this._onOptionMouseOver, mouseout: this._onOptionMouseOut }, child);
                }
            }
        }
    },

    _hookupQuoteForm: function() {
        var child = null;
        this._form = $get("configForm");
        var el = $common.getFirstChild(this._form);
        for (var i = 0; i < el.childNodes.length; i++) {
            child = el.childNodes[i];
            if (child.nodeType == 1) {
                $addHandlers(child, { click: this._onQuoteFormClick }, child);
            }
        }
        el = $get("cf-comments");
        $addHandlers(el, { click: this._onQuoteFormClick }, el);
        el = $get("cf-submit");
        $addHandlers(el, { click: this._onQuoteFormSubmit }, this);
        this._overlay.style.display = "none";
    },

    _validateForm: function() {
        if ($common.isNotEmpty($get("cf-firstName"))) {
            if ($common.isNotEmpty($get("cf-lastName"))) {
                if ($common.isEmailAddr($get("cf-email"))) {
                    if ($common.isNotEmpty($get("cf-phone"))) {
                        return true;
                    }
                }
            }
        }
        return false;
    },

    _loaderShow: function(elBounds) {

        this._loader.innerHTML = "<img src='" + this._loaderImagePath + "' width='" + this._loaderImageWidth + "' height='" + this._loaderImageHeight + "' />"
        var xOffset = Math.round(elBounds.width / 2) - Math.round(this._loaderImageWidth / 2);
        var yOffset = Math.round(elBounds.height / 2) - Math.round(this._loaderImageHeight / 2);

        $common.setLocation(this._loader, { x: elBounds.x + xOffset, y: elBounds.y + yOffset });
        this._loader.style.display = "block";
    },

    _hideLoader: function() {
        this._loader.style.display = "none";
        this._overlay.style.display = "none";
    },

    _overlayShow: function() {
        Sys.UI.DomElement.setLocation(this._overlay, 0, 0);
        $common.setElementOpacity(this._overlay, .5);

        var scrollWidth = (document.documentElement.scrollWidth ? document.documentElement.scrollWidth : document.body.scrollWidth);
        var scrollHeight = (document.documentElement.scrollHeight ? document.documentElement.scrollHeight : document.body.scrollHeight);

        this._overlay.style.width = scrollWidth + "px";
        this._overlay.style.height = scrollHeight + "px";
        this._overlay.style.display = "block";
    },

    // public properties //////////////////////////////////////////////////////////////
    get_json: function() {
        return this._json;
    },
    set_json: function(value) {
        this._json = value;
    },

    get_state: function() {
        return this._state;
    },
    set_state: function(value) {
        this._state = value;
    },

    get_head: function() {
        return this._head;
    },
    set_head: function(value) {
        this._head = value;
    },

    get_nav: function() {
        return this._nav;
    },
    set_nav: function(value) {
        this._nav = value;
    },

    get_subNav: function() {
        return this._subNav;
    },
    set_subNav: function(value) {
        this._subNav = value;
    },

    get_subNavMessage: function() {
        return this._subNavMessage;
    },
    set_subNavMessage: function(value) {
        this._subNavMessage = value;
    },

    get_body: function() {
        return this._body;
    },
    set_body: function(value) {
        this._body = value;
    },

    get_loader: function() {
        return this._loader;
    },
    set_loader: function(value) {
        this._loader = value;
    },

    get_overlay: function() {
        return this._overlay;
    },
    set_overlay: function(value) {
        this._overlay = value;
    },

    get_stylesSelect: function() {
        return this._stylesSelect;
    },
    set_stylesSelect: function(value) {
        this._stylesSelect = value;
    },

    get_stockImage: function() {
        return this._stockImage;
    },
    set_stockImage: function(value) {
        this._stockImage = value;
    },

    get_stylesSelectImage: function() {
        return this._stylesSelectImage;
    },
    set_stylesSelectImage: function(value) {
        this._stylesSelectImage = value;
    },

    get_buildNav: function() {
        return this._buildNav;
    },
    set_buildNav: function(value) {
        this._buildNav = value;
    },

    get_consumerNav: function() {
        return this._consumerNav;
    },
    set_consumerNav: function(value) {
        this._consumerNav = value;
    },

    get_techSpecsNav: function() {
        return this._techSpecsNav;
    },
    set_techSpecsNav: function(value) {
        this._techSpecsNav = value;
    },

    get_standardOptionsNav: function() {
        return this._standardOptionsNav;
    },
    set_standardOptionsNav: function(value) {
        this._standardOptionsNav = value;
    },

    get_editorialsNav: function() {
        return this._editorialsNav;
    },
    set_editorialsNav: function(value) {
        this._editorialsNav = value;
    },

    get_colorsSubNav: function() {
        return this._colorsSubNav;
    },
    set_colorsSubNav: function(value) {
        this._colorsSubNav = value;
    },

    get_optionsSubNav: function() {
        return this._optionsSubNav;
    },
    set_optionsSubNav: function(value) {
        this._optionsSubNav = value;
    },

    get_quoteSubNav: function() {
        return this._quoteSubNav;
    },
    set_quoteSubNav: function(value) {
        this._quoteSubNav = value;
    },

    get_formName: function() {
        return this._formName;
    },
    set_formName: function(value) {
        this._formName = value;
    },

    get_formMessageTitle: function() {
        return this._formMessageTitle;
    },
    set_formMessageTitle: function(value) {
        this._formMessageTitle = value;
    },

    get_loaderImagePath: function() {
        return this._loaderImagePath;
    },
    set_loaderImagePath: function(value) {
        this._loaderImagePath = value;
    },

    get_loaderImageWidth: function() {
        return this._loaderImageWidth;
    },
    set_loaderImageWidth: function(value) {
        this._loaderImageWidth = value;
    },

    get_loaderImageHeight: function() {
        return this._loaderImageHeight;
    },
    set_loaderImageHeight: function(value) {
        this._loaderImageHeight = value;
    }
}

Motorwebs.UI.Config.registerClass('Motorwebs.UI.Config', Sys.UI.Control);