function setSkuId(skuId){ return; // theHiddenSkuId = document.getElementById("multiSkuId"); // theHiddenSkuId.value = skuId; } function changeSwatchBorder(id,productnumber,swatchnumber) { id.border = 2; } function rolloverSwatchBorder(id) { id.border = 2; } function popSizing(){ sizingWin = window.open('\sizing_popup.jsp','width=300,height=300,scrollbars=yes'); var newwindow = sizingWin; if (newwindow) { if (newwindow.closed) { alert('Popup window opened to fail, if you have popup blocker enabled, please disable it.'); }else{ if (window.focus) { newwindow.focus() } } }else{ alert('Popup window opened to fail, if you have popup blocker enabled, please disable it.'); } // sizingWin.focus(); } function resetSwatchBorder(id, product) { if (id.name != product) { id.border = 1; } } function ltrimrtrim(stringToTrim) { return stringToTrim.replace(/^\s+|\s+$/g,""); } function removeMonogramCritter(index) { var gotoPage = "/browse/ajax/refresh_multi_product_detail.jsp?selectedIndex="+index; divTagIds=new Array(4); divTagIds[0]="product_details_form"+index; divTagIds[1]="monogramPopUp"+index; divTagIds[2]="critterPopUp"+index; //var fName = "add_multi_product"+index; //document.forms[fName].elements['bmForm'].value = "add_to_cart"; sendAjaxRequest(true,gotoPage, document.forms["add_multi_product"],divTagIds, true, "delete_monogram_detail"); } function setPrdID(index){ var radioGrp = document.getElementsByName("prd_id"+index); var selectedPrdId ; for (i=0;iprd_id"); prdId_grp[index].value= selectedPrdId; } function setMonoDetail(index) { var fName = "add_monogram"; index=document.forms[fName].elements['selectedIndex'].value divTagId="product_details_form"+index; var gotoPage = "/browse/ajax/refresh_multi_product_detail.jsp?selectedIndex="+index; document.forms[fName].elements['bmForm'].value = "add_multi_product"; sendAjaxRequest(true,gotoPage, document.forms[fName],divTagId, true, "set_monogram_detail"); } function getMonoDetail(obj,popName ,index) { var gotoPage = "/browse/ajax/refresh_multi_product_mono_detail.jsp?selectedIndex="+index; divTagId=popName+'0'; sendAjaxRequest(false,gotoPage, document.forms["add_multi_product"],divTagId, true, "get_monogram_detail"); showPopup(obj,divTagId,index); } function setCritterDetail(index) { var fName = "critter0"; index=document.forms[fName].elements['selectedIndex'].value divTagId="product_details_form"+index; var gotoPage = "/browse/ajax/refresh_multi_product_detail.jsp?selectedIndex="+index; document.forms[fName].elements['bmForm'].value = "add_multi_product"; sendAjaxRequest(true,gotoPage, document.forms[fName],divTagId, true, "set_monogram_detail"); } function getCritterDetail(obj,popName ,index) { var gotoPage = "/browse/ajax/refresh_multi_product_critter_detail.jsp?selectedIndex="+index; divTagId=popName+'0'; sendAjaxRequest(false,gotoPage, document.forms["add_multi_product"],divTagId, true, "get_monogram_detail"); showPopup(obj,divTagId,index); } function addToCartMulti(index,imgDiv){ var gotoPage = "/include/ajax/top_nav_add_to_cart.jsp?selectedIndex="+index; divTagIds=new Array(4); divTagIds[0]="searchbox"; divTagIds[1]="topNavDiv"; divTagIds[2]="product_details_form"+index; divTagIds[3]="inventory_error_"+index; //var fName = "add_multi_product"+index; //document.forms[fName].elements['bmForm'].value = "add_to_cart"; var callBack = "function callBackFunc(t) { if (t[1] != null) { showBag(); parent.scrollTo(0,0); setTimeout('isBagOpen()', 5000);getProductDetail(this, "+index+",null,null,null,"+imgDiv+");}else{location.reload(true);} }"; sendAjaxRequest(false, gotoPage, document.forms["add_multi_product"], divTagIds, true, "add_to_cart", true, callBack); } function submitMono(index){ if (validFormMong(index)){ setMonoDetail(index); var divObj=document.getElementById('monogramPopUp'+index); divObj.style.display='none'; closePopUp('monogramPopUp0', index); return false; }else{ return false; } } function submitCritter(index){ if (validFormCrit(index)){ setCritterDetail(index); var divObj=document.getElementById('critterPopUp'+index); divObj.style.display='none'; closePopUp('critterPopUp0', index); return false; }else{ return false; } } function popBlowup(productCode, imgSrc, divId, isFeatureColor){ var mainImgPos=findPos(document.getElementById(divId)); var a = window.open('/browse/popup_single_product_detail.jsp?jproduct=' + productCode + '&imgSrc=' + imgSrc + '&isFeatureColor=' + isFeatureColor, 'popup', 'toolbars=no,scrollbars=no,menubar=no,width=698,height=720,left='+mainImgPos[0]+',screenX='+mainImgPos[0]+',screenY='+mainImgPos[1]); var newwindow = a; if (newwindow) { if (newwindow.closed) { alert('Popup window opened to fail, if you have popup blocker enabled, please disable it.'); }else{ if (window.focus) { newwindow.focus() } } } else { alert('Popup window opened to fail, if you have popup blocker enabled, please disable it.'); } // a.focus(); } function popSizeChart(chartName){ var a = window.open('/sizecharts/main.jsp?sizeChart='+chartName, 'sizeChart', 'toolbars=no,scrollbars=no,menubar=no,width=920,height=580'); var newwindow = a; if (newwindow){ if (newwindow.closed){ alert('Popup window opened to fail, if you have popup blocker enabled, please disable it.'); }else{ if (window.focus){ newwindow.focus() } } }else{ alert('Popup window opened to fail, if you have popup blocker enabled, please disable it.'); } a.focus(); } function setViewImg(obj,id){ // to take care of error. if (obj && obj.lastIndexOf('&tmp=')) { img=obj.substring(0, obj.lastIndexOf('&tmp=')); document.getElementById("productOnFigureImage"+id).src=img + "&tmp=prdDtIm"; eval("currImg"+id+"='"+img+"&tmp=prdDtIm'"); } } function changeViewImg(obj,id){ img=obj.substring(0, obj.lastIndexOf('&tmp=')); document.getElementById(id).src=img + "&tmp=prdDtIm"; } function resetImg(divName,prodIndex){ eval("document.getElementById('"+divName+"').src=currImg"+prodIndex); } function refreshRelatedProd(prodLong,formObjName){ formObj=eval('document.add_multi_product.'+formObjName); for(i=0;i