function updateRegion(elementId, landId) {
  
  document.forms['suche'].elements['Unterregion'].value = '0';
  
  var ajaxdispatcher = new AjaxDispatcher();
  
  var ajaxfrontend = new AjaxFrontend({
    outputType: 'selectoptions',
    valueFieldName: 'id',
    optionFieldName: 'title',
    noValueText: 'bitte Region wählen',
    updateElement: elementId
  });
  
  ajaxdispatcher.setFrontentProcessor(ajaxfrontend);
  
  ajaxdispatcher.get('bundeslaender', {
    landid:landId
  });
  
  updateUnterregion('Unterregion', -1);
  
}

function updateUnterregion(elementId, bundeslandId) {
  
  var ajaxdispatcher = new AjaxDispatcher();
  
  var ajaxfrontend = new AjaxFrontend({
    outputType: 'selectoptions',
    valueFieldName: 'id',
    optionFieldName: 'title',
    noValueText: 'bitte Unterregion wählen',
    updateElement: elementId
  });
  
  ajaxdispatcher.setFrontentProcessor(ajaxfrontend);
  
  ajaxdispatcher.get('unterregionen', {
    bundeslandid:bundeslandId
  });
  
}

function changeObjektStatus(objektstatus, uid) {
  
  if (objektstatus) {
    statusimage = '<img alt="aktiv" src="../gfx/objekt-aktiv.gif"/>';
    objektstatus = '1';
  }
  else {
    statusimage = '<img alt="inaktiv" src="../gfx/objekt-inaktiv.gif"/>';
    objektstatus = '0';
  } 
  
  var ajaxfrontend = new AjaxFrontend({
    outputType: 'updateelement',
    updateElement: 'objektstatus-image-' + uid,
    newContent: statusimage
  });
  
  ajaxdispatcher.setFrontentProcessor(ajaxfrontend);
  
  ajaxdispatcher.set('objektstatus', {
    id:uid,
    status:objektstatus
  });
  
}