function SMShop_noDataAvailable(args){
var $SMS = args[0], _id = $SMS.id, _xml = null;
// no data available during init
_xml = SMSession.getSession(_id);
if(_xml==null) _xml = SMSession.xml.createNode(_id);
if(_xml!=null) $SMS.xml = _xml;
};
function SMBasket_noDataAvailable(args){
var $SMB = args[0], $SMS = $SMB.parent,
_doc = $SMS.xml.ownerDocument, _id = $SMB.id, _xml = null;
// no data available during init
_xml = $SMS.xml.appendChild(_doc.createNode(_id));
if(_xml!=null) $SMB.xml = _xml;
};
function SMShipMethodInfo_noDataAvailable(args){
var _SMShipMethodInfo = args[0], $SMB = _SMShipMethodInfo.parent,
_doc = $SMB.xml.ownerDocument, _id = _SMShipMethodInfo.id, _xml = null;
// no data available during init
_xml = $SMB.xml.appendChild(_doc.createNode(_id));
if(_xml!=null) _SMShipMethodInfo.xml = _xml;
};
function SMPayMethodInfo_noDataAvailable(args){
var _SMPayMethodInfo = args[0], $SMB = _SMPayMethodInfo.parent,
_doc = $SMB.xml.ownerDocument, _id = _SMPayMethodInfo.id, _xml = null;
// no data available during init
_xml = $SMB.xml.appendChild(_doc.createNode(_id));
if(_xml!=null) _SMPayMethodInfo.xml = _xml;
};
function SMGDiscounts_noDataAvailable(args){
var _SMGDiscounts = args[0], $SMB = _SMGDiscounts.parent,
_doc = $SMB.xml.ownerDocument, _id = _SMGDiscounts.id, _xml = null;
// no data available during init
_xml = $SMB.xml.appendChild(_doc.createNode(_id));
if(_xml!=null) _SMGDiscounts.xml = _xml;
};
function SMProduct_noDataAvailable(args){
var $SMP = args[0], $SMS = $SMP.shop, _id = $SMP.id, _xml = null;
// no data available during init
_xml = $SMS.xml.ownerDocument.createNode(_id);
if(_xml!=null){
$SMP.xml = _xml;
};
};
function SMDiscounts_noDataAvailable(args){
var _SMDiscounts = args[0], $SMP = _SMDiscounts.parent,
_doc = $SMP.xml.ownerDocument, _id = _SMDiscounts.id, _xml = null;
// no data available during init
_xml = $SMP.xml.appendChild(_doc.createNode(_id));
if(_xml!=null) _SMDiscounts.xml = _xml;
};
function SMVariants_noDataAvailable(args){
var _SMVariants = args[0], $SMP = _SMVariants.parent,
_doc = $SMP.xml.ownerDocument, _id = _SMVariants.id, _xml = null;
// no data available during init
_xml = $SMP.xml.appendChild(_doc.createNode(_id));
if(_xml!=null) _SMVariants.xml = _xml;
};
function SMShop_onAfterUpdate(args){
var $SMS = args[0], _id = $SMS.id, _xml = $SMS.xml;
// after shop update update and save session object
SMSession.setSession(_id, "xmlnode", _xml);
SMSession.save();
};
function SMBasket_onBeforeReset(args){
// before resetting basket confirm
return(confirm("Are you sure you want to delete your cart?"));
};
function SMBasket_onAfterReset(args){
// after resetting basket reload
location.replace(location.href);
};
function SMBasket_onBeforeAdd(args){
var $SMB = args[0], $SMP = args[1], $SMS = $SMB.parent, _frm = null,
_elem = null, _params = new Array(), _msg = "";
// before adding a product, check whether another order
// has been completed earlier
if($SMS.getAttribute(_SMAOComplete)=="true"){
$SMS.reinitOrder();
};
return(true);
};
function SMProduct_onBeforeUpdate(args){
var $SMP = args[0], _index = 0, _frm = _elem = _params = null;
_frm = document.forms["PD" + $SMP.getAttribute(_SMAUniqueID) + "variants"];
if(_frm!=null&&($SMP.variants.xml.childNodes.length()==0||$SMP.getAttribute("s-var")=="1")){
_params = new Array();
for(var i=0; i<_frm.elements.length; i++){
_index = _frm.elements[i].selectedIndex;
if(_index<0) _index = 0;
_elem = _frm.elements[i].options[_index];
_params[_params.length] = _elem.text;
_params[_params.length] = _elem.value;
};
$SMP.variants.newSimpleVariant.apply($SMP.variants, _params);
};
return(true);
};
function SMProduct_onAfterUpdate(args){
var $SMP = args[0], $min = $max = $amnt = 0, $update = false;
$min = parseInt($SMP.getAttribute(_SMAMinAmount));
$max = parseInt($SMP.getAttribute(_SMAMaxAmount));
$amnt = parseFloat($SMP.getAttribute(_SMAAmount));
if($amnt < $min){
$amnt = $min; $update = true;
} else if($max > 0 && $amnt > $max){
$amnt = $max; $update = true;
};
if($update){
$SMP.setAttribute(_SMAAmount, $amnt);
$SMP.update();
};
};
function SMBasket_onAfterAdd(args){
var $SMB = args[0], $SMP = args[1];
alert("The item has been added to your cart!".replace(" ", " "));
};
function SMBasket_onItemExists(args){
var $SMB = args[0], _SMNewProduct = args[1], _SMExistingProduct = args[2];
// item exists in basket, return action flag
// * _eSMReplace : replace existing item
// * _eSMAdd : add to basket
// * _eSMCancel : cancel action
return(_eSMAdd);
};
function SMBasket_onBeforeRemove(args){
var $SMB = args[0], $SMP = args[1], $msg = "Are you sure that you want to remove item '%d'with the item number '%n' from your cart?";
// before removing a product confirm
$msg = $msg.replace("%d", $SMP.name);
$msg = $msg.replace("%n", $SMP.getAttribute(_SMACode));
return(confirm($msg));
};
function SMBasket_onAfterRemove(args){
// reload page after deleting a product;
location.replace("cart.html");
};
function SMShipMethodInfo_onAfterUpdate(args){
// update SMShop after recalculating the shipment costs
SMShop.update();
};
function SMPayMethodInfo_onAfterUpdate(args){
// update SMShop after recalculating the payment costs
SMShop.update();
};
function SMShop_variantSelectionChanged(args){
var $SMP = args[0], _form = args[1], _varset = _vartext = "", _index = 0, _elem = null;
_elem = document.getElementById("variant_not_found");
if(_elem!=null) _elem.style.display = "none";
// update product variant properties after changes occured in
// the variants html form
if($SMP.variants.xml.childNodes.length()!=0){
for(var i=0; i<_form.elements.length; i++){
_elem = _form.elements[i];
_index = _elem.options.selectedIndex;
if(_index<0) _index = 0;
if(_varset!="") _varset += ";";
if(_vartext!="") _vartext += ",";
_varset += _elem.options[_index].value;
_vartext += (_elem.options[_index].text).replace(/,/g, ",");
};
$SMP.variants.activateByValues(_varset, _vartext);
$SMP.update();
displayProductProperties($SMP);
};
};
function SMShop_onBasketGUIElemChanged(args){
var $SMS = args[0], _elem = args[1], index = args[2], _form = null, _name = "", $SMP = null, _uniqueID = "", _variantID = "";
// update product amount after changes occured in the
// basket graphical user interface
if(_elem!=null){
_name = _elem.id.replace("PD", "");
_name = _name.replace("Amount", "");
if(_name.indexOf("-")){
_uniqueID = _name.split("-")[0];
_variantID = _name.split("-")[1];
}
else _uniqueID = _name;
if(index>=0){
$SMP = $SMS.basket.getProductByIndex(index);
}
else if(_variantID!=""){
$SMP = $SMS.basket.getProductById(_uniqueID, _variantID);
}
else $SMP = $SMS.basket.getProductById(_uniqueID);
if($SMP!=null){
$SMP.setAttribute(_SMAAmount, _elem.value);
$SMP.update();
$SMS.basket.update();
};
};
};
function SMVariants_onAfterActivate(args){
var _SMVariants = args[0];
// update form controls, if any
_SMVariants.refreshFormControls();
};
/* sm:broker-ssl begin-edit */
var useSSLForCheckout = false;
var sharedSSLURL = "";
/* sm:broker-ssl end-edit */
var sPHPSessionUrl = "";
sPHPSessionUrl = (sharedSSLURL==""?SMOMAbsoluteRootURL + "/phpsession.php":"");
var SMFirstInit = false;
var SMSession = new SXMLSessionManager(sPHPSessionUrl);
SMFirstInit = SMSession.init("U136GHL5A9");
var SMShop = new cSMShop("SMShop");SMShop.init();
// 5.5.7 Surcharge Calculator Options
SMShop.calculateSurchargePerAmount = 0; // (0,1)
//
with(SMShop){
// set basic data
setAttribute(_SMAInGross, 1); // Gross Prices Entered (0,1)
setAttribute(_SMAOutGross, 1); // Display Gross Prices (0,1)
setAttribute(_SMARoundTo, 0); // Round Final Amount (100,50,10,5,0)
setAttribute(_SMAMinAmount, 0);
regions[0] = new Array(0, "DE", "Deutschland", 19, 7, 0, 0, true, false, 0, "^DE[ ]{0,1}[0-9]{9}$");
regions[1] = new Array(1, "AT", "Österreich", 20, 10, 0, 0, false, false, 2, "^AT[ ]{0,1}U[0-9]{8}$");
regions[2] = new Array(2, "CH", "Schweiz", 7.6, 2, 0, 0, false, false, 0, "");
regions[3] = new Array(3, "BE", "Belgium", 21, 12, 0, 0, false, false, 2, "^BE[ ]{0,1}[0-9]{9}$");
regions[4] = new Array(4, "BA", "Bosnia and Herzegovina", 0, 0, 0, 0, false, false, 0, "");
regions[5] = new Array(5, "BG", "Bulgaria", 20, 0, 0, 0, false, false, 2, "^BG[ ]{0,1}([0-9]{9}|[0-9]{10})$");
regions[6] = new Array(6, "HR", "Croatia", 0, 0, 0, 0, false, false, 0, "");
regions[7] = new Array(7, "CZ", "Czech Republic", 19, 5, 0, 0, false, false, 2, "^CZ[ ]{0,1}([0-9]{8}|[0-9]{9})|[0-9]{10})$");
regions[8] = new Array(8, "DK", "Denmark", 25, 0, 0, 0, false, false, 2, "^DK[ ]{0,1}[0-9]{8}$");
regions[9] = new Array(9, "EE", "Estonia", 18, 1, 3, 5, false, false, 2, "^EE[ ]{0,1}[0-9]{9}$");
regions[10] = new Array(10, "FI", "Finland", 22, 17, 0, 0, false, false, 2, "^FI[ ]{0,1}[0-9]{8}$");
regions[11] = new Array(11, "FR", "France", 19.6, 5.5, 0, 0, false, false, 2, "^FR[ ]{0,1}[a-zA-Z0-9]{2}[0-9]{9}$");
regions[12] = new Array(12, "EL", "Greece", 18, 8, 0, 0, false, false, 2, "^EL[ ]{0,1}[0-9]{9}$");
regions[13] = new Array(13, "HU", "Hungary", 25, 12, 0, 0, false, false, 2, "^HU[ ]{0,1}[0-9]{8}$");
regions[14] = new Array(14, "IT", "Italy", 20, 9, 0, 0, false, false, 2, "^IT[ ]{0,1}[0-9]{11}$");
regions[15] = new Array(15, "LI", "Liechtenstein", 0, 0, 0, 0, false, false, 0, "");
regions[16] = new Array(16, "LU", "Luxembourg", 15, 6, 0, 0, false, false, 2, "^LU[ ]{0,1}[0-9]{8}$");
regions[17] = new Array(17, "MC", "Monaco", 0, 0, 0, 0, false, false, 0, "");
regions[18] = new Array(18, "NL", "Netherlands", 19, 6, 0, 0, false, false, 2, "^NL[ ]{0,1}[0-9]{9}B[0-9]{2}$");
regions[19] = new Array(19, "NO", "Norway", 24, 0, 0, 0, false, false, 0, "");
regions[20] = new Array(20, "PL", "Poland", 22, 7, 0, 0, false, false, 2, "^PL[ ]{0,1}[0-9]{10}$");
regions[21] = new Array(21, "PT", "Portugal", 19, 4, 5, 0, false, false, 2, "^PT[ ]{0,1}[0-9]{9}$");
regions[22] = new Array(22, "RO", "Romania", 19, 0, 0, 0, false, false, 2, "^RO[ ]{0,1}[0-9]{10}$");
regions[23] = new Array(23, "CS", "Serbia and Montenegro", 0, 0, 0, 0, false, false, 0, "");
regions[24] = new Array(24, "SK", "Slovakia", 19, 10, 0, 0, false, false, 2, "^SK[ ]{0,1}[0-9]{10}$");
regions[25] = new Array(25, "SI", "Slovenia", 20, 8.5, 0, 0, false, false, 2, "^SI[ ]{0,1}[0-9]{8}$");
regions[26] = new Array(26, "ES", "Spain", 16, 7, 0, 0, false, false, 2, "^ES[ ]{0,1}[a-zA-Z0-9][0-9]{7}[a-zA-Z0-9]$");
regions[27] = new Array(27, "SE", "Sweden", 25, 12, 0, 0, false, false, 2, "^SE[ ]{0,1}[0-9]{10}01$");
regions[28] = new Array(28, "GB", "United Kingdom", 17.5, 1, 3, 5, false, false, 2, "^GB[ ]{0,1}([0-9]{9}|[0-9]{12})$");
};
// executed on first session init only
if(SMFirstInit){
var SMReferrer = SMSession.xml.documentElement.getAttribute("referrer");
var SMQuery = SMSession.xml.documentElement.getAttribute("query");
SMShop.setAttribute("id", SMSession.xml.documentElement.getAttribute("id"));
SMShop.setAttribute("finit", "1");
SMShop.setAttribute("session-marker", "knVONzzZrP760ndFxe3CN4syvriXzF2QErzfHmQqO7DBpQ==");
SMShop.setAttribute("build", "5.6.2");
SMShop.setAttribute("sarurl", SMOMAbsoluteRootURL);
if(SMReferrer!="") SMShop.setAttribute("referrer", SX_uEsc(SMReferrer));
if(SMQuery!="") SMShop.setAttribute("query", SX_uEsc(SMQuery));
SMShop.setAttribute("sid", fnSMRandStr(10));
SMShop.setAttribute("finit", "0");
};
var SMProviderAddresses = new SXMLDom();with(SMProviderAddresses){documentElement = createNode("SMEmailService");with(documentElement){setAttribute("selfSender", "0");setAttribute("dateFormat", "d.m.Y H:i:s");setAttribute("remoteInfos", "1");setAttribute("referrer", SX_uEsc(SMSession.xml.documentElement.getAttribute("referrer")));setAttribute("adjustServerDate", "0");setAttribute("attachXml", "0");setAttribute("attachSmo", "0");setAttribute("attachOpenTrans", "0");setAttribute("attachLexware", "0");setAttribute("saveOrder", "1");setAttribute("smoEnabled", "0");setAttribute("smoHtmlCopy", "0");with(appendChild(ownerDocument.createNode("SMEmail"))){setAttribute("scope", "order");setAttribute("sender-name", "Versandhandel Bigo-Ta");text = "shopbestellung_SM|AT_VHB24.de";};with(appendChild(ownerDocument.createNode("SMEmail"))){setAttribute("scope", "contact");setAttribute("sender-name", "Versandhandel Bigo-Ta");text = "kontakt_SM|AT_vhb24.de";};};};
var SMColors = new SXMLDom();with(SMColors){documentElement = createNode("SMColors");with(documentElement){with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "main");setAttribute("value", "#9C111E");};with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "main.light");setAttribute("value", "#FFFFFF");};with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "main.dark");setAttribute("value", "#9C111E");};with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "alt");setAttribute("value", "#C0C0C0");};with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "alt.light");setAttribute("value", "#E0E0E0");};with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "alt.dark");setAttribute("value", "#000000");};with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "background");setAttribute("value", "#F4F4F4");};with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "foreground");setAttribute("value", "#000000");};with(appendChild(ownerDocument.createNode("SMColor"))){setAttribute("key", "hyperlink");setAttribute("value", "#002D95");};};};
var SMFonts = new SXMLDom();with(SMFonts){documentElement = createNode("SMFonts");with(documentElement){with(appendChild(ownerDocument.createNode("SMFont"))){setAttribute("key","small");text="font-family:Arial, Helvetica, sans-serif;font-size:10px;font-weight:normal;";};with(appendChild(ownerDocument.createNode("SMFont"))){setAttribute("key","medium");text="font-family:Arial, Helvetica, sans-serif;font-size:12px;font-weight:normal;";};with(appendChild(ownerDocument.createNode("SMFont"))){setAttribute("key","large");text="font-family:Arial, Helvetica, sans-serif;font-size:14px;font-weight:bold;";};with(appendChild(ownerDocument.createNode("SMFont"))){setAttribute("key","x-large");text="font-family:Arial, Helvetica, sans-serif;font-size:17px;font-weight:bold;";};with(appendChild(ownerDocument.createNode("SMFont"))){setAttribute("key","xx-large");text="font-family:Arial, Helvetica, sans-serif;font-size:22px;font-weight:bold;";};};};
var SMCfgItems = "_3CSMCfgItems_3E_3CSMCfgItem_20key=_22provider_X5X2bank_X5X2account_X5X2bic_22_3EPBNKDEFF_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2bank_X5X2account_X5X2iban_22_3EDE26_X5204401_X5200046_X5200711_X5200464_X52067_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2bank_X5X2account_X5X2number_22_3E711046467_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2bank_X5X2account_X5X2owner_22_3EVersandhandel_X520Bigo_X5X2Ta_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2bank_X5X2code_22_3E44010046_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2bank_X5X2name_22_3EPostbank_X520Dortmund_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2city_22_3EHerne_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2company_X5X2director_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2company_X5X2director_X5X2label_22_3EInhaber_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2company_X5X2name_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2country_X5X2name_22_3EDeutschland_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2fax_X5X2business_22_3E_X5X149_X520(0)2325_X5X2666915_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2fax_X5X2hotline_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2firstname_22_3ETanja_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2lastname_22_3EBigowski_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2mail_X5X2contact_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2mail_X5X2default_22_3Ekontakt_X5X6vhb24_X5X3de_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2mail_X5X2orders_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2mail_X5X2support_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2mail_X5X2webmaster_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2phone_X5X2business_22_3E_X5X149_X520(0)2325_X5X2666914_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2phone_X5X2hotline_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2phone_X5X2mobile_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2region_22_3ENordrhein_X5X2Westfalen_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2salutation_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2shopname_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2street_X5X2name_22_3EHeerstrasse_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2street_X5X2number_22_3E80_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2tax_X5X2number_22_3E344_X5X45005_X5X41975_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2title_22_3E_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2trade_X5X2number_22_3Ekein_X520Eintrag_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2url_22_3Ehttp:_X5X4_X5X4www_X5X3vhb24_X5X3com_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2vat_X5X2id_22_3EDE813906838_3C_X4SMCfgItem_3E_3CSMCfgItem_20key=_22provider_X5X2zip_X5X2code_22_3E44653_3C_X4SMCfgItem_3E_3C_X4SMCfgItems_3E";
var SMBasketXML = null;
with(SMShop){
deliveryTimes[25] = new Array(25, "null");
deliveryTimes[26] = new Array(26, "null");
deliveryTimes[27] = new Array(27, "null");
deliveryTimes[29] = new Array(29, "%20");
};
// listen to window.onLoad & .onUnload events
window.onload = function(){ SMShop.onLoad(); };
window.onunload = function(){ SMShop.onUnload(); };
function SMOMGetQtyControl(){
var _args = SMOMGetQtyControl.arguments, oProduct = _args[0], raiseEvent = ((_args[1]!=null) ? _args[1] : false), index = ((_args[2]!=null) ? _args[2] : -1);
if(oProduct==null){return("")};
var sPkid = "PD" + null2str(oProduct.getAttribute(_SMAUniqueID)), iQtyType = null2int(oProduct.getAttribute(_SMAOQtyType)),
iQtyMin = null2int(oProduct.getAttribute(_SMAMinAmount)), iQtyStep = null2int(oProduct.getAttribute(_SMAOQtyStep)),
iQtyMax = null2int(oProduct.getAttribute(_SMAMaxAmount)), iQtyDef = null2int(oProduct.getAttribute(_SMAOQDefValue)),
iOptCount = null2int(oProduct.getAttribute(_SMAOQDDOptCount)), sQtyUnit = "Stk", sField = "";
if(oProduct.getAttribute(_SMAVariantID)!=null) sPkid += '-' + oProduct.getAttribute(_SMAVariantID);
sPkid += "Amount";
iQtyDef = oProduct.getAttribute(_SMAAmount);
iQtyDef = iQtyDef>iQtyMin?iQtyDef:iQtyMin;
sField += "
";
return(sField);
};
//page:SM_RESERVED_DATA_ENTRY_SHIPMENT
// cSMShop.getCheckoutStep ( current-page-id, [previous?] )
function SMGetCheckoutStep(){
var backwards = arguments[1], returnId = "", usingShipToAddress = bNoCheckoutPage = false;
usingShipToAddress = (SMShop.getFormElement("BILLTO", "BILLTO_SHIPTO_DIFFERS") != null);
if(usingShipToAddress){
usingShipToAddress = cbool(SMShop.getFormValue("BILLTO", "BILLTO_SHIPTO_DIFFERS", true));
};
switch(arguments[0]){
case "SM_RESERVED_BASKET":
returnId = (backwards) ? "cart.html" : "billing-adress.html";
if(backwards) bNoCheckoutPage = true;
break;
case "SM_RESERVED_DATA_ENTRY_BILLTO":
returnId = (backwards) ? "cart.html" : (usingShipToAddress) ? "shipping-address.html" : "shipping-method.html";
if(returnId == "cart.html") bNoCheckoutPage = true;
break;
case "SM_RESERVED_DATA_ENTRY_SHIPTO":
returnId = (backwards) ? "billing-adress.html" : "shipping-method.html";
break;
case "SM_RESERVED_DATA_ENTRY_SHIPMENT":
returnId = (backwards) ? (usingShipToAddress) ? "shipping-address.html" : "billing-adress.html" : "payment-method.html";
break;
case "SM_RESERVED_DATA_ENTRY_PAYMENT":
returnId = (backwards) ? "shipping-method.html" : "verify-and-send.html";
break;
case "SM_RESERVED_DATA_ENTRY_VERIFY":
returnId = (backwards) ? "payment-method.html" : "verify-and-send.html";
if(returnId == "index.html") bNoCheckoutPage = true;
break;
default:
returnId = (backwards) ? "" : "index.html";
if(!backwards) bNoCheckoutPage = true;
};
// valid for checkout?
if(returnId!=""){
var sMsgValidity = "", lValidationCode = SMShop.validateDataForCheckout();
switch(lValidationCode){
case 1:
sMsgValidity = "Your cart is empty! Please add at least one item to your cart".replace(" ", " ");
alert(sMsgValidity);
returnId = "index.html";
bNoCheckoutPage = true;
break;
case 2:
sMsgValidity = ("The minimum order value has not been met. The minimum order value is " + cprimary.format(SMShop.getAttribute(_SMAMinAmount), SM_CSYMBOL + SM_CGROUP)).replace(" ", " ");
alert(sMsgValidity);
returnId = "cart.html";
bNoCheckoutPage = true;
break;
};
}
else return("");
// ssl
if(useSSLForCheckout&&SMOMAbsoluteRootURL.substring(0,7)=="http://"){
if(sharedSSLURL!=""){
SMOMAbsoluteRootURL = sharedSSLURL;
}
else SMOMAbsoluteRootURL = "https://" + SMOMAbsoluteRootURL.substring(7);
};
if(SMOMAbsoluteRootURL.substring(SMOMAbsoluteRootURL.length - 1)=="/") SMOMAbsoluteRootURL = SMOMAbsoluteRootURL.substring(0,SMOMAbsoluteRootURL.length - 1);
if(bNoCheckoutPage && SMShop.getAttribute('sarurl') != ''){
returnId = SMShop.getAttribute('sarurl') + "/" + returnId;
} else {
returnId = SMOMAbsoluteRootURL + "/" + returnId;
};
return(returnId);
};
SMCurrNoOfDecimals = 2;
var cprimary = new cSMCurrency("EUR", "€", "Euro", ",", "1,1 x", "-1,1 x", 2, ".", 3, 1 );
var csecondary = new cSMCurrency("USD", "$", "United States Dollars", ",", "1,1 x", "-1,1 x", 2, ".", 3, 1.2094639753 );
var nprimary = new cSMCurrency("kg", "kg", "kg", ",", "1,1 x", "-1,1 x", 2, "", 3, 1);
if(SMFirstInit){
SMShop.basket.setAttribute("p-cur-iso", cprimary.ISO)
SMShop.basket.setAttribute("p-cur-symbol", cprimary.symbol)
};
function formatProductBasePrice(Product){
var $basePriceTemplate = "";
$basePriceTemplate = "Base price: %bp pro %mb %mu";
if($basePriceTemplate!=""&&(Product.bpAmount!=1||Product.bpBase!=1)){
$basePriceTemplate = $basePriceTemplate.replace(/%ma/g, Product.bpAmount);
$basePriceTemplate = $basePriceTemplate.replace(/%mu/g, Product.bpMUnit);
$basePriceTemplate = $basePriceTemplate.replace(/%qu/g, Product.quantityUnit);
$basePriceTemplate = $basePriceTemplate.replace(/%bp/g, "" + cprimary.format(Product.getPrice() / Product.bpAmount * Product.bpBase, SM_CGROUP + SM_CSYMBOL) + "");
$basePriceTemplate = $basePriceTemplate.replace(/%mb/g, Product.bpBase);
}
else $basePriceTemplate = "";
return($basePriceTemplate);
};
function displayProductProperties(Product){
var $image = null, $elem = null, $basePriceTemplate = "", $fSetData = function(){ var $elem = null; try{ $elem = document.getElementById(arguments[0]); if($elem!=null) $elem.innerHTML = arguments[1]; } catch(e){ }; };
try{
$image = new Image();
$image.src = Product.image;
}
catch(e){
$image = null;
};
with(document){
if($image!=null&&Product.image!=""){
if(getElementById("product_picture")){
getElementById("product_picture").src = $image.src;
};
};
$fSetData("product_name", Product.name);
$fSetData("product_desc", Product.desc);
$fSetData("product_id", Product.getAttribute(_SMACode));
$fSetData("product_ean", Product.getAttribute(_SMAEAN));
$fSetData("product_weight", nprimary.format(Product.getAttribute(_SMAWeight), SM_CGROUP));
$fSetData("product_original_price", cprimary.format(Product.getOriginalPrice(), SM_CGROUP + SM_CSYMBOL));
$fSetData("product_difference", cprimary.format(Product.getOriginalPrice() - Product.getPrice(), SM_CGROUP + SM_CSYMBOL));
$fSetData("product_price", cprimary.format(Product.getPrice(), SM_CGROUP + SM_CSYMBOL));
$fSetData("product_price_seccur", csecondary.format(Product.getPrice(), SM_CGROUP + SM_CSYMBOL));
$fSetData("product_discounts", Product.discounts.renderHTML());
$fSetData("product_base_price", formatProductBasePrice(Product));
if(Product.deliveryTimeFKID!=0){
$fSetData("product_delivery_caption", unescape(SMShop.deliveryTimes[Product.deliveryTimeFKID][1]));
};
$elem = getElementById("product_delivery_img");
if($elem&&Product.deliveryTimeFKID!=0){
try{
$image = new Image();
$image.src = $elem.src.replace(/(.+\/[^\d\/]+)\d+(\.[a-z]+)/gi, "$1" + Product.deliveryTimeFKID + "$2");
}
catch(e){ $image = null };
if($image!=null) $elem.src = $image.src;
};
};
};
/* sm:broker-url begin-edit */
var SMBrokerURL = "https://www.smartstore.com/services/smbiz_smartbroker.php5"
/* sm:broker-url end-edit */