<!-- hide from old browsers

var days = new Array();
days[0] = "Sunday";
days[1] = "Monday";
days[2] = "Tuesday";
days[3] = "Wednesday";
days[4] = "Thursday";
days[5] = "Friday";
days[6] = "Saturday";

var months = new Array();
months[0] = "Jan";
months[1] = "Feb";
months[2] = "Mar";
months[3] = "Apr";
months[4] = "May";
months[5] = "June";
months[6] = "July";
months[7] = "Aug";
months[8] = "Sept";
months[9] = "Oct";
months[10] = "Nov";
months[11] = "Dec";

var url="http://www.pondkeeper.co.uk"
var title="Pondkeeper.co.uk"
function addfave() {
if (document.all)
window.external.AddFavorite(url,title)}

function noprodsmall(imgPath) {
	eval(imgPath).src = "images/noimg120.jpg";
}

function noprodtiny(imgPath) {
	eval(imgPath).src = "images/noimg40.gif";
}


function roundTo(base, precision) {
	var m = Math.pow(10, precision);
	var a = Math.round(base * m) / m;
	return a;
}

function convertDims() {

	if (document.getElementById('switchbutton').value == "show imperial dimensions") {
		document.getElementById('switchbutton').value = "show metric dimensions";

		var theTable = document.getElementById('linerlist');
		var theTDs = theTable.getElementsByTagName('td');
		for (i = 0; i < theTDs.length; i++) {
			if (theTDs[i].className == "pricelisttd xyz" || theTDs[i].className == "pricelisttd highlightpltd xyz" || theTDs[i].className == "prodpagetd xyz") {
				currVal = theTDs[i].innerHTML;
				theNum = parseFloat(currVal.substr(0,currVal.length-1));
				theInches = theNum * 39.370078740157477;
				theFt = parseInt(theInches / 12);
				theInches = parseInt(theInches % 12);
				theTDs[i].innerHTML = theFt + "\' " + theInches + "\"";
			}
		}
	}else{
		document.getElementById('switchbutton').value = "show imperial dimensions";
		var theTable = document.getElementById('linerlist');
		var theTDs = theTable.getElementsByTagName('td');
		for (i = 0; i < theTDs.length; i++) {
			if (theTDs[i].className == "pricelisttd xyz" || theTDs[i].className == "pricelisttd highlightpltd xyz" || theTDs[i].className == "prodpagetd xyz") {
				currVal = theTDs[i].innerHTML;
				splitVals = currVal.split("\' ");
				theFt = parseInt(splitVals[0]);
				theInches = parseInt(splitVals[1].substr(0,splitVals[1].length-1));
				totalInches = (theFt*12)+theInches;
				totalCMs = totalInches*2.54;
				finalVal = roundTo(totalCMs/100,1)
				theTDs[i].innerHTML = finalVal + "m";
			}
		}
	}
}

// - end hiding -->