// THIS FILE HAS BEEN MINIFIED

if(typeof(RGraph) == 'undefined') RGraph = {};RGraph.Progress = function (id, value, max)
{
this.id = id;this.max = max;this.value = value;this.canvas = document.getElementById(id);this.context = this.canvas.getContext('2d');this.canvas.__object__ = this;this.type = 'progress';this.coords = [];this.isRGraph = true;RGraph.OldBrowserCompat(this.context);this.properties = {
'chart.color':              '#0c0',
'chart.tickmarks':          true,
'chart.tickmarks.color':    'black',
'chart.tickmarks.inner':    false,
'chart.gutter':             25,
'chart.numticks':           10,
'chart.orientation':        'horizontal',
'chart.background.color':   '#eee',
'chart.shadow':             false,
'chart.shadow.color':       'rgba(0,0,0,0.5)',
'chart.shadow.blur':        3,
'chart.shadow.offsetx':     3,
'chart.shadow.offsety':     3,
'chart.title':              '',
'chart.title.vpos':         null,
'chart.width':              0,
'chart.height':             0,
'chart.text.size':          10,
'chart.text.color':         'black',
'chart.text.font':          'Verdana',
'chart.contextmenu':        null,
'chart.units.pre':          '',
'chart.units.post':         '',
'chart.tooltips':           [],
'chart.tooltips.effect':     'fade',
'chart.tooltips.css.class':  'RGraph_tooltip',
'chart.annotatable':        false,
'chart.annotate.color':     'black',
'chart.zoom.mode':          'canvas',
'chart.zoom.factor':        1.5,
'chart.zoom.fade.in':       true,
'chart.zoom.fade.out':      true,
'chart.zoom.hdir':          'right',
'chart.zoom.vdir':          'down',
'chart.zoom.frames':        10,
'chart.zoom.delay':         50,
'chart.zoom.shadow':        true,
'chart.zoom.background':    true,
'chart.zoom.action':        'zoom',
'chart.arrows':             false,
'chart.margin':             0,
'chart.resizable':          false,
'chart.label.inner':        false,
'chart.adjustable':         false
}
if(!this.canvas){
alert('[PROGRESS] No canvas support');return;}
if(typeof(RGraph) == 'undefined'){
alert('[PROGRESS] Fatal error: The common library does not appear to have been included');}
}
RGraph.Progress.prototype.Set = function (name, value)
{
this.properties[name.toLowerCase()] = value;}
RGraph.Progress.prototype.Get = function (name)
{
return this.properties[name.toLowerCase()];}
RGraph.Progress.prototype.Draw = function ()
{
RGraph.FireCustomEvent(this, 'onbeforedraw');this.width = this.canvas.width - (2 * this.Get('chart.gutter'));this.height = this.canvas.height - (2 * this.Get('chart.gutter'));this.coords = [];this.Drawbar();this.DrawTickMarks();this.DrawLabels();this.context.stroke();this.context.fill();if(this.Get('chart.contextmenu')){
RGraph.ShowContext(this);}
if(typeof(this.Get('chart.tooltips')) == 'function' || this.Get('chart.tooltips').length){
RGraph.Register(this);window.onclick = function ()
{
RGraph.Redraw();}
this.canvas.onclick = function (e)
{
e = RGraph.FixEventObject(e);var canvas = document.getElementById(this.id);var obj = canvas.__object__;RGraph.Redraw();var mouseCoords = RGraph.getMouseXY(e);for (var i=0; i<obj.coords.length; i++){
var mouseX = mouseCoords[0];var mouseY = mouseCoords[1];var left = obj.coords[i][0];var top = obj.coords[i][1];var width = obj.coords[i][2];var height = obj.coords[i][3];var idx = i;if(mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ){
if(typeof(obj.Get('chart.tooltips')) == 'function'){
var text = obj.Get('chart.tooltips')(idx);} else if(typeof(obj.Get('chart.tooltips')) == 'object' && typeof(obj.Get('chart.tooltips')[idx]) == 'function'){
var text = obj.Get('chart.tooltips')[idx](idx);} else if(typeof(obj.Get('chart.tooltips')) == 'object'){
var text = obj.Get('chart.tooltips')[idx];} else {
var text = null;}
if(text){
obj.context.beginPath();obj.context.strokeStyle = 'black';obj.context.fillStyle = 'rgba(255,255,255,0.5)';obj.context.strokeRect(left, top, width, height);obj.context.fillRect(left, top, width, height);obj.context.stroke();obj.context.fill();RGraph.Tooltip(canvas, text, e.pageX, e.pageY, i);}
}
}
e.stopPropagation = true;e.cancelBubble = true;}
this.canvas.onmousemove = function (e)
{
e = RGraph.FixEventObject(e);var canvas = document.getElementById(this.id);var obj = canvas.__object__;var mouseCoords = RGraph.getMouseXY(e);for (var i=0; i<obj.coords.length; i++){
var mouseX = mouseCoords[0];var mouseY = mouseCoords[1];var left = obj.coords[i][0];var top = obj.coords[i][1];var width = obj.coords[i][2];var height = obj.coords[i][3];if(mouseX >= left && mouseX <= (left + width) && mouseY >= top && mouseY <= (top + height) ){
canvas.style.cursor = document.all ? 'hand' : 'pointer';break;}
canvas.style.cursor = 'default';}
}
} else {
this.canvas.onclick = null;this.canvas.onmousemove = null;}
if(this.Get('chart.annotatable')){
RGraph.Annotate(this);}
if(this.Get('chart.zoom.mode') == 'thumbnail' || this.Get('chart.zoom.mode') == 'area'){
RGraph.ShowZoomWindow(this);}
if(this.Get('chart.resizable')){
RGraph.AllowResizing(this);}
if(this.Get('chart.adjustable')){
RGraph.AllowAdjusting(this);}
RGraph.FireCustomEvent(this, 'ondraw');}
RGraph.Progress.prototype.Drawbar = function ()
{
if(this.Get('chart.shadow')){
RGraph.SetShadow(this, this.Get('chart.shadow.color'), this.Get('chart.shadow.offsetx'), this.Get('chart.shadow.offsety'), this.Get('chart.shadow.blur'));}
if(document.all && this.Get('chart.shadow')){
this.context.fillStyle = this.Get('chart.shadow.color');this.context.fillRect(this.Get('chart.gutter') + this.Get('chart.shadow.offsetx'), this.Get('chart.gutter') + this.Get('chart.shadow.offsety'), this.width, this.height);}
this.context.fillStyle = this.Get('chart.background.color');this.context.strokeStyle = 'black';this.context.strokeRect(this.Get('chart.gutter'), this.Get('chart.gutter'), this.width, this.height);this.context.fillRect(this.Get('chart.gutter'), this.Get('chart.gutter'), this.width, this.height);RGraph.NoShadow(this);this.context.fillStyle = this.Get('chart.color');this.context.strokeStyle = 'black';var margin = this.Get('chart.margin');if(this.Get('chart.orientation') == 'horizontal'){
var barWidth = Math.min(this.width, (this.value / this.max) * this.width);if(this.Get('chart.tickmarks.inner')){
this.context.lineWidth = 1;this.context.strokeStyle = '#999';this.context.beginPath();for (var x = this.Get('chart.gutter'); x<this.canvas.width - this.Get('chart.gutter'); x+=10){
this.context.moveTo(x, this.Get('chart.gutter'));this.context.lineTo(x, this.Get('chart.gutter') + 2);this.context.moveTo(x, this.canvas.height - this.Get('chart.gutter'));this.context.lineTo(x, this.canvas.height - this.Get('chart.gutter') - 2);}
this.context.stroke();}
this.context.beginPath();this.context.strokeStyle = 'black';this.context.strokeRect(this.Get('chart.gutter'), this.Get('chart.gutter') + margin, barWidth, this.height - margin - margin);this.context.fillRect(this.Get('chart.gutter'), this.Get('chart.gutter') + margin, barWidth, this.height - margin - margin);if(this.Get('chart.arrows')){
var x = this.Get('chart.gutter') + barWidth;var y = this.Get('chart.gutter');this.context.lineWidth = 1;this.context.fillStyle = 'black';this.context.strokeStyle = 'black';this.context.beginPath();this.context.moveTo(x, y - 3);this.context.lineTo(x + 2, y - 7);this.context.lineTo(x - 2, y - 7);this.context.closePath();this.context.stroke();this.context.fill();this.context.beginPath();this.context.moveTo(x, y + this.height + 4);this.context.lineTo(x + 2, y + this.height + 9);this.context.lineTo(x - 2, y + this.height + 9);this.context.closePath();this.context.stroke();this.context.fill();}
if(this.Get('chart.label.inner')){
this.context.beginPath();this.context.fillStyle = 'black';RGraph.Text(this.context, this.Get('chart.text.font'), this.Get('chart.text.size') + 2, this.Get('chart.gutter') + barWidth + 5, this.canvas.height / 2, String(this.Get('chart.units.pre') + this.value + this.Get('chart.units.post')), 'center', 'left');this.context.fill();}
this.coords.push([this.Get('chart.gutter'),
this.Get('chart.gutter') + margin,
barWidth,
this.height - margin - margin]);} else {
this.context.lineWidth = 1;this.context.strokeStyle = '#999';if(this.Get('chart.tickmarks.inner')){
this.context.lineWidth = 1;this.context.strokeStyle = '#999';this.context.beginPath();for (var y = this.Get('chart.gutter'); y<this.canvas.height - this.Get('chart.gutter'); y+=10){
this.context.moveTo(this.Get('chart.gutter'), y);this.context.lineTo(this.Get('chart.gutter') + 3, y);this.context.moveTo(this.canvas.width - this.Get('chart.gutter'), y);this.context.lineTo(this.canvas.width - this.Get('chart.gutter') - 3, y);}
this.context.stroke();}
var barHeight = Math.min(this.height, (this.value / this.max) * this.height);this.context.beginPath();this.context.strokeStyle = 'black';this.context.strokeRect(this.Get('chart.gutter') + margin, this.Get('chart.gutter') + this.height - barHeight, this.width - margin - margin, barHeight);this.context.fillRect(this.Get('chart.gutter') + margin, this.Get('chart.gutter') + this.height - barHeight, this.width - margin - margin, barHeight);if(this.Get('chart.arrows')){
var x = this.Get('chart.gutter') - 4;var y = this.canvas.height - this.Get('chart.gutter') - barHeight;this.context.lineWidth = 1;this.context.fillStyle = 'black';this.context.strokeStyle = 'black';this.context.beginPath();this.context.moveTo(x, y);this.context.lineTo(x - 4, y - 2);this.context.lineTo(x - 4, y + 2);this.context.closePath();this.context.stroke();this.context.fill();x +=  this.width + 8;this.context.beginPath();this.context.moveTo(x, y);this.context.lineTo(x + 4, y - 2);this.context.lineTo(x + 4, y + 2);this.context.closePath();this.context.stroke();this.context.fill();}
if(this.Get('chart.label.inner')){
this.context.beginPath();this.context.fillStyle = 'black';RGraph.Text(this.context, this.Get('chart.text.font'), this.Get('chart.text.size') + 2, this.canvas.width / 2, this.canvas.height - this.Get('chart.gutter') - barHeight - 5, String(this.Get('chart.units.pre') + this.value + this.Get('chart.units.post')), 'bottom', 'center');this.context.fill();}
this.coords.push([this.Get('chart.gutter') + margin, this.Get('chart.gutter') + this.height - barHeight, this.width - margin - margin, barHeight]);}
}
RGraph.Progress.prototype.DrawTickMarks = function ()
{
this.context.strokeStyle = this.Get('chart.tickmarks.color');if(this.Get('chart.tickmarks') && this.Get('chart.orientation') == 'horizontal'){
this.tickInterval = this.width / this.Get('chart.numticks');for (var i=this.Get('chart.gutter') + this.tickInterval; i<=(this.width + this.Get('chart.gutter')); i+=this.tickInterval){
this.context.moveTo(i, this.Get('chart.gutter') + this.height);this.context.lineTo(i, this.Get('chart.gutter') + this.height + 4);}
} else if(this.Get('chart.tickmarks') && this.Get('chart.orientation') == 'vertical'){
this.tickInterval = this.height / this.Get('chart.numticks');for (var i=this.Get('chart.gutter'); i<=(this.canvas.height - this.Get('chart.gutter') - this.tickInterval); i+=this.tickInterval){
this.context.moveTo(this.canvas.width - this.Get('chart.gutter'), i);this.context.lineTo(this.canvas.width - this.Get('chart.gutter') + 4, i);}
}
this.context.stroke();}
RGraph.Progress.prototype.DrawLabels = function ()
{
this.context.fillStyle = this.Get('chart.text.color');var xPoints = [];var yPoints = [];if(this.Get('chart.orientation') == 'horizontal'){
for (i=this.Get('chart.gutter') + this.tickInterval; i <= (this.Get('chart.gutter') + this.width); i+= this.tickInterval){
xPoints.push(i);yPoints.push(this.Get('chart.gutter') + this.height + 4);}
var xAlignment = 'center';var yAlignment = 'top';this.context.beginPath();for (i=0; i<xPoints.length; ++i){
RGraph.Text(this.context,
this.Get('chart.text.font'),
this.Get('chart.text.size'),
xPoints[i],
yPoints[i],
this.Get('chart.units.pre') + String( parseInt( (this.max / xPoints.length) * (i + 1) )) + this.Get('chart.units.post'),
yAlignment,
xAlignment);}
} else {
for (i=this.Get('chart.gutter'); i < (this.canvas.height - this.tickInterval); i+= this.tickInterval){
xPoints.push(this.canvas.width - this.Get('chart.gutter') + 4);yPoints.push(i);}
var xAlignment = 'left';var yAlignment = 'center';for (i=0; i<xPoints.length; ++i){
RGraph.Text(this.context,
this.Get('chart.text.font'),
this.Get('chart.text.size'),
xPoints[i],
yPoints[i],
this.Get('chart.units.pre') + String( this.max - parseInt( (this.max / yPoints.length) * i)) + this.Get('chart.units.post'),
yAlignment,
xAlignment);}
}
if(this.Get('chart.title')){
RGraph.DrawTitle(this.canvas, this.Get('chart.title'), this.Get('chart.gutter'), 0, this.Get('chart.text.size') + 2);}
}