/**
 * update display of delivery address based on what the contents of the same as billing flag is
 * @param object|string self either the sameAsBilling element or the id in string form
 */
function customerEditSameAsBilling(self)
{
	if (typeof self == 'string') {
		self = (self.substring(self.length - 13) == 'sameAsBilling')
			? document.getElementById(self) : undefined;
	} else if (self && self.id) {
		if (self.id.substring(self.id.length - 13) != 'sameAsBilling')
			self = undefined;
	}

	if (self && self.id) {
		var pref = self.id.substring(0, self.id.length - 13);
		if (self.checked) hideLayer(pref + 'deliveryAddress');
		else showLayer(pref + 'deliveryAddress');
	}
	return true;
}

