var co = new Object;
function recalc_onclick(ctl) {
  if (true) {


co.pA15C=document.formc.pA15C.value;co.pA17C=document.formc.pA17C.value;co.pA19C=document.formc.pA19C.value;co.pA29H=eeparseFloat(document.formc.pA29H.value);co.pA29M=eeparseFloat(document.formc.pA29M.value);co.pA30H=eeparseFloat(document.formc.pA30H.value);co.pA30M=eeparseFloat(document.formc.pA30M.value);co.pA31H=eeparseFloat(document.formc.pA31H.value);co.pA43D=document.formc.pA43D.value;co.pA43L=document.formc.pA43L.value;co.pA44D=document.formc.pA44D.value;co.pA44L=document.formc.pA44L.value;co.pA45D=document.formc.pA45D.value;co.pA45L=document.formc.pA45L.value;co.pA46D=document.formc.pA46D.value;co.pA46L=document.formc.pA46L.value;co.pA47D=document.formc.pA47D.value;co.pA47L=document.formc.pA47L.value;co.pA48D=document.formc.pA48D.value;co.pA48L=document.formc.pA48L.value;co.pA59D=document.formc.pA59D.value;co.pA59L=eeparseFloat(document.formc.pA59L.value);co.pA61D=document.formc.pA61D.value;co.pA61L=eeparseFloat(document.formc.pA61L.value);co.pA63D=document.formc.pA63D.value;co.pA63L=eeparseFloatV(document.formc.pA63L.value);co.pA65D=document.formc.pA65D.value;co.pA70D=document.formc.pA70D.value;co.pA70L=eeparseFloat(document.formc.pA70L.value);co.pA72D=document.formc.pA72D.value;co.pA72L=eeparseFloat(document.formc.pA72L.value);co.pA74D=document.formc.pA74D.value;co.pA74L=eeparseFloat(document.formc.pA74L.value);co.pA89D=document.formc.pA89D.value;co.pA89L=document.formc.pA89L.value;co.pA90D=document.formc.pA90D.value;co.pA90L=document.formc.pA90L.value;co.pA91D=document.formc.pA91D.value;
co.pA91L=document.formc.pA91L.value;co.pA96D=document.formc.pA96D.value;co.pA97D=document.formc.pA97D.value;co.pA98D=document.formc.pA98D.value;co.pA99D=document.formc.pA99D.value;co.pA100D=document.formc.pA100D.value;co.pA121D=document.formc.pA121D.value;co.pA123D=document.formc.pA123D.value;co.pA125D=document.formc.pA125D.value;co.pA127D=document.formc.pA127D.value;co.pA144F=eeparseFloat(document.formc.pA144F.value);calc(co);document.formc.pA147J.value=eedisplayFloatND(co.pA147J,0);document.formc.pA147N.value=eedisplayFloatND(co.pA147N,0);document.formc.pB12D.value=co.pB12D;document.formc.pB14D.value=co.pB14D;document.formc.pB16D.value=co.pB16D;document.formc.pB21D.value=eedisplayFloat(co.pB21D);document.formc.pB21H.value=eedisplayFloat(co.pB21H);document.formc.pB22D.value=eedisplayFloat(co.pB22D);document.formc.pB22H.value=eedisplayFloat(co.pB22H);document.formc.pB23D.value=eedisplayFloat(co.pB23D);document.formc.pB25D.value=co.pB25D;document.formc.pB26D.value=eedisplayFloat(co.pB26D);document.formc.pB26I.value=eedisplayFloatND(co.pB26I,0);document.formc.pB28D.value=co.pB28D;document.formc.pB29D.value=eedisplayFloat(co.pB29D);document.formc.pB29I.value=eedisplayFloatND(co.pB29I,0);document.formc.pB31D.value=co.pB31D;document.formc.pB31I.value=eedisplayFloatND(co.pB31I,0);document.formc.pB33D.value=co.pB33D;document.formc.pB33I.value=eedisplayFloatND(co.pB33I,0);document.formc.pB37F.value=co.pB37F;document.formc.pB37G.value=co.pB37G;document.formc.pB38F.value=co.pB38F;document.formc.pB38G.value=co.pB38G;
document.formc.pB39F.value=co.pB39F;document.formc.pB39G.value=co.pB39G;document.formc.pB42I.value=eedisplayFloatND(co.pB42I,0);document.formc.pB44E.value=co.pB44E;document.formc.pB44I.value=eedisplayFloatND(co.pB44I,0);document.formc.pB46I.value=co.pB46I;document.formc.pB47I.value=co.pB47I;document.formc.pB48E.value=eedisplayFloat(co.pB48E);document.formc.pB51F.value=eedisplayFloatND(co.pB51F,0);document.formc.pB52F.value=eedisplayFloatND(co.pB52F,0);
};};


