function PreisNeu (B_Form) {
 var BestellAnzahl = parseInt(B_Form.anzahl.value,10);
 var BestellPreis = parseInt(B_Form.produkt.options[B_Form.produkt.selectedIndex].value,10);
 var BestellGesamt = parseInt(B_Form.produkt.options[B_Form.produkt.selectedIndex].value,10);
 var Sonderrabatt = 1;
/* var Sonderrabatt = 0.9;*/


 if (BestellPreis == 1) {
  BestellGesamt = 0;
 }
 else if (BestellPreis == 15) {
  BestellGesamt = BestellPreis * BestellAnzahl;
 }
 else if (BestellAnzahl > 9) {
  BestellGesamt = parseInt(BestellPreis * BestellAnzahl * 0.6875 * Sonderrabatt);
 }
 else if (BestellAnzahl > 6) {
  BestellGesamt = parseInt(BestellPreis * BestellAnzahl * 0.75 * Sonderrabatt);
 }
 else if (BestellAnzahl > 4) {
  BestellGesamt = parseInt(BestellPreis * BestellAnzahl * 0.8125 * Sonderrabatt);
 }
 else if (BestellAnzahl > 2) {
  BestellGesamt = parseInt(BestellPreis * BestellAnzahl * 0.875 * Sonderrabatt);
 }
 else if (BestellAnzahl > 1)  {
  BestellGesamt = parseInt(BestellPreis * BestellAnzahl * 0.9375 * Sonderrabatt);
 }
 else {
  BestellGesamt = parseInt(BestellPreis * BestellAnzahl * 1 * Sonderrabatt);
 }

 BestellGesamt = BestellGesamt.toFixed(2);
 B_Form.regpreis.value = BestellGesamt;

 return (true);
}



function Bestellung_Form(B_Form) {
 var BestellEmpfaenger = "Thomas Seidel - B-SIK <bestellung@seidel-dreffke.de>";
 var BestellSubject = B_Form.subject.value;
 var BestellTitel = "Bestellung%0A%0D%0A%0DHiermit bestelle ich bei Thomas Seidel - B-SIK folgendes Produkt:";
 var BestellAnzahl = parseInt(B_Form.anzahl.value,10);
 var BestellPreis = parseInt(B_Form.produkt.options[B_Form.produkt.selectedIndex].value,10);
 var BestellGesamt = parseInt(B_Form.regpreis.value,10);
 var BestellGesamtText = "(inkl. Mengenrabatt)";
/* var BestellGesamtText = "(inkl. Sonder- und Mengenrabatt)";*/
 var BestellPreisText = "(inkl. MwSt.)";
 var BestellBezahlung = "";
 var BestellAngaben = "";
 var NZ = "%0A%0D";
 var LZ = "%20%20";
 var RegNummer = "Registrier-Nr.: " + B_Form.regnummer.value + NZ + NZ;


 if (B_Form.anzahl.value < 1 || isNaN(B_Form.anzahl.value)) {
  alert("Geben Sie einen gültigen Wert in das Feld \"Anzahl\" ein.");
  B_Form.anzahl.focus();
  return (false);
 }


 if (B_Form.produkt.options[B_Form.produkt.selectedIndex].value <= 1) {
  alert("Suchen Sie einen Wert im Feld \"Produkt\" aus.");
  B_Form.produkt.focus();
  return (false);
 }


 if (B_Form.firma.value == "") {
  alert("Geben Sie einen Wert in das Feld \"Firma\" ein.");
  B_Form.firma.focus();
  return (false);
 }


 if (B_Form.name.value == "") {
  alert("Geben Sie einen Wert in das Feld \"Name\" ein.");
  B_Form.name.focus();
  return (false);
 }


 if (B_Form.strasse.value == "") {
  alert("Geben Sie einen Wert in das Feld \"Strasse/Nr.\" ein.");
  B_Form.strasse.focus();
  return (false);
 }


 if (B_Form.plz.value == "") {
  alert("Geben Sie einen Wert in das Feld \"PLZ\" ein.");
  B_Form.plz.focus();
  return (false);
 }


 if (B_Form.ort.value == "") {
  alert("Geben Sie einen Wert in das Feld \"Ort\" ein.");
  B_Form.ort.focus();
  return (false);
 }


 if (B_Form.email.value == "") {
  alert("Geben Sie einen Wert in das Feld \"eMail\" ein.");
  B_Form.email.focus();
  return (false);
 }


 if (B_Form.agb.checked == false) {
  alert("Stimmen Sie bitte den AGB zu.");
  B_Form.agb.focus();
  return (false);
 }


 if (BestellPreis == 50 && B_Form.regnummer.value == "") {
  alert("Geben Sie Ihren Registrierungsschlüssel der älteren Version in das Feld \"Reg.-Nr.\" ein.");
  B_Form.regnummer.focus();
  return (false);
 }


 if (B_Form.anzahl.value == 1) {
  BestellGesamtText = "";
 }

 if (BestellPreis != 50) {
  RegNummer = "";
 }


 if (BestellPreis == 15) {
  BestellGesamtText = "";
 }


 if (BestellGesamt == 0) {
  BestellBezahlung = "Überweisung einer Spende für Share- und Freewareprodukte";
 }


 BestellPreis = BestellPreis.toFixed(2) + LZ + "EUR";
 BestellGesamt = BestellGesamt.toFixed(2) + LZ + "EUR";


 if (B_Form.bezahlung[0].checked == true) {
  BestellBezahlung = B_Form.bezahlung[0].value;
 }
 else if (B_Form.bezahlung[1].checked == true) {
  BestellBezahlung = B_Form.bezahlung[1].value;
 }
 else if (B_Form.bezahlung[2].checked == true) {
  BestellBezahlung = B_Form.bezahlung[2].value;
 }


 BestellAngaben = "Anzahl:" + LZ + BestellAnzahl + NZ
  + "Produkt:" + LZ + B_Form.produkt.options[B_Form.produkt.options.selectedIndex].text + NZ
  + "Einzelpreis:" + LZ + BestellPreis + NZ
  + "Gesamtpreis:" + LZ + BestellGesamt + LZ + BestellPreisText + LZ + BestellGesamtText + NZ
  + "Bezahlung:" + LZ + BestellBezahlung + NZ + NZ
  + RegNummer
  + "Firma:" + LZ + B_Form.firma.value + NZ
  + "Name:" + LZ + B_Form.name.value + NZ
  + "Strasse:" + LZ + B_Form.strasse.value + NZ
  + "PLZ:" + LZ + B_Form.plz.value + NZ
  + "Ort:" + LZ + B_Form.ort.value + NZ
  + "Land:" + LZ + B_Form.land.options[B_Form.land.options.selectedIndex].text + NZ
  + "Telefon:" + LZ + B_Form.telefon.value + NZ
  + "Fax:" + LZ + B_Form.fax.value + NZ
  + "eMail:" + LZ + B_Form.email.value + NZ
  + "Homepage:" + LZ + B_Form.homepage.value + NZ
  + "Hinweise:" + LZ + B_Form.hinweise.value + NZ + NZ
  + "Den AGB stimme ich zu.";


 window.location.href = "mailto:" + BestellEmpfaenger + "?subject=" + BestellSubject + "&body=" + BestellTitel + NZ + NZ + BestellAngaben;


 return (true);
}
