function Progress_Bar( id, max_value, width ){
	this.current_value = 0;
	this.max_value = max_value;
	this.width = width;
	this.inc = width / max_value;
	this.do_increment = do_increment;
	this.id = id;
	//-----------
	var p_bar = $("#"+this.id);
	var p_bar_2 = $.DIV({ id:this.id + "_2" } );
	$(p_bar_2).attr( "style", "border:1px solid #214982;height:25px" );
	 
		//p_bar_inner
		var p_bar_inner = $.DIV({ id:this.id + "_inner"} );
		$(p_bar_inner).attr( "style", "width:0px;background-color:#214982;height:25px" );
		
		//p_bar_text
		var p_bar_text = $.DIV({ Class:"p_bar_text", id:this.id + "_text" }, "Processing: ");
		
			//p_bar_p1
			var p_bar_p1 = $.SPAN({ Class:"p_bar_p1", id:this.id + "_p1" }, "0");
			
			var p_bar_text_2 = $.SPAN({ Class:"p_bar_text_2" }, " of ");
			var p_bar_text_3 = $.SPAN({ Class:"p_bar_text_2" }, " Records ");
			
			//p_bar_p2
			var p_bar_p2 = $.SPAN({ Class:"p_bar_p2", id:this.id + "_p2" } );
			p_bar_text.appendChild( p_bar_p1 );
			p_bar_text.appendChild( p_bar_text_2);
			p_bar_text.appendChild( p_bar_p2 );
			p_bar_text.appendChild( p_bar_text_3);
		$(p_bar_2).append( p_bar_inner );
	$(p_bar).append( p_bar_2 );
	$(p_bar).append( p_bar_text );
	//-----------
	$("#" + this.id).width(width);
	$("#" + this.id + "_p2").text( this.max_value );
	this.record_count = 0;
	this.set_max = set_max;
	this.set_width = set_width;
}
function set_max( new_max ){
	this.max_value = new_max;
	
	$("#" + this.id + "_p2").text(new_max);
	this.inc = this.width / this.max_value;
}
function set_width( new_width ){
	this.width = new_width;
	this.inc = this.width / max_value;
}
function do_increment(){
	this.current_value += this.inc;
	this.record_count++;
	if( this.current_value >= this.width ){
		this.current_value = this.width;
		this.record_count = this.max_value;
	}
	$("#" + this.id + "_p1").text( this.record_count );
	$( "#" + this.id + "_inner").width( this.current_value );
}
