var bLocalTest = (document.URL.toString().substr(0, 4) == 'file'); var strRemoteCountryID = 'US'; 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 11: aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 11.0 Bronze", '17B0000001', 142, 'EUR' /* , aoShopShipping[5] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 11.0 Silver", '16B0000001', 439, 'EUR' /* , aoShopShipping[5] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 11.0 Gold", '01B0000001', 659, 'EUR' /* , aoShopShipping[5] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Gold -> 11.0 Gold", '01B001A001', 149, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 11 Silver -> 11.0 Gold", '01B016B001', 254, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-9 Gold / 7-10 Silver / Bronze -> 11.0 Gold", '01B017B001', 549, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Silver -> 11.0 Silver", '16B016A001', 99, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-9 Silver / Bronze -> 11.0 Silver", '16B017B001', 329, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Bronze -> 11.0 Bronze", '17B017A001', 49, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-9 Bronze -> 11.0 Bronze", '17B0179001', 119, 'EUR'); if (IsBefore(1, 2, 2026)) { // late bird V10: aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Gold -> 11.0 Gold", '01B001A901', 19, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Silver -> 11.0 Silver", '16B016A901', 19, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Bronze -> 11.0 Bronze", '17B017A901', 19, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 10 -> 11.0", '02B002A901', 19, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Gold -> 11.0 Gold", '01B001A902', 23, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Silver -> 11.0 Silver", '16B016A902', 23, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Bronze -> 11.0 Bronze", '17B017A902', 23, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 10 -> 11.0", '02B002A902', 23, 'USD'); } /* aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 11.0 Bronze", '17B0075B01', 99, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 11.0 Silver", '16B0075B01', 329, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 11.0 Gold", '01B0075B01', 499, 'EUR'); */ aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 11.0", '02B0000001', 76, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 7-10 -> 11.0", '02B002A001', 39, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+SmartHand Mobile", '11B0000001', 44, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Collection", '50B0000001', 44, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Hardware 11", '46B0000001', 54, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net Start Set", '08B0000001', 129, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net Extension", '08B008B001', 76, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net/D Start Set", '09B0000001', 164, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net/D Extension", '09B009B001', 99, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+4DSound", '10B0000001', 129, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Street", '13B0000001', 99, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("+Cargo", '15B0000001', 76, 'EUR'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 11.0 Bronze", '17B0000002', 169, 'USD' /* , aoShopShipping[6] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 11.0 Silver", '16B0000002', 519, 'USD' /* , aoShopShipping[6] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 11.0 Gold", '01B0000002', 769, 'USD' /* , aoShopShipping[6] */); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Gold -> 11.0 Gold", '01B001A002', 174, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 11 Silver -> 11.0 Gold", '01B016B002', 299, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-9 Gold / 7-10 Silver / Bronze -> 11.0 Gold", '01B017B002', 639, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Silver -> 11.0 Silver", '16B016A002', 119, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-9 Silver / Bronze -> 11.0 Silver", '16B017B002', 379, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 10 Bronze -> 11.0 Bronze", '17B017A002', 59, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainController 7-9 Bronze -> 11.0 Bronze", '17B0179002', 139, 'USD'); /* aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 11.0 Bronze", '17B0075B02', 129, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 11.0 Silver", '16B0075B02', 429, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("Rocomotion -> TrainController 11.0 Gold", '01B0075B02', 639, 'USD'); */ aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 11.0", '02B0000002', 99, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("TrainProgrammer 7-10 -> 11.0", '02B0029002', 44, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+SmartHand Mobile", '11B0000002', 44, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Collection", '50B0000002', 44, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Hardware 11", '46B0000002', 59, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net Start Set", '08B0000002', 164, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net Extension", '08B008B002', 99, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net/D Start Set", '09B0000002', 189, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Net/D Extension", '09B008B002', 109, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+4DSound", '10B0000002', 164, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Street", '13B0000002', 129, 'USD'); aoShopProducts[nShopProduct++] = new ShopProduct("+Cargo", '15B0000002', 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"] = ''; astrDict[2]["MSG_SHAREIT"] = ''; //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 ShopCorrectUpgradeProductID(strProductID) { if ((strProductID.substr(2, 2) == '70') || (strProductID.substr(2, 2) == '80') || (strProductID.substr(2, 2) == '90') || (strProductID.substr(2, 2) == 'A0')) { strProductID = strProductID.substr(0, 2) + 'B0' + strProductID.substr(4, 6); } if (!IsBefore(1, 2, 2026)) { // late bird V10 expired: if (strProductID.substr(6, 2) == 'A9') { strProductID = strProductID.substr(0, 6) + 'A0' + strProductID.substr(8, 2); } } // alert (strProductID); switch (strProductID) { case '01B001A901': // 10.9 Gold -> 11.0 Gold return '01B001A901'; case '01B001A001': // 10.0 Gold -> 11.0 Gold return '01B001A001'; case '01B016B001': // 11.0 Silver -> 11.0 Gold return '01B016B001'; case '01B0019001': // 9.0 Gold -> 11.0 Gold case '01B0018001': // 8.0 Gold -> 11.0 Gold case '01B0017001': // 7.0 Gold -> 11.0 Gold case '01B016A901': // 10.9 Silver -> 11.0 Gold case '01B016A001': // 10.0 Silver -> 11.0 Gold case '01B0169001': // 9.0 Silver -> 11.0 Gold case '01B0168901': // 8.0 Silver -> 11.0 Gold case '01B0167001': // 7.0 Silver -> 11.0 Gold case '01B017B001': // 11.0 Bronze -> 11.0 Gold case '01B017A901': // 10.9 Bronze -> 11.0 Gold case '01B017A001': // 10.0 Bronze -> 11.0 Gold case '01B0179001': // 9.0 Bronze -> 11.0 Gold case '01B0178001': // 8.0 Bronze -> 11.0 Gold case '01B0177001': // 7.0 Bronze -> 11.0 Gold return '01B017B001'; case '01B001A902': // 10.9 Gold -> 11.0 Gold return '01B001A902'; case '01B001A002': // 10.0 Gold -> 11.0 Gold return '01B001A002'; case '01B016B002': // 11.0 Silver -> 11.0 Gold return '01B016B002'; case '01B0019002': // 9.0 Gold -> 11.0 Gold case '01B0018002': // 8.0 Gold -> 11.0 Gold case '01B0017002': // 7.0 Gold -> 11.0 Gold case '01B016A902': // 10.9 Silver -> 11.0 Gold case '01B016A002': // 10.0 Silver -> 11.0 Gold case '01B0169002': // 9.0 Silver -> 11.0 Gold case '01B0168002': // 8.0 Silver -> 11.0 Gold case '01B0167002': // 7.0 Silver -> 11.0 Gold case '01B017B002': // 11.0 Bronze -> 11.0 Gold case '01B017A902': // 10.9 Bronze -> 11.0 Gold case '01B017A002': // 10.0 Bronze -> 11.0 Gold case '01B0179002': // 9.0 Bronze -> 11.0 Gold case '01B0178002': // 8.0 Bronze -> 11.0 Gold case '01B0177002': // 7.0 Bronze -> 11.0 Gold return '01B017B002'; case '16B016A901': // 10.9 Silver -> 11.0 Silver return '16B016A901'; case '16B016A001': // 10.0 Silver -> 11.0 Silver return '16B016A001'; case '16B0169001': // 9.0 Silver -> 11.0 Silver case '16B0168001': // 8.0 -> 11.0 Silver case '16B0167001': // 7.0 -> 11.0 Silver case '16B017B001': // 11.0 Bronze -> 11.0 Silver case '16B017A901': // 10.9 Bronze -> 11.0 Silver case '16B017A001': // 10.0 Bronze -> 11.0 Silver case '16B0179001': // 9.0 Bronze -> 11.0 Silver case '16B0178001': // 8.0 Bronze -> 11.0 Silver case '16B0177001': // 7.0 Bronze -> 11.0 Silver return '16B017B001'; case '16B016A902': // 10.9 Silver -> 11.0 Silver return '16B016A902'; case '16B016A002': // 10.0 Silver -> 11.0 Silver return '16B016A002'; case '16B0169002': // 9.0 Silver -> 11.0 Silver case '16B0168002': // 8.0 -> 11.0 Silver case '16B0167002': // 7.0 -> 11.0 Silver case '16B017B002': // 11.0 Bronze -> 11.0 Silver case '16B017A902': // 10.9 Bronze -> 11.0 Silver case '16B017A002': // 10.0 Bronze -> 11.0 Silver case '16B0179002': // 9.0 Bronze -> 11.0 Silver case '16B0178002': // 8.0 Bronze -> 11.0 Silver case '16B0177002': // 7.0 Bronze -> 11.0 Silver return '16B017B002'; case '17B017A901': // 10.9 Bronze -> 11.0 Bronze return '17B017A901'; case '17B017A001': // 10.0 Bronze -> 11.0 Bronze return '17B017A001'; case '17B0179001': // 9.0 Bronze -> 11.0 Bronze case '17B0178001': // 8.0 Bronze -> 11.0 Bronze case '17B0177001': // 7.0 Bronze -> 11.0 Bronze return '17B0179001'; case '17B017A902': // 10.9 Bronze -> 11.0 Bronze return '17B017A902'; case '17B017A002': // 10.0 Bronze -> 11.0 Bronze return '17B017A002'; case '17B0179002': // 9.0 Bronze -> 11.0 Bronze case '17B0178002': // 8.0 Bronze -> 11.0 Bronze case '17B0177002': // 7.0 Bronze -> 11.0 Bronze return '17B0179002'; case '02B002A901': // TP 10.9 -> TP 11.0 return '02B002A901'; case '02B002A001': // TP 10.0 -> TP 11.0 case '02B0029001': // TP 9.0 -> TP 11.0 case '02B0028001': // TP 8.0 -> TP 11.0 case '02B0027001': // TP 7.0 -> TP 11.0 return '02B002A001'; case '02B002A902': // TP 10.9 -> TP 11.0 return '02B002A902'; case '02B002A002': // TP 10.0 -> TP 11.0 case '02B0029002': // TP 9.0 -> TP 11.0 case '02B0028002': // TP 8.0 -> TP 11.0 case '02B0027002': // TP 7.0 -> TP 11.0 return '02B002A002'; } 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; const COUNTRYLOCK = { NONE: 0, DEALER: 1, LOCKED: 2, }; function ShopCountry(strEnglish, strGerman, strID, nVat, bMain, eLock) { 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; this.m_eLock = ((typeof eLock) != 'undefined') ? eLock : COUNTRYLOCK.NONE; } ShopCountry.prototype.GetVat = function() { return this.m_nVat / 100; } ShopCountry.prototype.IsEU = function() { return (this.m_nVat != 0); } ShopCountry.prototype.GetLock = function() { return this.m_eLock; } function ShopAddCountry(strEnglish, strGerman, strID, nVat, bMain, eLock) { aoCountry[aoCountry.length] = new ShopCountry(strEnglish, strGerman, strID, nVat, bMain, eLock); } function ShopInitCountries() { if ((typeof aoCountry) == 'undefined') { aoCountry = new Array(); ShopAddCountry('Afghanistan', 'Afghanistan', 'AF'); ShopAddCountry('Aland Islands', 'Aland-Inseln', 'AX'); ShopAddCountry('Albania', 'Albanien', 'AL'); ShopAddCountry('Algeria', 'Algerien', 'DZ'); ShopAddCountry('American Samoa', 'Amerikanisch-Samoa', 'AS', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('Andorra', 'Andorra', 'AD'); ShopAddCountry('Angola', 'Angola', 'AO'); ShopAddCountry('Anguilla', 'Anguilla', 'AI'); ShopAddCountry('Antarctica', 'Antarktis', 'AQ'); ShopAddCountry('Antigua and Barbuda', 'Antigua und Barbuda', 'AG'); ShopAddCountry('Argentina', 'Argentinien', 'AR'); ShopAddCountry('Armenia', 'Armenien', 'AM'); ShopAddCountry('Aruba', 'Aruba', 'AW'); ShopAddCountry('Australia', 'Australien', 'AU'); ShopAddCountry('Austria', 'Österreich', 'AT', 20, true); ShopAddCountry('Azerbaijan', 'Aserbaidschan', 'AZ'); ShopAddCountry('Bahamas', 'Bahamas', 'BS'); ShopAddCountry('Bahrain', 'Bahrain', 'BH'); ShopAddCountry('Bangladesh', 'Bangladesch', 'BD'); ShopAddCountry('Barbados', 'Barbados', 'BB'); // ShopAddCountry('Belarus', 'Weissrussland', 'BY'); ShopAddCountry('Belgium', 'Belgien', 'BE', 21); ShopAddCountry('Belize', 'Belize', 'BZ'); ShopAddCountry('Benin', 'Benin', 'BJ'); ShopAddCountry('Bermuda', 'Bermuda', 'BM'); ShopAddCountry('Bhutan', 'Bhutan', 'BT'); ShopAddCountry('Bolivia', 'Bolivien', 'BO'); ShopAddCountry('Bosnia and Herzegovina', 'Bosnien und Herzegowvina', 'BA'); ShopAddCountry('Botswana', 'Botswana', 'BW'); ShopAddCountry('Bouvet Island', 'Bouvet Inseln', 'BV'); ShopAddCountry('Brazil', 'Brasilien', 'BR'); // ShopAddCountry('British Indian Ocean Territory', 'Britisches Territorium im Indischen Ozean', 'IO'); ShopAddCountry('Brunei Darussalam', 'Brunei Darussalam', 'BN'); ShopAddCountry('Bulgaria', 'Bulgarien', 'BG', 20); ShopAddCountry('Burkina Faso', 'Burkina Faso', 'BF'); ShopAddCountry('Burundi', 'Burundi', 'BI'); ShopAddCountry('Cambodia', 'Kambodscha', 'KH'); ShopAddCountry('Cameroon', 'Kamerun', 'CM'); ShopAddCountry('Canada', 'Kanada', 'CA'); ShopAddCountry('Canary Islands', 'Kanarische Inseln', 'IC'); ShopAddCountry('Cape Verde', 'Kap Verde', 'CV'); ShopAddCountry('Cayman Islands', 'Kaimaninseln', 'KY'); ShopAddCountry('Central African Republic', 'Zentralafrikanische Republik', 'CF'); ShopAddCountry('Ceuta', 'Ceuta', 'EA'); ShopAddCountry('Chad', 'Tschad', 'TD'); ShopAddCountry('Chile', 'Chile', 'CL'); ShopAddCountry('China', 'China', 'CN'); ShopAddCountry('Christmas Island', 'Weihnachtsinsel', 'CX'); ShopAddCountry('Cocos (Keeling) Islands', 'Kokosinseln', 'CC'); ShopAddCountry('Colombia', 'Kolumbien', 'CO'); ShopAddCountry('Comoros', 'Komoren', 'KM'); ShopAddCountry('Congo, Dem. Republic', 'Kongo, Dem. Republik', 'CD'); ShopAddCountry('Congo, Republic', 'Kongo, Republik', 'CG'); ShopAddCountry('Cook Islands', 'Cookinseln', 'CK'); ShopAddCountry('Costa Rica', 'Costa Rica', 'CR'); ShopAddCountry('Cote d\'Ivoire', 'Elfenbeinküste', 'CI'); ShopAddCountry('Croatia', 'Kroatien', 'HR', 25); ShopAddCountry('Cyprus', 'Zypern', 'CY', 19); ShopAddCountry('Cyprus (unregulated area)', 'Zypern (unregulated area)', 'X1'); ShopAddCountry('Czech Republic', 'Tschechische Republik', 'CZ', 21); ShopAddCountry('Denmark', 'Dänemark', 'DK', 25); ShopAddCountry('Djibouti', 'Dschibuti', 'DJ'); ShopAddCountry('Dominica', 'Dominika', 'DM'); ShopAddCountry('Dominican Republic', 'Dominikanische Republik', 'DO'); ShopAddCountry('East-Timor', 'Osttimor', 'TL'); ShopAddCountry('Ecuador', 'Ecuador', 'EC'); ShopAddCountry('Egypt', 'Ägypten', 'EG'); ShopAddCountry('El Salvador', 'El Salvador', 'SV'); ShopAddCountry('Equatorial Guinea', 'Äquatorial-Guinea', 'XX'); ShopAddCountry('Eritrea', 'Eritrea', 'ER'); if (IsBetween(1, 1, 2025, 1, 7, 2025)) { } else { ShopAddCountry('Estonia', 'Estland', 'EE', 24); } ShopAddCountry('Ethiopia', 'Äthiopien', 'ET'); // ShopAddCountry('Falkland Islands', 'Falklandinseln', 'FK'); ShopAddCountry('Faroe Islands', 'Färöer', 'FO'); ShopAddCountry('Fiji', 'Fidschi', 'FJ'); ShopAddCountry('Finland', 'Finnland', 'FI', 25.5); ShopAddCountry('France', 'Frankreich', 'FR', 20, true); ShopAddCountry('French Guiana', 'Französisch Guyana', 'GF'); ShopAddCountry('French Polynesia', 'Französisch Polynesien', 'PF'); ShopAddCountry('French Southern Territories', 'Französische Süd- und Antarktisgebiete', 'TF'); ShopAddCountry('Gabon', 'Gabun', 'GA'); ShopAddCountry('Gambia', 'Gambia', 'GM'); ShopAddCountry('Georgia', 'Georgien', 'GE'); ShopAddCountry('Germany', 'Deutschland', 'DE', IsBetween(1, 7, 2020, 31, 12, 2020) ? 16 : 19, true); ShopAddCountry('Ghana', 'Ghana', 'GH'); // ShopAddCountry('Gibraltar', 'Gibraltar', 'GI'); ShopAddCountry('Greece', 'Griechenland', 'GR', 24); ShopAddCountry('Greenland', 'Grönland', 'GL'); ShopAddCountry('Grenada', 'Grenada', 'GD'); ShopAddCountry('Guadeloupe', 'Guadaloupe', 'GP'); ShopAddCountry('Guam', 'Guam', 'GU', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('Guatemala', 'Guatemala', 'GT'); // ShopAddCountry('Guernsey', 'Guernsey', 'GG'); ShopAddCountry('Guinea', 'Guinea', 'GN'); ShopAddCountry('Guinea-Bissau', 'Guinea-Bissau', 'GW'); ShopAddCountry('Guyana', 'Guyana', 'GY'); ShopAddCountry('Haiti', 'Haiti', 'HT'); ShopAddCountry('Heard Island and McDonald Islands', 'Heard- und McDonald-Inseln', 'HM'); ShopAddCountry('Honduras', 'Honduras', 'HN'); ShopAddCountry('Hong Kong', 'Hongkong', 'HK'); ShopAddCountry('Hungary', 'Ungarn', 'HU', 27); ShopAddCountry('Iceland', 'Island', 'IS'); ShopAddCountry('India', 'Indien', 'IN'); ShopAddCountry('Indonesia', 'Indonesien', 'ID'); ShopAddCountry('Iraq', 'Irak', 'IQ'); ShopAddCountry('Ireland', 'Irland', 'IE', 23); // ShopAddCountry('Isle Of Man', 'Insel Man', 'IM'); ShopAddCountry('Israel', 'Israel', 'IL'); ShopAddCountry('Italy', 'Italien', 'IT', 22); ShopAddCountry('Jamaica', 'Jamaika', 'JM'); ShopAddCountry('Japan', 'Japan', 'JP'); // ShopAddCountry('Jersey', 'Jersey', 'JE'); ShopAddCountry('Jordan', 'Jordanien', 'JO'); ShopAddCountry('Kazakhstan', 'Kasachstan', 'KZ'); ShopAddCountry('Kenya', 'Kenia', 'KE'); ShopAddCountry('Kiribati', 'Kiribati', 'KI'); ShopAddCountry('Korea, South', 'Südkorea', 'KR'); ShopAddCountry('Kuwait', 'Kuwait', 'KW'); ShopAddCountry('Kyrgyzstan', 'Kirgisistan', 'KG'); ShopAddCountry('Laos', 'Laos', 'LA'); ShopAddCountry('Latvia', 'Lettland', 'LV', 21); ShopAddCountry('Lebanon', 'Libanon', 'LB'); ShopAddCountry('Lesotho', 'Lesotho', 'LS'); ShopAddCountry('Liberia', 'Liberia', 'LR'); ShopAddCountry('Liechtenstein', 'Liechtenstein', 'LI'); ShopAddCountry('Lithuania', 'Litauen', 'LT', 21); ShopAddCountry('Luxembourg', 'Luxemburg', 'LU', 17); ShopAddCountry('Macau', 'Macao', 'MO'); ShopAddCountry('Macedonia (Former Yugoslav Republic)', 'Mazedonien, ehem. jugoslawische Republik', 'MK'); ShopAddCountry('Madagascar', 'Madagaskar', 'MG'); ShopAddCountry('Malawi', 'Malawi', 'MW'); ShopAddCountry('Malaysia', 'Malaysia', 'MY'); ShopAddCountry('Maldives', 'Malediven', 'MV'); ShopAddCountry('Mali', 'Mali', 'ML'); ShopAddCountry('Malta', 'Malta', 'MT', 18); ShopAddCountry('Marshall Islands', 'Marshallinseln', 'MH', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('Martinique', 'Martinique', 'MQ'); ShopAddCountry('Mauritania', 'Mauretanien', 'MR'); ShopAddCountry('Mauritius', 'Mauritius', 'MU'); ShopAddCountry('Mayotte', 'Mayotte', 'YT'); ShopAddCountry('Mexico', 'Mexiko', 'MX'); // ShopAddCountry('Micronesia', 'Mikronesien', 'FM'); ShopAddCountry('Moldova', 'Moldavien', 'MD'); // ShopAddCountry('Monaco', 'Monaco', 'MC'); ShopAddCountry('Mongolia', 'Mongolei', 'MN'); ShopAddCountry('Montserrat', 'Montserrat', 'MS'); ShopAddCountry('Morocco', 'Marokko', 'MA'); ShopAddCountry('Mozambique', 'Mozambique', 'MZ'); ShopAddCountry('Myanmar', 'Myanmar', 'MM'); ShopAddCountry('Namibia', 'Namibia', 'NA'); ShopAddCountry('Nauru', 'Nauru', 'NR'); ShopAddCountry('Nepal', 'Nepal', 'NP'); ShopAddCountry('Netherlands', 'Niederlande', 'NL', 21, true); ShopAddCountry('Netherlands Antilles', 'Niderländische Antillen', 'AN'); ShopAddCountry('New Caledonia', 'Neukaledonien', 'NC'); ShopAddCountry('New Zealand', 'Neuseeland', 'NZ'); ShopAddCountry('Nicaragua', 'Nicaragua', 'NI'); ShopAddCountry('Niger', 'Niger', 'NE'); ShopAddCountry('Nigeria', 'Nigeria', 'NG'); ShopAddCountry('Niue', 'Niue', 'NU'); ShopAddCountry('Norfolk Island', 'Norfolkinsel', 'NF'); ShopAddCountry('Northern Mariana Islands', 'Nördliche Marianen', 'MP', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('Norway', 'Norwegen', 'NO'); ShopAddCountry('Oman', 'Oman', 'OM'); ShopAddCountry('Pakistan', 'Pakistan', 'PK'); ShopAddCountry('Palau', 'Palau', 'PW', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('Palestinian Territory', 'Palästinensische Autonomiegebiete', 'PS'); ShopAddCountry('Panama', 'Panama', 'PA'); ShopAddCountry('Papua New Guinea', 'Papua-Neuguinea', 'PG'); ShopAddCountry('Paraguay', 'Paraguay', 'PY'); ShopAddCountry('Peru', 'Peru', 'PE'); ShopAddCountry('Philippines', 'Philippinen', 'PH'); ShopAddCountry('Pitcairn Islands', 'Pitcairninseln', 'PN'); ShopAddCountry('Poland', 'Polen', 'PL', 23); ShopAddCountry('Portugal', 'Portugal', 'PT', 23); ShopAddCountry('Puerto Rico', 'Puerto Rico', 'PR', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('Qatar', 'Katar', 'QA'); ShopAddCountry('Reunion', 'Reunion', 'RE'); ShopAddCountry('Romania', 'Rumänien', 'RO', 24); // ShopAddCountry('Russia', 'Russland', 'RU'); ShopAddCountry('Rwanda', 'Ruanda', 'RW'); // ShopAddCountry('Samoa', 'Samoa', 'WS'); ShopAddCountry('San Marino', 'San Marino', 'SM'); ShopAddCountry('Sao Tome and Principe', 'Sao Tome und Principe', 'ST'); ShopAddCountry('Saudi Arabia', 'Saudi Arabien', 'SA'); ShopAddCountry('Senegal', 'Senegal', 'SN'); ShopAddCountry('Serbia and Montenegro', 'Serbien und Montenegro', 'RS'); ShopAddCountry('Seychelles', 'Seychellen', 'SC'); ShopAddCountry('Sierra Leone', 'Sierra Leone', 'SL'); ShopAddCountry('Singapore', 'Singapur', 'SG'); ShopAddCountry('Slovakia', 'Slowakei', 'SK', 20); ShopAddCountry('Slovenia', 'Slowenien', 'SI', 22); ShopAddCountry('Solomon Islands', 'Salomoninseln', 'SB'); ShopAddCountry('Somalia', 'Somalia', 'SO'); ShopAddCountry('South Africa', 'Südafrika', 'ZA'); ShopAddCountry('South Georgia and Sandwich Islands', 'Südgeorgien und die Südlichen Sandwichinseln', 'GS'); ShopAddCountry('Spain', 'Spanien', 'ES', 21); ShopAddCountry('Sri Lanka', 'Sri Lanka', 'LK'); ShopAddCountry('St. Helena', 'St. Helena', 'SH'); ShopAddCountry('St. Kitts and Nevis', 'St. Kitts und Nevis', 'KN'); ShopAddCountry('St. Lucia', 'St. Lucia', 'LC'); ShopAddCountry('St. Pierre and Miquelon', 'St. Pierre und Miquelon', 'PM'); ShopAddCountry('St. Vincent and the Grenadines', 'St. Vincent und die Grenadinen', 'VC'); ShopAddCountry('Suriname', 'Surinam', 'SR'); ShopAddCountry('Svalbard', 'Svalbard', 'SJ'); ShopAddCountry('Swaziland', 'Swasiland', 'SZ'); ShopAddCountry('Sweden', 'Schweden', 'SE', 25); ShopAddCountry('Switzerland', 'Schweiz', 'CH', 0, true, COUNTRYLOCK.DEALER); ShopAddCountry('Taiwan', 'Taiwan', 'TW'); ShopAddCountry('Tajikistan', 'Tadschikistan', 'TJ'); ShopAddCountry('Tanzania', 'Tansania', 'TZ'); ShopAddCountry('Thailand', 'Thailand', 'TH'); ShopAddCountry('Togo', 'Togo', 'TG'); ShopAddCountry('Tokelau', 'Tokelau', 'TK'); ShopAddCountry('Tonga', 'Tonga', 'TO'); ShopAddCountry('Trinidad and Tobago', 'Trinidad und Tobago', 'TT'); ShopAddCountry('Tunisia', 'Tunesien', 'TN'); ShopAddCountry('Turkey', 'Türkei', 'TR'); ShopAddCountry('Turkmenistan', 'Turkmenistan', 'TM'); ShopAddCountry('Turks and Caicos Islands', 'Turks- und Caicosinseln', 'TC'); ShopAddCountry('Tuvalu', 'Tuvalu', 'TV'); ShopAddCountry('Uganda', 'Uganda', 'UG'); ShopAddCountry('Ukraine', 'Ukraine', 'UA', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('United Arab Emirates', 'Vereinigte Arabische Emirate', 'AE'); ShopAddCountry('United Kingdom', 'Großbritannien', 'GB', 0, false, COUNTRYLOCK.DEALER); ShopAddCountry('Uruguay', 'Uruguay', 'UY'); ShopAddCountry('USA', 'USA', 'US', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('US Minor Outlying Islands', 'US Minor Outlying Islands', 'UM', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('Uzbekistan', 'Usbekistan', 'UZ'); ShopAddCountry('Vanuatu', 'Vanuatu', 'VU'); ShopAddCountry('Vatican City State', 'Vatikan', 'VA'); ShopAddCountry('Venezuela', 'Venezuela', 'VE'); ShopAddCountry('Viet Nam', 'Vietnam', 'VN'); ShopAddCountry('Virgin Islands (British)', 'Britische Jungferninseln', 'VG'); ShopAddCountry('Virgin Islands (U.S.)', 'Amerikanische Jungferninseln', 'VI', 0, false, COUNTRYLOCK.LOCKED); ShopAddCountry('Wallis und Futuna', 'Wallis and Futuna', 'WF'); ShopAddCountry('Western Sahara', 'Westsahara', 'EH'); ShopAddCountry('Yemen', 'Jemen', 'YE'); ShopAddCountry('Zambia', 'Sambia', 'ZM'); ShopAddCountry('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, strProdEUR, strProdUSD) { 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, strProdEUR, strProdUSD) { document.write(''); } else { document.write('––> Please choose your country'); } ShopInitCountries(); aoCountry = ShopSortCountries(aoCountry, nLan); var bSelected = false; var oRemoteCountry = ShopFindCountry(strRemoteCountryID); if (oRemoteCountry.GetLock() == COUNTRYLOCK.NONE) { 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++) { if (oRemoteCountry.GetLock() != COUNTRYLOCK.NONE) { if (aoCountry[c].m_strID != oRemoteCountry.m_strID) { continue; } } if (((typeof strProdEUR) != 'undefined') || ((typeof strProdUSD) != 'undefined')) { if (!ShopIsProductAvailable(nLan, strProdEUR, strProdUSD, 0, aoCountry[c].m_strID)) { continue; } } 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; { return 15; } else if (strID == 'GB') // 15% surcharge for VAT handling in GB { return 15; } else if (strID == 'RU') { return 10; // 10% surcharge for handling via ShareIt } else if (strID == 'UA') { return 0; // no surcharge for handling via ShareIt } else { return 2; // 2% surcharge for VAT handling like the EU } return 0; } function ShopIsEU(strID) { if (strID == '') { return false; } ShopInitCountries(); var oCountry = ShopFindCountry(strID); return oCountry.IsEU(); } function ShopIsEURO(strID) { return true; 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 ShopIsProductAvailable(nLan, strProdEUR, strProdUSD, nUpgrade, strCountryID) { if ((typeof strCountryID) == 'undefined') { strCountryID = InputRead("SHOP_COUNTRY"); } if ((typeof strCountryID) == 'undefined') { strCountryID = ''; } if (strCountryID == '') { return false; } if (((typeof strProdUSD) == 'undefined') || (strProdUSD == '')) { strProdUSD = strProdEUR.substr(0, strProdEUR.length - 1) + '2'; } var bEuro = ShopIsEURO(strCountryID); var strProduct = bEuro ? strProdEUR : strProdUSD; if ((typeof nUpgrade) == 'undefined') { nUpgrade = 0; } /* switch (strProduct.substr(0, 2)) { case '01': // TrainController Gold case '16': // TrainController Silver case '17': // TrainController Bronze { switch (strCountryID) { case 'GB': { if (nUpgrade == 0) { return false; } break; } } break; } } */ return true; } 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 ShopOnDisplayCountrySelect(nLan, strCountryID, strUpgradeCode) { if ((typeof strCountryID) == 'undefined') { strCountryID = ''; } if ((InputRead('DEALER_ORDER') != '1') && (strCountryID != "")) { var oCountry = ShopFindCountry(strCountryID); switch (oCountry.GetLock()) { case COUNTRYLOCK.DEALER: { var strMessage = (nLan == 1) ? 'For the time being, no orders are possible in our shop for your country.' + '

