function popupCleanup(){var storeIFrame=document.getElementById("store_popup_iframe");var mapIFrame=document.getElementById("popup_map_iframe");var storeError=document.getElementById("store_popup_error");var storeProduct=document.getElementById("store_popup_product");var elem=document.getElementById("store_info_popup");storeIFrame.src="";if(storeIFrame.document&&storeIFrame.document.clear){storeIFrame.document.clear()}else{storeIFrame.src="about:blank"}storeIFrame.height="0";mapIFrame.src="";if(mapIFrame.document&&mapIFrame.document.clear){mapIFrame.document.clear()}else{mapIFrame.src="about:blank"}mapIFrame.height="0";storeError.style.display="none";storeError.innerHTML="";storeProduct.innerHTML="";storeProduct.style.display="none";elem.style.visibility="hidden";elem.style.display="none";myAnim.animate();hidePrintButton();window.focus();popupOpenFlag=false;pageURL="/gp/store-info/search.html";storePopupPageType="search"}function popupInit(asinVal,isVariation,zip,parentASIN){if(popupOpenFlag){popupCleanup()}hidePrintButton();document.getElementById("store_popup_error").style.display="none";document.getElementById("store_popup_error").innerHTML="";document.getElementById("store_popup_iframe").src="";document.getElementById("store_popup_iframe").height=0;document.getElementById("popup_map_iframe").src="";document.getElementById("popup_map_iframe").height=0;var asin;if(isVariation){var formCount;var variationError=document.getElementById("variation_error");variationError.innerHTML="";for(formCount=0;formCount<document.forms.length;formCount++){var myForm=document.forms[formCount];if(myForm&&myForm.elements["merchant.target.asin.1"]){asin=myForm.elements["merchant.target.asin.1"].value;if(!isValid(asin,"ASIN")){try{if(myForm.elements.size_dropdown.value==0){variationError.innerHTML='<font color="#CC0000"><b>No item Available</b></font>'}else{if(!isValid(myForm.elements.size_dropdown.value,"notNull")||myForm.elements.size_dropdown.value=="First Select"){variationError.innerHTML='<font color="#CC0000"><b>Please select size and color then find.</b></font>'}else{variationError.innerHTML='<font color="#CC0000"><b>Please select color then find.</b></font>'}}}catch(e){alert(myForm.elements.size_dropdown+",error="+e)}}break}}myForm=null;if(!isValid(asin,"ASIN")){return false}}else{asin=asinVal}document.getElementById("store_popup_wait").style.display="block";var elem=document.getElementById("store_info_popup");var storeIFrame=document.getElementById("store_popup_iframe");var loc=document.getElementById("location_marker_"+asinVal);storeIFrame.src="/gp/store-info/search.html?asin="+asin+"&fresh=yes&zip="+zip;var topMargin=140;var currentTop=(document.documentElement&&document.documentElement.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop;elem.style.top=(currentTop+topMargin)+"px";elem.style.visibility="visible";elem.style.display="block";myAnimb.animate();popupOpenFlag=true;storePopupPageType="search";pageASIN=asin;parentpageASIN=parentASIN;if(storeIFrame.document&&storeIFrame.document.getElementById&&storeIFrame.document.getElementById("store_zipcode")&&storeIFrame.document.getElementById("store_zipcode").focus){storeIFrame.document.getElementById("store_zipcode").focus()}}function alternateView(callingPage){var queryString=window.parent.document.location.search;if(queryString.length){queryString+="&"}else{queryString="?"}queryString+="callingPage="+callingPage;if(queryString.match("asin=")==null){queryString=queryString+"&asin="+pageASIN}if(parentpageASIN&&parentpageASIN.length){queryString+="&parentASIN="+parentpageASIN}window.parent.location.href="/gp/store-info/find-target-store.html"+queryString;popupCleanup();parent.hideLayerFromParent();if(navigator.appName=="Microsoft Internet Explorer"){window.event.returnValue=false}};