/*
DynAPI Distribution
HTMLProgressBar Class
The DynAPI Distribution is distributed under the terms of the GNU LGPL license.
Requires: HTMLComponent
*/
function HTMLProgressBar(css,w,h,value,min,max){
this.HTMLComponent = HTMLComponent;
this.HTMLComponent(css||'HCPBar');
this.w=w||100;
this.h=h||20;
this._elmId = this.id+'HCPBar';
this._defEvtResponse = true;
this.setRange(min,max);
this.setValue(value);
};
var p = dynapi.setPrototype('HTMLProgressBar','HTMLComponent');
// Design Properties
p.backCol = '#FFFFFF';
p.barCol = '#0000AA';
p.barImage = null;
// Methods
p._assignElm = function(elm){
if(!this.parent) return;
else if(!this.parent._created) return;
var doc=this.parent.doc;
if(!elm) {
id = this._elmId;
if(dynapi.ua.ie) elm=doc.all[id];
else if(dynapi.ua.dom) elm=doc.getElementById(id);
else if(dynapi.ua.ns4) elm = doc.layers[id];
if(!elm) return;
// get gauge elm
id = this._elmId+'Gauge';
if(dynapi.ua.ie) belm=doc.all[id];
else if(dynapi.ua.dom) belm=doc.getElementById(id);
else if(dynapi.ua.ns4) belm = elm.document.layers[id];
}
this.elm = elm;
this.belm =belm;
this.css = (dynapi.ua.ns4)? elm:elm.style;
this.doc = this.parent.doc;
};
p.getInnerHTML = function(){
var ua=dynapi.ua;
var w=this.w;
var h=this.h;
w=w-4;
if(ua.ns4) h-=3;
else if(ua.ie) h-=4;
else h-=2;
w=parseInt(w*(((this._value/this._max)*100)/100));
if(ua.ns4) {
bar = '