function viewBasketQtyCheck(n) {

	var formName		= document.forms[0].name;
	var CountUp			= 0;
	var validCharacters = "0123456789.";

	for (n-- ;n >= 0; n--) {

		var textBit = "QTY";
		if (n < 10) textBit += "0";
		if (n < 100) textBit += "0";
		textBit += n;

		var stringContent = eval('document.' + formName + '.' + textBit + '.value');

		CountUp += (stringContent - 0);

		var j = stringContent.length;

		if (stringContent != "") {

			for (i = 0; i < j; i++) {

				var thisCharacter = stringContent.charAt(i);
				if (validCharacters.indexOf(thisCharacter) == -1) {
					window.alert('One or more of the fields contains invalid characters');
					return false;
				}
			}
		}
	}
	if (CountUp == 0) {
		window.alert('You must select more than 0 items to add to your cart');
		return false;
	}
	return true;
}

function viewCartFormQtyCheck(n)
{
	var CountUp			= 0;
	var validCharacters = "0123456789.";

	for (n--; n >= 0; n--)
	{
		var textBit = "QTY";
		if (n < 10) textBit += "0";
		if (n < 100) textBit += "0";

		textBit += n;

		var stringContent = eval('document.viewCartForm.' + textBit + '.value');
		CountUp += (stringContent - 0);
		var j = stringContent.length;

		if (stringContent != "")
		{
			for (i = 0; i < j; i++)
			{
				var thisCharacter = stringContent.charAt(i);
				if (validCharacters.indexOf(thisCharacter) == -1)
				{
					window.alert('One or more of the fields contains invalid characters');
					return false;
				}
			}
		}
	}
	if (CountUp == 0)
	{
		if (typeof(window['removeBasket']) != "undefined")
		{
			if (removeBasket)
			{
				window.alert('You must select more than 0 items to add to your cart');
				return false;
			}
		}
		else
		{
			window.alert('You must select more than 0 items to add to your cart');
			return false;
		}
	}

	return true;
}

