// 16.10.2001: BEECK und AGLAIA Adressen


var becol1 = new String ('#EFDE74'); //dunkel
var becol2 = new String ('#FFFA9C');
var agcol1 = new String ('#C0C5FF'); //dunkel
var agcol2 = new String ('#D4D8FF');

var sp     = new String("");
var zip    = new String("");
var lg     = new String('de');//'de' oder 'en'

var adressen      = new Array();

adressen[adressen.length] = new adr ('7','h','Johanes','K&uuml;chler','Natur-Bau-K&uuml;chler','Hauptstr. 250','D','09355','Gersdorf','037203 / 42 32','037203 / 42 32','','','a','','09','','');
adressen[adressen.length] = new adr ('8','h','','Emons','Malerbetrieb u. Fachhandel','Weiser Str. 4','D','56170','Bendorf','02622 / 35 07','02622 / 16 70 67','','','a','','56','','');
//adressen[adressen.length] = new adr ('8','h','','Holz- und Baustoffzentrum','Gernot W&ouml;hlk GmbH','Gewerbepark 20','D','02692','Ebend&ouml;rfel','03591 / 37 27 56','03591 / 37 27 76','','','a','','02','','');
adressen[adressen.length] = new adr ('9','h','','BAU UND FARBEN','KONTOR LEIPZIG','Spinnereistraße 7 / Halle 23','D','04179','Leipzig','0341 / 689 18 02','0341 / 689 18 03','','laden@naturladen-leipzig.de','a','','04','','');
adressen[adressen.length] = new adr ('10','h','','M&ouml;belgalerie Jens Tuffner','','Schneebergstr. 8','D','08121','Wei&szlig;bach','037603 / 20 98','037603 / 20 98','','','a','','08','','');
adressen[adressen.length] = new adr ('11','h','','M&ouml;belgalerie Tuffner','','Leipziger Str. 64','D','09113','Chemnitz','0371 / 336 57 70','0371 / 336 57 99','','','a','','091','','');
//adressen[adressen.length] = new adr ('12','h','','Naturbau','Johannes K&uuml;chler','Schubertstr. 29','D','09337','Hohenstein-Ernstthal','03723 / 422 35','03723 / 472 53','','','a','','09','','');
adressen[adressen.length] = new adr ('13','h','','ALKAHEST GmbH','Baubiologie','Fechnerstr. 19','D','10717','Berlin','030 / 86 42 33 05','030 / 86 42 33 05','','','a','','10, 12, 13','','');
adressen[adressen.length] = new adr ('14','h','','Mordhorst','Der baubiol. Fachhandel','Kellerbleeck 10 a','D','22529','Hamburg','040 / 570 07 06','040 / 570 070 89','','','a','','20, 21, 22','','');
adressen[adressen.length] = new adr ('15','h','','Naturbauhaus','Gesund u. Farbig','Fleeth&ouml;rn 59','D','24103','Kiel','0431 / 97 02 88','0431 / 97 02 66','','','a','','24','','');
//adressen[adressen.length] = new adr ('16','h','Harry','Kick','Einrichtung u. Innenarch.','Charles Ro&szlig; Weg 2','D','24601','Ruhwinkel','04323 / 76 33','04323 / 61 75','','','a','','24','','');
//adressen[adressen.length] = new adr ('17','h','','Naturbau','Meldorf GmbH','&Ouml;sterstr. 57','D','25704','Meldorf','04832 / 51 51','04832 / 51 52','','','a','','25','','');
adressen[adressen.length] = new adr ('17','h','','Naturbauhaus Farbenfroh OHG','','Dragonerstr. 23a','D','30163','Hannover','0511 / 62 23 21','0511 / 62 85 54','','','a','','30, 31','','');
adressen[adressen.length] = new adr ('18','h','','Naturnest','Gisela Erkens','Hinterstr. 1 A','D','35614','Asslar-Werdorf','06443 / 81 04 44','06443 / 81 04 45','','','a','','35','','');
//adressen[adressen.length] = new adr ('19','h','Eberhard','Schmitt','Schreinerei','Innstr. 7','D','36043','Fulda','0661 / 452 86','','','','a','','36','','');
//adressen[adressen.length] = new adr ('21','h','','Kontor GbR','&Ouml;kol. Bauen u. Wohnen','Chemnitzer Str. 80','D','44139','Dortmund','0231 / 912 81 44','0231 / 912 81 46','','','a','','44','','');
adressen[adressen.length] = new adr ('20','h','','TRENDWENDE Osanbr&uumlck Wohnen GbR','','Iburgerstr. 43','D','49082','Osanbr&uuml;ck','0541 / 56 00 620','0541 / 56 00 666','','osnabrueck@trendwende.de','a','','49','','');
adressen[adressen.length] = new adr ('21','h','','Glashaus GmbH','','Alexanderstr. 69/71','D','52062','Aachen','0241 / 232 27','0241 / 40 30 18','','','a','','52','','');
adressen[adressen.length] = new adr ('22','h','','bio-fach-bedarf','','Karl-Marx-Str. 7','D','54290','Trier','0651 / 736 46','0651 / 733 60','','','a','','54','','');
adressen[adressen.length] = new adr ('23','h','Wolfgang','Olbrich','Biol. Innenausbau','Aschaffenburger Str. 120','D','63773','Goldbach','06021 / 92 11 83','06021 / 92 11 84','','','a','','63','','');
// pleite adressen[adressen.length] = new adr ('24','h','','&Ouml; + Ko','Baustoffe u. Wohnsachen','Bahnhofstr. 11','D','66280','Sulzbach','06897 / 522 89','06897 / 56 76 71','','','a','','66','','');
//adressen[adressen.length] = new adr ('25','h','','Henneberg &amp; Oesterle','','Kolb&auml;ckerstr. 9','D','70567','Stuttgart','0711 / 900 10 20','0711 / 900 10 10','','','a','','70, 73','','');
adressen[adressen.length] = new adr ('26','h','','Palette','Inh. G&uuml;nter Wahl','Metzgerstr. 15','D','73033','G&ouml;ppingen','07161 / 697 95','','','','a','','73','','');
adressen[adressen.length] = new adr ('27','h','','Naturgem&auml;&szlig;e Bodenbel&auml;ge','Gerhard Koch','Hambr&uuml;cker Str. 53','D','76694','Forst','07251 / 98 97 35','07251 / 98 97 36','','','a','','68, 69, 76','','');
adressen[adressen.length] = new adr ('29','h','Isabell','Berg','','Freiburger Str. 58','D','79567','Weil am Rhein/Haltingen','07621 / 630 26','07621 / 617 42','','','a','','79','','');
adressen[adressen.length] = new adr ('30','h','Maria','Schmidbauer','Farbenhandel','W&ouml;rthstr. 26','D','81667','M&uuml;nchen','089 / 448 11 87','089 / 489 15 27','','','a','','80, 81, 85','','');
adressen[adressen.length] = new adr ('31','h','Karl','Kohn','','Obere Hauptstr. 66-70','D','85368','Moosburg-Ziegelberg','08761 / 40 94','08761 / 40 35','','','a','','85','','');
adressen[adressen.length] = new adr ('32','h','','Alles f&uuml;r das Biohaus','Peter Vilgertshofer','Waterloostr. 9','D','86165','Augsburg','0821 / 79 13 99','0821 / 72 19 16','','','a','','86','','');
adressen[adressen.length] = new adr ('33','h','','Baunetz GmbH','&Ouml;komarkt RV','Escher-Wyss-Str. 2','D','88212','Ravensburg','0751 / 145 18','0751 / 145 06','','','a','','78, 87, 88','','');
adressen[adressen.length] = new adr ('34','h','','Baunetz GmbH','Bautechnik &amp; Baustoffe','Theuerbachstr. 2','D','88630','Pfullendorf','07552 / 970 70','07552 / 970 72','','','a','','78, 87, 88','','');
adressen[adressen.length] = new adr ('35','h','','WohnArt<br>nat&uuml;rliche Raumgestaltung GmbH','Frau Junghahn','König-Karl-Str. 83','D','70372','Stuttgart','0711 / 57 82 806','0711 / 58 888 11','','','a','','70, 71','','');
adressen[adressen.length] = new adr ('37','h','','ecoNATIV','Naturbaustoffe','Alteburger Str. 66','D','50678','Köln','0221 / 1305180','','','post@econativ.de','a','','50','','');

