152 lines
4.7 KiB
JavaScript
152 lines
4.7 KiB
JavaScript
|
|
function t(t,a,n,p) {
|
|
alert(+n+" Stück "+t+" "+a+" wurde in den Warenkorb gelegt! ");
|
|
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
|
|
document.cookie = name1+"=";}
|
|
|
|
|
|
// 16x4 Spindeln nach Länge bestellen
|
|
function ts(t, a ,n,l, p) {
|
|
machen = true;
|
|
if ( l.length != 3 ) { alert("Bitte die Länge richtig eingeben (3 Stellen)!");machen = false; }
|
|
if ( l > 999 ) { alert("Maximale Länge des Trapezgewindes ist 999 mm!");machen = false; }
|
|
if ( l < 100 ) { alert("Minimale Länge des Trapezgewindes ist 100 mm!");machen = false; }
|
|
if (machen == true ) {
|
|
p = 0.02; // Preis pro mm
|
|
p = (p * l);
|
|
p = p.toFixed(2);
|
|
a = a + l + "c";
|
|
alert(+n+" Stück "+t+" "+a+" wurde in den Warenkorb gelegt! ");
|
|
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
|
|
document.cookie = name1+"="; }
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 12x3 Spindeln langes Gewinde
|
|
function tsl1(t, a ,n,l, p) {
|
|
machen = true;
|
|
if ( l.length != 3 ) { alert("Bitte die Länge richtig eingeben (3 Stellen)!");machen = false; }
|
|
if ( l > 900 ) { alert("Maximale Länge des Trapezgewindes ist 900 mm!");machen = false; }
|
|
if ( l < 100 ) { alert("Minimale Länge des Trapezgewindes ist 100 mm!");machen = false; }
|
|
if (machen == true ) {
|
|
p = 0.015; // Preis pro mm
|
|
p = (p * l) + 12.14;
|
|
p = p.toFixed(2);
|
|
a = a + l + "c";
|
|
alert(+n+" Stück "+t+" "+a+" wurde in den Warenkorb gelegt! ");
|
|
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
|
|
document.cookie = name1+"="; }
|
|
}
|
|
|
|
// 16x4 Spindeln kurzes Gewinde
|
|
function tsk(t, a ,n,l, p) {
|
|
machen = true;
|
|
if ( l.length == 3 ) { a = "16X4TK0"; }
|
|
if ( l.length == 4 ) { a = "16X4TK"; }
|
|
if ( l > 1230 ) { alert("Maximale Länge des Trapezgewindes ist 1230 mm!");machen = false; }
|
|
if ( l < 100 ) { alert("Minimale Länge des Trapezgewindes ist 100 mm!");machen = false; }
|
|
if (machen == true ) {
|
|
p = 0.02; // Preis pro mm
|
|
p = (p * l) + 13.14;
|
|
p = p.toFixed(2);
|
|
if ( l < 1100 ) { a = a + l + "c"; }
|
|
if ( l > 1099 ) { a = a + l + "e"; }
|
|
|
|
alert(+n+" Stück "+t+" "+a+" wurde in den Warenkorb gelegt! ");
|
|
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
|
|
document.cookie = name1+"="; }
|
|
}
|
|
|
|
// 16x4 Spindeln langes Gewinde
|
|
function tsl(t, a ,n,l, p) {
|
|
machen = true;
|
|
if ( l.length == 3 ) { a = "16X4TL0"; }
|
|
if ( l.length == 4 ) { a = "16X4TL"; }
|
|
if ( l > 1230 ) { alert("Maximale Länge des Trapezgewindes ist 1230 mm!");machen = false; }
|
|
if ( l < 100 ) { alert("Minimale Länge des Trapezgewindes ist 100 mm!");machen = false; }
|
|
if (machen == true ) {
|
|
p = 0.02; // Preis pro mm
|
|
p = (p * l) + 13.14;
|
|
p = p.toFixed(2);
|
|
if ( l < 1100 ) { a = a + l + "c"; }
|
|
if ( l > 1099 ) { a = a + l + "e"; }
|
|
|
|
alert(+n+" Stück "+t+" "+a+" wurde in den Warenkorb gelegt! ");
|
|
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
|
|
document.cookie = name1+"="; }
|
|
}
|
|
|
|
// 16x4 Spindeln langes Gewinde 33mm
|
|
function tss(t, a ,n,l, p) {
|
|
machen = true;
|
|
if ( l.length == 3 ) { a = "16X4TS0"; }
|
|
if ( l.length == 4 ) { a = "16X4TS"; }
|
|
if ( l > 1230 ) { alert("Maximale Länge des Trapezgewindes ist 1230 mm!");machen = false; }
|
|
if ( l < 100 ) { alert("Minimale Länge des Trapezgewindes ist 100 mm!");machen = false; }
|
|
if (machen == true ) {
|
|
p = 0.02; // Preis pro mm
|
|
p = (p * l) + 13.14;
|
|
p = p.toFixed(2);
|
|
if ( l < 1100 ) { a = a + l + "c"; }
|
|
if ( l > 1099 ) { a = a + l + "e"; }
|
|
|
|
alert(+n+" Stück "+t+" "+a+" wurde in den Warenkorb gelegt! ");
|
|
name1 = "p1r2i|"+a+"|"+t+"|"+n+"|"+p;
|
|
document.cookie = name1+"="; }
|
|
}
|
|
|
|
|
|
function CookieSetzen (name, wert, verfall, pfad, domain, sicher) {
|
|
|
|
document.cookie = name + "=" + escape (wert) +
|
|
((verfall) ? "; expires=" + verfall.toGMTString() : "") +
|
|
((pfad) ? "; path=" + pfad : "") +
|
|
((domain) ? "; domain=" + domain : "") +
|
|
((sicher) ? "; secure=" + sicher : "");
|
|
}
|
|
|
|
|
|
function WegdaCookie(name, pfad, domain) {
|
|
|
|
Ehemals = new Date ();
|
|
Ehemals.setTime (Ehemals.getTime () - (365 * 24 * 60 * 60 * 1000));
|
|
|
|
CookieSetzen (name, "", Ehemals, pfad, domain);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function agb() {
|
|
if (document.form.B_.value == '') alert("Ihr Warenkorb ist leer! Bitte zuerst eine Ware durch anklicken in den Warenkorb legen !");
|
|
else
|
|
if (document.form.AGBs________.checked != true ) alert("Bitte zuerst AGB's bestätigen !");
|
|
else
|
|
if (document.form.email_______.value == '' ) alert("Bitte Emailadresse eingeben!");
|
|
else
|
|
if (document.form.email_______.value.indexOf('.') < 0) alert("Emailadresse ungueltig!");
|
|
else
|
|
if (document.form.email_______.value.indexOf('@') < 0) alert("Emailadresse ungueltig!");
|
|
else
|
|
if (document.form.Name________.value == '' ) alert("Bitte Ihren Namen eingeben !");
|
|
else
|
|
if (document.form.Strasse_____.value == '' ) alert("Bitte Strasse mit Nummer eingeben !");
|
|
else
|
|
if (document.form.Plz_________.value == '' ) alert("Bitte Ihre PLZ eingeben !");
|
|
else
|
|
if (document.form.Ort_________.value == '' ) alert("Bitte Ihren Ort eingeben !");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
function focus1() {
|
|
document.form.Name________.select();
|
|
} |