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 ShopIsClosedFinally(nLan)
{
if (g_bClosureShop)
{
document.addEventListener('DOMContentLoaded', function()
{
if (nLan == 1)
{
AlertEx('Our Shop is closed.
More information is provided here.', function(done)
{
LocationReplace(g_strShopUrl + '/pages/index.html');
}
);
}
else
{
AlertEx('Unser Shop ist geschlossen.
Weitere Informationen finden Sie hier.', function(done)
{
LocationReplace(g_strShopUrl + '/seiten/index.html');
}
);
}
});
return true;
}
return false;
}
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('