function initSearchForm(){
   Event.observe('search_brand_id', 'change', function(){
    emptyKeyword();
    $('formFilter').submit();
  });

  Event.observe('search_category_id', 'change', function(){
    if ($('search_symptom_id').selectedIndex != 0){
      $('search_symptom_id').selectedIndex=0;
      new Effect.Highlight('search_symptom_id',{startcolor:'#B33C3C'});
    }
    emptyKeyword();
    $('formFilter').submit();
  });

  Event.observe('search_symptom_id', 'change', function(){
    if ($('search_category_id').selectedIndex != 0){
      $('search_category_id').selectedIndex=0;
      new Effect.Highlight('search_category_id',{startcolor:'#B33C3C'});
    }
    emptyKeyword();
    $('formFilter').submit();
  });

  Event.observe('search_brand_id', 'change', function(){
    emptyKeyword();
    $('formFilter').submit();
  });
}

function emptyKeyword(element){
  if ($('edtMatch').value == KEYWORD_PLACEHOLDER )
    $('edtMatch').setValue('');
}

document.observe('dom:loaded', function() {
  initSearchForm();
});