Please contact one of our dealers.' : 'Bis auf weiteres sind keine Bestellungen in unserem Shop für Ihr Land möglich.' + '

Bitte wenden Sie sich an einen unserer Händler.'; if ((typeof strUpgradeCode) == 'undefined') { strUpgradeCode = ''; } if (strUpgradeCode != '') { strMessage += '

'; strMessage += (nLan == 1) ? 'If asked for an upgrade code,
use the following code:' : 'Wenn nach einem Upgrade-Code gefragt wird,
so geben Sie folgenden Code an:'; strMessage += '

' + strUpgradeCode + '

'; strMessage += (nLan == 1) ? '(Please note this code.)' : '(Bitte notieren Sie sich diesen Code.)'; var strForm = '

' + '' + '' + '
'; strMessage += strForm; } var strOK = (nLan == 1) ? 'Go to dealer list' : 'Zur Händlerliste'; var strCancel = (nLan == 1) ? 'Cancel' : 'Abbrechen'; ConfirmEx(strMessage, '', strOK, strCancel, function(done) { if ((typeof document.forms["COPY"]) != 'undefined') { if (document.forms["COPY"].COPYCHECK.checked) { navigator.clipboard.writeText(document.forms["COPY"].COPYTEXT.value); } } if (!done) { SessionWrite('SHOP_COUNTRY', ''); location.reload(); return false; } else { SessionWrite('SHOP_COUNTRY', ''); location.href = 'dealerlist.htm'; return false; /* var wndForum = window.open('dealerlist.htm'); wndForum.focus(); return true; */ } } ); strCountryID = ''; break; } case COUNTRYLOCK.LOCKED: { var strMessage = (nLan == 1) ? 'For the time being, no orders are possible in our shop for your country.' : 'Bis auf weiteres sind keine Bestellungen in unserem Shop für Ihr Land möglich.' ; var strOK = 'OK'; AlertEx(strMessage, function(done) { SessionWrite('SHOP_COUNTRY', ''); location.reload(); return false; } ); strCountryID = ''; break; } default: { break; } } } SessionWrite('SHOP_COUNTRY', strCountryID); } function ShopOnDisplayProductSelect(nLan, strFormName) { ShopOnDisplayCountrySelect(nLan, 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.substr(2, 1) == 'A')) { strProdEUR = strProdEUR.substr(0, 2) + 'B' + strProdEUR.substr(3); } if ((strProdUSD.substr(2, 1) == '9') || (strProdUSD.substr(2, 1) == 'A')) { strProdUSD = strProdUSD.substr(0, 2) + 'B' + 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', strProdEUR, strProdUSD); 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 } } } }