﻿// Name:        Thallo.Web.UI.WebControls.TargetButtons.scripts.TargetButtonBehavior.debug.js
// Assembly:    Thallo.Web
// Version:     1.0.0.0
// FileVersion: 1.0.0.0
/// <reference name="MicrosoftAjax.js"/>
/// <reference path="../../scripts/jquery-1.3.2-vsdoc2.js" />

Type.registerNamespace("Thallo");

Thallo.TargetButtonBehavior = function(element) {
    Thallo.TargetButtonBehavior.initializeBase(this, [element]);
}

Thallo.TargetButtonBehavior.prototype = {
    initialize: function() {
        Thallo.TargetButtonBehavior.callBaseMethod(this, 'initialize');
        var tc = $("#" + this._TargetButtonID).get(0);
        $(this._element).keydown(function(evt) {
            if (evt.keyCode == 13) {
                tc.click();
                evt.stopPropagation();
                return false;
            }
        });
    },
    dispose: function() {
        Thallo.TargetButtonBehavior.callBaseMethod(this, 'dispose');
    }
}
Thallo.TargetButtonBehavior.registerClass('Thallo.TargetButtonBehavior', Sys.UI.Behavior);
Thallo.TargetButtonBehavior.registerProperties(['TargetButtonID']);

if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();