function GoogleOMeter()
{
	// private:
	
	this._chartApiUrl = "http://chart.apis.google.com/chart";
	this._width = 225;
	this._height = 110
	this._data = "50";
	this._labels = "50";
	this._scaling = "1,100";
	this._colors = "008000,ffff00,ff0000";
	this._fill = "bg,s,ffffff00";
	
	this.getWidth = function()
	{
		return this._width;
	}
	this.setWidth = function( value )
	{
		this._width = value;
	}

	this.getHeight = function()
	{
		return this._height;
	}
	this.setHeight = function( value )
	{
		this._height = value;
	}

	this.getData = function()
	{
		return this._data;
	}
	this.setData = function( value )
	{
		this._data = value;
	}

	this.getLabels = function()
	{
		return this._labels;
	}
	this.setLabels = function( value )
	{
		this._labels = value;
	}

	this.getScaling = function()
	{
		return this._scaling;
	}
	this.setScaling = function( value )
	{
		this._scaling = value;
	}

	this.getColors = function()
	{
		return this._colors;
	}
	this.setColors = function( value )
	{
		this._colors = value;
	}

	this.getFill = function()
	{
		return this._fill;
	}
	this.setFill = function( value )
	{
		this._fill = value;
	}

	this.getParameters = function()
	{
		// A dictionary of Google-o-Meter parameters
		var chartParams = {
			// Chart dimensions
			chs: this.getWidth() + "x" + this.getHeight(),
			
			// Chart type: Google-o-Meter
			cht: "gom",
			
			// Chart scaling
			chds: this.getScaling(),
			
			// Chart data
			chd: "t:" + this.getData(),
			
			// Chart label(s)
			chl: this.getLabels(),
			
			// Chart colors
			chco: this.getColors(),
			
			// Fill color
			chf: this.getFill()
		};
		
		return chartParams;
	}

	this.getQueryString = function( dict )
	{
		var items = new Array();
		
		for( var key in dict )
			items.push( escape( key ) + "=" + escape( dict[ key ] ) );
		
		return items.join( "&" );
	}
				
	this.getChartUrl = function( paramDict )
	{
		return this._chartApiUrl + "?" + this.getQueryString( paramDict );
	}
	
	this.getImageHtml = function( chartUrl )
	{
		return "<img alt='Gauge Chart'"
				+ " width='" + this.getWidth() + "'"
				+ " height='" + this.getHeight() + "'"
				+ " src='" + chartUrl + "'"
			+ " />";
	}
	
	this.draw = function( id )
	{
		var container = document.getElementById( id );
		
		if( container != null )
		{
			var chartParams = this.getParameters();
			var chartUrl = this.getChartUrl( chartParams );
			
			chartUrl = chartUrl.replace( "&", "&amp;" );
			
			container.innerHTML = this.getImageHtml( chartUrl );
		}
	}
}
