﻿if (!SIGI) throw ("SIGI.ComboBox depends on the following scripts. Please make sure these are included.\nSIGI.js");

// === classes ===
SIGI.Label = function() {
    this._initialDisplay = "";
    this._initialClassName = "";
};
SIGI.Label.inherits(SIGI.UI.Control);

SIGI.Label.prototype.get_text = function() {
    return this.get_element().innerHTML;
};
SIGI.Label.prototype.set_text = function(pValue) {
    this.get_element().innerHTML = pValue;
};
SIGI.Label.prototype.get_enabled = function() {
    return !this.get_element().disabled;
};
SIGI.Label.prototype.set_enabled = function(pValue) {
    SIGI.changeState(this.get_element(), !pValue);
};
SIGI.Label.prototype.get_toolTip = function() {
    return this.get_element().getAttribute("tooltip");
};
SIGI.Label.prototype.set_toolTip = function(pValue) {
    this.get_element().setAttribute("tooltip", pValue);
};
SIGI.Label.prototype.get_statusText = function() {
    return this.get_element().getAttribute("statustext");
};
SIGI.Label.prototype.set_statusText = function(pValue) {
    this.get_element().setAttribute("statustext", pValue);
};
SIGI.Label.prototype.get_visible = function() {
    if (pValue) {
        this.get_element().style.display = this._initialDisplay;
    }
    else {
        this.get_element().style.display = "none";
    }
};
SIGI.Label.prototype.set_visible = function(pValue) {
    if (pValue)
        this.get_element().style.display = this._initialDisplay;
    else
        this.get_element().style.display = "none";
};
SIGI.Label.prototype.focus = function() {
    SIGI.setFocus(this.get_element());
};
SIGI.Label.prototype.initialize = function() {
    this._initialDisplay = this.get_element().style.display;
    this._initialClassName = this.get_element().className;
    var strfor = "for";
    if (ie)
        strfor = "HTML" + strfor
        if (this.get_element().getAttribute(strfor)) {
            document.getElementById(this.get_element().getAttribute(strfor)).label = this.get_element();
    }
};