adressen[adressen.length] = new adr ('1','f','Wolf','Bach','','Nagoldstr. 41','D','70376','Stuttgart','0711 / 59 14 07','0711 / 477 06 10','0172 / 952 07 58','wolf_bach@beeck.com','a','b', '70, 71, 72, 73, 74 ,75, 895','','');
adressen[adressen.length] = new adr ('2','f','Gerhard F.','Kalmbach','','Gungelsbrunnen 17','D','21339','L&uuml;neburg','04131 / 18 81 22','04131 / 18 02 58','0171 / 778 43 34','g.f.kalmbach@beeck.com','a','b','061, 063, 064, 065, 067, 068, 17, 18, 19, 20, 210, 211, 213, 214, 215, 218, 219, 22, 23, 24, 25, 290, 291, 292, 293, 294, 295, 297, 298, 299, 30, 310, 311, 312, 313, 314, 316, 318, 319, 370, 371, 374, 375, 376, 377, 378, 379, 38, 39','','');
//adressen[adressen.length] = new adr ('3','f','Andreas','Raab','','Haukeller 5','D','36157','Ebersburg','06656 / 91 87 05','06656 / 91 87 06','0175 / 208 50 94','','a','b','34, 35, 36, 372, 373, 60, 61, 62, 63, 64, 65, 97, 98, 99','','');
adressen[adressen.length] = new adr ('3','f','Ralf','Rieks','Im Hause Beeck','Gottlieb-Daimler-Str. 4','D','89150','Laichingen','07333 / 96 07 12','07333 / 96 07 10','0173 / 988 55 12','ralf.rieks@beeck.com','a','b','86, 87, 88, 89','','');
//adressen[adressen.length] = new adr ('4','f','Bernhard','Springer','','M&auml;hlerweg 26','D','45276','Essen','0201 / 51 75 75','0201 / 51 46 223','0172 / 715 20 65','','a','b','330, 331, 40, 41, 42, 43, 44, 45, 46, 47, 5707, 5708, 572, 573, 574, 58, 59','','');
//adressen[adressen.length] = new adr ('4','f','Bernhard','Springer','','M&auml;hlerweg 26','D','45276','Essen','0201 / 51 75 75','0201 / 51 46 223','0172 / 715 20 65','','a','b','32, 33, 44, 45, 46, 47, 48, 58, 59','','');
//adressen[adressen.length] = new adr ('5','f','Bernd Willy','Engel','','An den Linden 38b','D','99444','Blankenhain','036454 / 59 99 7','036454 / 59 99 7','0175 / 204 40 96','b.w.@beeck.com','','b','34, 35, 36, 60, 61, 62, 63, 64, 65, 68, 69, 96, 97, 98, 99','','');
adressen[adressen.length] = new adr ('6','f','Armin','Thonet','Im Hause Antony-Farben','Ohmstr. 1-3','D','54292','Trier','0651 / 14 77 40','0651 / 14 77 430','00352 / 021148425','','','b','54, 557, 661, 662, 663, 664, 665, 666, 667','','');
adressen[adressen.length] = new adr ('7','f','Bernd Willy','Engel','','An den Linden 38b','D','99444','Blankenhain','036454 / 59 99 7','036454 / 59 99 7','0175 / 204 40 96','b.w.engel@beeck.com','','b','01, 02, 03, 04, 062, 066, 069, 07, 08,09, 34, 35, 36, 60, 61, 62, 63, 64, 65, 68, 69, 96, 97, 98, 99','','');
//adressen[adressen.length] = new adr ('8','f','Heiko','Rauschenbach','','Märchenweg 12','D','51515','Kürten','02268 / 800368','02268 / 800369','0175 / 2044096','','a','b','35, 50, 51, 52, 53, 56, 57, 65','','');
//adressen[adressen.length] = new adr ('8','f','Bernd','Reers','','Justinianstr. 9','D','50679','Köln','0221 / 82 95 530','0221 / 82 95 531','0172 / 783 16 //01','B.Reers@beeck.de','a','b','32, 33, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 56, 57, 58, 59','','');
//adressen[adressen.length] = new adr ('9','f','Thomas','Gahntz','','Reutlingerstr. 80','D','70597','Stuttgart','0711 / 75 86 43 59','0711 / 75 86 43 59','0173 / 30 93 361','','a','b', '76, 77, 78, 79, 67 ,68','','');
adressen[adressen.length] = new adr ('8','f','Alfred.G.','Smieszchala','','Flintruper Ring 22','D','48231','Warendorf','02581 / 9414275','02581 / 9414270','0173 / 3093361', 'a.g.smieszchala@beeck.com','a','b','32, 33, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 56, 57, 58, 59','','');
adressen[adressen.length] = new adr ('37','i','','Bio Home cv.','Natuurverven','Korte Spekstraat 16','B','2220','Heist op de Berg','0032 15 243369',
'0032 15 243369','','','a','','B','Belgium','Belgien');
adressen[adressen.length] = new adr ('38','i','','Farbeco SPRL','','Rue Ernest Berthet 49','B','1341','Ottignies-Louvain-la-Neuve','0032 10 / 61 29 89','0032 10 / 62 01 65','','','a','b','B,','Belgium, France','Belgien');
//adressen[adressen.length] = new adr ('39','i','','P.E.C. International nv','','Verbindingstraat 2','B','9100','Sint-Niklaas','0032 3 / 766 11 66','0032 3 / 777 35 09','','','','b','B','Belgium','Belgien');
adressen[adressen.length] = new adr ('40','i','','K.R. Farveteknik','','Gladsaxe Mollevej 67','DK','2860','Soborg','0045 35 / 83 02 63','0045 35 / 83 02 69','','','','b','DK, N','Denmark, Norway','D&auml;nemark, Norwegen');
//adressen[adressen.length] = new adr ('41','i','','K.R.Farveteknik','Herr Raben','Sigurdsgade 35','DK','2200','Kopenhagen','0045 35 / 83 02 63','0045 35 / 83 02 69','','','a','b','DK, N','Denmark, Norway','D&auml;nemark, Norwegen');
//adressen[adressen.length] = new adr ('42','i','','K.R.Farveteknik','Herr Widahl','Sovej 11','DK','8410','Ronde','0045 86 / 36 74 03','0045 86 / 36 70 15','','','a','b','DK, N','Denmark, Norway','D&auml;nemark, Norwegen');
//adressen[adressen.length] = new adr ('41','i','','Natural Building Technologies Ltd','','The Hangar, Worminghall Road, Oakley','GB','HP18 9UL','Buckinghamshire','+44(0) 1844 / 338 338','+44(0) 1844 / 338 525','','','','b','GB','Great Britain(except Irland)','Großbritannien (außer Irland)');
//adressen[adressen.length] = new adr ('42','i','','Natural Building Technologies Ltd','','Cholsey Grange, Ibstone, High Wycombe','SCH','HP14 3XT','Bucks','0044 1491 / 63 89 11','0044 1491 / 63 86 30','','','','b','SCH','Schottland','Schottland');
adressen[adressen.length] = new adr ('43','i','','Natural Paint Distribution Southern,<br>Cornish Lime Company','','Brims Park - Old Callwith Road','GB','PL31 2DZ','Bodim','0044 1208 / 79 77 9','0044 1208 / 73 74 4','','phil@cornishlime.co.uk','a', 'b','GB','South England','Südengland');
adressen[adressen.length] = new adr ('44','i','','Natural Paint Distribution Northern,<br>Womersley&#39;s Ltd','','Walkley Lane, Heckmondwike','GB','WF16 OPG','West Yorkshire','0044 1924 / 40 06 51','0044 1924 / 40 34 89','','markwomersley@aol.com','a','b','GB','North England','Nordengland');
adressen[adressen.length] = new adr ('45','i','','Neuma Casasana psc.','','Via Bellaria 14','I','27013','Chignolo Po PV','0039 0523 / 84 28 03 + 84 08 57','0039 0523 / 84 28 03 + 84 08 57','','','a','','I','Italy','Italien');
//adressen[adressen.length] = new adr ('46','i','','Nuova Commerciale Colori','Graziano Toffolon','Via Calnova 138/4','I','30027','San Don&aacute; di Piave','0039 0421 / 445 04','0039 0421 / 22 59 75','','','','b','I','Italy (Venice region)','Italien (Region Venedig)');
adressen[adressen.length] = new adr ('46','i','','COMMERCIALE COLORI di Simoni Saverio','','via Rimini, 1','I','40128','BOLOGNA','0039 051 / 32 61 62','0039 051 / 32 61 62','','','','b','I','Italy (besides Venice region)','Italien (außer Region Venedig)');
//adressen[adressen.length] = new adr ('47','i','','F&auml;rgbyyge AB','','Mossv&auml;gen 20 B','S','15337','J&auml;rna','0046 8 / 55 17 47 50','0046 8 / 55 17 35 71','','','a','b','S','Sweden','Schweden');
adressen[adressen.length] = new adr ('48','i','','Novantino AG','Import u. Gro&szlig;handel','Drusbergstr. 16','CH','8700','Erlenbach','0041 44 / 913 30 10','0041 44 / 913 30 13','','','a','','CH, FL','Switzerland, Liechtenstein','Schweiz, Liechtenstein');
adressen[adressen.length] = new adr ('47','i','','Thymos AG','','Niederlenzer Kirchweg 1','CH','5600','Lenzburg','0041 62 / 89 24 444','0041 62 / 89 24 465','','','','b','CH','Switzerland','Schweiz');
adressen[adressen.length] = new adr ('49','i','','Thymos AG','','Militärstrasse 34 A','CH','3014','Bern','0041 31 / 335 60 60','0041 31 / 335 60 65','','','','b','CH','Switzerland','Schweiz');
//adressen[adressen.length] = new adr ('49','i','','Integralia','La Casa Natural','C/Ciscar 65','E','46009','Valencia','0034 96 / 395 19 59','0034 96 / 347 15 20','','','a','','E','Spain','Spanien');
adressen[adressen.length] = new adr ('50','i','','Traditional Lime Company LTD','','Rath, Shillelagh Road, Tullow','IRL','','Co.Carlow','00353 / 599 151 750','00353 / 599 152 113','','admin@traditionallime.com','a','b','IRL','Ireland','Irland');
//adressen[adressen.length] = new adr ('51','i','','Yoshida Seiyusho, Ltd.','','3-22-8, Ueno, Taito-Ku','J','110-0005','Tokyo 110-0005','00-81-3 - 3834-4173','00-81-3 - 3831-4171','','','a','','J','Japan','Japan');
//adressen[adressen.length] = new adr ('52','i','','Wohnbauladen','Inh. Volkmar Baurecker','Goethestr. 38','A','4020','Linz','0043 732 / 60 22 44','0043 732 / 60 22 44/19','','','a','','A','Austria','&Ouml;sterreich');
//adressen[adressen.length] = new www_adr ('53','i','','Environmental','Buildings Supplies','819 SE Taylor Street','USA','97214','Portland OR','001 / 503 / 222 3881','001 / 503 / 222 3756','','info@aglaiapaint.com','<a href="http://www.aglaiapaint.com" target="_blank">www.aglaiapaint.com</a>','a','','USA','USA','USA');
//adressen[adressen.length] = new adr ('54','i','','Worldwide Sales &amp; Services','Private Limited','26 Jalan Kuang','SGP','488893','Singapore','0065 / 542 68 69','0065 / 214 01 81','','','','b','SGP, CHN','South-East Asia, esp. Singapore, China','S&uuml;d-Ost-Asien, spez. Singapur, China');
adressen[adressen.length] = new adr ('54','i','','Shenzhen Domecom Enterprise Co. Ltd.',' ','Flat K, 5/F.,Block B, Bank of China Tower, No. 5015 Cai Tian Road, ','CHN',' ','Shenzhen','0086 / 755 / 82469451','0086 / 755 / 82469453','','szdomecom@szdomecom.com','www.szdomecom.com','b','CHN','China');
adressen[adressen.length] = new adr ('55','i','','Natuurlijk Kleurrijk','','Valkenboskade 595','NL','2563 JE','Den Haag','0031 06 / 41852557','info@natuurlijk-kleurrijk.nl','','','a','b','NL','Holland','Niederlande');
//adressen[adressen.length] = new adr ('56','i','','La Maison de L&#39;Ecologie','','Zone Artisanale','F','38960','St. Aupre','0033 / 476 06 09 99','0033 / 476 55 38 38','','','a','','F','France','Frankreich');
//adressen[adressen.length] = new adr ('57','i','','Scottish Lime Centre Trust','','Rocks Road, Charlestown','SCH','KY11 3EN','Fife','0044 1383 / 87 27 22','0044 1383 / 87 27 44','','roz@scotlime.org','a','','SCH','Schottland','Schottland');
adressen[adressen.length] = new adr ('58','i','','N.O.P.TEC Co,Ltd.','Natural Organic Paints','59, Monjung-Dong, Songpa-KU','ROK','138200','Seoul','00822 / 443 / 7760','00822 / 443 / 7796','','','a','b','ROK','Korea','Korea');
adressen[adressen.length] = new adr ('56','i','','Construire au Naturel','','Z.I. des Iles cordees  Rue de la cuche','F','38113','Veurey-Voroize','+33(0)438020348','','','contact@construireaunaturel.com','a','','F','France','Frankreich');
adressen[adressen.length] = new adr ('59','i','','Uzertas Boya Sanayi Ticaret A.S.','','Aydinli Mah. Boya - Vernik OSD  Bati Caddesi 5. Sokak No:1','TR','34953','Tuzla - ISTANBUL ','+90 216 593 02 03','+90 216 593 02 11','','im@uzertas.com.tr',' <a href="http://www.uzertas.com.tr" target="_blank">www.uzertas.com.tr</a>','b','TR','Turkey','Türkei');

