var ProgressBar =
{
	width	:	175,
	period	:	500,
	init	:	function(browser, msg, x, y, w)
				{
					this.browser = browser;
					var wd = w ? w : 180;
					this.width = wd - 5;
					this.x = x || (document.body.clientWidth - this.width)/2;
					this.y = y || (document.body.clientHeight)/2 - 60;
					document.writeln('<div id=CProgr style="position: absolute; left: 10; top: 10; z-index: 50; display: none">' +
						'<table width=' + (wd + 20) + ' bgcolor=#ffd0ff border=0 cellspacing=0 cellpadding=0>' +
						'<tr><td bgcolor=#550055 colspan=3>&nbsp;</td></tr><tr>' +
						'<td colspan=3>&nbsp;&nbsp;&nbsp;' + msg + '<br>&nbsp;</td>' +
						'</tr><tr><td width=10>&nbsp;</td>' +
						'<td><table width=' + wd + ' border=1 cellspacing=0 cellpadding=0><tr>' +
						'<td bgcolor=#ffffff><div id=ProgressBar style="background-color: #0000ff; width: 0">' +
						'<img src="/pics/0.gif" border=0 width=1 height=20></div></td>' +
						'</tr></table></td><td width=10>&nbsp;</td></tr>' +
						'<tr><td colspan=3>&nbsp;</td></tr></table></div>');
				},
	show	:	function(f)
				{
					var s = document.getElementById('CProgr').style;
				    if(this.browser.ie4up)
				    {
						s.left = document.body.scrollLeft + this.x;
						s.top = document.body.scrollTop + this.y;
					}
				    else if(this.browser.nav6up)
				    {
						s.left = window.pageXOffset + this.x;
						s.top = window.pageYOffset + this.y;
					}
					s.display = f ? '' : 'none';
				},
	start	:	function(d0)
				{
					this.d0 = d0;
					this.d = this.width * (1 - this.d0);
					this.value = 0;
					this.progress();
					this.show(true);
					this.timer = setInterval('ProgressBar.progress()', this.period);
				},
	stop	:	function()
				{
					clearInterval(this.timer);
					this.show(false);
				},
	progress:	function()
				{
					w = Math.round(this.value);
					document.getElementById('ProgressBar').style.width = w;
					this.value += this.d;
					this.d *= this.d0;
				}
}

