var warning = ""; function checkForm() { if (checkFields()) { for (i=0; i < document.your_contact_form.elements.length; i++) { if (document.your_contact_form.elements[i].value == 0) document.your_contact_form.elements[i].disabled=true; } document.your_contact_form.action = ''; document.your_contact_form.submit(); return false; } return false; } function checkFields(){ var check = true; if (!checkPhoneEmail()) check = false; if (!checkSurname()) check = false; if (!checkFirstname()) check = false; if (!checkMessage()) check = false; if (!checkStreet()) check = false; if (!checkZipcode()) check = false; if (!checkCity()) check = false; if (!checkCountry()) check = false; if (!check) alert(warning); return check; } function showWarning(elem,id) { var message = "Vul alle met een asterisk gemarkeerde velden in"; if (id==1) message = "Voer een geldig e-mailadres in"; document.getElementsByName(elem)[0].style.border = "1px solid red"; //alert(message); warning = message; return false; } function checkFirstname(){ if (document.your_contact_form.firstname.value.length < 2) { showWarning("firstname",0); document.your_contact_form.firstname.focus(); return false; } else return true; } function checkSurname(){ if (document.your_contact_form.surname.value.length < 2) { showWarning("surname",0); document.your_contact_form.surname.focus(); return false; } else return true; } function checkMessage(){ if (document.your_contact_form.message.value.length < 2) { showWarning("message",0); document.your_contact_form.message.focus(); return false; } else return true; } function checkStreet(){ if (document.your_contact_form.street.value.length < 2) { showWarning("street",0); document.your_contact_form.street.focus(); return false; } else return true; } function checkZipcode(){ if (document.your_contact_form.zipcode.value.length < 2) { showWarning("zipcode",0); document.your_contact_form.zipcode.focus(); return false; } else return true; } function checkCity(){ if (document.your_contact_form.city.value.length < 2) { showWarning("city",0); document.your_contact_form.city.focus(); return false; } else return true; } function checkCountry(){ if (document.your_contact_form.country.value.length < 2) { showWarning("country",0); document.your_contact_form.country.focus(); return false; } else return true; } function checkPhoneEmail(){ var chkPhone = true; var chkEmail = true; var isAdress = true; unBorder(document.your_contact_form.phone); unBorder(document.your_contact_form.email); // ### check phone ### if (document.your_contact_form.phone.value.length < 2) chkPhone = false; // ### check email ### if (document.your_contact_form.email.value.length < 2) chkEmail = false; else if ((document.your_contact_form.email.value.indexOf('@') == -1) || (document.your_contact_form.email.value.indexOf('.') == -1)) isAdress = false; if (!chkEmail && !chkPhone){ // ### both fields empty ### showWarning("phone",0); showWarning("email",0); document.your_contact_form.email.focus(); return false; } else if (chkEmail && !isAdress){ // ### wrong address format ### showWarning("email",1); document.your_contact_form.email.focus(); return false; } else return true; } function unBorder (obj) { obj.style.border = '0'; // if( (navigator.appName == "Microsoft Internet Explorer" ) && (parseInt(navigator.appVersion) < 7) ) obj.style.borderLeft = "1px solid #cacacb"; // if ((navigator.userAgent.indexOf('MSIE 6')!=-1) && (obj.tagName.toLowerCase()=='input')) obj.style.borderLeft = '1px solid #cacacb'; if (((navigator.userAgent.indexOf('MSIE 6')!=-1)||(navigator.userAgent.indexOf('MSIE 7')!=-1))&&(obj.tagName.toLowerCase()=='input')) { obj.style.borderLeft = '1px solid #cacacb'; } if ((navigator.userAgent.indexOf('MSIE 7')!=-1)&&(obj.tagName.toLowerCase()=='textarea')) { obj.style.borderTop = '1px solid #cacacb'; obj.style.borderBottom = '1px solid #cacacb'; obj.style.borderLeft = '1px solid #cacacb'; } return false } function showContactAddress (cid) { for(i=0;i b.topic) return 1; return 0; }; function c(s) { a = s.split('~'); var x = new dummy(); x.id=a.shift(); x.topic=a.shift(); x.adr=a.shift(); x.mail=a.shift(); contacts.push(x); }; var contacts = new Array(); c('24512~RailServices~

Tel.: +49 89 3547 182363

E-Mail: RailServices@knorr-bremse.com

~RailServices@knorr-bremse.com'); c('24000~Distributie persberichten~

Eva Doppler
Tel: +49 89 3547 1498
E-Mail: eva.doppler@knorr-bremse.com

~presse@knorr-bremse.com'); c('264~Knorr-Bremse General~

Knorr-Bremse AG
Moosacher Str. 80
80809 München
Germany

Tel: +49 89 3547 0
Fax: +49 89 3547 2767
E-Mail: info@knorr-bremse.com

~info@knorr-bremse.com'); c('263~Banen en carrière~

E-Mail: karriere@knorr-bremse.com

~karriere@knorr-bremse.com'); c('260~Verkoop Systemen voor bedrijfswagens~

Tel: +49 89 3547 2430
Fax: +49 89 3547 2573
E-Mail: sfn@knorr-bremse.com

~sfn@knorr-bremse.com'); c('259~Klachtenmanagement Systemen voor bedrijfswagens~

Tel: +49 89 3547 1431
Fax: +49 89 3547 2262
E-Mail: complaint.sfn@knorr-bremse.com

~complaint.sfn@knorr-bremse.com'); c('258~Inkoop Systemen voor bedrijfswagens~

E-Mail: purchasing.group@knorr-bremse.com

~purchasing.group@knorr-bremse.com'); c('257~Ondernemingscommunicatie~

Tel: +49 89 3547 1498
E-Mail: public.relations@knorr-bremse.com

~public.relations@knorr-bremse.com'); contacts.sort(compare);