function adr (lfnr,func,vorn,name,co,str,land,plz,ort,tel,fax,mob,email,ag,be,ber,Engl,Germ) {
  this.lfnr  = lfnr;
  this.func  = func;
  this.vorn  = vorn;
  this.name  = name;
  this.co    = co;
  this.str   = str;
  this.land  = land;
  this.plz   = plz;
  this.ort   = ort;
  this.tel   = tel;
  this.fax   = fax;
  this.mob   = mob;
  this.email = email;
  this.ag    = ag;
  this.be    = be;
  this.ber   = ber;
  this.Engl  = Engl;
  this.Germ  = Germ;
}

function www_adr (lfnr,func,vorn,name,co,str,land,plz,ort,tel,fax,mob,email,www,ag,be,ber,Engl,Germ) {
  this.lfnr  = lfnr;
  this.func  = func;
  this.vorn  = vorn;
  this.name  = name;
  this.co    = co;
  this.str   = str;
  this.land  = land;
  this.plz   = plz;
  this.ort   = ort;
  this.tel   = tel;
  this.fax   = fax;
  this.mob   = mob;
  this.email = email;
  this.www	 = www;
  this.ag    = ag;
  this.be    = be;
  this.ber   = ber;
  this.Engl  = Engl;
  this.Germ  = Germ;
}

