function Filtern()
{
	
	var eingabe=document.filter.Name.value.toUpperCase();
	var eingabe_plz=document.filter.PLZ.value;
	var	Ort_datei = escape(document.filter.ORT.value.toLowerCase());

	if ((eingabe.length <3) && ((document.filter.PLZ.value == "") && (document.filter.ORT.value == "") && (document.filter.LAND.options[document.filter.LAND.selectedIndex].value == "")))
	{ 
		alert("Bitte geben Sie mindestens 3 Zeichen in das Feld Name ein");
	}

	else if ((eingabe_plz.length <3) && ((document.filter.volltext.checked) && (document.filter.PLZ.value != "") && (document.filter.ORT.value == "") && (document.filter.LAND.options[document.filter.LAND.selectedIndex].value == "")))
	{
		alert("Bitte geben Sie mindestens 3 Zeichen in das Feld PLZ oder einen Ort ein");
	}
	else {
		var	Ort = decodeURI(document.filter.ORT.value.toUpperCase());
		var	PLZ = decodeURI(document.filter.PLZ.value.toUpperCase());
		var	PLZ_datei = escape(document.filter.PLZ.value.toUpperCase());
		var	Name = escape(document.filter.Name.value.toUpperCase());
		var	staat = "";
		LandIndex=document.getElementById('LAND').selectedIndex;
		Land = document.getElementById('LAND').options[LandIndex].value.toUpperCase();
		
		
		Ort= Ort.replace(/ü/,"ue");
		Ort= Ort.replace(/ö/,"oe");
		Ort= Ort.replace(/ä/,"ae");
		Ort= Ort.replace(/&szlig;/,"ss");
		Ort= Ort.replace(/'/,"");
		Ort=Ort.replace(/""/,"");
		Ort=Ort.replace(/""/,"");
		Ort= Ort.replace(/&uuml;/,"ue");
		Ort= Ort.replace(/&ouml;/,"oe");
		Ort= Ort.replace(/&auml;/,"ae");
		Ort= Ort.replace(/ß/,"ss");
		Ort= Ort.replace(/,/,"");
		Ort= Ort.replace(/;/,"");
		Ort= Ort.replace(/:/,"");
		Ort= Ort.replace(/!/,"");
		Ort= Ort.replace(/&/,"");
		Ort= Ort.replace(/#/,"");
		Ort= Ort.replace(/|/,"");
		Ort= Ort.replace(/</,"");
		Ort= Ort.replace(/>/,"");
		Ort= Ort.replace(/@/,"");

		// Trim und doppelte Leerzeichen
		Ort = Ort.replace(/ +/g, ' ').replace(/^\s+/g, '').replace(/\s+$/g, '');
		
		PLZ= PLZ.replace(/ü/,"ue");
		PLZ= PLZ.replace(/ö/,"oe");
		PLZ= PLZ.replace(/ä/,"ae");
		PLZ= PLZ.replace(/&szlig;/,"ss");
		PLZ= PLZ.replace(/'/,"");
		PLZ=PLZ.replace(/""/,"");
		PLZ=PLZ.replace(/""/,"");
		PLZ= PLZ.replace(/&uuml;/,"ue");
		PLZ= PLZ.replace(/&ouml;/,"oe");
		PLZ= PLZ.replace(/&auml;/,"ae");
		PLZ= PLZ.replace(/ß/,"ss");
		PLZ= PLZ.replace(/,/,"");
		PLZ= PLZ.replace(/;/,"");
		PLZ= PLZ.replace(/:/,"");
		PLZ= PLZ.replace(/!/,"");
		PLZ= PLZ.replace(/&/,"");
		PLZ= PLZ.replace(/#/,"");
		PLZ= PLZ.replace(/|/,"");
		PLZ= PLZ.replace(/</,"");
		PLZ= PLZ.replace(/>/,"");
		PLZ= PLZ.replace(/@/,"");
		
		// Trim und doppelte Leerzeichen
		PLZ = PLZ.replace(/ +/g, ' ').replace(/^\s+/g, '').replace(/\s+$/g, '');
		
		var volltext;
		if (document.filter.volltext.checked == true)
		{
			volltext = escape(document.filter.volltext.value);	
		}
		
		Name=Name.replace('\n','');
		
		if (Land == "cdn") {	
			location.replace("http://www.business-directory-canada.com/search/canada/state-/city-"+Ort+"/zip-"+PLZ+"/l1cy1-cdn_state1cy1-_city1cy1-"+Ort_datei+"-zip1cy1-"+PLZ_datei+"_name1cy1-"+Name+"-s1.html");
		}
		else if (Land == "gb") {
			location.replace("http://www.business-directory-great-britain.com/search/uk/state-/city-"+Ort+"/zip-"+PLZ+"/l1cy1-gb_state1cy1-_city1cy1-"+Ort_datei+"-zip1cy1-"+PLZ_datei+"_name1cy1-"+Name+"-s1.html");
		} 
		else if (Land == "aus") {
			location.replace("http://www.business-directory-australia.com/search/aus/state-/city-"+Ort+"/zip-"+PLZ+"/l1cy1-aus_state1cy1-_city1cy1-"+Ort_datei+"-zip1cy1-"+PLZ_datei+"_name1cy1-"+Name+"-s1.html");
		}
		else if (Land == "b") {
			location.replace("http://www.bedrijvengids-belgien.be/bedrijvengids-belgie/l1c1-b-o1c1-"+Ort+"-p1c1-"+PLZ+"-n1c1-"+Name+".htm");
		}
		else if (Land == "f") {
			location.replace("http://www.repertoire-commercial.fr/recherche/france/region-/ville-"+Ort+"/cp-"+PLZ+"/l1cy1-f_region1cy1-_ville1cy1-"+Ort_datei+"-cp1cy1-"+PLZ_datei+"_nom1cy1-"+Name+"-s1.html");
		}
		else if (Land == "e") {
			location.replace("http://www.guia-de-empresas-espana.es/buscar/espana/provincia-/poblacion-"+Ort+"/cp-"+PLZ+"/l1cy1-e_provincia1cy1-_poblacion1cy1-"+Ort_datei+"-cp1cy1-"+PLZ_datei+"_nombre1cy1-"+Name+"-s1.html");
		}
		else if (Land == "usa") {
			location.replace("http://www.business-directory-usa.com/search/usa/state-/city-"+Ort+"/zip-"+PLZ+"/l1cy1-usa_state1cy1-_city1cy1-"+Ort_datei+"-zip1cy1-"+PLZ_datei+"_name1cy1-"+Name+"-s1.html");
		}
		else if (Land == "d") {
			location.replace("http://web2.cylex.de/suche/deutschland/ort-"+Ort+"/plz-"+PLZ+"/l1cy1-"+Land+"_ort1cy1-"+Ort_datei+"-plz1cy1-"+PLZ_datei+"_name1cy1-"+Name+"-s1.html");
		}
		else if (Land == "a") {
			location.replace("http://www.branchenbuch-oesterreich.at/branchenbuch-suche/Land1cy1-"+Land+"_Ort1cy1-"+Ort+"_PLZ1cy1-"+PLZ+"_Name1cy1-"+Name+".asp");
		}
		else if (Land == "nl") {
			location.replace("http://www.business-directory-netherlands.com/business-directory-netherlands/L1c1-NL_O1c1-"+Ort+"-P1c1-"+PLZ+"-N1c1-"+Name+".htm");
		}
		else if (Land == "ch") {
			location.replace("http://www.branchenbuch-schweiz.ch/branchenbuch-suche/Land1cy1-"+Land+"_Ort1cy1-"+Ort+"_PLZ1cy1-"+PLZ+"_Name1cy1-"+Name+".asp");
		}
		else {
			location.replace("/branchenbuch-suche/Land1cy1-"+Land+"_Ort1cy1-"+Ort+"_PLZ1cy1-"+PLZ+"_Name1cy1-"+Name+".asp");
		}

	}
}



