function newPopup(url) {
	popupWindow = window.open(url,'popUpWindow','height=700,width=800,left=10,top=10,resizable=yes,scrollbars=no,toolbar=,menubar=no,location=no,directories=no,status=yes');
}

var units = 'ft';
function switchUnits() {
	if (units == 'ft') {
		units = 'm';
	}
	else {
		units = 'ft';
	}
	$('.height').each(function () {

		var height = 0;
		if ($(this).attr('title') != '') {
			height = parseInt($(this).attr('title'));
		}
		else {
			height = parseInt($(this).html());
		}

		if (units == 'ft') {
			$(this).html(height);
			// stash the imperial value in the title attribute of the td
			$(this).attr('title', height);
		}
		else {
			$(this).html((height * 0.3048).toFixed(2));
			$(this).attr('title', height);
		}
	});
	$('.height_header').each(function () {
		$(this).html($(this).html().replace(/\(\w*\)/g, '('+units+')'));
	});
}


 
function switchUnits2(unit) { 
	if (unit == "feet") {
		$(".feet").show();
		$(".meters").hide();
	}		
	else {
		$(".feet").hide();
		$(".meters").show();
	}

	$('.height').each(function () {
		var height = 0;
		if ($(this).attr('title') != '') {
			height = parseInt($(this).attr('title'));
		}
		else {
			height = parseInt($(this).html());
		}

		if (unit == 'feet') {
			$(this).html(height);
			// stash the imperial value in the title attribute of the td
			$(this).attr('title', height);
		}
		else {
			$(this).html(Math.round((height * 0.3048).toFixed(2)));
			$(this).attr('title', height);
		}
	});
}