var statlist = new Array();
statlist[statlist.length] = new country ('B','Belgien','Belgium');
statlist[statlist.length] = new country ('CHN','China','China');
statlist[statlist.length] = new country ('DK','D&auml;nemark','Denmark');
statlist[statlist.length] = new country ('F','Frankreich','France');
statlist[statlist.length] = new country ('GB','Großbritannien (außer Irland)','Great Britain');
statlist[statlist.length] = new country ('SCH','Schottland','Schottland');
statlist[statlist.length] = new country ('I','Italien','Italy');
statlist[statlist.length] = new country ('IRL','Irland','Ireland');
statlist[statlist.length] = new country ('J','Japan','Japan');
statlist[statlist.length] = new country ('ROK','Korea','Korea');
statlist[statlist.length] = new country ('FL','Liechtenstein','Liechtenstein');
statlist[statlist.length] = new country ('NL','Niederlande','Holland');
statlist[statlist.length] = new country ('N','Norwegen','Norway');
statlist[statlist.length] = new country ('A','&Ouml;sterreich','Austria');
statlist[statlist.length] = new country ('S','Schweden','Sweden');
statlist[statlist.length] = new country ('CH','Schweiz','Switzerland');
statlist[statlist.length] = new country ('SGP','Singapur','Singapore');
statlist[statlist.length] = new country ('E','Spanien','Spain');
statlist[statlist.length] = new country ('USA','USA','USA');
//statlist[statlist.length] = new country ('GB','Nordengland','North England');
//statlist[statlist.length] = new country ('GB','Südengland','South England');
statlist[statlist.length] = new country ('TR','Türkei','Turkey');

