function SoftFlooringCalculator(theDiv,style,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){if(style=='1A'||style=='1a'){var html='<div ><div id="form1A" height="40px" style="position:relative; padding:0; margin:0;"><img src="http://www.alessco.com/images/CalcLayout1A.png"/>';html+='<div style="position:absolute; top:10px; left:309px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:349px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:408px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:448px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="1" /></div>';html+='<div style="position:absolute; top:4px; left:484px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'1A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="1"></div>';html+='</div></div>'}else if(style=='1B'||style=='1b'){var html='<div><div id="form1B" height="40px" style="position:relative; padding:0; margin:0;"><img src="http://www.alessco.com/images/CalcLayout1B.png"/>';html+='<div style="position:absolute; top:10px; left:309px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:349px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:408px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:448px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="2" /></div>';html+='<div style="position:absolute; top: 4px; left:484px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'1B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="2"></div>';html+='</div></div>'}else if(style=='2A'||style=='2a'){var html='<div><div id="form2A" height="59px" style="position:relative; padding:0; margin:0;"><img src="http://www.alessco.com/images/CalcLayout2A.png"/>';html+='<div style="position:absolute; top:30px; left: 39px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left: 79px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left:138px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left:178px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="3" /></div>';html+='<div style="position:absolute; top:24px; left:230px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'2A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="3"></div>';html+='</div></div>'}else if(style=='2B'||style=='2b'){var html='<div><div id="form2A" height="59px" style="position:relative; padding:0; margin:0;"><img src="http://www.alessco.com/images/CalcLayout2B.png"/>';html+='<div style="position:absolute; top:30px; left: 39px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="4" /></div>';html+='<div style="position:absolute; top:30px; left: 79px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="4" /></div>';html+='<div style="position:absolute; top:30px; left:138px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="4" /></div>';html+='<div style="position:absolute; top:30px; left:178px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="4" /></div>';html+='<div style="position:absolute; top:24px; left:230px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'2B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="4"></div>';html+='</div></div>'}else if(style=='3A'||style=='3a'){var html='<div><div id="form3A" height="136px" style="	position:relative; padding:0; margin:0;"><img src="http://www.alessco.com/images/CalcLayout3A.png"/>';html+='<div style="position:absolute; top: 78px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="5" /></div>';html+='<div style="position:absolute; top: 78px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="5" /></div>';html+='<div style="position:absolute; top:103px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="5" /></div>';html+='<div style="position:absolute; top:103px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="5" /></div>';html+='<div style="position:absolute; top: 97px; left:88px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'3A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="5"></div>';html+='</div></div>'}else if(style=='3B'||style=='3b'){var html='<div><div id="form3B" height="136px" style="position:relative; padding:0; margin:0;"><img src="http://www.alessco.com/images/CalcLayout3B.png"/>';html+='<div style="position:absolute; top: 78px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="6" /></div>';html+='<div style="position:absolute; top: 78px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="6" /></div>';html+='<div style="position:absolute; top:103px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="6" /></div>';html+='<div style="position:absolute; top:103px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="6" /></div>';html+='<div style="position:absolute; top: 97px; left:88px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'3B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="6"></div>';html+='</div></div>'}else if(style=='4A'||style=='4a'){var html='<div><div id="form4A" height="154px" style="position:relative; padding:0; margin:0;"><img src="http://www.alessco.com/images/CalcLayout4A.png"/>';html+='<div style="position:absolute; top: 87px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="7" /></div>';html+='<div style="position:absolute; top: 87px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="7" /></div>';html+='<div style="position:absolute; top:112px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="7" /></div>';html+='<div style="position:absolute; top:112px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="7" /></div>';html+='<div style="position:absolute; top:106px; left:97px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'4A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="7"></div>';html+='</div></div>'}else if(style=='4B'||style=='4b'){var html='<div><div id="form4B" style="position:relative; padding:0; margin:0; height:154px; width: 154px"><img src="http://www.alessco.com/images/CalcLayout4B.png"/>';html+='<div style="position:absolute; top: 87px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="8" /></div>';html+='<div style="position:absolute; top: 87px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="8" /></div>';html+='<div style="position:absolute; top:112px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="8" /></div>';html+='<div style="position:absolute; top:112px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="8" /></div>';html+='<div style="position:absolute; top:106px; left:97px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'4B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="8"></div>';html+='</div></div>'}else if(style=='5A'){var html='<div><div id="form" style="padding: 4px 0px 0px 0px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 0px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input class="dim" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input class="dim" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit" onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="newWindow(\'5A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="5">        </td>';html+='</tr>';html+='<tr>';html+='<td style="padding: 0px 0px 0px 0px;" colspan="11">';html+='<a href="http://www.alessco.com/OrderForm"><img border="0" id="buttonLink1" src="http://www.alessco.com/images/buttonOrderHere.gif" onMouseOver="orderHereButtonBlue(\'1\');" onMouseOut="orderHereButtonGrey(\'1\');" /></a>';html+='</td>';html+=' </tr>';html+='</table>';html+='</div></div>'}else if(style=='5B'){var html='<div><div id="form" style="padding: 4px 0px 0px 0px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 0px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/dealers/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit" onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="newWindow(\'5B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="5">        </td>';html+='</tr>';html+='</table>';html+='</div></div>'}else if(style=='5C'){var html='<div><div id="form" style="padding: 4px 0px 0px 0px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 32px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input class="dim" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input class="dim" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit" onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="newWindow(\'5A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="5">        </td>';html+='</tr>';html+='<tr>';html+='<td style="padding: 24px 0px 0px 32px;" colspan="11">';html+='<a href="http://www.softfloor.com/OrderForm"><img border="0" id="buttonLink1" src="http://www.alessco.com/images/buttonOrderHere.gif" onMouseOver="orderHereButtonBlue(\'1\');" onMouseOut="orderHereButtonGrey(\'1\');" /></a>';html+='</td>';html+=' </tr>';html+='</table>';html+='</div></div>'}document.getElementById(theDiv).innerHTML=html}function creatediv(id){var newdiv=document.createElement('div');newdiv.setAttribute('id',id);newdiv.style.visibility="hidden";newdiv.style.height="0px";newdiv.value=0;document.body.appendChild(newdiv)}var allHTMLTags=new Array();function getElementByClass(theClass){var allHTMLTags=myWindow.document.getElementsByTagName("*");for(i=0;i<allHTMLTags.length;i++){if(allHTMLTags[i].className==theClass){allHTMLTags[i].style.fontSize='16px';allHTMLTags[i].style.fontFamily='"Arial Narrow", Arial, Helvetica';if(theClass=='popTextRed'){allHTMLTags[i].style.color='#990000';allHTMLTags[i].style.fontWeight='bold'}else if(theClass=='popTextBlack'){allHTMLTags[i].style.color='#000'}else if(theClass=='rightSide'){allHTMLTags[i].style.width='130px';allHTMLTags[i].style.position='absolute';allHTMLTags[i].style.height='14px'}else if(theClass=='leftSide'){allHTMLTags[i].style.position='relative';allHTMLTags[i].style.left='109px';allHTMLTags[i].style.width='320px'}}}}function resultsTest(lenFeet,lenInches,widFeet,widInches,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){creatediv('total1');creatediv('cost1');creatediv('total1w');creatediv('cost1w');creatediv('borderArea');creatediv('insideArea');creatediv('borderWall');creatediv('insideWall');creatediv('lenghtArea');creatediv('widthArea');creatediv('lenghtWall');creatediv('widthWall');creatediv('total2');creatediv('cost2');creatediv('total2w');creatediv('cost2w');creatediv('total3');creatediv('cost3');creatediv('total3w');creatediv('cost3w');creatediv('total4');creatediv('cost4');creatediv('total4w');creatediv('cost4w');creatediv('lenghtPLArea');creatediv('widthPLArea');creatediv('lenghtPLWall');creatediv('widthPLWall');creatediv('total5');creatediv('cost5');creatediv('total5w');creatediv('cost5w');creatediv('total6');creatediv('cost6');creatediv('total6w');creatediv('cost6w');creatediv('total7');creatediv('cost7');creatediv('total7w');creatediv('cost7w');creatediv('total8');creatediv('cost8');creatediv('total8w');creatediv('cost8w');creatediv('total9');creatediv('cost9');creatediv('total9w');creatediv('cost9w');creatediv('total10');creatediv('cost10');creatediv('total10w');creatediv('cost10w');creatediv('total11');creatediv('cost11');creatediv('total11w');creatediv('cost11w');creatediv('total12');creatediv('cost12');creatediv('total12w');creatediv('cost12w');creatediv('lenght1mby1mArea');creatediv('width1mby1mArea');creatediv('lenght1mby1mWall');creatediv('width1mby1mWall');creatediv('total13');creatediv('cost13');creatediv('total13w');creatediv('cost13w');creatediv('lenght4by4Area');creatediv('width4by4Area');creatediv('lenght4by4Wall');creatediv('width4by4Wall');creatediv('totalSM');creatediv('calSM');creatediv('wyniki');creatediv('boxes');countPieces(lenFeet,lenInches,widFeet,widInches,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM);var total1=document.getElementById('total1');var total1w=document.getElementById('total1w');var cost1=document.getElementById('cost1');var cost1w=document.getElementById('cost1w');var total6=document.getElementById('total6');var total6w=document.getElementById('total6w');var cost6=document.getElementById('cost6');var cost6w=document.getElementById('cost6w');var total5=document.getElementById('total5');var total5w=document.getElementById('total5w');var cost5=document.getElementById('cost5');var cost5w=document.getElementById('cost5w');var total2=document.getElementById('total2');var total2w=document.getElementById('total2w');var cost2=document.getElementById('cost2');var cost2w=document.getElementById('cost2w');var total3=document.getElementById('total3');var total3w=document.getElementById('total3w');var cost3=document.getElementById('cost3');var cost3w=document.getElementById('cost3w');var total7=document.getElementById('total7');var total7w=document.getElementById('total7w');var cost7=document.getElementById('cost7');var cost7w=document.getElementById('cost7w');var total8=document.getElementById('total8');var total8w=document.getElementById('total8w');var cost8=document.getElementById('cost8');var cost8w=document.getElementById('cost8w');var total9=document.getElementById('total9');var total9w=document.getElementById('total9w');var cost9=document.getElementById('cost9');var cost9w=document.getElementById('cost9w');var total10=document.getElementById('total10');var total10w=document.getElementById('total10w');var cost10=document.getElementById('cost10');var cost10w=document.getElementById('cost10w');var total11=document.getElementById('total11');var total11w=document.getElementById('total11w');var cost11=document.getElementById('cost11');var cost11w=document.getElementById('cost11w');var total12=document.getElementById('total12');var total12w=document.getElementById('total12w');var cost12=document.getElementById('cost12');var cost12w=document.getElementById('cost12w');var total13=document.getElementById('total13');var total13w=document.getElementById('total13w');var cost13=document.getElementById('cost13');var cost13w=document.getElementById('cost13w');var total4=document.getElementById('total4');var total4w=document.getElementById('total4w');var cost4=document.getElementById('cost4');var cost4w=document.getElementById('cost4w');var totalSM=document.getElementById('totalSM');var html='<div style="margin-bottom:36px; "><img id="closeButton" onMouseOver="closeBlue(this);" OnMouseOut="closeGrey(this);" name="close" src="http://www.alessco.com/images/closeButton.png" border="0" onClick="javascript:window.close(self);" /></div>';html+='<div style="margin-bottom:66px; margin-left:-5px;"><img id="mainTitleImage" src="http://www.alessco.com/images/CalculatorTitle_0_Over.jpg" onMouseOver="this.src=\'http://www.alessco.com/images/CalculatorTitle_0.jpg\'" onMouseOut="this.src=\'http://www.alessco.com/images/CalculatorTitle_0_Over.jpg\'" border="0" /></div>';html+=countBoxes('total1','total1w','25','0.64','1.28','32','26','26','16','cost1','cost1w','4','50px','2','5/8',costSF/4,'SoftFloors','0','1');html+=countBoxes('total2','total2w','24','0.50','0.92','22','26','26','12','cost2','cost2w','4','139px','2','1/2',costERSF1/4,'Economy Reversible SoftFloors','1','2');html+=countBoxes('total5','total5w','25','0.64','1.28','32','26','26','16','cost5','cost5w','4','413px','2','5/8',costSW/4,'SoftWoods','1','5');html+=countBoxes('total6','total6w','25','0.64','1.76','44','26','26','16','cost6','cost6w','4','504px','2','5/8',costSC/4,'SoftCarpets','1','6');html+=countBoxes('total7','total7w','25','0.64','1.76','44','27','27','16','cost7','cost7w','4','596px','2','5/8',costESC/4,'Economy SoftCarpets','1','7');html+=countBoxes('total8','total8w','20','0.40','2.10','42','26','26','8','cost8','cost8w','4','685px','2','3/8',costST/4,'SoftTuff','1','8');html+=countBoxes('total9','total9w','12','0.92','4.50','54','27','27','11','cost9','cost9w','4','776px','2','3/4',costSR/4,'SoftRubber','1','9');html+=countBoxes('total10','total10w','25','0.92','1.88','47','26','26','23','cost10','cost10w','4','867px','2','7/8',costJRSF2/4,'Jumbo Reversible SoftFloors','1','10');html+=countBoxes('total11','total11w','25','1.04','2.32','58','26','26','26','cost11','cost11w','4','956px','2','1',costJRSF2by1/4,'Jumbo Reversible SoftFloors','1','11');html+=countBoxes1('total12','total12w','10','0.90','5.40','54','42','41','9','cost12','cost12w','11.34','1050px','1m','7/8',costJRSF1mby1m/11.34,'Jumbo Reversible SoftFloors','1','12');html+=countBoxes4('total13','total13w','10','1.10','9','90','51','50','11','cost13','cost13w','16','1141px','4','1',costJRSF4/16,'Jumbo Reversible SoftFloors','1','13');html+=countBoxesMats('1321px','14',costSM,'totalSM');html+=countBoxes('total3','total3w','24','0.50','0.92','22','26','26','12','cost3','cost3w','4','229px','2','1/2',costERSF2/4,'Economy Reversible SoftFloors','1','3');html+=playLearn('total4','total4w','4',costPL1310,costPL1311);return html}function results(id,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){var text=/^\d+$/;var lF=document.getElementById('alesscoLenghtFeet').value;var lI=document.getElementById('alesscoLenghtInches').value;var wF=document.getElementById('alesscoWidthFeet').value;var wI=document.getElementById('alesscoWidthInches').value;if(text.test(lF)&&text.test(lI)&&text.test(wF)&&text.test(wI)){if(lF==0||wF==0||lI>=12||wI>=12){alert('Please convert your dimensions to feet and inches')}else{document.getElementById(id).innerHTML=resultsTest(lF,lI,wF,wI,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM)}}else alert('Please convert your dimensions to feet and inches')}function newWindow(thisForm,style,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){x=thisForm.parentNode.parentNode.childNodes;for(i=1;i<x.length;i++){if(i==1){var lF=x[i].firstChild.value}if(i==2){var lI=x[i].firstChild.value}if(i==3){var wF=x[i].firstChild.value}if(i==4){var wI=x[i].firstChild.value}}var text=/^\d+$/;if(text.test(lF)&&text.test(lI)&&text.test(wF)&&text.test(wI)){if(lF==0||wF==0||lI>=12||wI>=12){alert('Please convert your dimensions to feet and inches')}else{myWindow=window.open('','','width=1000,height=800,scrollbars=yes');var lenFeet=lF;var lenInches=lI;var widFeet=wF;var widInches=wI;var html='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html" charset="UTF-8" /><title>SoftFlooring Calculator&trade;</title><link rel="stylesheet" href="http://www.alessco.com/cal/testStyle.css" type="text/css" /><script type="text/javascript" src="http://www.alessco.com/softFlooringCalculator/softFlooringCalculator.js"></script></head><body style="padding:auto;">';html+='<div id="newWindowBox" style="width:900px;"><div id="SoftFlooringCalculator" >';if(style=='1A'||style=='1a'){html+='<div id="form1A" height="40px" style="position:relative;  margin-bottom: 18px;"><img style="margin-bottom:18px;" src="http://www.alessco.com/images/CalcLayout1A.png"/>';html+='<div style="position:absolute; top:10px; left:309px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:349px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:408px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:10px; left:448px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:4px; left:484px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></td>';html+='</div>'}else if(style=='1B'||style=='1b'){html+='<div id="form1B" height="40px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="margin-bottom:18px;" src="http://www.alessco.com/images/CalcLayout1B.png"/>';html+='<div style="position:absolute; top:10px; left:309px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:349px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:408px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:10px; left:448px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top: 4px; left:484px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></td>';html+='</div>'}else if(style=='2A'||style=='2a'){html+='<div id="form2A" height="59px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="margin-bottom:18px;" src="http://www.alessco.com/images/CalcLayout2A.png"/>';html+='<div style="position:absolute; top:30px; left: 39px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top:30px; left: 79px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:30px; left:138px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left:178px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:24px; left:230px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></td>';html+='</div>'}else if(style=='2B'||style=='2b'){html+='<div id="form2A" height="59px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="margin-bottom:18px;" src="http://www.alessco.com/images/CalcLayout2B.png"/>';html+='<div style="position:absolute; top:30px; left: 39px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top:30px; left: 79px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:30px; left:138px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left:178px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:24px; left:230px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></td>';html+='</div>'}else if(style=='3A'||style=='3a'){html+='<div id="form3A" height="136px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="" src="http://www.alessco.com/images/CalcLayout3A.png"/>';html+='<div style="position:absolute; top: 78px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top: 78px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:103px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:103px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top: 97px; left:88px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></div>';html+='</div>'}else if(style=='3B'||style=='3b'){html+='<div id="form3B" height="136px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="" src="http://www.alessco.com/images/CalcLayout3B.png"/>';html+='<div style="position:absolute; top: 78px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top: 78px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:103px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:103px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top: 97px; left:88px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></div>';html+='</div>'}else if(style=='4A'||style=='4a'){html+='<div id="form4A" height="154px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="" src="http://www.alessco.com/images/CalcLayout4A.png"/>';html+='<div style="position:absolute; top: 87px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top: 87px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:112px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:112px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:106px; left:97px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></div>';html+='</div>'}else if(style=='4B'||style=='4b'){html+='<div id="form4B" height="154px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="" src="http://www.alessco.com/images/CalcLayout4B.png"/>';html+='<div style="position:absolute; top: 87px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top: 87px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:112px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:112px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:106px; left:97px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></div>';html+='</div>'}else if(style=='5A'){html+='<div id="form" style="padding: 4px 0px 0px 0px; margin-bottom: 11px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 0px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input style="font-size: 16px; color: #6e6e6e;" class="dim" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input style="font-size: 16px; color: #6e6e6e;" class="dim" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input style="font-size: 16px; color: #6e6e6e;" class="dim" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input style="font-size: 16px; color: #6e6e6e;" class="dim" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit"  onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5">        </td>';html+='</tr>';html+='</table>';html+='</div>'}else if(style=='5B'){html+='<div id="form" style="padding: 4px 0px 0px 0px; margin-bottom: 9px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 0px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/dealers/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit" onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5">        </td>';html+='</tr>';html+='</table>';html+='</div>'}html+='<div id="boxes">'+resultsTest(lenFeet,lenInches,widFeet,widInches,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM)+'</div><div id="wyniki"></div></div>';html+='</div></body></html>';myWindow.document.write(html);myWindow.focus()}}else{alert('Please convert your dimensions to feet and inches')}}function closeWindow(){myWindow.close()}function closeBlue(obj){obj.src="http://www.alessco.com/images/closeButtonOver.png"}function closeGrey(obj){obj.src="http://www.alessco.com/images/closeButton.png"}function closeBlueEnd(){document.getElementById('closeButtonEnd').src="http://www.alessco.com/images/closeButtonOver.png"}function closeGreyEnd(){document.getElementById('closeButtonEnd').src="http://www.alessco.com/images/closeButton.png"}function changeBackgroundColor(objDivID){var els=document.getElementsByTagName('div');for(i=0;i<els.length;i++){els[i].style.backgroundColor='#ffffff'}document.getElementById(objDivID).style.backgroundColor='#c0c0c0'}function goButtonBlue(obj){obj.src="http://www.alessco.com/images/CalculatorGoOver.png"}function goButtonGrey(obj){obj.src="http://www.alessco.com/images/CalculatorGo.png"}function orderHereButtonBlue(id){var link='buttonLink'+id+'';document.getElementById(link).src="http://www.alessco.com/images/buttonOrderHereOver.png"}function goButtonOver(obj){obj.src="http://www.alessco.com/images/SoftFlooringCalculatorGoOver.png"}function goButtonOut(obj){obj.src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png"}function waitPreloadPage(){if(document.getElementById){document.getElementById('prepage').style.visibility='hidden'}else{if(document.layers){document.prepage.visibility='hidden'}else{document.all.prepage.style.visibility='hidden'}}}function hideDiv(id){document.getElementById(id).style.visibility="hidden"}function showClue(id,position){var html='<span class="clue">To see more details fill out the form</span>';document.getElementById(id).innerHTML=html;document.getElementById(id).style.top=position;document.getElementById(id).style.visibility="visible"}function addCommas(nStr){nStr+='';x=nStr.split('.');x1=x[0];x2=x.length>1?'.'+x[1]:'';var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,'$1'+','+'$2')}return x1+x2}function countPieces(lFeet,lInches,wFeet,wInches,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){var lenFeet=lFeet;var lenInches=lInches;var widFeet=wFeet;var widInches=wInches;if(lenFeet<2){lenFeet=2;lenInches=0}if(widFeet<2){widFeet=2;widInches=0}if(lenFeet==0&&lenInches!=0){lenFeet=2;lenInches=0}if(widFeet==0&&widInches!=0){widFeet=2;widInches=0}var lenFeet4=lFeet;var lenInches4=lInches;var widFeet4=wFeet;var widInches4=wInches;var text=/^\d+$/;if(text.test(lenFeet)&&(lenFeet!=0||widInches!=0)&&text.test(lenInches)&&text.test(widFeet)&&text.test(widInches)){if((lenInches==0&&widInches==0)||(lenInches4==0&&widInches4==0)){var wallSM=Math.ceil((lenFeet*widFeet)/24);var lenghtArea=Math.floor(lenFeet/2)*2;var widthArea=Math.floor(widFeet/2)*2;var totalArea=Math.floor(lenFeet/2)*Math.floor(widFeet/2);var borderArea=(Math.floor(lenFeet/2)-2)*2+(Math.floor(widFeet/2)-2)*2;var insideArea=(Math.floor(lenFeet/2)-2)*(Math.floor(widFeet/2)-2);var num=new Number(lenFeet);var num1=new Number(widFeet);var lenghtPLArea=num-1;var widthPLArea=num1-1;var lenghtPLWall=num;var widthPLWall=num1;var totalPLArea=lenghtPLArea*widthPLArea;var totalPLWall=lenghtPLWall*widthPLWall;var totalWall=Math.ceil(lenFeet/2)*Math.ceil(widFeet/2);var lenghtWall=Math.ceil(lenFeet/2)*2;var widthWall=Math.ceil(widFeet/2)*2;var borderWall=(Math.ceil(lenFeet/2)-2)*2+(Math.ceil(widFeet/2)-2)*2;var insideWall=(Math.ceil(lenFeet/2)-2)*(Math.ceil(widFeet/2)-2);var total4by4Area=Math.floor(lenFeet4/4)*Math.floor(widFeet4/4);var lenght4by4Area=Math.floor(lenFeet4/4)*4;var width4by4Area=Math.floor(widFeet4/4)*4;var total4by4Wall=Math.ceil(lenFeet4/4)*Math.ceil(widFeet4/4);var lenght4by4Wall=Math.ceil(lenFeet4/4)*4;var width4by4Wall=Math.ceil(widFeet4/4)*4;var total1mby1mArea=Math.floor(lenFeet/3.375)*Math.floor(widFeet/3.28);var lenght1mby1mArea=Math.floor(lenFeet/3.375)*3.375;var width1mby1mArea=Math.floor(widFeet/3.375)*3.375;var total1mby1mWall=Math.ceil(lenFeet/3.375)*Math.ceil(widFeet/3.375);var lenght1mby1mWall=Math.ceil(lenFeet/3.375)*3.375;var width1mby1mWall=Math.ceil(widFeet/3.375)*3.375;var html='';html+='Area Rug '+totalArea+'\nWall to Wall '+totalWall+'\n4by4 Area Rug '+total4by4Area+'\n4b4 Wall to Wall '+total4by4Wall+'\n1m by 1m Area Rug '+total1mby1mArea+'\n1m by 1m Wall To Wall '+total1mby1mWall+''}else if((lenInches!=0&&widInches==0)||(lenInches4!=0&&widInches4==0)){if(lenInches>=12){alert('Please convert your dimensions to feet and inches')}else{var num=new Number(lenFeet);var num1=new Number(lenInches);var numa=new Number(widFeet);var lenFeetArea1=num-num1+num1;var lenFeetWall1=num+1;var num4=new Number(lenFeet4);var num14=new Number(lenInches4);var numa4=new Number(widFeet4);var lenFeetArea14=num4-num14+num14;var lenFeetWall14=num4+1;if(lenInches<=6){if(lenInches==6){var lenghtPLArea=num;var widthPLArea=numa-1}else{var lenghtPLArea=num-1;var widthPLArea=numa-1}var lenghtPLWall=num;var widthPLWall=numa}else{var lenghtPLArea=num;var widthPLArea=numa-1;var lenghtPLWall=num+1;var widthPLWall=widFeet}var totalPLArea=lenghtPLArea*widthPLArea;var totalPLWall=lenghtPLWall*widthPLWall;var lenghtArea=Math.floor(lenFeetArea1/2)*2;var widthArea=Math.floor(widFeet/2)*2;var totalArea=Math.floor(lenFeetArea1/2)*Math.floor(widFeet/2);var borderArea=(Math.floor(lenFeetArea1/2)-2)*2+(Math.floor(widFeet/2)-2)*2;var insideArea=(Math.floor(lenFeetArea1/2)-2)*(Math.floor(widFeet/2)-2);var lenghtWall=Math.ceil(lenFeetWall1/2)*2;var widthWall=Math.ceil(widFeet/2)*2;var totalWall=Math.ceil(lenFeetWall1/2)*Math.ceil(widFeet/2);var borderWall=(Math.ceil(lenFeetWall1/2)-2)*2+(Math.ceil(widFeet/2)-2)*2;var insideWall=(Math.ceil(lenFeetWall1/2)-2)*(Math.ceil(widFeet/2)-2);var wallSM=Math.ceil((lenFeetWall1*widFeet)/24);var total4by4Area=Math.floor(lenFeetArea14/4)*Math.floor(widFeet4/4);var lenght4by4Area=Math.floor(lenFeetArea14/4)*4;var width4by4Area=Math.floor(widFeet4/4)*4;var total4by4Wall=Math.ceil(lenFeetWall14/4)*Math.ceil(widFeet4/4);var lenght4by4Wall=Math.ceil(lenFeetWall14/4)*4;var width4by4Wall=Math.ceil(widFeet4/4)*4;var total1mby1mArea=Math.floor(lenFeetArea1/3.375)*Math.floor(widFeet/3.375);var lenght1mby1mArea=Math.floor(lenFeetArea1/3.3758)*3.375;var width1mby1mArea=Math.floor(widFeet/3.375)*3.375;var total1mby1mWall=Math.ceil(lenFeetWall1/3.375)*Math.ceil(widFeet/3.375);var lenght1mby1mWall=Math.ceil(lenFeetWall1/3.375)*3.375;var width1mby1mWall=Math.ceil(widFeet/3.375)*3.375;var html='';html+='Area Rug '+totalArea+'\nWall to Wall '+totalWall+'\n4by4 Area Rug '+total4by4Area+'\n4b4 Wall to Wall '+total4by4Wall+'\n1m by 1m Area Rug '+total1mby1mArea+'\n1m by 1m Wall To Wall '+total1mby1mWall+''}}else if((lenInches==0&&widInches!=0)||(lenInches4==0&&widInches4!=0)){if(widInches>=12){alert('Please convert your dimensions to feet and inches')}else{var num=new Number(widFeet);var numa=new Number(lenFeet);var num1=new Number(widInches);var widFeetArea1=num-num1+num1;var widFeetWall1=num+1;var num4=new Number(widFeet4);var numa4=new Number(lenFeet4);var num14=new Number(widInches4);var widFeetArea14=num4-num14+num14;var widFeetWall14=num4+1;if(widInches<=6){if(widInches==6){var lenghtPLArea=numa-1;var widthPLArea=num}else{var lenghtPLArea=numa-1;var widthPLArea=num-1}var lenghtPLWall=numa;var widthPLWall=num}else{var lenghtPLArea=numa-1;var widthPLArea=num;var lenghtPLWall=numa;var widthPLWall=num+1}var totalPLArea=lenghtPLArea*widthPLArea;var totalPLWall=lenghtPLWall*widthPLWall;var lenghtArea=Math.floor(lenFeet/2)*2;var widthArea=Math.floor(widFeetArea1/2)*2;var totalArea=Math.floor(lenFeet/2)*Math.floor(widFeetArea1/2);var borderArea=(Math.floor(lenFeet/2)-2)*2+(Math.floor(widFeetArea1/2)-2)*2;var insideArea=(Math.floor(lenFeet/2)-2)*(Math.floor(widFeetArea1/2)-2);var lenghtWall=Math.ceil(lenFeet/2)*2;var widthWall=Math.ceil(widFeetWall1/2)*2;var totalWall=Math.ceil(lenFeet/2)*Math.ceil(widFeetWall1/2);var borderWall=(Math.ceil(lenFeet/2)-2)*2+(Math.ceil(widFeetWall1/2)-2)*2;var insideWall=(Math.ceil(lenFeet/2)-2)*(Math.ceil(widFeetWall1/2)-2);var wallSM=Math.ceil((lenFeet*widFeetWall1)/24);var total4by4Area=Math.floor(lenFeet4/4)*Math.floor(widFeetArea14/4);var lenght4by4Area=Math.floor(lenFeet4/4)*4;var width4by4Area=Math.floor(widFeetArea14/4)*4;var total4by4Wall=Math.ceil(lenFeet4/4)*Math.ceil(widFeetWall14/4);var lenght4by4Wall=Math.ceil(lenFeet4/4)*4;var width4by4Wall=Math.ceil(widFeetWall14/4)*4;var total1mby1mArea=Math.floor(lenFeet/3.375)*Math.floor(widFeetArea1/3.375);var lenght1mby1mArea=Math.floor(lenFeet/3.375)*3.375;var width1mby1mArea=Math.floor(widFeetArea1/3.375)*3.375;var total1mby1mWall=Math.ceil(lenFeet/3.375)*Math.ceil(widFeetWall1/3.375);var lenght1mby1mWall=Math.ceil(lenFeet/3.375)*3.375;var width1mby1mWall=Math.ceil(widFeetWall1/3.375)*3.375;var html='';html+='Area Rug '+totalArea+'\nWall to Wall '+totalWall+'\n4by4 Area Rug '+total4by4Area+'\n4b4 Wall to Wall '+total4by4Wall+'\n1m by 1m Area Rug '+total1mby1mArea+'\n1m by 1m Wall To Wall '+total1mby1mWall+''}}else{if(lenInches>=12||widInches>=12){alert('Please convert your dimensions to feet and inches')}else{var num=new Number(lenFeet);var numa=new Number(lenInches);var lenFeetArea1=num-numa+numa;var lenFeetWall1=num+1;var num1=new Number(widFeet);var num1a=new Number(widInches);var widFeetArea1=num1-num1a+num1a;var widFeetWall1=num1+1;if(lenInches<=6&&widInches<=6){if(lenInches==6&&widInches!=6){var lenghtPLArea=num;var widthPLArea=num1-1}else if(lenInches!=6&&widInches==6){var lenghtPLArea=num-1;var widthPLArea=num1}else if(lenInches==6&&widInches==6){var lenghtPLArea=num;var widthPLArea=num1}else{var lenghtPLArea=num-1;var widthPLArea=num1-1}var lenghtPLWall=num;var widthPLWall=num1}else if(lenInches>6&&widInches<=6){if(widInches==6){var widthPLArea=num1}else{var widthPLArea=num1-1}var lenghtPLArea=num;var lenghtPLWall=num+1;var widthPLWall=num1}else if(lenInches<=6&&widInches>6){if(lenInches==6){var lenghtPLArea=num}else{var lenghtPLArea=num-1}var widthPLArea=num1;var lenghtPLWall=num;var widthPLWall=num1+1}else if(lenInches>6&&widInches>6){var lenghtPLArea=num;var widthPLArea=num1;var lenghtPLWall=num+1;var widthPLWall=num1+1}var totalPLArea=lenghtPLArea*widthPLArea;var totalPLWall=lenghtPLWall*widthPLWall;var lenghtArea=Math.floor(lenFeetArea1/2)*2;var widthArea=Math.floor(widFeetArea1/2)*2;var totalArea=Math.floor(lenFeetArea1/2)*Math.floor(widFeetArea1/2);var borderArea=(Math.floor(lenFeetArea1/2)-2)*2+(Math.floor(widFeetArea1/2)-2)*2;var insideArea=(Math.floor(lenFeetArea1/2)-2)*(Math.floor(widFeetArea1/2)-2);var lenghtWall=Math.ceil(lenFeetWall1/2)*2;var widthWall=Math.ceil(widFeetWall1/2)*2;var totalWall=Math.ceil(lenFeetWall1/2)*Math.ceil(widFeetWall1/2);var borderWall=(Math.ceil(lenFeetWall1/2)-2)*2+(Math.ceil(widFeetWall1/2)-2)*2;var insideWall=(Math.ceil(lenFeetWall1/2)-2)*(Math.ceil(widFeetWall1/2)-2);var wallSM=Math.ceil((lenFeetWall1*widFeetWall1)/24);var total4by4Area=Math.floor(lenFeetArea1/4)*Math.floor(widFeetArea1/4);var lenght4by4Area=Math.floor(lenFeetArea1/4)*4;var width4by4Area=Math.floor(widFeetArea1/4)*4;var total4by4Wall=Math.ceil(lenFeetWall1/4)*Math.ceil(widFeetWall1/4);var lenght4by4Wall=Math.ceil(lenFeetWall1/4)*4;var width4by4Wall=Math.ceil(widFeetWall1/4)*4;var total1mby1mArea=Math.floor(lenFeetArea1/3.375)*Math.floor(widFeetArea1/3.28);var lenght1mby1mArea=Math.floor(lenFeetArea1/3.375)*3.375;var width1mby1mArea=Math.floor(widFeetArea1/3.375)*3.375;var total1mby1mWall=Math.ceil(lenFeetWall1/3.375)*Math.ceil(widFeetWall1/3.375);var lenght1mby1mWall=Math.ceil(lenFeetWall1/3.375)*3.375;var width1mby1mWall=Math.ceil(widFeetWall1/3.375)*3.375;var html='';html+='Area Rug '+totalArea+'\nWall to Wall '+totalWall+'\n4by4 Area Rug '+total4by4Area+'\n4b4 Wall to Wall '+total4by4Wall+'\n1m by 1m Area Rug '+total1mby1mArea+'\n1m by 1m Wall To Wall '+total1mby1mWall+''}}document.getElementById('total1').innerHTML=totalArea;document.getElementById('total1').value=totalArea;document.getElementById('total1w').innerHTML=totalWall;document.getElementById('total1w').value=totalWall;document.getElementById('borderArea').value=borderArea;document.getElementById('insideArea').value=insideArea;document.getElementById('borderWall').value=borderWall;document.getElementById('insideWall').value=insideWall;document.getElementById('lenghtArea').value=lenghtArea;document.getElementById('widthArea').value=widthArea;document.getElementById('lenghtWall').value=lenghtWall;document.getElementById('widthWall').value=widthWall;costs(totalArea,costSF,'cost1');costs(totalWall,costSF,'cost1w');document.getElementById('total2').innerHTML=totalArea;document.getElementById('total2').value=totalArea;document.getElementById('total2w').innerHTML=totalWall;document.getElementById('total2w').value=totalWall;costs(totalArea,costERSF1,'cost2');costs(totalWall,costERSF1,'cost2w');document.getElementById('total3').innerHTML=totalArea;document.getElementById('total3').value=totalArea;document.getElementById('total3w').innerHTML=totalWall;document.getElementById('total3w').value=totalWall;costs(totalArea,costERSF2,'cost3');costs(totalWall,costERSF2,'cost3w');document.getElementById('total4').innerHTML=totalPLArea;document.getElementById('total4').value=totalPLArea;document.getElementById('total4w').innerHTML=totalPLWall;document.getElementById('total4w').value=totalPLWall;document.getElementById('lenghtPLArea').value=lenghtPLArea;document.getElementById('widthPLArea').value=widthPLArea;document.getElementById('lenghtPLWall').value=lenghtPLWall;document.getElementById('widthPLWall').value=widthPLWall;document.getElementById('total5').innerHTML=totalArea;document.getElementById('total5').value=totalArea;document.getElementById('total5w').innerHTML=totalWall;document.getElementById('total5w').value=totalWall;costs(totalArea,costSW,'cost5');costs(totalWall,costSW,'cost5w');document.getElementById('total6').innerHTML=totalArea;document.getElementById('total6').value=totalArea;document.getElementById('total6w').innerHTML=totalWall;document.getElementById('total6w').value=totalWall;costs(totalArea,costSC,'cost6');costs(totalWall,costSC,'cost6w');document.getElementById('total7').innerHTML=totalArea;document.getElementById('total7').value=totalArea;document.getElementById('total7w').innerHTML=totalWall;document.getElementById('total7w').value=totalWall;costs(totalArea,costESC,'cost7');costs(totalWall,costESC,'cost7w');document.getElementById('total8').innerHTML=totalArea;document.getElementById('total8').value=totalArea;document.getElementById('total8w').innerHTML=totalWall;document.getElementById('total8w').value=totalWall;costs(totalArea,costST,'cost8');costs(totalWall,costST,'cost8w');document.getElementById('total9').innerHTML=totalArea;document.getElementById('total9').value=totalArea;document.getElementById('total9w').innerHTML=totalWall;document.getElementById('total9w').value=totalWall;costs(totalArea,costSR,'cost9');costs(totalWall,costSR,'cost9w');document.getElementById('total10').innerHTML=totalArea;document.getElementById('total10').value=totalArea;document.getElementById('total10w').innerHTML=totalWall;document.getElementById('total10w').value=totalWall;costs(totalArea,costJRSF2,'cost10');costs(totalWall,costJRSF2,'cost10w');document.getElementById('total11').innerHTML=totalArea;document.getElementById('total11').value=totalArea;document.getElementById('total11w').innerHTML=totalWall;document.getElementById('total11w').value=totalWall;costs(totalArea,costJRSF2by1,'cost11');costs(totalWall,costJRSF2by1,'cost11w');if(total1mby1mArea==0){total1mby1mArea=1;lenght1mby1mArea=3.375;width1mby1mArea=3.375};if(total1mby1mWall==0){total1mby1mWall=1;lenght1mby1mWall=3.375;width1mby1mWall=3.375};document.getElementById('total12').innerHTML=total1mby1mArea;document.getElementById('total12').value=total1mby1mArea;document.getElementById('total12w').innerHTML=total1mby1mWall;document.getElementById('total12w').value=total1mby1mWall;document.getElementById('lenght1mby1mArea').value=lenght1mby1mArea;document.getElementById('width1mby1mArea').value=width1mby1mArea;document.getElementById('lenght1mby1mWall').value=lenght1mby1mWall;document.getElementById('width1mby1mWall').value=width1mby1mWall;costs(total1mby1mArea,costJRSF1mby1m,'cost12');costs(total1mby1mWall,costJRSF1mby1m,'cost12w');if(total4by4Area==0){total4by4Area=1;lenght4by4Area=4;width4by4Area=4};if(total4by4Wall==0){total4by4Wall=1;lenght4by4Wall=4;width4by4Wall=4};document.getElementById('total13').innerHTML=total4by4Area;document.getElementById('total13').value=total4by4Area;document.getElementById('total13w').innerHTML=total4by4Wall;document.getElementById('total13w').value=total4by4Wall;document.getElementById('lenght4by4Area').value=lenght4by4Area;document.getElementById('width4by4Area').value=width4by4Area;document.getElementById('lenght4by4Wall').value=lenght4by4Wall;document.getElementById('width4by4Wall').value=width4by4Wall;costs(total4by4Area,costJRSF4,'cost13');costs(total4by4Wall,costJRSF4,'cost13w');document.getElementById('totalSM').innerHTML=wallSM;document.getElementById('totalSM').value=wallSM;document.getElementById('wyniki').style.visibility="visible"}else{alert('Please convert your dimensions to feet and inches')}}function costs(total,price,id){var cost=addCommas((total*price).toFixed(2));document.getElementById(id).innerHTML='$'+cost+'';document.getElementById(id).value=cost}function countBoxes(totalArea,totalWall,pieces,thick1piece,weight1p,weight25p,widthTotal,heightTotal,thickTotal,costArea,costWall,sqft1,position,sqftOnePice,thickOnePiece,price,name,ident,header){if(document.getElementById(totalArea).value==0||document.getElementById(totalWall).value==0){}else{var html=null;var lenghtArea=document.getElementById('lenghtArea').value;var widthArea=document.getElementById('widthArea').value;var lenghtWall=document.getElementById('lenghtWall').value;var widthWall=document.getElementById('widthWall').value;if(ident==0){var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var lenghtArea=document.getElementById('lenghtArea').value;var widthArea=document.getElementById('widthArea').value;var lenghtWall=document.getElementById('lenghtWall').value;var widthWall=document.getElementById('widthWall').value;if(a==1){var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">0 Corners + 0 Borders + '+a+' Inside = &nbsp;'+a+' Piece</span></div>'}else{var corner=4;var borderArea=document.getElementById('borderArea').value;var insideArea=document.getElementById('insideArea').value;var borderWall=document.getElementById('borderWall').value;var insideWall=document.getElementById('insideWall').value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderArea+' Borders + '+insideArea+' Insides = &nbsp;'+a+' Pieces</span></div>'}if(b==1){var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Inside</span></div>'}else{var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Insides</span></div>'}}else if(ident==2){var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a/4+' Sets of 4 x 1\' x 1\' x 5/8 \" </span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b/4+' Sets of 4 x 1\' x 1\' x 5/8 \"</span></div>'}else{var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;if(a==1)var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a+' Inside with detachable Corner & Border pieces</span></div>';else var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a+' Insides with detachable Corner & Border pieces</span></div>';if(b==1)var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Inside with detachable Corner & Border pieces</span></div>';else var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Insides with detachable Corner & Border pieces</span></div>'}var totalArea=document.getElementById(totalArea).value;var costArea=document.getElementById(costArea).value;var totalWall=document.getElementById(totalWall).value;var costWall=document.getElementById(costWall).value;var sqftArea=Math.round(totalArea*sqft1);var sqftWall=Math.round(totalWall*sqft1);var count=0;var count1=0;var totalWeightArea=0;var totalWeightWall=0;var masterCartonArea=Math.floor(totalArea/pieces);var partialCartonArea=totalArea-pieces*masterCartonArea;var masterCartonWall=Math.floor(totalWall/pieces);var partialCartonWall=totalWall-pieces*masterCartonWall;if(partialCartonArea!=0&&partialCartonWall!=0){if(totalArea<=25){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div class="leftColumn"  style="float:left; margin-bottom:72px; margin-top: 6px; width:440px; " >'}else{var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div class="leftColumn"  style="float:left;  margin-bottom:72px; width:440px; margin-top: 6px;" >'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}totalWeightArea+=(count-1)*weight25p;if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';if(totalWall<25){html+='<div class="rightColumn" style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;" >'}else{html+='<div class="rightColumn" style="float:left;  margin-bottom:72px; width:440px; margin-top: 6px;" >'}html+='<div style="margin-bottom: 4px; width:100px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea!=0&&partialCartonWall==0){if(totalWall<=25){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px;  width:440px; margin-top: 6px;">'}else{var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px;  width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(thickTotal);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}totalWeightArea+=(count-1)*weight25p;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';if(totalWall<=25){html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall!=0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px;  width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall==0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left;  margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left;  margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}return html}}function countBoxes4(totalArea,totalWall,pieces,thick1piece,weight1p,weight25p,widthTotal,heightTotal,thickTotal,costArea,costWall,sqft1,position,sqftOnePice,thickOnePiece,price,name,ident,header){if(document.getElementById(totalArea).value==0||document.getElementById(totalWall).value==0){}else{var lenghtArea=document.getElementById('lenght4by4Area').value;var widthArea=document.getElementById('width4by4Area').value;var lenghtWall=document.getElementById('lenght4by4Wall').value;var widthWall=document.getElementById('width4by4Wall').value;if(ident==0){var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var lenghtArea=document.getElementById('lenghtArea').value;var widthArea=document.getElementById('widthArea').value;var lenghtWall=document.getElementById('lenghtWall').value;var widthWall=document.getElementById('widthWall').value;var corner=4;var borderArea=document.getElementById('borderArea').value;var insideArea=document.getElementById('insideArea').value;var borderWall=document.getElementById('borderWall').value;var insideWall=document.getElementById('insideWall').value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderArea+' Borders + '+insideArea+' Insides = &nbsp;'+a+' Pieces</span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderWall+' Borders + '+insideWall+' Insides = &nbsp;'+b+' Pieces</span></div>'}else{var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a+' Insides with detachable Corner & Border pieces</span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Insides with detachable Corner & Border pieces</span></div>'}var totalArea=document.getElementById(totalArea).value;var costArea=document.getElementById(costArea).value;var totalWall=document.getElementById(totalWall).value;var costWall=document.getElementById(costWall).value;var sqftArea=Math.round(totalArea*sqft1);var sqftWall=Math.round(totalWall*sqft1);var count=0;var count1=0;var totalWeightArea=0;var totalWeightWall=0;var masterCartonArea=Math.floor(totalArea/pieces);var partialCartonArea=totalArea-pieces*masterCartonArea;var masterCartonWall=Math.floor(totalWall/pieces);var partialCartonWall=totalWall-pieces*masterCartonWall;if(partialCartonArea!=0&&partialCartonWall!=0){if(totalArea<10){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}totalWeightArea+=(count-1)*weight25p;if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';if(totalWall<10){html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea!=0&&partialCartonWall==0){if(totalWall<=10){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(thickTotal);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}totalWeightArea+=(count-1)*weight25p;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';if(totalWall<=10){html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 4px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall!=0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\" &nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall==0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}return html}}function countBoxes1(totalArea,totalWall,pieces,thick1piece,weight1p,weight25p,widthTotal,heightTotal,thickTotal,costArea,costWall,sqft1,position,sqftOnePice,thickOnePiece,price,name,ident,header){if(document.getElementById(totalArea).value==0||document.getElementById(totalWall).value==0){}else{var lenghtArea=document.getElementById('lenght1mby1mArea').value;var widthArea=document.getElementById('width1mby1mArea').value;var lenghtWall=document.getElementById('lenght1mby1mWall').value;var widthWall=document.getElementById('width1mby1mWall').value;var lenghtAreaFeet=Math.floor(lenghtArea);var lenghtAreaInch=((lenghtArea-lenghtAreaFeet)*12).toFixed(0);var widthAreaFeet=Math.floor(widthArea);var widthAreaInch=((widthArea-widthAreaFeet)*12).toFixed(0);var lenghtWallFeet=Math.floor(lenghtWall);var lenghtWallInch=((lenghtWall-lenghtWallFeet)*12).toFixed(0);var widthWallFeet=Math.floor(widthWall);var widthWallInch=((widthWall-widthWallFeet)*12).toFixed(0);if(ident==0){var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var lenghtArea=document.getElementById('lenghtArea').value;var widthArea=document.getElementById('widthArea').value;var lenghtWall=document.getElementById('lenghtWall').value;var widthWall=document.getElementById('widthWall').value;var corner=4;var borderArea=document.getElementById('borderArea').value;var insideArea=document.getElementById('insideArea').value;var borderWall=document.getElementById('borderWall').value;var insideWall=document.getElementById('insideWall').value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderArea+' Borders + '+insideArea+' Insides = &nbsp;'+a+' Pieces</span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderWall+' Borders + '+insideWall+' Insides = &nbsp;'+b+' Pieces</span></div>'}else{var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a+' Insides with detachable Corner & Border pieces</span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Insides with detachable Corner & Border pieces</span></div>'}var totalArea=document.getElementById(totalArea).value;var costArea=document.getElementById(costArea).value;var totalWall=document.getElementById(totalWall).value;var costWall=document.getElementById(costWall).value;var sqftArea=Math.round(totalArea*sqft1);var sqftWall=Math.round(totalWall*sqft1);var count=0;var count1=0;var totalWeightArea=0;var totalWeightWall=0;var masterCartonArea=Math.floor(totalArea/pieces);var partialCartonArea=totalArea-pieces*masterCartonArea;var masterCartonWall=Math.floor(totalWall/pieces);var partialCartonWall=totalWall-pieces*masterCartonWall;if(partialCartonArea!=0&&partialCartonWall!=0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtAreaFeet+'\' '+lenghtAreaInch+'\" x '+widthAreaFeet+'\' '+widthAreaInch+'\" = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}totalWeightArea+=(count-1)*weight25p;if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWallFeet+'\' '+lenghtWallInch+'\" x '+widthWallFeet+'\' '+widthWallInch+'\" = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea!=0&&partialCartonWall==0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtAreaFeet+'\' '+lenghtAreaInch+'\" x '+widthAreaFeet+'\' '+widthAreaInch+'\" = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(thickTotal);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}totalWeightArea+=(count-1)*weight25p;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</span></div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWallFeet+'\' '+lenghtWallInch+'\" x '+widthWallFeet+'\' '+widthWallInch+'\" = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</div>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</span>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall!=0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtAreaFeet+'\' '+lenghtAreaInch+'\" x '+widthAreaFeet+'\' '+widthAreaInch+'\" = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 9px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWallFeet+'\' '+lenghtWallInch+'\" x '+widthWallFeet+'\' '+widthWallInch+'\" = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall==0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtAreaFeet+'\' '+lenghtAreaInch+'\" x '+widthAreaFeet+'\' '+widthAreaInch+'\" = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 9px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWallFeet+'\' '+lenghtWallInch+'\" x '+widthWallFeet+'\' '+widthWallInch+'\" = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\" &nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\" &nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}return html}}function playLearn(totalArea,totalWall,header,cost1310,cost1311){if(document.getElementById(totalArea).value==0||document.getElementById(totalWall).value==0){}else{var lenghtArea=document.getElementById('lenghtPLArea').value;var widthArea=document.getElementById('widthPLArea').value;var lenghtWall=document.getElementById('lenghtPLWall').value;var widthWall=document.getElementById('widthPLWall').value;var lenght1310=26;var width1310=15;var height1310=14;var weight1310=13;var lenght1311=26;var width1311=25;var height1311=14;var weight1311=24;var position='0px';var area=document.getElementById(totalArea).value;var wall=document.getElementById(totalWall).value;var edgesArea=2*lenghtArea+2*widthArea;var edgesWall=2*lenghtWall+2*widthWall;var cost1310=new Number(cost1310);var cost1311=new Number(cost1311);var moreBoxesArea='';var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';if(area<=36){if(area<36){var extraPiecesArea=36-area;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1310 = '+36+' total pieces minus '+area+' needed pieces = '+extraPiecesArea+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1310 = '+36+' total pieces</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';var costArea=cost1310;var commentArea='($'+cost1310+' per set of style 1310)';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'</span>&nbsp;&nbsp;&nbsp;'+commentArea+'</div>';var boxArea='1 of 1&nbsp;&nbsp;&nbsp; 36 pieces&nbsp;&nbsp;&nbsp; 26\" x 15\" x 14\"&nbsp;&nbsp;&nbsp;13lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';var totalA='<span class="popTextRed">1 box</span>&nbsp;&nbsp;&nbsp;36 pieces&nbsp;&nbsp;&nbsp;13lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>';if(area<36){}}else if(area>36&&area<72||area==72){var costArea=cost1311;var commentArea='($'+cost1311+' per set of style 1311)';var boxArea='1 of 1&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalA='<span class="popTextRed">1 box&nbsp;&nbsp;&nbsp;</span>72 pieces&nbsp;&nbsp;&nbsp;24lbs';if(area==72){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1311 = 72 total pieces</span></div>'}else if(area>36&&area<72){var extraPiecesArea=72-area;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1311 = '+72+' total pieces minus '+area+' needed pieces = '+extraPiecesArea+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'&nbsp;&nbsp;&nbsp;</span>'+commentArea+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>';if(area>36&&area<72){}}else if(area>72){var setArea=Math.floor(area/72);var difArea=area-72*setArea;if(setArea==1){var set='Set'}else{var set='Sets'}if(difArea<=36&&difArea!=0){var totalSet=setArea*72+36;var extraPieces=totalSet-area;var totalBoxArea=setArea+1;var totalWeight=weight1311*setArea+weight1310;var costArea=addCommas((setArea*cost1311+cost1310).toFixed(2));var commentArea='($'+cost1310+' per set of style 1310 and $'+cost1311+' per set of style 1311)';var boxArea='1 of '+totalBoxArea+'&nbsp;&nbsp;&nbsp;36 pieces&nbsp;&nbsp;&nbsp; 26\" x 15\" x 14\"&nbsp;&nbsp;&nbsp;13lbs';var moreBoxesArea='2 to '+totalBoxArea+'&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalA='<span class="popTextRed">'+totalBoxArea+' boxes</span>&nbsp;&nbsp;&nbsp;'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+'lbs';if(difArea==36){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine 1 Set of Style 1310 + '+setArea+' '+set+' of Style 1311 = '+totalSet+' total pieces</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine 1 Set of Style 1310 + '+setArea+' '+set+' of Style 1311 = '+totalSet+' total pieces minus '+area+' needed pieces = '+extraPieces+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'&nbsp;&nbsp;&nbsp;</span> '+commentArea+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';html+='<div class="leftSide"><span class="popTextBlack">'+moreBoxesArea+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>';if(difArea!=36){}}else if(difArea==0){var totalSet=setArea*72;var extraPieces=totalSet-area;var costArea=addCommas((setArea*cost1311).toFixed(2));var totalWeight=weight1311*setArea;var commentArea='($'+cost1311+' per set of style 1311)';var boxArea='1 to '+setArea+'&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalA='<span class="popTextRed">'+setArea+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+'lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine '+setArea+' '+set+' of Style 1311 = '+totalSet+' total pieces</span></span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'&nbsp;&nbsp;&nbsp;</span> '+commentArea+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>'}else if(difArea>36){setArea+=1;var totalSet=setArea*72;var costArea=addCommas((setArea*cost1311).toFixed(2));var commentArea='($'+cost1311+' per set of style 1311)';var totalWeight=weight1311*setArea;var extraPieces=totalSet-area;var totalA='<span class="popTextRed">'+setArea+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+' lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine '+setArea+' Sets of Style 1311 = '+totalSet+' total pieces minus '+area+' needed pieces = '+extraPieces+' extra pieces which can be used for cubes, names, walls, etc.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'&nbsp;&nbsp;&nbsp;</span>'+commentArea+'</div>';var boxArea='1 to '+setArea+'&nbsp;&nbsp;&nbsp; 72 Pieces&nbsp;&nbsp;&nbsp; 26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp; 24lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>'}}html+='<div style="padding-top:20px; margin-bottom:20px; margin-left:-5px;"><img id="closeButtonEnd" onMouseOver="closeBlue(this);" OnMouseOut="closeGrey(this);" name="close" src="http://www.alessco.com/images/closeButton.png" border="0" onClick="javascript:window.close(self);" /></div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 9px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';if(wall<=36){if(wall<36){var extraPiecesWall=36-wall;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1310 = '+36+' total pieces minus '+wall+' needed pieces = '+extraPiecesWall+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1310 = '+36+' total pieces</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';var costWall=cost1310;var commentWall='($'+cost1310+' per set of style 1310)';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';var boxWall='1 of 1&nbsp;&nbsp;&nbsp;36 pieces&nbsp;&nbsp;&nbsp;26\" x 15\" x 14\"&nbsp;&nbsp;&nbsp;13lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';var totalW='<span class="popTextRed">1 box&nbsp;&nbsp;&nbsp;</span>36 pieces&nbsp;&nbsp;&nbsp;13lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>';if(wall<36){}}else if(wall>36&&wall<72||wall==72){var costWall=cost1311;var commentWall='($'+cost1311+' per set of style 1311)';var boxWall='1 of 1&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalW='<span class="popTextRed">1 box&nbsp;&nbsp;&nbsp;</span>72 pieces&nbsp;&nbsp;&nbsp;24lbs';if(wall==72){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1311 = 72 total pieces</span></div>'}else if(wall>36&&wall<72){var extraPiecesWall=72-wall;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1311 = '+72+' total pieces minus '+wall+' needed pieces = '+extraPiecesWall+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>';if(wall>36&&wall<72){}}else if(wall>72){var setWall=Math.floor(wall/72);var difWall=wall-72*setWall;if(setWall==1){var set='Set'}else{var set='Sets'}if(difWall<=36&&difWall!=0){var totalSet=setWall*72+36;var extraPieces=totalSet-wall;var totalBoxWall=setWall+1;var totalWeight=weight1311*setWall+weight1310;var costWall=addCommas((setWall*cost1311+cost1310).toFixed(2));var commentWall='($'+cost1310+' per set of style 1310 and $'+cost1311+' per set of style 1311)';var boxWall='1 of '+totalBoxWall+'&nbsp;&nbsp;&nbsp;36 pieces&nbsp;&nbsp;&nbsp;26\" x 15\" x 14\"&nbsp;&nbsp;&nbsp;13lbs';var moreBoxesWall='2 to '+totalBoxWall+'&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalW='<span class="popTextRed">'+totalBoxWall+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+'lbs';if(difWall==36){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine 1 Set of Style 1310 + '+setWall+' '+set+' of Style 1311 = '+totalSet+' total pieces</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine 1 Set of Style 1310 + '+setWall+' '+set+' of Style 1311 = '+totalSet+' total pieces minus '+wall+' needed pieces = '+extraPieces+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';html+='<div class="leftSide"><span class="popTextBlack">'+moreBoxesWall+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>';if(difWall!=36){}}else if(difWall==0){var totalSet=setWall*72;var extraPieces=totalSet-wall;var costWall=addCommas((setWall*cost1311).toFixed(2));var totalWeight=weight1311*setWall;var commentWall='($'+cost1311+' per set of style 1311)';var boxWall='1 to '+setWall+'&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalW='<span class="popTextRed">'+setWall+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+'lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine '+setWall+' '+set+' of Style 1311 = '+totalSet+' total pieces</span></span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>'}else if(difWall>36){setWall+=1;var totalSet=setWall*72;var costWall=addCommas((setWall*cost1311).toFixed(2));var commentWall='($'+cost1311+' per set of style 1311)';var totalWeight=weight1311*setWall;var extraPieces=totalSet-wall;var totalW='<span class="popTextRed">'+setWall+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+' lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine '+setWall+' Sets of Style 1311 = '+totalSet+' total pieces minus '+wall+' needed pieces = '+extraPieces+' extra pieces which can be used for cubes, names, walls, etc.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';var boxWall='1 to '+setWall+'&nbsp;&nbsp;&nbsp; 72 Pieces&nbsp;&nbsp;&nbsp; 26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp; 24lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>'}}html+='</div>';return html}}function countBoxesMats(position,header,costSM,totalSM){var totalSM=document.getElementById(totalSM).value;var totalCostSM=(costSM*totalSM).toFixed(2);var html='<img name="oo" style="margin-bottom: 6px;" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" />';html+='<div style="margin-bottom: 75px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/mats.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide" style="padding-bottom:-26px;"><span class="popTextRed">'+totalSM+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+totalCostSM+'&nbsp;&nbsp;&nbsp;</span>($'+costSM+' per piece)</div>';if(totalSM==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of 1&nbsp;&nbsp;&nbsp;1 piece &nbsp;&nbsp;49\" x 7\" x 7\" &nbsp;&nbsp;6 lbs</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">1 box&nbsp;&nbsp;&nbsp;1 piece &nbsp;&nbsp;6 lbs</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 to '+totalSM+'&nbsp;&nbsp;&nbsp;1 piece &nbsp;&nbsp;49\" x 7\" x 7\" &nbsp;&nbsp;6 lbs</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalSM+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSM+' pieces&nbsp;&nbsp;&nbsp;'+totalSM*6+' lbs</div>'}html+='</div>';return html}function SoftFlooringCalculator(theDiv,style,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){if(style=='1A'||style=='1a'){var html='<div ><div id="form1A" style="position:relative; padding:0; margin:0;" height:40px; width:528px;><img src="http://www.alessco.com/images/CalcLayout1A.png"/>';html+='<div style="position:absolute; top:10px; left:309px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:349px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:408px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:448px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="1" /></div>';html+='<div style="position:absolute; top:4px; left:484px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'1A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="1"></div>';html+='</div></div>'}else if(style=='1B'||style=='1b'){var html='<div><div id="form1B" style="position:relative; padding:0; margin:0;" height:40px; width:528px;><img src="http://www.alessco.com/images/CalcLayout1B.png"/>';html+='<div style="position:absolute; top:10px; left:309px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:349px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:408px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:448px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="2" /></div>';html+='<div style="position:absolute; top: 4px; left:484px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'1B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="2"></div>';html+='</div></div>'}else if(style=='2A'||style=='2a'){var html='<div><div id="form2A" style="position:relative; padding:0; margin:0;" height:59px; width:303px;><img src="http://www.alessco.com/images/CalcLayout2A.png"/>';html+='<div style="position:absolute; top:30px; left: 39px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left: 79px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left:138px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left:178px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="3" /></div>';html+='<div style="position:absolute; top:24px; left:230px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'2A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="3"></div>';html+='</div></div>'}else if(style=='2B'||style=='2b'){var html='<div><div id="form2A" style="position:relative; padding:0; margin:0;" height:59px; width:303px;><img src="http://www.alessco.com/images/CalcLayout2B.png"/>';html+='<div style="position:absolute; top:30px; left: 39px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="4" /></div>';html+='<div style="position:absolute; top:30px; left: 79px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="4" /></div>';html+='<div style="position:absolute; top:30px; left:138px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="4" /></div>';html+='<div style="position:absolute; top:30px; left:178px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="4" /></div>';html+='<div style="position:absolute; top:24px; left:230px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'2B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="4"></div>';html+='</div></div>'}else if(style=='3A'||style=='3a'){var html='<div><div id="form3A" style="position:relative; padding:0; margin:0;" height:136px; width:136px;><img src="http://www.alessco.com/images/CalcLayout3A.png"/>';html+='<div style="position:absolute; top: 78px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="5" /></div>';html+='<div style="position:absolute; top: 78px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="5" /></div>';html+='<div style="position:absolute; top:103px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="5" /></div>';html+='<div style="position:absolute; top:103px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="5" /></div>';html+='<div style="position:absolute; top: 97px; left:88px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'3A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="5"></div>';html+='</div></div>'}else if(style=='3B'||style=='3b'){var html='<div><div id="form3B" style="position:relative; padding:0; margin:0;" height:136px; width:136px;><img src="http://www.alessco.com/images/CalcLayout3B.png"/>';html+='<div style="position:absolute; top: 78px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="6" /></div>';html+='<div style="position:absolute; top: 78px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="6" /></div>';html+='<div style="position:absolute; top:103px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="6" /></div>';html+='<div style="position:absolute; top:103px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="6" /></div>';html+='<div style="position:absolute; top: 97px; left:88px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'3B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="6"></div>';html+='</div></div>'}else if(style=='4A'||style=='4a'){var html='<div><div id="form4A" style="position:relative; padding:0; margin:0; height:154px; width:154px;"><img src="http://www.alessco.com/images/CalcLayout4A.png"/>';html+='<div style="position:absolute; top: 87px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="7" /></div>';html+='<div style="position:absolute; top: 87px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="7" /></div>';html+='<div style="position:absolute; top:112px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="7" /></div>';html+='<div style="position:absolute; top:112px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="7" /></div>';html+='<div style="position:absolute; top:106px; left:97px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'4A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="7"></div>';html+='</div></div>'}else if(style=='4B'||style=='4b'){var html='<div><div id="form4B" style="position:relative; padding:0; margin:0; height:154px; width:154px;"><img src="http://www.alessco.com/images/CalcLayout4B.png"/>';html+='<div style="position:absolute; top: 87px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="8" /></div>';html+='<div style="position:absolute; top: 87px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="8" /></div>';html+='<div style="position:absolute; top:112px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="8" /></div>';html+='<div style="position:absolute; top:112px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="8" /></div>';html+='<div style="position:absolute; top:106px; left:97px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="newWindow(this,\'4B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="8"></div>';html+='</div></div>'}else if(style=='5A'){var html='<div><div id="form" style="padding: 4px 0px 0px 0px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 0px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input class="dim" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input class="dim" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit" onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="newWindow(\'5A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="5">        </td>';html+='</tr>';html+='<tr>';html+='<td style="padding: 0px 0px 0px 0px;" colspan="11">';html+='<a href="http://www.alessco.com/OrderForm"><img border="0" id="buttonLink1" src="http://www.alessco.com/images/buttonOrderHere.gif" onMouseOver="orderHereButtonBlue(\'1\');" onMouseOut="orderHereButtonGrey(\'1\');" /></a>';html+='</td>';html+=' </tr>';html+='</table>';html+='</div></div>'}else if(style=='5B'){var html='<div><div id="form" style="padding: 4px 0px 0px 0px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 0px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/dealers/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit" onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="newWindow(\'5B\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="5">        </td>';html+='</tr>';html+='</table>';html+='</div></div>'}else if(style=='5C'){var html='<div><div id="form" style="padding: 4px 0px 0px 0px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 32px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="0" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input class="dim" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="0" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="0" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input class="dim" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="0" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit" onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="newWindow(\'5A\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+');" tabindex="5">        </td>';html+='</tr>';html+='<tr>';html+='<td style="padding: 24px 0px 0px 32px;" colspan="11">';html+='<a href="http://www.softfloor.com/OrderForm"><img border="0" id="buttonLink1" src="http://www.alessco.com/images/buttonOrderHere.gif" onMouseOver="orderHereButtonBlue(\'1\');" onMouseOut="orderHereButtonGrey(\'1\');" /></a>';html+='</td>';html+=' </tr>';html+='</table>';html+='</div></div>'}document.getElementById(theDiv).innerHTML=html}function creatediv(id){var newdiv=document.createElement('div');newdiv.setAttribute('id',id);newdiv.style.visibility="hidden";newdiv.style.height="0px";newdiv.value=0;document.body.appendChild(newdiv)}var allHTMLTags=new Array();function getElementByClass(theClass){var allHTMLTags=myWindow.document.getElementsByTagName("*");for(i=0;i<allHTMLTags.length;i++){if(allHTMLTags[i].className==theClass){allHTMLTags[i].style.fontSize='16px';allHTMLTags[i].style.fontFamily='"Arial Narrow", Arial, Helvetica';if(theClass=='popTextRed'){allHTMLTags[i].style.color='#990000';allHTMLTags[i].style.fontWeight='bold'}else if(theClass=='popTextBlack'){allHTMLTags[i].style.color='#000'}else if(theClass=='rightSide'){allHTMLTags[i].style.width='130px';allHTMLTags[i].style.position='absolute';allHTMLTags[i].style.height='14px'}else if(theClass=='leftSide'){allHTMLTags[i].style.position='relative';allHTMLTags[i].style.left='109px';allHTMLTags[i].style.width='320px'}}}}function resultsTest(lenFeet,lenInches,widFeet,widInches,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){creatediv('total1');creatediv('cost1');creatediv('total1w');creatediv('cost1w');creatediv('borderArea');creatediv('insideArea');creatediv('borderWall');creatediv('insideWall');creatediv('lenghtArea');creatediv('widthArea');creatediv('lenghtWall');creatediv('widthWall');creatediv('total2');creatediv('cost2');creatediv('total2w');creatediv('cost2w');creatediv('total3');creatediv('cost3');creatediv('total3w');creatediv('cost3w');creatediv('total4');creatediv('cost4');creatediv('total4w');creatediv('cost4w');creatediv('lenghtPLArea');creatediv('widthPLArea');creatediv('lenghtPLWall');creatediv('widthPLWall');creatediv('total5');creatediv('cost5');creatediv('total5w');creatediv('cost5w');creatediv('total6');creatediv('cost6');creatediv('total6w');creatediv('cost6w');creatediv('total7');creatediv('cost7');creatediv('total7w');creatediv('cost7w');creatediv('total8');creatediv('cost8');creatediv('total8w');creatediv('cost8w');creatediv('total9');creatediv('cost9');creatediv('total9w');creatediv('cost9w');creatediv('total10');creatediv('cost10');creatediv('total10w');creatediv('cost10w');creatediv('total11');creatediv('cost11');creatediv('total11w');creatediv('cost11w');creatediv('total12');creatediv('cost12');creatediv('total12w');creatediv('cost12w');creatediv('lenght1mby1mArea');creatediv('width1mby1mArea');creatediv('lenght1mby1mWall');creatediv('width1mby1mWall');creatediv('total13');creatediv('cost13');creatediv('total13w');creatediv('cost13w');creatediv('lenght4by4Area');creatediv('width4by4Area');creatediv('lenght4by4Wall');creatediv('width4by4Wall');creatediv('totalSM');creatediv('calSM');creatediv('wyniki');creatediv('boxes');countPieces(lenFeet,lenInches,widFeet,widInches,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM);var total1=document.getElementById('total1');var total1w=document.getElementById('total1w');var cost1=document.getElementById('cost1');var cost1w=document.getElementById('cost1w');var total6=document.getElementById('total6');var total6w=document.getElementById('total6w');var cost6=document.getElementById('cost6');var cost6w=document.getElementById('cost6w');var total5=document.getElementById('total5');var total5w=document.getElementById('total5w');var cost5=document.getElementById('cost5');var cost5w=document.getElementById('cost5w');var total2=document.getElementById('total2');var total2w=document.getElementById('total2w');var cost2=document.getElementById('cost2');var cost2w=document.getElementById('cost2w');var total3=document.getElementById('total3');var total3w=document.getElementById('total3w');var cost3=document.getElementById('cost3');var cost3w=document.getElementById('cost3w');var total7=document.getElementById('total7');var total7w=document.getElementById('total7w');var cost7=document.getElementById('cost7');var cost7w=document.getElementById('cost7w');var total8=document.getElementById('total8');var total8w=document.getElementById('total8w');var cost8=document.getElementById('cost8');var cost8w=document.getElementById('cost8w');var total9=document.getElementById('total9');var total9w=document.getElementById('total9w');var cost9=document.getElementById('cost9');var cost9w=document.getElementById('cost9w');var total10=document.getElementById('total10');var total10w=document.getElementById('total10w');var cost10=document.getElementById('cost10');var cost10w=document.getElementById('cost10w');var total11=document.getElementById('total11');var total11w=document.getElementById('total11w');var cost11=document.getElementById('cost11');var cost11w=document.getElementById('cost11w');var total12=document.getElementById('total12');var total12w=document.getElementById('total12w');var cost12=document.getElementById('cost12');var cost12w=document.getElementById('cost12w');var total13=document.getElementById('total13');var total13w=document.getElementById('total13w');var cost13=document.getElementById('cost13');var cost13w=document.getElementById('cost13w');var total4=document.getElementById('total4');var total4w=document.getElementById('total4w');var cost4=document.getElementById('cost4');var cost4w=document.getElementById('cost4w');var totalSM=document.getElementById('totalSM');var html='<div style="margin-bottom:36px; "><img id="closeButton" onMouseOver="closeBlue(this);" OnMouseOut="closeGrey(this);" name="close" src="http://www.alessco.com/images/closeButton.png" border="0" onClick="javascript:window.close(self);" /></div>';html+='<div style="margin-bottom:66px; margin-left:-5px;"><img id="mainTitleImage" src="http://www.alessco.com/images/CalculatorTitle_0_Over.jpg" onMouseOver="this.src=\'http://www.alessco.com/images/CalculatorTitle_0.jpg\'" onMouseOut="this.src=\'http://www.alessco.com/images/CalculatorTitle_0_Over.jpg\'" border="0" /></div>';html+=countBoxes('total1','total1w','25','0.64','1.28','32','26','26','16','cost1','cost1w','4','50px','2','5/8',costSF/4,'SoftFloors','0','1');html+=countBoxes('total2','total2w','24','0.50','0.92','22','26','26','12','cost2','cost2w','4','139px','2','1/2',costERSF1/4,'Economy Reversible SoftFloors','1','2');html+=countBoxes('total5','total5w','25','0.64','1.28','32','26','26','16','cost5','cost5w','4','413px','2','5/8',costSW/4,'SoftWoods','1','5');html+=countBoxes('total6','total6w','25','0.64','1.76','44','26','26','16','cost6','cost6w','4','504px','2','5/8',costSC/4,'SoftCarpets','1','6');html+=countBoxes('total7','total7w','25','0.64','1.76','44','27','27','16','cost7','cost7w','4','596px','2','5/8',costESC/4,'Economy SoftCarpets','1','7');html+=countBoxes('total8','total8w','20','0.40','2.10','42','26','26','8','cost8','cost8w','4','685px','2','3/8',costST/4,'SoftTuff','1','8');html+=countBoxes('total9','total9w','12','0.92','4.50','54','27','27','11','cost9','cost9w','4','776px','2','3/4',costSR/4,'SoftRubber','1','9');html+=countBoxes('total10','total10w','25','0.92','1.88','47','26','26','23','cost10','cost10w','4','867px','2','7/8',costJRSF2/4,'Jumbo Reversible SoftFloors','1','10');html+=countBoxes('total11','total11w','25','1.04','2.32','58','26','26','26','cost11','cost11w','4','956px','2','1',costJRSF2by1/4,'Jumbo Reversible SoftFloors','1','11');html+=countBoxes1('total12','total12w','10','0.90','5.40','54','42','41','9','cost12','cost12w','11.34','1050px','1m','7/8',costJRSF1mby1m/11.34,'Jumbo Reversible SoftFloors','1','12');html+=countBoxes4('total13','total13w','10','1.10','9','90','51','50','11','cost13','cost13w','16','1141px','4','1',costJRSF4/16,'Jumbo Reversible SoftFloors','1','13');html+=countBoxesMats('1321px','14',costSM,'totalSM');html+=countBoxes('total3','total3w','24','0.50','0.92','22','26','26','12','cost3','cost3w','4','229px','2','1/2',costERSF2/4,'Economy Reversible SoftFloors','1','3');html+=playLearn('total4','total4w','4',costPL1310,costPL1311);return html}function results(id,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){var text=/^\d+$/;var lF=document.getElementById('alesscoLenghtFeet').value;var lI=document.getElementById('alesscoLenghtInches').value;var wF=document.getElementById('alesscoWidthFeet').value;var wI=document.getElementById('alesscoWidthInches').value;if(text.test(lF)&&text.test(lI)&&text.test(wF)&&text.test(wI)){if(lF==0||wF==0||lI>=12||wI>=12){alert('Please convert your dimensions to feet and inches')}else{document.getElementById(id).innerHTML=resultsTest(lF,lI,wF,wI,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM)}}else alert('Please convert your dimensions to feet and inches')}function newWindow(thisForm,style,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){x=thisForm.parentNode.parentNode.childNodes;for(i=1;i<x.length;i++){if(i==1){var lF=x[i].firstChild.value}if(i==2){var lI=x[i].firstChild.value}if(i==3){var wF=x[i].firstChild.value}if(i==4){var wI=x[i].firstChild.value}}var text=/^\d+$/;if(text.test(lF)&&text.test(lI)&&text.test(wF)&&text.test(wI)){if(lF==0||wF==0||lI>=12||wI>=12){alert('Please convert your dimensions to feet and inches')}else{myWindow=window.open('','','width=1000,height=800,scrollbars=yes');var lenFeet=lF;var lenInches=lI;var widFeet=wF;var widInches=wI;var html='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html" charset="UTF-8" /><title>SoftFlooring Calculator&trade;</title><link rel="stylesheet" href="http://www.alessco.com/cal/testStyle.css" type="text/css" /><script type="text/javascript" src="http://www.alessco.com/softFlooringCalculator/softFlooringCalculator.js"></script></head><body style="padding:auto;">';html+='<div id="newWindowBox" style="width:900px;"><div id="SoftFlooringCalculator" >';if(style=='1A'||style=='1a'){html+='<div id="form1A" height="40px" style="position:relative;  margin-bottom: 18px;"><img style="margin-bottom:18px;" src="http://www.alessco.com/images/CalcLayout1A.png"/>';html+='<div style="position:absolute; top:10px; left:309px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:349px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:408px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:10px; left:448px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:4px; left:484px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></td>';html+='</div>'}else if(style=='1B'||style=='1b'){html+='<div id="form1B" height="40px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="margin-bottom:18px;" src="http://www.alessco.com/images/CalcLayout1B.png"/>';html+='<div style="position:absolute; top:10px; left:309px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top:10px; left:349px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:10px; left:408px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:10px; left:448px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px;  border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top: 4px; left:484px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></td>';html+='</div>'}else if(style=='2A'||style=='2a'){html+='<div id="form2A" height="59px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="margin-bottom:18px;" src="http://www.alessco.com/images/CalcLayout2A.png"/>';html+='<div style="position:absolute; top:30px; left: 39px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top:30px; left: 79px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:30px; left:138px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left:178px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:24px; left:230px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></td>';html+='</div>'}else if(style=='2B'||style=='2b'){html+='<div id="form2A" height="59px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="margin-bottom:18px;" src="http://www.alessco.com/images/CalcLayout2B.png"/>';html+='<div style="position:absolute; top:30px; left: 39px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top:30px; left: 79px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:30px; left:138px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:30px; left:178px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:24px; left:230px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></td>';html+='</div>'}else if(style=='3A'||style=='3a'){html+='<div id="form3A" height="136px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="" src="http://www.alessco.com/images/CalcLayout3A.png"/>';html+='<div style="position:absolute; top: 78px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top: 78px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:103px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:103px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top: 97px; left:88px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></div>';html+='</div>'}else if(style=='3B'||style=='3b'){html+='<div id="form3B" height="136px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="" src="http://www.alessco.com/images/CalcLayout3B.png"/>';html+='<div style="position:absolute; top: 78px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top: 78px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:103px; left:15px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:103px; left:53px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top: 97px; left:88px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></div>';html+='</div>'}else if(style=='4A'||style=='4a'){html+='<div id="form4A" height="154px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="" src="http://www.alessco.com/images/CalcLayout4A.png"/>';html+='<div style="position:absolute; top: 87px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top: 87px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:112px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:112px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:106px; left:97px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></div>';html+='</div>'}else if(style=='4B'||style=='4b'){html+='<div id="form4B" height="154px" style="position:relative; padding:0; margin-bottom: 18px;"><img style="" src="http://www.alessco.com/images/CalcLayout4B.png"/>';html+='<div style="position:absolute; top: 87px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1" /></div>';html+='<div style="position:absolute; top: 87px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2" /></div>';html+='<div style="position:absolute; top:112px; left:24px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3" /></div>';html+='<div style="position:absolute; top:112px; left:62px; line-height:14px; padding:0; margin:0;"><input class="dim" style="font-family: \'Arial Narrow\', Arial, Helvetica; width:24px; border: 0px; font-size: 14px; color: #6e6e6e; text-align: center; " id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4" /></div>';html+='<div style="position:absolute; top:106px; left:97px; line-height:14px; padding:0; margin:0;"><input id="goButton" type="image" src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png" value="Submit" onMouseOver="goButtonOver(this);" onMouseOut="goButtonOut(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5"></div>';html+='</div>'}else if(style=='5A'){html+='<div id="form" style="padding: 4px 0px 0px 0px; margin-bottom: 11px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 0px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input style="font-size: 16px; color: #6e6e6e;" class="dim" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input style="font-size: 16px; color: #6e6e6e;" class="dim" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input style="font-size: 16px; color: #6e6e6e;" class="dim" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input style="font-size: 16px; color: #6e6e6e;" class="dim" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit"  onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5">        </td>';html+='</tr>';html+='</table>';html+='</div>'}else if(style=='5B'){html+='<div id="form" style="padding: 4px 0px 0px 0px; margin-bottom: 9px;">';html+='<table class="calculatorInput" border="0" cellpadding="0" cellspacing="0">';html+='<tr>';html+='<td style="padding: 0px 15px 2px 0px;" width="499">';html+='<img name="image1" src="http://www.alessco.com/dealers/images/SoftFloorsCalculator.png" border="0">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url( http://www.alessco.com/images/Calculator01.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoLenghtFeet" name="alesscoLenghtFeet" type="text" value="'+lenFeet+'" tabindex="1">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator02.png) no-repeat;" width="62" height="35" valign="top">';html+='  <input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoLenghtInches"  name="alesscoLenghtInches" type="text" value="'+lenInches+'" tabindex="2">        </td>';html+='<td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator03.png) no-repeat;" width="46" height="35" valign="top">';html+='<input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoWidthFeet" name="alesscoWidthFeet" type="text" value="'+widFeet+'" tabindex="3">        </td>';html+=' <td style="padding: 6px 0px 0px 5px; background: url(http://www.alessco.com/images/Calculator04.png) no-repeat;" width="51" height="35" valign="top">';html+=' <input class="dim" style="font-size: 16px; color: #6e6e6e;" id="alesscoWidthInches"  name="alesscoWidthInches" type="text" value="'+widInches+'" tabindex="4">        </td>';html+='  <td>';html+=' <input id="goButton" type="image" src="http://www.alessco.com/images/CalculatorGo.png" value="Submit" onMouseOver="goButtonBlue(this);" onMouseOut="goButtonGrey(this);" onClick="results(\'boxes\','+costSF+','+costERSF1+','+costERSF2+','+costSW+','+costSC+','+costESC+','+costST+','+costSR+','+costJRSF2+','+costJRSF2by1+','+costJRSF1mby1m+','+costJRSF4+','+costPL1310+','+costPL1311+','+costSM+')" tabindex="5">        </td>';html+='</tr>';html+='</table>';html+='</div>'}html+='<div id="boxes">'+resultsTest(lenFeet,lenInches,widFeet,widInches,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM)+'</div><div id="wyniki"></div></div>';html+='</div></body></html>';myWindow.document.write(html);myWindow.focus()}}else{alert('Please convert your dimensions to feet and inches')}}function closeWindow(){myWindow.close()}function closeBlue(obj){obj.src="http://www.alessco.com/images/closeButtonOver.png"}function closeGrey(obj){obj.src="http://www.alessco.com/images/closeButton.png"}function closeBlueEnd(){document.getElementById('closeButtonEnd').src="http://www.alessco.com/images/closeButtonOver.png"}function closeGreyEnd(){document.getElementById('closeButtonEnd').src="http://www.alessco.com/images/closeButton.png"}function changeBackgroundColor(objDivID){var els=document.getElementsByTagName('div');for(i=0;i<els.length;i++){els[i].style.backgroundColor='#ffffff'}document.getElementById(objDivID).style.backgroundColor='#c0c0c0'}function goButtonBlue(obj){obj.src="http://www.alessco.com/images/CalculatorGoOver.png"}function goButtonGrey(obj){obj.src="http://www.alessco.com/images/CalculatorGo.png"}function orderHereButtonBlue(id){var link='buttonLink'+id+'';document.getElementById(link).src="http://www.alessco.com/images/buttonOrderHereOver.png"}function goButtonOver(obj){obj.src="http://www.alessco.com/images/SoftFlooringCalculatorGoOver.png"}function goButtonOut(obj){obj.src="http://www.alessco.com/images/SoftFlooringCalculatorGo.png"}function waitPreloadPage(){if(document.getElementById){document.getElementById('prepage').style.visibility='hidden'}else{if(document.layers){document.prepage.visibility='hidden'}else{document.all.prepage.style.visibility='hidden'}}}function hideDiv(id){document.getElementById(id).style.visibility="hidden"}function showClue(id,position){var html='<span class="clue">To see more details fill out the form</span>';document.getElementById(id).innerHTML=html;document.getElementById(id).style.top=position;document.getElementById(id).style.visibility="visible"}function addCommas(nStr){nStr+='';x=nStr.split('.');x1=x[0];x2=x.length>1?'.'+x[1]:'';var rgx=/(\d+)(\d{3})/;while(rgx.test(x1)){x1=x1.replace(rgx,'$1'+','+'$2')}return x1+x2}function countPieces(lFeet,lInches,wFeet,wInches,costSF,costERSF1,costERSF2,costSW,costSC,costESC,costST,costSR,costJRSF2,costJRSF2by1,costJRSF1mby1m,costJRSF4,costPL1310,costPL1311,costSM){var lenFeet=lFeet;var lenInches=lInches;var widFeet=wFeet;var widInches=wInches;if(lenFeet<2){lenFeet=2;lenInches=0}if(widFeet<2){widFeet=2;widInches=0}if(lenFeet==0&&lenInches!=0){lenFeet=2;lenInches=0}if(widFeet==0&&widInches!=0){widFeet=2;widInches=0}var lenFeet4=lFeet;var lenInches4=lInches;var widFeet4=wFeet;var widInches4=wInches;var text=/^\d+$/;if(text.test(lenFeet)&&(lenFeet!=0||widInches!=0)&&text.test(lenInches)&&text.test(widFeet)&&text.test(widInches)){if((lenInches==0&&widInches==0)||(lenInches4==0&&widInches4==0)){var wallSM=Math.ceil((lenFeet*widFeet)/24);var lenghtArea=Math.floor(lenFeet/2)*2;var widthArea=Math.floor(widFeet/2)*2;var totalArea=Math.floor(lenFeet/2)*Math.floor(widFeet/2);var borderArea=(Math.floor(lenFeet/2)-2)*2+(Math.floor(widFeet/2)-2)*2;var insideArea=(Math.floor(lenFeet/2)-2)*(Math.floor(widFeet/2)-2);var num=new Number(lenFeet);var num1=new Number(widFeet);var lenghtPLArea=num-1;var widthPLArea=num1-1;var lenghtPLWall=num;var widthPLWall=num1;var totalPLArea=lenghtPLArea*widthPLArea;var totalPLWall=lenghtPLWall*widthPLWall;var totalWall=Math.ceil(lenFeet/2)*Math.ceil(widFeet/2);var lenghtWall=Math.ceil(lenFeet/2)*2;var widthWall=Math.ceil(widFeet/2)*2;var borderWall=(Math.ceil(lenFeet/2)-2)*2+(Math.ceil(widFeet/2)-2)*2;var insideWall=(Math.ceil(lenFeet/2)-2)*(Math.ceil(widFeet/2)-2);var total4by4Area=Math.floor(lenFeet4/4)*Math.floor(widFeet4/4);var lenght4by4Area=Math.floor(lenFeet4/4)*4;var width4by4Area=Math.floor(widFeet4/4)*4;var total4by4Wall=Math.ceil(lenFeet4/4)*Math.ceil(widFeet4/4);var lenght4by4Wall=Math.ceil(lenFeet4/4)*4;var width4by4Wall=Math.ceil(widFeet4/4)*4;var total1mby1mArea=Math.floor(lenFeet/3.375)*Math.floor(widFeet/3.28);var lenght1mby1mArea=Math.floor(lenFeet/3.375)*3.375;var width1mby1mArea=Math.floor(widFeet/3.375)*3.375;var total1mby1mWall=Math.ceil(lenFeet/3.375)*Math.ceil(widFeet/3.375);var lenght1mby1mWall=Math.ceil(lenFeet/3.375)*3.375;var width1mby1mWall=Math.ceil(widFeet/3.375)*3.375;var html='';html+='Area Rug '+totalArea+'\nWall to Wall '+totalWall+'\n4by4 Area Rug '+total4by4Area+'\n4b4 Wall to Wall '+total4by4Wall+'\n1m by 1m Area Rug '+total1mby1mArea+'\n1m by 1m Wall To Wall '+total1mby1mWall+''}else if((lenInches!=0&&widInches==0)||(lenInches4!=0&&widInches4==0)){if(lenInches>=12){alert('Please convert your dimensions to feet and inches')}else{var num=new Number(lenFeet);var num1=new Number(lenInches);var numa=new Number(widFeet);var lenFeetArea1=num-num1+num1;var lenFeetWall1=num+1;var num4=new Number(lenFeet4);var num14=new Number(lenInches4);var numa4=new Number(widFeet4);var lenFeetArea14=num4-num14+num14;var lenFeetWall14=num4+1;if(lenInches<=6){if(lenInches==6){var lenghtPLArea=num;var widthPLArea=numa-1}else{var lenghtPLArea=num-1;var widthPLArea=numa-1}var lenghtPLWall=num;var widthPLWall=numa}else{var lenghtPLArea=num;var widthPLArea=numa-1;var lenghtPLWall=num+1;var widthPLWall=widFeet}var totalPLArea=lenghtPLArea*widthPLArea;var totalPLWall=lenghtPLWall*widthPLWall;var lenghtArea=Math.floor(lenFeetArea1/2)*2;var widthArea=Math.floor(widFeet/2)*2;var totalArea=Math.floor(lenFeetArea1/2)*Math.floor(widFeet/2);var borderArea=(Math.floor(lenFeetArea1/2)-2)*2+(Math.floor(widFeet/2)-2)*2;var insideArea=(Math.floor(lenFeetArea1/2)-2)*(Math.floor(widFeet/2)-2);var lenghtWall=Math.ceil(lenFeetWall1/2)*2;var widthWall=Math.ceil(widFeet/2)*2;var totalWall=Math.ceil(lenFeetWall1/2)*Math.ceil(widFeet/2);var borderWall=(Math.ceil(lenFeetWall1/2)-2)*2+(Math.ceil(widFeet/2)-2)*2;var insideWall=(Math.ceil(lenFeetWall1/2)-2)*(Math.ceil(widFeet/2)-2);var wallSM=Math.ceil((lenFeetWall1*widFeet)/24);var total4by4Area=Math.floor(lenFeetArea14/4)*Math.floor(widFeet4/4);var lenght4by4Area=Math.floor(lenFeetArea14/4)*4;var width4by4Area=Math.floor(widFeet4/4)*4;var total4by4Wall=Math.ceil(lenFeetWall14/4)*Math.ceil(widFeet4/4);var lenght4by4Wall=Math.ceil(lenFeetWall14/4)*4;var width4by4Wall=Math.ceil(widFeet4/4)*4;var total1mby1mArea=Math.floor(lenFeetArea1/3.375)*Math.floor(widFeet/3.375);var lenght1mby1mArea=Math.floor(lenFeetArea1/3.3758)*3.375;var width1mby1mArea=Math.floor(widFeet/3.375)*3.375;var total1mby1mWall=Math.ceil(lenFeetWall1/3.375)*Math.ceil(widFeet/3.375);var lenght1mby1mWall=Math.ceil(lenFeetWall1/3.375)*3.375;var width1mby1mWall=Math.ceil(widFeet/3.375)*3.375;var html='';html+='Area Rug '+totalArea+'\nWall to Wall '+totalWall+'\n4by4 Area Rug '+total4by4Area+'\n4b4 Wall to Wall '+total4by4Wall+'\n1m by 1m Area Rug '+total1mby1mArea+'\n1m by 1m Wall To Wall '+total1mby1mWall+''}}else if((lenInches==0&&widInches!=0)||(lenInches4==0&&widInches4!=0)){if(widInches>=12){alert('Please convert your dimensions to feet and inches')}else{var num=new Number(widFeet);var numa=new Number(lenFeet);var num1=new Number(widInches);var widFeetArea1=num-num1+num1;var widFeetWall1=num+1;var num4=new Number(widFeet4);var numa4=new Number(lenFeet4);var num14=new Number(widInches4);var widFeetArea14=num4-num14+num14;var widFeetWall14=num4+1;if(widInches<=6){if(widInches==6){var lenghtPLArea=numa-1;var widthPLArea=num}else{var lenghtPLArea=numa-1;var widthPLArea=num-1}var lenghtPLWall=numa;var widthPLWall=num}else{var lenghtPLArea=numa-1;var widthPLArea=num;var lenghtPLWall=numa;var widthPLWall=num+1}var totalPLArea=lenghtPLArea*widthPLArea;var totalPLWall=lenghtPLWall*widthPLWall;var lenghtArea=Math.floor(lenFeet/2)*2;var widthArea=Math.floor(widFeetArea1/2)*2;var totalArea=Math.floor(lenFeet/2)*Math.floor(widFeetArea1/2);var borderArea=(Math.floor(lenFeet/2)-2)*2+(Math.floor(widFeetArea1/2)-2)*2;var insideArea=(Math.floor(lenFeet/2)-2)*(Math.floor(widFeetArea1/2)-2);var lenghtWall=Math.ceil(lenFeet/2)*2;var widthWall=Math.ceil(widFeetWall1/2)*2;var totalWall=Math.ceil(lenFeet/2)*Math.ceil(widFeetWall1/2);var borderWall=(Math.ceil(lenFeet/2)-2)*2+(Math.ceil(widFeetWall1/2)-2)*2;var insideWall=(Math.ceil(lenFeet/2)-2)*(Math.ceil(widFeetWall1/2)-2);var wallSM=Math.ceil((lenFeet*widFeetWall1)/24);var total4by4Area=Math.floor(lenFeet4/4)*Math.floor(widFeetArea14/4);var lenght4by4Area=Math.floor(lenFeet4/4)*4;var width4by4Area=Math.floor(widFeetArea14/4)*4;var total4by4Wall=Math.ceil(lenFeet4/4)*Math.ceil(widFeetWall14/4);var lenght4by4Wall=Math.ceil(lenFeet4/4)*4;var width4by4Wall=Math.ceil(widFeetWall14/4)*4;var total1mby1mArea=Math.floor(lenFeet/3.375)*Math.floor(widFeetArea1/3.375);var lenght1mby1mArea=Math.floor(lenFeet/3.375)*3.375;var width1mby1mArea=Math.floor(widFeetArea1/3.375)*3.375;var total1mby1mWall=Math.ceil(lenFeet/3.375)*Math.ceil(widFeetWall1/3.375);var lenght1mby1mWall=Math.ceil(lenFeet/3.375)*3.375;var width1mby1mWall=Math.ceil(widFeetWall1/3.375)*3.375;var html='';html+='Area Rug '+totalArea+'\nWall to Wall '+totalWall+'\n4by4 Area Rug '+total4by4Area+'\n4b4 Wall to Wall '+total4by4Wall+'\n1m by 1m Area Rug '+total1mby1mArea+'\n1m by 1m Wall To Wall '+total1mby1mWall+''}}else{if(lenInches>=12||widInches>=12){alert('Please convert your dimensions to feet and inches')}else{var num=new Number(lenFeet);var numa=new Number(lenInches);var lenFeetArea1=num-numa+numa;var lenFeetWall1=num+1;var num1=new Number(widFeet);var num1a=new Number(widInches);var widFeetArea1=num1-num1a+num1a;var widFeetWall1=num1+1;if(lenInches<=6&&widInches<=6){if(lenInches==6&&widInches!=6){var lenghtPLArea=num;var widthPLArea=num1-1}else if(lenInches!=6&&widInches==6){var lenghtPLArea=num-1;var widthPLArea=num1}else if(lenInches==6&&widInches==6){var lenghtPLArea=num;var widthPLArea=num1}else{var lenghtPLArea=num-1;var widthPLArea=num1-1}var lenghtPLWall=num;var widthPLWall=num1}else if(lenInches>6&&widInches<=6){if(widInches==6){var widthPLArea=num1}else{var widthPLArea=num1-1}var lenghtPLArea=num;var lenghtPLWall=num+1;var widthPLWall=num1}else if(lenInches<=6&&widInches>6){if(lenInches==6){var lenghtPLArea=num}else{var lenghtPLArea=num-1}var widthPLArea=num1;var lenghtPLWall=num;var widthPLWall=num1+1}else if(lenInches>6&&widInches>6){var lenghtPLArea=num;var widthPLArea=num1;var lenghtPLWall=num+1;var widthPLWall=num1+1}var totalPLArea=lenghtPLArea*widthPLArea;var totalPLWall=lenghtPLWall*widthPLWall;var lenghtArea=Math.floor(lenFeetArea1/2)*2;var widthArea=Math.floor(widFeetArea1/2)*2;var totalArea=Math.floor(lenFeetArea1/2)*Math.floor(widFeetArea1/2);var borderArea=(Math.floor(lenFeetArea1/2)-2)*2+(Math.floor(widFeetArea1/2)-2)*2;var insideArea=(Math.floor(lenFeetArea1/2)-2)*(Math.floor(widFeetArea1/2)-2);var lenghtWall=Math.ceil(lenFeetWall1/2)*2;var widthWall=Math.ceil(widFeetWall1/2)*2;var totalWall=Math.ceil(lenFeetWall1/2)*Math.ceil(widFeetWall1/2);var borderWall=(Math.ceil(lenFeetWall1/2)-2)*2+(Math.ceil(widFeetWall1/2)-2)*2;var insideWall=(Math.ceil(lenFeetWall1/2)-2)*(Math.ceil(widFeetWall1/2)-2);var wallSM=Math.ceil((lenFeetWall1*widFeetWall1)/24);var total4by4Area=Math.floor(lenFeetArea1/4)*Math.floor(widFeetArea1/4);var lenght4by4Area=Math.floor(lenFeetArea1/4)*4;var width4by4Area=Math.floor(widFeetArea1/4)*4;var total4by4Wall=Math.ceil(lenFeetWall1/4)*Math.ceil(widFeetWall1/4);var lenght4by4Wall=Math.ceil(lenFeetWall1/4)*4;var width4by4Wall=Math.ceil(widFeetWall1/4)*4;var total1mby1mArea=Math.floor(lenFeetArea1/3.375)*Math.floor(widFeetArea1/3.28);var lenght1mby1mArea=Math.floor(lenFeetArea1/3.375)*3.375;var width1mby1mArea=Math.floor(widFeetArea1/3.375)*3.375;var total1mby1mWall=Math.ceil(lenFeetWall1/3.375)*Math.ceil(widFeetWall1/3.375);var lenght1mby1mWall=Math.ceil(lenFeetWall1/3.375)*3.375;var width1mby1mWall=Math.ceil(widFeetWall1/3.375)*3.375;var html='';html+='Area Rug '+totalArea+'\nWall to Wall '+totalWall+'\n4by4 Area Rug '+total4by4Area+'\n4b4 Wall to Wall '+total4by4Wall+'\n1m by 1m Area Rug '+total1mby1mArea+'\n1m by 1m Wall To Wall '+total1mby1mWall+''}}document.getElementById('total1').innerHTML=totalArea;document.getElementById('total1').value=totalArea;document.getElementById('total1w').innerHTML=totalWall;document.getElementById('total1w').value=totalWall;document.getElementById('borderArea').value=borderArea;document.getElementById('insideArea').value=insideArea;document.getElementById('borderWall').value=borderWall;document.getElementById('insideWall').value=insideWall;document.getElementById('lenghtArea').value=lenghtArea;document.getElementById('widthArea').value=widthArea;document.getElementById('lenghtWall').value=lenghtWall;document.getElementById('widthWall').value=widthWall;costs(totalArea,costSF,'cost1');costs(totalWall,costSF,'cost1w');document.getElementById('total2').innerHTML=totalArea;document.getElementById('total2').value=totalArea;document.getElementById('total2w').innerHTML=totalWall;document.getElementById('total2w').value=totalWall;costs(totalArea,costERSF1,'cost2');costs(totalWall,costERSF1,'cost2w');document.getElementById('total3').innerHTML=totalArea;document.getElementById('total3').value=totalArea;document.getElementById('total3w').innerHTML=totalWall;document.getElementById('total3w').value=totalWall;costs(totalArea,costERSF2,'cost3');costs(totalWall,costERSF2,'cost3w');document.getElementById('total4').innerHTML=totalPLArea;document.getElementById('total4').value=totalPLArea;document.getElementById('total4w').innerHTML=totalPLWall;document.getElementById('total4w').value=totalPLWall;document.getElementById('lenghtPLArea').value=lenghtPLArea;document.getElementById('widthPLArea').value=widthPLArea;document.getElementById('lenghtPLWall').value=lenghtPLWall;document.getElementById('widthPLWall').value=widthPLWall;document.getElementById('total5').innerHTML=totalArea;document.getElementById('total5').value=totalArea;document.getElementById('total5w').innerHTML=totalWall;document.getElementById('total5w').value=totalWall;costs(totalArea,costSW,'cost5');costs(totalWall,costSW,'cost5w');document.getElementById('total6').innerHTML=totalArea;document.getElementById('total6').value=totalArea;document.getElementById('total6w').innerHTML=totalWall;document.getElementById('total6w').value=totalWall;costs(totalArea,costSC,'cost6');costs(totalWall,costSC,'cost6w');document.getElementById('total7').innerHTML=totalArea;document.getElementById('total7').value=totalArea;document.getElementById('total7w').innerHTML=totalWall;document.getElementById('total7w').value=totalWall;costs(totalArea,costESC,'cost7');costs(totalWall,costESC,'cost7w');document.getElementById('total8').innerHTML=totalArea;document.getElementById('total8').value=totalArea;document.getElementById('total8w').innerHTML=totalWall;document.getElementById('total8w').value=totalWall;costs(totalArea,costST,'cost8');costs(totalWall,costST,'cost8w');document.getElementById('total9').innerHTML=totalArea;document.getElementById('total9').value=totalArea;document.getElementById('total9w').innerHTML=totalWall;document.getElementById('total9w').value=totalWall;costs(totalArea,costSR,'cost9');costs(totalWall,costSR,'cost9w');document.getElementById('total10').innerHTML=totalArea;document.getElementById('total10').value=totalArea;document.getElementById('total10w').innerHTML=totalWall;document.getElementById('total10w').value=totalWall;costs(totalArea,costJRSF2,'cost10');costs(totalWall,costJRSF2,'cost10w');document.getElementById('total11').innerHTML=totalArea;document.getElementById('total11').value=totalArea;document.getElementById('total11w').innerHTML=totalWall;document.getElementById('total11w').value=totalWall;costs(totalArea,costJRSF2by1,'cost11');costs(totalWall,costJRSF2by1,'cost11w');if(total1mby1mArea==0){total1mby1mArea=1;lenght1mby1mArea=3.375;width1mby1mArea=3.375};if(total1mby1mWall==0){total1mby1mWall=1;lenght1mby1mWall=3.375;width1mby1mWall=3.375};document.getElementById('total12').innerHTML=total1mby1mArea;document.getElementById('total12').value=total1mby1mArea;document.getElementById('total12w').innerHTML=total1mby1mWall;document.getElementById('total12w').value=total1mby1mWall;document.getElementById('lenght1mby1mArea').value=lenght1mby1mArea;document.getElementById('width1mby1mArea').value=width1mby1mArea;document.getElementById('lenght1mby1mWall').value=lenght1mby1mWall;document.getElementById('width1mby1mWall').value=width1mby1mWall;costs(total1mby1mArea,costJRSF1mby1m,'cost12');costs(total1mby1mWall,costJRSF1mby1m,'cost12w');if(total4by4Area==0){total4by4Area=1;lenght4by4Area=4;width4by4Area=4};if(total4by4Wall==0){total4by4Wall=1;lenght4by4Wall=4;width4by4Wall=4};document.getElementById('total13').innerHTML=total4by4Area;document.getElementById('total13').value=total4by4Area;document.getElementById('total13w').innerHTML=total4by4Wall;document.getElementById('total13w').value=total4by4Wall;document.getElementById('lenght4by4Area').value=lenght4by4Area;document.getElementById('width4by4Area').value=width4by4Area;document.getElementById('lenght4by4Wall').value=lenght4by4Wall;document.getElementById('width4by4Wall').value=width4by4Wall;costs(total4by4Area,costJRSF4,'cost13');costs(total4by4Wall,costJRSF4,'cost13w');document.getElementById('totalSM').innerHTML=wallSM;document.getElementById('totalSM').value=wallSM;document.getElementById('wyniki').style.visibility="visible"}else{alert('Please convert your dimensions to feet and inches')}}function costs(total,price,id){var cost=addCommas((total*price).toFixed(2));document.getElementById(id).innerHTML='$'+cost+'';document.getElementById(id).value=cost}function countBoxes(totalArea,totalWall,pieces,thick1piece,weight1p,weight25p,widthTotal,heightTotal,thickTotal,costArea,costWall,sqft1,position,sqftOnePice,thickOnePiece,price,name,ident,header){if(document.getElementById(totalArea).value==0||document.getElementById(totalWall).value==0){}else{var html=null;var lenghtArea=document.getElementById('lenghtArea').value;var widthArea=document.getElementById('widthArea').value;var lenghtWall=document.getElementById('lenghtWall').value;var widthWall=document.getElementById('widthWall').value;if(ident==0){var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var lenghtArea=document.getElementById('lenghtArea').value;var widthArea=document.getElementById('widthArea').value;var lenghtWall=document.getElementById('lenghtWall').value;var widthWall=document.getElementById('widthWall').value;if(a==1){var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">0 Corners + 0 Borders + '+a+' Inside = &nbsp;'+a+' Piece</span></div>'}else{var corner=4;var borderArea=document.getElementById('borderArea').value;var insideArea=document.getElementById('insideArea').value;var borderWall=document.getElementById('borderWall').value;var insideWall=document.getElementById('insideWall').value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderArea+' Borders + '+insideArea+' Insides = &nbsp;'+a+' Pieces</span></div>'}if(b==1){var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Inside</span></div>'}else{var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Insides</span></div>'}}else if(ident==2){var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a/4+' Sets of 4 x 1\' x 1\' x 5/8 \" </span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b/4+' Sets of 4 x 1\' x 1\' x 5/8 \"</span></div>'}else{var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;if(a==1)var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a+' Inside with detachable Corner & Border pieces</span></div>';else var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a+' Insides with detachable Corner & Border pieces</span></div>';if(b==1)var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Inside with detachable Corner & Border pieces</span></div>';else var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Insides with detachable Corner & Border pieces</span></div>'}var totalArea=document.getElementById(totalArea).value;var costArea=document.getElementById(costArea).value;var totalWall=document.getElementById(totalWall).value;var costWall=document.getElementById(costWall).value;var sqftArea=Math.round(totalArea*sqft1);var sqftWall=Math.round(totalWall*sqft1);var count=0;var count1=0;var totalWeightArea=0;var totalWeightWall=0;var masterCartonArea=Math.floor(totalArea/pieces);var partialCartonArea=totalArea-pieces*masterCartonArea;var masterCartonWall=Math.floor(totalWall/pieces);var partialCartonWall=totalWall-pieces*masterCartonWall;if(partialCartonArea!=0&&partialCartonWall!=0){if(totalArea<=25){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div class="leftColumn"  style="float:left; margin-bottom:72px; margin-top: 6px; width:440px; " >'}else{var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div class="leftColumn"  style="float:left;  margin-bottom:72px; width:440px; margin-top: 6px;" >'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}totalWeightArea+=(count-1)*weight25p;if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';if(totalWall<25){html+='<div class="rightColumn" style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;" >'}else{html+='<div class="rightColumn" style="float:left;  margin-bottom:72px; width:440px; margin-top: 6px;" >'}html+='<div style="margin-bottom: 4px; width:100px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea!=0&&partialCartonWall==0){if(totalWall<=25){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px;  width:440px; margin-top: 6px;">'}else{var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px;  width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(thickTotal);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}totalWeightArea+=(count-1)*weight25p;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';if(totalWall<=25){html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall!=0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px;  width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall==0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left;  margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left;  margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}return html}}function countBoxes4(totalArea,totalWall,pieces,thick1piece,weight1p,weight25p,widthTotal,heightTotal,thickTotal,costArea,costWall,sqft1,position,sqftOnePice,thickOnePiece,price,name,ident,header){if(document.getElementById(totalArea).value==0||document.getElementById(totalWall).value==0){}else{var lenghtArea=document.getElementById('lenght4by4Area').value;var widthArea=document.getElementById('width4by4Area').value;var lenghtWall=document.getElementById('lenght4by4Wall').value;var widthWall=document.getElementById('width4by4Wall').value;if(ident==0){var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var lenghtArea=document.getElementById('lenghtArea').value;var widthArea=document.getElementById('widthArea').value;var lenghtWall=document.getElementById('lenghtWall').value;var widthWall=document.getElementById('widthWall').value;var corner=4;var borderArea=document.getElementById('borderArea').value;var insideArea=document.getElementById('insideArea').value;var borderWall=document.getElementById('borderWall').value;var insideWall=document.getElementById('insideWall').value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderArea+' Borders + '+insideArea+' Insides = &nbsp;'+a+' Pieces</span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderWall+' Borders + '+insideWall+' Insides = &nbsp;'+b+' Pieces</span></div>'}else{var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a+' Insides with detachable Corner & Border pieces</span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Insides with detachable Corner & Border pieces</span></div>'}var totalArea=document.getElementById(totalArea).value;var costArea=document.getElementById(costArea).value;var totalWall=document.getElementById(totalWall).value;var costWall=document.getElementById(costWall).value;var sqftArea=Math.round(totalArea*sqft1);var sqftWall=Math.round(totalWall*sqft1);var count=0;var count1=0;var totalWeightArea=0;var totalWeightWall=0;var masterCartonArea=Math.floor(totalArea/pieces);var partialCartonArea=totalArea-pieces*masterCartonArea;var masterCartonWall=Math.floor(totalWall/pieces);var partialCartonWall=totalWall-pieces*masterCartonWall;if(partialCartonArea!=0&&partialCartonWall!=0){if(totalArea<10){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}totalWeightArea+=(count-1)*weight25p;if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';if(totalWall<10){html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea!=0&&partialCartonWall==0){if(totalWall<=10){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(thickTotal);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}totalWeightArea+=(count-1)*weight25p;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';if(totalWall<=10){html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">'}else{html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 4px;">'}html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall!=0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\" &nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall==0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' x '+widthArea+'\' = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' x '+widthWall+'\' = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}return html}}function countBoxes1(totalArea,totalWall,pieces,thick1piece,weight1p,weight25p,widthTotal,heightTotal,thickTotal,costArea,costWall,sqft1,position,sqftOnePice,thickOnePiece,price,name,ident,header){if(document.getElementById(totalArea).value==0||document.getElementById(totalWall).value==0){}else{var lenghtArea=document.getElementById('lenght1mby1mArea').value;var widthArea=document.getElementById('width1mby1mArea').value;var lenghtWall=document.getElementById('lenght1mby1mWall').value;var widthWall=document.getElementById('width1mby1mWall').value;var lenghtAreaFeet=Math.floor(lenghtArea);var lenghtAreaInch=((lenghtArea-lenghtAreaFeet)*12).toFixed(0);var widthAreaFeet=Math.floor(widthArea);var widthAreaInch=((widthArea-widthAreaFeet)*12).toFixed(0);var lenghtWallFeet=Math.floor(lenghtWall);var lenghtWallInch=((lenghtWall-lenghtWallFeet)*12).toFixed(0);var widthWallFeet=Math.floor(widthWall);var widthWallInch=((widthWall-widthWallFeet)*12).toFixed(0);if(ident==0){var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var lenghtArea=document.getElementById('lenghtArea').value;var widthArea=document.getElementById('widthArea').value;var lenghtWall=document.getElementById('lenghtWall').value;var widthWall=document.getElementById('widthWall').value;var corner=4;var borderArea=document.getElementById('borderArea').value;var insideArea=document.getElementById('insideArea').value;var borderWall=document.getElementById('borderWall').value;var insideWall=document.getElementById('insideWall').value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderArea+' Borders + '+insideArea+' Insides = &nbsp;'+a+' Pieces</span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+corner+' Corners + '+borderWall+' Borders + '+insideWall+' Insides = &nbsp;'+b+' Pieces</span></div>'}else{var a=document.getElementById(totalArea).value;var b=document.getElementById(totalWall).value;var textArea='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+a+' Insides with detachable Corner & Border pieces</span></div>';var textWall='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">'+b+' Insides with detachable Corner & Border pieces</span></div>'}var totalArea=document.getElementById(totalArea).value;var costArea=document.getElementById(costArea).value;var totalWall=document.getElementById(totalWall).value;var costWall=document.getElementById(costWall).value;var sqftArea=Math.round(totalArea*sqft1);var sqftWall=Math.round(totalWall*sqft1);var count=0;var count1=0;var totalWeightArea=0;var totalWeightWall=0;var masterCartonArea=Math.floor(totalArea/pieces);var partialCartonArea=totalArea-pieces*masterCartonArea;var masterCartonWall=Math.floor(totalWall/pieces);var partialCartonWall=totalWall-pieces*masterCartonWall;if(partialCartonArea!=0&&partialCartonWall!=0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtAreaFeet+'\' '+lenghtAreaInch+'\" x '+widthAreaFeet+'\' '+widthAreaInch+'\" = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}totalWeightArea+=(count-1)*weight25p;if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWallFeet+'\' '+lenghtWallInch+'\" x '+widthWallFeet+'\' '+widthWallInch+'\" = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea!=0&&partialCartonWall==0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtAreaFeet+'\' '+lenghtAreaInch+'\" x '+widthAreaFeet+'\' '+widthAreaInch+'\" = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickArea=Math.round(partialCartonArea*thick1piece);var weightArea=Math.round(partialCartonArea*weight1p);var thickWall=Math.round(thickTotal);count+=1;totalWeightArea+=weightArea;for(var i=1;i<=masterCartonArea;i++){var masterCarton1Area=pieces;j=i+1;count+=1}if(count==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';var boxA='box'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of '+count+'&nbsp;&nbsp;&nbsp;'+partialCartonArea+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickArea+'\" &nbsp;&nbsp;'+Math.round(weightArea)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}totalWeightArea+=(count-1)*weight25p;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</span></div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWallFeet+'\' '+lenghtWallInch+'\" x '+widthWallFeet+'\' '+widthWallInch+'\" = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</div>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</span>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall!=0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtAreaFeet+'\' '+lenghtAreaInch+'\" x '+widthAreaFeet+'\' '+widthAreaInch+'\" = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+price+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';var thickWall=Math.round(partialCartonWall*thick1piece);var weightWall=Math.round(partialCartonWall*weight1p);for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 9px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWallFeet+'\' '+lenghtWallInch+'\" x '+widthWallFeet+'\' '+widthWallInch+'\" = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';count1+=1;totalWeightWall+=weightWall;for(var i=1;i<=masterCartonWall;i++){var masterCarton1Wall=pieces;k=i+1;count1+=1}totalWeightWall+=(count1-1)*weight25p;if(count1==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';var boxW='box'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+partialCartonWall+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickWall+'\" &nbsp;&nbsp;'+Math.round(weightWall)+' lbs</span></div>';html+='<div class="leftSide"><span class="popTextBlack"> 2 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}else if(partialCartonArea==0&&partialCartonWall==0){var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalArea+'</span></div>';html+=''+textArea+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtAreaFeet+'\' '+lenghtAreaInch+'\" x '+widthAreaFeet+'\' '+widthAreaInch+'\" = '+sqftArea+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costArea)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonArea;i++){count+=1}totalWeightArea+=(count)*weight25p;if(count==1){var boxA='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxA='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\"&nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count+' '+boxA+'&nbsp;&nbsp;&nbsp;</span>'+totalArea+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightArea+' lbs</div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 9px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalWall+'</span></div>';html+=''+textWall+'';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWallFeet+'\' '+lenghtWallInch+'\" x '+widthWallFeet+'\' '+widthWallInch+'\" = '+sqftWall+' sq.ft.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+addCommas(costWall)+'&nbsp;&nbsp;&nbsp;</span>($'+(price).toFixed(2)+' sq.ft. or $'+(price*sqft1).toFixed(2)+' per piece)</div>';for(var i=1;i<=masterCartonWall;i++){k=i+1;count1+=1}totalWeightWall+=(count1)*weight25p;if(count1==1){var boxW='box';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 of '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\" &nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}else{var boxW='boxes';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">1 to '+count1+'&nbsp;&nbsp;&nbsp;'+pieces+' pieces &nbsp;&nbsp;'+widthTotal+'\" x '+heightTotal+'\" x '+thickTotal+'\" &nbsp;&nbsp;&nbsp;'+weight25p+' lbs</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+count1+' '+boxW+'&nbsp;&nbsp;&nbsp;</span>'+totalWall+' pieces&nbsp;&nbsp;&nbsp;'+totalWeightWall+' lbs</div>';html+='</div>'}return html}}function playLearn(totalArea,totalWall,header,cost1310,cost1311){if(document.getElementById(totalArea).value==0||document.getElementById(totalWall).value==0){}else{var lenghtArea=document.getElementById('lenghtPLArea').value;var widthArea=document.getElementById('widthPLArea').value;var lenghtWall=document.getElementById('lenghtPLWall').value;var widthWall=document.getElementById('widthPLWall').value;var lenght1310=26;var width1310=15;var height1310=14;var weight1310=13;var lenght1311=26;var width1311=25;var height1311=14;var weight1311=24;var position='0px';var area=document.getElementById(totalArea).value;var wall=document.getElementById(totalWall).value;var edgesArea=2*lenghtArea+2*widthArea;var edgesWall=2*lenghtWall+2*widthWall;var cost1310=new Number(cost1310);var cost1311=new Number(cost1311);var moreBoxesArea='';var html='<div><img name="oo" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" /></div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 6px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/finished.png"></div>';if(area<=36){if(area<36){var extraPiecesArea=36-area;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1310 = '+36+' total pieces minus '+area+' needed pieces = '+extraPiecesArea+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1310 = '+36+' total pieces</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';var costArea=cost1310;var commentArea='($'+cost1310+' per set of style 1310)';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'</span>&nbsp;&nbsp;&nbsp;'+commentArea+'</div>';var boxArea='1 of 1&nbsp;&nbsp;&nbsp; 36 pieces&nbsp;&nbsp;&nbsp; 26\" x 15\" x 14\"&nbsp;&nbsp;&nbsp;13lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';var totalA='<span class="popTextRed">1 box</span>&nbsp;&nbsp;&nbsp;36 pieces&nbsp;&nbsp;&nbsp;13lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>';if(area<36){}}else if(area>36&&area<72||area==72){var costArea=cost1311;var commentArea='($'+cost1311+' per set of style 1311)';var boxArea='1 of 1&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalA='<span class="popTextRed">1 box&nbsp;&nbsp;&nbsp;</span>72 pieces&nbsp;&nbsp;&nbsp;24lbs';if(area==72){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1311 = 72 total pieces</span></div>'}else if(area>36&&area<72){var extraPiecesArea=72-area;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1311 = '+72+' total pieces minus '+area+' needed pieces = '+extraPiecesArea+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'&nbsp;&nbsp;&nbsp;</span>'+commentArea+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>';if(area>36&&area<72){}}else if(area>72){var setArea=Math.floor(area/72);var difArea=area-72*setArea;if(setArea==1){var set='Set'}else{var set='Sets'}if(difArea<=36&&difArea!=0){var totalSet=setArea*72+36;var extraPieces=totalSet-area;var totalBoxArea=setArea+1;var totalWeight=weight1311*setArea+weight1310;var costArea=addCommas((setArea*cost1311+cost1310).toFixed(2));var commentArea='($'+cost1310+' per set of style 1310 and $'+cost1311+' per set of style 1311)';var boxArea='1 of '+totalBoxArea+'&nbsp;&nbsp;&nbsp;36 pieces&nbsp;&nbsp;&nbsp; 26\" x 15\" x 14\"&nbsp;&nbsp;&nbsp;13lbs';var moreBoxesArea='2 to '+totalBoxArea+'&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalA='<span class="popTextRed">'+totalBoxArea+' boxes</span>&nbsp;&nbsp;&nbsp;'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+'lbs';if(difArea==36){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine 1 Set of Style 1310 + '+setArea+' '+set+' of Style 1311 = '+totalSet+' total pieces</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine 1 Set of Style 1310 + '+setArea+' '+set+' of Style 1311 = '+totalSet+' total pieces minus '+area+' needed pieces = '+extraPieces+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'&nbsp;&nbsp;&nbsp;</span> '+commentArea+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';html+='<div class="leftSide"><span class="popTextBlack">'+moreBoxesArea+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>';if(difArea!=36){}}else if(difArea==0){var totalSet=setArea*72;var extraPieces=totalSet-area;var costArea=addCommas((setArea*cost1311).toFixed(2));var totalWeight=weight1311*setArea;var commentArea='($'+cost1311+' per set of style 1311)';var boxArea='1 to '+setArea+'&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalA='<span class="popTextRed">'+setArea+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+'lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine '+setArea+' '+set+' of Style 1311 = '+totalSet+' total pieces</span></span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'&nbsp;&nbsp;&nbsp;</span> '+commentArea+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>'}else if(difArea>36){setArea+=1;var totalSet=setArea*72;var costArea=addCommas((setArea*cost1311).toFixed(2));var commentArea='($'+cost1311+' per set of style 1311)';var totalWeight=weight1311*setArea;var extraPieces=totalSet-area;var totalA='<span class="popTextRed">'+setArea+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+' lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine '+setArea+' Sets of Style 1311 = '+totalSet+' total pieces minus '+area+' needed pieces = '+extraPieces+' extra pieces which can be used for cubes, names, walls, etc.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtArea+'\' 6\" x '+widthArea+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costArea+'&nbsp;&nbsp;&nbsp;</span>'+commentArea+'</div>';var boxArea='1 to '+setArea+'&nbsp;&nbsp;&nbsp; 72 Pieces&nbsp;&nbsp;&nbsp; 26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp; 24lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxArea+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalA+'</div>'}}html+='<div style="padding-top:20px; margin-bottom:20px; margin-left:-5px;"><img id="closeButtonEnd" onMouseOver="closeBlue(this);" OnMouseOut="closeGrey(this);" name="close" src="http://www.alessco.com/images/closeButton.png" border="0" onClick="javascript:window.close(self);" /></div>';html+='</div>';html+='<div style="float:left; margin-bottom:72px; width:440px; margin-top: 9px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/wall.png"></div>';if(wall<=36){if(wall<36){var extraPiecesWall=36-wall;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1310 = '+36+' total pieces minus '+wall+' needed pieces = '+extraPiecesWall+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1310 = '+36+' total pieces</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';var costWall=cost1310;var commentWall='($'+cost1310+' per set of style 1310)';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';var boxWall='1 of 1&nbsp;&nbsp;&nbsp;36 pieces&nbsp;&nbsp;&nbsp;26\" x 15\" x 14\"&nbsp;&nbsp;&nbsp;13lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';var totalW='<span class="popTextRed">1 box&nbsp;&nbsp;&nbsp;</span>36 pieces&nbsp;&nbsp;&nbsp;13lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>';if(wall<36){}}else if(wall>36&&wall<72||wall==72){var costWall=cost1311;var commentWall='($'+cost1311+' per set of style 1311)';var boxWall='1 of 1&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalW='<span class="popTextRed">1 box&nbsp;&nbsp;&nbsp;</span>72 pieces&nbsp;&nbsp;&nbsp;24lbs';if(wall==72){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1311 = 72 total pieces</span></div>'}else if(wall>36&&wall<72){var extraPiecesWall=72-wall;html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">1 Set of Style 1311 = '+72+' total pieces minus '+wall+' needed pieces = '+extraPiecesWall+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>';if(wall>36&&wall<72){}}else if(wall>72){var setWall=Math.floor(wall/72);var difWall=wall-72*setWall;if(setWall==1){var set='Set'}else{var set='Sets'}if(difWall<=36&&difWall!=0){var totalSet=setWall*72+36;var extraPieces=totalSet-wall;var totalBoxWall=setWall+1;var totalWeight=weight1311*setWall+weight1310;var costWall=addCommas((setWall*cost1311+cost1310).toFixed(2));var commentWall='($'+cost1310+' per set of style 1310 and $'+cost1311+' per set of style 1311)';var boxWall='1 of '+totalBoxWall+'&nbsp;&nbsp;&nbsp;36 pieces&nbsp;&nbsp;&nbsp;26\" x 15\" x 14\"&nbsp;&nbsp;&nbsp;13lbs';var moreBoxesWall='2 to '+totalBoxWall+'&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalW='<span class="popTextRed">'+totalBoxWall+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+'lbs';if(difWall==36){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine 1 Set of Style 1310 + '+setWall+' '+set+' of Style 1311 = '+totalSet+' total pieces</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine 1 Set of Style 1310 + '+setWall+' '+set+' of Style 1311 = '+totalSet+' total pieces minus '+wall+' needed pieces = '+extraPieces+' extra pieces which can be used for cubes, names, walls, etc.</span></div>'}html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';html+='<div class="leftSide"><span class="popTextBlack">'+moreBoxesWall+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>';if(difWall!=36){}}else if(difWall==0){var totalSet=setWall*72;var extraPieces=totalSet-wall;var costWall=addCommas((setWall*cost1311).toFixed(2));var totalWeight=weight1311*setWall;var commentWall='($'+cost1311+' per set of style 1311)';var boxWall='1 to '+setWall+'&nbsp;&nbsp;&nbsp;72 pieces&nbsp;&nbsp;&nbsp;26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp;24lbs';var totalW='<span class="popTextRed">'+setWall+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+'lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine '+setWall+' '+set+' of Style 1311 = '+totalSet+' total pieces</span></span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>'}else if(difWall>36){setWall+=1;var totalSet=setWall*72;var costWall=addCommas((setWall*cost1311).toFixed(2));var commentWall='($'+cost1311+' per set of style 1311)';var totalWeight=weight1311*setWall;var extraPieces=totalSet-wall;var totalW='<span class="popTextRed">'+setWall+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSet+' pieces&nbsp;&nbsp;&nbsp;'+totalWeight+' lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/breakdown.png"></span></div><div class="leftSide"><span class="popTextBlack">Combine '+setWall+' Sets of Style 1311 = '+totalSet+' total pieces minus '+wall+' needed pieces = '+extraPieces+' extra pieces which can be used for cubes, names, walls, etc.</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/size.png"></span></div><div class="leftSide"><span class="popTextBlack">'+lenghtWall+'\' 6\" x '+widthWall+'\' 6\"</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+costWall+'&nbsp;&nbsp;&nbsp;</span>'+commentWall+'</div>';var boxWall='1 to '+setWall+'&nbsp;&nbsp;&nbsp; 72 Pieces&nbsp;&nbsp;&nbsp; 26\" x 25\" x 14\"&nbsp;&nbsp;&nbsp; 24lbs';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack">'+boxWall+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide">'+totalW+'</div>'}}html+='</div>';return html}}function countBoxesMats(position,header,costSM,totalSM){var totalSM=document.getElementById(totalSM).value;var totalCostSM=(costSM*totalSM).toFixed(2);var html='<img name="oo" style="margin-bottom: 6px;" src="http://www.alessco.com/images/CalculatorTitle_'+header+'.jpg" />';html+='<div style="margin-bottom: 75px;">';html+='<div style="margin-bottom: 4px;"><img name="piecesImage" src="http://www.alessco.com/images/mats.png"></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/pieces.png"></span></div><div class="leftSide" style="padding-bottom:-26px;"><span class="popTextRed">'+totalSM+'</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/cost.png"></span></div><div class="leftSide"><span class="popTextRed">$'+totalCostSM+'&nbsp;&nbsp;&nbsp;</span>($'+costSM+' per piece)</div>';if(totalSM==1){html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 of 1&nbsp;&nbsp;&nbsp;1 piece &nbsp;&nbsp;49\" x 7\" x 7\" &nbsp;&nbsp;6 lbs</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">1 box&nbsp;&nbsp;&nbsp;1 piece &nbsp;&nbsp;6 lbs</span></div>'}else{html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/box.png"></span></div><div class="leftSide"><span class="popTextBlack"> 1 to '+totalSM+'&nbsp;&nbsp;&nbsp;1 piece &nbsp;&nbsp;49\" x 7\" x 7\" &nbsp;&nbsp;6 lbs</span></div>';html+='<div class="rightSide"><span class="popTextGreyBold"><img name="piecesImage" src="http://www.alessco.com/images/total.png"></span></div><div class="leftSide"><span class="popTextRed">'+totalSM+' boxes&nbsp;&nbsp;&nbsp;</span>'+totalSM+' pieces&nbsp;&nbsp;&nbsp;'+totalSM*6+' lbs</div>'}html+='</div>';return html}
