function copyOne(f, cn, dt, st) {
	var d, s;
	for (d = 0; d < f.length; d++)
		if (f[d] && f[d].name == dt) break;
	for (s = 0; s < f.length; s++)
		if (f[s] && f[s].name == st) break;
	if (f[s] && f[d] && f[s].name && f[d].name) {
		if (f[cn].checked) {
			if (f[d].value == '') f[d].value = f[s].value;
		} else {
			if (f[d].value == f[s].value) f[d].value = '';
		}
	}
}

function copyInfo() {
	var f = document.forms['order'];

	copyOne(f, 'ShipAddy', 'ShippingName', 'BillingName');
	copyOne(f, 'ShipAddy', 'ShippingAddress', 'BillingAddress');
	copyOne(f, 'ShipAddy', 'ShippingCity', 'BillingCity');
	copyOne(f, 'ShipAddy', 'ShippingState', 'BillingState');
	copyOne(f, 'ShipAddy', 'ShippingZip', 'BillingZip');
	copyOne(f, 'ShipAddy', 'ShippingCountry', 'BillingCountry');

	return true;
}
function showForm(sel, target) {
	if (sel == true) {
		document.getElementById(target).style.display='block';
	} else {
		document.getElementById(target).style.display='none';
	}
}

function blockMail() {
	var f = document.forms["order"];
	if (f['shoppe_00000-Tickets*tixship'].checked == true) {
		alert('Please select E-Tickets as we cannot guarantee shipped tickets will arrive in time.');
		return false;
	} else if (f['shoppe_00001-Tickets*tixship'].checked == true) {
		alert('Please select E-Tickets as we cannot guarantee shipped tickets will arrive in time.');
		return false;
	} else if (f['shoppe_00002-Tickets*tixship'].checked == true) {
		alert('Please select E-Tickets as we cannot guarantee shipped tickets will arrive in time.');
		return false;
	} else if (f['shoppe_00003-Tickets*tixship'].checked == true) {
		alert('Please select E-Tickets as we cannot guarantee shipped tickets will arrive in time.');
		return false;
	} else {
		return true;
	}
}