function country (land,Germ,Engl) {
  this.land  = land;
  this.Germ = Germ;
  this.Engl = Engl;
}

function delLeadBlank (str) {
    return str.replace(/^ +/,"");
}

function delTrailBlank (str) {
    return str.replace(/ +$/,"");
}

function writelistel_adr (i,gr,bzip) {
    var s     = new String("");
    var logoset = false;

           s += '<tr><td width="250" valign="top">&nbsp;</td>\n';
           s += '<td width="30"></td><td width="250" valign="top"><p class=\"text\"><b>'+adressen[i].vorn;
           if (adressen[i].vorn != '') {
              s += ' ';
           }
           s += adressen[i].name+'</b>';
           if (adressen[i].co != '') {
              s += '<br>'+adressen[i].co;
           }
           s += '</p></td>\n';

           s += '<td width=\"175\" valign=\"top\" align=\"left\" rowspan=\"4\">\n';
           if (adressen[i].func == 'f') {
              s += '<img src=\"../image/BE_BERATER.gif\" width=\"100\" height=\"28\" border=\"0\" alt=\"BEECK Fachberater\">\n';
              logoset = true;
           }
           if (adressen[i].be == 'b') {
              s += ((logoset)?'<br>':'')+'<img src=\"../image/be_logo.jpg\" height=\"13\" border=\"0\" alt=\"BEECK Mineralfarben\">\n';
              logoset = true;
           }
           if (adressen[i].ag == 'a' && !(gr=='h' && (bzip.slice(0,2)=='30'||bzip.slice(0,2)=='31') && adressen[i].name=='Kalmbach' && sp.indexOf('a')>=0)) {
              s += ((logoset)?'<br>':'')+'<img src=\"../image/ag_logo.jpg\" height=\"13\" border=\"0\" alt=\"AGLAIA Naturfarben\">\n';
           }
           s += '</td>\n';
           s += '</tr>\n';

           s += '<tr><td valign="top" align="right"><p class=\"text\">Adresse:</p></td><td width="30"></td>';
           s += '<td valign="top"><p class=\"text\">'+adressen[i].str+'<br>'+adressen[i].land+'-'+adressen[i].plz+' '+adressen[i].ort+'</p></td></tr>\n';
           if (adressen[i].tel != '') {
                s += '<tr><td valign="top" align="right"><p class=\"text\">Telefon:</p></td><td width="30"></td>';
                s += '<td valign="top"><p class=\"text\">'+adressen[i].tel+'</p></td></tr>\n';
           }
           if (adressen[i].fax != '') {
              s += '<tr><td valign="top" align="right"><p class=\"text\">Fax:</p></td><td width="30"></td>';
              s += '<td valign="top"><p class=\"text\">'+adressen[i].fax+'</p></td></tr>\n';
           }
           if (adressen[i].mob != '') {
              s += '<tr><td valign="top" align="right"><p class=\"text\">Mobil:</p></td><td width="30"></td>';
              s += '<td valign="top"><p class=\"text\">'+adressen[i].mob+'</p></td></tr>\n';
           }
           if (adressen[i].email != '') {
              s += '<tr><td valign="top" align="right"><p class=\"text\">E-Mail:</p></td><td width="30"></td>';
              s += '<td valign="top"><p class=\"text\">'+adressen[i].email+'</p></td></tr>\n';
           }
           if (adressen[i].www != '') {
              s += '<tr><td valign="top" align="right"><p class=\"text\">WWW:</p></td><td width="30"></td>';
              s += '<td valign="top"><p class=\"text\">'+adressen[i].www+'</p></td></tr>\n';
           }
           if (gr == 'i') {
              s += '<tr><td valign="top" align="right"><p class=\"text\">zust&auml;ndig f&uuml;r:</p></td><td width="30"></td>';
              s += '<td valign="top"><p class=\"text\">'+((lg=='en')?adressen[i].Engl:adressen[i].Germ)+'</p></td></tr>\n';
           }
           s += '\n';

    return s;
}

