var EC_LithoCalc={flag_form:true,opts:false,skus:false,area:0,selectedArea:0,widthText:0,heightText:0,weights:false,extra:false,prices:false,printRate:0,currentSku:"",currentName:"",currentTitle:"",formContents:"",sizeID:0,timer:0,selWeight:0,localText:false,shipOpts:false,shipRates:[],shipTimes:[],foldRate:0,names:false,titles:false,shipVals:false,foldingOpts:false,formContents:"",international:1,country_code:'<select id="country_code" name="country_code" class="textInput" onchange="EC_LithoCalc.updatePrice()"><option value="CA">Canada</option><option value="MX">Mexico</option><option value="US" selected>United States</option></select>',handling_fee:0,order_action:"",green:false,folding:true,setFoldingOpts:function(){this.foldingOpts=new Hash();this.foldingOpts.set(130,new Hash());this.foldingOpts.get(130).set("name","Quarter-Fold");this.foldingOpts.get(130).set("price","0.00");this.foldingOpts.get(130).set("setup","0.00");},additional:false,setOpts:function(){this.opts=[];this.opts.product=[];this.opts.product[8]="Brochures w/Mailing Services (Quarter-Fold)";this.opts.coating=[];this.opts.color=[];this.opts.folding=[];this.opts.paper=[];this.opts.size=[];this.opts.turnaround=[];this.opts.paper[192]="80# Gloss Cover";this.opts.paper[191]="80# Gloss Text";this.opts.turnaround[161]="2-3 Day";this.opts.turnaround[91]="3-5 Day";this.opts.turnaround[92]="5-7 Day";this.opts.coating[6]="No Coating";this.opts.color[15]="4/1 (Full Color Front / B&W Back)";this.opts.color[16]="4/4 (Full Color Both Sides)";this.opts.paper[104]="100# Gloss Text";this.opts.folding[130]="Quarter-Fold";this.opts.size[59]="8.5 X 12 (Folds to 4.25 X 6)";this.opts.size[61]="8.5 X 14 (Folds to 4.25 X 7)";this.opts.size[65]="11 X 17 (Folds to 5.5 X 8.5)";},setSkus:function(){this.skus=new Hash();this.addSKU([8,"59",104,15,6,91],1050);this.addSKU([8,"59",104,16,6,91],1051);this.addSKU([8,"61",104,15,6,91],1052);this.addSKU([8,"61",104,16,6,91],1053);this.addSKU([8,"65",104,15,6,91],1048);this.addSKU([8,"65",104,16,6,91],1049);this.addSKU([8,"59",191,15,6,91],2672);this.addSKU([8,"59",191,16,6,91],2673);this.addSKU([8,"61",191,15,6,91],2674);this.addSKU([8,"61",191,16,6,91],2675);this.addSKU([8,"65",191,15,6,91],2676);this.addSKU([8,"65",191,16,6,91],2677);},setWeights:function(){this.weights=[];this.weights[1050]=1;this.weights[1051]=1;this.weights[1052]=1;this.weights[1053]=1;this.weights[1048]=1;this.weights[1049]=1;this.weights[2672]=1;this.weights[2673]=1;this.weights[2674]=1;this.weights[2675]=1;this.weights[2676]=1;this.weights[2677]=1;},setPrices:function(){this.prices=new Hash();this.prices.set(1050,new Hash());this.prices.get(1050).set(250,new Hash());this.prices.get(1050).get(250).set("i",17026);this.prices.get(1050).get(250).set("p",249);this.prices.get(1050).set(500,new Hash());this.prices.get(1050).get(500).set("i",17027);this.prices.get(1050).get(500).set("p",419);this.prices.get(1050).set(1000,new Hash());this.prices.get(1050).get(1000).set("i",17028);this.prices.get(1050).get(1000).set("p",755);this.prices.get(1050).set(2000,new Hash());this.prices.get(1050).get(2000).set("i",17029);this.prices.get(1050).get(2000).set("p",1385);this.prices.get(1050).set(3000,new Hash());this.prices.get(1050).get(3000).set("i",17030);this.prices.get(1050).get(3000).set("p",1949);this.prices.get(1050).set(4000,new Hash());this.prices.get(1050).get(4000).set("i",17031);this.prices.get(1050).get(4000).set("p",2465);this.prices.get(1050).set(5000,new Hash());this.prices.get(1050).get(5000).set("i",17032);this.prices.get(1050).get(5000).set("p",2919);this.prices.get(1050).set(6000,new Hash());this.prices.get(1050).get(6000).set("i",17033);this.prices.get(1050).get(6000).set("p",3315);this.prices.get(1050).set(7000,new Hash());this.prices.get(1050).get(7000).set("i",17034);this.prices.get(1050).get(7000).set("p",3655);this.prices.get(1050).set(8000,new Hash());this.prices.get(1050).get(8000).set("i",17035);this.prices.get(1050).get(8000).set("p",3939);this.prices.get(1050).set(9000,new Hash());this.prices.get(1050).get(9000).set("i",17036);this.prices.get(1050).get(9000).set("p",4165);this.prices.get(1050).set(10000,new Hash());this.prices.get(1050).get(10000).set("i",17037);this.prices.get(1050).get(10000).set("p",4335);this.prices.set(1051,new Hash());this.prices.get(1051).set(250,new Hash());this.prices.get(1051).get(250).set("i",17062);this.prices.get(1051).get(250).set("p",279);this.prices.get(1051).set(500,new Hash());this.prices.get(1051).get(500).set("i",17063);this.prices.get(1051).get(500).set("p",479);this.prices.get(1051).set(1000,new Hash());this.prices.get(1051).get(1000).set("i",17064);this.prices.get(1051).get(1000).set("p",869);this.prices.get(1051).set(2000,new Hash());this.prices.get(1051).get(2000).set("i",17065);this.prices.get(1051).get(2000).set("p",1599);this.prices.get(1051).set(3000,new Hash());this.prices.get(1051).get(3000).set("i",17066);this.prices.get(1051).get(3000).set("p",2269);this.prices.get(1051).set(4000,new Hash());this.prices.get(1051).get(4000).set("i",17067);this.prices.get(1051).get(4000).set("p",2869);this.prices.get(1051).set(5000,new Hash());this.prices.get(1051).get(5000).set("i",17068);this.prices.get(1051).get(5000).set("p",3399);this.prices.get(1051).set(6000,new Hash());this.prices.get(1051).get(6000).set("i",17069);this.prices.get(1051).get(6000).set("p",3859);this.prices.get(1051).set(7000,new Hash());this.prices.get(1051).get(7000).set("i",17070);this.prices.get(1051).get(7000).set("p",4259);this.prices.get(1051).set(8000,new Hash());this.prices.get(1051).get(8000).set("i",17071);this.prices.get(1051).get(8000).set("p",4589);this.prices.get(1051).set(9000,new Hash());this.prices.get(1051).get(9000).set("i",17072);this.prices.get(1051).get(9000).set("p",4855);this.prices.get(1051).set(10000,new Hash());this.prices.get(1051).get(10000).set("i",17073);this.prices.get(1051).get(10000).set("p",5049);this.prices.set(1052,new Hash());this.prices.get(1052).set(250,new Hash());this.prices.get(1052).get(250).set("i",17038);this.prices.get(1052).get(250).set("p",249);this.prices.get(1052).set(500,new Hash());this.prices.get(1052).get(500).set("i",17039);this.prices.get(1052).get(500).set("p",419);this.prices.get(1052).set(1000,new Hash());this.prices.get(1052).get(1000).set("i",17040);this.prices.get(1052).get(1000).set("p",755);this.prices.get(1052).set(2000,new Hash());this.prices.get(1052).get(2000).set("i",17041);this.prices.get(1052).get(2000).set("p",1385);this.prices.get(1052).set(3000,new Hash());this.prices.get(1052).get(3000).set("i",17042);this.prices.get(1052).get(3000).set("p",1949);this.prices.get(1052).set(4000,new Hash());this.prices.get(1052).get(4000).set("i",17043);this.prices.get(1052).get(4000).set("p",2465);this.prices.get(1052).set(5000,new Hash());this.prices.get(1052).get(5000).set("i",17044);this.prices.get(1052).get(5000).set("p",2919);this.prices.get(1052).set(6000,new Hash());this.prices.get(1052).get(6000).set("i",17045);this.prices.get(1052).get(6000).set("p",3315);this.prices.get(1052).set(7000,new Hash());this.prices.get(1052).get(7000).set("i",17046);this.prices.get(1052).get(7000).set("p",3655);this.prices.get(1052).set(8000,new Hash());this.prices.get(1052).get(8000).set("i",17047);this.prices.get(1052).get(8000).set("p",3939);this.prices.get(1052).set(9000,new Hash());this.prices.get(1052).get(9000).set("i",17048);this.prices.get(1052).get(9000).set("p",4165);this.prices.get(1052).set(10000,new Hash());this.prices.get(1052).get(10000).set("i",17049);this.prices.get(1052).get(10000).set("p",4335);this.prices.set(1053,new Hash());this.prices.get(1053).set(250,new Hash());this.prices.get(1053).get(250).set("i",17074);this.prices.get(1053).get(250).set("p",279);this.prices.get(1053).set(500,new Hash());this.prices.get(1053).get(500).set("i",17075);this.prices.get(1053).get(500).set("p",479);this.prices.get(1053).set(1000,new Hash());this.prices.get(1053).get(1000).set("i",17076);this.prices.get(1053).get(1000).set("p",869);this.prices.get(1053).set(2000,new Hash());this.prices.get(1053).get(2000).set("i",17077);this.prices.get(1053).get(2000).set("p",1599);this.prices.get(1053).set(3000,new Hash());this.prices.get(1053).get(3000).set("i",17078);this.prices.get(1053).get(3000).set("p",2269);this.prices.get(1053).set(4000,new Hash());this.prices.get(1053).get(4000).set("i",17079);this.prices.get(1053).get(4000).set("p",2869);this.prices.get(1053).set(5000,new Hash());this.prices.get(1053).get(5000).set("i",17080);this.prices.get(1053).get(5000).set("p",3399);this.prices.get(1053).set(6000,new Hash());this.prices.get(1053).get(6000).set("i",17081);this.prices.get(1053).get(6000).set("p",3859);this.prices.get(1053).set(7000,new Hash());this.prices.get(1053).get(7000).set("i",17082);this.prices.get(1053).get(7000).set("p",4259);this.prices.get(1053).set(8000,new Hash());this.prices.get(1053).get(8000).set("i",17083);this.prices.get(1053).get(8000).set("p",4589);this.prices.get(1053).set(9000,new Hash());this.prices.get(1053).get(9000).set("i",17084);this.prices.get(1053).get(9000).set("p",4855);this.prices.get(1053).set(10000,new Hash());this.prices.get(1053).get(10000).set("i",17085);this.prices.get(1053).get(10000).set("p",5049);this.prices.set(1048,new Hash());this.prices.get(1048).set(250,new Hash());this.prices.get(1048).get(250).set("i",17050);this.prices.get(1048).get(250).set("p",249);this.prices.get(1048).set(500,new Hash());this.prices.get(1048).get(500).set("i",17051);this.prices.get(1048).get(500).set("p",419);this.prices.get(1048).set(1000,new Hash());this.prices.get(1048).get(1000).set("i",17052);this.prices.get(1048).get(1000).set("p",755);this.prices.get(1048).set(2000,new Hash());this.prices.get(1048).get(2000).set("i",17053);this.prices.get(1048).get(2000).set("p",1385);this.prices.get(1048).set(3000,new Hash());this.prices.get(1048).get(3000).set("i",17054);this.prices.get(1048).get(3000).set("p",1949);this.prices.get(1048).set(4000,new Hash());this.prices.get(1048).get(4000).set("i",17055);this.prices.get(1048).get(4000).set("p",2465);this.prices.get(1048).set(5000,new Hash());this.prices.get(1048).get(5000).set("i",17056);this.prices.get(1048).get(5000).set("p",2919);this.prices.get(1048).set(6000,new Hash());this.prices.get(1048).get(6000).set("i",17057);this.prices.get(1048).get(6000).set("p",3315);this.prices.get(1048).set(7000,new Hash());this.prices.get(1048).get(7000).set("i",17058);this.prices.get(1048).get(7000).set("p",3655);this.prices.get(1048).set(8000,new Hash());this.prices.get(1048).get(8000).set("i",17059);this.prices.get(1048).get(8000).set("p",3939);this.prices.get(1048).set(9000,new Hash());this.prices.get(1048).get(9000).set("i",17060);this.prices.get(1048).get(9000).set("p",4165);this.prices.get(1048).set(10000,new Hash());this.prices.get(1048).get(10000).set("i",17061);this.prices.get(1048).get(10000).set("p",4335);this.prices.set(1049,new Hash());this.prices.get(1049).set(250,new Hash());this.prices.get(1049).get(250).set("i",17086);this.prices.get(1049).get(250).set("p",279);this.prices.get(1049).set(500,new Hash());this.prices.get(1049).get(500).set("i",17087);this.prices.get(1049).get(500).set("p",479);this.prices.get(1049).set(1000,new Hash());this.prices.get(1049).get(1000).set("i",17088);this.prices.get(1049).get(1000).set("p",869);this.prices.get(1049).set(2000,new Hash());this.prices.get(1049).get(2000).set("i",17089);this.prices.get(1049).get(2000).set("p",1599);this.prices.get(1049).set(3000,new Hash());this.prices.get(1049).get(3000).set("i",17090);this.prices.get(1049).get(3000).set("p",2269);this.prices.get(1049).set(4000,new Hash());this.prices.get(1049).get(4000).set("i",17091);this.prices.get(1049).get(4000).set("p",2869);this.prices.get(1049).set(5000,new Hash());this.prices.get(1049).get(5000).set("i",17092);this.prices.get(1049).get(5000).set("p",3399);this.prices.get(1049).set(6000,new Hash());this.prices.get(1049).get(6000).set("i",17093);this.prices.get(1049).get(6000).set("p",3859);this.prices.get(1049).set(7000,new Hash());this.prices.get(1049).get(7000).set("i",17094);this.prices.get(1049).get(7000).set("p",4259);this.prices.get(1049).set(8000,new Hash());this.prices.get(1049).get(8000).set("i",17095);this.prices.get(1049).get(8000).set("p",4589);this.prices.get(1049).set(9000,new Hash());this.prices.get(1049).get(9000).set("i",17096);this.prices.get(1049).get(9000).set("p",4855);this.prices.get(1049).set(10000,new Hash());this.prices.get(1049).get(10000).set("i",17097);this.prices.get(1049).get(10000).set("p",5049);this.prices.set(2672,new Hash());this.prices.get(2672).set(250,new Hash());this.prices.get(2672).get(250).set("i",17014);this.prices.get(2672).get(250).set("p",245);this.prices.get(2672).set(500,new Hash());this.prices.get(2672).get(500).set("i",17015);this.prices.get(2672).get(500).set("p",409);this.prices.get(2672).set(1000,new Hash());this.prices.get(2672).get(1000).set("i",17016);this.prices.get(2672).get(1000).set("p",739);this.prices.get(2672).set(2000,new Hash());this.prices.get(2672).get(2000).set("i",17017);this.prices.get(2672).get(2000).set("p",1349);this.prices.get(2672).set(3000,new Hash());this.prices.get(2672).get(3000).set("i",17018);this.prices.get(2672).get(3000).set("p",1899);this.prices.get(2672).set(4000,new Hash());this.prices.get(2672).get(4000).set("i",17019);this.prices.get(2672).get(4000).set("p",2399);this.prices.get(2672).set(5000,new Hash());this.prices.get(2672).get(5000).set("i",17020);this.prices.get(2672).get(5000).set("p",2839);this.prices.get(2672).set(6000,new Hash());this.prices.get(2672).get(6000).set("i",17021);this.prices.get(2672).get(6000).set("p",3229);this.prices.get(2672).set(7000,new Hash());this.prices.get(2672).get(7000).set("i",17022);this.prices.get(2672).get(7000).set("p",3559);this.prices.get(2672).set(8000,new Hash());this.prices.get(2672).get(8000).set("i",17023);this.prices.get(2672).get(8000).set("p",3835);this.prices.get(2672).set(9000,new Hash());this.prices.get(2672).get(9000).set("i",17024);this.prices.get(2672).get(9000).set("p",4055);this.prices.get(2672).set(10000,new Hash());this.prices.get(2672).get(10000).set("i",17025);this.prices.get(2672).get(10000).set("p",4219);this.prices.set(2673,new Hash());this.prices.get(2673).set(250,new Hash());this.prices.get(2673).get(250).set("i",16978);this.prices.get(2673).get(250).set("p",275);this.prices.get(2673).set(500,new Hash());this.prices.get(2673).get(500).set("i",16979);this.prices.get(2673).get(500).set("p",469);this.prices.get(2673).set(1000,new Hash());this.prices.get(2673).get(1000).set("i",16980);this.prices.get(2673).get(1000).set("p",855);this.prices.get(2673).set(2000,new Hash());this.prices.get(2673).get(2000).set("i",16981);this.prices.get(2673).get(2000).set("p",1569);this.prices.get(2673).set(3000,new Hash());this.prices.get(2673).get(3000).set("i",16982);this.prices.get(2673).get(3000).set("p",2219);this.prices.get(2673).set(4000,new Hash());this.prices.get(2673).get(4000).set("i",16983);this.prices.get(2673).get(4000).set("p",2799);this.prices.get(2673).set(5000,new Hash());this.prices.get(2673).get(5000).set("i",16984);this.prices.get(2673).get(5000).set("p",3319);this.prices.get(2673).set(6000,new Hash());this.prices.get(2673).get(6000).set("i",16985);this.prices.get(2673).get(6000).set("p",3775);this.prices.get(2673).set(7000,new Hash());this.prices.get(2673).get(7000).set("i",16986);this.prices.get(2673).get(7000).set("p",4165);this.prices.get(2673).set(8000,new Hash());this.prices.get(2673).get(8000).set("i",16987);this.prices.get(2673).get(8000).set("p",4485);this.prices.get(2673).set(9000,new Hash());this.prices.get(2673).get(9000).set("i",16988);this.prices.get(2673).get(9000).set("p",4745);this.prices.get(2673).set(10000,new Hash());this.prices.get(2673).get(10000).set("i",16989);this.prices.get(2673).get(10000).set("p",4939);this.prices.set(2674,new Hash());this.prices.get(2674).set(250,new Hash());this.prices.get(2674).get(250).set("i",17002);this.prices.get(2674).get(250).set("p",245);this.prices.get(2674).set(500,new Hash());this.prices.get(2674).get(500).set("i",17003);this.prices.get(2674).get(500).set("p",409);this.prices.get(2674).set(1000,new Hash());this.prices.get(2674).get(1000).set("i",17004);this.prices.get(2674).get(1000).set("p",739);this.prices.get(2674).set(2000,new Hash());this.prices.get(2674).get(2000).set("i",17005);this.prices.get(2674).get(2000).set("p",1349);this.prices.get(2674).set(3000,new Hash());this.prices.get(2674).get(3000).set("i",17006);this.prices.get(2674).get(3000).set("p",1899);this.prices.get(2674).set(4000,new Hash());this.prices.get(2674).get(4000).set("i",17007);this.prices.get(2674).get(4000).set("p",2399);this.prices.get(2674).set(5000,new Hash());this.prices.get(2674).get(5000).set("i",17008);this.prices.get(2674).get(5000).set("p",2839);this.prices.get(2674).set(6000,new Hash());this.prices.get(2674).get(6000).set("i",17009);this.prices.get(2674).get(6000).set("p",3229);this.prices.get(2674).set(7000,new Hash());this.prices.get(2674).get(7000).set("i",17010);this.prices.get(2674).get(7000).set("p",3559);this.prices.get(2674).set(8000,new Hash());this.prices.get(2674).get(8000).set("i",17011);this.prices.get(2674).get(8000).set("p",3835);this.prices.get(2674).set(9000,new Hash());this.prices.get(2674).get(9000).set("i",17012);this.prices.get(2674).get(9000).set("p",4055);this.prices.get(2674).set(10000,new Hash());this.prices.get(2674).get(10000).set("i",17013);this.prices.get(2674).get(10000).set("p",4219);this.prices.set(2675,new Hash());this.prices.get(2675).set(250,new Hash());this.prices.get(2675).get(250).set("i",16966);this.prices.get(2675).get(250).set("p",275);this.prices.get(2675).set(500,new Hash());this.prices.get(2675).get(500).set("i",16967);this.prices.get(2675).get(500).set("p",469);this.prices.get(2675).set(1000,new Hash());this.prices.get(2675).get(1000).set("i",16968);this.prices.get(2675).get(1000).set("p",855);this.prices.get(2675).set(2000,new Hash());this.prices.get(2675).get(2000).set("i",16969);this.prices.get(2675).get(2000).set("p",1569);this.prices.get(2675).set(3000,new Hash());this.prices.get(2675).get(3000).set("i",16970);this.prices.get(2675).get(3000).set("p",2219);this.prices.get(2675).set(4000,new Hash());this.prices.get(2675).get(4000).set("i",16971);this.prices.get(2675).get(4000).set("p",2799);this.prices.get(2675).set(5000,new Hash());this.prices.get(2675).get(5000).set("i",16972);this.prices.get(2675).get(5000).set("p",3319);this.prices.get(2675).set(6000,new Hash());this.prices.get(2675).get(6000).set("i",16973);this.prices.get(2675).get(6000).set("p",3775);this.prices.get(2675).set(7000,new Hash());this.prices.get(2675).get(7000).set("i",16974);this.prices.get(2675).get(7000).set("p",4165);this.prices.get(2675).set(8000,new Hash());this.prices.get(2675).get(8000).set("i",16975);this.prices.get(2675).get(8000).set("p",4485);this.prices.get(2675).set(9000,new Hash());this.prices.get(2675).get(9000).set("i",16976);this.prices.get(2675).get(9000).set("p",4745);this.prices.get(2675).set(10000,new Hash());this.prices.get(2675).get(10000).set("i",16977);this.prices.get(2675).get(10000).set("p",4939);this.prices.set(2676,new Hash());this.prices.get(2676).set(250,new Hash());this.prices.get(2676).get(250).set("i",16990);this.prices.get(2676).get(250).set("p",245);this.prices.get(2676).set(500,new Hash());this.prices.get(2676).get(500).set("i",16991);this.prices.get(2676).get(500).set("p",409);this.prices.get(2676).set(1000,new Hash());this.prices.get(2676).get(1000).set("i",16992);this.prices.get(2676).get(1000).set("p",739);this.prices.get(2676).set(2000,new Hash());this.prices.get(2676).get(2000).set("i",16993);this.prices.get(2676).get(2000).set("p",1349);this.prices.get(2676).set(3000,new Hash());this.prices.get(2676).get(3000).set("i",16994);this.prices.get(2676).get(3000).set("p",1899);this.prices.get(2676).set(4000,new Hash());this.prices.get(2676).get(4000).set("i",16995);this.prices.get(2676).get(4000).set("p",2399);this.prices.get(2676).set(5000,new Hash());this.prices.get(2676).get(5000).set("i",16996);this.prices.get(2676).get(5000).set("p",2839);this.prices.get(2676).set(6000,new Hash());this.prices.get(2676).get(6000).set("i",16997);this.prices.get(2676).get(6000).set("p",3229);this.prices.get(2676).set(7000,new Hash());this.prices.get(2676).get(7000).set("i",16998);this.prices.get(2676).get(7000).set("p",3559);this.prices.get(2676).set(8000,new Hash());this.prices.get(2676).get(8000).set("i",16999);this.prices.get(2676).get(8000).set("p",3835);this.prices.get(2676).set(9000,new Hash());this.prices.get(2676).get(9000).set("i",17000);this.prices.get(2676).get(9000).set("p",4055);this.prices.get(2676).set(10000,new Hash());this.prices.get(2676).get(10000).set("i",17001);this.prices.get(2676).get(10000).set("p",4219);this.prices.set(2677,new Hash());this.prices.get(2677).set(250,new Hash());this.prices.get(2677).get(250).set("i",16954);this.prices.get(2677).get(250).set("p",275);this.prices.get(2677).set(500,new Hash());this.prices.get(2677).get(500).set("i",16955);this.prices.get(2677).get(500).set("p",469);this.prices.get(2677).set(1000,new Hash());this.prices.get(2677).get(1000).set("i",16956);this.prices.get(2677).get(1000).set("p",855);this.prices.get(2677).set(2000,new Hash());this.prices.get(2677).get(2000).set("i",16957);this.prices.get(2677).get(2000).set("p",1569);this.prices.get(2677).set(3000,new Hash());this.prices.get(2677).get(3000).set("i",16958);this.prices.get(2677).get(3000).set("p",2219);this.prices.get(2677).set(4000,new Hash());this.prices.get(2677).get(4000).set("i",16959);this.prices.get(2677).get(4000).set("p",2799);this.prices.get(2677).set(5000,new Hash());this.prices.get(2677).get(5000).set("i",16960);this.prices.get(2677).get(5000).set("p",3319);this.prices.get(2677).set(6000,new Hash());this.prices.get(2677).get(6000).set("i",16961);this.prices.get(2677).get(6000).set("p",3775);this.prices.get(2677).set(7000,new Hash());this.prices.get(2677).get(7000).set("i",16962);this.prices.get(2677).get(7000).set("p",4165);this.prices.get(2677).set(8000,new Hash());this.prices.get(2677).get(8000).set("i",16963);this.prices.get(2677).get(8000).set("p",4485);this.prices.get(2677).set(9000,new Hash());this.prices.get(2677).get(9000).set("i",16964);this.prices.get(2677).get(9000).set("p",4745);this.prices.get(2677).set(10000,new Hash());this.prices.get(2677).get(10000).set("i",16965);this.prices.get(2677).get(10000).set("p",4939);},init:function(){if($("myForm")){this.order_action=$("myForm").action;$("myForm").addEvent("submit",function(a){if(EC_LithoCalc.flag_form){new Event(a).stop();}});}this.setLocalVars();this.setOpts();this.setSkus();this.setWeights();this.setPrices();this.setFoldingOpts();if(window.EC_Mailing){EC_Mailing.init();}this.updateForm();},setLocalVars:function(){this.localText=[];this.localText.titleText="Pricing Calculator";this.localText.headingText="Select A Product";this.localText.priceText="Printing Total";this.localText.productText="Product";this.localText.sizeText="Size";this.localText.trimSizeText="Custom Trim Size (Not Required)";this.localText.widthText="Width";this.localText.heightText="Height";this.localText.paperText="Paper";this.localText.colorText="Color";this.localText.coatingText="Coating";this.localText.pageText="Pages";this.localText.turnaroundText="Turnaround";this.localText.foldingText="Folding";this.localText.quantityText="Quantity";this.localText.orderText="Place Order";this.localText.estimateText="Print Estimate";this.localText.chooseText="Choose Here...";this.localText.shippingText="Estimate Shipping";this.localText.zipcodeText="Zip / Postal Code";this.localText.countrycodeText="Country";this.localText.ratesText="Get Rates";this.localText.shipmethodText="Ship Method";this.localText.shiprateText="Shipping Rate";this.localText.shiptimeText="Shipping Time";this.localText.pleaseclickText="<p>Please Click &quot;Get Rates&quot;</p>";this.localText.ziperrorText="Please Enter A 5 Digit Zip Code.";this.localText.pleasewaitText="Please Wait";this.names=[];this.titles=[];this.names=["product","size","paper","color","coating","turnaround"];this.titles=[this.localText.productText,this.localText.sizeText,this.localText.paperText,this.localText.colorText,this.localText.coatingText,this.localText.turnaroundText];shipOpts=new Hash({"03":"UPS Ground","12":"UPS 3 Day Select","02":"UPS 2nd Day","01":"UPS Next Day",WC:"Will Call",FR:"Freight",DL:"Delivery",RO:"Recycle Overages"});},createForm:function(a){this.formContents='<h3 class="formTitle">'+this.localText.titleText+"</h3>";this.formContents+="<table>";this.formContents+=calcFI_TPL("",'<h4 class="formHeading">'+this.localText.headingText+"</h4>","");this.formContents+=a;this.formContents+="</table>";this.formContents+='<input type="hidden" name="price_id" value="" />';this.formContents+='<input type="hidden" name="quote" value="" />';this.formContents+='<input type="hidden" id="totals" name="totals" value="" />';$("myForm").setHTML(this.formContents);if(window.datePickerController){datePickerController.create();}},createSelect:function(h,d,f,g,b){if(window.EC_Mailing&&d=="quantity"){f="EC_Mailing.setQuantity();"+f;}var a='<select id="'+d+'" name="'+d+'" onchange="'+f+'">';if(d=="quantity"){a+=this.createQuantityOptions(g);}else{if(d=="folding"&&this.folding==true){a+=this.createFoldingOptions(g);}else{if(b){a+=this.createOptions(g,true);}else{a+=this.createOptions(g);}}}a+="</select>";var e="";var c="";if(this.green==true&&d=="paper"){c=calcFI_TPL("","","","greenBadgeTD");}return c+calcFI_TPL(h,a,d,e);},createSizeInput:function(f,c,d){var e=(c=="width")?this.widthText:this.heightText;var b=[];if($(c+"Fract")){b[$(c+"Fract").selectedIndex]=" selected";}var a="";return calcFI_TPL(f,a,c);},createTrimSizeInput:function(e,b,c){var d=this.opts.size[this.sizeID];if($(b)){d=$(b).getValue();}var a='<input type="text" id="'+b+'" name="'+b+'" value="'+d+'" onblur="'+c+'" class="textInput" />';return calcFI_TPL(e,a,b);},createOptions:function(e,g){var j,f,h;var k=[];var l="";var c="";var d="";k=e.keys();h=k.length;for(f=0;f<h;f++){j=k[f];if(!isNaN(j)){d=($(this.currentName)&&j==$(this.currentName).getValue())?" selected":"";if(this.currentName=="size"&&f==0){this.sizeID=j;}if(!g){}var b=(g)?this.additionalOpts.get(this.currentName).get(j).get("name"):this.opts[this.currentName][j];l+='<option value="'+j+'"'+d+">"+b+"</option>";}}return l;},createQuantityOptions:function(e){var b;var c="";var f="";var d="";if(e.length>0){e.each(function(g){if(!isNaN(g)){d=($("quantity")&&g==$("quantity").getValue())?" selected":"";c+='<option value="'+g+'"'+d+">"+g+"</option>";}});}return c;},createFoldingOptions:function(e){var a="";var b="";var c=false;if($("paper")){var d=$("paper").options[$("paper").selectedIndex].text;if(d.indexOf("Cover")!=-1){c=true;}}e.each(function(g,f){($("folding")&&f==$("folding").getValue())?b=" selected":b="";if(c){if(g.get("name").indexOf("Cover")!=-1||g.get("name").indexOf("None")!=-1){a+='<option value="'+f+'"'+b+">"+g.get("name")+"</option>";}}else{if(g.get("name").indexOf("Cover")==-1){a+='<option value="'+f+'"'+b+">"+g.get("name")+"</option>";}}});return a;},updateForm:function(){var e=0;var c;var g;this.formContents="";this.currentSku=this.skus;var b=false;for(var e=0;e<this.names.length;e++){this.currentName=this.names[e];this.currentTitle=this.titles[e];if(this.currentName=="width"||this.currentName=="height"){this.formContents+=this.createSizeInput(this.currentTitle,this.currentName,"EC_LithoCalc.updateForm()");if(this.currentName=="width"){continue;}}else{g=(this.currentName=="size")?"EC_LithoCalc.resetTrimSize();":"";this.formContents+=this.createSelect(this.currentTitle,this.currentName,g+"EC_LithoCalc.updateForm()",this.currentSku);if(this.currentName=="size"){this.formContents+=this.createTrimSizeInput(this.localText.trimSizeText,"trim_size","EC_LithoCalc.updateTrimSize()");}}var d=0;var h="";this.currentSku.each(function(i,a){d++;if(d==1){h=a;}});if(this.currentName=="height"){var f=this.currentSku.keys();f.sort(EC_Base.sortNumber);f.reverse();f.each(function(a){if(EC_LithoCalc.area<=a){h=a.toString();EC_LithoCalc.selectedArea=a;}});}if($(this.currentName)&&this.currentSku.hasKey($(this.currentName).getValue())){this.currentSku=this.currentSku.get($(this.currentName).getValue());}else{if(this.currentSku.hasKey(h)){this.currentSku=this.currentSku.get(h);}else{break;}}}if(this.currentSku>0){this.setupQuantities();}else{this.createForm(this.formContents);}},updateArea:function(){if($("width")&&$("height")){this.widthText=Math.floor(Number($("width").getValue())).toString();this.heightText=Math.floor(Number($("height").getValue())).toString();if(this.widthText=="NaN"){this.widthText=0;}if(this.heightText=="NaN"){this.heightText=0;}var a=Math.floor(Number($("width").getValue()))+Number($("widthFract").getValue());var b=Math.floor(Number($("height").getValue()))+Number($("heightFract").getValue());if(isNaN(a)){a=$("width").value=0;$("widthFract").selectedIndex=0;}if(isNaN(b)){b=$("height").value=0;$("heightFract").selectedIndex=0;}if(a<this.opts.min_width&&a>0){alert("The minimum width is "+this.opts.min_width);return;}if(b<this.opts.min_height&&b>0){alert("The minimum height is "+this.opts.min_height);return;}if(a>this.opts.max_width){alert("The maximum width is "+this.opts.max_width);return;}if(b>this.opts.max_height){alert("The maximum height is "+this.opts.max_height);return;}this.area=a*b;}},updateTrimSize:function(){if($("trim_size")){var e=$("trim_size").getValue();e=e.replace(/([^0-9. Xx])/g,"");var d=$("size").options[$("size").selectedIndex].text;d=d.replace(/([^0-9. Xx])/g,"");var a=Number(e.replace(/(\d[.]*\d{0,4})([ Xx]+)(\d[.]*\d{0,4})(.*)/,"$1"));var c=Number(e.replace(/(\d[.]*\d{0,4})([ Xx]+)(\d[.]*\d{0,4})(.*)/,"$3"));var f=Number(d.replace(/(\d[.]*\d{0,4})([ Xx]+)(\d[.]*\d{0,4})(.*)/,"$1"));var b=Number(d.replace(/(\d[.]*\d{0,4})([ Xx]+)(\d[.]*\d{0,4})(.*)/,"$3"));a=(a>f)?f:a;c=(c>b)?b:c;$("trim_size").value=a+" X "+c;}},resetTrimSize:function(){if($("trim_size")){$("trim_size").value=$("size").options[$("size").selectedIndex].text;}},setupQuantities:function(){var a=0;var c=0;if(this.folding){this.formContents+=this.createSelect(this.localText.foldingText,"folding","EC_LithoCalc.updatePrice()",this.foldingOpts);}if(this.additional){this.additionalOpts.each(function(g,f){EC_LithoCalc.currentName=f;EC_LithoCalc.formContents+=EC_LithoCalc.createSelect(EC_LithoCalc.localText[f+"Text"],f,"EC_LithoCalc.updatePrice()",g,true);});}var e=this.prices.get(this.currentSku).keys();e.sort(this.numOrdA);this.formContents+=this.createSelect(this.localText.quantityText,"quantity","EC_LithoCalc.updatePrice()",e);if($("quantity")){var d=$("quantity").getValue();if(this.prices.get(this.currentSku).hasKey(d)){c=this.prices.get(this.currentSku).get(d).get("p");}}else{var b=this.prices.get(this.currentSku).keys();c=this.prices.get(this.currentSku).get(b[0]).get("p");}if(window.EC_Mailing){this.formContents+=EC_Mailing.updateForm();}else{this.formContents+=calcHR_TPL();}this.formContents+=calcTotalFI_TPL(this.localText.priceText,'<div id="printRate" class="price">'+EC_Base.moneyFormat(c)+"</div>","");if(window.EC_Mailing){this.formContents+=EC_Mailing.totalsForm();}else{this.formContents+=calcHR_TPL();}this.formContents+=calcFI_TPL("",calcBTN_TPL(this.localText.orderText,"EC_LithoCalc.placeOrder()"),"");this.formContents+=calcFI_TPL("",calcBTN_TPL(this.localText.estimateText,"EC_LithoCalc.printEstimate()"),"");if(!window.EC_Mailing){this.formContents+=this.setupShipping();}else{this.formContents+=postageWarning();}this.createForm(this.formContents);this.updatePrice();},updateFolding:function(){var d=$("myForm");var c=$("folding").getValue();if(c==undefined){var f=this.foldingOpts.keys();c=f[0];}var b=this.foldingOpts.get(c).get("price");var a=this.foldingOpts.get(c).get("setup");var e=($("quantity").options)?$("quantity").options[$("quantity").selectedIndex].text:$("quantity").getValue();var g=parseInt(e)/1000;this.foldRate=(Number(b)*g)+Number(a);},updatePrice:function(){this.foldRate=0;if($("folding")&&this.folding==true){this.updateFolding();}if($("quantity")){this.currentSku=this.skus;for(var c=0;c<this.names.length;c++){this.currentName=this.names[c];if($(this.currentName)&&this.currentName!="width"&&this.currentName!="height"){this.currentSku=this.currentSku.get($(this.currentName).value);}if($(this.currentName)&&this.currentName=="height"){this.currentSku=this.skus.get($("product").value).get(this.selectedArea);}}var a=this.prices.get(this.currentSku).get($("quantity").value).get("p");if(this.additional){this.additionalOpts.each(function(h,f){if($(f)){var g=Number(EC_LithoCalc.additionalOpts.get(f).get($(f).value).get("price"));var e=Number(EC_LithoCalc.additionalOpts.get(f).get($(f).value).get("setup"));a+=g*($("quantity").value/1000)+e;}});}this.printRate=a+this.foldRate;$("printRate").setHTML(EC_Base.moneyFormat(this.printRate));if(window.EC_Mailing){EC_Mailing.updatePrice();}if($("zipcode")){var d=$("zipcode").getValue();if(d.length==5){this.getShipRates();}}var b={print:this.printRate,folding:this.foldRate,shipping:this.shipRates};if(window.EC_Mailing){b.setup=Number($("setupRate").getText().replace(/([^0-9.])/,""));b.inkjet=Number($("inkjetRate").getText().replace(/([^0-9.])/,""));b.tabbing=Number($("tabbingRate").getText().replace(/([^0-9.])/,""));b.postage=Number($("postageRate").getText().replace(/([^0-9.])/,""));if($("listRate")){b.list=Number($("listRate").getText().replace(/([^0-9.])/,""));}b.total=Number($("totalRate").getText().replace(/([^0-9.])/,""));}if($("totals")){$("totals").value=Json.toString(b);}else{EC_LithoSku.updatePrice.delay(100);}}},printEstimate:function(){if(this.order_action==""){alert("This feature is not available right now. Please try again later.");return;}$("myForm").action=estimateURL;$("myForm").target="estimatepopup";estimatePopup($("myForm").target);setTimeout(function(){$("myForm").submit();},100);},placeOrder:function(){$("myForm").target="_self";if(this.order_action!=""){$("myForm").action=this.order_action;}if(this.currentSku!=null){var a=this.prices.get(this.currentSku).get($("quantity").getValue()).get("i");}else{var c=this.prices.keys();var a=this.prices.get(c[0]).get($("quantity").getValue()).get("i");}var b=$("myForm");b.price_id.value=a;this.flag_form=false;b.submit();},addSKU:function(f,g){var d;var e;var c;var b=f.length;f.each(function(h,a){if(a>0){c=c.get(f[a-1]);}else{c=EC_LithoCalc.skus;}if(!c.hasKey(h)){c.set(h,new Hash());}if(a==b-1){c.set(h,g);}});},setupShipping:function(){var a=calcHR_TPL();a+=calcFI_TPL("",'<h4 class="formHeading">'+this.localText.shippingText+"</h4>","");if(this.international==1){a+=calcFI_TPL(this.localText.countrycodeText,this.country_code,"");}else{a+=this.country_code;}a+=calcFI_TPL(this.localText.zipcodeText,'<input type="text" class="zipTI" id="zipcode" name="zipcode" onkeyup="EC_LithoCalc.checkEnter(event, \'EC_LithoCalc.getShipRates()\')" /><input id="getRatesBTN" type="button" class="rateBTN" value="'+this.localText.ratesText+'" onclick="EC_LithoCalc.getShipRates()" />',"");a+=calcShipGrid_TPL("<br />");return a;},shipSelect:function(){},getShipRates:function(){if(!this.currentSku){this.updateForm();}var b=$("getRatesBTN");var c=$("zipcode").getValue();if(b.disabled){return;}var e=$("country_code").getValue();if((c.length!=5||isNaN(c))&&e=="US"){alert(this.localText.ziperrorText);return;}b.value=this.localText.pleasewaitText;b.disabled=true;this.timer=setTimeout("EC_LithoCalc.stopRates()",10000);this.selWeight=Math.ceil((Number($("quantity").getValue())/1000)*this.weights[this.currentSku]);var a="/ws/shipping/getRates/zip/"+c+"/country/"+e+"/weight/"+this.selWeight+"/handling_fee/"+this.handling_fee;var d=new Ajax(a,{method:"get",onSuccess:function(g){EC_LithoCalc.shipRates=Json.evaluate(g);EC_LithoCalc.stopRates();EC_LithoCalc.changeShipRates();if(EC_LithoCalc.shipRates.error){alert(EC_LithoCalc.shipRates.error);}if($("totals")){var f=Json.evaluate($("totals").getValue());f.shipping=EC_LithoCalc.shipRates;$("totals").value=Json.toString(f);}}}).request();},stopRates:function(){var a=$("getRatesBTN");a.value=this.localText.ratesText;a.disabled=false;clearTimeout(this.timer);},changeShipRates:function(){var a=" checked";$$("input[name=shipMethod]").each(function(b){if(b.checked!=false){a=b.value.toString();}});$("shipGrid").setHTML("<br />"+this.shipGrid(a));},shipGrid:function(e){var b='<table width="100%">';var c="";var d=$("country_code").getValue();var a=false;if($("delivery")&&$("delivery_zipcode")&&$("delivery_countrycode")){if($("delivery").getValue()==1&&($("delivery_zipcode").getValue()==$("zipcode").getValue()||$("delivery_zipcode").getValue()=="ANY")&&d==$("delivery_countrycode").getValue()){a=true;}}shipOpts.each(function(h,f){if(!h.match(/Recycle/)){var g=EC_LithoCalc.shipRates[f.toString()];if(e==f.toString()){e=" checked";}if(g!==false&&!isNaN(g)){g=EC_Base.moneyFormat(g);}if(g!==false){if(f!="DL"||(f=="DL"&&a==true)){b+='<tr><td class="ship_desc"><input type="radio" name="shipMethod" value="'+f.toString()+'"'+e+" />";b+=h+'</td><td class="ship_price">'+g+"</td></tr>";}if(e==" checked"){e="";}}}});b+="</table>";return b;},checkEnter:function(event,func){event=new Event(event);if(event.key=="enter"){if(func){eval(func);}event.stop();this.flag_form=true;}},numOrdA:function(d,c){return(d-c);},numOrdD:function(d,c){return(c-d);},debug:function(c,b){var a="";if(b){a=EC_Base.dumpObj(c,true);}else{a=c;}$("calcDebug").setHTML(a+"<br />=======================================<br /><br />");}};window.addEvent("domready",function(){EC_LithoCalc.init();});
