"); d.writeln("
"); d.write("Total "); if((hasShpRgn||hasShpMth||hasTaxArs) || (genShpCst)){ if((hasShpRgn&¤tShippingRegion) || (hasShpMth&¤tShippingMethod) || (hasTaxArs&¤tTaxArea) || (genShpCst)){ d.write("inc"); t=incTaxTtl(); } else t=exTaxTtl(); } else t=exTaxTtl(); d.write(": "); if(parent.parent.currentCurrency.index){ var cb=t*(parent.parent.baseCurrency.multiplier/parent.parent.shopCurrency.multiplier); var i=cb*parent.parent.currentCurrency.multiplier; d.write(parent.parent.currentCurrency.abbrev+" "); d.write(decStr(i, parent.parent.currentCurrency)+" ~ "); } d.write(" "+currencySymbol+" "+decStr(rnd(t,2),parent.parent.shopCurrency)+""); d.writeln(" |
"); d.writeln("
"); d.close(); } } function toggleLayout(){ parent.parent.mainLoaded=false; parent.parent.currentContent=parent.parent.main.content.document.location.toString(); if(currentLayout==layout_menu){ currentLayout=layout_plain; parent.parent.main.location="fs_cont.html"; } else { currentLayout=layout_menu; parent.parent.main.location="fs_menu.html"; } } function showPrcInc() { var r=false; if(currentTaxArea || (currentShippingRegion && currentShippingMethod) || genShpCst) r=true; return(r); } function chgShpRgn(f){ currentShippingRegion=parseInt(f.shippingRegion.options[f.shippingRegion.selectedIndex].value); updRunTtl(); } function chgTaxArea(f){ currentTaxArea=parseInt(f.taxArea.options[f.taxArea.selectedIndex].value); updRunTtl(); } function chgShpMth(f){ if(useMethods) { var p=currentShippingMethod; currentShippingMethod=parseInt(f.shippingMethod.options[f.shippingMethod.selectedIndex].value); if(p!=currentShippingMethod) { if(shippingMethodModifier==modifier_provider) { if(currentShippingMethod) { parent.parent.extra.individual.location = "progress.html"; currentShippingRegion=0; parent.parent.extra.shipping.location = shipping_methods[currentShippingMethod].fileName; } else { hasShpRgn=false; //parent.parent.main.content.location="basket.html"; //parent.parent.main.content.location.reload(); } } else { updRunTtl(); } } } } function cstSavBil(){ var bls=new String(""); bls=this.bilDtl.name+"|"; bls+=this.bilDtl.company+"|"; bls+=this.bilDtl.street+"|"; bls+=this.bilDtl.city+"|"; bls+=this.bilDtl.state+"|"; bls+=this.bilDtl.zip+"|"; bls+=this.bilDtl.cntry+"|"; bls+=this.bilDtl.phone+"|"; bls+=this.bilDtl.fax+"|"; bls+=this.bilDtl.email+"|"; parent.parent.savCookStr("CUSTOMER_BILLING", bls, -1); } function cstLdBil(f){ var bls=new String(""); bls=parent.parent.getCookStr("CUSTOMER_BILLING"); if(bls!=""){ if(this.bilDtl.name.length==0){ if(confirm("Do you wish to use the details you entered on your last visit?")){ var a=parent.parent.splitStr(bls,'|'); this.bilDtl.name=a[0]; this.bilDtl.company=a[1]; this.bilDtl.street=a[2]; this.bilDtl.city=a[3]; this.bilDtl.state=a[4]; this.bilDtl.zip=a[5]; this.bilDtl.cntry=a[6]; this.bilDtl.phone=a[7]; this.bilDtl.fax=a[8]; this.bilDtl.email=a[9]; } } } f.customer_name.value=this.bilDtl.name; f.company_name.value=this.bilDtl.company; f.customer_street.value=this.bilDtl.street; f.customer_city.value=this.bilDtl.city; f.customer_state.value=this.bilDtl.state; f.customer_zip.value=this.bilDtl.zip; f.customer_country.value=this.bilDtl.cntry; f.customer_phone.value=this.bilDtl.phone; f.customer_fax.value=this.bilDtl.fax; f.customer_email.value=this.bilDtl.email; } function cstSavDel(){ var dls=new String(""); dls=this.delDtl.name+"|"; dls+=this.delDtl.company+"|"; dls+=this.delDtl.street+"|"; dls+=this.delDtl.city+"|"; dls+=this.delDtl.state+"|"; dls+=this.delDtl.zip+"|"; dls+=this.delDtl.cntry+"|"; dls+=this.delDtl.phone+"|"; parent.parent.savCookStr("CUSTOMER_DELIVERY", dls, -1); } function cstLdDel(f){ var dls=new String(""); dls=parent.parent.getCookStr("CUSTOMER_DELIVERY"); if(dls!=""){ if(this.delDtl.name.length==0){ if(confirm("Do you wish to use the details you entered on your last visit?")){ var a=parent.parent.splitStr(dls,'|'); this.delDtl.name=a[0]; this.delDtl.company=a[1]; this.delDtl.street=a[2]; this.delDtl.city=a[3]; this.delDtl.state=a[4]; this.delDtl.zip=a[5]; this.delDtl.cntry=a[6]; this.delDtl.phone=a[7]; } } } f.delivery_name.value=this.delDtl.name; f.company_name.value=this.delDtl.company; f.delivery_street.value=this.delDtl.street; f.delivery_city.value=this.delDtl.city; f.delivery_state.value=this.delDtl.state; f.delivery_zip.value=this.delDtl.zip; f.delivery_country.value=this.delDtl.cntry; f.delivery_phone.value=this.delDtl.phone; } function cstPaymentDtl(){ this.ccType=""; this.ccName=""; this.ccNumber=""; this.ccExpiry=""; return(this); } function cstDtl(){ this.name=""; this.company=""; this.street=""; this.city=""; this.state=""; this.zip=""; this.cntry=""; this.phone=""; this.fax=""; this.email=""; this.notice=""; return(this); } function cst(){ this.payDtl=new cstPaymentDtl(); this.bilDtl=new cstDtl(); this.delDtl=new cstDtl(); this.saveBil=cstSavBil; this.loadBil=cstLdBil; this.saveDel=cstSavDel; this.loadDel=cstLdDel; return(this); } theCustomer=new cst(); function applyFont(s){ var rval=new String(); rval=""; var i=s.indexOf("."); if(i!=-1){ var s1=s.substring(0, i); var s2=s.substring(i, i+1); var s3=s.substring(i+1, s.length); rval=s1+""+s2+""+s3; } else rval=s; return(rval); } function showItmPrc(f, pfx, numOptions){ if(parent.parent.goodBrowser){ var myItm = getItmFromFrm(f, pfx, numOptions); var ip=getItmPrc(myItm); if(ip==0) return; ip*=myItm.quantity; var pe=ip; var pi=parseFloat(0); if(((currentTaxArea>0)&&(hasTaxArs))||(parent.parent.currentCurrency.index>0)){ if(!prcIncTax) { if(currentTaxArea>0) { pi=pe+(getItmTax(myItm)*myItm.quantity); } } else { if(currentTaxArea==1) { pi=pe; pe-=((getItmPrc(myItm)*myItm.quantity)-((getItmPrc(myItm)*myItm.quantity)/(1+(local_tax_areas[myItm.localTax]/100)))); } else { pe-=((getItmPrc(myItm)*myItm.quantity)-((getItmPrc(myItm)*myItm.quantity)/(1+(local_tax_areas[myItm.localTax]/100)))); pi=pe+(getItmTax(myItm)*myItm.quantity); } } if(parent.parent.currentCurrency.index){ var cb=0; cb=pe*(parent.parent.baseCurrency.multiplier/parent.parent.shopCurrency.multiplier); pe=cb*parent.parent.currentCurrency.multiplier; if(pi){ cb=pi*(parent.parent.baseCurrency.multiplier/parent.parent.shopCurrency.multiplier); pi=cb*parent.parent.currentCurrency.multiplier; } } var d=parent.parent.extra.individual.document; d.open("text/html"); d.writeln(""); d.writeln(""); d.writeln("
"); d.writeln(""); d.write(" | "); if(parent.parent.currentCurrency.index) d.write(parent.parent.currentCurrency.abbrev); else d.write(currencySymbol); d.write(" "); if(parent.parent.currentCurrency.index) d.write(applyFont(decStr(pe, parent.parent.currentCurrency))); else d.write(applyFont(decStr(rnd(pe, 2),parent.parent.shopCurrency))); if((currentTaxArea>0)&&(hasTaxArs)) d.write(" ex"); if((currentTaxArea>0)&&(hasTaxArs)){ d.write(" "); if(parent.parent.currentCurrency.index) d.write(parent.parent.currentCurrency.abbrev); else d.write(currencySymbol); d.write(" "); if(parent.parent.currentCurrency.index) d.write(applyFont(decStr(pi, parent.parent.currentCurrency))); else d.write(applyFont(decStr(rnd(pi, 2),parent.parent.shopCurrency))); d.write(" inc"); } d.writeln(" | "); d.writeln(""); d.writeln(" |
');d.writeln('');d.writeln('');d.writeln("
");d.writeln("');d.writeln('');d.writeln('');d.writeln("
");d.writeln("