function buttonBand(){

p=document.buttonBands;
warning=" ";
p.seven.value=sub(p.ten.value,3); p.eight.value=sub(p.ten.value,2);

p.mainStIn.value=Math.round(100*divide(p.stitches.value,p.width.value))/100
p.mainRowIn.value=Math.round(100*divide(p.rows.value,p.length.value))/100;


width23=Math.round(100* divide(21,p.mainStIn.value)/2)/100;


p.width23.value=width23;

if( isNaN(p.oneInch.value)  ){ oneInch=eval(p.width23.value)} else{oneInch=eval(p.oneInch.value)}

halfBand=Math.round(mult(oneInch,p.mainStIn.value) +0.5)
p.twentyStitch.value=halfBand*2+1;
p.fourNeedles.value=Math.round(halfBand* 4/11);

p.rows1.value=Math.round( mult(p.length1.value,p.mainRowIn.value));p.rows1_2.value=p.rows1.value; p.rows1_3.value= p.rows1.value 
p.buttonRow1.value=Math.round(mult(1,p.mainRowIn.value));
p.remainingRows.value=sub(p.rows1.value,p.buttonRow1.value); p.remainingRows3.value=p.remainingRows.value; p.remainingRows2.value=p.remainingRows.value; 

p.totalRows.value=Math.round(mult(p.length2.value,p.mainRowIn.value)+eval(p.rows1.value)) ;

p.remButtons.value=sub(p.numButtons.value,1);p.remButtons2.value=p.remButtons.value;
p.rowFloor.value=Math.floor(divide(p.remainingRows.value,p.remButtons.value));p.rowFloor2.value=p.rowFloor.value;
p.rowsRemainder.value=eval(p.remainingRows.value)%eval(p.remButtons.value);p.rowsRemainder2.value=p.rowsRemainder.value
p.firstChunk.value=sub(p.remButtons.value,p.rowsRemainder.value);
p.rowCeil.value=add(p.rowFloor.value,1);

p.oneInch2.value=oneInch;
p.twentyStitch2.value=p.twentyStitch.value;
p.buttonNeedles2.value=p.fourNeedles.value;
p.three.value=Math.round(halfBand* 4/11);
}
