<?php

function recuperaCodigo()
{
	return $_GET['buscid'];
}

function recuperaURL()
{
	$val = $_SERVER["REQUEST_URI"];
	$val = explode('?',$val);
	$val = $val[1];
	return $val;
}

function overallRatingGuage($overallratingvalue,$div){
$script = <<< EOH
	<script type='text/javascript' src='https://www.google.com/jsapi'></script>
	<script type='text/javascript'>
	  google.load('visualization', '1', {packages:['gauge']});
	  google.setOnLoadCallback(drawChart);
	  function drawChart() {
		var data = new google.visualization.DataTable();
		data.addColumn('string', 'Label');
		data.addColumn('number', 'Value');
		data.addRows(1);
		data.setValue(0, 0, '');
		data.setValue(0, 1, $overallratingvalue);

		var chart = new google.visualization.Gauge(document.getElementById('ovrChart1Id'));
		var options = {min: 0, max: 10, width: 700, height: 150, redFrom: 0, redTo: 3,
		yellowFrom:3, yellowTo: 7, greenFrom:7, greenTo:10, minorTicks: 5};
		chart.draw(data, options);
	}
	</script>
	<div align="center" id="$div"> </div>
EOH;
echo $script;
}

?>