
function Filtern()


{
var	Ort_datei = escape(document.filter.ORT.value.toLowerCase());
var	Ort = decodeURI(document.filter.ORT.value.toLowerCase());
var	PLZ = decodeURI(document.filter.PLZ.value.toLowerCase());
var	PLZ_datei = escape(document.filter.PLZ.value.toLowerCase());
var	Name = escape(document.filter.Name.value.toLowerCase());
var	staat = escape(document.filter.staat.value.toLowerCase());
		
LandIndex=((document.filter.LAND.selectedIndex));
var	Land = document.filter.LAND.options[LandIndex].value.toLowerCase();


Name=Name.replace('\n','');

//alert(Land);

var verz_land ="";

if(Land == "d") {
   verz_land ="germany";
 }

if(Land == "f") {
   verz_land ="france";
 }
 
 if(Land == "gb") {
   verz_land ="uk";
 }
 
 if(Land == "i") {
   verz_land ="italy";
 }
 
 if(Land == "a") {
   verz_land ="austria";
 }
 
 if(Land == "ch") {
   verz_land ="switzerland";
 }
 
 if(Land == "e") {
   verz_land ="spain";
 }
 
 if(Land == "usa") {
   verz_land ="usa";
 }

 if(Land == "cdn") {
   verz_land ="canada";
 }

if(Land == "cy") {
   verz_land ="cyprus";
 }

if(Land == "nl") {
   verz_land ="netherlands";
 }
 
 if(verz_land == "") {
   verz_land ="all";
 }

 //alert(verz_land);
 
//document.write("<b>Ort :<\/b> " + Ort + "<br>");
//Ort = encodeURI(Ort);
//document.write("<b>Ort kodiert:<\/b> " + Ort + "<br>");
//Ort = decodeURI(Ort);
//document.write("<b>Ort wieder dekodiert:<\/b> " + Ort + "<br>");



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(/#/,"");
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(/#/,"");
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, '');




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 == "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

{	
{	

{	
//alert("ort="+Ort); 
//alert(PLZ); 

//alert("/search/"+verz_land+"/state-"+staat+"/city-"+Ort+"/zip-"+PLZ+"/l1cy1-"+Land+"_state1cy1-"+staat+"_city1cy1-"+Ort_datei+"-zip1cy1-"+PLZ_datei+"_name1cy1-"+Name+"-s1.html");
	
location.replace("/search/"+verz_land+"/state-"+staat+"/city-"+Ort+"/zip-"+PLZ+"/l1cy1-"+Land+"_state1cy1-"+staat+"_city1cy1-"+Ort_datei+"-zip1cy1-"+PLZ_datei+"_name1cy1-"+Name+"-s1.html");


}
}
}
}


