
var RegisterForm = Class.create(
{
	initialize: function(section)
	{
		this.section = section;
		
		if ($('noCustomer').readAttribute('checked') == 'checked')
		{
			this.section.hide();
		}
		
		this.section.firstDescendant().hide();
		
		$('noCustomer').observe('click', function(e)
		{
			this.section.hide();
		}.bindAsEventListener(this));
		
		$('yesCustomer').observe('click', function(e)
		{
			this.section.show();
		}.bindAsEventListener(this));
	}
});

document.observe('dom:loaded', function()
{
	var section;

	if (section = $('customerSection'))
	{
		var form = new RegisterForm(section);
	}
});
