/***************************************************************
The following three function are used to copy the delivery detail
into billing detail. if user check the 'same as above'
check box at the beginning of the postal detail section, then 
fill in each form field with the same value of the business detail 
form field value.
****************************************************************/
function billingDetailCheck(form)
{
	if (form.billingCopy.checked)
	{
		fillBillingDetail(form)
	}
	else
	{
		clearBillingDetail(form)
	}
}

function fillBillingDetail(form)
{
	form.f_BillingStreet.value = form.f_DelStreet.value;
	form.f_BillingSuburb.value = form.f_DelSuburb.value;
	var billingStateIndex = form.f_DelState.selectedIndex;
	form.f_BillingState.options[billingStateIndex].selected = true;
	form.f_BillingPostcode.value = form.f_DelPostcode.value;
}

function clearBillingDetail(form)
{
	form.f_BillingStreet.value = '';
	form.f_BillingSuburb.value = '';
	form.f_BillingState.options[0].selected = true;
	form.f_BillingPostcode.value = '';	
}