Enter Keyword(s)

in 

Risk® 1959

Read Reviews
Risk® 1959
  • Our Price:$45.95

This is the classic reproduction of Risk as it was in 1959. Its appeal is timeless. Make the right moves and you'll conquer the world!

Additional Info

  • Ages:8 and up
  • Players:2 to 6
  • Contents:Oversized bi-fold game board with original style art, 6 sets of beautiful wooden "army" pieces, deck of area cards with original style art, high quality dice, and a rules book featuring a History of Risk.
'; strInputsOutput = strTemp; if ( ! oProdInfo.showCart ) { strTemp = strInputsOutput + '-'; } else { strTemp = strInputsOutput + ''; // Build hidden input for case sizes var caseSize = 0; if (bUseCaseQty) { if (bUseChildCaseQty) { caseSize = oProdInfo.case_qty; } else { caseSize = 0; } strTemp += ''; } } strInputsOutput = strTemp; strTemp = strInputsOutput + '
' + oProdInfo.invMsg; strInputsOutput = strTemp; strTemp = strInputsOutput + '' + oProdInfo.sku + '' // Show case quantity text if (bUseCaseQty && bUseChildCaseQty && oProdInfo.case_qty > 0) { strTemp += "

Available in cases of

".replace("", oProdInfo.case_qty); } strInputsOutput = strTemp + '
'; if ( iColCount == iTotalCol ) { strTemp = strInputsOutput + ''; strInputsOutput = strTemp; iColCount = 0; } //- if ( iColCount == iTotalCol ) } //- for ( strPKey in window.oChildProds ) } catch ( oError ) { alert(oError.message); } var caseQtyText = ''; if (bUseCaseQty && !bUseChildCaseQty) { caseQtyText = '

' + "Available in cases of 0" + '

'; } sAtcHtml = '

Available Sizes

