﻿Type.registerNamespace("zaptechnology.com.Controls.Common");

zaptechnology.com.Controls.Common.Login = function (element) {
    zaptechnology.com.Controls.Common.Login.initializeBase(this, [element]);
};

zaptechnology.com.Controls.Common.Login.prototype = {

    initialize: function () {
        zaptechnology.com.Controls.Common.Login.callBaseMethod(this, "initialize");

        $("#" + this.get_UsernameClientId(), this.get_element()).attr("watermarkText", "Username...").watermark();
        $("#" + this.get_PasswordClientId(), this.get_element()).attr("watermarkText", "Password...").watermark();
        $("#" + this.get_LoginClientId(), this.get_element()).hoverIntent(
            function () { this.src = "/App_Themes/PartnerPortal/Images/login_ahover.png"; },
            function () { this.src = "/App_Themes/PartnerPortal/Images/login_a.png"; }
        );

        $("#" + this.get_LoginClientId(), this.get_element()).focus(
            function () { this.src = "/App_Themes/PartnerPortal/Images/login_ahover.png"; }
        );

        $("#" + this.get_LoginClientId(), this.get_element()).blur(
            function () { this.src = "/App_Themes/PartnerPortal/Images/login_a.png"; }
        );
    },

    dispose: function () {
        zaptechnology.com.Controls.Common.Login.callBaseMethod(this, "dispose");
    },

    get_UsernameClientId: function () { return this.UsernameClientId; },
    set_UsernameClientId: function (value) { this.UsernameClientId = value; },

    get_PasswordClientId: function () { return this.PasswordClientId; },
    set_PasswordClientId: function (value) { this.PasswordClientId = value; },

    get_LoginClientId: function () { return this.LoginClientId; },
    set_LoginClientId: function (value) { this.LoginClientId = value; },

    _noComma: null
};

zaptechnology.com.Controls.Common.Login.registerClass('zaptechnology.com.Controls.Common.Login', Sys.UI.Control);

if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

