function validateNumeric(ValueToCheck) {
	var valid = "0123456789"
	var ok = "yes";
	var temp;
	
	for (var i=0; i < ValueToCheck.length; i++) {
		temp = "" + ValueToCheck.substring(i, i+1);
		if (valid.indexOf(temp) == "-1") ok = "no";
	}

	if (ok == "no") {
		return false;
	} else {
		return true;
	}
}

function ValidateData() {

if (document.F.tamount.value == "") { 
   alert('Amount payable must be entered!'); 
   document.F.tamount.focus(); 
   return false;
}
if (document.F.description.value == "") { 
   alert('A description must be provided!'); 
   document.F.description.focus(); 
   return false;
}
if (document.F.TFirstname.value == "") { 
   alert('Tenants firstname must be entered!'); 
   document.F.TFirstname.focus(); 
   return false;
}

if (document.F.TPostcode.value == "") { 
    alert('Tenants postcode must be entered!'); 
	document.F.TPostcode.focus();
	return false;
}
if (document.F.TAddress1.value == "") { 
    alert('Tenants address must be entered!'); 
	document.F.TAddress1.focus();
	return false;
}

if (document.F.Firstname.value == "") { 
   alert('Cardholders firstname must be entered!'); 
   document.F.Firstname.focus(); 
   return false;
}

if (document.F.Postcode.value == "") { 
    alert('Cardholders Postcode must be entered!'); 
	document.F.Postcode.focus(); 
	return false;
}
if (document.F.Address1.value == "") { 
    alert('Cardholders Address must be entered!'); 
	document.F.Address1.focus(); 
	return false;
}
if (document.F.TownCity.value == "") { 
    alert('Cardholders Town/City must be entered!'); 
	document.F.TownCity.focus(); 
	return false;
}



return true;
}

function checkIfNum(evt)
{
evt = (evt) ? evt :window.event
var charCode = (evt.which) ? evt.which : evt.keyCode
if (charCode <48 || charCode >57)
	{
	status = "This field accepts numbers only."
	return false
	}
	status = ""
	return true
}

function sameabove(){
	if (document.F.same.checked == true){
		document.F.Firstname.value = document.F.TFirstname.value;
		document.F.Postcode.value = document.F.TPostcode.value;
		document.F.Address1.value = document.F.TAddress1.value;
		document.F.Address2.value = document.F.TAddress2.value;
		document.F.TownCity.value = document.F.TTownCity.value;
		document.F.County.value = document.F.TCounty.value;
	}
	if (document.F.same.checked == false){
		document.F.Firstname.value = "";
		document.F.Postcode.value = "";
		document.F.Address1.value = "";
		document.F.Address2.value = "";
		document.F.TownCity.value = "";
		document.F.County.value = "";
	}
	return true;
}