var fonts_tobeinit=new Array();var inkcolors_tobeinit=new Array();var greetings_tobeinit=new Array();var layouts_tobeinit=new Array();var monograms_tobeinit=new Array();var motifs_tobeinit=new Array();var papercolors_tobeinit=new Array();var foreground_papercolors_tobeinit=new Array();var background_papercolors_tobeinit=new Array();var foreground_colors_tobeinit=new Array();var background_colors_tobeinit=new Array();var foil_colors_tobeinit=new Array();var foilborder_colors_tobeinit=new Array();var napkin_colors_tobeinit=new Array();var dominantinkcolors_tobeinit=new Array();var accentinkcolors_tobeinit=new Array();var scents_tobeinit=new Array();var coordinated_exist='N';var ribbon_exist='N';var liner_exist='N';var extra_exist='N';var essential_exist='N';var p_essential_exist='N';function getCoordinatedInfo(id){for(coordinated_cnt=0;coordinated_cnt<coordinated_infos.length;coordinated_cnt++){if(coordinated_infos[coordinated_cnt][0]==id){return coordinated_infos[coordinated_cnt];}}};function getRibbonInfo(id){for(ribbon_cnt=0;ribbon_cnt<ribbon_infos.length;ribbon_cnt++){if(ribbon_infos[ribbon_cnt][0]==id){return ribbon_infos[ribbon_cnt];}}};function getLinerInfo(id){for(liner_cnt=0;liner_cnt<liner_infos.length;liner_cnt++){if(liner_infos[liner_cnt][0]==id){return liner_infos[liner_cnt];}}};function _onkeypress(){return false;};function formatPrice(price){price=price+"";if(price.indexOf(".")!= -1){tmp=price.split(".");price_int=tmp[0];price_rest=tmp[1];if(price_rest!=null){if(price_rest.length==0){price_rest='00';}else if(price_rest.length==1){price_rest=price_rest+'0';}else if(price_rest.length>2){price_rest=price_rest.substring(0,2);}}else price_rest='00';return price_int+'.'+price_rest;}else{if(price=="NaN")return price;else return price+".00";}};function showGiftDiv(){var giftmsgdivinnerstyle=getStyleObject("div_gift_message");if(document.form_0.chkShowGiftMsgBlock){if(document.form_0.chkShowGiftMsgBlock.checked)giftmsgdivinnerstyle.display='block';else giftmsgdivinnerstyle.display='none';}else giftmsgdivinnerstyle.display='none';};function changeFontDiv(id){box=document.form_0.elements[id];try{getElement('current_font_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/fonts/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";}catch(Ex){}};function changeMonogramDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_monogram_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/monograms/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";}catch(Ex){}};function changeGreetingDiv(id){box=document.form_0.elements[id];try{getElement('current_greeting_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/images/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";}catch(Ex){}};function changeMotifDiv(id){box=document.form_0.elements[id];try{getElement('current_motif_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/motifs/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";}catch(Ex){}};function changeLayoutDiv(id){box=document.form_0.elements[id];try{getElement('current_layout_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/layouts/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";}catch(Ex){}};function showHighlightedColorDiv(highlighter_element,highlighted_color_element){try{highlighter_element.style.left=highlighted_color_element.offsetLeft;highlighter_element.style.top=highlighted_color_element.offsetTop;highlighter_element.style.display='block';}catch(Ex){}};function changeInkColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_inkcolor_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/colors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changeDominantInkColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_dominantinkcolor_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/colors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changeAccentInkColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_accentinkcolor_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/colors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changePaperColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_papercolor_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changeForegroundPaperColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_foreground_papercolor_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));if(box.options[box.selectedIndex].value.replace(/\s/g,"")=="White"){getElement('current_foreground_papercolor_2').src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/WhiteNoBrdr.jpg";}else{getElement('current_foreground_papercolor_2').src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";}}catch(Ex){}};function changeBackgroundPaperColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_background_papercolor_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));getElement('current_background_papercolor_2').src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";}catch(Ex){}};function changeScentColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_scentcolor_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/scentcolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changeForegroundColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_foreground_color_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changeBackgroundColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_background_color_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changeFoilColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_foil_color_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changeFoilBorderColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_foilborder_color_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function changeNapkinColorDiv(id,currentproduct_mfgname){box=document.form_0.elements[id];try{getElement('current_napkin_color_'+id).src=sImageServerURL+"/intershoproot/eCS/Store/en/imagesOnline/papercolors/"+currentproduct_mfgname+"/"+box.options[box.selectedIndex].value.replace(/\s/g,"")+".jpg";showHighlightedColorDiv(getElement('highlighter_'+id),getElement('highlighted_'+id+'_'+box.options[box.selectedIndex].value.replace(/\s/g,"")));}catch(Ex){}};function updatePriceCalc_Env(pref,base_price,price_inc,setup_fee,fee_cost){var cost="";qty=document.form_0.elements['main_personalized'].value;env_obj=document.form_0.elements['pc_qbtp_qty_envelope'];env_obj.value=qty;document.form_0.elements['Quantity_'+env_obj.id].value=qty;var printed_checkbox=document.form_0.elements['pc_envelope_personalized'];if(printed_checkbox&&printed_checkbox.checked){document.form_0.elements['Personalized_'+env_obj.id].value='Y';var i_price_inc=price_inc;if(i_price_inc!=0)i_add_on=parseInt((qty-1)/i_price_inc+1);else i_add_on=0;cost=(base_price*qty+setup_fee+fee_cost*i_add_on).toFixed(2);getElement("div_pc_envelope_printfee").innerHTML=(setup_fee+fee_cost*i_add_on).toFixed(2);}else{document.form_0.elements['Personalized_'+env_obj.id].value='N';cost="";getElement("div_pc_envelope_printfee").innerHTML="";}div_cost_obj=getElement('div_pc_envelope_cost');div_cost_obj.innerHTML=cost;updatePriceCalc_Total();};function updatePriceCalc_Liner(pref){qty=document.form_0.elements['pc_qbtp_qty_liner'].value;liner_info=getLinerInfo(pref);if(liner_info!=null){blank_itxt=parseFloat(liner_info[1])*qty;divLinerPrice=getElement('div_pc_liner_cost');divLinerPrice.innerHTML=formatPrice(blank_itxt);}var liner_box=document.form_0.elements['pc_liner_selection'];for(i=0;i<liner_box.options.length;i++){if(liner_box.options[i].value==pref){document.form_0.elements['Quantity_'+pref].value=qty;document.form_0.elements['CoordinatedSelected_'+pref].value='Y';getElement(pref).checked=true;}else{document.form_0.elements['Quantity_'+liner_box.options[i].value].value="";document.form_0.elements['CoordinatedSelected_'+liner_box.options[i].value].value='N';getElement(liner_box.options[i].value).checked=false;}}if((liner_box.options[0].selected)&&(liner_box.value.indexOf("-inc@")<=0)){document.form_0.elements['Quantity_'+pref].value="";document.form_0.elements['CoordinatedSelected_'+pref].value='N';getElement(pref).checked=false;}updatePriceCalc_Total();};function updatePriceCalc_Ribbon(pref){qty=document.form_0.elements['pc_qbtp_qty_ribbon'].value;ribbon_info=getRibbonInfo(pref);if(ribbon_info!=null){blank_itxt=parseFloat(ribbon_info[1])*qty;divRibbonPrice=getElement('div_pc_ribbon_cost');divRibbonPrice.innerHTML=formatPrice(blank_itxt);}var ribbon_box=document.form_0.elements['pc_ribbon_selection'];for(i=0;i<ribbon_box.options.length;i++){if(ribbon_box.options[i].value==pref){document.form_0.elements['Quantity_'+pref].value=qty;document.form_0.elements['CoordinatedSelected_'+pref].value='Y';getElement(pref).checked=true;}else{document.form_0.elements['Quantity_'+ribbon_box.options[i].value].value="";document.form_0.elements['CoordinatedSelected_'+ribbon_box.options[i].value].value='N';getElement(ribbon_box.options[i].value).checked=false;}}if((ribbon_box.options[0].selected)&&(ribbon_box.value.indexOf("-inc@")<=0)){document.form_0.elements['Quantity_'+pref].value="";document.form_0.elements['CoordinatedSelected_'+pref].value='N';getElement(pref).checked=false;}updatePriceCalc_Total();};function updatePriceCalc_Coordinated(pref,qty,price_inc,base_price,setup_fee,fee_cost,mode){var cost="";var printed_checkbox=document.form_0.elements['pc_coordinated_personalized_'+pref];if(qty==null||qty==""){qty=document.form_0.elements['pc_coordinated_qty_'+pref].value;}if(qty==''){document.form_0.elements['Quantity_'+pref].value="";document.form_0.elements['Personalized_'+pref].value='N';document.form_0.elements['CoordinatedSelected_'+pref].value='N';getElement(pref).checked=false;if(printed_checkbox&&printed_checkbox.checked){if(document.form_0.elements['rd_pc_coordinated_personalized_'+pref]){document.form_0.elements['rd_pc_coordinated_personalized_'+pref][0].checked=false;document.form_0.elements['rd_pc_coordinated_personalized_'+pref][1].checked=false;if(mode&&mode=="check")alert("You need to select the quantity for this item!");}}}else{document.form_0.elements['Quantity_'+pref].value=qty;document.form_0.elements['CoordinatedSelected_'+pref].value='Y';getElement(pref).checked=true;if(printed_checkbox&&printed_checkbox.checked){document.form_0.elements['Personalized_'+pref].value='Y';var i_price_inc=price_inc;if(i_price_inc!=0)i_add_on=parseInt((qty-1)/i_price_inc+1);else i_add_on=0;cost=(base_price*qty+setup_fee+fee_cost*i_add_on).toFixed(2);if(document.form_0.elements['rd_pc_coordinated_personalized_'+pref])document.form_0.elements['rd_pc_coordinated_personalized_'+pref][0].checked=true;getElement('div_pc_printfee_'+pref).innerHTML=(setup_fee+fee_cost*i_add_on).toFixed(2);}else{document.form_0.elements['Personalized_'+pref].value='N';cost=(base_price*qty).toFixed(2);getElement('div_pc_printfee_'+pref).innerHTML="";}}div_cost_obj=getElement('div_pc_'+pref);div_cost_obj.innerHTML=cost;updatePriceCalc_Total();};function updatePriceCalc_qbtp(pref,base_price){var cost="";qty=document.form_0.elements['main_personalized'].value;if(qty==''){getElement(pref).checked=false;}else{qbtp_checkbox=document.form_0.elements['pc_coordinated_qty_'+pref];if(qbtp_checkbox&&qbtp_checkbox.checked){document.form_0.elements['pc_coordinated_qty_'+pref].value=qty;document.form_0.elements['Quantity_'+pref].value=qty;document.form_0.elements['Personalized_'+pref].value='N';document.form_0.elements['CoordinatedSelected_'+pref].value='Y';getElement(pref).checked=true;cost=(base_price*qty).toFixed(2);}else{document.form_0.elements['pc_coordinated_qty_'+pref].value="";document.form_0.elements['Quantity_'+pref].value="";document.form_0.elements['Personalized_'+pref].value='N';document.form_0.elements['CoordinatedSelected_'+pref].value='N';getElement(pref).checked=false;cost="";}}div_cost_obj=getElement('div_pc_'+pref);div_cost_obj.innerHTML=cost;updatePriceCalc_Total();};function updatePriceCalc_Essential(pref,qty,base_price,price_inc,setup_fee,fee_cost,mode){var cost="";var printed_checkbox=document.form_0.elements['pc_essential_personalized_'+pref];if(qty==null||qty==""){qty=document.form_0.elements['pc_essential_qty_'+pref].value;}obj_ess_env=document.form_0.elements['pc_essential_envelope_qty_'+pref];if(obj_ess_env){obj_ess_env.value=(qty=="")?"":qty;}if(qty==''){document.form_0.elements['Quantity_'+pref].value="";document.form_0.elements['EssentialSelected_'+pref].value="N";document.form_0.elements['Personalized_'+pref].value="N";getElement(pref).checked=false;var ess_env_checkbox=document.form_0.elements['pc_essential_envelope_personalized_'+pref];if(ess_env_checkbox){ess_env_checkbox.checked=true;ess_env_checkbox.click();document.form_0.elements['rd_pc_essential_envelope_personalized_'+pref][1].checked=true;document.form_0.elements['rd_pc_essential_envelope_personalized_'+pref][0].disabled=true;document.form_0.elements['rd_pc_essential_envelope_personalized_'+pref][1].disabled=true;}if(document.form_0.elements['rd_pc_essential_personalized_'+pref]&&printed_checkbox&&printed_checkbox.checked){document.form_0.elements['rd_pc_essential_personalized_'+pref][0].checked=false;document.form_0.elements['rd_pc_essential_personalized_'+pref][1].checked=false;if(mode&&mode=="check")alert("You need to select the quantity for this item!");}}else{document.form_0.elements['Quantity_'+pref].value=qty;document.form_0.elements['EssentialSelected_'+pref].value="Y";getElement(pref).checked=true;ess_env_checkbox=document.form_0.elements['pc_essential_envelope_personalized_'+pref];if(printed_checkbox&&printed_checkbox.checked){document.form_0.elements['Personalized_'+pref].value="Y";var i_price_inc=price_inc;if(i_price_inc!=0)i_add_on=parseInt((qty-1)/i_price_inc+1);else i_add_on=0;cost=(base_price*qty+setup_fee+fee_cost*i_add_on).toFixed(2);if(document.form_0.elements['rd_pc_essential_personalized_'+pref])document.form_0.elements['rd_pc_essential_personalized_'+pref][0].checked=true;getElement('div_pc_printfee_'+pref).innerHTML=(setup_fee+fee_cost*i_add_on).toFixed(2);if(ess_env_checkbox){if(ess_env_checkbox.checked){ess_env_checkbox.checked=false;ess_env_checkbox.click();}document.form_0.elements['rd_pc_essential_envelope_personalized_'+pref][0].disabled=false;document.form_0.elements['rd_pc_essential_envelope_personalized_'+pref][1].disabled=false;}}else{document.form_0.elements['Personalized_'+pref].value="N";cost=(base_price*qty).toFixed(2);getElement('div_pc_printfee_'+pref).innerHTML="";if(ess_env_checkbox){ess_env_checkbox.checked=true;ess_env_checkbox.click();document.form_0.elements['rd_pc_essential_envelope_personalized_'+pref][1].checked=true;document.form_0.elements['rd_pc_essential_envelope_personalized_'+pref][0].disabled=true;document.form_0.elements['rd_pc_essential_envelope_personalized_'+pref][1].disabled=true;}}}div_cost_obj=getElement('div_pc_'+pref);div_cost_obj.innerHTML=cost;updatePriceCalc_Total();};function updatePriceCalc_Essential_Env(pref,base_price,price_inc,setup_fee,fee_cost,b_pref){var cost="";qty=document.form_0.elements['pc_essential_envelope_qty_'+pref].value;var printed_checkbox=document.form_0.elements['pc_essential_envelope_personalized_'+pref];if(qty!=""){document.form_0.elements['Quantity_'+b_pref].value=qty;getElement(b_pref).checked=true;if(printed_checkbox&&printed_checkbox.checked){document.form_0.elements['Personalized_'+b_pref].value="Y";var i_price_inc=price_inc;if(i_price_inc!=0)i_add_on=parseInt((qty-1)/i_price_inc+1);else i_add_on=0;cost=(base_price*qty+setup_fee+fee_cost*i_add_on).toFixed(2);getElement('div_pc_essential_envelope_printfee_'+pref).innerHTML=(setup_fee+fee_cost*i_add_on).toFixed(2);}else{document.form_0.elements['Personalized_'+b_pref].value="N";cost="";getElement('div_pc_essential_envelope_printfee_'+pref).innerHTML="";}}else{document.form_0.elements['Quantity_'+b_pref].value="";document.form_0.elements['Personalized_'+b_pref].value="N";getElement(b_pref).checked=false;}div_cost_obj=getElement('div_pc_essential_envelope_cost_'+pref);div_cost_obj.innerHTML=cost;updatePriceCalc_Total();};function updatePriceCalc_Total(){var total_cost=0;var primary_product_cost=0;var ribbon_product_cost=0;var liner_product_cost=0;var coordinated_product_cost=0;var essential_product_cost=0;var essential_p_product_cost=0;var envelope_personalization_cost=0;div_primary_product_cost_obj=getElement('div_primary_product_cost');if(div_primary_product_cost_obj.innerHTML!=""){primary_product_cost=parseFloat(div_primary_product_cost_obj.innerHTML);}div_env_cost_obj=getElement('div_pc_envelope_cost');if(div_env_cost_obj)if(div_env_cost_obj.innerHTML!=""){envelope_personalization_cost=parseFloat(div_env_cost_obj.innerHTML);}div_ribbon_product_cost_obj=getElement('div_pc_ribbon_cost');if(div_ribbon_product_cost_obj)if(div_ribbon_product_cost_obj.innerHTML!=""){ribbon_product_cost=parseFloat(div_ribbon_product_cost_obj.innerHTML);}div_liner_product_cost_obj=getElement('div_pc_liner_cost');if(div_liner_product_cost_obj)if(div_liner_product_cost_obj.innerHTML!=""){liner_product_cost=parseFloat(div_liner_product_cost_obj.innerHTML);}if(coordinated_exist=='Y'){for(i=0;i<coordinated_infos.length;i++){if((coordinated_infos[i][0]!="")&&(document.form_0.elements['pc_coordinated_qty_'+coordinated_infos[i][0]].value!="")){coordinated_product_cost=parseFloat(coordinated_product_cost)+parseFloat(getElement('div_pc_'+coordinated_infos[i][0]).innerHTML);}}}if(typeof essentials_infos!="undefined")for(i=0;i<essentials_infos.length;i++){if((essentials_infos[i][0]!="")&&(document.form_0.elements['pc_essential_qty_'+essentials_infos[i][0]])&&(document.form_0.elements['pc_essential_qty_'+essentials_infos[i][0]].value!="")){essential_product_cost=parseFloat(essential_product_cost)+parseFloat(getElement('div_pc_'+essentials_infos[i][0]).innerHTML);}}if(typeof p_essentials_infos!="undefined")for(i=0;i<p_essentials_infos.length;i++){if((p_essentials_infos[i][0]!="")&&(document.form_0.elements['pc_essential_qty_'+p_essentials_infos[i][0]])&&(document.form_0.elements['pc_essential_qty_'+p_essentials_infos[i][0]].value!="")){essential_p_product_cost=parseFloat(essential_p_product_cost)+parseFloat(getElement('div_pc_'+p_essentials_infos[i][0]).innerHTML);var ess_env_checkbox=document.form_0.elements['pc_essential_envelope_personalized_'+p_essentials_infos[i][0]];if(ess_env_checkbox&&ess_env_checkbox.checked)essential_p_product_cost=parseFloat(essential_p_product_cost)+parseFloat(getElement('div_pc_essential_envelope_cost_'+p_essentials_infos[i][0]).innerHTML);}}total_cost=parseFloat(primary_product_cost)+parseFloat(liner_product_cost)+parseFloat(coordinated_product_cost)+parseFloat(essential_product_cost)+parseFloat(essential_p_product_cost)+parseFloat(envelope_personalization_cost)+parseFloat(ribbon_product_cost);div_pc_total_cost=getElement('pc_total_cost');div_pc_total_cost.innerHTML="Total Before Shipping: $"+total_cost.toFixed(2);};function updatePriceCalc(qty,pref,f_base_price,i_price_inc,f_setup_fee,f_fee_cost){var printed_checkbox=document.form_0.elements['pc_main_personalized_'+pref];obj_env_checkbox=document.form_0.elements['pc_envelope_personalized'];document.form_0.elements['Quantity_'+pref].value=qty;if(printed_checkbox.checked){document.form_0.elements['Personalized_'+pref].value='Y';if(i_price_inc!=0){i_add_on=parseInt((qty-1)/i_price_inc+1);}else{i_add_on=0;}var cost=(f_base_price*qty+f_setup_fee+f_fee_cost*i_add_on).toFixed(2);div_primary_product_cost_obj=getElement('div_primary_product_cost');div_primary_product_cost_obj.innerHTML=cost;getElement('div_primary_product_printfee').innerHTML=(f_setup_fee+f_fee_cost*i_add_on).toFixed(2);if(obj_env_checkbox){if(obj_env_checkbox.checked){obj_env_checkbox.checked=false;obj_env_checkbox.click();}else{obj_env_checkbox.checked=true;obj_env_checkbox.click();}document.form_0.elements['rd_pc_envelope_personalized'][0].disabled=false;document.form_0.elements['rd_pc_envelope_personalized'][1].disabled=false;}if(document.form_0.elements['pc_ribbon_selection']){document.form_0.elements['pc_ribbon_selection'].disabled=false;}}else{document.form_0.elements['Personalized_'+pref].value='N';var cost=(f_base_price*qty).toFixed(2);div_primary_product_cost_obj=getElement('div_primary_product_cost');div_primary_product_cost_obj.innerHTML=cost;getElement('div_primary_product_printfee').innerHTML="";if(obj_env_checkbox){obj_env_checkbox.checked=true;obj_env_checkbox.click();document.form_0.elements['rd_pc_envelope_personalized'][1].checked=true;document.form_0.elements['rd_pc_envelope_personalized'][0].disabled=true;document.form_0.elements['rd_pc_envelope_personalized'][1].disabled=true;}if(document.form_0.elements['pc_ribbon_selection']){document.form_0.elements['pc_ribbon_selection'].selectedIndex=0;document.form_0.elements['pc_ribbon_selection'].onchange();document.form_0.elements['pc_ribbon_selection'].disabled=true;}}for(k=0;k<document.form_0.elements.length;k++){el=document.form_0.elements[k];if(el.name.indexOf("pc_qbtp_qty_")!= -1){var set_qty_obj;if(el.name.indexOf("pc_qbtp_qty_coordinated_")!= -1)set_qty_obj=document.form_0.elements['pc_coordinated_qty_'+el.id];else if(el.name.indexOf("pc_qbtp_qty_envelope")!= -1){set_qty_obj=document.form_0.elements['pc_qbtp_qty_envelope'];}else set_qty_obj=document.form_0.elements[el.id];if(set_qty_obj.type=="checkbox"){if(set_qty_obj.checked){set_qty_obj.value=qty;set_qty_obj.checked=false;set_qty_obj.click();}}else{set_qty_obj.value=qty;if(ribbon_exist=='Y'){obj_ribbon_box=document.form_0.elements['pc_ribbon_selection'];if((obj_ribbon_box.selectedIndex!=0)||((obj_ribbon_box.selectedIndex==0)&&(obj_ribbon_box.value.indexOf("-inc@")>0))){updatePriceCalc_Ribbon(obj_ribbon_box.value);}}if(liner_exist=='Y'){obj_liner_box=document.form_0.elements['pc_liner_selection'];if((obj_liner_box.selectedIndex!=0)||((obj_liner_box.selectedIndex==0)&&(obj_liner_box.value.indexOf("-inc@")>0))){updatePriceCalc_Liner(obj_liner_box.value);}}}}else if(el.name.indexOf("pc_coordinated_personalized_")!= -1){if(printed_checkbox.checked){if(el.id&&el.id=="onlyavailableprinted"){}else{if(el.name.indexOf("rd_pc_coordinated_personalized_")!= -1){el.disabled=false;}if(el.name=='pc_coordinated_personalized_earlyenvelope')el.style.display='block';if(getElement('pc_earlyenvelope_label'))getElement('pc_earlyenvelope_label').style.display='block';if(getElement('pc_earlyenvelope_cost_label'))getElement('pc_earlyenvelope_cost_label').style.display='block';}}else{if(el.name.indexOf("rd_pc_coordinated_personalized_")!= -1){if(el.value=="blank")el.checked=true;else el.checked=false;el.disabled=true;}else{el.checked=true;el.click();}if(el.name=='pc_coordinated_personalized_earlyenvelope')el.style.display='none';if(getElement('pc_earlyenvelope_label'))getElement('pc_earlyenvelope_label').style.display='none';if(getElement('pc_earlyenvelope_cost_label'))getElement('pc_earlyenvelope_cost_label').style.display='none';}}}updatePriceCalc_Total();};function updatePriceCalc_Unpersonalized(qty,base_price,pref){var cost=(base_price*qty).toFixed(2);div_primary_product_cost_obj=getElement('div_primary_product_cost');div_primary_product_cost_obj.innerHTML=cost;document.form_0.elements['Quantity_'+pref].value=qty;updatePriceCalc_Total();};var blankorder_popup_shown=false;function beginPopupDiv(divID){document.write('<div id="'+divID+'" class="popupDiv">');document.write('<div class="popupDivBG"></div>');document.write('<div class="popupDivFG">');document.write('<table cellpadding="0" cellspacing="0" class="popupDivContent">');document.write('<tr>');document.write('<td align="center">');};function endPopupDiv(){document.write('</td>');document.write('</tr>');document.write('</table>');document.write('</div>');document.write('</div>');};function _rpd(){divID="d_alert";beginPopupDiv(divID);document.write('<div id="'+divID+'_inner">');document.write('<table cellpadding="3" cellspacing="0" border="0" width="100%" class="formcopy">');document.write('	<tr>');document.write('		<td class="formcopy color_Black" align="center" valign="top" colspan="2">');document.write('			<b>One or more items are selected Blank.</b>');document.write('			<br><span class="special-label-color">Please click PROCEED to order as selected.</span>');document.write('		</td>');document.write('	</tr>');document.write('	<tr>');document.write('		<td class="formcopy" align="center" valign="top" colspan="2">');document.write('		  <table cellpadding="0" cellspacing="0">');document.write('		  <tr>');document.write('		  <td valign="middle" align="left" style="padding-right:10px;">');document.write('			  <a style="cursor:hand;" onclick="hidePopupDiv();return false;"><img src="/intershoproot/eCS/Store/en/imagesOnline/theme/bttn_no_changeprintoptions.gif"></a>');document.write('			</td>');document.write('		  <td valign="middle" align="left" style="padding-left:10px;">');document.write('		  	<a style="cursor:hand;" onclick="submitandhidePopupDiv();"><img src="/intershoproot/eCS/Store/en/imagesOnline/theme/bttn_yes.gif"></a>');document.write('		  </td>');document.write('			</tr>');document.write('			</table>');document.write('		</td>');document.write('	</tr>');document.write('	<tr>');document.write('		<td class="formcopy" align="left" valign="top" colspan="2">');document.write('			<br>To order an item printed*, select Printed option as shown.<br>');document.write('			<img width="339" style="border:1px solid #cccccc;" src="/intershoproot/eCS/Store/en/imagesOnline/order_printed_help.jpg">');document.write('			*For additional fees.');document.write('		</td>');document.write('	</tr>');document.write('</table>');document.write('</div>');endPopupDiv();};function _shpd(){blankorder_popup_shown=true;divID="d_alert";document.getElementById(divID).style.height=document.body.scrollHeight;if(document.body.scrollHeight<screen.availHeight)document.getElementById(divID).style.height=screen.availHeight;document.getElementById(divID).style.left=document.body.scrollLeft;document.getElementById(divID).style.top=document.body.scrollTop;document.getElementById(divID).style.display='block';};function hidePopupDiv(){divID="d_alert";document.getElementById(divID).style.display='none';};function submitandhidePopupDiv(){try{_inf();submitForm();}catch(Ex){document.form_0.submit();}divID="d_alert";getElement(divID+"_inner").innerHTML='<img style="margin:75px 0px 75px 0px;" src="'+sImageServerURL+'/intershoproot/eCS/Store/en/imagesOnline/icon_wait.gif">';}
