var tempunits = ["temp-celsius","temp-fahrenheit","temp-celsius-side","temp-fahrenheit-side"];
var pressureunits = ["pressure-mbar","pressure-inhg","pressure-mbar-side","pressure-inhg-side"];
var windunits = ["wind-kph","wind-mph","wind-ms","wind-kph-side","wind-mph-side","wind-ms-side"];


function toggleTemp(which)
{
	for(i=0; i < tempunits.length; i++){
		var obj = document.getElementById(tempunits[i]);
		if (obj) {
			obj.style.display = "none";
		}
	}

	var obj = document.getElementById(which + "-side");
	if (obj) {
		obj.style.display = "block";		
	}
	
	var obj = document.getElementById(which);
	if (obj) {
		obj.style.display = "block";
	}

}

function togglePressure(which)
{
	for(i=0; i < pressureunits.length; i++){
		var obj = document.getElementById(pressureunits[i]);
		if (obj) {
			obj.style.display = "none";
		}
	}
	
	var obj = document.getElementById(which);
	if (obj) {
		obj.style.display = "block";		
	}
	
	var obj = document.getElementById(which + "-side");
	if (obj) {
		obj.style.display = "block";
	}					
}

function toggleWind(which)
{
	for(i=0; i < windunits.length; i++){
		var obj = document.getElementById(windunits[i]);
		if (obj) {
			obj.style.display = "none";
		}
	}
	
	var obj = document.getElementById(which);
	if (obj) {
		obj.style.display = "block";		
	}
	
	var obj = document.getElementById(which + "-side");
	if (obj) {
		obj.style.display = "block";
	}					
}