var window_onload = function()
{
	/**
	 * Set custom form behaviors
	 */
	var f_currentvehicle_brand				= $('f_currentvehicle_brand');
	var hidden_currentvehicle_brand_other	= $('hidden_currentvehicle_brand_other');

	var brand_onchange = function()
	{
		var val = f_currentvehicle_brand.item(f_currentvehicle_brand.selectedIndex).text;
		if (val == 'Other / Unlisted') {
			hidden_currentvehicle_brand_other.style.display = 'block';
		} else {
			Element.hide(hidden_currentvehicle_brand_other);
		}
	}
	
	if(f_currentvehicle_brand != null) {
  	// if the user selects "Other" as their current vehicle brand, display an extra input textbox
	  Event.observe(f_currentvehicle_brand, 'change', brand_onchange);
  	// run it now as well to initialise the page
  	brand_onchange();
	}
	
	
}
document.observe('dom:loaded', window_onload)