initConfig();
document.observe('dom:loaded',init);

function init() {
	initFields();
	initToggles();
	initValidation();
	initClient();
	typeof customFunctions == 'function' ? customFunctions() : '';
}

function initToggles() {
	// show/hide "other" field
	$('role') ? addDropDownToggle({ dropdown: $('role'), index: $('role').options.length-1, target: $('specify-role') }) : '';
	$('state') ? addDropDownToggle({ dropdown: $('state'), index: $('state').options.length-1, target: [ $('specify-state'), $('specify-country') ] }) : '';
}
