function raglanCalcs(){

// gauge


p=document.sweaterForm;
warning=" ";
p.tooFewStitches.value ="No warning";
lengthBeforeRatio=1
widthBeforeRatio=1
shrinks= "<br>You entered told the program your swatch doesn't change gauge after washing."
if(eval(p.shrinks.selectedIndex)==0){
	p.lengthBefore.value=p.lengthAfter.value; 
	p.widthBefore.value=p.widthAfter.value;	
	shrinks= "You told the program your swatch doesn't change gauge after washing.  If it did shrink, but you forgot to take measurements before washing, use count rows to determine when to stop  knitting the lower yoke and sleeves.<br>"
	 }
else{
	lengthBeforeRatio=divide(p.lengthBefore.value,p.lengthAfter.value);
	widthBeforeRatio=divide(p.widthBefore.value,p.widthAfter.value)
	percentShrink= (lengthBeforeRatio-1)*100;
	percentWidthShrink= Math.round(widthBeforeRatio-1)*100
	shrinks= "You told the program your yarn will shrink " +Math.round(percentShrink) +" percent in length and "+percentWidthShrink+" percent in width  after washing.  <br>"
	}
lenghtBeforeRatio=divide(p.lengthBefore.value,p.lengthAfter.value);
//alert(lengthBeforeRatio + "=" + p.lengthBefore.value + " / " + p.lengthAfter.value);

calcGauge();
setMissesSizes();

//if(eval(p.sizeRange.selectedIndex)==0){setMissesSizes();}
//else if(p.sizeRange.selectedIndex==1){setMensSizes();}
//else if(p.sizeRange.selectedIndex==2){setKidsSizes();}



cardigan="yes"; 
/* if(cardigan="yes"){
	widenNeck=mult(p.neckWidth.value,0.2);
	lowerNeck=Math.round(10*widenNeck/2)/10;
	p.neckWidth.value=Math.round(add(p.neckWidth.value,widenNeck)*10)/10; 
	p.backNeckDepth.value=Math.round(add(p.backNeckDepth.value,widenNeck/2)*10)/10 ;
	p.armHoleDepth.value=sub(p.armHoleDepth.value,lowerNeck)
}
*/

//  neckline selections
	placket="no";

//if(p.neckStyle.selectedIndex==0){// barely shaped crew.  I'll be readjusting the neck later.
//    placket="no";
//}

// length changes
bolero="yes";
trimStitch="garter" 

// for shorty bolero, don't let V neck get lower than armole depth because I don't want to code that.
p.frontNeckDepth.value=Math.min(p.frontNeckDepth.value,p.armHoleDepth.value);

if(trimStitch== "garter"){
	p.cuffTrim.value=mult(p.cuffTrim.value,0.75);
	p.bodyTrim.value=mult(p.bodyTrim.value,0.75);
	if(bolero=="yes"){ // even shorter!
		minTrim=Math.ceil(divide(2,p.mainRowIn.value)*20)/20;
		p.cuffTrim.value=Math.round(10*  Math.max(minTrim,mult(p.cuffTrim.value,0.50) )  )/10;
		p.bodyTrim.value=Math.round(10*  Math.max(minTrim,mult(p.bodyTrim.value,0.50) ) ) /10;
		}	
	}


// for now, cardigan only.

 if(custom==0){
	p.frontNeckDepth.value=Math.round(mult(p.armHoleDepth.value,0.8)*10)/10;
	if(bolero=="yes"){
		minTotalLength=add(p.armHoleDepth.value,p.bodyTrim.value)+ divide(2,p.mainRowIn.value);
		p.totalLength.value= Math.max(mult(p.armHoleDepth.value, 1.35),minTotalLength) ;}
		p.totalLength.value=Math.ceil(mult(p.totalLength.value,10))/10;
		
		
}


p.frontNeckDepth.value = Math.min(Math.floor(mult(p.armHoleDepth.value,0.99)*10)/10,p.frontNeckDepth.value);

Trim()

rollOrRib= "ribbed bands";
hood="has no hood";
buttonOrHem ="pullover";  buttonBandWidth=0; 

//=============================================

calcMasterValuesHK();



//if(p.hood.selectedIndex ==1){hoodCalcs()}
// else{} // no hood.


// do this calc last so date only fills if window fills. 
now=new Date;
currentYear= now.getYear() + 1900;
currentMonth = now.getMonth() + 1;
currentDate=now.getHours() +":"+ now.getMinutes() +":"+ now.getSeconds() + " on " +currentMonth+ "/" +now.getDate() +"/"+currentYear;
p.patternCreationDate.value=currentDate;


}

//
function calcGauge(){

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

    //ribStIn=divide(p.ribStitches.value,p.widthRib.value); p.ribStIn.value=Math.round(100*ribStIn)/100;
   // ribRowIn=divide(p.ribRows.value,p.lengthRib.value); p.ribRowIn.value=Math.round(100*ribRowIn)/100;

   // lengthFactor=divide(p.lengthRib.value,p.lengthAfter.value);
    //widthFactor=divide(p.widthRib,p.widthAfter.value);
}

// removed button band code.