derive(InputReadOnly, ClassInput);
function InputReadOnly() {

    override(this, 'Init');
    this.Init = function() {
        this.ClassInput_Init(arguments[0],arguments[1],arguments[2],arguments[3]);
        if(Designer_obj) {
            this.Property_Add(1, 'Texto Plano', 'PlainText', 'TextLang', 'TextLang');
            this.Property_Add(2, 'Texto Formato', 'RichText', 'RichText', 'RichText');
            this.Property_Add(5, 'Acci&oacute;n Click', 'ActionList', 'ActClick', 'ActClick');
            this.Property_Add(40, 'Alineaci&oacute;n', 'Combo', 'HAlign', 'HAlign', 'Left,Center,Right');
            this.Property_Add(41, 'Cambio de linea', 'Checkbox', 'Wordwrap', 'Wordwrap');
            this.Property_Add(42, 'Tipo', 'Combo', 'Type', 'Type', '0|PlainText,1|RichText,2|Id de cuenta');
            this.Property_Add(43, 'Pasar Texto', 'Checkbox', 'KeepText', 'KeepText');
        }
    }

    this.ClientToServerPass = function() {
        return this.get_KeepText() == '1' ? true : false;
    }

    this.set_Text = function(aValue) {
        if (Designer_obj) {
            this.set_Attr('t05', aValue);
            var lValue = this.get_ValueLang(aValue);
            if (lValue.substr(0, 6) == '_Cond:') {
                var lArr = lValue.split(';')[0].split('???');
                lValue = lArr.length > 1 ? lArr[1].replace('_Cond:', '') : '';
            }
            document.getElementById(this.ClientId).innerHTML = lValue == '' ? '&nbsp;' : (this.get_Type() == '1' ? lValue : lValue.replace(/\r\n/g, '<br>').replace(/\s/g, '&nbsp;'));
        } else
            document.getElementById(this.ClientId).innerHTML = aValue; // this.get_Type() == '1' ? aValue : aValue.replace(/\r\n/g, '<br>').replace(/\s/g, '&nbsp;');
    }
    this.get_Text = function() {
        if (Designer_obj)
            return this.get_Attr('t05');
        else
            return document.getElementById(this.ClientId).innerHTML.replace(/<BR>/g, '\r\n').replace(/&nbsp;/g, ' '); //this.get_Type() == '1' ? document.getElementById(this.ClientId).innerHTML : document.getElementById(this.ClientId).innerHTML.replace(/<BR>/g, '\r\n').replace(/&nbsp;/g, ' ');
    }
    this.get_TextLang = function() {
        return this.get_ValueLang(this.get_Attr('t05'));
    }
    this.set_TextLang = function(aValue) {
        this.set_Text(this.set_ValueLang(this.get_Attr('t05'), aValue));
    }
    
    this.set_RichText = function(aValue) {
        this.set_Type('1');
        this.set_Text(this.set_ValueLang(this.get_Attr('t05'), aValue));
        document.getElementById(this.ClientId).innerHTML = this.get_ValueLang(aValue);
    }
    this.get_RichText = function() {
        return this.get_ValueLang(this.get_Attr('t05'));
    }

    this.set_HAlign = function(aValue) {
        var lref = document.getElementById(this.ClientId);
        lref.style.textAlign = aValue;
        this.Frm[this.FrmCount + 1] = this.get_HAlign();
    }
    this.get_HAlign = function() {
        var lref = document.getElementById(this.ClientId);
        return lref.style.textAlign.substr(0,1).toUpperCase() + lref.style.textAlign.substr(1);
    }

    this.set_Wordwrap = function(aValue) {
        var lref = document.getElementById(this.ClientId);
        lref.style.wordWrap = aValue ? 'break-word' : '';
        this.Frm[this.FrmCount + 2] = aValue;
    }
    this.get_Wordwrap = function() {
        return this.Frm[this.FrmCount + 2];
    }
    
	this.set_HiddenClient = function(aValue) {
        var lref = document.getElementById(this.ClientId);
        lref.style.display = aValue ? 'none' : 'inline-block';
	}
    
    this.set_ActClick = function(aValue) {
        this.set_Attr('t20', aValue);
        this.Frm[this.FrmCount + 3] = aValue;
    }
    this.get_ActClick = function() {
        if(Designer_obj)
            return this.Frm[this.FrmCount + 3];
        return this.get_Attr('t20'); 
    }
    this.ExecActClick = function(aRef) {
        var lObj = window[this.get_ActClick() + '_obj'];
        if(lObj) {
            lObj.Execute(aRef);
        }
    }
    
    this.get_Type = function() {
        return this.Frm[this.FrmCount + 4];
    }
    this.set_Type = function(aValue) {
        this.Frm[this.FrmCount + 4] = aValue;
    }

    this.get_KeepText = function() {
        if(Designer_obj) {
            return this.Frm[this.FrmCount + 5] == "True" ? 1 : 0;
        } else
            return this.get_Attr('t21');        
    }
    this.set_KeepText = function(aValue) {
        this.Frm[this.FrmCount + 5] = aValue ? "True" : "False";
    }
}



