/** * QLIB 1.0 Text Label * Copyright (C) 2002 2003, Quazzle.com Serge Dolgov * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * http://qlib.quazzle.com */ function QLabel_set_ie(value) { this.label.innerText = (this.value = value) || "\xA0"; } function QLabel_set_dom2(value) { with (this.label) { replaceChild(this.document.createTextNode((this.value = value) || "\xA0"), firstChild); } } function QLabel_set_ns4(value) { this.value = value || ""; with (this) { document.open(); document.write('
' + (clickable ? '' + value + '' : value) + '
'); document.close(); } } function QLabel_doEvent() { this.onClick(this.value, this.tag); return false; } function QLabel(parent, name, value, clickable, tooltip) { this.init(parent, name); this.value = value || ""; this.clickable = clickable || false; this.tooltip = tooltip || ""; this.doEvent = QLabel_doEvent; this.onClick = QControl.event; with (this) { if (document.getElementById || document.all) { document.write(clickable ? '
' + (value || ' ') + '
' : '
' + (value || ' ') + '
'); this.label = document.getElementById ? document.getElementById(id) : (document.all.item ? document.all.item(id) : document.all[id]); this.set = (label && (label.innerText ? QLabel_set_ie : (label.replaceChild && QLabel_set_dom2))) || QControl.nop; } else if (document.layers) { var suffix = ""; for (var j=value.length; j
' + (clickable ? '' + value + suffix + '' : value + suffix) + '
'); this.label = (this.label = document.layers["i" + id]) && label.document.layers[id]; this.document = label && label.document; this.set = (label && document) ? QLabel_set_ns4 : QControl.nop; } else { document.write("Object is not supported"); } } } QLabel.prototype = new QControl(); QLabel.TEXTQUOTA = 50;