//Create and event for the onload function
//in here we will setup all other events
//this ensures that any element we are trying to add an event to exists already
Event.observe(
window,
'load',
function()
{
	
  $$('.expanderButton').invoke(
  'observe',
  'click',
  toggleAdvancedSearch
  );
}
);


function toggleAdvancedSearch(event)
{
    new Effect.toggle('advancedSearchForm','blind',{duration: 0.3});
    if(this.className == 'expanderButton expand') {
    	this.className = 'expanderButton collapse'
    } else {
    	this.className = 'expanderButton expand'
    }
}