/* DynAPI Distribution HTMLHyperLink Class The DynAPI Distribution is distributed under the terms of the GNU LGPL license. Requires: HTMLComponent */ function HTMLHyperLink(css,text,url,title){ this.HTMLComponent = HTMLComponent; this.HTMLComponent(css); this.url=url; this._text=text||''; this._title=title||''; this._defEvtResponse = false; // By default HyperLink events are canceled (return false) }; var p = dynapi.setPrototype('HTMLHyperLink','HTMLComponent'); // Methods p._assignElm = function(elm){ if(!this.parent) return; else if(!this.parent._created) return; var doc=this.parent.doc; if(!elm) { if(dynapi.ua.ie) elm=doc.all[this.id]; else if(dynapi.ua.dom) elm=doc.getElementById(this.id); else { for(i=0;i',this._text,'' ].join(''); }; p.setText = function(t) { var elm = this.getElm(); if(elm){ if(dynapi.ua.ns4) elm.text = t; // not supported in ns4? else elm.innerHTML=t; } }; p.getURL = function(){ var url='',elm = this.getElm(); if(elm) url=elm.href; return url; }; p.setURL = function(url){ url=(url!=null)? url:'javascript:;'; var elm = this.getElm(); if(elm) elm.href=url; }; p.startFlash = function(fCol,tCol,ms){ this._fCol=fCol||this._fCol||'#000000'; this._tCol=tCol||this._tCol||'#FFFFFF'; this._ms=ms||this._ms||1000; if(this.getElm()){ if(!this._isLit) this._oldCol = this.css.color; if(this.css.color==this._fCol) this.css.color=this._tCol; else this.css.color=this._fCol; this._isLit=true; } this._tmr = window.setTimeout(this+'.startFlash()',this._ms); }; p.stopFlash = function(){ window.clearTimeout(this._tmr); this._tmr = 0; this._isLit = false; this.css.color = this._oldCol; };