function findAdr (form,gr,nextfile) {
    var s = new String("");

    sp = "";

/**
    for (var i=0; i<form.elements.length; i++)
    {
    	if (form.elements[i].type == 'checkbox')
    	{
    		if (form.elements[i].checked)
    		{
    			sp += form.elements[i].value;
    		}
      	}
    } 
*/

/**    for (var i=0; i<form.elements.length; i++) {
    	
    	*/
	if(gr == 'f')
	{
		form.elements[0].checked = true;
		form.elements[1].checked = true;
		sp += 'a';
		sp += 'b';
	}
	
	if(gr == 'h')
	{
		sp += 'a';
	}
    	
    for (var i=0; i<form.elements.length; i++)
    {
      if(gr == 'i')
      {
      	 if (form.elements[i].type == 'checkbox')
    	 {
    		if (form.elements[i].checked)
    		{
    			sp += form.elements[i].value;
    		}
      	}
      }
      if (form.elements[i].type == 'text') {
        zip = form.elements[i].value;
        zip = delTrailBlank(delLeadBlank(zip));
        if (gr != 'i') {
           if ( zip.match(/\d\d\d*/) != zip ) {
              alert("Bitte geben Sie mindestens zwei Ziffern der Postleitzahl ein!\n\nOder haben Sie sich vertippt?\nEine Postleitzahl besteht nur aus Ziffern");
              return;
           }
        } else {//international
           if ( zip.match(/\w+/i)!=zip || zip.search(/\d/)>=0 || zip.search(/_/)>=0 ) {
              alert("In Laenderkuerzeln sind nur Buchstaben erlaubt");
              return;
           } else if (zip.toUpperCase() == 'D') {
              alert("In Deutschland bitte mit Hilfe Ihrer Postleitzahl\nnach einem Haendler oder Berater in Ihrer Naehe suchen");
              parent.cont.location.href = 'haendler.html';
              return;
           }
           zip = zip.toUpperCase();
        }
      } else if (form.elements[i].type == 'select-one') {
        zip = form.elements[i].options[form.elements[i].selectedIndex].value;
      }
    }
    
    if (sp == '') {
       alert("Bitte geben Sie an,\nzu welchem Produktbereich (BEECK oder AGLAIA)\nSie Haendler oder Berater suchen");
       return;
    }
    parent.cont.location.href = nextfile;
}

