//	Function for the registration form
function copyBilling() {
	var r = document.registration;
	if(r['Data[billingaddress1]'].value) { r['Data[deladdress1]'].value = r['Data[billingaddress1]'].value; }
	if(r['Data[companyname]'].value) { r['Data[delcompanyname]'].value = r['Data[companyname]'].value; }
	if(r['Data[billingaddress2]'].value) { r['Data[deladdress2]'].value = r['Data[billingaddress2]'].value; }
	if(r['Data[billingcity]'].value) { r['Data[delcity]'].value = r['Data[billingcity]'].value; }
	if(r['Data[billingcounty]'].value) { r['Data[delcounty]'].value = r['Data[billingcounty]'].value; }
	if(r['Data[billingpostcode]'].value) { r['Data[delpostcode]'].value = r['Data[billingpostcode]'].value; }
	if(r['Data[billingcountryid]'].value) { r['Data[delcountryid]'].value = r['Data[billingcountryid]'].value; }
	r['Data[billingpostcode]'].focus();
}

function checkDeletion(title, name)
{
	var tstr = "You have chosen to DELETE the " + title + " '" + name + "'!\n\nAre you sure that you want to do this?";
	return confirm(tstr);
}


function markDespatched(formID) {
	var children = document.getElementsByTagName('input');
	for (var i = 0; i < children.length; i++) {
		if(children[i].className=="despatch") {
			children[i].setAttribute("checked", "checked");
		}
	}
}

function markLabels(formID) {
	var children = document.getElementsByTagName('input');
	for (var i = 0; i < children.length; i++) {
		if(children[i].className=="label") {
			children[i].setAttribute("checked", "checked");
		}
	}
}

