// HWT Progress Bar

var hwt_pbrlist = new Array();


function hwtProgressBarAdd (id, alt, left, lo, hi, right, height, length, lnk) {

	hwt_pbrlist[id]=[alt, left, lo, hi, right, height, length, lnk];

}


function hwtProgressBarDraw (id, pct) {

	var out = ""
	var pctadj = Math.max(0, pct);
	var pctadj = Math.min(100, pctadj);
	var w1 = Math.round(pctadj*hwt_pbrlist[id][6]/100);
	var w2 = hwt_pbrlist[id][6] - w1;
	
	out = ('<NOBR>');

	if (hwt_pbrlist[id][7]) {

		out += '<A HREF="' + hwt_pbrlist[id][7] + '">';
	}

	out += '<IMG border="0" alt="' + hwt_pbrlist[id][0] + '" src="' + hwt_pbrlist[id][1] + '" height="' + hwt_pbrlist[id][5] + '" align="absmiddle">';

	if (w1>0) {

		out += '<IMG border="0" alt="' + hwt_pbrlist[id][0] + '" src="' + hwt_pbrlist[id][3] + '" width="' + w1 + '" height="' + hwt_pbrlist[id][5] + '" align="absmiddle">';
	}

	if (w2>0) {

		out += '<IMG border="0" alt="' + hwt_pbrlist[id][0] + '" src="' + hwt_pbrlist[id][2] + '" WIDTH="' + w2 + '" HEIGHT="' + hwt_pbrlist[id][5] + '" align="absmiddle">';
	}

	out += '<IMG border="0" alt="' + hwt_pbrlist[id][0] + '" src="' + hwt_pbrlist[id][4] + '" HEIGHT="' + hwt_pbrlist[id][5] + '" align="absmiddle">';

	if (hwt_pbrlist[id][7]) {

		out += '</A>';
	}

	out += '</NOBR>';

	return (out)

}

