function checkMultiple(){ var count=0; var obj; obj = document.Formular["Sample of Adi-pure"]; var l = obj.options.length; for (var i = 0; i < l; i++) if (obj.options[i].selected == true) count++; if (count<1){ alert("Please choose samples."); return false; } else if (count>3) { alert("Sorry, you may only order 3 samples."); return false; } else { // alert("Everythink OK (returning false (DEBUG))"); return true; } } function chkFormular() { document.getElementById('client').value="1"; if(document.Formular.name.value == "") { alert("Please insert your Name"); document.Formular.name.focus(); return false; } if(document.Formular.company.value == "") { alert("Please insert your Company"); document.Formular.company.focus(); return false; } if(document.Formular.street.value == "") { alert("Please insert your Street"); document.Formular.street.focus(); return false; } if(document.Formular.city.value == "") { alert("Please insert your City"); document.Formular.city.focus(); return false; } if(document.Formular.recipient.value == "0") { alert("Please choose your Region"); document.Formular.recipient.focus(); return false; } if(document.Formular.country.value == "") { alert("Please insert your Country"); document.Formular.country.focus(); return false; } if(document.Formular.postalcode.value == "") { alert("Please insert your Postalcode"); document.Formular.postalcode.focus(); return false; } if(document.Formular.phone.value == "") { alert("Please insert your Phonenumber"); document.Formular.phone.focus(); return false; } if(document.Formular["e-mail"].value == "") { alert("Please insert your E-Mail address!"); document.Formular["e-mail"].focus(); return false; } if(document.Formular["e-mail"].value.indexOf('@') == -1) { alert("No E-Mail-Address"); document.Formular["e-mail"].focus(); return false; } return (checkMultiple()); }