var bLocalTest = (document.URL.toString().substr(0, 4) == 'file'); var strProductKey = 'SHOP_CART'; var aoShopProducts = new Array(); var aoShopShipping = new Array(); var nShopShipping = 0; aoShopShipping[nShopShipping++] = new ShopShipping(nShopShipping, true, 3); // shipping price for CD ROM - EUR and USD aoShopShipping[nShopShipping++] = new ShopShipping(nShopShipping, true, 1.4, 6, 10); // shipping price for Users Guide - EUR aoShopShipping[nShopShipping++] = new ShopShipping(nShopShipping, true, 2, 9, 15); // shipping price for Users Guide - USD aoShopShipping[nShopShipping++] = new ShopShipping(nShopShipping, false, 7, 24, 24); // shipping price for +SmartHand - EUR aoShopShipping[nShopShipping++] = new ShopShipping(nShopShipping, false, 8, 30, 30); // shipping price for +SmartHand - USD aoShopShipping[nShopShipping++] = new ShopShipping(nShopShipping, false, 7.5, 10, 10); // shipping price for USB-Stick - EUR aoShopShipping[nShopShipping++] = new ShopShipping(nShopShipping, false, 10, 13, 13); // shipping price for USB-Stick - USD var nShopProduct = 0; var dShopUSDConversion = 1.15; // Version 10: aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10.0 Bronze", '17A0000001', 142, 'EUR' /* , aoShopShipping[5] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10.0 Silver", '16A0000001', 439, 'EUR' /* , aoShopShipping[5] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10.0 Gold", '01A0000001', 659, 'EUR' /* , aoShopShipping[5] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Gold -> 10.0 Gold", '01A0019001', 134, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Gold -> 10.0 Gold", '01A0019901', 55, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Silver -> 10.0 Gold", '01A016A001', 254, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 8 Gold / 9 Silver -> 10.0 Gold", '01A0169001', 329, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7 Gold / 7-8 Silver / Bronze -> 10.0 Gold", '01A017A001', 549, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Silver -> 10.0 Silver", '16A0169001', 76, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Silver -> 10.0 Silver", '16A0169901', 39, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-8 Silver / Bronze -> 10.0 Silver", '16A017A001', 329, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-9 Bronze -> 10.0 Bronze", '17A0179001', 44, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Bronze -> 10.0 Bronze", '17A0179901', 18, 'EUR'); /* aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 10.0 Bronze", '17A0075A01', 99, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 10.0 Silver", '16A0075A01', 329, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 10.0 Gold", '01A0075A01', 499, 'EUR'); */ aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 10.0", '02A0000001', 76, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 9 -> 10.0", '02A0029901', 12, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 7-9 -> 10.0", '02A0029001', 44, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+SmartHand Mobile", '11A0000001', 44, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Collection", '50A0000001', 44, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Hardware 10", '46A0000001', 54, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net Start Set", '08A0000001', 129, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net Extension", '08A008A001', 76, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net/D Start Set", '09A0000001', 164, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net/D Extension", '09A009A001', 99, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+4DSound", '10A0000001', 129, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Street", '13A0000001', 99, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Cargo", '15A0000001', 76, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10.0 Bronze", '17A0000002', 169, 'USD' /* , aoShopShipping[6] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10.0 Silver", '16A0000002', 519, 'USD' /* , aoShopShipping[6] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10.0 Gold", '01A0000002', 769, 'USD' /* , aoShopShipping[6] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Gold -> 10.0 Gold", '01A0019002', 154, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Gold -> 10.0 Gold", '01A0019902', 17, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Silver -> 10.0 Gold", '01A016A002', 314, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 8 Gold / 9 Silver -> 10.0 Gold", '01A0169002', 409, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7 Gold / 7-8 Silver / Bronze -> 10.0 Gold", '01A017A002', 659, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Silver -> 10.0 Silver", '16A0169002', 99, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Silver -> 10.0 Silver", '16A0169902', 17, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-8 Silver / Bronze -> 10.0 Silver", '16A017A002', 384, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-9 Bronze -> 10.0 Bronze", '17A0179002', 44, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 9 Bronze -> 10.0 Bronze", '17A0179902', 17, 'USD'); /* aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 10.0 Bronze", '17A0075A02', 129, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 10.0 Silver", '16A0075A02', 429, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 10.0 Gold", '01A0075A02', 639, 'USD'); */ aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 10.0", '02A0000002', 99, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 9 -> 10.0", '02A0029902', 13, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 7-9 -> 10.0", '02A0029002', 44, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+SmartHand Mobile", '11A0000002', 44, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Collection", '50A0000002', 44, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Hardware 10", '46A0000002', 59, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net Start Set", '08A0000002', 164, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net Extension", '08A008A002', 99, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net/D Start Set", '09A0000002', 189, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net/D Extension", '09A008A002', 109, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+4DSound", '10A0000002', 164, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Street", '13A0000002', 129, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Cargo", '15A0000002', 99, 'USD'); var strVariablePayment = (location.href.indexOf('seiten') >= 0) ? 'Variable Zahlung' : 'Variable Payment'; aoShopProducts[nShopProduct++] = new ShopProduct(strVariablePayment, '9999999901', 1, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct(strVariablePayment, '9999999902', 1, 'USD'); // Version 8: if (bLocalTest) { aoShopProducts[nShopProduct++] = new ShopProduct("Test EUR", '9999999901', 1.00, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("Test USD", '9999999902', 1.00, 'USD'); } var astrDict = new Array(); astrDict[1] = new Object(); astrDict[2] = new Object(); astrDict[1]["MWST_TEXT"] = 'Orders from the European Union include 19% TAX/VAT'; astrDict[2]["MWST_TEXT"] = 'Für Bewohner der EU sind im Preis 19% MwSt. enthalten'; astrDict[1]["MWST_TRANSMIT"] = 'Orders from the European Union include 19%25 TAX/VAT'; astrDict[2]["MWST_TRANSMIT"] = 'Für Bewohner der EU sind im Preis 19%25 MwSt. enthalten'; astrDict[1]["CARTEMPTY"] = 'You do not have any items in your cart.'; astrDict[2]["CARTEMPTY"] = 'Es befinden sich keine Artikel in Ihrem Warenkorb.'; astrDict[1]["CONTINUESHOPPING"] = '<< Continue Shopping'; astrDict[2]["CONTINUESHOPPING"] = '<< Einkauf fortsetzen'; astrDict[1]["CHECKOUT"] = 'Checkout'; astrDict[2]["CHECKOUT"] = 'Zur Kasse'; astrDict[1]["UPDATE"] = 'Update'; astrDict[2]["UPDATE"] = 'Aktualisieren'; astrDict[1]["CANCEL"] = 'Cancel'; astrDict[2]["CANCEL"] = 'Abbrechen'; astrDict[1]["LAN"] = 'US'; astrDict[2]["LAN"] = 'DE'; astrDict[1]["POS"] = 'Pos.'; astrDict[2]["POS"] = 'Pos.'; astrDict[1]["PRODUCT"] = 'Product'; astrDict[2]["PRODUCT"] = 'Produkt'; astrDict[1]["QUANTITY"] = 'Quantity'; astrDict[2]["QUANTITY"] = 'Anzahl'; astrDict[1]["PRICE"] = 'Price per Unit'; astrDict[2]["PRICE"] = 'Einzelpreis'; astrDict[1]["SUBTOTAL"] = 'Sub Total'; astrDict[2]["SUBTOTAL"] = 'Zwischensumme'; astrDict[1]["TOTAL"] = 'Total'; astrDict[2]["TOTAL"] = 'Gesamtpreis'; astrDict[1]["NETPRICE"] = 'Net Price'; astrDict[2]["NETPRICE"] = 'Netto'; astrDict[1]["VAT"] = 'VAT'; astrDict[2]["VAT"] = 'MwSt.'; astrDict[1]["FULLPRICE"] = 'Full Price'; astrDict[2]["FULLPRICE"] = 'Brutto'; astrDict[1]['SHIPPING'] = 'Shipping & Handling'; astrDict[2]['SHIPPING'] = 'Versandkosten'; astrDict[1]['PAYMENTFEE'] = 'Surcharge for'; astrDict[2]['PAYMENTFEE'] = 'Aufschlag für'; astrDict[1]['BANKTRANSFER'] = 'Bank Transfer'; astrDict[2]['BANKTRANSFER'] = 'Banküberweisung'; astrDict[1]['CREDITCARD'] = 'Credit Card'; astrDict[2]['CREDITCARD'] = 'Kreditkarte'; astrDict[1]["REMOVE"] = 'Remove'; astrDict[2]["REMOVE"] = 'Löschen'; astrDict[1]["PAGEDIRUNSECURE"] = g_strUrl + '/pages'; astrDict[2]["PAGEDIRUNSECURE"] = g_strUrl + '/seiten'; astrDict[1]["IMAGEDIR"] = '../images'; astrDict[2]["IMAGEDIR"] = '../bilder'; astrDict[1]["MSG_UNKNOWNPRODUCT"] = 'Unknown Product. Please report error to Freiwald Software.'; astrDict[2]["MSG_UNKNOWNPRODUCT"] = 'Unbekanntes Produkt. Bitte melden Sie den Fehler an Freiwald Software.'; astrDict[1]["MSG_INCONSISTENTCURRENCY"] = 'You are about to add an item to the cart,\nthat is to be paid with another currency than the items already stored in the cart.\nDo you want to remove the already stored items from the card?'; astrDict[2]["MSG_INCONSISTENTCURRENCY"] = 'Sie sind dabei, einen Artikel in den Warenkorb zu legen,\nder in anderer Währung bezahlt wird, als bereits abgelegte Artikel.\nSollen die bereits abgelegten Artikel gelöscht werden?'; astrDict[1]["MSG_INCONSISTENTCUSTOMPAYMENT"] = 'It is not possible to mix variable payment with other products in your cart.\nDo you want to remove the already stored items from the card?'; astrDict[2]["MSG_INCONSISTENTCUSTOMPAYMENT"] = 'Es ist nicht möglich, variable Zahlung mit anderen Artikeln im Warenkorb zu mischen.\nSollen die bereits abgelegten Artikel gelöscht werden?'; astrDict[1]["MSG_NOCOOKIEBASKET"] = 'The use of cookies must be enabled to access the shopping cart.\nAs long as cookies are disabled,\nyou can only add one item to your cart for instant checkout.'; astrDict[2]["MSG_NOCOOKIEBASKET"] = 'Die Verwendung von Cookies muss freigeschaltet sein, um auf den Warenkorb zugreifen zu können.\nSolange Cookies gesperrt sind, kann immer nur ein einiziger Artikel zur sofortigen Bezahlung zwischengespeichert werden.'; astrDict[1]["MSG_WRONGUPGRADECODE"] = 'Wrong Code. Please check your input carefully and correct the error.'; astrDict[2]["MSG_WRONGUPGRADECODE"] = 'Falscher Code. Bitte prüfen Sie Ihre Eingabe noch einmal sorgfältig und korrigieren Sie den Fehler.'; astrDict[1]["MSG_NOTAVAILABLE"] = 'Currently not available.'; astrDict[2]["MSG_NOTAVAILABLE"] = 'Zur Zeit nicht lieferbar.'; astrDict[1]["CARTDELETE"] = 'You specified 0 as quantity or marked all articles as to be deleted.\n\nTherefore you do not have any items in your cart anymore.'; astrDict[2]["CARTDELETE"] = 'Sie haben als Anzahl 0 angegeben bzw. alle Artikel zum Löschen markiert.\n\nDaher befinden sich keine Artikel mehr in Ihrem Warenkorb.'; astrDict[1]["MSG_SHAREIT"] = 'Sold by Digital River GmbH. Delivered by Freiwald Software.'; astrDict[2]["MSG_SHAREIT"] = 'Verkauf durch Digital River GmbH. Lieferung durch Freiwald Software.'; // astrDict[1]["MSG_SHAREIT"] = 'Due to technical problems it is currently not possible to order from the selected country.'; // astrDict[2]["MSG_SHAREIT"] = 'Aufgrund technischer Probleme sind derzeit keine Bestellungen aus dem von Ihnen ausgewählten Land möglich.'; // payment services var strShareIt = '1'; var strUOS = '2'; var strInhouse = '3'; // payment methods var strBankTransfer = '1'; var strCreditCard = '2'; var strPayPal = '3'; var strGiroPay = '4'; var strSofortUeberweisung = '5'; function ShopShipping(nID, bOncePerPosition, nShippingCostsG, nShippingCostsE, nShippingCostsW) { this.m_nID = ((typeof nID) != 'undefined') ? nID : nID + 1; this.m_bOncePerPosition = ((typeof bOncePerPosition) != 'undefined') ? bOncePerPosition : false; this.m_nShippingCostsG = ((typeof nShippingCostsG) != 'undefined') ? nShippingCostsG : 0; this.m_nShippingCostsE = ((typeof nShippingCostsE) != 'undefined') ? nShippingCostsE : this.m_nShippingCostsG; this.m_nShippingCostsW = ((typeof nShippingCostsW) != 'undefined') ? nShippingCostsW : this.m_nShippingCostsE; } function ShopCalcShippingByCountry(oShippingCosts, strCountry) { if (strCountry.toUpperCase() == 'DE') { return oShippingCosts.m_nShippingCostsG; } else if (ShopIsEURO(strCountry)) { return oShippingCosts.m_nShippingCostsE; } return oShippingCosts.m_nShippingCostsW; } function ShopCalcShipping(nProduct, nCount, strCountry) { if (aoShopProducts[nProduct].m_oShippingCosts.m_nShippingCostsG == 0) { return 0; } if (aoShopProducts[nProduct].m_oShippingCosts.m_bOncePerPosition) { return ShopCalcShippingByCountry(aoShopProducts[nProduct].m_oShippingCosts, strCountry) * nCount; } for (var p = 0; p < aoShopProducts.length; p++) { if (p == nProduct) { break; } if (ShopGetProdCount(aoShopProducts[p].m_strID) != 0) { if (aoShopProducts[p].m_oShippingCosts.m_nID == aoShopProducts[nProduct].m_oShippingCosts.m_nID) { return 0; // already accounted } } } return ShopCalcShippingByCountry(aoShopProducts[nProduct].m_oShippingCosts, strCountry); } function ShopCalcPaymentText(nLan) { return astrDict[nLan]['PAYMENTFEE'] + ' ' + ShopCalcPaymentName() + ' (' + ShopRound(ShopCalcPaymentRate()) + '%)'; } function ShopCalcPaymentName(strPayment) { if ((typeof strPayment) == 'undefined') { strPayment = SessionRead("PAYMENT"); } if (strPayment == strBankTransfer) { return astrDict[nLan]['BANKTRANSFER'] } else if (strPayment == strPayPal) { return "PayPal"; } else if(strPayment == strCreditCard) { astrDict[nLan]['CREDITCARD'] } return ""; } function ShopCalcPaymentRate(strPayment, strCountryID) { if ((typeof strCountryID) == 'undefined') { strPayment = SessionRead("strCountryID"); } if ((typeof strPayment) == 'undefined') { strPayment = SessionRead("PAYMENT"); } // return -1 in order to disable a specific payment method: if (strPayment == strPayPal) { return 0; switch (strCountryID) { case 'DE': { return -1; } default: { return ShopIsEU(strCountryID) ? 0 : -1; } } return -1; } else if (strPayment == strCreditCard) { return 0; return -1; // disable due Wirecard bancrupcy var d = new Date(); return ((d.getDate() % 3) == 1) ? -1 : 0; } else if (strPayment == strBankTransfer) { return ShopIsEURO(strCountryID) ? 0 : -1; } else { return 0; } return 0; } function ShopCalcPaymentFee(nTotalPrice, strPayment) { return nTotalPrice * ShopCalcPaymentRate(strPayment) / 100; } function ShopProduct(strName, strID, nPrice, strCurrency, oShippingCosts, bNotAvailable) { this.m_strName = strName; this.m_strID = strID; this.m_strShareItID = strID; if (strCurrency == 'USD') { if (strID.substr(6, 2) != '99') { var p = ShopGetProdIndex(strID.substr(0, strID.length - 1) + '1'); if (p >= 0) { nPriceEU = aoShopProducts[p].m_nPrice; nPriceEU = Math.ceil(dShopUSDConversion * nPriceEU); nPriceEU = Math.floor(nPriceEU/10)*10 + (((nPriceEU % 10) <= 4) ? 4 : 9); nPrice = Math.max(nPrice, nPriceEU); } } } this.m_nPrice = nPrice; this.m_oShippingCosts = ((typeof oShippingCosts) != 'undefined') ? oShippingCosts : new ShopShipping(); this.m_strCurrency = strCurrency; this.m_bNotAvailable = bNotAvailable; } ShopProduct.prototype.CalcPrice = function(bWithSurchange) { if ((typeof bWithSurchange) == 'undefined') { bWithSurchange = true; } var strCountryID = InputRead("SHOP_COUNTRY"); var nPrice = this.m_nPrice; if (strCountryID != "") { ShopInitCountries(); if (bWithSurchange) { var nSurcharge = ShopGetVatSurcharge(strCountryID); // nPrice += nSurcharge*Math.floor((nPrice + 49) / 100); nPrice += Math.round(nSurcharge * nPrice / 100); if (nPrice % 100 == 0) { nPrice -= 1; } } } if (this.IsCustomPayment()) { var strPrice = InputRead("CUSTOMPAYMENTAMOUNT"); if (strPrice != '') { var nPos = strPrice.indexOf('.'); if (nPos < 0) { nPrice = parseInt(strPrice); } else { nPrice = parseInt(strPrice.substr(0, nPos)) + parseInt(strPrice.substr(nPos + 1)) / 100; } } } return nPrice; } ShopProduct.prototype.IsCustomPayment = function() { return (this.m_strID.substr(0, 2) == '99'); } function ShopIsCustomPayment() { for (var p = 0; p < aoShopProducts.length; p++) { var nCount = ShopGetProdCount(aoShopProducts[p].m_strID); if (nCount > 0) { return aoShopProducts[p].IsCustomPayment(); } } return false; } function ShopAdd(nLan, strProductID) { var strCountryID = InputRead("SHOP_COUNTRY"); if (bLocalTest) { location.href = 'cart.htm?mode=addproduct&product=' + strProductID + '&country=' + strCountryID; } else { location.href = g_strSecureUrl + '/' + ((nLan == 2) ? 'seiten' : 'pages') + '/cart.htm?mode=addproduct&product=' + strProductID + '&country=' + strCountryID; } } function ShopDoAdd(nLan, strProductID) { // check, whether the product ID is valid: var nIndex = ShopGetProdIndex(strProductID); if (nIndex < 0) { AlertEx(astrDict[nLan]["MSG_UNKNOWNPRODUCT"]); return; } if (aoShopProducts[nIndex].m_bNotAvailable) { AlertEx(astrDict[nLan]["MSG_NOTAVAILABLE"]); location.href = g_strSecureUrl + '/' + ((nLan == 2) ? 'seiten' : 'pages') + '/register.htm'; return; } var strNewCurrency = aoShopProducts[nIndex].m_strCurrency; var bCustomPayment = aoShopProducts[nIndex].IsCustomPayment(); // check, whether the currency matches: for (var p = 0; p < aoShopProducts.length; p++) { if (ShopGetProdCount(aoShopProducts[p].m_strID) != 0) { if ((strNewCurrency != aoShopProducts[p].m_strCurrency) || (bCustomPayment != aoShopProducts[p].IsCustomPayment())) { var strMsg = (strNewCurrency != aoShopProducts[p].m_strCurrency) ? "MSG_INCONSISTENTCURRENCY" : "MSG_INCONSISTENTCUSTOMPAYMENT"; if (!confirm(astrDict[nLan][strMsg])) { document.location.href = "cart.htm"; return; } else { for (var q = 0; q < aoShopProducts.length; q++) { if (ShopGetProdCount(aoShopProducts[q].m_strID) != 0) { ShopChange(aoShopProducts[q].m_strID, 0); } } } } } } var nCount = ShopGetProdCount(strProductID); if (nCount < 0) { nCount = 0; } nCount++; ShopChange(strProductID, nCount); // document.location.href = "cart.htm"; } function ShopChange(strProductID, nCount) { var nIndex = ShopGetProdIndex(strProductID); var strShop = InputRead(strProductKey); var strCount = ''; if (strShop.length != 2*aoShopProducts.length) { strShop = ''; for (var p = 0; p < aoShopProducts.length; p++) { strShop += '00'; } } if (nCount < 10) { strCount = '0' + nCount; } else if (nCount < 99) { strCount = nCount; } else { strCount = '99'; } strShop = strShop.substring(0, nIndex * 2) + strCount + strShop.substring((nIndex + 1) * 2 , strShop.length); SessionWrite(strProductKey, strShop); } function ShopGetProdCount(strProductID) { var strShop = InputRead(strProductKey); if (strShop == '') { return 0; } var nIndex = ShopGetProdIndex(strProductID); var strCount = strShop.substring(nIndex * 2, (nIndex + 1) * 2); if (strCount.substring(0, 1) == '0') { strCount = strCount.substring(1, 2); } var nCount = parseInt(strCount); if (nCount == 99) { return -1; } return nCount; } function ShopGetCurrency() { for (var p = 0; p < aoShopProducts.length; p++) { var nCount = ShopGetProdCount(aoShopProducts[p].m_strID); if (nCount > 0) { return aoShopProducts[p].m_strCurrency; } } return aoShopProducts[0].m_strCurrency; } function ShopRefresh(bReload) { var nItemCount = parseInt(document.forms["CART"]["ITEMCOUNT"].value); for (var p = 0; p < nItemCount; p++) { var strProductID = document.forms["CART"]["ID" + p.toString()].value; var nCount = parseInt(document.forms["CART"]["COUNT" + p.toString()].value); if (document.forms["CART"]["DELETE" + p.toString()].checked == true) { document.forms["CART"]["DELETE" + p.toString()].checked = false; nCount = 0; } ShopChange(strProductID, nCount); } if (bReload) { ShopReload(); } } function ShopReload(strParam) { var strRef = 'cart.htm'; if ((typeof strParam) != 'undefined') { location.href = strRef + '?' + strParam; } else { location.replace(strRef); } } function ShopDelete(strProductID) { CookieChange(strProductID, 0); } function ShopGetProdIndex(strProductID) { for (var p = 0; p < aoShopProducts.length; p++) { if (strProductID == aoShopProducts[p].m_strID) { return p; } } return -1; } function ShopCreateOrderNumber() { var dDate = new Date(); return (dDate.getTime()) % (36*365*24*60*60*1000); } function ShopExtractProductFromUpgradeCode(nLan, strCode) { if (strCode.length == 10) { // blank product ID provided: return ShopCorrectUpgradeProductID(strCode); } if ((strCode.length == 23) || (strCode.length == 38) || (strCode.length == 18)) { var bCheck = 0; for (var c = strCode.length - 3; c >= 0; c--) { bCheck ^= strCode.charCodeAt(c); // alert("Check " + c + ": " + strCode.charAt(c) + "(" + strCode.charCodeAt(c) + ") - " + bCheck); } if (bCheck == atox(strCode.substr(strCode.length - 2, 2))) { var strProductID = strCode.substr(0, 10); strProductID = ShopCorrectUpgradeProductID(strProductID); if (ShopGetProdIndex(strProductID) >= 0) { return strProductID; } } } AlertEx(astrDict[nLan]["MSG_WRONGUPGRADECODE"]); return ""; } function ShopExtractInfoFromUpgradeCode(nLan, strCode) { if (strCode.length == 10) { // blank product ID provided: return ""; } if ((strCode.length == 23) || (strCode.length == 38)) { var bCheck = 0; for (var c = strCode.length - 3; c >= 0; c--) { bCheck ^= strCode.charCodeAt(c); // alert("Check " + c + ": " + strCode.charAt(c) + "(" + strCode.charCodeAt(c) + ") - " + bCheck); } if (bCheck == atox(strCode.substr(strCode.length - 2, 2))) { return strCode.substr(11, strCode.length - 11 - 3); } } AlertEx(astrDict[nLan]["MSG_WRONGUPGRADECODE"]); return ""; } function ShopCorrectUpgradeProductID2022(strProductID) { if ((strProductID.substr(2, 2) == '70') || (strProductID.substr(2, 2) == '80') || (strProductID.substr(2, 2) == '90')) { strProductID = strProductID.substr(0, 2) + 'A0' + strProductID.substr(4, 6); } switch (strProductID) { // Version 10: case '01A0019001': // 9.0 Gold -> 10.0 Gold return '01A0019001'; case '01A0019002': // 9.0 Gold -> 10.0 Gold return '01A0019002'; case '01A0169901': // 9.9 Silver -> 10.0 Gold case '01A016A001': // 10.0 Silver -> 10.0 Gold return '01A016A001'; case '01A0169902': // 9.9 Silver -> 10.0 Gold case '01A016A002': // 10.0 Silver -> 10.0 Gold return '01A016A002'; case '01A0018001': // 8.0 Gold -> 10.0 Gold case '01A0169001': // 9.0 Silver -> 10.0 Gold case '01A0168901': // 8.9 Silver -> 10.0 Gold return '01A0169001'; case '01A0018002': // 8.0 Gold -> 10.0 Gold case '01A0169002': // 9.0 Silver -> 10.0 Gold case '01A0168902': // 8.9 Silver -> 10.0 Gold return '01A0169002'; case '01A0017001': // 7.0 Gold -> 10.0 Gold case '01A0168001': // 8.0 Silver -> 10.0 Gold case '01A0167001': // 7.0 Silver -> 10.0 Gold case '01A017A001': // 10.0 Bronze -> 10.0 Gold case '01A0179001': // 9.0 Bronze -> 10.0 Gold case '01A0178001': // 8.0 Bronze -> 10.0 Gold case '01A0177001': // 7.0 Bronze -> 10.0 Gold case '01A0179901': // 9.9 Bronze -> 10.0 Gold case '01A0178901': // 8.9 Bronze -> 10.0 Gold return '01A017A001'; case '01A0017002': // 7.0 Gold -> 10.0 Gold case '01A0168002': // 8.0 Silver -> 10.0 Gold case '01A0167002': // 7.0 Silver -> 10.0 Gold case '01A017A002': // 10.0 Bronze -> 10.0 Gold case '01A0179002': // 9.0 Bronze -> 10.0 Gold case '01A0178002': // 8.0 Bronze -> 10.0 Gold case '01A0177002': // 7.0 Bronze -> 10.0 Gold case '01A0179902': // 9.9 Bronze -> 10.0 Gold case '01A0178902': // 8.9 Bronze -> 10.0 Gold return '01A017A002'; case '01A0019901': // 9.9 Gold -> 10.0 Gold return IsAfter(1, 1, 2023) ? '01A0019001' : '01A0019901'; case '01A0019902': // 9.0 Gold -> 10.0 Gold return IsAfter(1, 1, 2023) ? '01A0019002' : '01A0019902'; case '16A0169001': // 9.0 Silver -> 10.0 Silver return '16A0169001'; case '16A0169002': // 9.0 Silver -> 10.0 Silver return '16A0169002'; case '16A0168001': // 8.0 -> 10.0 Silver case '16A0167001': // 7.0 -> 10.0 Silver case '16A017A001': // 10.0 Bronze -> 10.0 Silver case '16A0179001': // 9.0 Bronze -> 10.0 Silver case '16A0178001': // 8.0 Bronze -> 10.0 Silver case '16A0177001': // 7.0 Bronze -> 10.0 Silver case '16A0179901': // 9.9 Bronze -> 10.0 Silver case '16A0178901': // 8.9 Bronze -> 10.0 Silver return '16A017A001'; case '16A0168002': // 8.0 -> 10.0 Silver case '16A0167002': // 7.0 -> 10.0 Silver case '16A017A002': // 10.0 Bronze -> 10.0 Silver case '16A0179002': // 9.0 Bronze -> 10.0 Silver case '16A0178002': // 8.0 Bronze -> 10.0 Silver case '16A0177002': // 7.0 Bronze -> 10.0 Silver case '16A0179902': // 9.9 Bronze -> 10.0 Silver case '16A0178902': // 8.9 Bronze -> 10.0 Silver return '16A017A002'; case '16A0169901': // 9.9 Silver -> 10.0 Silver return IsAfter(1, 1, 2023) ? '16A0169001' : '16A0169901'; case '16A0169902': // 9.9 Silver -> 10.0 Silver return IsAfter(1, 1, 2023) ? '16A0169002' : '16A0169902'; case '17A0179001': // 9.0 Bronze -> 10.0 Bronze case '17A0178001': // 8.0 Bronze -> 10.0 Bronze case '17A0177001': // 7.0 Bronze -> 10.0 Bronze return '17A0179001'; case '17A0179002': // 9.0 Bronze -> 10.0 Bronze case '17A0178902': // 8.9 Bronze -> 10.0 Bronze case '17A0178002': // 8.0 Bronze -> 10.0 Bronze case '17A0177002': // 7.0 Bronze -> 10.0 Bronze return '17A0179002'; case '17A0179901': // 9.9 Bronze -> 10.0 Bronze return IsAfter(1, 1, 2023) ? '17A0179001' : '17A0179901'; case '17A0179902': // 9.9 Bronze -> 10.0 Bronze return IsAfter(1, 1, 2023) ? '17A0179002' : '17A0179902'; case '17A0165801': // 5.8 -> 10.0 case '17A0165501': // 5.5 -> 10.0 Bronze full version case '17A0165001': // 5.0 -> 10.0 Bronze full version case '17A0015001': // 5.0 -> 10.0 Bronze full version return '17A0000001'; case '17A0165902': // 5.8 -> 10.0 Bronze full version case '17A0165502': // 5.5 -> 10.0 Bronze full version case '17A0165002': // 5.0 -> 10.0 Bronze full version case '17A0015002': // 5.0 -> 10.0 Bronze full version return '17A0000002'; case '02A0029001': // TP 9.0 -> TP 10.0 case '02A0028901': // TP 8.9 -> TP 10.0 case '02A0028001': // TP 8.0 -> TP 10.0 case '02A0027001': // TP 7.0 -> TP 10.0 return '02A0029001'; case '02A0029002': // TP 9.0 -> TP 10.0 case '02A0028902': // TP 8.9 -> TP 10.0 case '02A0028002': // TP 8.0 -> TP 10.0 case '02A0027002': // TP 7.0 -> TP 10.0 return '02A0029002'; case '02A0029901': // TP 9.9 -> TP 10.0 return IsAfter(1, 1, 2023) ? '02A0029002' : '02A0029901'; case '02A0029902': // TP 9.9 -> TP 10.0 return IsAfter(1, 1, 2023) ? '02A0029002' : '02A0029902'; } return strProductID; } function ShopCorrectUpgradeProductID(strProductID) { if (!IsAfter(1, 1, 2023)) { return ShopCorrectUpgradeProductID2022(strProductID); } if ((strProductID.substr(2, 2) == '70') || (strProductID.substr(2, 2) == '80') || (strProductID.substr(2, 2) == '90')) { strProductID = strProductID.substr(0, 2) + 'A0' + strProductID.substr(4, 6); } switch (strProductID) { // Version 10: case '01A0019001': // 9.0 Gold -> 10.0 Gold return '01A0019001'; case '01A0019002': // 9.0 Gold -> 10.0 Gold return '01A0019002'; case '01A016A001': // 10.0 Silver -> 10.0 Gold return '01A016A001'; case '01A016A002': // 10.0 Silver -> 10.0 Gold return '01A016A002'; case '01A0018001': // 8.0 Gold -> 10.0 Gold case '01A0169001': // 9.0 Silver -> 10.0 Gold case '01A0168901': // 8.9 Silver -> 10.0 Gold case '01A0169901': // 9.9 Silver -> 10.0 Gold return '01A0169001'; case '01A0018002': // 8.0 Gold -> 10.0 Gold case '01A0169002': // 9.0 Silver -> 10.0 Gold case '01A0168902': // 8.9 Silver -> 10.0 Gold case '01A0169902': // 9.9 Silver -> 10.0 Gold return '01A0169002'; case '01A0017001': // 7.0 Gold -> 10.0 Gold case '01A0168001': // 8.0 Silver -> 10.0 Gold case '01A0167001': // 7.0 Silver -> 10.0 Gold case '01A017A001': // 10.0 Bronze -> 10.0 Gold case '01A0179001': // 9.0 Bronze -> 10.0 Gold case '01A0178001': // 8.0 Bronze -> 10.0 Gold case '01A0177001': // 7.0 Bronze -> 10.0 Gold case '01A0179901': // 9.9 Bronze -> 10.0 Gold case '01A0178901': // 8.9 Bronze -> 10.0 Gold return '01A017A001'; case '01A0017002': // 7.0 Gold -> 10.0 Gold case '01A0168002': // 8.0 Silver -> 10.0 Gold case '01A0167002': // 7.0 Silver -> 10.0 Gold case '01A017A002': // 10.0 Bronze -> 10.0 Gold case '01A0179002': // 9.0 Bronze -> 10.0 Gold case '01A0178002': // 8.0 Bronze -> 10.0 Gold case '01A0177002': // 7.0 Bronze -> 10.0 Gold case '01A0179902': // 9.9 Bronze -> 10.0 Gold case '01A0178902': // 8.9 Bronze -> 10.0 Gold return '01A017A002'; case '01A0019901': // 9.9 Gold -> 10.0 Gold return '01A0019001'; case '01A0019902': // 9.9 Gold -> 10.0 Gold return '01A0019002'; case '16A0169001': // 9.0 Silver -> 10.0 Silver case '16A0169901': // 9.9 Silver -> 10.0 Silver return '16A0169001'; case '16A0169002': // 9.0 Silver -> 10.0 Silver case '16A0169902': // 9.9 Silver -> 10.0 Silver return '16A0169002'; case '16A0168001': // 8.0 -> 10.0 Silver case '16A0167001': // 7.0 -> 10.0 Silver case '16A017A001': // 10.0 Bronze -> 10.0 Silver case '16A0179001': // 9.0 Bronze -> 10.0 Silver case '16A0178001': // 8.0 Bronze -> 10.0 Silver case '16A0177001': // 7.0 Bronze -> 10.0 Silver case '16A0179901': // 9.9 Bronze -> 10.0 Silver case '16A0178901': // 8.9 Bronze -> 10.0 Silver return '16A017A001'; case '16A0168002': // 8.0 -> 10.0 Silver case '16A0167002': // 7.0 -> 10.0 Silver case '16A017A002': // 10.0 Bronze -> 10.0 Silver case '16A0179002': // 9.0 Bronze -> 10.0 Silver case '16A0178002': // 8.0 Bronze -> 10.0 Silver case '16A0177002': // 7.0 Bronze -> 10.0 Silver case '16A0179902': // 9.9 Bronze -> 10.0 Silver case '16A0178902': // 8.9 Bronze -> 10.0 Silver return '16A017A002'; case '17A0179001': // 9.0 Bronze -> 10.0 Bronze case '17A0178001': // 8.0 Bronze -> 10.0 Bronze case '17A0177001': // 7.0 Bronze -> 10.0 Bronze case '17A0179901': // 9.9 Bronze -> 10.0 Bronze return '17A0179001'; case '17A0179002': // 9.0 Bronze -> 10.0 Bronze case '17A0178902': // 8.9 Bronze -> 10.0 Bronze case '17A0178002': // 8.0 Bronze -> 10.0 Bronze case '17A0177002': // 7.0 Bronze -> 10.0 Bronze case '17A0179902': // 9.9 Bronze -> 10.0 Bronze return '17A0179002'; case '17A0165801': // 5.8 -> 10.0 case '17A0165501': // 5.5 -> 10.0 Bronze full version case '17A0165001': // 5.0 -> 10.0 Bronze full version case '17A0015001': // 5.0 -> 10.0 Bronze full version return '17A0000001'; case '17A0165902': // 5.8 -> 10.0 Bronze full version case '17A0165502': // 5.5 -> 10.0 Bronze full version case '17A0165002': // 5.0 -> 10.0 Bronze full version case '17A0015002': // 5.0 -> 10.0 Bronze full version return '17A0000002'; case '02A0029001': // TP 9.0 -> TP 10.0 case '02A0028901': // TP 8.9 -> TP 10.0 case '02A0028001': // TP 8.0 -> TP 10.0 case '02A0027001': // TP 7.0 -> TP 10.0 case '02A0029901': // TP 9.9 -> TP 10.0 return '02A0029001'; case '02A0029002': // TP 9.0 -> TP 10.0 case '02A0028902': // TP 8.9 -> TP 10.0 case '02A0028002': // TP 8.0 -> TP 10.0 case '02A0027002': // TP 7.0 -> TP 10.0 case '02A0029902': // TP 9.9 -> TP 10.0 return '02A0029002'; } return strProductID; } function ShopCheckRocomotionLicense(nLan, strCode) { var strProductID = ShopExtractProductFromUpgradeCode(nLan, strCode); if (strProductID != "") { if (strProductID.substring(6, 8) == '59') { var strInfo = ShopExtractInfoFromUpgradeCode(nLan, strCode); if (strInfo != "") { return true; } } } return false; } function ShopChangeSpecialChars(s) { for (var c = 0; c < s.length; c++) { if (encodeURI(s.substring(c, c+1)) == '%C3%A4') { s = s.substring(0, c) + 'ae' + s.substring(c+1, s.length); } else if (encodeURI(s.substring(c, c+1)) == '%C3%B6') { s = s.substring(0, c) + 'oe' + s.substring(c+1, s.length); } else if (encodeURI(s.substring(c, c+1)) == '%C3%BC') { s = s.substring(0, c) + 'ue' + s.substring(c+1, s.length); } else if (encodeURI(s.substring(c, c+1)) == '%C3%84') { s = s.substring(0, c) + 'Ae' + s.substring(c+1, s.length); } else if (encodeURI(s.substring(c, c+1)) == '%C3%96') { s = s.substring(0, c) + 'Oe' + s.substring(c+1, s.length); } else if (encodeURI(s.substring(c, c+1)) == '%C3%9C') { s = s.substring(0, c) + 'Ue' + s.substring(c+1, s.length); } else if (encodeURI(s.substring(c, c+1)) == '%C3%9F') { s = s.substring(0, c) + 'ss' + s.substring(c+1, s.length); } } return s; } function ShopRound(x) { x *= 100; x = Math.round(x); x /= 100; return x; } var aoCountry; function ShopCountry(strEnglish, strGerman, strID, nVat, bMain) { this.m_strEnglish = strEnglish; this.m_strGerman = strGerman; this.m_strID = strID; this.m_nVat = (((typeof nVat) != 'undefined') && (nVat != 0)) ? nVat : 0; this.m_bMain = ((typeof bMain) != 'undefined') ? bMain : false; } ShopCountry.prototype.GetVat = function() { return this.m_nVat / 100; } ShopCountry.prototype.IsEU = function() { return (this.m_nVat != 0); } function ShopInitCountries() { if ((typeof aoCountry) == 'undefined') { aoCountry = new Array(); var nCountry = 0; // last update of vat rates: 01.12.2014 aoCountry[nCountry++] = new ShopCountry('Afghanistan', 'Afghanistan', 'AF'); aoCountry[nCountry++] = new ShopCountry('Aland Islands', 'Aland-Inseln', 'AX'); aoCountry[nCountry++] = new ShopCountry('Albania', 'Albanien', 'AL'); aoCountry[nCountry++] = new ShopCountry('Algeria', 'Algerien', 'DZ'); aoCountry[nCountry++] = new ShopCountry('American Samoa', 'Amerikanisch-Samoa', 'AS'); aoCountry[nCountry++] = new ShopCountry('Andorra', 'Andorra', 'AD'); aoCountry[nCountry++] = new ShopCountry('Angola', 'Angola', 'AO'); aoCountry[nCountry++] = new ShopCountry('Anguilla', 'Anguilla', 'AI'); aoCountry[nCountry++] = new ShopCountry('Antarctica', 'Antarktis', 'AQ'); aoCountry[nCountry++] = new ShopCountry('Antigua and Barbuda', 'Antigua und Barbuda', 'AG'); aoCountry[nCountry++] = new ShopCountry('Argentina', 'Argentinien', 'AR'); aoCountry[nCountry++] = new ShopCountry('Armenia', 'Armenien', 'AM'); aoCountry[nCountry++] = new ShopCountry('Aruba', 'Aruba', 'AW'); aoCountry[nCountry++] = new ShopCountry('Australia', 'Australien', 'AU'); aoCountry[nCountry++] = new ShopCountry('Austria', 'Österreich', 'AT', 20, true); aoCountry[nCountry++] = new ShopCountry('Azerbaijan', 'Aserbaidschan', 'AZ'); aoCountry[nCountry++] = new ShopCountry('Bahamas', 'Bahamas', 'BS'); aoCountry[nCountry++] = new ShopCountry('Bahrain', 'Bahrain', 'BH'); aoCountry[nCountry++] = new ShopCountry('Bangladesh', 'Bangladesch', 'BD'); aoCountry[nCountry++] = new ShopCountry('Barbados', 'Barbados', 'BB'); aoCountry[nCountry++] = new ShopCountry('Belarus', 'Weissrussland', 'BY'); aoCountry[nCountry++] = new ShopCountry('Belgium', 'Belgien', 'BE', 21); aoCountry[nCountry++] = new ShopCountry('Belize', 'Belize', 'BZ'); aoCountry[nCountry++] = new ShopCountry('Benin', 'Benin', 'BJ'); aoCountry[nCountry++] = new ShopCountry('Bermuda', 'Bermuda', 'BM'); aoCountry[nCountry++] = new ShopCountry('Bhutan', 'Bhutan', 'BT'); aoCountry[nCountry++] = new ShopCountry('Bolivia', 'Bolivien', 'BO'); aoCountry[nCountry++] = new ShopCountry('Bosnia and Herzegovina', 'Bosnien und Herzegowvina', 'BA'); aoCountry[nCountry++] = new ShopCountry('Botswana', 'Botswana', 'BW'); aoCountry[nCountry++] = new ShopCountry('Bouvet Island', 'Bouvet Inseln', 'BV'); aoCountry[nCountry++] = new ShopCountry('Brazil', 'Brasilien', 'BR'); // aoCountry[nCountry++] = new ShopCountry('British Indian Ocean Territory', 'Britisches Territorium im Indischen Ozean', 'IO'); aoCountry[nCountry++] = new ShopCountry('Brunei Darussalam', 'Brunei Darussalam', 'BN'); aoCountry[nCountry++] = new ShopCountry('Bulgaria', 'Bulgarien', 'BG', 20); aoCountry[nCountry++] = new ShopCountry('Burkina Faso', 'Burkina Faso', 'BF'); aoCountry[nCountry++] = new ShopCountry('Burundi', 'Burundi', 'BI'); aoCountry[nCountry++] = new ShopCountry('Cambodia', 'Kambodscha', 'KH'); aoCountry[nCountry++] = new ShopCountry('Cameroon', 'Kamerun', 'CM'); aoCountry[nCountry++] = new ShopCountry('Canada', 'Kanada', 'CA'); aoCountry[nCountry++] = new ShopCountry('Canary Islands', 'Kanarische Inseln', 'IC'); aoCountry[nCountry++] = new ShopCountry('Cape Verde', 'Kap Verde', 'CV'); aoCountry[nCountry++] = new ShopCountry('Cayman Islands', 'Kaimaninseln', 'KY'); aoCountry[nCountry++] = new ShopCountry('Central African Republic', 'Zentralafrikanische Republik', 'CF'); aoCountry[nCountry++] = new ShopCountry('Ceuta', 'Ceuta', 'EA'); aoCountry[nCountry++] = new ShopCountry('Chad', 'Tschad', 'TD'); aoCountry[nCountry++] = new ShopCountry('Chile', 'Chile', 'CL'); aoCountry[nCountry++] = new ShopCountry('China', 'China', 'CN'); aoCountry[nCountry++] = new ShopCountry('Christmas Island', 'Weihnachtsinsel', 'CX'); aoCountry[nCountry++] = new ShopCountry('Cocos (Keeling) Islands', 'Kokosinseln', 'CC'); aoCountry[nCountry++] = new ShopCountry('Colombia', 'Kolumbien', 'CO'); aoCountry[nCountry++] = new ShopCountry('Comoros', 'Komoren', 'KM'); aoCountry[nCountry++] = new ShopCountry('Congo, Dem. Republic', 'Kongo, Dem. Republik', 'CD'); aoCountry[nCountry++] = new ShopCountry('Congo, Republic', 'Kongo, Republik', 'CG'); aoCountry[nCountry++] = new ShopCountry('Cook Islands', 'Cookinseln', 'CK'); aoCountry[nCountry++] = new ShopCountry('Costa Rica', 'Costa Rica', 'CR'); aoCountry[nCountry++] = new ShopCountry('Cote d\'Ivoire', 'Elfenbeinküste', 'CI'); aoCountry[nCountry++] = new ShopCountry('Croatia', 'Kroatien', 'HR', 25); aoCountry[nCountry++] = new ShopCountry('Cyprus', 'Zypern', 'CY', 19); aoCountry[nCountry++] = new ShopCountry('Cyprus (unregulated area)', 'Zypern (unregulated area)', 'X1'); aoCountry[nCountry++] = new ShopCountry('Czech Republic', 'Tschechische Republik', 'CZ', 21); aoCountry[nCountry++] = new ShopCountry('Denmark', 'Dänemark', 'DK', 25); aoCountry[nCountry++] = new ShopCountry('Djibouti', 'Dschibuti', 'DJ'); aoCountry[nCountry++] = new ShopCountry('Dominica', 'Dominika', 'DM'); aoCountry[nCountry++] = new ShopCountry('Dominican Republic', 'Dominikanische Republik', 'DO'); aoCountry[nCountry++] = new ShopCountry('East-Timor', 'Osttimor', 'TL'); aoCountry[nCountry++] = new ShopCountry('Ecuador', 'Ecuador', 'EC'); aoCountry[nCountry++] = new ShopCountry('Egypt', 'Ägypten', 'EG'); aoCountry[nCountry++] = new ShopCountry('El Salvador', 'El Salvador', 'SV'); aoCountry[nCountry++] = new ShopCountry('Equatorial Guinea', 'Äquatorial-Guinea', 'XX'); aoCountry[nCountry++] = new ShopCountry('Eritrea', 'Eritrea', 'ER'); aoCountry[nCountry++] = new ShopCountry('Estonia', 'Estland', 'EE', 20); aoCountry[nCountry++] = new ShopCountry('Ethiopia', 'Äthiopien', 'ET'); // aoCountry[nCountry++] = new ShopCountry('Falkland Islands', 'Falklandinseln', 'FK'); aoCountry[nCountry++] = new ShopCountry('Faroe Islands', 'Färöer', 'FO'); aoCountry[nCountry++] = new ShopCountry('Fiji', 'Fidschi', 'FJ'); aoCountry[nCountry++] = new ShopCountry('Finland', 'Finnland', 'FI', 24); aoCountry[nCountry++] = new ShopCountry('France', 'Frankreich', 'FR', 20, true); aoCountry[nCountry++] = new ShopCountry('French Guiana', 'Französisch Guyana', 'GF'); aoCountry[nCountry++] = new ShopCountry('French Polynesia', 'Französisch Polynesien', 'PF'); aoCountry[nCountry++] = new ShopCountry('French Southern Territories', 'Französische Süd- und Antarktisgebiete', 'TF'); aoCountry[nCountry++] = new ShopCountry('Gabon', 'Gabun', 'GA'); aoCountry[nCountry++] = new ShopCountry('Gambia', 'Gambia', 'GM'); aoCountry[nCountry++] = new ShopCountry('Georgia', 'Georgien', 'GE'); aoCountry[nCountry++] = new ShopCountry('Germany', 'Deutschland', 'DE', IsBetween(1, 7, 2020, 31, 12, 2020) ? 16 : 19, true); aoCountry[nCountry++] = new ShopCountry('Ghana', 'Ghana', 'GH'); // aoCountry[nCountry++] = new ShopCountry('Gibraltar', 'Gibraltar', 'GI'); aoCountry[nCountry++] = new ShopCountry('Greece', 'Griechenland', 'GR', 24); aoCountry[nCountry++] = new ShopCountry('Greenland', 'Grönland', 'GL'); aoCountry[nCountry++] = new ShopCountry('Grenada', 'Grenada', 'GD'); aoCountry[nCountry++] = new ShopCountry('Guadeloupe', 'Guadaloupe', 'GP'); aoCountry[nCountry++] = new ShopCountry('Guam', 'Guam', 'GU'); aoCountry[nCountry++] = new ShopCountry('Guatemala', 'Guatemala', 'GT'); // aoCountry[nCountry++] = new ShopCountry('Guernsey', 'Guernsey', 'GG'); aoCountry[nCountry++] = new ShopCountry('Guinea', 'Guinea', 'GN'); aoCountry[nCountry++] = new ShopCountry('Guinea-Bissau', 'Guinea-Bissau', 'GW'); aoCountry[nCountry++] = new ShopCountry('Guyana', 'Guyana', 'GY'); aoCountry[nCountry++] = new ShopCountry('Haiti', 'Haiti', 'HT'); aoCountry[nCountry++] = new ShopCountry('Heard Island and McDonald Islands', 'Heard- und McDonald-Inseln', 'HM'); aoCountry[nCountry++] = new ShopCountry('Honduras', 'Honduras', 'HN'); aoCountry[nCountry++] = new ShopCountry('Hong Kong', 'Hongkong', 'HK'); aoCountry[nCountry++] = new ShopCountry('Hungary', 'Ungarn', 'HU', 27); aoCountry[nCountry++] = new ShopCountry('Iceland', 'Island', 'IS'); aoCountry[nCountry++] = new ShopCountry('India', 'Indien', 'IN'); aoCountry[nCountry++] = new ShopCountry('Indonesia', 'Indonesien', 'ID'); aoCountry[nCountry++] = new ShopCountry('Iraq', 'Irak', 'IQ'); if (IsBetween(1, 1, 2021, 1, 4, 2021)) { } else { aoCountry[nCountry++] = new ShopCountry('Ireland', 'Irland', 'IE', 23); } // aoCountry[nCountry++] = new ShopCountry('Isle Of Man', 'Insel Man', 'IM'); aoCountry[nCountry++] = new ShopCountry('Israel', 'Israel', 'IL'); aoCountry[nCountry++] = new ShopCountry('Italy', 'Italien', 'IT', 22); aoCountry[nCountry++] = new ShopCountry('Jamaica', 'Jamaika', 'JM'); aoCountry[nCountry++] = new ShopCountry('Japan', 'Japan', 'JP'); // aoCountry[nCountry++] = new ShopCountry('Jersey', 'Jersey', 'JE'); aoCountry[nCountry++] = new ShopCountry('Jordan', 'Jordanien', 'JO'); aoCountry[nCountry++] = new ShopCountry('Kazakhstan', 'Kasachstan', 'KZ'); aoCountry[nCountry++] = new ShopCountry('Kenya', 'Kenia', 'KE'); aoCountry[nCountry++] = new ShopCountry('Kiribati', 'Kiribati', 'KI'); aoCountry[nCountry++] = new ShopCountry('Korea, South', 'Südkorea', 'KR'); aoCountry[nCountry++] = new ShopCountry('Kuwait', 'Kuwait', 'KW'); aoCountry[nCountry++] = new ShopCountry('Kyrgyzstan', 'Kirgisistan', 'KG'); aoCountry[nCountry++] = new ShopCountry('Laos', 'Laos', 'LA'); aoCountry[nCountry++] = new ShopCountry('Latvia', 'Lettland', 'LV', 21); aoCountry[nCountry++] = new ShopCountry('Lebanon', 'Libanon', 'LB'); aoCountry[nCountry++] = new ShopCountry('Lesotho', 'Lesotho', 'LS'); aoCountry[nCountry++] = new ShopCountry('Liberia', 'Liberia', 'LR'); aoCountry[nCountry++] = new ShopCountry('Liechtenstein', 'Liechtenstein', 'LI'); aoCountry[nCountry++] = new ShopCountry('Lithuania', 'Litauen', 'LT', 21); aoCountry[nCountry++] = new ShopCountry('Luxembourg', 'Luxemburg', 'LU', 17); aoCountry[nCountry++] = new ShopCountry('Macau', 'Macao', 'MO'); aoCountry[nCountry++] = new ShopCountry('Macedonia (Former Yugoslav Republic)', 'Mazedonien, ehem. jugoslawische Republik', 'MK'); aoCountry[nCountry++] = new ShopCountry('Madagascar', 'Madagaskar', 'MG'); aoCountry[nCountry++] = new ShopCountry('Malawi', 'Malawi', 'MW'); aoCountry[nCountry++] = new ShopCountry('Malaysia', 'Malaysia', 'MY'); aoCountry[nCountry++] = new ShopCountry('Maldives', 'Malediven', 'MV'); aoCountry[nCountry++] = new ShopCountry('Mali', 'Mali', 'ML'); aoCountry[nCountry++] = new ShopCountry('Malta', 'Malta', 'MT', 18); aoCountry[nCountry++] = new ShopCountry('Marshall Islands', 'Marshallinseln', 'MH'); aoCountry[nCountry++] = new ShopCountry('Martinique', 'Martinique', 'MQ'); aoCountry[nCountry++] = new ShopCountry('Mauritania', 'Mauretanien', 'MR'); aoCountry[nCountry++] = new ShopCountry('Mauritius', 'Mauritius', 'MU'); aoCountry[nCountry++] = new ShopCountry('Mayotte', 'Mayotte', 'YT'); aoCountry[nCountry++] = new ShopCountry('Mexico', 'Mexiko', 'MX'); aoCountry[nCountry++] = new ShopCountry('Micronesia', 'Mikronesien', 'FM'); aoCountry[nCountry++] = new ShopCountry('Moldova', 'Moldavien', 'MD'); // aoCountry[nCountry++] = new ShopCountry('Monaco', 'Monaco', 'MC'); aoCountry[nCountry++] = new ShopCountry('Mongolia', 'Mongolei', 'MN'); aoCountry[nCountry++] = new ShopCountry('Montserrat', 'Montserrat', 'MS'); aoCountry[nCountry++] = new ShopCountry('Morocco', 'Marokko', 'MA'); aoCountry[nCountry++] = new ShopCountry('Mozambique', 'Mozambique', 'MZ'); aoCountry[nCountry++] = new ShopCountry('Myanmar', 'Myanmar', 'MM'); aoCountry[nCountry++] = new ShopCountry('Namibia', 'Namibia', 'NA'); aoCountry[nCountry++] = new ShopCountry('Nauru', 'Nauru', 'NR'); aoCountry[nCountry++] = new ShopCountry('Nepal', 'Nepal', 'NP'); aoCountry[nCountry++] = new ShopCountry('Netherlands', 'Niederlande', 'NL', 21, true); aoCountry[nCountry++] = new ShopCountry('Netherlands Antilles', 'Niderländische Antillen', 'AN'); aoCountry[nCountry++] = new ShopCountry('New Caledonia', 'Neukaledonien', 'NC'); aoCountry[nCountry++] = new ShopCountry('New Zealand', 'Neuseeland', 'NZ'); aoCountry[nCountry++] = new ShopCountry('Nicaragua', 'Nicaragua', 'NI'); aoCountry[nCountry++] = new ShopCountry('Niger', 'Niger', 'NE'); aoCountry[nCountry++] = new ShopCountry('Nigeria', 'Nigeria', 'NG'); aoCountry[nCountry++] = new ShopCountry('Niue', 'Niue', 'NU'); aoCountry[nCountry++] = new ShopCountry('Norfolk Island', 'Norfolkinsel', 'NF'); aoCountry[nCountry++] = new ShopCountry('Northern Mariana Islands', 'Nördliche Marianen', 'MP'); aoCountry[nCountry++] = new ShopCountry('Norway', 'Norwegen', 'NO'); aoCountry[nCountry++] = new ShopCountry('Oman', 'Oman', 'OM'); aoCountry[nCountry++] = new ShopCountry('Pakistan', 'Pakistan', 'PK'); aoCountry[nCountry++] = new ShopCountry('Palau', 'Palau', 'PW'); aoCountry[nCountry++] = new ShopCountry('Palestinian Territory', 'Palästinensische Autonomiegebiete', 'PS'); aoCountry[nCountry++] = new ShopCountry('Panama', 'Panama', 'PA'); aoCountry[nCountry++] = new ShopCountry('Papua New Guinea', 'Papua-Neuguinea', 'PG'); aoCountry[nCountry++] = new ShopCountry('Paraguay', 'Paraguay', 'PY'); aoCountry[nCountry++] = new ShopCountry('Peru', 'Peru', 'PE'); aoCountry[nCountry++] = new ShopCountry('Philippines', 'Philippinen', 'PH'); aoCountry[nCountry++] = new ShopCountry('Pitcairn Islands', 'Pitcairninseln', 'PN'); aoCountry[nCountry++] = new ShopCountry('Poland', 'Polen', 'PL', 23); aoCountry[nCountry++] = new ShopCountry('Portugal', 'Portugal', 'PT', 23); aoCountry[nCountry++] = new ShopCountry('Puerto Rico', 'Puerto Rico', 'PR'); aoCountry[nCountry++] = new ShopCountry('Qatar', 'Katar', 'QA'); aoCountry[nCountry++] = new ShopCountry('Reunion', 'Reunion', 'RE'); aoCountry[nCountry++] = new ShopCountry('Romania', 'Rumänien', 'RO', 24); // aoCountry[nCountry++] = new ShopCountry('Russia', 'Russland', 'RU'); aoCountry[nCountry++] = new ShopCountry('Rwanda', 'Ruanda', 'RW'); aoCountry[nCountry++] = new ShopCountry('Samoa', 'Samoa', 'WS'); aoCountry[nCountry++] = new ShopCountry('San Marino', 'San Marino', 'SM'); aoCountry[nCountry++] = new ShopCountry('Sao Tome and Principe', 'Sao Tome und Principe', 'ST'); aoCountry[nCountry++] = new ShopCountry('Saudi Arabia', 'Saudi Arabien', 'SA'); aoCountry[nCountry++] = new ShopCountry('Senegal', 'Senegal', 'SN'); aoCountry[nCountry++] = new ShopCountry('Serbia and Montenegro', 'Serbien und Montenegro', 'RS'); aoCountry[nCountry++] = new ShopCountry('Seychelles', 'Seychellen', 'SC'); aoCountry[nCountry++] = new ShopCountry('Sierra Leone', 'Sierra Leone', 'SL'); aoCountry[nCountry++] = new ShopCountry('Singapore', 'Singapur', 'SG'); aoCountry[nCountry++] = new ShopCountry('Slovakia', 'Slowakei', 'SK', 20); aoCountry[nCountry++] = new ShopCountry('Slovenia', 'Slowenien', 'SI', 22); aoCountry[nCountry++] = new ShopCountry('Solomon Islands', 'Salomoninseln', 'SB'); aoCountry[nCountry++] = new ShopCountry('Somalia', 'Somalia', 'SO'); aoCountry[nCountry++] = new ShopCountry('South Africa', 'Südafrika', 'ZA'); aoCountry[nCountry++] = new ShopCountry('South Georgia and Sandwich Islands', 'Südgeorgien und die Südlichen Sandwichinseln', 'GS'); aoCountry[nCountry++] = new ShopCountry('Spain', 'Spanien', 'ES', 21); aoCountry[nCountry++] = new ShopCountry('Sri Lanka', 'Sri Lanka', 'LK'); aoCountry[nCountry++] = new ShopCountry('St. Helena', 'St. Helena', 'SH'); aoCountry[nCountry++] = new ShopCountry('St. Kitts and Nevis', 'St. Kitts und Nevis', 'KN'); aoCountry[nCountry++] = new ShopCountry('St. Lucia', 'St. Lucia', 'LC'); aoCountry[nCountry++] = new ShopCountry('St. Pierre and Miquelon', 'St. Pierre und Miquelon', 'PM'); aoCountry[nCountry++] = new ShopCountry('St. Vincent and the Grenadines', 'St. Vincent und die Grenadinen', 'VC'); aoCountry[nCountry++] = new ShopCountry('Suriname', 'Surinam', 'SR'); aoCountry[nCountry++] = new ShopCountry('Svalbard', 'Svalbard', 'SJ'); aoCountry[nCountry++] = new ShopCountry('Swaziland', 'Swasiland', 'SZ'); aoCountry[nCountry++] = new ShopCountry('Sweden', 'Schweden', 'SE', 25); aoCountry[nCountry++] = new ShopCountry('Switzerland', 'Schweiz', 'CH', 0, true); aoCountry[nCountry++] = new ShopCountry('Taiwan', 'Taiwan', 'TW'); aoCountry[nCountry++] = new ShopCountry('Tajikistan', 'Tadschikistan', 'TJ'); aoCountry[nCountry++] = new ShopCountry('Tanzania', 'Tansania', 'TZ'); aoCountry[nCountry++] = new ShopCountry('Thailand', 'Thailand', 'TH'); aoCountry[nCountry++] = new ShopCountry('Togo', 'Togo', 'TG'); aoCountry[nCountry++] = new ShopCountry('Tokelau', 'Tokelau', 'TK'); aoCountry[nCountry++] = new ShopCountry('Tonga', 'Tonga', 'TO'); aoCountry[nCountry++] = new ShopCountry('Trinidad and Tobago', 'Trinidad und Tobago', 'TT'); aoCountry[nCountry++] = new ShopCountry('Tunisia', 'Tunesien', 'TN'); aoCountry[nCountry++] = new ShopCountry('Turkey', 'Türkei', 'TR'); aoCountry[nCountry++] = new ShopCountry('Turkmenistan', 'Turkmenistan', 'TM'); aoCountry[nCountry++] = new ShopCountry('Turks and Caicos Islands', 'Turks- und Caicosinseln', 'TC'); aoCountry[nCountry++] = new ShopCountry('Tuvalu', 'Tuvalu', 'TV'); aoCountry[nCountry++] = new ShopCountry('Uganda', 'Uganda', 'UG'); aoCountry[nCountry++] = new ShopCountry('Ukraine', 'Ukraine', 'UA'); aoCountry[nCountry++] = new ShopCountry('United Arab Emirates', 'Vereinigte Arabische Emirate', 'AE'); aoCountry[nCountry++] = new ShopCountry('United Kingdom', 'Großbritannien', 'GB'); aoCountry[nCountry++] = new ShopCountry('Uruguay', 'Uruguay', 'UY'); aoCountry[nCountry++] = new ShopCountry('USA', 'USA', 'US'); aoCountry[nCountry++] = new ShopCountry('US Minor Outlying Islands', 'US Minor Outlying Islands', 'UM'); aoCountry[nCountry++] = new ShopCountry('Uzbekistan', 'Usbekistan', 'UZ'); aoCountry[nCountry++] = new ShopCountry('Vanuatu', 'Vanuatu', 'VU'); aoCountry[nCountry++] = new ShopCountry('Vatican City State', 'Vatikan', 'VA'); aoCountry[nCountry++] = new ShopCountry('Venezuela', 'Venezuela', 'VE'); aoCountry[nCountry++] = new ShopCountry('Viet Nam', 'Vietnam', 'VN'); aoCountry[nCountry++] = new ShopCountry('Virgin Islands (British)', 'Britische Jungferninseln', 'VG'); aoCountry[nCountry++] = new ShopCountry('Virgin Islands (U.S.)', 'Amerikanische Jungferninseln', 'VI'); aoCountry[nCountry++] = new ShopCountry('Wallis und Futuna', 'Wallis and Futuna', 'WF'); aoCountry[nCountry++] = new ShopCountry('Western Sahara', 'Westsahara', 'EH'); aoCountry[nCountry++] = new ShopCountry('Yemen', 'Jemen', 'YE'); aoCountry[nCountry++] = new ShopCountry('Zambia', 'Sambia', 'ZM'); aoCountry[nCountry++] = new ShopCountry('Zimbabwe', 'Simbabwe', 'ZW'); } } function ShopSortCountries(oCountries, nLan) { ShopInitCountries(); if (oCountries.length <= 1) { return oCountries; } var oPivot = oCountries[Math.floor(oCountries.length / 2)]; var strPivot = (nLan == 2) ? oPivot.m_strGerman : oPivot.m_strEnglish; switch (strPivot.charAt(0)) { case 'Ä': { strPivot = 'Ae' + strPivot.substr(1); break; } case 'Ö': { strPivot = 'Oe' + strPivot.substr(1); break; } case 'Å': { strPivot = 'Ao' + strPivot.substr(1); break; } } var oLess = new Array(); var oGreater = new Array(); for (var i = 0; i < oCountries.length; i++) { if (i == Math.floor(oCountries.length / 2)) { continue; } var strCheck = (nLan == 2) ? oCountries[i].m_strGerman : oCountries[i].m_strEnglish; switch (strCheck.charAt(0)) { case 'Ä': { strCheck = 'Ae' + strCheck.substr(1); break; } case 'Ö': { strCheck = 'Oe' + strCheck.substr(1); break; } case 'Å': { strCheck = 'Ao' + strCheck.substr(1); break; } } if (strCheck < strPivot) { oLess[oLess.length] = oCountries[i]; } else { oGreater[oGreater.length] = oCountries[i]; } } oLess = ShopSortCountries(oLess, nLan); oLess[oLess.length] = oPivot; return oLess.concat(ShopSortCountries(oGreater, nLan)); } function ShopOnSelectCountryList(nLan, strName) { SessionWrite('SHOP_COUNTRY', document.forms[strName].SHOP_COUNTRY.value); } function ShopDisplayCountryList(nLan, strText1, strText2, fOnSelect) { if ((typeof fOnSelect) == 'undefined') { fOnSelect = 'ShopOnSelectCountryList'; } var strName; var i; for (i = 1;; i++) { strName = '___COUNTRY' + i + '___'; if ((typeof document.forms[strName]) == 'undefined') { break; } } document.write('
'); if ((typeof strText1) != 'undefined') { document.write(strText1); } document.write(''); if ((typeof strText2) != 'undefined') { document.write(strText2); } document.write('
'); return strName; } function ShopFillCountryList(nLan, strSelID, bHighlight) { document.write(''); } else { document.write('––> Please choose your country'); } ShopInitCountries(); aoCountry = ShopSortCountries(aoCountry, nLan); var bSelected = false; for (var c = 0; c < aoCountry.length; c++) { if (aoCountry[c].m_bMain) { var strSelected = ''; if (aoCountry[c].m_strID == strSelID) { strSelected = ' SELECTED'; bSelected = true; } document.write(''); } } if (nLan == 2) { document.write(''); } else { document.write(''); } for (var c = 0; c < aoCountry.length; c++) { var strSelected = ''; if ((!bSelected) && (aoCountry[c].m_strID == strSelID)) { strSelected = ' SELECTED'; } document.write(''); } } function ShopFindCountry(strID) { ShopInitCountries(); for (var c = 0; c < aoCountry.length; c++) { if (aoCountry[c].m_strID == strID) { return aoCountry[c]; } } } function ShopIsVatPlus(strID) { if (strID == '') { return false; } if (strID == 'GB') // Gewährleistung; Kundenverhalten { return true; } return false; } function ShopIsVat(strID) { if (strID == '') { return false; } ShopInitCountries(); var oCountry = ShopFindCountry(strID); return (oCountry.GetVat() != 0); } function ShopGetVatSurcharge(strID) { if (strID == '') { return 0; } if (strID == 'DE') { return 0; } ShopInitCountries(); var oCountry = ShopFindCountry(strID); if (oCountry.IsEU()) { return 2; // 2% surcharge for VAT handling in the EU } else if ((strID == 'CH') || (strID == 'LI')) { return 15; // 15% surcharge for VAT handling in CH, ... } else if (strID == 'US') // 15% Trump; 10% North Stream 2 { // return 25; } else if (strID == 'GB') // Gewährleistung; Kundenverhalten { return 30; } else if (strID == 'RU') { return 10; // 10% surcharge for handling via ShareIt } else if (strID == 'UA') { return 0; // no surcharge for handling via ShareIt } return 0; } function ShopIsEU(strID) { if (strID == '') { return false; } ShopInitCountries(); var oCountry = ShopFindCountry(strID); return oCountry.IsEU(); } function ShopIsEURO(strID) { return (ShopIsEU(strID) || (strID.toUpperCase() == 'CH')); } function ShopCalcNet(nTotalPrice, strCountry) { if (ShopIsVat(strCountry)) { var oCountry = ShopFindCountry(strCountry); return ShopRound(nTotalPrice / (1 + oCountry.GetVat())); } else { return nTotalPrice; } } function ShopCalcVat(nTotalPrice, strCountry) { return ShopRound(nTotalPrice - ShopCalcNet(nTotalPrice, strCountry)); } function ShopFormatAmount(nAmount) { var s = ShopRound(nAmount); s = 'a' + s; s = s.substring(1,s.length); if (s.indexOf('.') == 0) s = '0'+ s; else if ((s.indexOf('.') != -1) && (s.indexOf('.') == s.length - 2)) s += '0'; else if (s.indexOf('.') == -1) s += '.00'; return s; } function ShopShowPrice(nLan, strProduct, strInfo) { var doc = document; var p = ShopGetProdIndex(strProduct); doc.write(''); var strCountryID = InputRead("SHOP_COUNTRY"); if (strCountryID == "") { return; } if (strProduct == '0') { doc.write(astrDict[nLan]["MSG_NOTAVAILABLE"]); } else if (p < 0) { doc.write('Error'); } else { doc.write(ShopFormatAmount(aoShopProducts[p].CalcPrice()) + ' ' + aoShopProducts[p].m_strCurrency); if (ShopIsEU(strCountryID)) { doc.write("" + ((nLan == 2) ? " inkl. Mwst." : " incl. VAT") + ""); } if (aoShopProducts[p].m_oShippingCosts.m_nShippingCostsG != 0) { var strShipping = (nLan == 2) ? 'zzgl. Versandkosten' : 'plus Shipping & Handling'; strShipping = strShipping += ' [Info]'; if ((typeof strInfo) != 'undefined') { strInfo = strShipping + '
' + strInfo; } else { strInfo = strShipping; } strInfo = '' + strInfo + ''; } } if ((typeof strInfo) != 'undefined') { doc.write('
' + strInfo); } doc.write(''); } function ShopGetProductPrice(nLan, strProdEUR, strProdUSD, bWithInfo) { var strCountryID = InputRead("SHOP_COUNTRY"); if ((typeof strCountryID) == 'undefined') { strCountryID = ''; } var strPrice = ''; if (strCountryID == '') { strPrice = ''; } else { var bEuro = ShopIsEURO(strCountryID); var strProduct = bEuro ? strProdEUR : strProdUSD; var p = ShopGetProdIndex(strProduct); if (p >= 0) { if (aoShopProducts[p].m_bNotAvailable) { strPrice = ((nLan == 2) ? 'Zur Zeit nicht lieferbar.' : 'Currently not available.'); } else { strPrice = '' + ShopFormatAmount(aoShopProducts[p].CalcPrice()) + ' ' + aoShopProducts[p].m_strCurrency + ''; if (ShopIsVatPlus(strCountryID)) { var strNetPrice = ShopFormatAmount(aoShopProducts[p].CalcPrice(false)) + ' ' + aoShopProducts[p].m_strCurrency; strPrice += '
(' + strNetPrice + '
' + ((nLan == 2) ? 'ohne Steuer und
Steuerabwicklung' : 'w/o Tax and Tax Handling') + ')
'; } else if (ShopIsVat(strCountryID)) { strPrice += ' ' + ((nLan == 2) ? 'inkl. Mwst.' : 'incl. VAT') + ''; } if (aoShopProducts[p].m_oShippingCosts.m_nShippingCostsG != 0) { strPrice += ' ' + ((nLan == 2) ? 'zzgl. Versandkosten' : 'plus Shipping&Handling') + ''; if ((typeof bWithInfo) != 'undefined') { if (bWithInfo) { strPrice += ' [Info]'; } } strPrice += ''; } } } else { strPrice = astrDict[nLan]["MSG_NOTAVAILABLE"]; } } return strPrice; } function ShopGetProductCartButton(nLan, strProdEUR, strProdUSD, nUpgrade, bLineBreak) { var strCountryID = InputRead("SHOP_COUNTRY"); if ((typeof strCountryID) == 'undefined') { strCountryID = ''; } var strButton = ''; if (strCountryID == '') { strButton = astrDict[nLan]["MSG_NOTAVAILABLE"]; } else { var bEuro = ShopIsEURO(strCountryID); var strProduct = bEuro ? strProdEUR : strProdUSD; var p = ShopGetProdIndex(strProduct); if (p < 0) { strButton = ''; } else if (aoShopProducts[p].m_bNotAvailable) { strButton = ''; } else if (nUpgrade == 1) { // normal upgrade: strButton = GetUrlButtonCode((nLan == 2) ? 'In den Warenkorb' : 'Add to Cart', ShopGetUpgradePage(strProduct) + '?EU=' + (ShopIsEU(strCountryID) ? '1' : '0') + '&ID=' + strProduct, bLineBreak); } else if (nUpgrade == 2) { // change from Rocomotion: strButton = GetUrlButtonCode((nLan == 2) ? 'In den Warenkorb' : 'Add to Cart', 'roco.htm?EU=' + (ShopIsEU(strCountryID) ? '1' : '0') + '&ID=' + strProduct, bLineBreak); } else { // full version: strButton = GetButtonCode((nLan == 2) ? 'In den Warenkorb' : 'Add to Cart', 'ShopAdd(' + nLan + ', \'' + strProduct + '\')', bLineBreak); } } return strButton; } function ShopGetUpgradePage(strProduct) { return "upgrade.htm"; } function ShopShowProduct(nLan, strProdEUR, strProdUSD, nUpgrade, strInfo) { var doc = document; var strCountryID = InputRead("SHOP_COUNTRY"); if (strCountryID == "") { doc.write(''); return; } var strProduct = ShopIsEURO(strCountryID) ? strProdEUR : strProdUSD; var p = ShopGetProdIndex(strProduct); ShopShowPrice(nLan, strProduct, strInfo); if (strProduct == '0') { doc.write(''); } else if (aoShopProducts[p].m_bNotAvailable) { doc.write(''); doc.write((nLan == 2) ? 'Zur Zeit nicht lieferbar.' : 'Currently not available.'); doc.write(''); return; } else { var strAlt = (nLan == 2) ? 'In den Warenkorb' : 'Order'; var strDir = (nLan == 2) ? 'bilder' : 'images'; doc.write(''); if (nUpgrade == 1) { doc.write(''); doc.write('' + strAlt + '<'); } else if (nUpgrade == 2) { doc.write(''); doc.write('' + strAlt + '<'); } else { doc.write('' + strAlt + ' '); } } function ShopOnDisplayProductSelect(nLan, strFormName) { SessionWrite('SHOP_COUNTRY', document.forms[strFormName].SHOP_COUNTRY.value); var strCountryID = InputRead("SHOP_COUNTRY"); if ((typeof strCountryID) == 'undefined') { strCountryID = ''; } var f; for (f = 1;; f++) { strName = '___COUNTRY' + f + '___'; if ((typeof document.forms[strName]) == 'undefined') { break; } form = document.forms[strName]; form.SHOP_COUNTRY.value = strCountryID; var strPrice = ShopGetProductPrice(nLan, form.SHOP_PRODEU.value, form.SHOP_PRODUSD.value, true); form.getElementsByTagName("label")[0].innerHTML = strPrice; var imgEUR; var imgUSD; var obj = form; var bFound = false; for (obj = form; ((typeof obj) != 'undefined') && (!bFound); obj = obj.parentNode) { var c; for (c = 0; c < obj.childNodes.length; c++) { switch (obj.childNodes[c].id) { case 'IMGEUR': { imgEUR = obj.childNodes[c]; bFound = true; break; } case 'IMGUSD': { imgUSD = obj.childNodes[c]; bFound = true; break; } } } } var bEuro = ShopIsEURO(strCountryID); if ((strCountryID == '') || (strPrice == astrDict[nLan]["MSG_NOTAVAILABLE"])) { imgEUR.style.visibility = 'hidden'; imgEUR.style.width = '0px'; imgUSD.style.visibility = 'hidden'; imgUSD.style.width = '0px'; } else if (bEuro) { imgEUR.style.visibility = 'visible'; imgEUR.style.width = ''; imgUSD.style.visibility = 'hidden'; imgUSD.style.width = '0px'; } else { imgEUR.style.visibility = 'hidden'; imgEUR.style.width = '0px'; imgUSD.style.visibility = 'visible'; imgUSD.style.width = ''; } } } function ShopDisplayProduct(nLan, strText, strLogo, strProdEUR, strProdUSD, strDownload, strDownloadText, nFlags) { if (strProdEUR.substr(2, 1) == '9') { strProdEUR = strProdEUR.substr(0, 2) + 'A' + strProdEUR.substr(3); } if (strProdUSD.substr(2, 1) == '9') { strProdUSD = strProdUSD.substr(0, 2) + 'A' + strProdUSD.substr(3); } if (IsNewConsumerDirective()) { var p = ShopGetProdIndex(strProdEUR); if (p >= 0) { if (aoShopProducts[p].m_oShippingCosts.m_nShippingCostsG != 0) { return; } } } var doc = document; doc.write('
'); doc.write('
'); if ((typeof nFlags) == 'undefined') { nFlags = 0; } if (nFlags & PHOTOSPLASHOFFSET) { var nWidth = 325; doc.write('
'); ShadowTop(); doc.write('
'); ShadowBottom(); doc.write('
'); doc.write('
'); doc.write(''); doc.write('
'); } else { var nWidth = (nFlags & PHOTOSPLASH) ? 300 : 150; doc.write('
'); ShadowTop(); doc.write(''); ShadowBottom(); doc.write('
'); } doc.write('
'); var bDownload = true; if (bDownload) { if (((typeof strText) != 'undefined') && (strText != '')) { doc.write(strText + '
'); } if (((typeof strDownloadText) != 'undefined') && (strDownloadText != '')) { doc.write(strDownloadText); } if (((typeof strDownload) != 'undefined') && (strDownload != '')) { doc.write('
'); DisplayUrlButton('Download', '../software/' + strDownload, true); } } if ((strProdEUR != '0') || (strProdUSD != '0')) { doc.write('
'); var strText1 = ((nLan == 2) ? 'Preis für ' : 'Price for '); var strText2 = '' + '' + '

' + ''; var form = ShopDisplayCountryList(nLan, strText1 + '
', strText2, 'ShopOnDisplayProductSelect'); var strAlt = (nLan == 2) ? 'In den Warenkorb' : 'Order'; var strDir = (nLan == 2) ? 'bilder' : 'images'; doc.write('
'); doc.write('
'); DisplayButton((nLan == 2) ? 'In den Warenkorb' : 'Add To Cart', 'ShopAdd(' + nLan + ', \'' + strProdEUR + '\')'); doc.write('
'); doc.write('
'); DisplayButton((nLan == 2) ? 'In den Warenkorb' : 'Add To Cart', 'ShopAdd(' + nLan + ', \'' + strProdUSD + '\')'); doc.write('
'); } doc.write('
'); doc.write('
'); if ((strProdEUR != '0') || (strProdUSD != '0')) { ShopOnDisplayProductSelect(nLan, form); } } function ShopOrder(nLan, strID, strCountry) { strID = ShopCorrectCurrencyInID(strID, strCountry); ShopAdd(nLan, strID); } function ShopCorrectCurrencyInID(strID, strCountry) { return strID.substring(0, strID.length - 1) + ((ShopIsEURO(strCountry)) ? '1' : '2'); } function ShopEnforceService(strCountryID) { switch (strCountryID) { case 'CH': case 'LI': case 'GB': case 'RU': case 'UA': { return strShareIt; } } return ''; } function ShopCalcService(strPayment, strCC) { var strService = strInhouse if (strPayment == strBankTransfer) { strService = strInhouse; } else if (strPayment == strPayPal) { strService = strInhouse; } else if (strPayment == strGiroPay) { strService = strUOS; } else if (strPayment == strSofortUeberweisung) { strService = strUOS; } else if(strPayment == strCreditCard) { strService = strShareIt; if ((strCC == 'M') || (strCC == 'V')) { var bUseWirecard = true; // true: Wirecard; false: ShareIt if (bLocalTest || bUseWirecard) { strService = strUOS; // use UOS } } else if (strCC == '') { strService = ''; } } return strService; } function ShopCheckout(nLan) { // called, when the user presses the checkout button in the cart page: var nItemCount = parseInt(document.forms["CART"]["ITEMCOUNT"].value); var nTotalCount = 0; for (var p = 0; p < nItemCount; p++) { var strProductID = document.forms["CART"]["ID" + p.toString()].value; var nCount = parseInt(document.forms["CART"]["COUNT" + p.toString()].value); if (document.forms["CART"]["DELETE" + p.toString()].checked == true) { nCount = 0; } nTotalCount += nCount; if (nTotalCount > 0) { break; } } if (nTotalCount == 0) { AlertEx(astrDict[nLan]["CARTDELETE"]); return; } ShopRefresh(false); location.replace('checkout.htm?REGISTER=0'); } function ShopGetCountryInfo(nLan, strCountry, bLong) { /* if (strCountry == 'GB') { return '' + ((nLan == 2) ? 'Wir liefern zur Zeit nicht nach Großbritannien (' + ((nLan == 2) ? 'Weitere Informationen' : 'Details') + '' + ').' + ''; } */ if (ShopEnforceService(strCountry) == strShareIt) { var strInfo = astrDict[nLan]["MSG_SHAREIT"]; if ((strCountry == 'CH') || (strCountry == 'LI') || (strCountry == 'GB') || (strCountry == 'UA') || (strCountry == 'RU')) { strInfo += ' ' + ((nLan == 2) ? '(' + ((nLan == 2) ? 'Details' : 'Details') + '' + ').'; if (bLong) { if ((strCountry == 'CH') || (strCountry == 'LI')) { strInfo += '

' + ((nLan == 2) ? 'Bitte beachten Sie: aus bestimmten verfahrenstechnischen Gründen können wir keine Paket-Shops mit deutschen Lieferadressen für Schweizer beliefern.' : 'Please note: for certain procedural reasons, we can not deliver to parcel shops with German delivery addresses for Swiss persons.'); } } strInfo += '
'; } return strInfo; } return ''; } function ShopIsClosed(strCountry) { /* if (strCountry == 'GB') { return true; } */ return false; } function ShopCreateRefShareIt(nLan, strCountry, nTotalPrice, strCurrency, strProductID, bGrossPrice) { // example: https://order.shareit.com/cart/add ?vendorid=10043&PRODUCT[300274770]=1&cartcoupon=false&HADD[300274770][ADDITIONAL1]=Weihnachtsmann&languageid=2&bill_country=CH&backlink=https%3A%2F%2Fwww.freiwald.com%2Fseiten%2Fregister.htm&pc=rv76b¤cy=EUR&PRODUCTPRICE[300274770]=574.00EUR%2CG%3B288499edc645720a59cbc1feb28ccc8d if ((typeof nTotalPrice) == 'undefined') { nTotalPrice = 0; } if ((typeof strCurrency) == 'undefined') { strCurrency = ''; } if ((typeof strProductID) == 'undefined') { strProductID = '300274770'; } if ((typeof bGrossPrice) == 'undefined') { bGrossPrice = true; } SessionWrite('SHAREIT_PRODUCTID', strProductID); var strBacklink = g_strSecureUrl; strBacklink = strBacklink.replace(/:/g, '%3A'); strBacklink = strBacklink.replace(/\//g, '%2F'); strBacklink += '%2F' + ((nLan <= 1) ? 'pages' : 'seiten') + '%2Fregister.htm'; // var strRef = g_strSecureUrl + '/' + ((nLan <= 1) ? 'pages' : 'seiten') + '/shareit.htm?backlink=' + strBacklink + '%2F' + ((nLan <= 1) ? 'pages' : 'seiten') + '%2Fregister.htm&cookies=0'; var strRef = g_strSecureUrl + '/' + ((nLan <= 1) ? 'pages' : 'seiten') + '/shareit.htm'; var strVendorID = '10043'; var strLanguageID = nLan.toString(); var nItemCount = 0; var nTotalShippingCosts = 0; if (nTotalPrice == 0) { for (var p = 0; p < aoShopProducts.length; p++) { var nCount = ShopGetProdCount(aoShopProducts[p].m_strID); if (nCount != 0) { if (nCount < 0) { nCount = 0; } nTotalPrice += nCount*aoShopProducts[p].CalcPrice(); nTotalPrice += ShopCalcShipping(p, nCount, strCountry) } } for (var p = 0; p < aoShopProducts.length; p++) { var nCount = ShopGetProdCount(aoShopProducts[p].m_strID); if (nCount < 0) { nCount = 0; } if (nCount != 0) { nItemCount++; strCurrency = aoShopProducts[p].m_strCurrency; } } } else { nItemCount = 1; } if (nItemCount > 0) { strRef += '?vendorid=' + strVendorID; strRef += '&PRODUCT[' + strProductID + ']=1'; strRef += '&cartcoupon=false'; strRef += '&HADD[' + strProductID + '][ADDITIONAL1]=' + InputRead('SHOP_ORDERNUMBER'); strRef += '&languageid=' + strLanguageID; strRef += '&bill_country=' + InputRead('SHOP_COUNTRY'); strRef += '&backlink=' + strBacklink; strRef += '&pc=lx73x'; strRef += '¤cy=' + strCurrency; var strPrice = nTotalPrice.toString(); if (strPrice.indexOf('.') < 0) { strPrice += '.00'; } strRef += '&PRODUCTPRICE[' + strProductID + ']=' + strPrice + strCurrency + '%2C' + (bGrossPrice ? 'G' : 'N'); /* strRef += '&SALUTATION=' + InputRead('SHOP_SALUTATION'); strRef += '&FIRSTNAME=' + InputRead('SHOP_FIRSTNAME'); strRef += '&LASTNAME=' + InputRead('SHOP_LASTNAME'); strRef += '&D_STREET1=' + InputRead('SHOP_STREET'); strRef += '&D_STREET2=' + InputRead('SHOP_STREET2'); strRef += '&D_POSTALCODE=' + InputRead('SHOP_POSTALCODE'); strRef += '&D_CITY=' + InputRead('SHOP_CITY'); if (InputRead('SHOP_COUNTRY') == 'DE') { strRef += '&D_COUNTRY_ID=' + '4'; } else if ((InputRead('SHOP_COUNTRY') == 'CH') || (InputRead('SHOP_COUNTRY') == 'LI') || (InputRead('SHOP_COUNTRY') == 'GB') || (InputRead('SHOP_COUNTRY') == 'UA') || (InputRead('SHOP_COUNTRY') == 'RU')) { strRef += '&D_COUNTRY_ID=' + '39'; } else if (InputRead('SHOP_COUNTRY') == 'US') { strRef += '&D_COUNTRY_ID=' + '400'; } else { strRef += '&D_COUNTRY_ID=' + '999'; } strRef += '&PHONE=' + InputRead('SHOP_PHONE'); strRef += '&EMAIL=' + InputRead('SHOP_EMAIL'); strRef += '&EMAIL_CONFIRM=' + InputRead('SHOP_EMAIL'); */ // strRef += '&PAYMENTTYPE_ID=CCA'; // preselect credit card as payment method // strRef += '&pts=CCA,PAL,WTR'; // credit card, paypal, bank transfer // strRef += '&pts=PAL,WTR'; // paypal, bank transfer // strRef=encodeURI(strRef); } return strRef; } function ShopCheckoutShareIt(nLan, bReplace, bAddPersonal) { return; // used for products with individual product IDs: var strBacklink = g_strUrl; strBacklink = strBacklink.replace(/:/g, '%3A'); strBacklink = strBacklink.replace(/\//g, '%2F'); var strRef = 'https://secure.shareit.com/shareit/checkout.html?backlink=' + strBacklink + '%2F' + ((nLan <= 1) ? 'pages' : 'seiten') + '%2Fregister.htm&cookies=0'; strRef += '&cart=1'; strRef += '&languageid=' + nLan.toString(); var nItemCount = 0; var strCurrency; for (var p = 0; p < aoShopProducts.length; p++) { var nCount = ShopGetProdCount(aoShopProducts[p].m_strID); if (nCount < 0) { nCount = 0; } if (nCount != 0) { nItemCount++; strCurrency = aoShopProducts[p].m_strCurrency; strRef += '&PRODUCT[' + aoShopProducts[p].m_strShareItID + ']=' + nCount.toString(); } } if (nItemCount > 0) { strRef += '¤cies=' + strCurrency; if (bAddPersonal) { strRef += '&SALUTATION=' + CookieRead('SHOP_SALUTATION'); strRef += '&FIRSTNAME=' + CookieRead('SHOP_FIRSTNAME'); strRef += '&LASTNAME=' + CookieRead('SHOP_LASTNAME'); strRef += '&D_STREET1=' + CookieRead('SHOP_STREET'); strRef += '&D_STREET2=' + CookieRead('SHOP_STREET2'); strRef += '&D_POSTALCODE=' + CookieRead('SHOP_POSTALCODE'); strRef += '&D_CITY=' + CookieRead('SHOP_CITY'); strRef += '&D_COUNTRY_ID=' + CookieRead('SHOP_COUNTRY'); strRef += '&PHONE=' + CookieRead('SHOP_PHONE'); strRef += '&EMAIL=' + CookieRead('SHOP_EMAIL'); strRef += '&EMAIL_CONFIRM=' + CookieRead('SHOP_EMAIL'); } strRef=encodeURI(strRef); if (bReplace) { location.replace(strRef); } else { location.href = strRef; } } return strRef; } function ShopCheckoutPayPal(nLan) { if (nLan == 0) { nLan == 1; } var strRef = 'https://www.paypal.com/cgi-bin/webscr?business=paypal@freiwald.com'; // var strRef = 'https://www.sandbox.paypal.com/cgi-bin/webscr?business=musterhaendler@musterhaendler.de'; strRef += '&cmd=_cart&upload=1'; // strRef += '&tax_cart=' + '100'; strRef += '&lc=' + astrDict[nLan]["LAN"]; var nItemCount = 0; var strCurrency; for (var p = 0; p < aoShopProducts.length; p++) { var nCount = ShopGetProdCount(aoShopProducts[p].m_strID); if (nCount < 0) { nCount = 0; } if (nCount != 0) { nItemCount++; strRef += '&item_name_' + nItemCount.toString() + '=' + aoShopProducts[p].m_strName; strRef += '&item_number_' + nItemCount.toString() + '=' + aoShopProducts[p].m_strID; strRef += '&amount_' + nItemCount.toString() + '=' + aoShopProducts[p].CalcPrice().toString(); strRef += '&quantity_' + nItemCount.toString() + '=' + nCount.toString(); strRef += '&on0_' + nItemCount.toString() + '=' + astrDict[nLan]["MWST_TRANSMIT"]; strCurrency = aoShopProducts[p].m_strCurrency; } } if (nItemCount > 0) { window.open(strRef); strRef += '&currency_code=' + strCurrency; // location.href = strRef; } return strRef; } function ShopShowCartTable(nLan, bAllowChanging, strCountry) { var doc = document; var nTotalPrice = 0; var nTotalShippingCosts = 0; var nPosition = 0; var nItemCount = 0; var strCurrency; for (var p = 0; p < aoShopProducts.length; p++) { var oProduct = aoShopProducts[p]; var nCount = ShopGetProdCount(oProduct.m_strID); if (nCount != 0) { nItemCount++; if (nCount < 0) { nCount = 0; } strCurrency = oProduct.m_strCurrency; nPosition++; var nItemPrice = oProduct.CalcPrice(); var nSubTotal = nItemPrice * nCount; nTotalPrice += nSubTotal; var strItemNetPrice = ShopFormatAmount(oProduct.CalcPrice(false)) + ' ' + strCurrency; if (bAllowChanging) { nTotalShippingCosts += ShopCalcShipping(p, nCount, strCountry); doc.write(''); TableRowEx(1, 'td', '
' + nPosition.toString() + '
', aoShopProducts[p].m_strName, '
', '
' + ShopFormatAmount(nItemPrice) + ' ' + strCurrency + (ShopIsVatPlus(strCountry) ? ('
(' + strItemNetPrice + '
' + ((nLan == 1) ? 'w/o Tax & Tax Handling' : 'o. Steuer & Steuerabwicklung') + ')
') : '') + '
', '
' + ShopFormatAmount(nSubTotal) + ' ' + strCurrency + '
', '
'); } else { nTotalShippingCosts += ShopCalcShipping(p, nCount, strCountry); var bCustomPayment = oProduct.IsCustomPayment(); var nNetPrice = ShopCalcNet(nSubTotal, strCountry); var nVatPrice = ShopCalcVat(nSubTotal, strCountry); if ((!bCustomPayment) && ShopIsVatPlus(strCountry)) { nNetPrice = oProduct.CalcPrice(false); nVatPrice = oProduct.CalcPrice(true) - nNetPrice; } var strNetPrice = (bCustomPayment ? '' : (ShopFormatAmount(nNetPrice) + ' ' + strCurrency)); var strVatPrice = (bCustomPayment ? '' : (ShopFormatAmount(nVatPrice) + ' ' + strCurrency)); TableRowEx(1, 'td', '
' + nPosition.toString() + '
', aoShopProducts[p].m_strName, '
' + nCount.toString() + '
', '
' + strNetPrice + '
', '
' + strVatPrice + '
', '
' + ShopFormatAmount(nSubTotal) + ' ' + strCurrency + '
'); } } } if (nTotalShippingCosts > 0) { nPosition++; nTotalPrice += nTotalShippingCosts; if (bAllowChanging) { TableRowEx(1, 'td', '
' + nPosition.toString() + '
', astrDict[nLan]['SHIPPING'], ' ', ' ', '
' + ShopFormatAmount(nTotalShippingCosts) + ' ' + strCurrency + '
', ' '); } else { TableRowEx(1, 'td', '
' + nPosition.toString() + '
', astrDict[nLan]['SHIPPING'], ' ', '
' + ShopFormatAmount(ShopCalcNet(nTotalShippingCosts, strCountry)) + ' ' + strCurrency + '
', '
' + ShopFormatAmount(ShopCalcVat(nTotalShippingCosts, strCountry)) + ' ' + strCurrency + '
', '
' + ShopFormatAmount(nTotalShippingCosts) + ' ' + strCurrency + '
'); } } var nPaymentFee = ShopCalcPaymentFee(nTotalPrice); if (nPaymentFee > 0) { nPosition++; nTotalPrice += nPaymentFee; if (bAllowChanging) { TableRowEx(1, 'td', '
' + nPosition.toString() + '
', ShopCalcPaymentText(nLan), ' ', ' ', '
' + ShopFormatAmount(nPaymentFee) + ' ' + strCurrency + '
', ' '); } else { TableRowEx(1, 'td', '
' + nPosition.toString() + '
', ShopCalcPaymentText(nLan), ' ', '
' + ShopFormatAmount(ShopCalcNet(nPaymentFee, strCountry)) + ' ' + strCurrency + '
', '
' + ShopFormatAmount(ShopCalcVat(nPaymentFee, strCountry)) + ' ' + strCurrency + '
', '
' + ShopFormatAmount(nPaymentFee) + ' ' + strCurrency + '
'); } } if (bAllowChanging) { /* doc.write(''); doc.write('' + '* ' + astrDict[nLan]['MWST_TEXT'] + ''); doc.write(''); */ doc.write(''); doc.write(''); doc.write('
' + GetButtonCode(astrDict[nLan]["UPDATE"], 'ShopRefresh(true)', true) + '
'); doc.write(''); doc.write(''); doc.write(''); doc.write(''); doc.write(''); } doc.write(''); doc.write('' + 'Gesamt' + '  '); doc.write('' + astrDict[nLan]["TOTAL"] + ': ' + ShopFormatAmount(nTotalPrice) + ' ' + strCurrency + ''); doc.write(''); doc.write(''); } function ShopShowCart(nLan, bAllowChanging, strCountry) { if ((typeof strCountry) == 'undefined') { strCountry = InputRead("SHOP_COUNTRY"); } if (navigator.cookieEnabled != true) { AlertEx(astrDict[nLan]["MSG_NOCOOKIEBASKET"]); if (ParameterRead('mode') == "addproduct") { var strRef = 'https://secure.shareit.com/shareit/cart.html'; strRef += '?PRODUCT[' + ParameterRead('product') + ']=1'; strRef += '&languageid=' + nLan; strRef += '&backlink=' + g_strUrl + '/' + ((nLan==2) ? 'seiten' : 'pages') + '/register.htm'; // strRef += '&cookies=1'; strRef += '¤cies=' + ((nLan==2) ? 'EUR' : 'USD'); location.href = strRef; return; } } if (ParameterRead('mode') == "addproduct") { ShopDoAdd(nLan, ParameterRead('product')); } if ((typeof bAllowChanging) == 'undefined') { bAllowChanging = true; } var doc = document; var nItemCount = 0; var bShowPaymentBox = (ParameterRead('mode') == "checkpayment") ? true : false; if (!bAllowChanging) { bShowPaymentBox = false; } for (var p = 0; p < aoShopProducts.length; p++) { var nCount = ShopGetProdCount(aoShopProducts[p].m_strID); if (nCount != 0) { nItemCount++; } if (nItemCount > 0) { break; } } if (nItemCount == 0) { doc.write('
' + astrDict[nLan]["CARTEMPTY"] + '

'); } else { if (bAllowChanging) { doc.write('
'); } TableTop(); TableRowEx(1, 'th', astrDict[nLan]['POS'], astrDict[nLan]['PRODUCT'], astrDict[nLan]['QUANTITY'], astrDict[nLan][bAllowChanging ? 'PRICE' : 'NETPRICE'], ((!bAllowChanging) && ShopIsVatPlus(strCountry)) ? ((nLan == 1) ? 'Vat + Vat Handling' : 'Steuer + Steuerabwicklung') : astrDict[nLan][bAllowChanging ? 'SUBTOTAL' : 'VAT'], astrDict[nLan][bAllowChanging ? 'REMOVE' : 'FULLPRICE']); ShopShowCartTable(nLan, bAllowChanging, strCountry); TableBottom(); if (bAllowChanging) { doc.write('
'); } if (bAllowChanging) { CenterText(GetButtonCode(astrDict[nLan]["CHECKOUT"], 'ShopCheckout(' + nLan.toString() + ')')); doc.write('' + astrDict[nLan]["CONTINUESHOPPING"] + '

'); if (bShowPaymentBox) { // ShopShowPaymentBox(nLan); // no longer available } } } }