var productImages = []; // Preloaded image. ID = 1358 productImages[1358] = new Image(); productImages[1358].src="/image/product/medium/harlow01-1.jpg"; productImages[1358].alt = "The Harlow one piece features a deep v-cut front with ruffled trim"; // Preloaded image. ID = 1359 productImages[1359] = new Image(); productImages[1359].src="/image/product/medium/harlow02.jpg"; productImages[1359].alt = "The Harlow one piece features a deep v-cut front with bead detailing"; var productData = []; productData[2570] = [{1: 4, 13: 99}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2571] = [{1: 4, 13: 100}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2572] = [{1: 4, 13: 101}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2573] = [{1: 4, 13: 102}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2574] = [{1: 4, 13: 103}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2575] = [{1: 1, 13: 99}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2576] = [{1: 1, 13: 100}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2577] = [{1: 1, 13: 101}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2578] = [{1: 1, 13: 102}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2579] = [{1: 1, 13: 103}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2580] = [{1: 2, 13: 99}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2581] = [{1: 2, 13: 100}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2582] = [{1: 2, 13: 101}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2583] = [{1: 2, 13: 102}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2584] = [{1: 2, 13: 103}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2585] = [{1: 3, 13: 99}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2586] = [{1: 3, 13: 100}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2587] = [{1: 3, 13: 101}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2588] = [{1: 3, 13: 102}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":1, "imageId":0} ]; productData[2589] = [{1: 3, 13: 103}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2590] = [{1: 5, 13: 99}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2591] = [{1: 5, 13: 100}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2592] = [{1: 5, 13: 101}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2593] = [{1: 5, 13: 102}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; productData[2594] = [{1: 5, 13: 103}, {"price":'AU$165.00 ($150.39 USD?)', "exception":'FALSE', "isSpecial":'FALSE', "specialPrice":'AU$165.00 ($150.39 USD?)', "stock":-1, "imageId":0} ]; var attribSets = [1, 13]; // Find the variant selected. function findVariant() { found = false; // Found flag. variantIndex = 0; // The index of the found variant element. // This just scans for a match and if found it sets the flags and breaks. // If one mismatch is detected it just breaks the loop. for (variant in productData) // Loop through the variant array, called 'productData'. { for (set in attribSets) // Now loop through the sets. { // Get a refference to a attribute set select box. attrib = document.getElementById("attributes"+attribSets[set]); // Check to see if the value of that attribute select box is in the productData attribute array. if (productData[variant][0][attribSets[set]]==attrib.value) { found = true; } else { found = false; break; } } if (found==true) { variantIndex = variant; break; } } if (variantIndex!=0) { var data = productData[variantIndex][1]; data["var_id"] = variantIndex; return data; } else { return false; } } // This enables and disables the submit button. function submitButtonEnable(enabled) { if(enabled==false) { document.getElementById("submitButton").style.display="none"; // document.getElementById("submitButton").disabled = true; } else { document.getElementById("submitButton").style.display="block"; // document.getElementById("submitButton").disabled = false; } } function specialRowEnabled(enable) { var browserName=navigator.appName; if (enable==false) { document.getElementById("specialRow").style.display="none"; } else { // Use block for IE because table-row doesn't work if (browserName=="Microsoft Internet Explorer") { document.getElementById("specialRow").style.display="block"; } else { document.getElementById("specialRow").style.display="table-row"; } } } // Display stock indicator function displayStock() { // DON'T SWAP STOCK for Zakoda return true; // Get the selected variant. variant = findVariant(); // Check if it is an exception. and display a custom message if (variant["exception"]=="TRUE") { // See if it is on special. stockString = "Not Available" } else if (variant["stock"] < 0) { stockString = "Approximately 2 weeks"; } else if (variant["stock"] == 0) { stockString = 'Contact us for availability'; } else if (variant["stock"] > 0) { stockString = "IN STOCK. SHIPS WITHIN 1 - 3 DAYS"; } document.getElementById("stock").innerHTML = stockString; } // This is the function that gets called when the user changes the selection. function changeVariant() { // Get the selected variant. variant = findVariant(); // Sort out the stock displayStock(); // Check if it is an exception. if (variant["exception"]=="FALSE") { // See if it is on special. if (variant["isSpecial"]=="TRUE") { // Display the special price with the old price with strike through font. document.getElementById("price").innerHTML = "" + variant["price"] + ""; document.getElementById("specialPrice").innerHTML = variant["specialPrice"]; specialRowEnabled(true); } // Just show the normal price. else { document.getElementById("price").innerHTML = variant["price"]; specialRowEnabled(false); } submitButtonEnable(true); // Enable the submit button. } else { // Variant must be an exception so display some text and disable the submit button. document.getElementById("price").innerHTML = "Item Not Available"; submitButtonEnable(false); specialRowEnabled(false); } }