
   function updateCollectionSearch(){
      var brand = $('brand');
      var model = $('modelname');
      var price = $('price');

      if (!price || !brand || !model) {
         return;
      }
      response_element = document.getElementById('collectie-zoeken');

      var opt = {
          method: 'post',
          postBody: 'email='+document.getElementById('modelname').value,
          onSuccess: function(t) {
              response_element.innerHTML = "<p>Een bevestigingsemail is verzonden.</p>";
              /*response_element.innerHTML = t.responseText;*/
          },
          on404: function(t) {
              alert('Error 404: location "' + t.statusText + '" was not found.');
          },
          onFailure: function(t) {
              alert('Error ' + t.status + ' -- ' + t.statusText);
          }
      }
      response_element.innerHTML = '<select id="brand" name="s-product|assortiment_brand_ID"><option value="0" >Moment</option></select><select id="price"> <option value="0">Moment</option></select> <select id="modelname"><option value="0">Moment</option></select>';

      ajax_url = '/ajaxhandler/blaat';
      //new Ajax.Request(ajax_url, opt);
   }

   function initCollectionSearch(){
      if ($('collectie-zoeken')) {
         var brand = $('brand');
         var model = $('modelname');
         var price = $('price');

         Event.observe('brand','change',function(){
            updateCollectionSearch();
         });
         Event.observe('modelname','change',function(){
            updateCollectionSearch();
         });

         Event.observe('price','change',function(){
            updateCollectionSearch();
         });
      }
   }
//   addEventSimple(window,'load',initCollectionSearch);