function showAdr (gr) {
    var vor    = new String("");
    var s      = new String("");
    var prgr   = new String("");
    var bzip   = new String("");
    var zipant = new String("");
    var bzipant = new String("");
    var a      = new Array();
    var j;
    var l;
    var found = 0;
    var reg;
    var firstfb = true;

    s += '<tr><td colspan=\"3\"><p class=\"text\">';
    if (gr == 'i') {
       s += 'H&auml;ndler in Ihrem Land:';
    } else {
       s += ((gr=='f')?'Fachberater':'H&auml;ndler')+' in Ihrer N&auml;he:';
    }
    s += '</p></td></tr>\n';
    for (var i=0; i<adressen.length; i++) {
      if (gr == 'h' || adressen[i].func == gr) {
        a = adressen[i].ber.split(",");
        j = 0;
        reg = false;
        while (j < a.length && !reg) {
            bzip = delTrailBlank(delLeadBlank(a[j]));
            if (gr == 'i') {
               bzipant = bzip;
               zipant  = zip;
            } else {
               l = Math.min(bzip.length,zip.length);
               bzipant = bzip.slice(0,l);
               zipant  = zip.slice(0,l);
            }
            if (bzipant == zipant && gr == adressen[i].func) {//zip-code stimmt (plz oder staat)
               if (/*sp == '' || */(adressen[i].ag=='a' && sp.indexOf('a')>=0) || (adressen[i].be=='b' && sp.indexOf('b')>=0)) {//Zustaendigkeit?
                  //Treffer
                  if (sp.indexOf('b')>=0 || !(gr=='h' && (bzip.slice(0,2)=='30'||bzip.slice(0,2)=='31') && adressen[i].name=='Kalmbach' && sp.indexOf('a')>=0)) {
                  //spezialfall: berater kalmbach nicht zusammen mit naturbauhaus farbenfroh bzgl. aglaia
                     reg = true;
                     if (found > 0) {//ist nicht der erste Treffer, also Abstand zum vorherigen Treffer
                        s += '<tr height=\"10\"><td>&nbsp;</td></tr>\n';
                        if (adressen[i].func=='f' && firstfb) {//zusaetzlicher abstand zwischen haendler und berater
                           s += '<tr height=\"40\"><td>&nbsp;</td></tr>\n';
                        }
                     }
                     if (adressen[i].func=='f') {
                        firstfb = false;
                     }
                     s += writelistel_adr (i,gr,bzip);
                  found ++;
                  }
               }
            }
            j++;
        }
      }
    }
    if (found == 0) {
       prgr = ((sp.indexOf('b')>=0)?'BEECK Mineralfarben':'');
       if (sp.indexOf('a')>=0) {
          if (prgr != '') {
             prgr += ' und/oder ';
          }
          prgr += 'AGLAIA Naturfarben';
       }
       s = '<tr><td colspan=\"3\"><p class=\"text\">Leider kein Treffer\n';
       s += 'Bitte wenden Sie sich an unsere <a target=\"main\" href=\"../service/beratwerk_fr.html\">technische Beratung</a>\n';
       s += '</p></td></tr>\n';
    }
    return s;
}

