function filterMatches(attributes, filter_UUID) {

  if(!attributes) {
    console.log("error in filter, no attributes");
    return false;
  }
  
  var poiFound = false;
  
  if(current_filter_tois.length == 0) {
	  poiFound = true; 
  }

  //console.log("filter called with filter: " + filter_UUID + " and toi: " + attributes.type_of_initiative);

  //attributes.type_of_initiative can be ;-separated...
  var toi_array = createToiArray(attributes.type_of_initiative);

  for(var i=0;i<toi_array.length;i++){
    var type_of_initiative_QNR = tax_hashtable.toistr_to_qnr[toi_array[i]];

    if(current_filter_tois.indexOf(type_of_initiative_QNR) > -1) {
    	poiFound = true;
    	break;
    }
  }
  
  var searchRelevantPoiProperties = [
	  'name',
	  'addr:city',
	  'addr:street',
	  'addr:country',
	  'addr.postcode',
	  'website',
	  'contact:website',
	  'contact:email',
	  'description'
  ];
  
  if (poiFound && current_filter_search != '') {
	  var searchFilterRegExp = new RegExp(current_filter_search, 'i');
	  for(searchProperty in searchRelevantPoiProperties) {
		  if (attributes[searchRelevantPoiProperties[searchProperty]]) {
			  if (attributes[searchRelevantPoiProperties[searchProperty]].match(searchFilterRegExp)) {
//				  console.log(searchRelevantPoiProperties[searchProperty] + ': ' + attributes[searchRelevantPoiProperties[searchProperty]]);
				  poiFound = true;
				  break;
			  } else {
				  poiFound = false;
			  }
		  } 
	  }
  }
  
  return poiFound;
}
/**
  * attributes:  ;-separated toi-attributes of POI
  * filter_UUID: Q-Nr of filter that should be matched against
  *
  * checks if any attribute in attributes (=TOI) is either the filter_UUID or the TOI is any subclass of the filter_UUID
  */
;-separated toi-attributes of POI
filter_UUID: Q-Nr of filter that should be matched against

checks if any attribute in attributes (=TOI) is either the filter_UUID or the TOI is any subclass of the filter_UUID
; - separated toi - attributes of POI filter_UUID : Q - Nr of filter that should be matched against checks if any attribute in attributes ( = TOI ) is either the filter_UUID or the TOI is any subclass of the filter_UUID
function filterMatches(attributes, filter_UUID) {
  if(!attributes) {
    console.log("error in filter, no attributes");
    return false;
  }
  var poiFound = false;
  if(current_filter_tois.length == 0) {
	  poiFound = true; 
  }
  var toi_array = createToiArray(attributes.type_of_initiative);
  for(var i=0;i<toi_array.length;i++){
    var type_of_initiative_QNR = tax_hashtable.toistr_to_qnr[toi_array[i]];
    if(current_filter_tois.indexOf(type_of_initiative_QNR) > -1) {
    	poiFound = true;
    	break;
    }
  }
  var searchRelevantPoiProperties = [
	  'name',
	  'addr:city',
	  'addr:street',
	  'addr:country',
	  'addr.postcode',
	  'website',
	  'contact:website',
	  'contact:email',
	  'description'
  ];
  if (poiFound && current_filter_search != '') {
	  var searchFilterRegExp = new RegExp(current_filter_search, 'i');
	  for(searchProperty in searchRelevantPoiProperties) {
		  if (attributes[searchRelevantPoiProperties[searchProperty]]) {
			  if (attributes[searchRelevantPoiProperties[searchProperty]].match(searchFilterRegExp)) {
				  poiFound = true;
				  break;
			  } else {
				  poiFound = false;
			  }
		  } 
	  }
  }
  return poiFound;
}
function filterMatches ( attributes , filter_UUID ) { if ( ! attributes ) { console . log ( "error in filter, no attributes" ) ; return false ; } var poiFound = false ; if ( current_filter_tois . length == 0 ) { poiFound = true ; } var toi_array = createToiArray ( attributes . type_of_initiative ) ; for ( var i = 0 ; i < toi_array . length ; i ++ ) { var type_of_initiative_QNR = tax_hashtable . toistr_to_qnr [ toi_array [ i ] ] ; if ( current_filter_tois . indexOf ( type_of_initiative_QNR ) > - 1 ) { poiFound = true ; break ; } } var searchRelevantPoiProperties = [ 'name' , 'addr:city' , 'addr:street' , 'addr:country' , 'addr.postcode' , 'website' , 'contact:website' , 'contact:email' , 'description' ] ; if ( poiFound && current_filter_search != '' ) { var searchFilterRegExp = new RegExp ( current_filter_search , 'i' ) ; for ( searchProperty in searchRelevantPoiProperties ) { if ( attributes [ searchRelevantPoiProperties [ searchProperty ] ] ) { if ( attributes [ searchRelevantPoiProperties [ searchProperty ] ] . match ( searchFilterRegExp ) ) { poiFound = true ; break ; } else { poiFound = false ; } } } } return poiFound ; }
attributes:  ;-separated toi-attributes of POI
 filter_UUID: Q-Nr of filter that should be matched against
attributes : ; - separated toi - attributes of POI filter_UUID : Q - Nr of filter that should be matched against
//console.log("filter called with filter: " + filter_UUID + " and toi: " + attributes.type_of_initiative); //attributes.type_of_initiative can be ;-separated... //				  console.log(searchRelevantPoiProperties[searchProperty] + ': ' + attributes[searchRelevantPoiProperties[searchProperty]]);