var PFShowStockLevels=!1,PFStockLevel=0;function PFPriceCheck(a,b,e,f){if(checkInteger(a.value)==!1)a.value="";if(a.value!=""&&parseFloat(a.value)>0)if(f!=""){if(parseInt(a.value)>parseInt(f))a.value="1",alert("Maximum Available for Order is : "+f)}else{if(a.value*b>1E6)a.value="1",maxquantity=parseInt(1E6/b),alert("Maximum Available for Order is : "+maxquantity)}else if(a.value!=""&&parseFloat(a.value)<=0)a.value="1"}
function PFpopulateComparsions(){var a=getCookie("PowerFrontProductComparisons");if(a)for(var a=a.split("::"),b=0;b<a.length;){if(highlightcheckbox=document.getElementById("comparisons"+a[b]))highlightcheckbox.checked=!0;b+=1}}
function PFAddCompare(a,b,e){var f=new Date((new Date).getTime()+864E5),d=getCookie("PowerFrontProductComparisons");a.checked?d?d.split("::").length>=e?alert("Maximum Allowed Comparisons is "+e):d.indexOf(b)>=0||(d=d+"::"+b):d=b:d&&d.indexOf(b)>=0&&(re=RegExp("::"+b,"gi"),d=d.replace(re,""),re=RegExp("("+b+"::)","gi"),d=d.replace(re,""),re=RegExp("("+b+")","gi"),d=d.replace(re,""));d?setCookie("PowerFrontProductComparisons",d,f,"/"):deleteCookie("PowerFrontProductComparisons","/")}
function PFSwitchPrices(a,b,e,f){pricedifference="";foundmatch=!1;sumtodo="";selectedradio=document.getElementsByName(a.name);arraylength=f=="dropdown"?selectedradio[0].length:selectedradio.length;for(i=0;i<arraylength;i++)if(foundmatch=f=="dropdown"?selectedradio[0].options.selectedIndex==i?!0:!1:selectedradio[i].checked==!0?!0:!1)selecteditem=document.getElementById("ConfigOptPrice"+e+"_"+b+"_"+i),selecteditem.innerHTML==""?(pricedifference="0",sumtodo="+"):(pricedifference=selecteditem.innerHTML.replace(/<script(.*?)<\/script>/gi,
""),pricedifference=checkDecimal(pricedifference,2),sumtodo=selecteditem.innerHTML.substring(1,2));for(i=0;i<arraylength;i++)selecteditem=document.getElementById("ConfigOptPrice"+e+"_"+b+"_"+i),(foundmatch=f=="dropdown"?selectedradio[0].options.selectedIndex==i?!0:!1:selectedradio[i].checked==!0?!0:!1)?selecteditem.innerHTML="":sumtodo=="+"?selecteditem.innerHTML==""?selecteditem.innerHTML=parseFloat(pricedifference)==0?"":"(-"+PFFormatCurrency(pricedifference,"","","")+")":(itemprice=checkDecimal(selecteditem.innerHTML.replace(/<script(.*?)<\/script>/gi,
""),2),selecteditem.innerHTML.replace(/<script(.*?)<\/script>/gi,"").indexOf("-")>0&&(itemprice=parseFloat(itemprice*-1)),newitemprice=parseFloat(itemprice)-parseFloat(pricedifference),selecteditem.innerHTML=newitemprice>0?"(+"+PFFormatCurrency(newitemprice,"","","")+")":newitemprice<0?"(-"+PFFormatCurrency(newitemprice*-1,"","","")+")":""):selecteditem.innerHTML==""?selecteditem.innerHTML=parseFloat(pricedifference)==0?"":"(+"+PFFormatCurrency(pricedifference,"","","")+")":(itemprice=checkDecimal(selecteditem.innerHTML.replace(/<script(.*?)<\/script>/gi,
""),2),selecteditem.innerHTML.replace(/<script(.*?)<\/script>/gi,"").indexOf("-")>0&&(itemprice=parseFloat(itemprice*-1)),newitemprice=parseFloat(itemprice)+parseFloat(pricedifference),selecteditem.innerHTML=newitemprice>0?"(+"+PFFormatCurrency(newitemprice,"","","")+")":newitemprice<0?"(-"+PFFormatCurrency(newitemprice*-1,"","","")+")":"");if(pricedifference!="")currprice=checkDecimal(document.getElementById("Price"+e).innerHTML.replace(/<script(.*?)<\/script>/gi,""),2),prevquantityvar=document.getElementById("prevquantity"+
e),startquantityvar=document.getElementById("startquantity"+e),currprice=prevquantityvar.value!=""?parseFloat(currprice)/parseFloat(prevquantityvar.value):parseFloat(currprice),newprice=sumtodo=="-"?parseFloat(currprice)+parseFloat(pricedifference*-1):parseFloat(currprice)+parseFloat(pricedifference),startquantityvar.value!=""?document.getElementById("Price"+e).innerHTML=PFFormatCurrency(newprice*parseFloat(startquantityvar.value),"","",""):document.getElementById("Price"+e).innerHTML=PFFormatCurrency(newprice,
"","","")}
function PFChangeQuantities(a){currprice=checkDecimal(document.getElementById("Price"+a).innerHTML.replace(/<script(.*?)<\/script>/gi,""),2);prevquantityvar=document.getElementById("prevquantity"+a);startquantityvar=document.getElementById("startquantity"+a);currprice=prevquantityvar.value!=""?parseFloat(currprice)/parseFloat(prevquantityvar.value):parseFloat(currprice);startquantityvar.value!=""?document.getElementById("Price"+a).innerHTML=PFFormatCurrency(currprice*parseFloat(startquantityvar.value),"",
"",""):document.getElementById("Price"+a).innerHTML=PFFormatCurrency(currprice,"","","")}function PFCheckVariations(){return!0}
function PFSubmitOrder(a,b){if(!PFCheckVariationsSelected(b))if(alert("Please make your selection."),a)return;else return!1;var e=document.getElementById("fHtmlEditor"+b),f=document.getElementById("quantity"+b),d=document.getElementById("startquantity"+b),g=document.getElementById("mainproductid"+b),h=document.getElementById("productid"+b),n=e.elements,p="",k="",H="",v="";a&&PFCheckVariations();for(i=0;i<n.length;i++)if(n[i].name.indexOf("pfconfigoptid")==0&&(v=n[i].name.substring(13,n[i].name.indexOf("_")),
H!=v&&(H=v,selectedradio=n[i])))if(selectedradio.type=="radio"||selectedradio.type==void 0)if(selectedradiooption=document.getElementsByName(selectedradio.name),selectedradiooption.length)for(j=0;j<selectedradiooption.length;j++)selectedradiooption[j].checked==!0&&(p=p+selectedradiooption[j].value+", ",d.value!=""?k=k+d.value+", ":k+="1, ");else{if(singleradio=document.getElementById("singleoptionid"+v+"_"+b))p=p+singleradio.value+", ",d.value!=""?k=k+d.value+", ":k+="1, "}else selectedradio.type==
"select-one"&&(p=p+selectedradio.options[selectedradio.selectedIndex].value+", ",d.value!=""?k=k+d.value+", ":k+="1, ");if(g.value=="")if(a)alert("please select options!");else return!1;else{h.value=p!=""?g.value+", "+p.substring(0,p.length-2):g.value;if(d&&k!="")f.value=d.value!=""?d.value+", "+k.substring(0,k.length-2):"1, "+k.substring(0,k.length-2);else if(k!="")f.value="1, "+k.substring(0,k.length-2);else if(f.value=="")f.value=d.value;if(a)e.submit();else return!0}}
function PFRemoveBlankOptions(a){field=document.getElementById(a);for(i=1;i<field.options.length;i++)if(field.options[i].value==""||field.options[i].value==null||field.options[i].value==void 0)field.options[i]=null,i-=1}
function PFFindOptionCombo(a,b,e){variationselectboxes=Array(a);for(i=1;i<=a;i++)currvariation=document.getElementById("variationtype"+b+"_"+i),variationselectboxes[i-1]=currvariation?currvariation.options[currvariation.selectedIndex].value:"not found";allvariationsarr=eval("allvariations"+b);matchfound=-1;if(allvariationsarr)for(i=0;i<allvariationsarr.length;i++){c=15;match=0;for(j=1;j<=a;j++)c+=1,allvariationsarr[i][c]==variationselectboxes[j-1]&&(match+=1),c+=1;if(match==a){matchfound=i;break}}PFSetProduct(matchfound,
b,e)}function PFSwapProduct(a,b,e,f){allvariationsarr=eval("allvariations"+b);matchfound=-1;if(allvariationsarr)for(i=0;i<allvariationsarr.length;i++)if(allvariationsarr[i][0]==a){matchfound=i;break}PFUpdateCombo(matchfound,b,f);PFSetProduct(matchfound,b,e)}
function PFUpdateCombo(a,b,e){if(allvariationsarr=eval("allvariations"+b)){c=15;for(i=1;i<=e;i++){c+=1;if(currvariation=document.getElementById("variationtype"+b+"_"+i))if(i<e)for(j=1;j<currvariation.length;j++){if(currvariation.options[j].value==allvariationsarr[a][c])currvariation.options[j].selected=!0}else if(currvariation.selectedIndex>0)for(j=1;j<currvariation.length;j++){if(currvariation.options[j].value==allvariationsarr[a][c])currvariation.options[j].selected=!0}else currvariation.length==
2?currvariation.options[1].selected=!0:currvariation.options[0].selected=!0;c+=1}}}function PFCheckVariationsSelected(a){for(var b=!0,e=null,f=1;f<=100;f++)if(e=document.getElementById("variationtype"+a+"_"+f),e!=null){if(e.selectedIndex==0){b=!1;break}}else break;return b}
function PFSetProduct(a,b,e){form=document.getElementById("fHtmlEditor"+b);var f=PFCheckVariationsSelected(b),d=document.getElementById("OutOfStock"+b),g=document.getElementById("InStock"+b),h=document.getElementById("AddToBasket"+b),n=document.getElementById("NotAvailable"+b);if(a>-1){pricedifference=0;currentprice=checkDecimal(document.getElementById("Price"+b).innerHTML.replace(/<script(.*?)<\/script>/gi,""),2);currentprice=parseFloat(currentprice);myoriginalprice=document.getElementById("originalprice"+
b);startqty=document.getElementById("startquantity"+b);PFCurrencyConversionRate==""&&(PFCurrencyConversionRate="1");myoriginalprice&&startqty?(pricedifference=parseFloat(currentprice)/parseFloat(PFCurrencyConversionRate)-parseFloat(checkDecimal(myoriginalprice.value,2))*parseFloat(startqty.value),myoriginalprice.value=allvariationsarr[a][5],newprice=parseFloat(allvariationsarr[a][5])*parseFloat(startqty.value)+parseFloat(pricedifference)):newprice=allvariationsarr[a][5];HandlingCharge=document.getElementById("HandlingCharge"+
b);HandlingChargeAmount=document.getElementById("HandlingChargeAmount"+b);if(HandlingCharge&&HandlingChargeAmount)newhandling=parseFloat(allvariationsarr[a][10]),newhandling>0?(HandlingChargeAmount.innerHTML=PFFormatCurrency(newhandling,"","",""),HandlingCharge.style.display=""):(HandlingCharge.style.display="none",HandlingChargeAmount.innerHTML=PFFormatCurrency("0.00","","",""));PreSalePrice=document.getElementById("PreSalePrice"+b);WasAlias=document.getElementById("WasAlias"+b);NowAlias=document.getElementById("NowAlias"+
b);PriceBreak=document.getElementById("PriceBreak"+b);if(NowAlias)NowAlias.style.display="none";if(WasAlias&&(WasAlias.style.display="none",PriceBreak))PriceBreak.style.display="none";if(PreSalePrice)PreSalePrice.style.display="none",PreSalePrice.innerHTML=PFFormatCurrency("0.00","","","");if(allvariationsarr[a][4]=="true"){if(QuantityRange=document.getElementById("QuantityRange"+b))QuantityRange.style.display="none";PriceFontColor=document.getElementById("Price"+b);SalePriceFontColor=document.getElementById("SalePriceFontColor"+
b);if(OnSale=document.getElementById("OnSale"+b))OnSale.style.display="";if(SalePriceFontColor&&PriceFontColor)PriceFontColor.style.color=SalePriceFontColor.style.color}else{if(OnSale=document.getElementById("OnSale"+b))OnSale.style.display="none";PriceFontColor=document.getElementById("Price"+b);if((NormalPriceFontColor=document.getElementById("PriceFontColor"+b))&&PriceFontColor)PriceFontColor.style.color=NormalPriceFontColor.style.color}newpresaleprice=allvariationsarr[a][9];if(newpresaleprice!=
""&&parseFloat(newpresaleprice)>0){if(allvariationsarr[a][4]=="true"){if(NowAlias)NowAlias.style.display="none"}else if(NowAlias)NowAlias.style.display="";if(WasAlias&&(WasAlias.style.display="",PriceBreak))PriceBreak.style.display="";if(PreSalePrice)PreSalePrice.innerHTML=PFFormatCurrency(newpresaleprice,"","",""),PreSalePrice.style.display=""}form.mainproductid.value=allvariationsarr[a][0];document.getElementById("Price"+b).innerHTML=PFFormatCurrency(newprice,"","","");if(n)n.style.display="none";
if(e=="true"||e=="True"){if(f)if(allvariationsarr[a][6]>0){if(g)StockLevel=document.getElementById("StockLevel"+b),StockLevel.innerHTML=allvariationsarr[a][6],g.style.display="";if(d)d.style.display="none";if(h)h.style.display=""}else{if(d)d.style.display="";if(g)g.style.display="none",StockLevel=document.getElementById("StockLevel"+b),StockLevel.innerHTML="0";if(h)h.style.display="none"}else{if(g)StockLevel=document.getElementById("StockLevel"+b),StockLevel.innerHTML=allvariationsarr[a][6],g.style.display=
"";if(d)d.style.display="none";if(h)h.style.display=""}if(mx=document.getElementById("maxcanorder"+b))mx.value=parseFloat(allvariationsarr[a][6])<parseFloat(allvariationsarr[a][7])?allvariationsarr[a][6]:allvariationsarr[a][7]}else{if(mx=document.getElementById("maxcanorder"+b))mx.value=allvariationsarr[a][7];if(h=document.getElementById("AddToBasket"+b))h.style.display="";if((g=document.getElementById("InStock"+b))&&(g.style.display==""||PFShowStockLevels))g.style.display="",StockLevel=document.getElementById("StockLevel"+
b),StockLevel.innerHTML=allvariationsarr[a][6]>0?allvariationsarr[a][6]:"0"}PFSwapLayers("Image1_"+b+"_","Image1_"+b+"_"+a,300);ProductCode=document.getElementById("ProductCode"+b);newproductcode=allvariationsarr[a][2];if(ProductCode&&newproductcode!="")ProductCode.innerHTML=newproductcode;return!0}else{form.mainproductid.value="";if(f){if(d)d.style.display="none";if(g)g.style.display==""&&(PFShowStockLevels=!0),g.style.display="none";if(h)h.style.display="none";if(n)n.style.display=""}else{if(d)d.style.display=
"none";if(g)g.style.display==""&&(PFShowStockLevels=!0),g.style.display="none";if(h)h.style.display="";if(n)n.style.display="none"}return!1}}function PFCheckStock(a){var b;if(a!="")b=PFGetXmlHttpObject(),b==null?alert("Sorry, this function is not possible because your browser does not support AJAX!"):(b.onreadystatechange=function(){if(b.readyState==4)PFStockLevel=b.responseText},b.open("GET",siteurl+"/scripts/getstocklevel.asp?productid="+a,!0),b.send(null))}
function PFShowVariations(a,b,e,f,d){ProductContainer=document.getElementById("ProductContainer"+e);if(ProductContainer.offsetHeight)ProductContainer.style.height=ProductContainer.offsetHeight+"px";if(ProductContainer.offsetWidth)ProductContainer.style.width=ProductContainer.offsetWidth+"px";PFAddMask(d);coords=PFGetElementPosition("ProductContainer"+e);d=document.createElement("div");d.style.width=ProductContainer.offsetWidth+"px";d.style.position="absolute";d.style.top=coords[1]+"px";d.style.left=
coords[0]+"px";d.style.zIndex=1E5;d.id="ProductPopUp"+e;document.body.appendChild(d);FormContainer=document.getElementById("fHtmlEditor"+e);d.appendChild(FormContainer);if((ProductTable=document.getElementById("ProductTable"+e))&&!ProductTable.style.border)ProductTable.style.border="1px #000000 dashed";if(ShowVariations=document.getElementById("ShowVariations"+e))ShowVariations.style.display="none";PFdisplayid=e;addjavascript=siteurl+"/scripts/getjavascript.asp?id="+e;(SlideLayerDiv=document.getElementById("SlideLayerDiv"+
e))?(layertomove=eval("slidelayer"+e),layertomove._endfunction(null),layertomove.slidedown()):PFInsertExternalHTML("ProductVariations"+e,a,b+"&displayid="+e+"&style="+f,addjavascript)}function PFHideVariations(a){layertomove=eval("slidelayer"+a);PFdisplayid=a;layertomove._endfunction(PFShowVariationTrigger);layertomove.slideup()}
PFShowVariationTrigger=function(){PFRemoveMask();ProductContainer=document.getElementById("ProductContainer"+PFdisplayid);ProductContainer.appendChild(document.getElementById("fHtmlEditor"+PFdisplayid));document.body.removeChild(document.getElementById("ProductPopUp"+PFdisplayid));if(ShowVariations=document.getElementById("ShowVariations"+PFdisplayid))ShowVariations.style.display="block";if((ProductTable=document.getElementById("ProductTable"+PFdisplayid))&&ProductTable.style.borderStyle.indexOf("dashed")>=
0)ProductTable.style.border=""};function PFSwapLayers(a,b,e){var e=Math.round(e/100),f=0,d=document.getElementById(a),g=document.getElementById(b),h;if(d&&g)if(d.innerHTML==g.innerHTML||g.innerHTML=="")d.style.display="block";else for(i=100;i>=0;i--)if(h=setTimeout("PFChangeOpac("+i+",'"+a+"')",f*e),f++,i==0){h=setTimeout("PFSwapHTML('"+a+"','"+b+"');"+a+".style.display='block';",f*e);f++;for(j=0;j<=100;j++)h=setTimeout("PFChangeOpac("+j+",'"+a+"')",f*e),f++}clearTimeout(h)}
function PFSwapHTML(a,b){var e=document.getElementById(a),f=document.getElementById(b);if(e&&f)e.innerHTML=f.innerHTML}
function PFanimateLayer(a,b,e){this.divId=a;this.endfuncname=null;this.divObj=document.getElementById(a);this.divObj.style.overflow="hidden";this.timelength=b;this.initstate=e;e=="expanded"?(this.isExpanded="yes",this.divObj.style.position="relative",this.divObj.style.display="block",this.divObj.style.visibility="visible"):(this.isExpanded="no",this.divObj.style.position="absolute",this.divObj.style.left="-3000px");this.contentheight=parseInt(this.divObj.style.height);isNaN(this.contentheight)&&this._getheight();
this.initstate=="expand"&&this.slidedown()}PFanimateLayer.prototype._getheight=function(){this.divObj.style.display="block";this.divObj.style.visibility="visible";this.contentheight=this.divObj.offsetHeight;this.divObj.style.height=this.isExpanded!="yes"?1:this.contentheight+"px"};PFanimateLayer.prototype._endfunction=function(a){this.endfuncname=a};
PFanimateLayer.prototype._slideengine=function(a){var b=(new Date).getTime()-this.startTime,e=this;if(b<this.timelength){b=a=="down"?PFanimateLayer.curveincrement(b/this.timelength):1-PFanimateLayer.curveincrement(b/this.timelength);if(parseInt(b*this.contentheight)>0)this.divObj.style.height=parseInt(b*this.contentheight)+"px";this.runtimer=setTimeout(function(){e._slideengine(a)},10)}else a=="down"?(this.divObj.style.height=this.contentheight+"px",this.divObj.style.overflow=""):(this.divObj.style.height=
1,this.divObj.style.position="absolute",this.divObj.style.left="-3000px"),this.endfuncname!=null&&this.endfuncname(),this.runtimer=null};PFanimateLayer.prototype.slidedown=function(){if(typeof this.runtimer=="undefined"||this.runtimer==null)if(isNaN(this.contentheight))alert("Please wait until document has fully loaded then click again");else if(parseInt(this.divObj.style.height)==1)this.startTime=(new Date).getTime(),this.divObj.style.position="relative",this.divObj.style.left="0px",this._slideengine("down")};
PFanimateLayer.prototype.slideup=function(){if(typeof this.runtimer=="undefined"||this.runtimer==null)if(isNaN(this.contentheight))alert("Please wait until document has fully loaded then click again");else if(parseInt(this.divObj.style.height)==this.contentheight)this.startTime=(new Date).getTime(),this.divObj.style.overflow="hidden",this._slideengine("up")};
PFanimateLayer.prototype.slideit=function(){isNaN(this.contentheight)?alert("Please wait until document has fully loaded then click again"):parseInt(this.divObj.style.height)==1?this.slidedown():parseInt(this.divObj.style.height)==this.contentheight&&this.slideup()};PFanimateLayer.curveincrement=function(a){return(1-Math.cos(a*Math.PI))/2};
var PFUpdateProductRegistry=[],PFUpdateProductInterval=setInterval("if(!PFUpdateProductInProgress){PFUpdateProductData(PFUpdateProductRegistry);}",50),PFUpdateProductInProgress=!1,PFUpdateProductPageLoaded=!1;
function PFUpdateProduct(a,b,e){var f="";try{eval("allvariations"+a)&&(f="allvariations"+a)}catch(d){}if(e&&PFSwapProduct)PFUpdateProductData([[a,b,f]]);else{PFUpdateProductRegistry[PFUpdateProductRegistry.length]=[a,b,f];if(elem=document.getElementById("Price"+a))elem.style.visibility="hidden";if(elem=document.getElementById("PreSalePrice"+a))elem.style.visibility="hidden";if(elem=document.getElementById("NowAlias"+a))elem.style.visibility="hidden";if(elem=document.getElementById("WasAlias"+a))elem.style.visibility=
"hidden";if(elem=document.getElementById("PriceBreak"+a))elem.style.visibility="hidden";if(elem=document.getElementById("OnSale"+a))elem.style.visibility="hidden"}}
function PFUpdateProductData(a){PFUpdateProductPageLoaded&&clearInterval(PFUpdateProductInterval);if(a.length!=0&&PFSwapProduct){PFUpdateProductInProgress=!0;for(var b="",e="",f="",d=0;d<a.length;d++)if(a[d].length>=2&&(b+=(b==""?"":",")+a[d][0],e+=(e==""?"":",")+a[d][1],d>0&&(f+="|"),allvariations=a[d][2]!=""?eval(a[d][2]):null))for(var g=0;g<allvariations.length;g++)g>0&&(f+=","),f+=allvariations[g][0];PFUpdateProductRegistry.length=0;if(b!=""&&e!=""){var h=PFGetXmlHttpObject();if(h)h.onreadystatechange=
function(){try{if(h.readyState==4&&h.status==200){var a=h.responseXML;if(a){var b,d,e,f,g,s,w,z,t,A,x,B,C,D,E,u,F,I,m,q,l,J,y,K="";l=a.getElementsByTagName("useoutofstock");J=l.length==1?l[0].textContent?l[0].textContent:l[0].text?l[0].text:"False":"False";for(var r=a.getElementsByTagName("product"),o=0;o<r.length;o++){m="";b=r[o].getAttribute("productid");d=r[o].getAttribute("counter");index=r[o].getAttribute("index");t=document.getElementById("Price"+d);elemOriginalPrice=document.getElementById("originalprice"+
d);index||(A=document.getElementById("NowAlias"+d),x=document.getElementById("PreSalePrice"+d),B=document.getElementById("WasAlias"+d),C=document.getElementById("PriceBreak"+d),D=document.getElementById("OnSale"+d),E=document.getElementById("StockLevel"+d));g=f=e="";s=!1;handling=z=w="";for(var G=0;G<r[o].childNodes.length;G++)switch(node=r[o].childNodes[G],q=node.textContent?node.textContent:node.text?node.text:"",node.nodeName){case "price":e=q;break;case "wasprice":f=q;break;case "instore":g=q;
break;case "onsale":s=q=="True"?"true":"false";break;case "stock":w=q;break;case "maxorder":z=q;break;case "handling":handling=q}if(index){if(allvariations=eval("allvariations"+d))allvariations[index][4]=s,allvariations[index][5]=e,allvariations[index][6]=w,allvariations[index][7]=z,allvariations[index][8]=g,allvariations[index][9]=f,allvariations[index][10]=handling;if(K.indexOf("|"+b+"|"+d)==-1){for(y=0;document.getElementById("variationtype"+d+"_"+(y+1));)y++;m+='PFSwapProduct("'+b+'","'+d+'","'+
J+'","'+y+'");';K+="|"+b+"|"+d}}else{F=Math.round(parseFloat(e),2);I=f!=""?Math.round(parseFloat(f),2):F;u=F<I;if(B)B.style.display=u?"":"none";if(A)A.style.display=u&&s!="true"?"":"none";if(D)D.style.display=s=="true"?"":"none";if(x)x.innerHTML=PFFormatCurrency(f,"","",""),x.style.display=u?"":"none";if(E)E.innerHTML=w;if(C)C.style.display=u?"":"none"}if(allvariations&&index){if(b==allvariations[index][0]){if(t)t.innerHTML=PFFormatCurrency(e,"","","");if(elemOriginalPrice)elemOriginalPrice.value=
e}}else{if(t)t.innerHTML=PFFormatCurrency(e,"","","");if(elemOriginalPrice)elemOriginalPrice.value=e}document.getElementById("Price"+d)&&(m+='document.getElementById("Price'+d+'").style.visibility = "";');document.getElementById("PreSalePrice"+d)&&(m+='document.getElementById("PreSalePrice'+d+'").style.visibility = "";');document.getElementById("NowAlias"+d)&&(m+='document.getElementById("NowAlias'+d+'").style.visibility = "";');document.getElementById("WasAlias"+d)&&(m+='document.getElementById("WasAlias'+
d+'").style.visibility = "";');document.getElementById("PriceBreak"+d)&&(m+='document.getElementById("PriceBreak'+d+'").style.visibility = "";');document.getElementById("OnSale"+d)&&(m+='document.getElementById("OnSale'+d+'").style.visibility = "";');m!=""&&setTimeout(m,0)}l=a.getElementsByTagName("script");timoutScript="";if(l.length>0)for(o=0;o<l.length;o++)l[0].textContent?l[0].textContent!=""&&(m+=l[0].textContent):l[0].text&&l[0].text!=""&&(m+=l[0].text);m!=""&&setTimeout(m,0)}PFUpdateProductInProgress=
!1}}catch(L){PFUpdateProductInProgress=!1}},h.open("POST",siteurl+"/xml/xml-updateproductdata.asp?sid="+Math.random(),!0),h.setRequestHeader("Content-type","application/x-www-form-urlencoded"),h.send("counters="+b+"&products="+e+"&allvariations="+f)}}}window.addEventListener?window.addEventListener("load",function(){PFUpdateProductPageLoaded=!0},!1):window.attachEvent&&window.attachEvent("onload",function(){PFUpdateProductPageLoaded=!0});
