function checkPhoneNo(tel)
{
	phoneNo = tel.value;
	if ( phoneNo.length == 10 )
	{
		var item = 'warning_' + tel.name;
		if ( document.getElementById(item).innerHTML.indexOf("eg.01252728800") || document.getElementById(item).innerHTML == "" )
		{
			alert("10 DIGIT PHONE NUMBER - please check this is correct?");
			document.getElementById(item).innerHTML = "<span style='font-size:10px; color: red;\'>*10 Digit Phone</span>";
		}
	}
	else
	{
		var item = 'warning_' + tel.name;
		document.getElementById(item).innerHTML = "";
	}
}

function stringFilter (input)
{
	if (input.value != "")
	{
		s = input.value;
		filteredValues = "1234567890";     // Characters to leave
		var i;
		var returnString = "";
		ignoreRest = false;

		for (i = 0; i < s.length; i++)
		{
			// Search through string and append to unfiltered values to returnString.
			var c = s.charAt(i);
			if (c == ".")
				ignoreRest = true;
			if (filteredValues.indexOf(c) != -1 && !ignoreRest)
				// numeric char, add it to the string
				returnString += c;
			if ((c == "k" || c ==  "K") && !ignoreRest)
				// convert k to 000
				returnString += "000";
		}
		input.value = returnString;
	}
}