var eeisus=1;var eetrue="TRUE";var eefalse="FALSE";var eedec=".";var eeth=",";var eedecreg=new RegExp("\\.","g");var eethreg=new RegExp(",","g");var eecurrencyreg=new RegExp("[$]","g");var eepercentreg=new RegExp("%","g"); var fmtdaynamesshort=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); var fmtdaynameslong=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); var fmtmonthnamesshort=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); var fmtmonthnameslong=new Array("January","February","March","April","May","June","July","August","September","October","November","December"); var fmtstrings=new Array(","," ","-"); var fmtdate6=new Array(6,34,4);

var arr1xAB12AB31=new Array(20);for(var ii=0;ii<20;ii++){arr1xAB12AB31[ii]=new Array(1);for(var jj=0;jj<1;jj++){arr1xAB12AB31[ii][jj]=0}};var arr1xL59L59=new Array(1);for(var ii=0;ii<1;ii++){arr1xL59L59[ii]=new Array(1);for(var jj=0;jj<1;jj++){arr1xL59L59[ii][jj]=0}};var arr1xL61L61=new Array(1);for(var ii=0;ii<1;ii++){arr1xL61L61[ii]=new Array(1);for(var jj=0;jj<1;jj++){arr1xL61L61[ii][jj]=0}};var arr1xL63L63=new Array(1);for(var ii=0;ii<1;ii++){arr1xL63L63[ii]=new Array(1);for(var jj=0;jj<1;jj++){arr1xL63L63[ii][jj]=0}};var arr1xL70L70=new Array(1);for(var ii=0;ii<1;ii++){arr1xL70L70[ii]=new Array(1);for(var jj=0;jj<1;jj++){arr1xL70L70[ii][jj]=0}};var arr1xL72L72=new Array(1);for(var ii=0;ii<1;ii++){arr1xL72L72[ii]=new Array(1);for(var jj=0;jj<1;jj++){arr1xL72L72[ii][jj]=0}};var arr1xL74L74=new Array(1);for(var ii=0;ii<1;ii++){arr1xL74L74[ii]=new Array(1);for(var jj=0;jj<1;jj++){arr1xL74L74[ii][jj]=0}};var arr2xI26I45=new Array(20);for(var ii=0;ii<20;ii++){arr2xI26I45[ii]=new Array(1);for(var jj=0;jj<1;jj++){arr2xI26I45[ii][jj]=0}};var eecm2=new Array(new Array(arr1xAB12AB31,13,0,13,0),new Array(arr1xAB12AB31,15,0,15,0),new Array(arr1xAB12AB31,16,0,16,0));var eecm3=new Array(new Array(arr1xL59L59,0,0,0,0),new Array(arr1xL61L61,0,0,0,0));var eecm4=new Array(new Array(arr1xL70L70,0,0,0,0),new Array(arr1xL72L72,0,0,0,0),new Array(arr1xL74L74,0,0,0,0));
var eecm1=new Array(new Array(arr2xI26I45,18,0,18,0),new Array(arr2xI26I45,16,0,16,0),new Array(arr2xI26I45,7,0,7,0),new Array(arr2xI26I45,5,0,5,0),new Array(arr2xI26I45,3,0,3,0),new Array(arr2xI26I45,0,0,0,0));function calc(data){var cA15C=data.pA15C;var cA17C=data.pA17C;var cA19C=data.pA19C;var cA29H=data.pA29H;var cA29M=data.pA29M;var cA30H=data.pA30H;var cA30M=data.pA30M;var cA31H=data.pA31H;var cA43D=data.pA43D;var cA43L=data.pA43L;var cA44D=data.pA44D;var cA44L=data.pA44L;var cA45D=data.pA45D;var cA45L=data.pA45L;var cA46D=data.pA46D;var cA46L=data.pA46L;var cA47D=data.pA47D;var cA47L=data.pA47L;var cA48D=data.pA48D;var cA48L=data.pA48L;var cA59D=data.pA59D;arr1xL59L59[0][0]=data.pA59L;var cA61D=data.pA61D;arr1xL61L61[0][0]=data.pA61L;var cA63D=data.pA63D;arr1xL63L63[0][0]=v2n(data.pA63L);var cA65D=data.pA65D;var cA70D=data.pA70D;arr1xL70L70[0][0]=data.pA70L;var cA72D=data.pA72D;arr1xL72L72[0][0]=data.pA72L;var cA74D=data.pA74D;arr1xL74L74[0][0]=data.pA74L;var cA89D=data.pA89D;var cA89L=data.pA89L;var cA90D=data.pA90D;var cA90L=data.pA90L;var cA91D=data.pA91D;var cA91L=data.pA91L;var cA96D=data.pA96D;var cA97D=data.pA97D;var cA98D=data.pA98D;var cA99D=data.pA99D;var cA100D=data.pA100D;var cA121D=data.pA121D;var cA123D=data.pA123D;var cA125D=data.pA125D;var cA127D=data.pA127D;var cA144F=data.pA144F;var cA43B=("NO INSULATION");
 var cA43J=("NO INSULATION");var cA44B=("R6");var cA44J=("R12");var cA45B=("R8");var cA45J=("R20");var cA46B=("R10");var cA46J=("R26");var cA47B=("R12");var cA47J=("R32");var cA48B=("R20");var cA48J=("R40");var cA49J=(" ");var cA49L=(" ");var cA59B=("WOOD");var cA61B=("WOOD C/W STORM");var cA65B=("SLIDING GLASS");var cA70B=("SINGLE PANE");var cA72B=("DOUBLE PANE");var cA74B=("TRIPLE PANE");var cA76B=(" ");var cA76D=(" ");var cA89B=("NO INSUL.");var cA89J=("NO INSUL.");var cA90B=("R11");var cA90J=("R11");var cA91B=("R28");var cA91J=("R28");var cA96B=("NO INSUL.");var cA97B=("R12");var cA98B=("R20");var cA99B=("R32");var cA100B=("R40");var cA121B=("POOR");var cA123B=("AVERAGE");var cA125B=("GOOD");var cA127B=("TIGHT");arr2xI26I45[1][0]=(0);arr2xI26I45[2][0]=(0);arr2xI26I45[4][0]=(0);arr2xI26I45[6][0]=(0);arr2xI26I45[8][0]=(0);arr2xI26I45[9][0]=(0);arr2xI26I45[10][0]=(0);arr2xI26I45[11][0]=(0);arr2xI26I45[12][0]=(0);arr2xI26I45[13][0]=(0);arr2xI26I45[14][0]=(0);arr2xI26I45[15][0]=(0);var cB43I=(" ");arr2xI26I45[17][0]=v2n(cB43I);arr2xI26I45[19][0]=(0);var cA12V=(((((((cA29H)*(cA29M)))+(((cA30H)*(cA30M)))))*(cA31H)));
 var cA12Y=(v2n(((str_eq((cA43D),("y")))?(6.64):(((str_eq((cA44D),("y")))?(2.46):(((str_eq((cA45D),("y")))?(2.15):(((str_eq((cA46D),("y")))?(1.94):(((str_eq((cA47D),("y")))?(1.87):(((str_eq((cA48D),("y")))?(1.09):("ERROR"))))))))))))));var cA14V=(((cA29H)*(cA30H)));var cA14Y=(((str_eq((cA43L),("y")))?(16.1):(((str_eq((cA44L),("y")))?(1.74):(((str_eq((cA45L),("y")))?(1.19):(((str_eq((cA46L),("y")))?(0.88):(((str_eq((cA47L),("y")))?(0.7):(((str_eq((cA48L),("y")))?(0.55):(0)))))))))))));var cA16V=(sumgeneral(3,0,0,eecm4));var cA16Y=(((str_eq((cA70D),("y")))?(18.7):(((str_eq((cA72D),("y")))?(12.41):(((str_eq((cA74D),("y")))?(7.46):(0)))))));var sumcnt2_sum=0;var sumcnt2_cnt=0;if(eeisstring(data.pA63L)){;}else if(typeof(data.pA63L)=="boolean"){;}else if(isFinite(data.pA63L)){sumcnt2_sum=sumcnt2_sum+data.pA63L;sumcnt2_cnt++;}else if(isNaN(data.pA63L)){sumcnt2_sum=Number.NaN;};var cA18V=(sumgeneral(2,sumcnt2_sum,sumcnt2_cnt,eecm3));var cA18Y=(((str_eq((cA59D),("Y")))?(7.46):(((str_eq((cA61D),("Y")))?(5.32):(((str_eq((cA63D),("Y")))?(2.32):(((str_eq((cA65D),("Y")))?(12.41):(0)))))))));var cA25Y=(((str_eq((cA89D),("y")))?(2.25):(((str_eq((cA90D),("y")))?(0.55):(((str_eq((cA91D),("y")))?(0.29):(0)))))));var cA27Y=(((str_eq((cA89L),("y")))?(5.9):(((str_eq((cA90L),("y")))?(2.1):(((str_eq((cA91L),("y")))?(1.8):(0)))))));var cA28Y=(((str_eq((cA96D),("y")))?(7.01):(((str_eq((cA97D),("y")))?(1.55):(((str_eq((cA98D),("y")))?(1.03):(((str_eq((cA99D),("y")))?(0.75):(((str_eq((cA100D),("y")))?(0.61):(0)))))))))));
 var cA31Y=(v2n(((str_eq((cA121D),("y")))?(3.74):(((str_eq((cA123D),("y")))?(1.87):(((str_eq((cA125D),("y")))?(1.51):(((str_eq((cA127D),("y")))?(1.15):("ERROR"))))))))));var cA32Y=(((((cA31Y)/(8)))*(cA31H)));var cB12D=(cA15C);var cB14D=(cA17C);var cB16D=(cA19C);var cB21D=(cA29H);var cB21H=(cA29M);var cB22D=(cA30H);var cB22H=(cA30M);var cB23D=(cA31H);var cB25D=(((str_eq((cA70D),("Y")))?(cA70B):(((str_eq((cA72D),("Y")))?(cA72B):(((str_eq((cA74D),("Y")))?(cA74B):(((str_eq((cA76D),("Y")))?(cA76B):("NO WINDOWS")))))))));var cB28D=(((str_eq((cA59D),("y")))?(cA59B):(((str_eq((cA61D),("y")))?(cA61B):(((str_eq((cA63D),("y")))?(cA63D):(((str_eq((cA65D),("y")))?(cA65B):("NO DOORS")))))))));var cB31D=(((str_eq((cA43D),("y")))?(cA43B):(((str_eq((cA44D),("Y")))?(cA44B):(((str_eq((cA45D),("Y")))?(cA45B):(((str_eq((cA46D),("Y")))?(cA46B):(((str_eq((cA47D),("Y")))?(cA47B):(((str_eq((cA48D),("Y")))?(cA48B):("ERR")))))))))))));var cB33D=(((str_eq((cA43L),("Y")))?(cA43J):(((str_eq((cA44L),("Y")))?(cA44J):(((str_eq((cA45L),("Y")))?(cA45J):(((str_eq((cA46L),("Y")))?(cA46J):(((str_eq((cA47L),("Y")))?(cA47J):(((str_eq((cA48L),("Y")))?(cA48J):(((str_eq((cA49L),("Y")))?(cA49J):("NO CEILING LOSS")))))))))))))));var cB37F=(((str_eq((cA89D),("Y")))?("YES"):(((str_eq((cA90D),("Y")))?("YES"):(((str_eq((cA91D),("Y")))?("YES"):("NO")))))));var cB37G=(((str_eq((cA89D),("Y")))?(cA89B):(((str_eq((cA90D),("Y")))?(cA90B):(((str_eq((cA91D),("Y")))?(cA91B):("N/A")))))));
 var cB38F=(((str_eq((cA89L),("Y")))?("YES"):(((str_eq((cA90L),("Y")))?("YES"):(((str_eq((cA91L),("Y")))?("YES"):("NO")))))));var cB38G=(((str_eq((cA89L),("Y")))?(cA89J):(((str_eq((cA90L),("Y")))?(cA90J):(((str_eq((cA91L),("Y")))?(cA91J):("N/A")))))));var cB39F=(((str_eq((cA96D),("Y")))?("YES"):(((str_eq((cA97D),("Y")))?("YES"):(((str_eq((cA98D),("Y")))?("YES"):(((str_eq((cA99D),("Y")))?("YES"):(((str_eq((cA100D),("Y")))?("YES"):("NO")))))))))));var cB39G=(((str_eq((cA96D),("Y")))?(cA96B):(((str_eq((cA97D),("Y")))?(cA97B):(((str_eq((cA98D),("Y")))?(cA98B):(((str_eq((cA99D),("Y")))?(cA99B):(((str_eq((cA100D),("Y")))?(cA100B):("N/A")))))))))));var cB44E=(((str_eq((cA121D),("Y")))?(cA121B):(((str_eq((cA123D),("Y")))?(cA123B):(((str_eq((cA125D),("Y")))?(cA125B):(((str_eq((cA127D),("Y")))?(cA127B):("ERROR")))))))));var cB48E=(cA144F);arr1xAB12AB31[2][0]=(round((((cA14V)*(cA14Y))),(0)));arr1xAB12AB31[4][0]=(round((((cA16V)*(cA16Y))),(2)));arr1xAB12AB31[6][0]=(round((((cA18V)*(cA18Y))),(0)));var cA21V=(((((cA12V)-(cA16V)))-(cA18V)));var cA25V=(cA14V);arr1xAB12AB31[13][0]=(round((((cA25V)*(cA25Y))),(0)));arr1xAB12AB31[15][0]=(round((((cA25V)*(cA27Y))),(0)));arr1xAB12AB31[16][0]=(round((((cA25V)*(cA28Y))),(0)));var cA31V=(cA14V);arr1xAB12AB31[19][0]=(round((((cA31V)*(cA32Y))),(0)));var cB26D=(cA16V);arr2xI26I45[0][0]=(((round((((((arr1xAB12AB31[4][0])/(72)))*(cB48E))),(0)))*(1.25)));
 var cB29D=(cA18V);arr2xI26I45[3][0]=(((round((((((arr1xAB12AB31[6][0])/(72)))*(cB48E))),(0)))*(1.25)));arr2xI26I45[7][0]=(((round((((((arr1xAB12AB31[2][0])/(72)))*(cB48E))),(0)))*(1.25)));arr2xI26I45[18][0]=(((round((((((arr1xAB12AB31[19][0])/(72)))*(cB48E))),(0)))*(1.25)));var cA22V=(((((cA21V)<(0)))?("ERROR"):(cA21V)));var cA29AC=(sumgeneral(3,0,0,eecm2));arr2xI26I45[16][0]=(((round((((((cA29AC)/(72)))*(cB48E))),(0)))*(1.25)));arr1xAB12AB31[0][0]=(round((((v2n(cA22V))*(cA12Y))),(0)));arr2xI26I45[5][0]=(((round((((((arr1xAB12AB31[0][0])/(72)))*(cB48E))),(0)))*(1.25)));var sumcnt1_sum=0;var sumcnt1_cnt=0;if(eeisstring(cB43I)){;}else if(typeof(cB43I)=="boolean"){;}else if(isFinite(cB43I)){sumcnt1_sum=sumcnt1_sum+cB43I;sumcnt1_cnt++;}else if(isNaN(cB43I)){sumcnt1_sum=Number.NaN;};var cB46I=(sumgeneral(6,sumcnt1_sum,sumcnt1_cnt,eecm1));var cB47I=(((((cB46I)/(72)))*(cB48E)));var cB51F=(((((((((((arr2xI26I45[0][0])+(arr2xI26I45[3][0])))+(arr2xI26I45[5][0])))+(arr2xI26I45[7][0])))+(arr2xI26I45[16][0])))+(arr2xI26I45[18][0])));var cA147J=(cB51F);var cB52F=(((cB51F)*(3.413)));var cA147N=(((cA147J)*(3.413)));data.pB12D=cB12D;data.pB14D=cB14D;data.pB16D=cB16D;data.pB21D=cB21D;data.pB21H=cB21H;data.pB22D=cB22D;data.pB22H=cB22H;data.pB23D=cB23D;data.pB25D=cB25D;data.pB26D=cB26D;data.pB26I=arr2xI26I45[0][0];
 data.pB28D=cB28D;data.pB29D=cB29D;data.pB29I=arr2xI26I45[3][0];data.pB31D=cB31D;data.pB31I=arr2xI26I45[5][0];data.pB33D=cB33D;data.pB33I=arr2xI26I45[7][0];data.pB37F=cB37F;data.pB37G=cB37G;data.pB38F=cB38F;data.pB38G=cB38G;data.pB39F=cB39F;data.pB39G=cB39G;data.pB42I=arr2xI26I45[16][0];data.pB44E=cB44E;data.pB44I=arr2xI26I45[18][0];data.pB46I=cB46I;data.pB47I=cB47I;data.pB48E=cB48E;data.pB51F=cB51F;data.pB52F=cB52F;data.pA147J=cA147J;data.pA147N=cA147N;};

 function str_eq(x,y){return(x.toLowerCase()==y.toLowerCase())};function myIsNaN(x){return(isNaN(x)||(typeof x=='number'&&!isFinite(x)));};function mod(n,d){return n-d*Math.floor(n/d);};function round(n,nd){if(isFinite(n)&&isFinite(nd)){var sign_n=(n<0)?-1:1;var abs_n=Math.abs(n);var factor=Math.pow(10,nd);return sign_n*Math.round(abs_n*factor)/factor;}else{return NaN;}};function sum2(arr,rt,rb){var sum=0;for(var ii=rt;ii<=rb;ii++){sum+=arr[ii]};return sum};function sum3(arr,rt,ct,rb,cb){var sum=0;for(var ii=rt;ii<=rb;ii++){for(var jj=ct;jj<=cb;jj++){sum+=arr[ii][jj]}};return sum};function sumgeneral(cnt,vsum,vcnt,x){var sum=vsum;for(var ii=0;ii<x.length;ii++){sum+=sum3(x[ii][0],x[ii][1],x[ii][2],x[ii][3],x[ii][4]);};return sum;};function s2n(str){str=String(str).replace(eedecreg,".");str=str.replace(eethreg,"");str=str.replace(eecurrencyreg,"");var res=parseFloat(str);if(myIsNaN(res))res=0;if(str.search(eepercentreg)>=0)res=res/100;return res;}function b2s(b){return b?eetrue:eefalse;};function v2n(v){switch(typeof v){case "number":return v;case "string":return s2n(v);case "boolean":return v?1:0;case "object":if(v.constructor==Number){return v;};if(v.constructor==String){return s2n(v);};if(v.constructor==Boolean){return v?1:0;};return Number.NaN;default:return Number.NaN;}};function eeparseFloat(str){str=String(str).replace(eedecreg,".");var res=parseFloat(str);if(isNaN(res)){return 0;}else{return res;}};var near0RegExp=new RegExp("[.](.*0000000|.*9999999)");function eedisplayFloat(x){if(myIsNaN(x)){return Number.NaN;}else{var str=String(x);if(near0RegExp.test(str)){x=round(x,8);str=String(x);}return str.replace(/\./g,eedec);}};
 function eedisplayFloatV(x){if(x=="")return x;if(isFinite(x)){return eedisplayFloat(x);}else{return x}};function eedisplayScientific(x,nd){if(myIsNaN(x)){return Number.NaN;}else{var str=String(x.toExponential(nd));return str.replace(/\./g,eedec);}};function eedisplayFloatND(x,nd){if(myIsNaN(x)){return Number.NaN;}else{var res=round(x,nd);if(nd>0){var str=String(res);if(str.indexOf('e')!=-1)return str;if(str.indexOf('E')!=-1)return str;var parts=str.split('.');if(parts.length<2){var decimals=('00000000000000').substring(0,nd);return(parts[0]).toString()+eedec+decimals;}else{var decimals=((parts[1]).toString()+'00000000000000').substring(0,nd);return(parts[0]).toString()+eedec+decimals;}}else{return res;}}};function eedisplayPercent(x){if(myIsNaN(x)){return Number.NaN;}else{return eedisplayFloat(x*100)+'%';}};function eedisplayPercentND(x,nd){if(myIsNaN(x)){return Number.NaN;}else{return eedisplayFloatND(x*100,nd)+'%';}}function eedisplayFloatNDTh(x,nd){if(myIsNaN(x)){return Number.NaN;}else{var res=round(x,nd);if(nd>0){var str=String(res);if(str.indexOf('e')!=-1)return str;if(str.indexOf('E')!=-1)return str;var parts=str.split('.');var res2=eeinsertThousand(parts[0].toString());if(parts.length<2){var decimals=('00000000000000').substring(0,nd);return(res2+eedec+decimals);}else{var decimals=((parts[1]).toString()+'00000000000000').substring(0,nd);return(res2+eedec+decimals);}}else{return(eeinsertThousand(res.toString()));}}};function eedisplayPercentNDTh(x,nd){if(myIsNaN(x)){return Number.NaN;}else{return eedisplayFloatNDTh(x*100,nd)+'%';}}
 var eeparseFloatVreg=new RegExp("^ *-?[0-9.]+ *$");function eeparseFloatV(str){if(str=="")return str;str=String(str).replace(eedecreg,".");if(!eeparseFloatVreg.test(str)){return str;};var res=parseFloat(str);if(isNaN(res)){return str;}else{return res;}};function eeinsertThousand(whole){if(whole==""||whole.indexOf("e")>=0){return whole;}else{var minus_sign="";if(whole.charAt(0)=="-"){minus_sign="-";whole=whole.substring(1);};var res="";var str_length=whole.length-1;for(var ii=0;ii<=str_length;ii++){if(ii>0&&ii%3==0){res=eeth+res;};res=whole.charAt(str_length-ii)+res;};return minus_sign+res;}};function eedatefmt(fmt,x){if(!isFinite(x))return Number.NaN;var padding=0;var tmp=0;var res="";var len=fmt.length;for(var ii=0;ii<len;ii++){if(fmt[ii]>31){res+=fmtstrings[fmt[ii]-32];}else{switch(fmt[ii]){case 2:res+=eemonth(x);break;case 3:tmp=eemonth(x);if(tmp<10){res+="0";};res+=tmp;break;case 4:res+=fmtmonthnamesshort[eemonth(x)-1];break;case 5:res+=fmtmonthnameslong[eemonth(x)-1];break;case 6:res+=eeday(x);break;case 7:tmp=eeday(x);if(tmp<10){res+="0";};res+=tmp;break;case 8:res+=fmtdaynamesshort[weekday(x,1)-1];break;case 9:res+=fmtdaynameslong[weekday(x,1)-1];break;case 10:tmp=year(x)%100;if(tmp<10){res+="0";};res+=tmp;break;case 11:res+=year(x);break;case 12:res+=hour(x);break;case 13:tmp=hour(x);if(tmp<10){res+="0";};res+=tmp;break;case 14:tmp=hour(x)%12;if(tmp==0){res+="12";}else{res+=tmp%12;};break;case 15:tmp=hour(x)%12;if(tmp==0){res+="12";}else{if(tmp<10){res+="0";};res+=tmp;};break;case 16:res+=minute(x);break;case 17:tmp=minute(x);if(tmp<10){res+="0";};res+=tmp;break;case 18:res+=second(x);break;case 19:tmp=second(x);if(tmp<10){res+="0";};res+=tmp;break;case 21:case 22:if(hour(x)<12){res+="AM";}else{res+="PM";};break;case 23:res+=eedisplayFloat(x);break;case 24:tmp=fmt[++ii];res+=eedisplayFloatND(x,tmp);break;case 25:tmp=fmt[++ii];res+=eedisplayFloatNDTh(x,tmp);break;case 26:res+=eedisplayPercent(x);break;case 27:tmp=fmt[++ii];res+=eedisplayPercentND(x,tmp);break;case 28:tmp=fmt[++ii];res+=eedisplayPercentNDTh(x,tmp);break;case 29:tmp=fmt[++ii];res+=eedisplayScientific(x,tmp);break;case 30:padding=fmt[++ii];tmp=hour(x)+Math.floor(x)*24;tmp=tmp.toString();if(tmp.length<padding){res+=('00000000000000').substring(0,padding-tmp.length);}res+=tmp;break;};};};return res;};
 function eeisstring(v){switch(typeof v){case "string":return true;case "object":return v.constructor==String;default:return false;}};function leap_gregorian(year){return((year%4)==0)&&(!(((year%100)==0)&&((year%400)!=0)));}var GREGORIAN_EPOCH=1721425;function gregorian_to_jd(year,month,day){return(GREGORIAN_EPOCH-0)+(365*(year-1))+Math.floor((year-1)/4)+(-Math.floor((year-1)/100))+Math.floor((year-1)/400)+Math.floor((((367*month)-362)/12)+((month<=2)?0:(leap_gregorian(year)?-1:-2))+day);}function jd_to_gregorian(jd){var wjd,depoch,quadricent,dqc,cent,dcent,quad,dquad,yindex,year,yearday,leapadj;wjd=Math.floor(jd);depoch=wjd-GREGORIAN_EPOCH-1;quadricent=Math.floor(depoch/146097);dqc=mod(depoch,146097);cent=Math.floor(dqc/36524);dcent=mod(dqc,36524);quad=Math.floor(dcent/1461);dquad=mod(dcent,1461);yindex=Math.floor(dquad/365);year=(quadricent*400)+(cent*100)+(quad*4)+yindex;if(!((cent==4)||(yindex==4))){year++;}yearday=wjd-gregorian_to_jd(year,1,1);leapadj=((wjd<gregorian_to_jd(year,3,1))?0:(leap_gregorian(year)?1:2));var month=Math.floor((((yearday+leapadj)*12)+373)/367);var day=(wjd-gregorian_to_jd(year,month,1))+1;return new Array(year,month,day);}function eeday(serial_number){if(!isFinite(serial_number))return Number.NaN;if(serial_number<1){return 0;}if(serial_number>60)serial_number--;var res=jd_to_gregorian(serial_number+2415020);return res[2];};function hour(serial_number){if(!isFinite(serial_number))return Number.NaN;var res=Math.floor((serial_number-Math.floor(serial_number))*86400+0.5);return Math.floor(res/3600);}
 function minute(serial_number){if(!isFinite(serial_number))return Number.NaN;var res=Math.floor((serial_number-Math.floor(serial_number))*86400+0.5);return Math.floor(res/60)%60;};function eemonth(serial_number){if(!isFinite(serial_number))return Number.NaN;if(serial_number<1){return 1;}if(serial_number>60)serial_number--;var res=jd_to_gregorian(serial_number+2415020);return res[1];};function second(serial_number){if(!isFinite(serial_number))return Number.NaN;var res=Math.floor((serial_number-Math.floor(serial_number))*86400+0.5);return res%60;};function weekday(serial_number,return_type){if(!isFinite(return_type)||!isFinite(serial_number))return Number.NaN;if(return_type<1||return_type>3)return Number.NaN;var res=Math.floor(serial_number+6)%7;switch(Math.floor(return_type)){case 1:return res+1;case 2:return(res+6)%7+1;case 3:return(res+6)%7;};return "hej";};function year(serial_number){if(!isFinite(serial_number))return Number.NaN;if(serial_number<1){return 1900;}if(serial_number>60)serial_number--;var res=jd_to_gregorian(serial_number+2415020);return res[0];};