var EC_LithoCalc={product_name:"",product_id:58,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:0,country_code:'<input type="hidden" id="country_code" name="country_code" value="US" />',handling_fee:0,order_action:"",green:false,minimum_price:0,minimum_area_for_price:1,quarter_inch_increments:false,mailingCanUseUV:false,folding:false,additional:true,additionalOpts:false,setAdditionalOpts:function(){this.additionalOpts=new Hash();this.additionalOpts.set("custom_print_type",new Hash());this.additionalOpts.get("custom_print_type").set(679,new Hash());this.additionalOpts.get("custom_print_type").get(679).set("name","Flat Printing");this.additionalOpts.get("custom_print_type").get(679).set("price","0.00");this.additionalOpts.get("custom_print_type").get(679).set("setup","0.00");this.additionalOpts.get("custom_print_type").set(678,new Hash());this.additionalOpts.get("custom_print_type").get(678).set("name","Raised Printing");this.additionalOpts.get("custom_print_type").get(678).set("price","0.00");this.additionalOpts.get("custom_print_type").get(678).set("setup","0.00");this.additionalOpts.get("custom_print_type").set(680,new Hash());this.additionalOpts.get("custom_print_type").get(680).set("name","Laser Safe Raised Print");this.additionalOpts.get("custom_print_type").get(680).set("price","0.00");this.additionalOpts.get("custom_print_type").get(680).set("setup","0.00");},setOpts:function(){this.opts=[];this.opts.product=[];this.opts.product[58]="Letterhead Foil";this.product_name="Letterhead Foil";this.opts.coating=[];this.opts.color=[];this.opts.paper=[];this.opts.size=[];this.opts.turnaround=[];this.opts.color[482]="Blind Emboss & 1 Ink DIE SUPPLIED";this.opts.paper[399]="Parchtint 24#";this.opts.color[485]="1 Foil";this.opts.color[488]="1 Foil & 1 Ink";this.opts.color[476]="1 Foil DIE SUPPLIED";this.opts.color[491]="Blind Emboss & 2 Inks";this.opts.color[478]="2 Foils DIES SUPPLIED";this.opts.paper[395]="25% Cotton";this.opts.color[481]="1 Foil & 2 inks DIE SUPPLIED";this.opts.paper[398]="Fibre-Tone 24#";this.opts.color[484]="1 Foil & 1 Emboss COMBO DIE SUPPLIED";this.opts.paper[494]="Strathmore 24#";this.opts.color[487]="1 Blind Emboss";this.opts.size[252]="8.5 x 11";this.opts.color[490]="Blind Emboss & 1 Ink";this.opts.turnaround[368]="See Schedule";this.opts.size[326]="Monarch";this.opts.color[480]="1 Foil & 1 Ink DIE SUPPLIED";this.opts.paper[397]="Laid 24#";this.opts.color[483]="Blind Emboss & 2 Inks DIE SUPPLIED";this.opts.paper[400]="Classic Linen 24#";this.opts.color[486]="2 Foils";this.opts.paper[394]="Hammermill 24# Bond";this.opts.color[489]="1 Foil & 2 inks";this.opts.coating[367]="No Coating";this.opts.color[492]="1 Foil & 1 Emboss";this.opts.color[479]="1 Blind Emboss DIE SUPPLIED";this.opts.paper[396]="Linen 24#";this.opts.color[366]="1 color";this.opts.color[369]="2 color";this.opts.color[370]="3 color";if(this.product_name=="Roll Labels"){this.opts.die_shapes={};for(var b in this.opts.size){if(!isNaN(b)){var d=this.opts.size[b];var c=d.split(" - ");if(c.length==2){this.opts.size[b]=c[0];if(this.opts.die_shapes[c[1]]==undefined){this.opts.die_shapes[c[1]]=[];}this.opts.die_shapes[c[1]].push(b);}}}}},setSkus:function(){this.skus=new Hash();this.addSKU([58,"326",399,492,367,368],3657);this.addSKU([58,"252",399,491,367,368],3640);this.addSKU([58,"252",399,490,367,368],3639);this.addSKU([58,"252",399,489,367,368],3638);this.addSKU([58,"252",399,488,367,368],3637);this.addSKU([58,"252",399,487,367,368],3636);this.addSKU([58,"252",399,486,367,368],3635);this.addSKU([58,"252",399,485,367,368],3634);this.addSKU([58,"252",399,484,367,368],3633);this.addSKU([58,"252",399,483,367,368],3632);this.addSKU([58,"252",399,482,367,368],3631);this.addSKU([58,"252",399,481,367,368],3630);this.addSKU([58,"252",399,480,367,368],3629);this.addSKU([58,"252",399,479,367,368],3628);this.addSKU([58,"252",399,478,367,368],3627);this.addSKU([58,"252",399,492,367,368],3641);this.addSKU([58,"326",399,476,367,368],3642);this.addSKU([58,"326",399,491,367,368],3656);this.addSKU([58,"326",399,490,367,368],3655);this.addSKU([58,"326",399,489,367,368],3654);this.addSKU([58,"326",399,488,367,368],3653);this.addSKU([58,"326",399,487,367,368],3652);this.addSKU([58,"326",399,486,367,368],3651);this.addSKU([58,"326",399,485,367,368],3650);this.addSKU([58,"326",399,484,367,368],3649);this.addSKU([58,"326",399,483,367,368],3648);this.addSKU([58,"326",399,482,367,368],3647);this.addSKU([58,"326",399,481,367,368],3646);this.addSKU([58,"326",399,480,367,368],3645);this.addSKU([58,"326",399,479,367,368],3644);this.addSKU([58,"326",399,478,367,368],3643);this.addSKU([58,"252",399,476,367,368],3626);this.addSKU([58,"326",398,492,367,368],3625);this.addSKU([58,"252",398,491,367,368],3608);this.addSKU([58,"252",398,490,367,368],3607);this.addSKU([58,"252",398,489,367,368],3606);this.addSKU([58,"252",398,488,367,368],3605);this.addSKU([58,"252",398,487,367,368],3604);this.addSKU([58,"252",398,486,367,368],3603);this.addSKU([58,"252",398,485,367,368],3602);this.addSKU([58,"252",398,484,367,368],3601);this.addSKU([58,"252",398,483,367,368],3600);this.addSKU([58,"252",398,482,367,368],3599);this.addSKU([58,"252",398,481,367,368],3598);this.addSKU([58,"252",398,480,367,368],3597);this.addSKU([58,"252",398,479,367,368],3596);this.addSKU([58,"252",398,478,367,368],3595);this.addSKU([58,"252",398,492,367,368],3609);this.addSKU([58,"326",398,476,367,368],3610);this.addSKU([58,"326",398,491,367,368],3624);this.addSKU([58,"326",398,490,367,368],3623);this.addSKU([58,"326",398,489,367,368],3622);this.addSKU([58,"326",398,488,367,368],3621);this.addSKU([58,"326",398,487,367,368],3620);this.addSKU([58,"326",398,486,367,368],3619);this.addSKU([58,"326",398,485,367,368],3618);this.addSKU([58,"326",398,484,367,368],3617);this.addSKU([58,"326",398,483,367,368],3616);this.addSKU([58,"326",398,482,367,368],3615);this.addSKU([58,"326",398,481,367,368],3614);this.addSKU([58,"326",398,480,367,368],3613);this.addSKU([58,"326",398,479,367,368],3612);this.addSKU([58,"326",398,478,367,368],3611);this.addSKU([58,"252",398,476,367,368],3594);this.addSKU([58,"326",494,492,367,368],3721);this.addSKU([58,"252",494,491,367,368],3704);this.addSKU([58,"252",494,490,367,368],3703);this.addSKU([58,"252",494,489,367,368],3702);this.addSKU([58,"252",494,488,367,368],3701);this.addSKU([58,"252",494,487,367,368],3700);this.addSKU([58,"252",494,486,367,368],3699);this.addSKU([58,"252",494,485,367,368],3698);this.addSKU([58,"252",494,484,367,368],3697);this.addSKU([58,"252",494,483,367,368],3696);this.addSKU([58,"252",494,482,367,368],3695);this.addSKU([58,"252",494,481,367,368],3694);this.addSKU([58,"252",494,480,367,368],3693);this.addSKU([58,"252",494,479,367,368],3692);this.addSKU([58,"252",494,478,367,368],3691);this.addSKU([58,"252",494,492,367,368],3705);this.addSKU([58,"326",494,476,367,368],3706);this.addSKU([58,"326",494,491,367,368],3720);this.addSKU([58,"326",494,490,367,368],3719);this.addSKU([58,"326",494,489,367,368],3718);this.addSKU([58,"326",494,488,367,368],3717);this.addSKU([58,"326",494,487,367,368],3716);this.addSKU([58,"326",494,486,367,368],3715);this.addSKU([58,"326",494,485,367,368],3714);this.addSKU([58,"326",494,484,367,368],3713);this.addSKU([58,"326",494,483,367,368],3712);this.addSKU([58,"326",494,482,367,368],3711);this.addSKU([58,"326",494,481,367,368],3710);this.addSKU([58,"326",494,480,367,368],3709);this.addSKU([58,"326",494,479,367,368],3708);this.addSKU([58,"326",494,478,367,368],3707);this.addSKU([58,"252",494,476,367,368],3690);this.addSKU([58,"326",400,492,367,368],3689);this.addSKU([58,"252",400,491,367,368],3672);this.addSKU([58,"252",400,490,367,368],3671);this.addSKU([58,"252",400,489,367,368],3670);this.addSKU([58,"252",400,488,367,368],3669);this.addSKU([58,"252",400,487,367,368],3668);this.addSKU([58,"252",400,486,367,368],3667);this.addSKU([58,"252",400,485,367,368],3666);this.addSKU([58,"252",400,484,367,368],3665);this.addSKU([58,"252",400,483,367,368],3664);this.addSKU([58,"252",400,482,367,368],3663);this.addSKU([58,"252",400,481,367,368],3662);this.addSKU([58,"252",400,480,367,368],3661);this.addSKU([58,"252",400,479,367,368],3660);this.addSKU([58,"252",400,478,367,368],3659);this.addSKU([58,"252",400,492,367,368],3673);this.addSKU([58,"326",400,476,367,368],3674);this.addSKU([58,"326",400,491,367,368],3688);this.addSKU([58,"326",400,490,367,368],3687);this.addSKU([58,"326",400,489,367,368],3686);this.addSKU([58,"326",400,488,367,368],3685);this.addSKU([58,"326",400,487,367,368],3684);this.addSKU([58,"326",400,486,367,368],3683);this.addSKU([58,"326",400,485,367,368],3682);this.addSKU([58,"326",400,484,367,368],3681);this.addSKU([58,"326",400,483,367,368],3680);this.addSKU([58,"326",400,482,367,368],3679);this.addSKU([58,"326",400,481,367,368],3678);this.addSKU([58,"326",400,480,367,368],3677);this.addSKU([58,"326",400,479,367,368],3676);this.addSKU([58,"326",400,478,367,368],3675);this.addSKU([58,"252",400,476,367,368],3658);this.addSKU([58,"326",395,492,367,368],3529);this.addSKU([58,"252",395,491,367,368],3512);this.addSKU([58,"252",395,490,367,368],3511);this.addSKU([58,"252",395,489,367,368],3510);this.addSKU([58,"252",395,488,367,368],3509);this.addSKU([58,"252",395,487,367,368],3508);this.addSKU([58,"252",395,486,367,368],3507);this.addSKU([58,"252",395,485,367,368],3506);this.addSKU([58,"252",395,484,367,368],3505);this.addSKU([58,"252",395,483,367,368],3504);this.addSKU([58,"252",395,482,367,368],3503);this.addSKU([58,"252",395,481,367,368],3502);this.addSKU([58,"252",395,480,367,368],3501);this.addSKU([58,"252",395,479,367,368],3500);this.addSKU([58,"252",395,478,367,368],3499);this.addSKU([58,"252",395,492,367,368],3513);this.addSKU([58,"326",395,476,367,368],3514);this.addSKU([58,"326",395,491,367,368],3528);this.addSKU([58,"326",395,490,367,368],3527);this.addSKU([58,"326",395,489,367,368],3526);this.addSKU([58,"326",395,488,367,368],3525);this.addSKU([58,"326",395,487,367,368],3524);this.addSKU([58,"326",395,486,367,368],3523);this.addSKU([58,"326",395,485,367,368],3522);this.addSKU([58,"326",395,484,367,368],3521);this.addSKU([58,"326",395,483,367,368],3520);this.addSKU([58,"326",395,482,367,368],3519);this.addSKU([58,"326",395,481,367,368],3518);this.addSKU([58,"326",395,480,367,368],3517);this.addSKU([58,"326",395,479,367,368],3516);this.addSKU([58,"326",395,478,367,368],3515);this.addSKU([58,"252",395,476,367,368],3498);this.addSKU([58,"326",394,492,367,368],3497);this.addSKU([58,"252",394,491,367,368],3480);this.addSKU([58,"252",394,490,367,368],3479);this.addSKU([58,"252",394,489,367,368],3478);this.addSKU([58,"252",394,488,367,368],3477);this.addSKU([58,"252",394,487,367,368],3476);this.addSKU([58,"252",394,486,367,368],3475);this.addSKU([58,"252",394,485,367,368],3474);this.addSKU([58,"252",394,484,367,368],3473);this.addSKU([58,"252",394,483,367,368],3472);this.addSKU([58,"252",394,482,367,368],3471);this.addSKU([58,"252",394,481,367,368],3470);this.addSKU([58,"252",394,480,367,368],3469);this.addSKU([58,"252",394,479,367,368],3468);this.addSKU([58,"252",394,478,367,368],3467);this.addSKU([58,"252",394,492,367,368],3481);this.addSKU([58,"326",394,476,367,368],3482);this.addSKU([58,"326",394,491,367,368],3496);this.addSKU([58,"326",394,490,367,368],3495);this.addSKU([58,"326",394,489,367,368],3494);this.addSKU([58,"326",394,488,367,368],3493);this.addSKU([58,"326",394,487,367,368],3492);this.addSKU([58,"326",394,486,367,368],3491);this.addSKU([58,"326",394,485,367,368],3490);this.addSKU([58,"326",394,484,367,368],3489);this.addSKU([58,"326",394,483,367,368],3488);this.addSKU([58,"326",394,482,367,368],3487);this.addSKU([58,"326",394,481,367,368],3486);this.addSKU([58,"326",394,480,367,368],3485);this.addSKU([58,"326",394,479,367,368],3484);this.addSKU([58,"326",394,478,367,368],3483);this.addSKU([58,"252",394,476,367,368],3466);this.addSKU([58,"326",397,492,367,368],3593);this.addSKU([58,"252",397,491,367,368],3576);this.addSKU([58,"252",397,490,367,368],3575);this.addSKU([58,"252",397,489,367,368],3574);this.addSKU([58,"252",397,488,367,368],3573);this.addSKU([58,"252",397,487,367,368],3572);this.addSKU([58,"252",397,486,367,368],3571);this.addSKU([58,"252",397,485,367,368],3570);this.addSKU([58,"252",397,484,367,368],3569);this.addSKU([58,"252",397,483,367,368],3568);this.addSKU([58,"252",397,482,367,368],3567);this.addSKU([58,"252",397,481,367,368],3566);this.addSKU([58,"252",397,480,367,368],3565);this.addSKU([58,"252",397,479,367,368],3564);this.addSKU([58,"252",397,478,367,368],3563);this.addSKU([58,"252",397,492,367,368],3577);this.addSKU([58,"326",397,476,367,368],3578);this.addSKU([58,"326",397,491,367,368],3592);this.addSKU([58,"326",397,490,367,368],3591);this.addSKU([58,"326",397,489,367,368],3590);this.addSKU([58,"326",397,488,367,368],3589);this.addSKU([58,"326",397,487,367,368],3588);this.addSKU([58,"326",397,486,367,368],3587);this.addSKU([58,"326",397,485,367,368],3586);this.addSKU([58,"326",397,484,367,368],3585);this.addSKU([58,"326",397,483,367,368],3584);this.addSKU([58,"326",397,482,367,368],3583);this.addSKU([58,"326",397,481,367,368],3582);this.addSKU([58,"326",397,480,367,368],3581);this.addSKU([58,"326",397,479,367,368],3580);this.addSKU([58,"326",397,478,367,368],3579);this.addSKU([58,"252",397,476,367,368],3562);this.addSKU([58,"326",396,492,367,368],3561);this.addSKU([58,"252",396,491,367,368],3544);this.addSKU([58,"252",396,490,367,368],3543);this.addSKU([58,"252",396,489,367,368],3542);this.addSKU([58,"252",396,488,367,368],3541);this.addSKU([58,"252",396,487,367,368],3540);this.addSKU([58,"252",396,486,367,368],3539);this.addSKU([58,"252",396,485,367,368],3538);this.addSKU([58,"252",396,484,367,368],3537);this.addSKU([58,"252",396,483,367,368],3536);this.addSKU([58,"252",396,482,367,368],3535);this.addSKU([58,"252",396,481,367,368],3534);this.addSKU([58,"252",396,480,367,368],3533);this.addSKU([58,"252",396,479,367,368],3532);this.addSKU([58,"252",396,478,367,368],3531);this.addSKU([58,"252",396,492,367,368],3545);this.addSKU([58,"326",396,476,367,368],3546);this.addSKU([58,"326",396,491,367,368],3560);this.addSKU([58,"326",396,490,367,368],3559);this.addSKU([58,"326",396,489,367,368],3558);this.addSKU([58,"326",396,488,367,368],3557);this.addSKU([58,"326",396,487,367,368],3556);this.addSKU([58,"326",396,486,367,368],3555);this.addSKU([58,"326",396,485,367,368],3554);this.addSKU([58,"326",396,484,367,368],3553);this.addSKU([58,"326",396,483,367,368],3552);this.addSKU([58,"326",396,482,367,368],3551);this.addSKU([58,"326",396,481,367,368],3550);this.addSKU([58,"326",396,480,367,368],3549);this.addSKU([58,"326",396,479,367,368],3548);this.addSKU([58,"326",396,478,367,368],3547);this.addSKU([58,"252",396,476,367,368],3530);},setWeights:function(){this.weights=[];this.weights[3657]=11.2;this.weights[3640]=11.2;this.weights[3639]=11.2;this.weights[3638]=11.2;this.weights[3637]=11.2;this.weights[3636]=11.2;this.weights[3635]=11.2;this.weights[3634]=11.2;this.weights[3633]=11.2;this.weights[3632]=11.2;this.weights[3631]=11.2;this.weights[3630]=11.2;this.weights[3629]=11.2;this.weights[3628]=11.2;this.weights[3627]=11.2;this.weights[3641]=11.2;this.weights[3642]=11.2;this.weights[3656]=11.2;this.weights[3655]=11.2;this.weights[3654]=11.2;this.weights[3653]=11.2;this.weights[3652]=11.2;this.weights[3651]=11.2;this.weights[3650]=11.2;this.weights[3649]=11.2;this.weights[3648]=11.2;this.weights[3647]=11.2;this.weights[3646]=11.2;this.weights[3645]=11.2;this.weights[3644]=11.2;this.weights[3643]=11.2;this.weights[3626]=11.2;this.weights[3625]=11.2;this.weights[3608]=11.2;this.weights[3607]=11.2;this.weights[3606]=11.2;this.weights[3605]=11.2;this.weights[3604]=11.2;this.weights[3603]=11.2;this.weights[3602]=11.2;this.weights[3601]=11.2;this.weights[3600]=11.2;this.weights[3599]=11.2;this.weights[3598]=11.2;this.weights[3597]=11.2;this.weights[3596]=11.2;this.weights[3595]=11.2;this.weights[3609]=11.2;this.weights[3610]=11.2;this.weights[3624]=11.2;this.weights[3623]=11.2;this.weights[3622]=11.2;this.weights[3621]=11.2;this.weights[3620]=11.2;this.weights[3619]=11.2;this.weights[3618]=11.2;this.weights[3617]=11.2;this.weights[3616]=11.2;this.weights[3615]=11.2;this.weights[3614]=11.2;this.weights[3613]=11.2;this.weights[3612]=11.2;this.weights[3611]=11.2;this.weights[3594]=11.2;this.weights[3721]=11.2;this.weights[3704]=11.2;this.weights[3703]=11.2;this.weights[3702]=11.2;this.weights[3701]=11.2;this.weights[3700]=11.2;this.weights[3699]=11.2;this.weights[3698]=11.2;this.weights[3697]=11.2;this.weights[3696]=11.2;this.weights[3695]=11.2;this.weights[3694]=11.2;this.weights[3693]=11.2;this.weights[3692]=11.2;this.weights[3691]=11.2;this.weights[3705]=11.2;this.weights[3706]=11.2;this.weights[3720]=11.2;this.weights[3719]=11.2;this.weights[3718]=11.2;this.weights[3717]=11.2;this.weights[3716]=11.2;this.weights[3715]=11.2;this.weights[3714]=11.2;this.weights[3713]=11.2;this.weights[3712]=11.2;this.weights[3711]=11.2;this.weights[3710]=11.2;this.weights[3709]=11.2;this.weights[3708]=11.2;this.weights[3707]=11.2;this.weights[3690]=11.2;this.weights[3689]=11.2;this.weights[3672]=11.2;this.weights[3671]=11.2;this.weights[3670]=11.2;this.weights[3669]=0;this.weights[3668]=0;this.weights[3667]=0;this.weights[3666]=0;this.weights[3665]=0;this.weights[3664]=0;this.weights[3663]=0;this.weights[3662]=0;this.weights[3661]=0;this.weights[3660]=0;this.weights[3659]=0;this.weights[3673]=0;this.weights[3674]=0;this.weights[3688]=0;this.weights[3687]=0;this.weights[3686]=0;this.weights[3685]=0;this.weights[3684]=0;this.weights[3683]=0;this.weights[3682]=0;this.weights[3681]=0;this.weights[3680]=0;this.weights[3679]=0;this.weights[3678]=0;this.weights[3677]=0;this.weights[3676]=0;this.weights[3675]=0;this.weights[3658]=0;this.weights[3529]=0;this.weights[3512]=0;this.weights[3511]=0;this.weights[3510]=0;this.weights[3509]=0;this.weights[3508]=0;this.weights[3507]=0;this.weights[3506]=0;this.weights[3505]=0;this.weights[3504]=0;this.weights[3503]=0;this.weights[3502]=0;this.weights[3501]=0;this.weights[3500]=0;this.weights[3499]=0;this.weights[3513]=0;this.weights[3514]=0;this.weights[3528]=0;this.weights[3527]=0;this.weights[3526]=0;this.weights[3525]=0;this.weights[3524]=0;this.weights[3523]=0;this.weights[3522]=0;this.weights[3521]=0;this.weights[3520]=0;this.weights[3519]=0;this.weights[3518]=0;this.weights[3517]=0;this.weights[3516]=0;this.weights[3515]=0;this.weights[3498]=0;this.weights[3497]=0;this.weights[3480]=0;this.weights[3479]=0;this.weights[3478]=0;this.weights[3477]=0;this.weights[3476]=0;this.weights[3475]=0;this.weights[3474]=0;this.weights[3473]=0;this.weights[3472]=0;this.weights[3471]=0;this.weights[3470]=0;this.weights[3469]=0;this.weights[3468]=0;this.weights[3467]=0;this.weights[3481]=0;this.weights[3482]=0;this.weights[3496]=0;this.weights[3495]=0;this.weights[3494]=0;this.weights[3493]=0;this.weights[3492]=0;this.weights[3491]=0;this.weights[3490]=0;this.weights[3489]=0;this.weights[3488]=0;this.weights[3487]=0;this.weights[3486]=0;this.weights[3485]=0;this.weights[3484]=0;this.weights[3483]=0;this.weights[3466]=0;this.weights[3593]=0;this.weights[3576]=0;this.weights[3575]=0;this.weights[3574]=0;this.weights[3573]=0;this.weights[3572]=0;this.weights[3571]=0;this.weights[3570]=0;this.weights[3569]=0;this.weights[3568]=0;this.weights[3567]=0;this.weights[3566]=0;this.weights[3565]=0;this.weights[3564]=0;this.weights[3563]=0;this.weights[3577]=0;this.weights[3578]=0;this.weights[3592]=0;this.weights[3591]=0;this.weights[3590]=0;this.weights[3589]=0;this.weights[3588]=0;this.weights[3587]=0;this.weights[3586]=0;this.weights[3585]=0;this.weights[3584]=0;this.weights[3583]=0;this.weights[3582]=0;this.weights[3581]=0;this.weights[3580]=0;this.weights[3579]=0;this.weights[3562]=0;this.weights[3561]=0;this.weights[3544]=0;this.weights[3543]=0;this.weights[3542]=0;this.weights[3541]=0;this.weights[3540]=0;this.weights[3539]=0;this.weights[3538]=0;this.weights[3537]=0;this.weights[3536]=0;this.weights[3535]=0;this.weights[3534]=0;this.weights[3533]=0;this.weights[3532]=0;this.weights[3531]=0;this.weights[3545]=0;this.weights[3546]=0;this.weights[3560]=0;this.weights[3559]=0;this.weights[3558]=0;this.weights[3557]=0;this.weights[3556]=0;this.weights[3555]=0;this.weights[3554]=0;this.weights[3553]=0;this.weights[3552]=0;this.weights[3551]=0;this.weights[3550]=0;this.weights[3549]=0;this.weights[3548]=0;this.weights[3547]=0;this.weights[3530]=0;},setPrices:function(){this.prices=new Hash();var b=[];var a;b.push({i:3602,ii:8355,q:250,p:93});b.push({i:3602,ii:8356,q:500,p:98});b.push({i:3602,ii:8357,q:1000,p:138});b.push({i:3602,ii:8358,q:1500,p:192});for(a=0;a<b.length;a++){if(this.prices.get(b[a]["i"])==null){this.prices.set(b[a]["i"],new Hash());}this.prices.get(b[a]["i"]).set(b[a]["q"],new Hash());this.prices.get(b[a]["i"]).get(b[a]["q"]).set("i",b[a]["ii"]);this.prices.get(b[a]["i"]).get(b[a]["q"]).set("p",b[a]["p"]);}},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.setAdditionalOpts();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.dieShapeText="Die Shape";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.localText.custom_print_typeText="Print Type";this.localText.custom_green_paperText="Eco Friendly Paper";if(window.CustomCalcText){for(var a in CustomCalcText){this.localText[a]=CustomCalcText[a];}}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",DL:"Delivery",RO:"Recycle Overages"});},createForm:function(b){var a=0;if($("eondesigner_id")){a=$("eondesigner_id").value;}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+=b;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="" />';this.formContents+='<input type="hidden" id="design_id" name="design_id" value="'+a+'" />';$("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&&(this.additionalOpts==undefined||this.additionalOpts.get("custom_green_paper")==undefined)&&d=="paper")||d=="custom_green_paper"){c=calcFI_TPL("","","","greenBadgeTD");}return c+calcFI_TPL(h,a,d,e);},createSizeInput:function(l,a,b){var m=(a=="width")?this.widthText:this.heightText;var j=0;var c=0;if(a=="width"&&m<1){if(this.opts.min_width){var n=Number(this.opts.min_width);if(n>Math.floor(n)){j=n-Math.floor(n);n-=j;}m=n;var n=Number(this.opts.min_width);var g=Number(this.opts.min_height);this.area=n*g;}else{m=1;}}if(a!="width"&&m<1){if(this.opts.min_height){var g=Number(this.opts.min_height);if(g>Math.floor(g)){j=g-Math.floor(g);g-=j;}m=g;var n=Number(this.opts.min_width);var g=Number(this.opts.min_height);this.area=n*g;}else{m=1;}}if($(a+"Fract")){c=$(a+"Fract").selectedIndex;}var k='<input type="text" id="'+a+'" name="'+a+'" value="'+m+'" onchange="'+b+'" class="sizeInput" />&nbsp;&nbsp;';k+='<select id="'+a+'Fract" name="'+a+'Fract" onchange="'+b+'" class="sizeInput">';for(var e=0;e<options.length;e++){var f=options[e];if(c==0&&j>0){if(Number(f.value)==j){c=e;}}var d=(c==e)?" selected":"";k+='<option value="'+f.value+'"'+d+">"+f.label+"</option>";}k+="</select>";return calcFI_TPL(l,k,a);},createDieShapeInput:function(f,b,c){var a=[];var h=false;for(var j in this.opts.die_shapes){if(h==false){h=j;}a.push(j);}if($(b)){h=$(b).getValue();}var g='<select id="'+b+'" name="'+b+'" onchange="'+c+'">';for(var e=0;e<a.length;e++){var d=(a[e]==h)?" selected":"";g+='<option value="'+a[e]+'"'+d+">"+a[e]+"</option>";}g+="</select>";return calcFI_TPL(f,g,b,"");},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,"custom_trim_size");},createOptions:function(g,j){var m,h,k;var o=[];var p="";var c="";var f="";var l=false;if(this.currentName=="size"&&this.product_name=="Roll Labels"){var e=false;for(var n in this.opts.die_shapes){if(e==false){e=n;}}if($("die_shape")){e=$("die_shape").getValue();}var d=this.opts.die_shapes[e];l=new Hash();for(h=0;h<d.length;h++){l.set(d[h],true);}}o=g.keys();k=o.length;for(h=0;h<k;h++){m=o[h];if(l!=false&&l.hasKey(m)==false){m=false;}if(!isNaN(m)&&m!=false){f=($(this.currentName)&&m==$(this.currentName).getValue())?" selected":"";if(this.currentName=="size"&&h==0){this.sizeID=m;}if(!j){}var b=(j)?this.additionalOpts.get(this.currentName).get(m).get("name"):this.opts[this.currentName][m];if(this.currentName=="coating"&&b!=undefined&&b.indexOf("UV 2")!=-1&&window.EC_Mailing&&this.mailingCanUseUV==false){}else{p+='<option value="'+m+'"'+f+">"+b+"</option>";}}}if(this.currentName=="custom_green_paper"){this.currentName="paper";}return p;},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(f){var b="";var c="";var d=false;var a=false;if($("paper")){var e=$("paper").options[$("paper").selectedIndex].text;if(e.indexOf("Cover")!=-1){d=true;}if(e.indexOf("Index")!=-1){a=true;}}f.each(function(h,g){($("folding")&&g==$("folding").getValue())?c=" selected":c="";if(d){if(h.get("name").indexOf("Cover")!=-1||h.get("name").indexOf("None")!=-1){b+='<option value="'+g+'"'+c+">"+h.get("name")+"</option>";}}else{if(a){if(h.get("name").indexOf("Index")!=-1||h.get("name").indexOf("None")!=-1){b+='<option value="'+g+'"'+c+">"+h.get("name")+"</option>";}}else{if(h.get("name").indexOf("Cover")==-1&&h.get("name").indexOf("Index")==-1){b+='<option value="'+g+'"'+c+">"+h.get("name")+"</option>";}}}});return b;},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{if(this.currentName=="green_paper"){}else{if(this.currentName=="size"&&this.product_name=="Roll Labels"){this.formContents+=this.createDieShapeInput(this.localText.dieShapeText,"die_shape","EC_LithoCalc.updateForm()");}g=(this.currentName=="size"&&this.product_name!="Roll Labels")?"EC_LithoCalc.resetTrimSize();":"";this.formContents+=this.createSelect(this.currentTitle,this.currentName,g+"EC_LithoCalc.updateForm()",this.currentSku);if(this.currentName=="size"&&this.product_name!="Roll Labels"){this.formContents+=this.createTrimSizeInput(this.localText.trimSizeText,"trim_size","EC_LithoCalc.updateTrimSize()");}if(this.currentName=="paper"&&this.additionalOpts!=undefined&&this.additionalOpts.get("custom_green_paper")!=undefined){this.additionalOpts.each(function(i,a){if(a=="custom_green_paper"){EC_LithoCalc.currentName=a;EC_LithoCalc.formContents+=EC_LithoCalc.createSelect(EC_LithoCalc.localText[a+"Text"],a,"EC_LithoCalc.updatePrice()",i,true);}});}}}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")){var b;this.widthText=Math.floor(Number($("width").getValue())).toString();this.heightText=Math.floor(Number($("height").getValue())).toString();if(this.widthText=="NaN"||this.widthText<1){if(this.opts.min_width){var a=Number(this.opts.min_width);if(a>Math.floor(a)){b=a-Math.floor(a);a-=b;}this.widthText=a;b=0;}else{this.widthText=1;}}if(this.heightText=="NaN"||this.heightText<1){if(this.opts.min_height){var c=Number(this.opts.min_height);if(c>Math.floor(c)){b=c-Math.floor(c);c-=b;}this.heightText=c;b=0;}else{this.heightText=1;}}var a=Math.floor(Number(this.widthText))+Number($("widthFract").getValue());var c=Math.floor(Number(this.heightText))+Number($("heightFract").getValue());if(isNaN(a)){a=$("width").value=0;$("widthFract").selectedIndex=0;}if(isNaN(c)){c=$("height").value=0;$("heightFract").selectedIndex=0;}b=0;if(a<Number(this.opts.min_width)&&a>0){alert("The minimum width is "+this.opts.min_width);this.resetToMinMx("width",this.opts.min_width);return;}if(c<Number(this.opts.min_height)&&c>0){alert("The minimum height is "+this.opts.min_height);this.resetToMinMx("height",this.opts.min_height);return;}if(a>Number(this.opts.max_width)){alert("The maximum width is "+this.opts.max_width);this.resetToMinMx("width",this.opts.max_width);return;}if(c>Number(this.opts.max_height)){alert("The maximum height is "+this.opts.max_height);this.resetToMinMx("height",this.opts.max_height);return;}this.area=a*c;}},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;if(isNaN(a)||isNaN(c)||a==0||c==0){$("trim_size").value=d;}else{$("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){if(f!="custom_green_paper"){if(f=="custom_finishing"&&window.EC_Mailing){}else{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<EC_LithoCalc.names.length;c++){this.currentName=EC_LithoCalc.names[c];if($(this.currentName)&&this.currentName!="width"&&this.currentName!="height"){var f=this.currentSku;this.currentSku=this.currentSku.get($(this.currentName).value);if(this.currentSku==undefined){EC_LithoCalc.updatePrice.delay(200);return;}}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(a<this.minimum_price){a=this.minimum_price;}var e=new Hash({hole_punch:1000,numbering:1000,perforation:1000,print_type:1000,pms_ink:1000,lamination:1000,finishing:1000});if(this.additional){this.additionalOpts.each(function(k,h){if($(h)){var l=1000;var i=h.replace(/custom_/,"");if(e.hasKey(i)){l=Number(e.get(i));}var j=Number(EC_LithoCalc.additionalOpts.get(h).get($(h).value).get("price"));var g=Number(EC_LithoCalc.additionalOpts.get(h).get($(h).value).get("setup"));a+=(j*($("quantity").value/l))+g;}});}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_LithoCalc.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;if(window.confirmText&&confirmText!=""){if(!$("disallow_popups")||($("disallow_popups")&&$("disallow_popups").getValue()!="1")){var d=confirm(confirmText);if(d){b.submit();}}}else{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.round(((Number($("quantity").getValue())/1000)*this.weights[this.currentSku])*10)/10;var a="/ws/shipping/getRates/zip/"+c+"/country/"+e+"/weight/"+this.selWeight+"/handling_fee/"+this.handling_fee+"/product_id/"+this.product_id;if(this.free_ground_shipping){a+="/fgs/1";}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&&g!=undefined){if((f!="DL"||(f=="DL"&&a==true))&&f!="FR"){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>";}else{if(f=="FR"){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;}},selectByValue:function(b,c){if(typeof(b)==="string"){b=$(b);}if(b&&b.options){for(var a=0;a<b.options.length;a++){if(b.options[a].value==c){b.options[a].selected=true;b.options.selectedIndex=a;}}}},resetToMinMx:function(e,d){var b=0;d=Number(d);if(d>Math.floor(d)){b=d-Math.floor(d);d-=b;}this[e+"Text"]=d;$(e).value=d;if(b==0){b=".0";}this.selectByValue(e+"Fract",b);var a=Math.floor(Number(this.widthText))+Number($("widthFract").getValue());var c=Math.floor(Number(this.heightText))+Number($("heightFract").getValue());this.area=a*c;this.updatePrice();},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();});