function TextBox(element)
{
    if (element.addEventHandler == null)
        element = Control(element);
        
    element.getValue = TextBox.prototype.getValue;
    element.setValue = TextBox.prototype.setValue;
    
    return element;
}

// Gets the value of the text box.
TextBox.prototype.getValue = function()
{
    return this.value;
};

// Sets the value of the text box.
TextBox.prototype.setValue = function(value)
{
    this.value = value;
    this.triggerEvent("change");
};

