function change_metric(to)
  {
	if (to=="farenheit" && document.getElementById('grade_farenheit_0').className=="change_metric_active") return false;
	if (to=="celsius" && document.getElementById('grade_celsius_0').className=="change_metric_active") return false;

	if (to=="farenheit") { _id1 = "grade_celsius_"; _id2 = "grade_farenheit_"; }
					else { _id2 = "grade_celsius_"; _id1 = "grade_farenheit_"; }
	i = 0;
	while (document.getElementById(_id1+i))
	  {
		id1 = _id1 + i;
		id2 = _id2 + i;
		document.getElementById(id1).className = "change_metric_inactive";
		document.getElementById(id2).className = "change_metric_active";
		document.getElementById('trashcan').innerHTML = document.getElementById('grade_f_'+i).innerHTML;
		document.getElementById('grade_f_'+i).innerHTML = document.getElementById('grade_c_'+i).innerHTML;
		document.getElementById('grade_c_'+i).innerHTML = document.getElementById('trashcan').innerHTML;
		i++;
      }
  }


/* map */
if (!GBrowserIsCompatible()) alert("Sorry, the Google Maps API is not compatible with this browser");
 else {

	var activemarker;

	function createMarker(point, html, title_width)
	  {
		var markerIcon = new GIcon();
		markerIcon.image = "/themes/image_generator.php?title=" + html;
		markerIcon.iconSize = new GSize(title_width, 15);
		markerIcon.iconAnchor = new GPoint(0, 15);
		var marker = new GMarker(point, markerIcon);
		return marker;
	  }

	var bounds = new GLatLngBounds();

	var map = new GMap2(document.getElementById("google_map"));
	control = new GSmallMapControl();

	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	map.setCenter(new GLatLng( 0.0,0.0));
}