function findReset (form) {
    for (var i=0; i<form.elements.length; i++) {
      if (form.elements[i].type == 'checkbox') {
        if (form.elements[i].checked) {
          form.elements[i].checked = false;
        }
      } else if (form.elements[i].type == 'text') {
        form.elements[i].value = "";
      } else if (form.elements[i].type == 'select-one') {
        form.elements[i].selectedIndex = 0;
      }
    }
    return true;
}

function formDefSp (index) {
    var s      = new String("");
    
    if(index == 'fach')
    {
//    	s += '<input name=\"spbe\" type=\"checkbox\" value=\"b\"'+((sp.indexOf('b')>=0)?' checked':'')+' tabindex=\"1\">\n';
    	s += '<img src=\"../image/be_logo.jpg\" height=\"13\" border=\"0\" alt=\"BEECK Mineralfarben\"></input>\n';
//    	s += '<br><input name=\"spag\" type=\"checkbox\" value=\"a\"'+((sp.indexOf('a')>=0)?' checked':'')+' tabindex=\"2\">\n';
		s += '<br>'
    	s += '<img src=\"../image/ag_logo.jpg\" height=\"13\" border=\"0\" alt=\"AGLAIA Naturfarben\"></input>';
    }
    
    if(index == 'haendler')
    {
//    	s += '<input name=\"spbe\" type=\"checkbox\" value=\"b\"'+((sp.indexOf('b')>=0)?' checked':'')+' tabindex=\"1\">\n';
//    	s += '&nbsp;&nbsp;<img src=\"../image/be_logo.jpg\" height=\"13\" border=\"0\" alt=\"BEECK Mineralfarben\"></input>\n';
//    	s += '<br><input name=\"spag\" type=\"checkbox\" value=\"a\"'+((sp.indexOf('a')>=0)?' checked':'')+' tabindex=\"2\">\n';
    	s += '<img src=\"../image/ag_logo.jpg\" height=\"13\" border=\"0\" alt=\"AGLAIA Naturfarben\"></input>';
    }
    
    if(index == 'inter')
    {
    	s += '<input name=\"spbe\" type=\"checkbox\" value=\"b\"'+((sp.indexOf('b')>=0)?' checked':'')+' tabindex=\"1\">\n';
    	s += '&nbsp;&nbsp;<img src=\"../image/be_logo.jpg\" height=\"13\" border=\"0\" alt=\"BEECK Mineralfarben\"></input>\n';
    	s += '<br><input name=\"spag\" type=\"checkbox\" value=\"a\"'+((sp.indexOf('a')>=0)?' checked':'')+' tabindex=\"2\">\n';
    	s += '&nbsp;&nbsp;<img src=\"../image/ag_logo.jpg\" height=\"13\" border=\"0\" alt=\"AGLAIA Naturfarben\"></input>';
    }    
    return s;
}

function formDefZip (gr) {
    var s      = new String("");
    if (gr == 'i') {
       if (zip.search(/\d/) >= 0) { zip = ''; sp = ''; }
       s += '<select name=\"zip\" size=\"1\" tabindex=\"0\">\n';
       for (var i=0; i<statlist.length; i++) {
           s += '<option value=\"'+statlist[i].land+'\"'+((zip!=''&&statlist[i].land==zip)?' selected':'')+'>'+((lg=='en')?statlist[i].Engl:statlist[i].Germ)+'</option>\n';
       }
       s += '</select>\n';
    } else {
       if (zip.match(/\w+/i)==zip && zip.search(/\d/)<0 && zip.search(/_/)<0) {
          zip = '';
          sp = '';
       }
       s += '<input name=\"zip\" type=\"text\" maxlength=\"7\" size=\"7\" value=\"'+zip+'\" tabindex=\"0\"></input>';
    }
    return s;
}

/*function formDefZip (gr) {//default zip fuer laenderkuerzel
    var s      = new String("");
    if (gr == 'i') {
       if (zip.search(/\d/) >= 0) { zip = ''; sp = ''; }
    } else if (zip.match(/\w+/i)==zip && zip.search(/\d/)<0 && zip.search(/_/)<0) {
       zip = '';
       sp = '';
    }
    s += '<input name=\"zip\" type=\"text\" maxlength=\"7\" size=\"7\" value=\"'+zip+'\"></input>';
    return s;
}*/