/* DynAPI Distribution HTMLComponent (HC) Class - See also quickref.htmlcomponent.html The DynAPI Distribution is distributed under the terms of the GNU LGPL license. Requires: DynElement */ function HTMLComponent(css){ this.DynElement = DynElement; this.DynElement(); this._class = css||''; this._defEvtResponse = false; // default event response type; this.HC = HTMLComponent; this.FSO = null; }; HTMLComponent.FSO = null; HTMLComponent.pixel = dynapi.functions.getImage(dynapi.library.path+'gui/images/pixel.gif',1,1); HTMLComponent._lyrSetLocation = function(x,y){ if(dynapi.ua.ns4) { this.left=x; this.top=y; } else if(dynapi.ua.ie) { this.style.pixelLeft=x; this.style.pixelTop=y; } else { this.style.left=x+'px'; this.style.top=y+'px'; } }; HTMLComponent._lyrSetVisible = function(b){ if(this._visible!=b) { if(dynapi.ua.ns4) this.visibility = b? "inherit" : "hide"; else this.style.visibility = b? "inherit" : "hidden"; } }; HTMLComponent.buildLayer = function(id,attribs,html) { var t; if(dynapi.ua.ns4) t='\n'+(html||'')+''; else t='
'+(html||'')+'
' return t; }; HTMLComponent.getLayerById = function(id,doc){ var lyr; doc=doc||document; if(dynapi.ua.ie) lyr = doc.all[id]; else if(dynapi.ua.dom) lyr = doc.getElementById(id); else if(dynapi.ua.ns4) { lyr=doc.layers[id]; if(!lyr){ var i,layers; layers = doc.layers; for (i=0;i' +'' + text +'' +'' + (dynapi.ua.ns4 ? '' : ''); return str; }; // HTML Text - usage: var t = HTMLText() HTMLText = function(css,text,color,family,size,bold,italics,underline){ var t = (text||''); if(css) return ''+t+''; else { var fs =(size==null)? '':' size="'+size+'" '; var ff =(family==null)? '':' name="'+family+'" '; var fc =(color==null)? '':' color="'+color+'" '; if(bold) t=''+t+''; if(italics) t=''+t+''; if(underline) t=''+t+''; return ''+t+''; } };