function showHideFac() {
   if ($('#idFaciliteiten').is(":visible")) {
      $('#idFaciliteiten').hide();
	  $('#full').value = '0';
	  $("#idShowHide").innerHTML = 'Uitgebreid zoeken  <IMG height=10 src="images/ontwerp/nextB.gif" width=10 border=0>';
	  $("#idShowHide2").innerHTML = 'Uitgebreid zoeken  <IMG height=10 src="images/ontwerp/nextB.gif" width=10 border=0>';
   } else {
	  $('#idFaciliteiten').show();
	  $('#full').value = '1';
	  $("#idShowHide").innerHTML = 'Sluit zoekvenster <IMG height=10 src="images/ontwerp/nextBT.gif" width=10 border=0>';
	  $("#idShowHide2").innerHTML = 'Sluit zoekvenster <IMG height=10 src="images/ontwerp/nextBT.gif" width=10 border=0>';
   }

   return;
}

function getZoekboxSettings(oObj, sForm) {

    document.body.style.cursor = "wait";

    var default_action = $('#action').val();
    var oForm = $('#'+sForm);
    $('#action').val('getZoekboxTotal');
    if (sForm == 'aanbiedingSearchbox') {
        $('#action').val('getZoekboxAanbiedingTotal');
    }
    $('#selField').val(oObj.id);
    var data = oForm.serializeArray();

    $('input, select').attr('disabled', 'disabled');
    $('#action').val(default_action);

    $.ajax({
      type: 'POST',
      url: 'processor.php',
      data: data,
      success: function (data) {
            $('input, select').removeAttr('disabled');
            document.body.style.cursor = "default";
      },
      dataType: 'script'
    });

  return;
}


function processAD(form, field) {

    if (typeof(form) == 'string') {
        var oForm = $('#'+form);
        if (typeof(field) == 'string') {
            $('#selField').val(field);
        }
    } else {
        var oForm = $('#'+form.id);
    }
    document.body.style.cursor = "wait";

    var data = oForm.serializeArray();
    $('input, select').attr('disabled', 'disabled');

    $.ajax({
      type: 'POST',
      url: 'processor.php',
      data: data,
      success: function (data) {
            $('input, select').removeAttr('disabled');
            document.body.style.cursor = "default";
      },
      dataType: 'script'

    });

  return;
}



function setADdeparture(oObj, sForm, sSource) {

  oForm = $(sForm);
  oPrcForm = oForm;
  sCurAction = oForm.action.value;
  oForm.action.value="setADdeparture";
  document.body.style.cursor = "wait";
  sStr = Form.serialize(oForm);
  sStr += '&src='+sSource;
  oForm.action.value=sCurAction;
  Form.disable(oForm);
  new Ajax.Request(sJsR+'processor.php', {methode:'post', parameters: sStr ,onCreate: startProcessForm, onFailure: reportError, onComplete: endZoekboxDays, evalScripts: true});
  return false;
}