' + caseQtyText + '' + sHeadRow + strInputsOutput + '
'; if ( bUseProductAliases ) { if ( jQuery.trim(oProdInfo.pa_key) != '' ) { sAtcHtml += ''; } //- if jQuery.trim(oProdInfo.pa_key) != '' ) } //- if ( bUseProductAliases ) if ( bShowAtc ) { sAtcHtml += ''; } //- if ( bShowAtc ) sAtcHtml += '
'; jQuery('#detail_mx1_sizeinfo').html(sAtcHtml); } catch ( oError ) { alert(oError.message); document.getElementById('detail_mx1_sizeinfo').innerHTML = 'Error loading sizes found in this color!'; HideLoading() } HideLoading(); } //- function fncDrawColorSizes() /** * Update Qty for "Select List" Addon Products */ function fncUpdateAddonsSelectQty(oSelect){ sPKey = jQuery(oSelect).val(); jQuery('#addon_qty_container').html(''); }//-function fncUpdateAddons /** * Ajax to process parent-child product nested drop list displays * * @author dand * @internal refactored on 4/8/2010 - dand * * @param int vOpt int of the option to processed (1-4) * @param bool vKeepGoing determines if function should recurse * @param int vLast the total number of nested drop lists (1-4) */ function fncGetOptDroplist ( vOpt, vKeepGoing, vLast ) { var oAjaxData = { 'opts': vOpt , 'detailpageaction': 'ajaxcall' , 'actiontype': 'getnestedopts' , 'key': '436370EE366F4917B4D24FC4A4423155' , 'parent_atc': '0' , 'parent_price': '1' , 'use_child_pics': 'false' , 'use_child_docs': 'false' , 'use_child_cart_opts': 'false' , 'use_child_ds': 'false' , 'parent_config_sections':'' }; switch ( vOpt ) { /* *Add mode case condition for 5 & 6 Droplist *@author pijushb *since 5/17/2012 **/ case 6: var sOpt5Key = jQuery('#prod_opt5').val(); var oOpt5Info = window.oChildProds[sOpt5Key]; var sVal = escapeUriQueryParens(jQuery("#prod_opt5 option[value='" + sOpt5Key + "']").text()); oAjaxData.opt5 = sVal; case 5: var sOpt4Key = jQuery('#prod_opt4').val(); var oOpt4Info = window.oChildProds[sOpt4Key]; var sVal = escapeUriQueryParens(jQuery("#prod_opt4 option[value='" + sOpt4Key + "']").text()); oAjaxData.opt4 = sVal; case 4: var sOpt3Key = jQuery('#prod_opt3').val(); var oOpt3Info = window.oChildProds[sOpt3Key]; var sVal = escapeUriQueryParens(jQuery("#prod_opt3 option[value='" + sOpt3Key + "']").text()); oAjaxData.opt3 = sVal; //Drop Through case 3: var sOpt2Key = jQuery('#prod_opt2').val(); var oOpt2Info = window.oChildProds[sOpt2Key]; var sVal = escapeUriQueryParens(jQuery("#prod_opt2 option[value='" + sOpt2Key + "']").text()); oAjaxData.opt2 = sVal; //Drop Through case 2: var sVal = escapeUriQueryParens(jQuery('#prod_opt1').val()); oAjaxData.opt1 = sVal; break; default: break; }//- switch ( vOpt ) jQuery.ajax({ url: "/product/Risk1959.asp" , data: oAjaxData , cache: false , type: "GET" , dataType: "json" , beforeSend: function() { ResizeLoadingBG(); } , success: function(oData){ fncDrawOptDroplist( oData, vOpt, vKeepGoing, vLast ) } }); } //- function fncGetOptDroplist ( vOpt, vKeepGoing, vLast ) // EVENT FUNCTIONS ================================================== function fncDrawOptDroplist ( oData, vOpt, bKeepGoing, vLast ) { var iOpt = parseInt(vOpt); var iLastOpt = parseInt(vLast); var aUsedValues = new Array(); window.oChildProds = oData; if ( document.getElementById('prod_opt' + (iOpt - 1)) ){ document.getElementById('prod_opt' + (iOpt - 1)).disabled = false; } if ( bKeepGoing ) { bKeepGoing = true; } else { bKeepGoing = false; } if ( iLastOpt == iOpt ) { bKeepGoing = false; } try { /* * removes all previous options */ var oOptSelect = document.getElementById('prod_opt' + iOpt); oOptSelect.options.length = 0; try { for ( strPKey in window.oChildProds ) { oProdInfo = window.oChildProds[strPKey]; if ( ! InArray( aUsedValues, oProdInfo.opt ) ){ oOptSelect.options[oOptSelect.options.length] = new Option(oProdInfo.opt , strPKey); aUsedValues[aUsedValues.length] = oProdInfo.opt; } //-if( ! InArray(aUsedValues, oProdInfo.opt) ) } //-for(key in oChildProds) /* * Recursivly Call fncGetOptDroplist until * we're done getting all the drop lists */ if ( bKeepGoing ) { if ( iOpt == 5 ) { fncGetOptDroplist( iOpt + 1, false, iLastOpt ); } else { fncGetOptDroplist( iOpt + 1, true, iLastOpt ); } } else { fncProcessOptProduct( iOpt ); HideLoading(); } //- if ( bKeepGoing ) } catch ( err ){ alert(err.message); HideLoading(); } if ( oOptSelect.options.length < 1 ) { oOptSelect.options[oOptSelect.options.length] = new Option('No Sub-Options Found', ''); oOptSelect.disabled = true; } else { oOptSelect.disabled = false; } } catch (err){ alert(err.message); } /* * Add Code to show/hide review message and buttons. * @author pijushb * @since 1/24/2012 **/ if (bShowBackOrderMessage) { sPrevSku = jQuery("#previous_sku").val(); bReviewMessage = $("#review_message_"+sPrevSku).is(":visible") if (bReviewMessage) { $("#review_message_"+sPrevSku).hide(); } bSubmitButton = $("#submit_button").is(":visible") if (!bSubmitButton) { $("#submit_button").show(); $("#check_stock_button").show(); $("#checkout_button").hide(); } } } //- function fncDrawOptDroplist //================================================================ /** * SearchString escape the parens in the uri query * * @param string sVal string containing the value to escape * @return string string with properly escaped parens for searchstring */ function escapeUriQueryParens(sVal){ if(typeof sVal == 'undefined'){ return; } sValue = sVal; sValue = sValue.replace(/%28/gi,"\("); sValue = sValue.replace(/%29/gi,"\)"); sValue = sValue.replace(/\(/gi,"\\("); sValue = sValue.replace(/\)/gi,"\\)"); return sValue; } function fncProcessOptProduct ( vOpt ) { try { var sPKey = jQuery('#prod_opt' + vOpt).val(); var oProdInfo = window.oChildProds[sPKey]; //Global scope the pkey window.sChildPkey = sPKey; /* * Bail if no key or no product data */ if ( sPKey == '' || typeof oProdInfo == "undefined" ) { hideProductContainer(); return false; } //- if ( sPKey == '' ) if ( jQuery('#qty_box').length > 0 ) jQuery('#qty_box').attr('name', 'qty_' + sPKey); jQuery('#keys').val(sPKey); /* * Update SKU */ jQuery('#sku_container').html('SKU: ' + oProdInfo.sku); /* * Cart */ if ( oProdInfo.showCart ) { if ( jQuery('#child_cart_section').length > 0 ) jQuery('#child_cart_section').show(); /* * Handle Cart Options defined on Child Product */ if ( bUseChildCartOpts ) { if ( oProdInfo.cartOptions != '' && jQuery('#pc_cart_options_' + vOpt).length > 0 ) { buildCartOption(sPKey, oProdInfo.cartOptions, vOpt); } else { jQuery('#pc_cart_options_' + vOpt).html(''); } } //- if ( bUseChildCartOpts ) /* * Cart Options defined on Parent (standard config) * need to know if this is the "last" droplist being displayed... */ if ( jQuery('#pc_cart_options_' + vOpt).length > 0 ) { jQuery('#pc_cart_options_' + vOpt).slideDown(); // change the name of the hidden input so it will post to the item in the cart jQuery('#cart_option_436370EE366F4917B4D24FC4A4423155').attr("name","cart_option_" + sPKey); } //- if ( jQuery('#pc_cart_options_' + vOpt).length > 0 ) } else { hideChildProductInputs(); } //-if(oProdInfo.showCart) /* * Product Unit Display */ if ( 'productUnit' in oProdInfo ) { if(oProdInfo.productUnit != '') jQuery('#product_unit_container').html('Unit: ' + oProdInfo.productUnit); } //- if ( 'productUnit' in oProdInfo ) /* * Single Unit of Measure (products.unit) */ if ( 'uomHTML' in oProdInfo ) { if ( oProdInfo.uomHTML != '' ) { jQuery('#detail_atc_standalone').html(oProdInfo.uomHTML); jQuery('#child_cart_section').html(oProdInfo.uomHTML); } } //- if ( 'uomHTML' in oProdInfo ) /* * Parent Addon Products */ if ( bShowParentAddonProds ) { jQuery('#addon_product_container').slideDown(); jQuery('#addon_products').attr('name','keys'); } else { jQuery('#addon_product_container').slideUp(); jQuery('#addon_products').attr('name','keys_no_post'); } //- if ( bShowParentAddonProds ) /* * Child Addon Products */ if ( bShowChildAddonProds && 'showChildAddonProds' in oProdInfo ) { if ( ! oProdInfo.showChildAddonProds ) { jQuery('#addon_product_container').slideUp(); jQuery('#addon_products').attr('name','keys_no_post'); } else { jQuery('#addon_product_container').slideDown(); jQuery('#addon_products').attr('name','keys'); } //- if ( ! oProdInfo.showChildAddonProds ) } //- if ( 'showChildAddonProds' in oProdInfo ) /* * Price */ /* * Check for Price Display type * @author pijushb * @since 4/25/2011 */ var bShowRegPrice = true; var bShowATCQty = false; var sShowMessage = ''; if ( sShowPriceDisplayTypeDropList ) { switch ( sPriceDisplayType ) { case 'hide': bShowRegPrice = false; bShowATCQty = true; sShowMessage = '-'; break; case 'show_message': bShowRegPrice = false; bShowATCQty = true; sShowMessage = sPriceMessage; break; case 'require_atc': bShowRegPrice = false; bShowATCQty = true; sShowMessage = sHelpText; break; case 'require_login_or_atc': bShowRegPrice = false; bShowATCQty = true; sShowMessage = sHelpText break; case 'require_login_for_price_and_atc': bShowRegPrice = false; sShowMessage = sHelpTextLogin break; default: bShowRegPrice = true; break; } //- switch ( sPriceDisplayType ) } // if ( sShowPriceDisplayTypeDropList ) if ( bShowRegPrice ) { //Display standard } else { oProdInfo.showPrice=false; jQuery('#price_display_type_message').html('
' + sShowMessage + '
'); if ( ! bShowATCQty ) { jQuery('#child_cart_section').hide(); } //- if ( ! bShowATCQty ) } //- if ( bShowRegPrice ) /* * Set Dangerous Price Ratio * @author vinayakj * @since 4/25/2011 */ if ( bShowHazmatRatio ) { if ( oProdInfo.dangerous_price_ratio > 0 ) { jQuery('#dangerous_price_ratio').show(); jQuery('#dangerous_price_ratio_value').html(oProdInfo.dangerous_price_ratio); } else { jQuery('#dangerous_price_ratio').hide(); } //- if ( oProdInfo.dangerous_price_ratio > 0 ) } //- if ( bShowHazmatRatio ) if ( oProdInfo.showPrice ) { /* * Draw full UOM section (products.uom_std, products.uom_sales, * products.uom_sales_conversion and additional unit of measure * conversions from the unit_of_measure table) */ sUomView = ''; if ( bShowSalesUOM || bOnlyShowSalesUOM || bShowAdditionalSalesUOM ) { sUomView = fncDrawUOM ( sPKey, oProdInfo ); } if ( sUomView != '' ) { jQuery('#child_cart_section').html( sUomView ); jQuery('#child_cart_section').show(); } else { if ( jQuery('#price_container').length > 0 ) { /* * Add Qty Pricing Link for Child Product */ var sPriceBreakHTML = ''; if ( bShowChildQtyPricing ) { if ( 'showPriceBreaks' in oProdInfo ) { sPriceBreakHTML = '
  • '; } //- if ( 'showPriceBreaks' in oProdInfo ) } //- if ( bShowChildQtyPricing ) iRetailPrice = parseFloat(oProdInfo.retail_price.replace('$','').replace(',','')); iPrice = parseFloat(oProdInfo.price.replace('$','').replace(',','')); cRetailPrice = oProdInfo.retail_price; cPrice = oProdInfo.price /* * code to compare final price to retail price or suggested retail price * depending on which values are populated and value are greater than * the final price returned by the oRs.GetPrice call * * @author johns * @since 12/22/2011 */ if ( bShowPriceCompare ) { if ( oProdInfo.listprice ) { iListPrice = parseFloat(oProdInfo.listprice.replace('$','').replace(',','')); } else { iListPrice = 0; } //- if ( oProdInfo.listprice ) if ( iPrice >= iRetailPrice && iListPrice != '' ) { iRetailPrice = iListPrice; cRetailPrice = oProdInfo.listprice } //- if ( iRetailPrice <= iPrice && iListPrice != '' ) if ( iPrice < iRetailPrice ) { iPercent = (iRetailPrice - iPrice) / iRetailPrice; iPercentSaved = iPercent * 100; jQuery('#price_container').html('
    • ' + cPrice + '
    • ' + sPriceBreakHTML + '
    • List Price: ' + cRetailPrice + '
    • You Save: ' + Math.round(iPercentSaved * 100) / 100 + '%
    '); } else { jQuery('#price_container').html(oProdInfo.price); } } else { jQuery('#price_container').html('
    • ' + FormatCurrency(oProdInfo.price, true) + '
    • ' + sPriceBreakHTML + '
    '); } //- if ( bShowPriceCompare ) } //- if(jQuery('#price_container').length > 0) } //- if ( sUomView != '' ) jQuery('#price_container').show(); } else { jQuery('#price_container').hide(); }//- if ( oProdInfo.showPrice ) /* * Add hidden field for qty available to check back order. * @author pijushb * @since 9/28/2011 */ if ( bShowBackOrderMessage ) { jQuery('.qtyavailable').remove(); jQuery('#idp_container') .parent() .append('') } //- if ( bShowBackOrderMessage ) /* * Inventory */ if ( oProdInfo.showInventory ) { jQuery('#idp_container').html(oProdInfo.invMsg); /** * if status = out then show "add product to watch list" link * * @author johns * @since 12/11/2009 */ if ( bShowInvWatchLink ) { if ( oProdInfo.invStatus == 'out' ) { hideChildProductInputs(); var selected_prod = document.getElementById('prod_opt'+ vOpt).selectedIndex; var selected_prod_nm = document.getElementById('prod_opt'+ vOpt).options[selected_prod].text; jQuery('#idp_container').append('Add Product to Inventory Watch List'); } //- if ( oProdInfo.invStatus == 'out' ) } //- if ( bShowInvWatchLink ) } //- if ( oProdInfo.showInventory ) if(bShowInvByWarehouse) { jQuery.ajax({ url: "?pageaction=inventorybywarehouse&key=" + sPKey , cache: false , dataType: "text" , success: function(sResponse){ jQuery('#pw_table').html(sResponse); } }); } /* * Append Favorite link with Child Product Key * @auther - vinayakj - * @since - 6/5/2012 */ if (bShowFavoriteLink && bShowChildFavoriteLink && jQuery('#idp_container li[id="addfave"]').length === 0) { jQuery('#idp_container').append(''); tb_init('#idp_container a.thickbox, area.thickbox, input.thickbox'); } /** * Child Product Images * * @author dand * @since 4/6/2010 */ if ( bUseChildPics ) { /** * Main Image & View Larger Link */ if ( oProdInfo.pic && oProdInfo.pic != '' ) { /* * Clear Child Image & View Larger link */ /* if(jQuery(".child_prod_img_link").length > 0){ jQuery(".child_prod_img_link").remove(); jQuery("#child_detail_enlarge").remove(); } */ /* * Build Image & View Larger Link */ if ( oProdInfo.lg_pic != '' ) { /*jQuery("div.detail_photo") .prepend('' + 'View Larger');*/ jQuery('#detail_photo_container a.thickbox').attr('href', 'images/' + oProdInfo.lg_pic); jQuery('#detail_photo_container img#prodpicthumb').attr('src', 'images/' + oProdInfo.pic); } else { /*jQuery(".detail_photo").prepend('' + oProdInfo.name + '
    ');*/ jQuery('#detail_photo_container img#prodpicthumb').attr('src', 'images/' + oProdInfo.pic); } //- if ( oProdInfo.lg_pic != '' ) /* * Hide Parent & Show Child */ /*//parent images jQuery("#prodpicthumb").hide(); jQuery("#detail_enlarge").hide(); //no image jQuery(".detail_photo p:contains('sorry, no image')").hide(); //child image jQuery(".child_prod_img_link").fadeIn( 1000 );*/ } else { jQuery('#detail_photo_container a.thickbox').attr('href', sLargePic); jQuery('#detail_photo_container img#prodpicthumb').attr('src', sDetailPic); /* * Hide Child Image & Show Parent Image */ /*//parent images jQuery("#prodpicthumb").fadeIn( 1000 ); jQuery("#detail_enlarge").show(); //no image jQuery(".detail_photo p:contains('sorry, no image')").show(); //child image jQuery(".child_prod_img_link").hide(); jQuery("#child_detail_enlarge").hide();*/ } //- if ( oProdInfo.pic && oProdInfo.pic != '' ) /* * Additional Images */ if ( oProdInfo.additionalPics && oProdInfo.additionalPics.length > 0 ) { /* * Clear Child Additional Images */ if ( jQuery('.detail_multipic ul.child_prods').length > 0 ) { jQuery('.detail_multipic ul.child_prods li').remove(); } else { jQuery('.detail_multipic').append(''); } //- if ( jQuery('.detail_multipic ul.child_prods').length > 0 ) /* * Build Child Additional Images */ for ( var iCounter = 0, goTo = oProdInfo.additionalPics.length - 1; iCounter <= goTo; iCounter++ ) { oPics = oProdInfo.additionalPics[iCounter]; jQuery('.detail_multipic ul.child_prods').append('
  • '); } //- for ( var iCounter = 0, goTo = oProdInfo.additionalPics.length - 1; iCounter <= goTo; iCounter++ ) /* * Hide Parent Images & Show Child Images */ jQuery('.detail_multipic ul').not('.child_prods').hide(); jQuery('.detail_multipic ul.child_prods').fadeIn( 1000 ); //tb_init('a.thickbox, area.thickbox, input.thickbox'); } else { /* * Hide Child Images & Show Parent Images */ jQuery('.detail_multipic ul').not('.child_prods').fadeIn( 1000 ); jQuery('.detail_multipic ul.child_prods').hide(); //tb_init('a.thickbox, area.thickbox, input.thickbox'); } //- if ( oProdInfo.additionalPics && oProdInfo.additionalPics.length > 0 ) } //- if ( bUseChildPics ) /* * Child Product Documents * * @author dand * @since 4/6/2010 */ if ( bUseChildDocs ) { if ( oProdInfo.documents.length > 0 ) { /* * Clear Child Documents */ if ( jQuery("#child_doc_download").length > 0 ) { jQuery("#child_doc_download").html('Downloads:'); } else { jQuery("#doc_download").parent().append(''); } //- if ( jQuery("#child_doc_download").length > 0 ) /* * Build Child Documents */ for ( var iCounter = 0, goTo = oProdInfo.documents.length - 1; iCounter <= goTo; iCounter++ ) { oDocConfig = oProdInfo.documents[iCounter]; jQuery("#child_doc_download").append('' + oDocConfig.link + '
    '); } //- for ( var iCounter = 0, goTo = oProdInfo.documents.length - 1; iCounter <= goTo; iCounter++ ) /* * Hide Parent Docs & Show Child Docs */ jQuery('#doc_download').hide(); jQuery('#child_doc_download').show(); } else { /* * Hide Child Docs */ jQuery('#child_doc_download').hide(); /* * Show Parent Docs - If there are any */ if ( jQuery('#doc_download').find('span').eq(1).html() == '' ) { jQuery('doc_download').hide(); } else { jQuery('#doc_download').show(); } //- if ( jQuery("#doc_download").find('span').eq(1).html() == '' ) } //- if( oProdInfo.documents.length > 0 ) } //- if ( bUseChildDocs ) /* * Child Product Qty Pricing * * @author johns * @since 11/6/2010 */ if ( bShowChildQtyPricing ) { if ( 'showPriceBreaks' in oProdInfo ) { if (oProdInfo.showPriceBreaks) { jQuery('#qtypricing').html('' + sQtyPricingLinkLabel + ''); tb_init('#qtypricing a'); /* jonr - 11/12/10 - We have to reinitialize Thickbox after modifying the DOM */ } // -if (oProdInfo.showPriceBreaks) } //- if ( 'showPriceBreaks' in oProdInfo ) } //- if ( bShowChildQtyPricing ) /* * Use Child Product Description * * @author johns * @since 11/6/2010 */ if ( bUseChildDescription ) { if ( 'desription' in oProdInfo ) { if ( oProdInfo.desription ) { jQuery('#detail_desc_content_0').html(oProdInfo.desription); } //- if ( oProdInfo.desription ) } //- if ( 'ds' in oProdInfo ) } //- if ( bUseChildDescription ) /* * Add Code to show/hide review message and buttons. * * @author pijushb * @since 1/24/2012 */ if ( bShowBackOrderMessage ) { sPrevSku = jQuery('#previous_sku').val(); bReviewMessage = jQuery('#review_message_' + sPrevSku).is(':visible') if ( bReviewMessage ) { jQuery("#review_message_"+sPrevSku).hide(); } //- if ( bReviewMessage ) bSubmitButton = jQuery('#submit_button').is(':visible') if ( ! bSubmitButton ) { jQuery('#submit_button').show(); jQuery('#check_stock_button').show(); jQuery('#checkout_button').hide(); } //- if ( ! bSubmitButton ) } //- if ( bShowBackOrderMessage ) if ( bUseProductAliases ) { if ( 'pa_key' in oProdInfo ) { if ( oProdInfo.pa_key ) { jQuery('#pa_id').html(oProdInfo.pa_key); } //- if ( oProdInfo.pa_key ) } //- if ( 'pa_key' in oProdInfo ) } //- if ( bUseProductAliases ) /* * Displaying Config Data * @auther - vinayakj * @since - 5/2/2012 */ if ( bShowProdConfig ) { if ('prod_config_droplist' in oProdInfo) { jQuery('#config_sections_container').html(htmlDecode(oProdInfo.prod_config_droplist)); } else { jQuery('#config_sections_container').html(''); } /* * Put Config Keys */ if ( 'config_keys' in oProdInfo) { jQuery('#config_keys').val(oProdInfo.config_keys); if ( jQuery('#qty_box').length > 0 ) jQuery('#qty_box').attr('name', 'qty_' + oProdInfo.config_keys); } /* * Put use_parent_key */ if ( 'use_parent_key' in oProdInfo) { jQuery('#use_parent_key').val(oProdInfo.use_parent_key); } /* * Put show_config_sections */ if ('show_config_sections' in oProdInfo) { jQuery('#show_config_sections').val(oProdInfo.show_config_sections); if (oProdInfo.show_config_sections == "1") { jQuery.ajax({ url: '?pageaction=getconfigdata&config_key=' + jQuery('#config_keys').val() + '&key=' , cache: false , dataType: "html" , success: function(sResponse){ jQuery('#config_sections_container').html(htmlDecode(sResponse)); } }); } else { jQuery('#config_sections_container').html(''); } } } } catch ( oError ) { alert('fncProcessOptProduct(' + vOpt + '): ' + oError.message); hideProductContainer(); } } //- function fncProcessOptProduct ( vOpt ) function htmlDecode(value) { if (value) { return $('
    ').html(value).text(); } else { return ''; } } /** * Draw UOM Table * * @author johns * @since 3/17/2011 * @param sPKey string - the key of the product we are looking at * oData object - object containing the data from the ajax call * * @return UOM Table HTML */ function fncDrawUOM( sPKey, oData ) { try { /* * if the product price is blank, then exit the function */ if ( oData.price == ' ' ) { sUOMHtml = ''; return sUOMHtml; } /* * var containing html table structure to displayed containing the data */ var sUOMHtml = ''; var sQtyPerUnitColumn = ''; /* * make sure at least one of the show uom booleans is true */ if ( bShowSalesUOM || bOnlyShowSalesUOM || bShowAdditionalSalesUOM ) { /* * display title and hidden fields for the product */ sUOMHtml += '

    Add to Cart

    '; if ( 'uomStd' in oData ) { sUOMHtml += ''; } if ( 'uomSales' in oData ) { sUOMHtml += ''; sUOMHtml += ''; } sUOMHtml += ''; /* * determine whether or not to show the Qty Per Unit column */ if ( bShowQtyPerUnitColumn ) { sQtyPerUnitColumn = 'Qty Per Unit'; } //- if ( bShowQtyPerUnitColumn ) sUOMHtml += ''; sUOMHtml += '' + sQtyPerUnitColumn + ''; if ( bShowSalesUOM && ! bOnlyShowSalesUOM ) { /* * determine whether or not to show the Qty Per Unit column */ if ( bShowQtyPerUnitColumn ) { sQtyPerUnitColumn = ''; } //- if ( bShowQtyPerUnitColumn ) /* * draw Standard UOM row */ if ( 'uomStd' in oData ) { sUOMHtml += '' + sQtyPerUnitColumn + ''; } //- if ( 'uomStd' in oData ) if ( 'uomSales' in oData ) { if ( oData.uomSales != '' && oData.uomSalesConversion > 1 && oData.uomSales != oData.uomStd ) { /* * determine whether or not to show the Qty Per Unit column */ if ( bShowQtyPerUnitColumn ) { sQtyPerUnitColumn = ''; } //- if ( bShowQtyPerUnitColumn ) if ( typeof oData.uomSalesUnitPrice == 'undefined' ) { iUnitPrice = 0; } else { iUnitPrice = oData.uomSalesUnitPrice } //- if ( typeof oUomConfig.uomSalesUnitPrice == 'undefined' ) /* * draw UOM Sales row */ sUOMHtml += '' + sQtyPerUnitColumn + '' } //- if ( 'uomSales' in oData && 'uomSalesConversion' in oData )3 } //- if ( 'uomSales' in oData ) if ( bShowAdditionalSalesUOM ) { if ( 'uomAdditional' in oData && oData.uomAdditional.length > 0 ) { /* * draw additional uom rows */ for ( var iCounter = 0, iGoTo = oData.uomAdditional.length; iCounter < iGoTo; iCounter++ ) { var oUomConfig = oData.uomAdditional[iCounter]; var sQtyPerHTML = ''; if ( typeof oUomConfig != 'undefined' && typeof oUomConfig.conversion != 'undefined' ) { var sThisUom = iCounter + 1 /* * determine whether or not to show the Qty Per Unit column */ if ( bShowQtyPerUnitColumn ) { /* * calculating the qty per unit */ if ( iUOMConversion < 1 ) { iQty = 1 / iUOMConversion } else if ( iUOMConversion >= 1 ) { iQty = iUOMConversion } //- if ( iUOMConversion < 1 ) sQtyPerHTML = ''; } else { sQtyPerHTML = '' } //- if ( bShowQtyPerUnitColumn ) if ( typeof oUomConfig.unitPrice == 'undefined' ) { iUnitPrice = 0; } else { iUnitPrice = oUomConfig.unitPrice; } //- if ( typeof oUomConfig.unitPrice == 'undefined' ) /* * build the html w/ hidden inputs */ sUnitHTML = oUomConfig.unit + ''; sPriceHTML = '$' + parseFloat(iUnitPrice).toFixed(2) + ''; sUOMHtml += '' + sQtyPerHTML + '' } //- if ( typeof oUomConfig != 'undefined' && typeof oUomConfig.conversion != 'undefined' ) } //- for ( var i = 0, goTo = oProdInfo.documents.length - 1; i <= goTo; i++ ) } //- if ( 'uomAdditional' in oData ) } //- if ( bShowAdditionalSalesUOM ) } else if ( ! bShowSalesUOM && bOnlyShowSalesUOM ) { /* * only draw UOM Sales row */ sUOMHtml += '' } //- if ( bShowSalesUOM ) sUOMHtml += '
    Unit' + sUnitPriceColumnLabel + 'Qty
    1
    ' + oData.uomStd + '' + oData.price + ''; sUOMHtml += fncDrawQtyBox( sPKey, oData.qtyDisplayType, oData.uomStd, '' ); sUOMHtml += '
    ' + oData.uomSalesConversion + '
    ' + oData.uomSales + '$' + parseFloat(iUnitPrice).toFixed(2) + ''; sUOMHtml += fncDrawQtyBox( sPKey, oData.qtyDisplayType, oData.uomSales, 'sales_' ); sUOMHtml += '
    ' + iQty.toFixed() + '
    ' + sUnitHTML + '' + sPriceHTML + ''; sUOMHtml += fncDrawQtyBox( sPKey, oData.qtyDisplayType, oUomConfig.conversion, 'uom' + sThisUom + '_' ); sUOMHtml += '
    ' + oData.uomSales + '1$' + parseFloat(oData.uomSalesUnitPrice).toFixed(2) + ''; sUOMHtml += fncDrawQtyBox( sPKey, oData.qtyDisplayType, oData.uomSales ); sUOMHtml += '
    ' /* * Add to Cart button */ if ( oData.showCart ) { sUOMHtml += ''; } } //- if ( bShowSalesUOM || bOnlyShowSalesUOM || bShowAdditionalSalesUOM ) return sUOMHtml; } catch ( err ) { alert('function: fncDrawUOM - ' + err.message); return ''; } } //- function fncDrawUOM( sPKey, oData ) /** * Draw Qty Box for UOM Table * * @author johns * @since 3/17/2011 * * @returns void */ function fncDrawQtyBox( sPKey, sQtyDisplayType, sEachField, sPrefix ) { try { /** * Qty Input Display var */ var bUseQtyByUnitQtyDisplay = false; var sQtyInputHtml = ''; if ( bUseQtyByUnitQtyDisplay ) { if ( sQtyDisplayType == 'sets' ) { sQtyInputHtml += ' @'; sQtyInputHtml += ' ' + sEachField + ' (s) each.'; } else { sQtyInputHtml += '' } //- if ( oData.qtyDisplayType == 'sets' ) } else { sQtyInputHtml += '' } return sQtyInputHtml; } catch (err) { alert('function: fncDrawQtyBox
    ' + err.message); return ''; } } //- function fncDrawQtyBox( sPKey, oData, sEachField ) /* * This will build out the Cart Options with comments * @auther - vinayakj * @since - 8/28/2012 */ function buildCartOptWithComments(rowkey,sCartOptions,RowID){ if (jQuery('#parent_p_key').val() != '') { rowkey = jQuery('#parent_p_key').val(); } else { rowkey = jQuery('#keys').val(); } buildCartOpt(rowkey); } function buildCartOption ( PKey, sOptions, Num ) { /* * Get the cart options */ aCartOpts = sOptions.split("|"); /* * Clear the cart option container and start building it * with the new cart options */ jQuery('#pc_cart_options_' + Num).remove('.atc').html(''); var aOptInputs = Array(); var aLimitIds = Array(); /* * Loop all the cart options, and append each to the cart * option container. */ for ( var iOpt = 0, goTo = aCartOpts.length; iOpt < goTo; iOpt++ ) { aCartOpt = aCartOpts[iOpt].split('~'); sDisplay = aCartOpt[0]; sLabel = aCartOpt[1]; sType = aCartOpt[2]; sAnswers = aCartOpt[3]; if ( aCartOpt.length >= 4 ) { sCharLimit = aCartOpt[4]; } //- if ( aCartOpt.length >= 4 ) /* * Character Limit Logic */ bUseLimit = (sCharLimit != '0' && sCharLimit != '' ? true : false); /* * Input Id */ sOptId = 'cart_opt_' + iOpt + '_' + PKey; /* * Begin building this option */ sHtml = ''; /* * Append the option to the container */ jQuery('#pc_cart_options_' + Num).append(sHtml); /* * Register char counter event listener */ if(bUseLimit){ jQuery('#' + sOptId).live('keyup', {optId: sOptId, optLimit: sCharLimit}, function(event){ limitChars(event.data.optId, event.data.optLimit, event.data.optId + '_limit'); }); }//-if(bUseLimit) /* * Register input event listener */ jQuery('#' + sOptId).live(sJsEvent, {optId: sOptId, pkey: PKey}, function(event){ buildCartOpt(event.data.pkey); }); } //- for ( var iOpt = 0, goTo = aCartOpts.length; iOpt < goTo; iOpt++ ) jQuery('#pc_cart_options_' + Num).append(''); } //- function buildCartOption ( PKey, sOptions, Num ) function getCartOptOptions(sAnswers){ aAnswers = sAnswers.split(";"); sHtml = ''; for(i = 0, goTo = aAnswers.length; i < goTo; i++){ sHtml += ''; } return sHtml; }//-getCartOptOptions function limitChars(textid, limit, infodiv){ var text = jQuery('#' + textid).val(); var textlength = text.length; if (textlength > limit) { jQuery('#' + infodiv).html('You cannot write more then '+limit+' characters!'); jQuery('#' + textid).val(text.substr(0,limit)); return false; } else { jQuery('#' + infodiv).html('You have '+ (limit - textlength) +' characters left.'); return true; } }//-function limitChars function fncProcessSizeProduct(){ try{ var sPKey = jQuery('#prod_opt2').val(); var bUseChildDescription = false; var oProdInfo = window.oChildProds[sPKey]; if ( sPKey == '' ) { hideProductContainer(); return false; } jQuery('#qty_box').attr( 'name', 'qty_' + sPKey ); jQuery('#keys').val( sPKey ); /* * Test if this is the "last" droplist being displayed */ if ( jQuery('#pc_cart_options_2').length > 0 ) { jQuery('#pc_cart_options_2').slideDown(); /* * Change name to post item to the cart */ jQuery('#cart_option_436370EE366F4917B4D24FC4A4423155').attr('name','cart_option_' + sPKey); } //- if ( jQuery('#pc_cart_options_2').length > 0 ) /* * SKU */ jQuery('#sku_container').html( 'SKU: ' + oProdInfo.sku ); /* * Cart */ if ( oProdInfo.showCart ) { jQuery('#atc_container').show(); } else { jQuery('#atc_container').hide(); } //- if ( oProdInfo.showCart ) /* * Unit of Measure */ if ( 'uomHTML' in oProdInfo ) { if ( oProdInfo.uomHTML != '' ) jQuery('#detail_atc_standalone').html(oProdInfo.uomHTML); } //- if ( 'uomHTML' in oProdInfo ) /* * Price */ if ( oProdInfo.showPrice ) { iRetailPrice = parseFloat(oProdInfo.retail_price.replace('$','')); iPrice = parseFloat(oProdInfo.price.replace('$','')); if ( iPrice < iRetailPrice ) { iPercent = (iRetailPrice - iPrice) / iRetailPrice; iPercentSaved = iPercent * 100; jQuery('#price_container').html(''); } else { jQuery('#price_container').html(''); } //-if(iPrice < iRetailPrice) } //- if(oProdInfo.showPrice) /* *Add hidden field for qty available to check back order. *@author pijushb *@since 9/28/2011 */ if ( bShowBackOrderMessage ) { jQuery('.qtyavailable').remove(); jQuery('#idp_container') .parent() .append('') } //- if (bShowBackOrderMessage) /* * Use Child Product Description * * @author johns * @since 11/6/2010 */ if ( bUseChildDescription ) { if ('desription' in oProdInfo) { if (oProdInfo.desription) { jQuery('#detail_desc_content_0').html(oProdInfo.desription); } //- if (oProdInfo.ds) } //- if ('ds' in oProdInfo) } //- if (bUseChildDescription) if ( bUseProductAliases ) { if ( jQuery.trim(oProdInfo.pa_key) != '' ) { jQuery('#pa_id').val(oProdInfo.pa_key); jQuery('#pa_id').attr('name','pa_id_' + sPKey); } //- if jQuery.trim(oProdInfo.pa_key) != '' ) } //- if ( bUseProductAliases ) /* * Inventory */ if ( oProdInfo.showInventory ) { jQuery('#idp_container').html(oProdInfo.invMsg); /* * if status = out then show "add product to watch list" link * * @author johns * @since 12/11/2009 */ } //- if ( oProdInfo.showInventory ) /* * Append Favorite link with Child Product Key * @auther - vinayakj * @since - 6/5/2012 */ if (bShowFavoriteLink && bShowChildFavoriteLink && jQuery('#idp_container li[id="addfave"]').length === 0) { jQuery('#idp_container').append(''); tb_init('#idp_container a.thickbox, area.thickbox, input.thickbox'); } /* * Displaying Config Data * @auther - vinayakj * @since - 5/2/2012 */ if ( bShowProdConfig ) { if ( 'prod_config_droplist' in oProdInfo) { jQuery('#config_sections_container').html(htmlDecode(oProdInfo.prod_config_droplist)); } else { jQuery('#config_sections_container').html(''); } /* * Put Config Keys */ if ( 'config_keys' in oProdInfo) { jQuery('#config_keys').val(oProdInfo.config_keys); } /* * Put use_parent_key */ if ( 'use_parent_key' in oProdInfo) { jQuery('#use_parent_key').val(oProdInfo.use_parent_key); } /* * Put show_config_sections */ if ( 'show_config_sections' in oProdInfo) { jQuery('#show_config_sections').val(oProdInfo.show_config_sections); } } } catch ( oError ){ alert(oError.message); hideProductContainer(); } }//-function fncProcessSizeProduct function fncSelectAddon(){ //Update Design Key & Qty document.getElementById('design_keys_'+sGroup).value = sDesignKey; document.getElementById('design_qty_'+sGroup).name = 'ED8EF1597D7F4D0797F652145C64714C_' + sDesignKey + '_qty'; } function InArray(vArray, vValue){ for (var iOpt = 0; iOpt < vArray.length; iOpt++){ if (vArray[iOpt]==vValue){ return true; } } return false; } function ResizeLoadingBG ( bDisableDroplistForm ) { if ( bDisableDroplistForm === 'undefined' ) fncDisableDroplistForm(); var oLBG = document.getElementById('detailloadingbg'); var oLPic = document.getElementById('detailloadingpic'); var popwidth = 200; if (window.innerHeight && window.scrollMaxY) { oLBG.style.width = document.body.scrollWidth; oLBG.style.height = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac oLBG.style.width = document.body.scrollWidth; oLBG.style.height = document.body.scrollHeight; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari oLBG.style.width = document.body.offsetWidth; oLBG.style.height = document.body.offsetHeight; } if (self.innerHeight) { // all except Explorer oLPic.style.left = (self.innerWidth / 2) - (popwidth / 2); oLPic.style.top = self.pageYOffset + (self.innerHeight / 4); } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode oLPic.style.left = (document.documentElement.clientWidth / 2) - (popwidth / 2); oLPic.style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight / 4); } else if (document.body) { // other Explorers oLPic.style.left = (document.body.clientWidth / 2) - (popwidth / 2); oLPic.style.top = document.body.scrollTop + (document.body.clientHeight / 4); } oLBG.style.display = 'block'; oLPic.style.display = 'block'; } function HideLoading(){ document.getElementById('detailloadingbg').style.display = 'none'; document.getElementById('detailloadingpic').style.display = 'none'; fncEnableDroplistForm(); } function createXMLDoc(XMLFile) { // code for IE if (window.ActiveXObject){ xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.loadXML(XMLFile); // code for Mozilla, Firefox, Opera, etc. } else if (document.implementation && document.implementation.createDocument){ //xmlDoc = document.implementation.createDocument("", "", null); var parser = new DOMParser(); var xmlDoc = parser.parseFromString(XMLFile, "text/xml"); } else { alert('Your browser cannot handle this script.'); } return(xmlDoc); } function getNodeValue(xmlDoc, tagName, index) { if (xmlDoc.getElementsByTagName(tagName)[index].childNodes[0] != null) return xmlDoc.getElementsByTagName(tagName)[index].childNodes[0].nodeValue; else return ''; } function MakeAJAXRequest(fncHandleData, strPage, bAsync, aShow, aHide, bDisable, errorMsg, xmlDoc, vID) { ResizeLoadingBG(); xmlHttp = GetXmlHttpObject(); if (xmlHttp==null){ alert ("Your browser does not support AJAX."); return; } if (bDisable == null){ bDisable = false; } var i; try{ if (aShow != null){ for (i = 0; i < aShow.length; i++){ if (bDisable==true){ document.getElementById(aHide[i]).disabled = false; } else { document.getElementById(aShow[i]).style.display = 'block'; } } } } catch (err){ alert(err.message); } try{ if (aHide != null){ for (i = 0; i < aHide.length; i++){ if (bDisable==true){ document.getElementById(aHide[i]).disabled = true; } else { document.getElementById(aHide[i]).style.display = 'none'; } } } } catch (err){ alert(err.message); } xmlHttp.open('get', strPage + '&r_id=' + genID(), bAsync); xmlHttp.onreadystatechange = function() { HandleData(fncHandleData, errorMsg, vID) }; if (xmlDoc == undefined){ xmlDoc = null; } xmlHttp.send(xmlDoc); } function HandleData(fncHandleData, errorMsg, vID) { if (errorMsg == undefined || errorMsg == "") errorMsg = "An error has occured." if(xmlHttp.readyState == 4) { //Finished loading the response //var xmlDoc = xmlHttp.responseXML.documentElement; //alert(xmlHttp.responseText); xmlDoc = createXMLDoc(xmlHttp.responseText); if (xmlDoc == null) { alert(errorMsg); HideLoading() } else { fncHandleData(xmlDoc, vID); } } } function NumbersOnly(myfield, e){ var key; var keychar; if (window.event) key = window.event.keyCode; else if (e) key = e.which; else return true; keychar = String.fromCharCode(key); // control keys if ((key==null) || (key==0) || (key==8) || (key==9) || (key==27) ){ //alert('control keys'); return true; // no enters } else if ((key==13) || (key==32)){ //alert('no enters'); return false; // only one deicmal } else if (keychar=='.' && myfield.value.indexOf('.')>-1){ //alert('only one deicmal'); return false; // numbers } else if ((("0123456789").indexOf(keychar) > -1)){ //alert('numbers'); return true; // isNaN } else if (isNaN(myfield.value)){ //alert('isNaN'); myfield.value = ''; return false; } else { //alert('Else'); return false; } } // Open lightbox function fncDrawFindPopup(popwidth,popheight,searchtype,showsearch,key,qstring){ //document.getElementById('lb_open_type').value = searchtype; //var ckey = childkey.replace('?', ''); lightbox_pageScrollX = document.body.scrollLeft; lightbox_pageScrollY = document.body.scrollTop; lightbox_bIsOpen = true; document.getElementById('popup').style.width=popwidth + 'px'; document.getElementById('popup').style.height=popheight + 'px'; document.getElementById('lostfocus').style.display = 'block'; document.getElementById('popup').style.display = 'block'; lightbox_Position(); document.getElementById('searchtype').value=searchtype; //document.getElementById('lightbox_header').innerHTML=header; document.getElementById('popup_search_text').value=''; document.getElementById('popupdesc').innerHTML=''; if (showsearch == '0'){ document.getElementById('popup_search_section').style.display='none'; } // Fix IE for DTD 4.0 if (ie && document.documentElement && document.compatMode == 'CSS1Compat') { document.getElementById('popup_search_results_container').style.height = (document.getElementById('popup_search_results_container').offsetHeight - 1 - (document.getElementById("popupheader").offsetHeight + document.getElementById("popupdesc").offsetHeight + document.getElementById("popup_search_section").offsetHeight)) + 'px'; } document.getElementById('lostfocus').style.visibility = 'visible'; document.getElementById('popup').style.visibility = 'visible'; //document.getElementById('popup_search_results').innerHTML = '