function butCheckForm_onclick()
{

//this appears to be Netscape repaired
//work with this by rebuilding to make 24--add 24 things in one step at a time
//this is worksheet for Lifestyle change and Lifestyle and Statin--August 11, 2001

//this is directly after change to formulas--making them a little less (now one further away)
//this is changes to physician code, etc, marked "August2001"

var myForm = document.form1;
if (myForm.txtCholesterol.value == "")  //why is this not blocked out?????
//{
//	alert("Please answer total cholesterol");
//	}
//	else if
//	(myForm.txtHDL.value == "")
//	alert("Please answer HDL");
//	else if
//	(myForm.txtTriglycerides.value == "")
//	alert("Please answer triglycerides");

//else
//	{
//	alert("Thank you for taking the test " + myForm.txtName.value);


//////////FORGOT TO INCLUDE SECOND-HAND SMOKE,  GET IT IN!!!!


//this is scoring
var score
var lipidscore
var cholesterolscore
var HDLscore
var triglyceridesscore
var triglyceridesscore2

//August2001
var triglyceridesstatin
var triglyceridesstatin2
var lipidscorestatin
var scorestroke
var lipidstatement
var triglycerideslifestyle
var triglycerideslifestyle2
var exerciselifescore
var exerciselifescore2
var stressscorelifestyle
var stressscorelifestyle2
var weightscorelifestyle
var weightscorelifestyle2
var waistscorelifestyle
var waistscorelifestyle2
var glucosescorelifestyle
var glucosescorelifestyle2
var smokingscorelifestyle
var smokingscorelifestyle2
var lifestylescore
var bpscorelifestyle
var lipidscorelifestyle
var lipidscorelifestyle2
var systolicscorelifestyle
var systolicscorelifestyle2
var diastolicscorelifestyle
var diastolicscorelifestyle2
var cholesterolscorelifestyle
var HDLscorelifestyle
var lipidscorelifestyle
var cholesterolscorelifestyleANDstatin
var HDLscorelifestyleANDstatin
var lipidscorelifestyleANDstatin
var lifestyleandstatinscore
var cholmult
var cholmultstatin
var cholmultlifestyle
var cholmultlifestyleANDstatin
var category
var statincategory
var lifestylecategory
var lifestyleandstatincategory

//august2001z
var printextras
printextras = (myForm.txtCheckPrint.value)





var systolic
var systolic2
var systolicscore
var systolicscore2
var diastolic
var diastolic2
var diastolicscore2
var diastolicscore
var bpscore
var glucosescore
var glucosescore2
var weightscore
var weightscore2
var waistscore
var waistscore2
var exercisescore
var stressscore
var exercisescore2
var stressscore2
var heartattacksnumber
var heartattackslast

var heartattackscore
var heartattacksscore
var heartdisease
var heartdiseasescore2
var heartdiseasescore
var angina
var anginascore

var anginascore2
var stroke
var parents
var parentsscore2
var grandparents
var grandparents2
var grandparentsscore2
var parentsscore
var grandparentsscore
var smoking
var smokingscore
var secondhandsmoke
var secondhandsmokescore
var secondhandsmokescore2
var pm
var pmscore
var pmscore2
var age
var agescore
var agescore2
var gender
var genderscore
var genderscore2
var name
var namescore   ////netscape added 47
var namescore2
var averagescore
var score
//var year
var year = today.getFullYear()


var namescore
//var timestamp
var timestamp= (Day + " " + Month + " " + date + ", " + year + ", " + hoursheading + ":" + minutes + " " + ampm)



cholesterolscore = parseInt(myForm.txtCholesterol.value)
HDLscore = parseInt(myForm.txtHDL.value)
triglyceridesscore = parseInt(myForm.txtTriglycerides.value)
systolicscore = parseInt(myForm.txtSystolic.value)
diastolicscore = parseInt(myForm.txtDiastolic.value)
glucosescore = parseInt(myForm.txtGlucose.value)
weightscore = parseInt(myForm.txtWeight.value)
waistscore = parseInt(myForm.txtWaist.value)
exercisescore = parseInt(myForm.txtExercise.value)
stressscore = parseInt(myForm.txtStress.value)
heartattacksnumberscore = parseInt(myForm.txtHeartAttacksNumber.value)
heartattackslastscore = parseInt(myForm.txtHeartAttacksLast.value)
heartdiseasescore = (myForm.txtHeartDisease.value)//no parse here, not a number
anginascore = (myForm.txtAngina.value)//no parse here, not a number
strokescore = (myForm.txtStroke.value)//no parse here, not a number
parentsscore = parseInt(myForm.txtParents.value)
grandparentsscore = parseInt(myForm.txtGrandparents.value)
smokingscore = parseInt(myForm.txtSmoking.value)
secondhandsmokescore = (myForm.txtSecondHandSmoke.value)
pmscore = (myForm.txtPM.value)
agescore = parseInt(myForm.txtAge.value)
genderscore = (myForm.txtGender.value)
namescore = (myForm.txtName.value)

//August2001
physicianinfo = (myForm.txtPhysician.value)
//statinscore = (myForm.txtStatin.value)
cholesterolscorestatin = (cholesterolscore * .75)
HDLscorestatin = (HDLscore * 1.07)
triglyceridesstatin = (triglyceridesscore * .83)

cholesterolscorelifestyle = (cholesterolscore * .875)
HDLscorelifestyle = (HDLscore * 1.025)

cholesterolscorelifestyleANDstatin = (cholesterolscore * .72)
HDLscorelifestyleANDstatin = (HDLscore * 1.05)

lipidscore = 1
heartattackscore = 0

//August2001
//a little test on lifestyle reduction
//cholesterolscore = (cholesterolscore * 5)
//THIS WORKS--IF A BOX IS CHECKED DO THIS


//this makes it work with switch statement, which will simplyfy later
//BUT INACTIVE NOW AND LIKELY NOT NECESSARY, USING IF STATEMENT INSTEAD
if (cholesterolscore < 151)
cholesterolswitch = 1
else if (cholesterolscore < 171)
cholesterolswitch = 2
else if (cholesterolscore < 191)
cholesterolswitch = 3
else if (cholesterolscore < 201)
cholesterolswitch = 4
else if (cholesterolscore < 211)
cholesterolswitch = 5
else if (cholesterolscore < 221)
cholesterolswitch = 6
else if (cholesterolscore < 231)
cholesterolswitch = 7
else if (cholesterolscore < 251)
cholesterolswitch = 8
else if (cholesterolscore < 271)
cholesterolswitch = 9
else if (cholesterolscore < 291)
cholesterolswitch = 10
else if (cholesterolscore < 311)
cholesterolswitch = 11
else if (cholesterolscore < 331)
cholesterolswitch = 12
else if (cholesterolscore >= 331)
cholesterolswitch = 13

if (HDLscore < 21)
HDLswitch = 13
else if (HDLscore < 31)
HDLswitch = 12
else if (HDLscore < 41)
HDLswitch = 11
else if (HDLscore < 46)
HDLswitch = 10
else if (HDLscore < 51)
HDLswitch = 9
else if (HDLscore < 56)
HDLswitch = 8
else if (HDLscore < 61)
HDLswitch = 7
else if (HDLscore < 71)
HDLswitch = 6
else if (HDLscore < 81)
HDLswitch = 5
else if (HDLscore < 91)
HDLswitch = 4
else if (HDLscore < 101)
HDLswitch = 3
else if (HDLscore < 111)
HDLswitch = 2
else if (HDLscore >= 111)
HDLswitch = 1

//switch (cholesterolswitch)

//this adds HDL score of 40 if cholesterol given but no HDL
if (cholesterolscore > 1 && document.form1.txtHDL.value == "")
HDLscore = 48

if (cholesterolscore > 1 && document.form1.txtHDL.value == "")
window.alert ("An average HDL of 48 was added as one was not provided")

if (document.form1.txtCholesterol.value == "" && document.form1.txtHDL.value == "")
window.alert ("The test will be calculated without cholesterol values being entered, but please note that cholesterol levels are a key factor in heart risk asessment")

//this is cholesterol, total with HDL nested
if (cholesterolscore < 151)
{
	if (HDLscore < 21)
	lipidscore = .3
	else if (HDLscore <31)
	lipidscore = 0
	else if (HDLscore <41)
	lipidscore = -.2
	else if (HDLscore <46)
	lipidscore = -.3
	else if (HDLscore <51)
	lipidscore = -.4
	else if (HDLscore <56)
	lipidscore = -.5
	else if (HDLscore <61)
	lipidscore = -.7
	else if (HDLscore <71)
	lipidscore = -.8
	else if (HDLscore <81)
	lipidscore = -.9
	else if (HDLscore <91)
	lipidscore = -1
	else if (HDLscore <101)
	lipidscore = -1.1
	else if (HDLscore <111)
	lipidscore = -1.1
	else if (HDLscore >=111)
	lipidscore = -1.1
	//else
	//lipidscore = 10000
}	
else if (cholesterolscore < 171)
{
	if (HDLscore < 21)
	lipidscore = .7
	else if (HDLscore <31)
	lipidscore = .4
	else if (HDLscore <41)
	lipidscore = .1
	else if (HDLscore <46)
	lipidscore = -.1
	else if (HDLscore <51)
	lipidscore = -.2
	else if (HDLscore <56)
	lipidscore = -.3
	else if (HDLscore <61)
	lipidscore = -.4
	else if (HDLscore <71)
	lipidscore = -.6
	else if (HDLscore <81)
	lipidscore = -.9
	else if (HDLscore <91)
	lipidscore = -1
	else if (HDLscore <101)
	lipidscore = -1
	else if (HDLscore <111)
	lipidscore = -1
	else if (HDLscore >=111)
	lipidscore = -1
//	else
//	lipidscore = 10000
}	
else if (cholesterolscore < 191)
{
	if (HDLscore < 21)
	lipidscore = 1.4
	else if (HDLscore <31)
	lipidscore = 1.1
	else if (HDLscore <41)
	lipidscore = .6
	else if (HDLscore <46)
	lipidscore = .4
	else if (HDLscore <51)
	lipidscore = .3
	else if (HDLscore <56)
	lipidscore = .2
	else if (HDLscore <61)
	lipidscore = .1
	else if (HDLscore <71)
	lipidscore = -.2
	else if (HDLscore <81)
	lipidscore = -.4
	else if (HDLscore <91)
	lipidscore = -.6
	else if (HDLscore <101)
	lipidscore = -.7
	else if (HDLscore <111)
	lipidscore = -.8
	else if (HDLscore >=111)
	lipidscore = -.9
//	else
//	lipidscore = 10000
}	
else if (cholesterolscore < 201)
{
	if (HDLscore < 21)
	lipidscore = 1.8
	else if (HDLscore <31)
	lipidscore = 1.4
	else if (HDLscore <41)
	lipidscore = .9
	else if (HDLscore <46)
	lipidscore = .7
	else if (HDLscore <51)
	lipidscore = .6
	else if (HDLscore <56)
	lipidscore = .4
	else if (HDLscore <61)
	lipidscore = .3
	else if (HDLscore <71)
	lipidscore = .1
	else if (HDLscore <81)
	lipidscore = -.2
	else if (HDLscore <91)
	lipidscore = -.4
	else if (HDLscore <101)
	lipidscore = -.5
	else if (HDLscore <111)
	lipidscore = -.6
	else if (HDLscore >=111)
	lipidscore = -.7
//	else
//	lipidscore = 10000
}	
else if (cholesterolscore < 211)
{
	if (HDLscore < 21)
	lipidscore = 2.1
	else if (HDLscore <31)
	lipidscore = 1.7
	else if (HDLscore <41)
	lipidscore = 1.2
	else if (HDLscore <46)
	lipidscore = 1
	else if (HDLscore <51)
	lipidscore = .8
	else if (HDLscore <56)
	lipidscore = .7
	else if (HDLscore <61)
	lipidscore = .5
	else if (HDLscore <71)
	lipidscore = .3
	else if (HDLscore <81)
	lipidscore = 0
	else if (HDLscore <91)
	lipidscore = -.2
	else if (HDLscore <101)
	lipidscore = -.4
	else if (HDLscore <111)
	lipidscore = -.5
	else if (HDLscore >=111)
	lipidscore = -.6
//	else
//	lipidscore = 10000
}	
else if (cholesterolscore < 221)
{
	if (HDLscore < 21)
	lipidscore = 2.4
	else if (HDLscore <31)
	lipidscore = 2
	else if (HDLscore <41)
	lipidscore = 1.4
	else if (HDLscore <46)
	lipidscore = 1.2
	else if (HDLscore <51)
	lipidscore = 1
	else if (HDLscore <56)
	lipidscore = .9
	else if (HDLscore <61)
	lipidscore = .7
	else if (HDLscore <71)
	lipidscore = .5
	else if (HDLscore <81)
	lipidscore = .2
	else if (HDLscore <91)
	lipidscore = -.1
	else if (HDLscore <101)
	lipidscore = -.3
	else if (HDLscore <111)
	lipidscore = -.4
	else if (HDLscore >=111)
	lipidscore = -.6
//	else
//	lipidscore = 10000
}	

else if (cholesterolscore < 231)
{
	if (HDLscore < 21)
	lipidscore = 2.7
	else if (HDLscore <31)
	lipidscore = 2.3
	else if (HDLscore <41)
	lipidscore = 1.6
	else if (HDLscore <46)
	lipidscore = 1.4
	else if (HDLscore <51)
	lipidscore = 1.2
	else if (HDLscore <56)
	lipidscore = 1
	else if (HDLscore <61)
	lipidscore = .9
	else if (HDLscore <71)
	lipidscore = .6
	else if (HDLscore <81)
	lipidscore = .3
	else if (HDLscore <91)
	lipidscore = 0
	else if (HDLscore <101)
	lipidscore = -.2
	else if (HDLscore <111)
	lipidscore = -.4
	else if (HDLscore >=111)
	lipidscore = -.6
//	else
//	lipidscore = 10000
}	

else if (cholesterolscore < 251)
{
	if (HDLscore < 21)
	lipidscore = 3.4
	else if (HDLscore <31)
	lipidscore = 2.8
	else if (HDLscore <41)
	lipidscore = 2.1
	else if (HDLscore <46)
	lipidscore = 1.9
	else if (HDLscore <51)
	lipidscore = 1.6
	else if (HDLscore <56)
	lipidscore = 1.4
	else if (HDLscore <61)
	lipidscore = 1.2
	else if (HDLscore <71)
	lipidscore = .9
	else if (HDLscore <81)
	lipidscore = .6
	else if (HDLscore <91)
	lipidscore = .2
	else if (HDLscore <101)
	lipidscore = -.1
	else if (HDLscore <111)
	lipidscore = -.3
	else if (HDLscore >=111)
	lipidscore = -.6
//	else
//	lipidscore = 10000
}	

else if (cholesterolscore < 271)
{
	if (HDLscore < 21)
	lipidscore = 4.4
	else if (HDLscore <31)
	lipidscore = 3.7
	else if (HDLscore <41)
	lipidscore = 2.8
	else if (HDLscore <46)
	lipidscore = 2.4
	else if (HDLscore <51)
	lipidscore = 2.1
	else if (HDLscore <56)
	lipidscore = 1.9
	else if (HDLscore <61)
	lipidscore = 1.7
	else if (HDLscore <71)
	lipidscore = 1.3
	else if (HDLscore <81)
	lipidscore = .9
	else if (HDLscore <91)
	lipidscore = .5
	else if (HDLscore <101)
	lipidscore = .1
	else if (HDLscore <111)
	lipidscore = -.2
	else if (HDLscore >=111)
	lipidscore = -.6
//	else
//	lipidscore = 10000
}	

else if (cholesterolscore < 291)
{
	if (HDLscore < 21)
	lipidscore = 5.7
	else if (HDLscore <31)
	lipidscore = 4.7
	else if (HDLscore <41)
	lipidscore = 3.8
	else if (HDLscore <46)
	lipidscore = 3.3
	else if (HDLscore <51)
	lipidscore = 2.9
	else if (HDLscore <56)
	lipidscore = 2.6
	else if (HDLscore <61)
	lipidscore = 2.3
	else if (HDLscore <71)
	lipidscore = 1.8
	else if (HDLscore <81)
	lipidscore = 1.3
	else if (HDLscore <91)
	lipidscore = 1
	else if (HDLscore <101)
	lipidscore = .5
	else if (HDLscore <111)
	lipidscore = .1
	else if (HDLscore >=111)
	lipidscore = -.4
//	else
//	lipidscore = 10000
}	

else if (cholesterolscore < 311)
{
	if (HDLscore < 21)
	lipidscore = 7.2
	else if (HDLscore <31)
	lipidscore = 5.9
	else if (HDLscore <41)
	lipidscore = 4.9
	else if (HDLscore <46)
	lipidscore = 4.3
	else if (HDLscore <51)
	lipidscore = 3.8
	else if (HDLscore <56)
	lipidscore = 3.5
	else if (HDLscore <61)
	lipidscore = 3.1
	else if (HDLscore <71)
	lipidscore = 2.5
	else if (HDLscore <81)
	lipidscore = 2
	else if (HDLscore <91)
	lipidscore = 1.5
	else if (HDLscore <101)
	lipidscore = 1.1
	else if (HDLscore <111)
	lipidscore = .5
	else if (HDLscore >=111)
	lipidscore = -.1
//	else
//	lipidscore = 10000
}	
else if (cholesterolscore < 331)
{
	if (HDLscore < 21)
	lipidscore = 7.9
	else if (HDLscore <31)
	lipidscore = 6.6
	else if (HDLscore <41)
	lipidscore = 5.6
	else if (HDLscore <46)
	lipidscore = 5.1
	else if (HDLscore <51)
	lipidscore = 4.6
	else if (HDLscore <56)
	lipidscore = 4.2
	else if (HDLscore <61)
	lipidscore = 3.8
	else if (HDLscore <71)
	lipidscore = 3.2
	else if (HDLscore <81)
	lipidscore = 2.7
	else if (HDLscore <91)
	lipidscore = 2.2
	else if (HDLscore <101)
	lipidscore = 1.8
	else if (HDLscore <111)
	lipidscore = 1.4
	else if (HDLscore >=111)
	lipidscore = .7
//	else
//	lipidscore = 10000
}	
else if (cholesterolscore >=331)
{
	if (HDLscore < 21)
	lipidscore = 9
	else if (HDLscore <31)
	lipidscore = 7.8
	else if (HDLscore <41)
	lipidscore = 6.6
	else if (HDLscore <46)
	lipidscore = 6.2
	else if (HDLscore <51)
	lipidscore = 5.8
	else if (HDLscore <56)
	lipidscore = 5.3
	else if (HDLscore <61)
	lipidscore = 4.9
	else if (HDLscore <71)
	lipidscore = 4.3
	else if (HDLscore <81)
	lipidscore = 3.8
	else if (HDLscore <91)
	lipidscore = 3.4
	else if (HDLscore <101)
	lipidscore = 2.9
	else if (HDLscore <111)
	lipidscore = 2.5
	else if (HDLscore >=111)
	lipidscore = 1.8
//	else
//	lipidscore = 10000
}	

//august2001
//this is cholesterol with statin reduction
//this is cholesterol, total with HDL nested
if (cholesterolscorestatin < 151)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = .3
	else if (HDLscorestatin <31)
	lipidscorestatin = 0
	else if (HDLscorestatin <41)
	lipidscorestatin = -.2
	else if (HDLscorestatin <46)
	lipidscorestatin = -.3
	else if (HDLscorestatin <51)
	lipidscorestatin = -.4
	else if (HDLscorestatin <56)
	lipidscorestatin = -.5
	else if (HDLscorestatin <61)
	lipidscorestatin = -.7
	else if (HDLscorestatin <71)
	lipidscorestatin = -.8
	else if (HDLscorestatin <81)
	lipidscorestatin = -.9
	else if (HDLscorestatin <91)
	lipidscorestatin = -1
	else if (HDLscorestatin <101)
	lipidscorestatin = -1.1
	else if (HDLscorestatin <111)
	lipidscorestatin = -1.1
	else if (HDLscorestatin >=111)
	lipidscorestatin = -1.1
	//else
	//lipidscorestatin = 10000
}	
else if (cholesterolscorestatin < 171)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = .7
	else if (HDLscorestatin <31)
	lipidscorestatin = .4
	else if (HDLscorestatin <41)
	lipidscorestatin = .1
	else if (HDLscorestatin <46)
	lipidscorestatin = -.1
	else if (HDLscorestatin <51)
	lipidscorestatin = -.2
	else if (HDLscorestatin <56)
	lipidscorestatin = -.3
	else if (HDLscorestatin <61)
	lipidscorestatin = -.4
	else if (HDLscorestatin <71)
	lipidscorestatin = -.6
	else if (HDLscorestatin <81)
	lipidscorestatin = -.9
	else if (HDLscorestatin <91)
	lipidscorestatin = -1
	else if (HDLscorestatin <101)
	lipidscorestatin = -1
	else if (HDLscorestatin <111)
	lipidscorestatin = -1
	else if (HDLscorestatin >=111)
	lipidscorestatin = -1
//	else
//	lipidscorestatin = 10000
}	
else if (cholesterolscorestatin < 191)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 1.4
	else if (HDLscorestatin <31)
	lipidscorestatin = 1.1
	else if (HDLscorestatin <41)
	lipidscorestatin = .6
	else if (HDLscorestatin <46)
	lipidscorestatin = .4
	else if (HDLscorestatin <51)
	lipidscorestatin = .3
	else if (HDLscorestatin <56)
	lipidscorestatin = .2
	else if (HDLscorestatin <61)
	lipidscorestatin = .1
	else if (HDLscorestatin <71)
	lipidscorestatin = -.2
	else if (HDLscorestatin <81)
	lipidscorestatin = -.4
	else if (HDLscorestatin <91)
	lipidscorestatin = -.6
	else if (HDLscorestatin <101)
	lipidscorestatin = -.7
	else if (HDLscorestatin <111)
	lipidscorestatin = -.8
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.9
//	else
//	lipidscorestatin = 10000
}	
else if (cholesterolscorestatin < 201)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 1.8
	else if (HDLscorestatin <31)
	lipidscorestatin = 1.4
	else if (HDLscorestatin <41)
	lipidscorestatin = .9
	else if (HDLscorestatin <46)
	lipidscorestatin = .7
	else if (HDLscorestatin <51)
	lipidscorestatin = .6
	else if (HDLscorestatin <56)
	lipidscorestatin = .4
	else if (HDLscorestatin <61)
	lipidscorestatin = .3
	else if (HDLscorestatin <71)
	lipidscorestatin = .1
	else if (HDLscorestatin <81)
	lipidscorestatin = -.2
	else if (HDLscorestatin <91)
	lipidscorestatin = -.4
	else if (HDLscorestatin <101)
	lipidscorestatin = -.5
	else if (HDLscorestatin <111)
	lipidscorestatin = -.6
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.7
//	else
//	lipidscorestatin = 10000
}	
else if (cholesterolscorestatin < 211)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 2.1
	else if (HDLscorestatin <31)
	lipidscorestatin = 1.7
	else if (HDLscorestatin <41)
	lipidscorestatin = 1.2
	else if (HDLscorestatin <46)
	lipidscorestatin = 1
	else if (HDLscorestatin <51)
	lipidscorestatin = .8
	else if (HDLscorestatin <56)
	lipidscorestatin = .7
	else if (HDLscorestatin <61)
	lipidscorestatin = .5
	else if (HDLscorestatin <71)
	lipidscorestatin = .3
	else if (HDLscorestatin <81)
	lipidscorestatin = 0
	else if (HDLscorestatin <91)
	lipidscorestatin = -.2
	else if (HDLscorestatin <101)
	lipidscorestatin = -.4
	else if (HDLscorestatin <111)
	lipidscorestatin = -.5
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.6
//	else
//	lipidscorestatin = 10000
}	
else if (cholesterolscorestatin < 221)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 2.4
	else if (HDLscorestatin <31)
	lipidscorestatin = 2
	else if (HDLscorestatin <41)
	lipidscorestatin = 1.4
	else if (HDLscorestatin <46)
	lipidscorestatin = 1.2
	else if (HDLscorestatin <51)
	lipidscorestatin = 1
	else if (HDLscorestatin <56)
	lipidscorestatin = .9
	else if (HDLscorestatin <61)
	lipidscorestatin = .7
	else if (HDLscorestatin <71)
	lipidscorestatin = .5
	else if (HDLscorestatin <81)
	lipidscorestatin = .2
	else if (HDLscorestatin <91)
	lipidscorestatin = -.1
	else if (HDLscorestatin <101)
	lipidscorestatin = -.3
	else if (HDLscorestatin <111)
	lipidscorestatin = -.4
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.6
//	else
//	lipidscorestatin = 10000
}	

else if (cholesterolscorestatin < 231)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 2.7
	else if (HDLscorestatin <31)
	lipidscorestatin = 2.3
	else if (HDLscorestatin <41)
	lipidscorestatin = 1.6
	else if (HDLscorestatin <46)
	lipidscorestatin = 1.4
	else if (HDLscorestatin <51)
	lipidscorestatin = 1.2
	else if (HDLscorestatin <56)
	lipidscorestatin = 1
	else if (HDLscorestatin <61)
	lipidscorestatin = .9
	else if (HDLscorestatin <71)
	lipidscorestatin = .6
	else if (HDLscorestatin <81)
	lipidscorestatin = .3
	else if (HDLscorestatin <91)
	lipidscorestatin = 0
	else if (HDLscorestatin <101)
	lipidscorestatin = -.2
	else if (HDLscorestatin <111)
	lipidscorestatin = -.4
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.6
//	else
//	lipidscorestatin = 10000
}	

else if (cholesterolscorestatin < 251)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 3.4
	else if (HDLscorestatin <31)
	lipidscorestatin = 2.8
	else if (HDLscorestatin <41)
	lipidscorestatin = 2.1
	else if (HDLscorestatin <46)
	lipidscorestatin = 1.9
	else if (HDLscorestatin <51)
	lipidscorestatin = 1.6
	else if (HDLscorestatin <56)
	lipidscorestatin = 1.4
	else if (HDLscorestatin <61)
	lipidscorestatin = 1.2
	else if (HDLscorestatin <71)
	lipidscorestatin = .9
	else if (HDLscorestatin <81)
	lipidscorestatin = .6
	else if (HDLscorestatin <91)
	lipidscorestatin = .2
	else if (HDLscorestatin <101)
	lipidscorestatin = -.1
	else if (HDLscorestatin <111)
	lipidscorestatin = -.3
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.6
//	else
//	lipidscorestatin = 10000
}	

else if (cholesterolscorestatin < 271)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 4.4
	else if (HDLscorestatin <31)
	lipidscorestatin = 3.7
	else if (HDLscorestatin <41)
	lipidscorestatin = 2.8
	else if (HDLscorestatin <46)
	lipidscorestatin = 2.4
	else if (HDLscorestatin <51)
	lipidscorestatin = 2.1
	else if (HDLscorestatin <56)
	lipidscorestatin = 1.9
	else if (HDLscorestatin <61)
	lipidscorestatin = 1.7
	else if (HDLscorestatin <71)
	lipidscorestatin = 1.3
	else if (HDLscorestatin <81)
	lipidscorestatin = .9
	else if (HDLscorestatin <91)
	lipidscorestatin = .5
	else if (HDLscorestatin <101)
	lipidscorestatin = .1
	else if (HDLscorestatin <111)
	lipidscorestatin = -.2
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.6
//	else
//	lipidscorestatin = 10000
}	

else if (cholesterolscorestatin < 291)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 5.7
	else if (HDLscorestatin <31)
	lipidscorestatin = 4.7
	else if (HDLscorestatin <41)
	lipidscorestatin = 3.8
	else if (HDLscorestatin <46)
	lipidscorestatin = 3.3
	else if (HDLscorestatin <51)
	lipidscorestatin = 2.9
	else if (HDLscorestatin <56)
	lipidscorestatin = 2.6
	else if (HDLscorestatin <61)
	lipidscorestatin = 2.3
	else if (HDLscorestatin <71)
	lipidscorestatin = 1.8
	else if (HDLscorestatin <81)
	lipidscorestatin = 1.3
	else if (HDLscorestatin <91)
	lipidscorestatin = 1
	else if (HDLscorestatin <101)
	lipidscorestatin = .5
	else if (HDLscorestatin <111)
	lipidscorestatin = .1
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.4
//	else
//	lipidscorestatin = 10000
}	

else if (cholesterolscorestatin < 311)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 7.2
	else if (HDLscorestatin <31)
	lipidscorestatin = 5.9
	else if (HDLscorestatin <41)
	lipidscorestatin = 4.9
	else if (HDLscorestatin <46)
	lipidscorestatin = 4.3
	else if (HDLscorestatin <51)
	lipidscorestatin = 3.8
	else if (HDLscorestatin <56)
	lipidscorestatin = 3.5
	else if (HDLscorestatin <61)
	lipidscorestatin = 3.1
	else if (HDLscorestatin <71)
	lipidscorestatin = 2.5
	else if (HDLscorestatin <81)
	lipidscorestatin = 2
	else if (HDLscorestatin <91)
	lipidscorestatin = 1.5
	else if (HDLscorestatin <101)
	lipidscorestatin = 1.1
	else if (HDLscorestatin <111)
	lipidscorestatin = .5
	else if (HDLscorestatin >=111)
	lipidscorestatin = -.1
//	else
//	lipidscorestatin = 10000
}	
else if (cholesterolscorestatin < 331)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 7.9
	else if (HDLscorestatin <31)
	lipidscorestatin = 6.6
	else if (HDLscorestatin <41)
	lipidscorestatin = 5.6
	else if (HDLscorestatin <46)
	lipidscorestatin = 5.1
	else if (HDLscorestatin <51)
	lipidscorestatin = 4.6
	else if (HDLscorestatin <56)
	lipidscorestatin = 4.2
	else if (HDLscorestatin <61)
	lipidscorestatin = 3.8
	else if (HDLscorestatin <71)
	lipidscorestatin = 3.2
	else if (HDLscorestatin <81)
	lipidscorestatin = 2.7
	else if (HDLscorestatin <91)
	lipidscorestatin = 2.2
	else if (HDLscorestatin <101)
	lipidscorestatin = 1.8
	else if (HDLscorestatin <111)
	lipidscorestatin = 1.4
	else if (HDLscorestatin >=111)
	lipidscorestatin = .7
//	else
//	lipidscorestatin = 10000
}	
else if (cholesterolscorestatin >=331)
{
	if (HDLscorestatin < 21)
	lipidscorestatin = 9
	else if (HDLscorestatin <31)
	lipidscorestatin = 7.8
	else if (HDLscorestatin <41)
	lipidscorestatin = 6.6
	else if (HDLscorestatin <46)
	lipidscorestatin = 6.2
	else if (HDLscorestatin <51)
	lipidscorestatin = 5.8
	else if (HDLscorestatin <56)
	lipidscorestatin = 5.3
	else if (HDLscorestatin <61)
	lipidscorestatin = 4.9
	else if (HDLscorestatin <71)
	lipidscorestatin = 4.3
	else if (HDLscorestatin <81)
	lipidscorestatin = 3.8
	else if (HDLscorestatin <91)
	lipidscorestatin = 3.4
	else if (HDLscorestatin <101)
	lipidscorestatin = 2.9
	else if (HDLscorestatin <111)
	lipidscorestatin = 2.5
	else if (HDLscorestatin >=111)
	lipidscorestatin = 1.8
//	else
//	lipidscorestatin = 10000
}	


//august2001b
//this is cholesterol with lifestyle reduction
//this is cholesterol, total with HDL nested
if (cholesterolscorelifestyle < 151)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = .3
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 0
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = -.2
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = -.3
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = -.4
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = -.5
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = -.7
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = -.8
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = -.9
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = -1
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = -1.1
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -1.1
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -1.1
	//else
	//lipidscorelifestyle = 10000
}	
else if (cholesterolscorelifestyle < 171)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = .7
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = .4
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = .1
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = -.1
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = -.2
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = -.3
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = -.4
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = -.6
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = -.9
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = -1
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = -1
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -1
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -1
//	else
//	lipidscorelifestyle = 10000
}	
else if (cholesterolscorelifestyle < 191)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 1.4
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 1.1
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = .6
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = .4
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = .3
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = .2
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = .1
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = -.2
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = -.4
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = -.6
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = -.7
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -.8
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.9
//	else
//	lipidscorelifestyle = 10000
}	
else if (cholesterolscorelifestyle < 201)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 1.8
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 1.4
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = .9
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = .7
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = .6
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = .4
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = .3
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = .1
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = -.2
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = -.4
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = -.5
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -.6
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.7
//	else
//	lipidscorelifestyle = 10000
}	
else if (cholesterolscorelifestyle < 211)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 2.1
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 1.7
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 1.2
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 1
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = .8
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = .7
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = .5
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = .3
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = 0
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = -.2
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = -.4
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -.5
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.6
//	else
//	lipidscorelifestyle = 10000
}	
else if (cholesterolscorelifestyle < 221)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 2.4
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 2
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 1.4
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 1.2
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = 1
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = .9
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = .7
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = .5
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = .2
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = -.1
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = -.3
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -.4
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.6
//	else
//	lipidscorelifestyle = 10000
}	

else if (cholesterolscorelifestyle < 231)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 2.7
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 2.3
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 1.6
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 1.4
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = 1.2
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = 1
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = .9
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = .6
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = .3
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = 0
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = -.2
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -.4
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.6
//	else
//	lipidscorelifestyle = 10000
}	

else if (cholesterolscorelifestyle < 251)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 3.4
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 2.8
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 2.1
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 1.9
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = 1.6
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = 1.4
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = 1.2
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = .9
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = .6
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = .2
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = -.1
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -.3
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.6
//	else
//	lipidscorelifestyle = 10000
}	

else if (cholesterolscorelifestyle < 271)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 4.4
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 3.7
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 2.8
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 2.4
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = 2.1
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = 1.9
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = 1.7
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = 1.3
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = .9
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = .5
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = .1
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = -.2
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.6
//	else
//	lipidscorelifestyle = 10000
}	

else if (cholesterolscorelifestyle < 291)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 5.7
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 4.7
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 3.8
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 3.3
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = 2.9
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = 2.6
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = 2.3
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = 1.8
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = 1.3
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = 1
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = .5
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = .1
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.4
//	else
//	lipidscorelifestyle = 10000
}	

else if (cholesterolscorelifestyle < 311)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 7.2
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 5.9
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 4.9
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 4.3
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = 3.8
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = 3.5
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = 3.1
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = 2.5
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = 2
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = 1.5
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = 1.1
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = .5
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = -.1
//	else
//	lipidscorelifestyle = 10000
}	
else if (cholesterolscorelifestyle < 331)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 7.9
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 6.6
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 5.6
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 5.1
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = 4.6
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = 4.2
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = 3.8
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = 3.2
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = 2.7
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = 2.2
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = 1.8
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = 1.4
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = .7
//	else
//	lipidscorelifestyle = 10000
}	
else if (cholesterolscorelifestyle >=331)
{
	if (HDLscorelifestyle < 21)
	lipidscorelifestyle = 9
	else if (HDLscorelifestyle <31)
	lipidscorelifestyle = 7.8
	else if (HDLscorelifestyle <41)
	lipidscorelifestyle = 6.6
	else if (HDLscorelifestyle <46)
	lipidscorelifestyle = 6.2
	else if (HDLscorelifestyle <51)
	lipidscorelifestyle = 5.8
	else if (HDLscorelifestyle <56)
	lipidscorelifestyle = 5.3
	else if (HDLscorelifestyle <61)
	lipidscorelifestyle = 4.9
	else if (HDLscorelifestyle <71)
	lipidscorelifestyle = 4.3
	else if (HDLscorelifestyle <81)
	lipidscorelifestyle = 3.8
	else if (HDLscorelifestyle <91)
	lipidscorelifestyle = 3.4
	else if (HDLscorelifestyle <101)
	lipidscorelifestyle = 2.9
	else if (HDLscorelifestyle <111)
	lipidscorelifestyle = 2.5
	else if (HDLscorelifestyle >=111)
	lipidscorelifestyle = 1.8
//	else
//	lipidscorelifestyle = 10000
}	






//august2001b
//this is cholesterol with statin AND lifestyle reduction
//this is cholesterol, total with HDL nested
if (cholesterolscorelifestyleANDstatin < 151)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = .3
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 0
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = -.2
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = -.3
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = -.4
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = -.5
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = -.7
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = -.8
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = -.9
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = -1
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = -1.1
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -1.1
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -1.1
	//else
	//lipidscorelifestyleANDstatin = 10000
}	
else if (cholesterolscorelifestyleANDstatin < 171)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = .7
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = .4
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = .1
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = -.1
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = -.2
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = -.3
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = -.4
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = -.6
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = -.9
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = -1
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = -1
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -1
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -1
//	else
//	lipidscorelifestyleANDstatin = 10000
}	
else if (cholesterolscorelifestyleANDstatin < 191)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 1.4
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 1.1
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = .6
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = .4
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = .3
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = .2
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = .1
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = -.2
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = -.4
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = -.6
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = -.7
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -.8
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.9
//	else
//	lipidscorelifestyleANDstatin = 10000
}	
else if (cholesterolscorelifestyleANDstatin < 201)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 1.8
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 1.4
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = .9
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = .7
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = .6
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = .4
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = .3
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = .1
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = -.2
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = -.4
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = -.5
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -.6
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.7
//	else
//	lipidscorelifestyleANDstatin = 10000
}	
else if (cholesterolscorelifestyleANDstatin < 211)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 2.1
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 1.7
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 1.2
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 1
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = .8
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = .7
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = .5
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = .3
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = 0
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = -.2
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = -.4
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -.5
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.6
//	else
//	lipidscorelifestyleANDstatin = 10000
}	
else if (cholesterolscorelifestyleANDstatin < 221)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 2.4
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 2
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 1.4
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 1.2
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = 1
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = .9
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = .7
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = .5
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = .2
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = -.1
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = -.3
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -.4
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.6
//	else
//	lipidscorelifestyleANDstatin = 10000
}	

else if (cholesterolscorelifestyleANDstatin < 231)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 2.7
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 2.3
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 1.6
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 1.4
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = 1.2
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = 1
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = .9
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = .6
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = .3
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = 0
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = -.2
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -.4
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.6
//	else
//	lipidscorelifestyleANDstatin = 10000
}	

else if (cholesterolscorelifestyleANDstatin < 251)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 3.4
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 2.8
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 2.1
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 1.9
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = 1.6
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = 1.4
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = 1.2
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = .9
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = .6
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = .2
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = -.1
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -.3
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.6
//	else
//	lipidscorelifestyleANDstatin = 10000
}	

else if (cholesterolscorelifestyleANDstatin < 271)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 4.4
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 3.7
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 2.8
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 2.4
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = 2.1
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = 1.9
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = 1.7
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = 1.3
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = .9
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = .5
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = .1
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = -.2
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.6
//	else
//	lipidscorelifestyleANDstatin = 10000
}	

else if (cholesterolscorelifestyleANDstatin < 291)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 5.7
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 4.7
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 3.8
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 3.3
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = 2.9
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = 2.6
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = 2.3
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = 1.8
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = 1.3
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = 1
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = .5
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = .1
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.4
//	else
//	lipidscorelifestyleANDstatin = 10000
}	

else if (cholesterolscorelifestyleANDstatin < 311)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 7.2
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 5.9
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 4.9
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 4.3
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = 3.8
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = 3.5
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = 3.1
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = 2.5
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = 2
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = 1.5
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = 1.1
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = .5
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = -.1
//	else
//	lipidscorelifestyleANDstatin = 10000
}	
else if (cholesterolscorelifestyleANDstatin < 331)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 7.9
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 6.6
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 5.6
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 5.1
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = 4.6
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = 4.2
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = 3.8
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = 3.2
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = 2.7
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = 2.2
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = 1.8
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = 1.4
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = .7
//	else
//	lipidscorelifestyleANDstatin = 10000
}	
else if (cholesterolscorelifestyleANDstatin >=331)
{
	if (HDLscorelifestyleANDstatin < 21)
	lipidscorelifestyleANDstatin = 9
	else if (HDLscorelifestyleANDstatin <31)
	lipidscorelifestyleANDstatin = 7.8
	else if (HDLscorelifestyleANDstatin <41)
	lipidscorelifestyleANDstatin = 6.6
	else if (HDLscorelifestyleANDstatin <46)
	lipidscorelifestyleANDstatin = 6.2
	else if (HDLscorelifestyleANDstatin <51)
	lipidscorelifestyleANDstatin = 5.8
	else if (HDLscorelifestyleANDstatin <56)
	lipidscorelifestyleANDstatin = 5.3
	else if (HDLscorelifestyleANDstatin <61)
	lipidscorelifestyleANDstatin = 4.9
	else if (HDLscorelifestyleANDstatin <71)
	lipidscorelifestyleANDstatin = 4.3
	else if (HDLscorelifestyleANDstatin <81)
	lipidscorelifestyleANDstatin = 3.8
	else if (HDLscorelifestyleANDstatin <91)
	lipidscorelifestyleANDstatin = 3.4
	else if (HDLscorelifestyleANDstatin <101)
	lipidscorelifestyleANDstatin = 2.9
	else if (HDLscorelifestyleANDstatin <111)
	lipidscorelifestyleANDstatin = 2.5
	else if (HDLscorelifestyleANDstatin >=111)
	lipidscorelifestyleANDstatin = 1.8
//	else
//	lipidscorelifestyleANDstatin = 10000
}	


//this is triglycerides
if (triglyceridesscore < 101)
triglyceridesscore2 = -.1
else if (triglyceridesscore < 151)
triglyceridesscore2 = 0
else if (triglyceridesscore < 201)
triglyceridesscore2 = .1
else if (triglyceridesscore < 251)
triglyceridesscore2 = .2
else if (triglyceridesscore < 301)
triglyceridesscore2 = .3
else if (triglyceridesscore < 401)
triglyceridesscore2 = .4
else if (triglyceridesscore < 501)
triglyceridesscore2 = .5
else if (triglyceridesscore < 751)
triglyceridesscore2 = .6
else if (triglyceridesscore < 1001)
triglyceridesscore2 = .8
else if (triglyceridesscore < 1501)
triglyceridesscore2 = 1.1
else if (triglyceridesscore >= 1501)
triglyceridesscore2 = 1.4
else
triglyceridesscore2 = 0

//august2001
//this is triglycerides with statin reduction
if (triglyceridesstatin < 101)
triglyceridesstatin2 = -.1
else if (triglyceridesstatin < 151)
triglyceridesstatin2 = 0
else if (triglyceridesstatin < 201)
triglyceridesstatin2 = .1
else if (triglyceridesstatin < 251)
triglyceridesstatin2 = .2
else if (triglyceridesstatin < 301)
triglyceridesstatin2 = .3
else if (triglyceridesstatin < 401)
triglyceridesstatin2 = .4
else if (triglyceridesstatin < 501)
triglyceridesstatin2 = .5
else if (triglyceridesstatin < 751)
triglyceridesstatin2 = .6
else if (triglyceridesstatin < 1001)
triglyceridesstatin2 = .8
else if (triglyceridesstatin < 1501)
triglyceridesstatin2 = 1.1
else if (triglyceridesstatin >= 1501)
triglyceridesstatin2 = 1.4
else
triglyceridesstatin2 = 0


if (triglyceridesscore > 150)
triglycerideslifestyle = (triglyceridesscore * .85)

//august2001b  adding lifestyle
//this is triglycerides with lifestyle reduction
if (triglycerideslifestyle < 101)
triglycerideslifestyle2 = -.1
else if (triglycerideslifestyle < 151)
triglycerideslifestyle2 = 0
else if (triglycerideslifestyle < 201)
triglycerideslifestyle2 = .1
else if (triglycerideslifestyle < 251)
triglycerideslifestyle2 = .2
else if (triglycerideslifestyle < 301)
triglycerideslifestyle2 = .3
else if (triglycerideslifestyle < 401)
triglycerideslifestyle2 = .4
else if (triglycerideslifestyle < 501)
triglycerideslifestyle2 = .5
else if (triglycerideslifestyle < 751)
triglycerideslifestyle2 = .6
else if (triglycerideslifestyle < 1001)
triglycerideslifestyle2 = .8
else if (triglycerideslifestyle < 1501)
triglycerideslifestyle2 = 1.1
else if (triglycerideslifestyle >= 1501)
triglycerideslifestyle2 = 1.4
else
triglycerideslifestyle2 = 0


//this is systolic
if (systolicscore < 111)
systolicscore2 = -.15
else if (systolicscore < 121)
systolicscore2 = -.1
else if (systolicscore < 131)
systolicscore2 = 0
else if (systolicscore < 141)
systolicscore2 = .1
else if (systolicscore < 151)
systolicscore2 = .3
else if (systolicscore < 161)
systolicscore2 = .4
else if (systolicscore < 171)
systolicscore2 = .5
else if (systolicscore < 181)
systolicscore2 = .7
else if (systolicscore < 191)
systolicscore2 = .9
else if (systolicscore < 201)
systolicscore2 = 1.1
else if (systolicscore < 211)
systolicscore2 = 1.5
else if (systolicscore >=211)
systolicscore2 = 2.1
else
systolicscore2 = 0


//august2001b
//this is systolic lifestyle
if (systolic > 115)
(systolicscorelifestyle = systolicscore * .925)

if (systolicscorelifestyle < 111)
systolicscorelifestyle2 = -.15
else if (systolicscorelifestyle < 121)
systolicscorelifestyle2 = -.1
else if (systolicscorelifestyle < 131)
systolicscorelifestyle2 = 0
else if (systolicscorelifestyle < 141)
systolicscorelifestyle2 = .1
else if (systolicscorelifestyle < 151)
systolicscorelifestyle2 = .3
else if (systolicscorelifestyle < 161)
systolicscorelifestyle2 = .4
else if (systolicscorelifestyle < 171)
systolicscorelifestyle2 = .5
else if (systolicscorelifestyle < 181)
systolicscorelifestyle2 = .7
else if (systolicscorelifestyle < 191)
systolicscorelifestyle2 = .9
else if (systolicscorelifestyle < 201)
systolicscorelifestyle2 = 1.1
else if (systolicscorelifestyle < 211)
systolicscorelifestyle2 = 1.5
else if (systolicscorelifestyle >=211)
systolicscorelifestyle2 = 2.1
else
systolicscorelifestyle2 = 0


//this is diastolic
if (diastolicscore < 81)
diastolicscore2 = -.05
else if (diastolicscore < 86)
diastolicscore2 = 0
else if (diastolicscore < 91)
diastolicscore2 = .05
else if (diastolicscore < 96)
diastolicscore2 = .1
else if (diastolicscore < 101)
diastolicscore2 = .2
else if (diastolicscore < 106)
diastolicscore2 = .4
else if (diastolicscore < 111)
diastolicscore2 = .6
else if (diastolicscore < 116)
diastolicscore2 = .8
else if (diastolicscore < 121)
diastolicscore2 = 1.1
else if (diastolicscore < 126)
diastolicscore2 = 1.5
else if (diastolicscore >= 126)
diastolicscore2 = 1.8
else
diastolicscore2 = 0

//august2001b
//this is diastolic lifestyle
if (diastolicscore > 81)
(diastolicscorelifestyle = diastolicscore * .925)
if (diastolicscorelifestyle < 81)
diastolicscorelifestyle2 = -.05
else if (diastolicscorelifestyle < 86)
diastolicscorelifestyle2 = 0
else if (diastolicscorelifestyle < 91)
diastolicscorelifestyle2 = .05
else if (diastolicscorelifestyle < 96)
diastolicscorelifestyle2 = .1
else if (diastolicscorelifestyle < 101)
diastolicscorelifestyle2 = .2
else if (diastolicscorelifestyle < 106)
diastolicscorelifestyle2 = .4
else if (diastolicscorelifestyle < 111)
diastolicscorelifestyle2 = .6
else if (diastolicscorelifestyle < 116)
diastolicscorelifestyle2 = .8
else if (diastolicscorelifestyle < 121)
diastolicscorelifestyle2 = 1.1
else if (diastolicscorelifestyle < 126)
diastolicscorelifestyle2 = 1.5
else if (diastolicscorelifestyle >= 126)
diastolicscorelifestyle2 = 1.8
else
diastolicscorelifestyle2 = 0



//this is glucose, sugar, diabetes
if (glucosescore < 101)
glucosescore2 = -.1
else if (glucosescore < 111)
glucosescore2 = 0
else if (glucosescore < 126)
glucosescore2 = .1
else if (glucosescore < 151)
glucosescore2 = .6
else if (glucosescore < 201)
glucosescore2 = .8
else if (glucosescore < 301)
 glucosescore2 = 1.1
else if (glucosescore < 401)
glucosescore2 = 1.4
else if (glucosescore < 601)
glucosescore2 = 1.8
else if (glucosescore < 801)
glucosescore2 = 2.2
else if (glucosescore < 1001)
glucosescore2 = 2.6
else if (glucosescore >= 1001)
glucosescore2 = 3.0
else
glucosescore2 = 0


//august2001b
//this is glucose, sugar, diabetes with lifestyle
if (glucosescore > 100)
(glucosescorelifestyle = glucosescore * .875)

if (glucosescorelifestyle < 101)
glucosescorelifestyle2 = -.1
else if (glucosescorelifestyle < 111)
glucosescorelifestyle2 = 0
else if (glucosescorelifestyle < 126)
glucosescorelifestyle2 = .1
else if (glucosescorelifestyle < 151)
glucosescorelifestyle2 = .6
else if (glucosescorelifestyle < 201)
glucosescorelifestyle2 = .8
else if (glucosescorelifestyle < 301)
 glucosescorelifestyle2 = 1.1
else if (glucosescorelifestyle < 401)
glucosescorelifestyle2 = 1.4
else if (glucosescorelifestyle < 601)
glucosescorelifestyle2 = 1.8
else if (glucosescorelifestyle < 801)
glucosescorelifestyle2 = 2.2
else if (glucosescorelifestyle < 1001)
glucosescorelifestyle2 = 2.6
else if (glucosescorelifestyle >= 1001)
glucosescorelifestyle2 = 3.0
else
glucosescorelifestyle2 = 0



//this is overweight
if (weightscore < 1)
weightscore2 = -.1
else if (weightscore < 11)
weightscore2 = 0
else if (weightscore < 21)
weightscore2 = .05
else if (weightscore < 31)
weightscore2 = .1
else if (weightscore < 41)
weightscore2 = .2
else if (weightscore < 51)
weightscore2 = .3
else if (weightscore < 61)
weightscore2 = .4
else if (weightscore < 71)
weightscore2 = .5
else if (weightscore < 81)
weightscore2 = .6
else if (weightscore < 101)
weightscore2 = .8
else if (weightscore < 126)
weightscore2 = 1
else if (weightscore < 151)
weightscore2 = 1.2
else if (weightscore < 201)
weightscore2 = 1.5
else if (weightscore < 301)
weightscore2 = 2.0
else if (weightscore >= 301)
weightscore2 = 2.3
else
weightscore2 = 0

//august2001b
//this is overweight lifestyle
if (weightscore > 0)
(weightscorelifestyle = weightscore / 2)
if (weightscorelifestyle < 1)
weightscorelifestyle2 = -.1
else if (weightscorelifestyle < 11)
weightscorelifestyle2 = 0
else if (weightscorelifestyle < 21)
weightscorelifestyle2 = .05
else if (weightscorelifestyle < 31)
weightscorelifestyle2 = .1
else if (weightscorelifestyle < 41)
weightscorelifestyle2 = .2
else if (weightscorelifestyle < 51)
weightscorelifestyle2 = .3
else if (weightscorelifestyle < 61)
weightscorelifestyle2 = .4
else if (weightscorelifestyle < 71)
weightscorelifestyle2 = .5
else if (weightscorelifestyle < 81)
weightscorelifestyle2 = .6
else if (weightscorelifestyle < 101)
weightscorelifestyle2 = .8
else if (weightscorelifestyle < 126)
weightscorelifestyle2 = 1
else if (weightscorelifestyle < 151)
weightscorelifestyle2 = 1.2
else if (weightscorelifestyle < 201)
weightscorelifestyle2 = 1.5
else if (weightscorelifestyle < 301)
weightscorelifestyle2 = 2.0
else if (weightscorelifestyle >= 301)
weightscorelifestyle2 = 2.3
else
weightscorelifestyle2 = 0


//this is waist
if (waistscore < 30)
waistscore2 = -.2
else if (waistscore < 32)
waistscore2 = -.1
else if (waistscore < 34)
waistscore2 = 0
else if (waistscore < 36)
waistscore2 = .05
else if (waistscore < 38)
waistscore2 = .1
else if (waistscore < 40)
waistscore2 = .3
else if (waistscore < 42)
waistscore2 = .5
else if (waistscore < 44)
waistscore2 = .7
else if (waistscore < 46)
waistscore2 = .8
else if (waistscore < 48)
waistscore2 = 1
else if (waistscore < 50)
waistscore2 = 1.1
else if (waistscore < 52)
waistscore2 = 1.3
else if (waistscore < 54)
waistscore2 = 1.4
else if (waistscore < 56)
waistscore2 = 1.6
else if (waistscore < 58)
waistscore2 = 1.8
else if (waistscore < 60)
waistscore2 = 2
else if (waistscore >= 60)
waistscore2 = 2.2
else
waistscore2 = 0

//august2001b
//this is waist lifestyle
if (waistscore >=30)
(waistscorelifestyle = waistscore * .875)

if (waistscorelifestyle < 30)
waistscorelifestyle2 = -.2
else if (waistscorelifestyle < 32)
waistscorelifestyle2 = -.1
else if (waistscorelifestyle < 34)
waistscorelifestyle2 = 0
else if (waistscorelifestyle < 36)
waistscorelifestyle2 = .05
else if (waistscorelifestyle < 38)
waistscorelifestyle2 = .1
else if (waistscorelifestyle < 40)
waistscorelifestyle2 = .3
else if (waistscorelifestyle < 42)
waistscorelifestyle2 = .5
else if (waistscorelifestyle < 44)
waistscorelifestyle2 = .7
else if (waistscorelifestyle < 46)
waistscorelifestyle2 = .8
else if (waistscorelifestyle < 48)
waistscorelifestyle2 = 1
else if (waistscorelifestyle < 50)
waistscorelifestyle2 = 1.1
else if (waistscorelifestyle < 52)
waistscorelifestyle2 = 1.3
else if (waistscorelifestyle < 54)
waistscorelifestyle2 = 1.4
else if (waistscorelifestyle < 56)
waistscorelifestyle2 = 1.6
else if (waistscorelifestyle < 58)
waistscorelifestyle2 = 1.8
else if (waistscorelifestyle < 60)
waistscorelifestyle2 = 2
else if (waistscorelifestyle >= 60)
waistscorelifestyle2 = 2.2
else
waistscorelifestyle2 = 0


//this is exercise
if (exercisescore <= 1)
exercisescore2 = -.3
else if (exercisescore <= 2)
exercisescore2 = -.2
else if (exercisescore <= 3)
exercisescore2 = 0
else if (exercisescore <= 4)
exercisescore2 = .2
else if (exercisescore <= 5)
exercisescore2 = .5
else
exercisescore2 = 0

//august2001b
//this is exercise after lifestyle change
if (exercisescore <= 5)
(exerciselifescore = 3)
else if (exercisescore <= 4)
(exerciselifescore = 2)
else if (exercisescore <= 3)
(exerciselifescore = 2)
else
(exerciselifescore = exercisescore)


if (exerciselifescore <= 1)
exerciselifescore2 = -.3
else if (exerciselifescore <= 2)
exerciselifescore2 = -.2
else if (exerciselifescore <= 3)
exerciselifescore2 = 0
else if (exerciselifescore <= 4)
exerciselifescore2 = .2
else if (exerciselifescore <= 5)
exerciselifescore2 = .5
else
exerciselifescore2 = 0


//this is stress
if (stressscore <= 1)
stressscore2 = -.2
else if (stressscore <= 2)
stressscore2 = -.1
else if (stressscore <= 3)
stressscore2 = 0
else if (stressscore <= 4)
stressscore2 = .2
else if (stressscore <= 5)
stressscore2 = .5
else
stressscore2 = 0

//august2001b
//this is stress lifestyle
if (stressscore >=2)
(stressscorelifestyle = stressscore - 1)

if (stressscorelifestyle <= 1)
stressscorelifestyle2 = -.2
else if (stressscorelifestyle <= 2)
stressscorelifestyle2 = -.1
else if (stressscorelifestyle <= 3)
stressscorelifestyle2 = 0
else if (stressscorelifestyle <= 4)
stressscorelifestyle2 = .2
else if (stressscorelifestyle <= 5)
stressscorelifestyle2 = .5
else
stressscorelifestyle2 = 0


//this is heart attacks
if (heartattacksnumberscore < 1)
	heartattackscore = -.1
else if (heartattacksnumberscore < 2)
{
	if (heartattackslastscore <= 1)
	heartattackscore = 4.5
	else if (heartattackslastscore <= 3)
	heartattackscore = 3.5
	else if (heartattackslastscore <= 6)
	heartattackscore = 2.5
	else if (heartattackslastscore <= 10)
	heartattackscore = 1.5
	else if (heartattackslastscore > 10)
	heartattackscore = 1
	else
	heartattackscore = 0
}	
else if (heartattacksnumberscore < 3)
{
	if (heartattackslastscore <= 1)
	heartattackscore = 6.5
	else if (heartattackslastscore <= 3)
	heartattackscore = 5
	else if (heartattackslastscore <= 6)
	heartattackscore = 3
	else if (heartattackslastscore <= 10)
	heartattackscore = 2
	else if (heartattackslastscore > 10)
	heartattackscore = 1.5
	else
	heartattackscore = 0
}	
else if (heartattacksnumberscore >= 2)
{
	if (heartattackslastscore <= 1)
	heartattackscore = 7.5
	else if (heartattackslastscore <= 3)
	heartattackscore = 6.5
	else if (heartattackslastscore <= 6)
	heartattackscore = 4.5
	else if (heartattackslastscore <= 10)
	heartattackscore = 3
	else if (heartattackslastscore > 10)
	heartattackscore = 1.8
	else
	heartattackscore = 0
}	

//this is heart disease
//below, or if no heart attacks
if (heartattackscore <.1)
{
if (heartdiseasescore == "y" || (heartdiseasescore == "Y" || heartdiseasescore == "YES" || heartdiseasescore == "yes") || heartdiseasescore == "Yes")
heartdiseasescore2 = 1.5
else if (heartdiseasescore == "n" || heartdiseasescore == "N" || heartdiseasescore == "NO"|| heartdiseasescore == "no"|| heartdiseasescore == "No" || heartdiseasescore == "")
heartdiseasescore2 = 0
}
//below if they have had a heart attack
else if (heartattackscore >= .1)
{
heartdiseasescore2 = 0
}
else
heartdiseasescore2 = 0

//this is angina
if (anginascore == "m" || anginascore == "mild")
anginascore2 = .4
else if (anginascore == "mo" || anginascore == "moderate")
anginascore2 = .9
else if (anginascore == "s" || anginascore == "severe")
anginascore2 = 1.8
else if (anginascore == "" || anginascore == 0 || anginascore == "none")
anginascore2 = 0
else
anginascore2 = 0

//this is stroke
if (strokescore == "n" || strokescore == "N" || strokescore == "NO" || strokescore == "no" || strokescore == "No" || strokescore == "")
strokescore2 = 0
else if (strokescore == "y" || strokescore == "Y" || strokescore == "YES" || strokescore == "yes" || strokescore == "Yes")
strokescore2 = .5
else
strokescore2 = 0

//this is parents
if (parentsscore == 0)
parentsscore2 = -.1
else if (parentsscore == 1)
parentsscore2 = .2
else if (parentsscore == 2)
parentsscore2 = .6
else
parentsscore2 = 0

//this is grandparents
if (grandparentsscore == 0)
grandparentsscore2 = 0
else if (grandparentsscore == 1)
grandparentsscore2 = .1
else if (grandparentsscore == 2)
grandparentsscore2 = .2
else if (grandparentsscore == 3)
grandparentsscore2 = .4
else if (grandparentsscore == 4)
grandparentsscore2 = .6
else
grandparentsscore2 = 0

//this is smoking
if (smokingscore < 1)
smokingscore2 = -.1
else if (smokingscore < 11)
smokingscore2 = .4
else if (smokingscore < 21)
smokingscore2 = .8
else if (smokingscore < 31)
smokingscore2 = 1.2
else if (smokingscore < 41)
smokingscore2 = 1.5
else if (smokingscore < 51)
smokingscore2 = 1.8
else if (smokingscore < 61)
smokingscore2 = 2.1
else if (smokingscore >= 61)
smokingscore2 = 2.4
else
smokingscore2 = 0

//august2001b
//this is smoking lifestyle
smokingscorelifestyle2 = -.1


//this is second hand smoke
if (secondhandsmokescore == "m" || secondhandsmokescore == "mild")
secondhandsmokescore2 = .4
else if (secondhandsmokescore == "mo" || secondhandsmokescore == "moderate")
secondhandsmokescore2 = .7
else if (secondhandsmokescore == "s" || secondhandsmokescore == "severe")
secondhandsmokescore2 = 1.4
else if (secondhandsmokescore == "" || secondhandsmokescore == 0 || secondhandsmokescore == "none")
secondhandsmokescore2 = 0
else
secondhandsmokescore2 = 0


//this is postmenopausal
if (pmscore == "n" || pmscore == "N" || pmscore == "NO" || pmscore == "no" || pmscore == "No" ||pmscore == "")
pmscore2 = 0
else if (pmscore == "y" || pmscore == "Y" || pmscore == "YES" || pmscore == "yes" || pmscore == "Yes")
pmscore2 = .2
else
pmscore2 = 0

bpscore = (systolicscore2 + diastolicscore2)
bpscorelifestyle = (systolicscorelifestyle2 + diastolicscorelifestyle2)


//this is cholesterol multiplier
switch (lipidscore)
{
case -.3:
	cholmult = .75;
	break;

case -.2:
	cholmult = .77;
	break;

case -.1:
	cholmult = .8;
	break;

case 0:
	cholmult = .82;
	break;

case .1:
	cholmult = .85;
	break;

case .2:
	cholmult = .87;
	break;

case .3:
	cholmult = .9;
	break;

case .4:
	cholmult = .92;
	break;

case .5:
	cholmult = .94;
	break;

case .6:
	cholmult = .96;
	break;

case .7:
	cholmult = .97;
	break;

case .8:
	cholmult = .98;
	break;

case .9:
	cholmult = .99;
	break;

case 1:
	cholmult = 1;
	break;

case 1.1:
	cholmult = 1.02;
	break;

case 1.2:
	cholmult = 1.04;
	break;

case 1.3:
	cholmult = 1.06;
	break;

case 1.4:
	cholmult = 1.08;
	break;

case 1.5:
	cholmult = 1.1;
	break;

case 1.6:
	cholmult = 1.11;
	break;

case 1.7:
	cholmult = 1.13;
	break;

case 1.8:
	cholmult = 1.15;
	break;

case 1.9:
	cholmult = 1.17;
	break;

case 2:
	cholmult = 1.2;
	break;

case 2.1:
	cholmult = 1.22;
	break;

case 2.2:
	cholmult = 1.24;
	break;

case 2.3:
	cholmult = 1.26;
	break;

case 2.4:
	cholmult = 1.28;
	break;

case 2.5:
	cholmult = 1.3;
	break;

case 2.6:
	cholmult = 1.32;
	break;

case 2.7:
	cholmult = 1.34;
	break;

case 2.8:
	cholmult = 1.35;
	break;
}

if (lipidscore < -.3){
	cholmult = .73
}


if (lipidscore > 2.8){
	cholmult = 1.37
}



//august2001b
//this is cholesterol multiplier with statin
switch (lipidscorestatin)
{
case -.3:
	cholmultstatin = .75;
	break;

case -.2:
	cholmultstatin = .77;
	break;

case -.1:
	cholmultstatin = .8;
	break;

case 0:
	cholmultstatin = .82;
	break;

case .1:
	cholmultstatin = .85;
	break;

case .2:
	cholmultstatin = .87;
	break;

case .3:
	cholmultstatin = .9;
	break;

case .4:
	cholmultstatin = .92;
	break;

case .5:
	cholmultstatin = .94;
	break;

case .6:
	cholmultstatin = .96;
	break;

case .7:
	cholmultstatin = .97;
	break;

case .8:
	cholmultstatin = .98;
	break;

case .9:
	cholmultstatin = .99;
	break;

case 1:
	cholmultstatin = 1;
	break;

case 1.1:
	cholmultstatin = 1.02;
	break;

case 1.2:
	cholmultstatin = 1.04;
	break;

case 1.3:
	cholmultstatin = 1.06;
	break;

case 1.4:
	cholmultstatin = 1.08;
	break;

case 1.5:
	cholmultstatin = 1.1;
	break;

case 1.6:
	cholmultstatin = 1.11;
	break;

case 1.7:
	cholmultstatin = 1.13;
	break;

case 1.8:
	cholmultstatin = 1.15;
	break;

case 1.9:
	cholmultstatin = 1.17;
	break;

case 2:
	cholmultstatin = 1.2;
	break;

case 2.1:
	cholmultstatin = 1.22;
	break;

case 2.2:
	cholmultstatin = 1.24;
	break;

case 2.3:
	cholmultstatin = 1.26;
	break;

case 2.4:
	cholmultstatin = 1.28;
	break;

case 2.5:
	cholmultstatin = 1.3;
	break;

case 2.6:
	cholmultstatin = 1.32;
	break;

case 2.7:
	cholmultstatin = 1.34;
	break;

case 2.8:
	cholmultstatin = 1.35;
	break;
}

if (lipidscorestatin < -.3){
	cholmultstatin = .73
}


if (lipidscorestatin > 2.8){
	cholmultstatin = 1.37
}





//august2001b
//this is cholesterol multiplier with lifestyle
switch (lipidscorelifestyle)
{
case -.3:
	cholmultlifestyle = .75;
	break;

case -.2:
	cholmultlifestyle = .77;
	break;

case -.1:
	cholmultlifestyle = .8;
	break;

case 0:
	cholmultlifestyle = .82;
	break;

case .1:
	cholmultlifestyle = .85;
	break;

case .2:
	cholmultlifestyle = .87;
	break;

case .3:
	cholmultlifestyle = .9;
	break;

case .4:
	cholmultlifestyle = .92;
	break;

case .5:
	cholmultlifestyle = .94;
	break;

case .6:
	cholmultlifestyle = .96;
	break;

case .7:
	cholmultlifestyle = .97;
	break;

case .8:
	cholmultlifestyle = .98;
	break;

case .9:
	cholmultlifestyle = .99;
	break;

case 1:
	cholmultlifestyle = 1;
	break;

case 1.1:
	cholmultlifestyle = 1.02;
	break;

case 1.2:
	cholmultlifestyle = 1.04;
	break;

case 1.3:
	cholmultlifestyle = 1.06;
	break;

case 1.4:
	cholmultlifestyle = 1.08;
	break;

case 1.5:
	cholmultlifestyle = 1.1;
	break;

case 1.6:
	cholmultlifestyle = 1.11;
	break;

case 1.7:
	cholmultlifestyle = 1.13;
	break;

case 1.8:
	cholmultlifestyle = 1.15;
	break;

case 1.9:
	cholmultlifestyle = 1.17;
	break;

case 2:
	cholmultlifestyle = 1.2;
	break;

case 2.1:
	cholmultlifestyle = 1.22;
	break;

case 2.2:
	cholmultlifestyle = 1.24;
	break;

case 2.3:
	cholmultlifestyle = 1.26;
	break;

case 2.4:
	cholmultlifestyle = 1.28;
	break;

case 2.5:
	cholmultlifestyle = 1.3;
	break;

case 2.6:
	cholmultlifestyle = 1.32;
	break;

case 2.7:
	cholmultlifestyle = 1.34;
	break;

case 2.8:
	cholmultlifestyle = 1.35;
	break;
}

if (lipidscorelifestyle < -.3){
	cholmultlifestyle = .73
}


if (lipidscorelifestyle > 2.8){
	cholmultlifestyle = 1.37
}






//this is cholesterol multiplier
switch (lipidscorelifestyleANDstatin)
{
case -.3:
	cholmultlifestyleANDstatin = .75;
	break;

case -.2:
	cholmultlifestyleANDstatin = .77;
	break;

case -.1:
	cholmultlifestyleANDstatin = .8;
	break;

case 0:
	cholmultlifestyleANDstatin = .82;
	break;

case .1:
	cholmultlifestyleANDstatin = .85;
	break;

case .2:
	cholmultlifestyleANDstatin = .87;
	break;

case .3:
	cholmultlifestyleANDstatin = .9;
	break;

case .4:
	cholmultlifestyleANDstatin = .92;
	break;

case .5:
	cholmultlifestyleANDstatin = .94;
	break;

case .6:
	cholmultlifestyleANDstatin = .96;
	break;

case .7:
	cholmultlifestyleANDstatin = .97;
	break;

case .8:
	cholmultlifestyleANDstatin = .98;
	break;

case .9:
	cholmultlifestyleANDstatin = .99;
	break;

case 1:
	cholmultlifestyleANDstatin = 1;
	break;

case 1.1:
	cholmultlifestyleANDstatin = 1.02;
	break;

case 1.2:
	cholmultlifestyleANDstatin = 1.04;
	break;

case 1.3:
	cholmultlifestyleANDstatin = 1.06;
	break;

case 1.4:
	cholmultlifestyleANDstatin = 1.08;
	break;

case 1.5:
	cholmultlifestyleANDstatin = 1.1;
	break;

case 1.6:
	cholmultlifestyleANDstatin = 1.11;
	break;

case 1.7:
	cholmultlifestyleANDstatin = 1.13;
	break;

case 1.8:
	cholmultlifestyleANDstatin = 1.15;
	break;

case 1.9:
	cholmultlifestyleANDstatin = 1.17;
	break;

case 2:
	cholmultlifestyleANDstatin = 1.2;
	break;

case 2.1:
	cholmultlifestyleANDstatin = 1.22;
	break;

case 2.2:
	cholmultlifestyleANDstatin = 1.24;
	break;

case 2.3:
	cholmultlifestyleANDstatin = 1.26;
	break;

case 2.4:
	cholmultlifestyleANDstatin = 1.28;
	break;

case 2.5:
	cholmultlifestyleANDstatin = 1.3;
	break;

case 2.6:
	cholmultlifestyleANDstatin = 1.32;
	break;

case 2.7:
	cholmultlifestyleANDstatin = 1.34;
	break;

case 2.8:
	cholmultlifestyleANDstatin = 1.35;
	break;
}

if (lipidscorelifestyleANDstatin < -.3){
	cholmultlifestyleANDstatin = .73
}


if (lipidscorelifestyleANDstatin > 2.8){
	cholmultlifestyleANDstatin = 1.37
}


//score = (lipidscore + triglyceridesscore2 + bpscore + glucosescore2 + weightscore2 + waistscore2 + exercisescore2 + stressscore2 + heartattackscore + heartdiseasescore2 + anginascore2 + strokescore2 + parentsscore2 + grandparentsscore2 + smokingscore2 + secondhandsmokescore2 + pmscore2)
score = (((triglyceridesscore2 + bpscore + glucosescore2 + weightscore2 + waistscore2 + exercisescore2 + stressscore2 + heartdiseasescore2 + anginascore2 + strokescore2 + smokingscore2 + secondhandsmokescore2 + pmscore2) * cholmult) + lipidscore + heartattackscore + parentsscore2 + grandparentsscore2)

//August2001
scorestroke = (((triglyceridesscore2 + bpscore + glucosescore2 + weightscore2 + waistscore2 + exercisescore2 + stressscore2 + heartdiseasescore2 + anginascore2 + strokescore2 + smokingscore2 + secondhandsmokescore2 + pmscore2) * cholmult) + lipidscore + heartattackscore + parentsscore2 + grandparentsscore2) + (bpscore * 2) + (stressscore2 * .5) + (strokescore2 * 3.5) + ((lipidscore - 1) * .6)
scorestroke = (scorestroke * .83)  //this can go on line above if I can figure out math


//august2001
//document.write (triglyceridesstatin2)
//document.write (lipidscorestatin)

statinscore = (((triglyceridesstatin2 + bpscore + glucosescore2 + weightscore2 + waistscore2 + exercisescore2 + stressscore2 + heartdiseasescore2 + anginascore2 + strokescore2 + smokingscore2 + secondhandsmokescore2 + pmscore2) * cholmultstatin) + lipidscorestatin + heartattackscore + parentsscore2 + grandparentsscore2)
lifestylescore = (((triglycerideslifestyle2 + bpscorelifestyle + glucosescorelifestyle2 + weightscorelifestyle2 + waistscorelifestyle2 + exerciselifescore2 + stressscorelifestyle2 + heartdiseasescore2 + anginascore2 + strokescore2 + smokingscorelifestyle2 + secondhandsmokescore2 + pmscore2) * cholmultlifestyle) + lipidscorelifestyle + heartattackscore + parentsscore2 + grandparentsscore2)
lifestyleandstatinscore = (((triglyceridesstatin2 + bpscorelifestyle + glucosescorelifestyle2 + weightscorelifestyle2 + waistscorelifestyle2 + exerciselifescore2 + stressscorelifestyle2 + heartdiseasescore2 + anginascore2 + strokescore2 + smokingscorelifestyle2 + secondhandsmokescore2 + pmscore2) * cholmultlifestyleANDstatin) + lipidscorelifestyleANDstatin + heartattackscore + parentsscore2 + grandparentsscore2)
smokingquitscore = (((triglyceridesscore2 + bpscore + glucosescore2 + weightscore2 + waistscore2 + exercisescore2 + stressscore2 + heartdiseasescore2 + anginascore2 + strokescore2 + secondhandsmokescore2 + pmscore2 - .1) * cholmult) + lipidscore + heartattackscore + parentsscore2 + grandparentsscore2)



//this is test slow down function for low score
if (score <= -.2)
(score = .1)
else if (score <= -.1)
(score = .2)
else if (score <= 0)
(score = .3)
else if (score <= .1)
(score = .3)
else if (score <= .2)
(score = .4)
else if (score <= .3)
(score = .4)
else if (score <= .4)
(score = .5)
else if (score <= .5)
(score = .5)

//this is test slow down function for high score
//below makes it go up by 75% after 4
if (score < 2)
(score = score)
else if (score < 3)
(score = ((score - 2) * .8) + 2)
else if (score < 4)
(score = ((score - 3) * .7) + 2.7)
else if (score < 5)
(score = ((score - 4) * .65) + 3.4)
else if (score < 6)
(score = ((score - 5) * .6) + 4)//these are not full number (in this case 5)
						//because would not be taking fraction previously
						//taken off from previous category (see Excel sheet)
else if (score >= 6)
(score = ((score - 6) * .5) + 4.6)


//this mathematically fixes no decimal problem
score = Math.floor(score * 10) /10


//these make minimum and maximum scores
if (score <= .1)
(score = .1)

if (score > 15)
(score = 15)


//august2001b
//this is test slow down function for low score (statinscore)
if (statinscore <= -.2)
(statinscore = .1)
else if (statinscore <= -.1)
(statinscore = .2)
else if (statinscore <= 0)
(statinscore = .3)
else if (statinscore <= .1)
(statinscore = .3)
else if (statinscore <= .2)
(statinscore = .4)
else if (statinscore <= .3)
(statinscore = .4)
else if (statinscore <= .4)
(statinscore = .5)
else if (statinscore <= .5)
(statinscore = .5)

//this is test slow down function for high statinscore
//below makes it go up by 75% after 4
if (statinscore < 2)
(statinscore = statinscore)
else if (statinscore < 3)
(statinscore = ((statinscore - 2) * .8) + 2)
else if (statinscore < 4)
(statinscore = ((statinscore - 3) * .7) + 2.7)
else if (statinscore < 5)
(statinscore = ((statinscore - 4) * .65) + 3.4)
else if (statinscore < 6)
(statinscore = ((statinscore - 5) * .6) + 4)//these are not full number (in this case 5)
						//because would not be taking fraction previously
						//taken off from previous category (see Excel sheet)
else if (statinscore >= 6)
(statinscore = ((statinscore - 6) * .5) + 4.6)


//this mathematically fixes no decimal problem
statinscore = Math.floor(statinscore * 10) /10


//these make minimum and maximum scores
if (statinscore <= .1)
(statinscore = .1)

if (statinscore > 15)
(statinscore = 15)


//august2001b
//this is test slow down function for low score (lifestylescore)
if (lifestylescore <= -.2)
(lifestylescore = .1)
else if (lifestylescore <= -.1)
(lifestylescore = .2)
else if (lifestylescore <= 0)
(lifestylescore = .3)
else if (lifestylescore <= .1)
(lifestylescore = .3)
else if (lifestylescore <= .2)
(lifestylescore = .4)
else if (lifestylescore <= .3)
(lifestylescore = .4)
else if (lifestylescore <= .4)
(lifestylescore = .5)
else if (lifestylescore <= .5)
(lifestylescore = .5)

//this is test slow down function for high lifestylescore
//below makes it go up by 75% after 4
if (lifestylescore < 2)
(lifestylescore = lifestylescore)
else if (lifestylescore < 3)
(lifestylescore = ((lifestylescore - 2) * .8) + 2)
else if (lifestylescore < 4)
(lifestylescore = ((lifestylescore - 3) * .7) + 2.7)
else if (lifestylescore < 5)
(lifestylescore = ((lifestylescore - 4) * .65) + 3.4)
else if (lifestylescore < 6)
(lifestylescore = ((lifestylescore - 5) * .6) + 4)//these are not full number (in this case 5)
						//because would not be taking fraction previously
						//taken off from previous category (see Excel sheet)
else if (lifestylescore >= 6)
(lifestylescore = ((lifestylescore - 6) * .5) + 4.6)


//this mathematically fixes no decimal problem
lifestylescore = Math.floor(lifestylescore * 10) /10


//these make minimum and maximum scores
if (lifestylescore <= .1)
(lifestylescore = .1)

if (lifestylescore > 15)
(lifestylescore = 15)


//august2001b
//this is test slow down function for low score (lifestyleANDstatin)
if (lifestyleandstatinscore <= -.2)
(lifestyleandstatinscore = .1)
else if (lifestyleandstatinscore <= -.1)
(lifestyleandstatinscore = .2)
else if (lifestyleandstatinscore <= 0)
(lifestyleandstatinscore = .3)
else if (lifestyleandstatinscore <= .1)
(lifestyleandstatinscore = .3)
else if (lifestyleandstatinscore <= .2)
(lifestyleandstatinscore = .4)
else if (lifestyleandstatinscore <= .3)
(lifestyleandstatinscore = .4)
else if (lifestyleandstatinscore <= .4)
(lifestyleandstatinscore = .5)
else if (lifestyleandstatinscore <= .5)
(lifestyleandstatinscore = .5)

//this is test slow down function for high lifestyleandstatinscore
//below makes it go up by 75% after 4
if (lifestyleandstatinscore < 2)
(lifestyleandstatinscore = lifestyleandstatinscore)
else if (lifestyleandstatinscore < 3)
(lifestyleandstatinscore = ((lifestyleandstatinscore - 2) * .8) + 2)
else if (lifestyleandstatinscore < 4)
(lifestyleandstatinscore = ((lifestyleandstatinscore - 3) * .7) + 2.7)
else if (lifestyleandstatinscore < 5)
(lifestyleandstatinscore = ((lifestyleandstatinscore - 4) * .65) + 3.4)
else if (lifestyleandstatinscore < 6)
(lifestyleandstatinscore = ((lifestyleandstatinscore - 5) * .6) + 4)//these are not full number (in this case 5)
						//because would not be taking fraction previously
						//taken off from previous category (see Excel sheet)
else if (lifestyleandstatinscore >= 6)
(lifestyleandstatinscore = ((lifestyleandstatinscore - 6) * .5) + 4.6)


//this mathematically fixes no decimal problem
lifestyleandstatinscore = Math.floor(lifestyleandstatinscore * 10) /10


//these make minimum and maximum scores
if (lifestyleandstatinscore <= .1)
(lifestyleandstatinscore = .1)

if (lifestyleandstatinscore > 15)
(lifestyleandstatinscore = 15)




//august2001b
//this is test slow down function for low score (smokingquitscore)
if (smokingquitscore <= -.2)
(smokingquitscore = .1)
else if (smokingquitscore <= -.1)
(smokingquitscore = .2)
else if (smokingquitscore <= 0)
(smokingquitscore = .3)
else if (smokingquitscore <= .1)
(smokingquitscore = .3)
else if (smokingquitscore <= .2)
(smokingquitscore = .4)
else if (smokingquitscore <= .3)
(smokingquitscore = .4)
else if (smokingquitscore <= .4)
(smokingquitscore = .5)
else if (smokingquitscore <= .5)
(smokingquitscore = .5)

//this is test slow down function for high smokingquitscore
//below makes it go up by 75% after 4
if (smokingquitscore < 2)
(smokingquitscore = smokingquitscore)
else if (smokingquitscore < 3)
(smokingquitscore = ((smokingquitscore - 2) * .8) + 2)
else if (smokingquitscore < 4)
(smokingquitscore = ((smokingquitscore - 3) * .7) + 2.7)
else if (smokingquitscore < 5)
(smokingquitscore = ((smokingquitscore - 4) * .65) + 3.4)
else if (smokingquitscore < 6)
(smokingquitscore = ((smokingquitscore - 5) * .6) + 4)//these are not full number (in this case 5)
						//because would not be taking fraction previously
						//taken off from previous category (see Excel sheet)
else if (smokingquitscore >= 6)
(smokingquitscore = ((smokingquitscore - 6) * .5) + 4.6)


//this mathematically fixes no decimal problem
smokingquitscore = Math.floor(smokingquitscore * 10) /10


//these make minimum and maximum scores
if (smokingquitscore <= .1)
(smokingquitscore = .1)

if (smokingquitscore > 15)
(smokingquitscore = 15)






//if (score < 4)
//(score = score)
//else if (score >= 4)
//(score = ((score - 4) * .75) + 4)


//if (score <= 4)
//(score = score)
//else if (score <= 5)
//(score = 10)
//else if (score <= 6)
//(score = 20)
//else if (score <= 7)
//(score = 30)
//else if (score <= 8)
//(score = 40)
//else if (score <= 9)
//(score = 50)
//else if (score <= 10)
//(score = 60)
//else if (score > 10)
//(score = 70)

//if (score <=4)
//(score =		4	)
//else if (score <=	5		)
//(score =		8	)



//this is 10-year risk percentage
if((genderscore == "f" || genderscore == "F") && agescore < 25)
{
if (score < .1)
tenyearrisk = "<1"
else if (score < .3)
tenyearrisk = "<1"
else if (score <= .5)
tenyearrisk = "<1"
else if (score <= .8)
tenyearrisk = "<1"
else if (score <= 1)
tenyearrisk = "<1"
else if (score <= 1.25)
tenyearrisk = "<1"
else if (score <= 1.5)
tenyearrisk = "<1"
else if (score <= 1.75)
tenyearrisk = 1
else if (score <= 2)
tenyearrisk = 1
else if (score <= 2.5)
tenyearrisk = 2
else if (score <= 3)
tenyearrisk = 2
else if (score <= 4)
tenyearrisk = 2
else if (score <= 5)
tenyearrisk = 3
else if (score <= 7)
tenyearrisk = 3
else if (score <= 9)
tenyearrisk = 3
else if (score <= 12)
tenyearrisk = 4
else if (score <= 14.9)
tenyearrisk = 5
else if (score > 14.9)
tenyearrisk = 5
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 25 && agescore <= 29))
{
if (score <= .1)
tenyearrisk = "<1"
else if (score <= .3)
tenyearrisk = "<1"
else if (score <= .5)
tenyearrisk = "<1"
else if (score <= .8)
tenyearrisk = "<1"
else if (score <= 1)
tenyearrisk = "<1"
else if (score <= 1.25)
tenyearrisk = "<1"
else if (score <= 1.5)
tenyearrisk = 1
else if (score <= 1.75)
tenyearrisk = 1
else if (score <= 2)
tenyearrisk = 2
else if (score <= 2.5)
tenyearrisk = 2
else if (score <= 3)
tenyearrisk = 2
else if (score <= 4)
tenyearrisk = 3
else if (score <= 5)
tenyearrisk = 3
else if (score <= 7)
tenyearrisk = 3
else if (score <= 9)
tenyearrisk = 4
else if (score <= 12)
tenyearrisk = 4
else if (score <= 14.9)
tenyearrisk = 4
else if (score > 14.9)
tenyearrisk = 5
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 30 && agescore <= 34))
{
if (score <= .1)
tenyearrisk = "<1"
else if (score <= .3)
tenyearrisk = "<1"
else if (score <= .5)
tenyearrisk = "<1"
else if (score <= .8)
tenyearrisk = "<1"
else if (score <= 1)
tenyearrisk = 1
else if (score <= 1.25)
tenyearrisk = 1
else if (score <= 1.5)
tenyearrisk = 1
else if (score <= 1.75)
tenyearrisk = 2
else if (score <= 2)
tenyearrisk = 2
else if (score <= 2.5)
tenyearrisk = 3
else if (score <= 3)
tenyearrisk = 3
else if (score <= 4)
tenyearrisk = 4
else if (score <= 5)
tenyearrisk = 4
else if (score <= 7)
tenyearrisk = 5
else if (score <= 9)
tenyearrisk = 5
else if (score <= 12)
tenyearrisk = 6
else if (score <= 14.9)
tenyearrisk = 6
else if (score > 14.9)
tenyearrisk = 7
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 35 && agescore <= 39))
{
if (score <= .1)
tenyearrisk = "<1"
else if (score <= .3)
tenyearrisk = "<1"
else if (score <= .5)
tenyearrisk = "<1"
else if (score <= .8)
tenyearrisk = 1
else if (score <= 1)
tenyearrisk = 1
else if (score <= 1.25)
tenyearrisk = 1
else if (score <= 1.5)
tenyearrisk = 2
else if (score <= 1.75)
tenyearrisk = 2
else if (score <= 2)
tenyearrisk = 3
else if (score <= 2.5)
tenyearrisk = 3
else if (score <= 3)
tenyearrisk = 4
else if (score <= 4)
tenyearrisk = 5
else if (score <= 5)
tenyearrisk = 6
else if (score <= 7)
tenyearrisk = 7
else if (score <= 9)
tenyearrisk = 8
else if (score <= 12)
tenyearrisk = 10
else if (score <= 14.9)
tenyearrisk = 12
else if (score > 14.9)
tenyearrisk = 14
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 40 && agescore <= 44))
{
if (score <= .1)
tenyearrisk = "<1"
else if (score <= .3)
tenyearrisk = 1
else if (score <= .5)
tenyearrisk = 1
else if (score <= .8)
tenyearrisk = 1
else if (score <= 1)
tenyearrisk = 2
else if (score <= 1.25)
tenyearrisk = 2
else if (score <= 1.5)
tenyearrisk = 3
else if (score <= 1.75)
tenyearrisk = 3
else if (score <= 2)
tenyearrisk = 4
else if (score <= 2.5)
tenyearrisk = 5
else if (score <= 3)
tenyearrisk = 7
else if (score <= 4)
tenyearrisk = 8
else if (score <= 5)
tenyearrisk = 10
else if (score <= 7)
tenyearrisk = 12
else if (score <= 9)
tenyearrisk = 14
else if (score <= 12)
tenyearrisk = 17
else if (score <= 14.9)
tenyearrisk = 20
else if (score > 14.9)
tenyearrisk = 24
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 45 && agescore <= 49))
{
if (score <= .1)
tenyearrisk = "<1"
else if (score <= .3)
tenyearrisk = 1
else if (score <= .5)
tenyearrisk = 1
else if (score <= .8)
tenyearrisk = 2
else if (score <= 1)
tenyearrisk = 3
else if (score <= 1.25)
tenyearrisk = 4
else if (score <= 1.5)
tenyearrisk = 5
else if (score <= 1.75)
tenyearrisk = 6
else if (score <= 2)
tenyearrisk = 7
else if (score <= 2.5)
tenyearrisk = 9
else if (score <= 3)
tenyearrisk = 11
else if (score <= 4)
tenyearrisk = 13
else if (score <= 5)
tenyearrisk = 15
else if (score <= 7)
tenyearrisk = 17
else if (score <= 9)
tenyearrisk = 19
else if (score <= 12)
tenyearrisk = 21
else if (score <= 14.9)
tenyearrisk = 24
else if (score > 14.9)
tenyearrisk = 32
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 50 && agescore <= 54))
{
if (score <= .1)
tenyearrisk = 1
else if (score <= .3)
tenyearrisk = 2
else if (score <= .5)
tenyearrisk = 3
else if (score <= .8)
tenyearrisk = 4
else if (score <= 1)
tenyearrisk = 5
else if (score <= 1.25)
tenyearrisk = 6
else if (score <= 1.5)
tenyearrisk = 8
else if (score <= 1.75)
tenyearrisk = 9
else if (score <= 2)
tenyearrisk = 11
else if (score <= 2.5)
tenyearrisk = 13
else if (score <= 3)
tenyearrisk = 15
else if (score <= 4)
tenyearrisk = 17
else if (score <= 5)
tenyearrisk = 19
else if (score <= 7)
tenyearrisk = 21
else if (score <= 9)
tenyearrisk = 23
else if (score <= 12)
tenyearrisk = 27
else if (score <= 14.9)
tenyearrisk = 31
else if (score > 14.9)
tenyearrisk = 37
}

else if((genderscore == "f" || genderscore == "F") && (agescore >= 55 && agescore <= 59))
{
if (score <= .1)
tenyearrisk = 2
else if (score <= .3)
tenyearrisk = 3
else if (score <= .5)
tenyearrisk = 4
else if (score <= .8)
tenyearrisk = 5
else if (score <= 1)
tenyearrisk = 7
else if (score <= 1.25)
tenyearrisk = 9
else if (score <= 1.5)
tenyearrisk = 11
else if (score <= 1.75)
tenyearrisk = 13
else if (score <= 2)
tenyearrisk = 15
else if (score <= 2.5)
tenyearrisk = 18
else if (score <= 3)
tenyearrisk = 21
else if (score <= 4)
tenyearrisk = 24
else if (score <= 5)
tenyearrisk = 27
else if (score <= 7)
tenyearrisk = 30
else if (score <= 9)
tenyearrisk = 33
else if (score <= 12)
tenyearrisk = 36
else if (score <= 14.9)
tenyearrisk = 39
else if (score > 14.9)
tenyearrisk = ">40"
}

else if((genderscore == "f" || genderscore == "F") && (agescore >= 60 && agescore <= 64))
{
if (score <= .1)
tenyearrisk = 2
else if (score <= .3)
tenyearrisk = 3
else if (score <= .5)
tenyearrisk = 5
else if (score <= .8)
tenyearrisk = 7
else if (score <= 1)
tenyearrisk = 9
else if (score <= 1.25)
tenyearrisk = 11
else if (score <= 1.5)
tenyearrisk = 13
else if (score <= 1.75)
tenyearrisk = 15
else if (score <= 2)
tenyearrisk = 17
else if (score <= 2.5)
tenyearrisk = 20
else if (score <= 3)
tenyearrisk = 23
else if (score <= 4)
tenyearrisk = 26
else if (score <= 5)
tenyearrisk = 29
else if (score <= 7)
tenyearrisk = 32
else if (score <= 9)
tenyearrisk = 35
else if (score <= 12)
tenyearrisk = 38
else if (score <= 14.9)
tenyearrisk = ">40"
else if (score > 14.9)
tenyearrisk = ">40"
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 65 && agescore <= 69))
{
if (score <= .1)
tenyearrisk = 2
else if (score <= .3)
tenyearrisk = 4
else if (score <= .5)
tenyearrisk = 6
else if (score <= .8)
tenyearrisk = 8
else if (score <= 1)
tenyearrisk = 11
else if (score <= 1.25)
tenyearrisk = 15
else if (score <= 1.5)
tenyearrisk = 18
else if (score <= 1.75)
tenyearrisk = 20
else if (score <= 2)
tenyearrisk = 22
else if (score <= 2.5)
tenyearrisk = 25
else if (score <= 3)
tenyearrisk = 27
else if (score <= 4)
tenyearrisk = 29
else if (score <= 5)
tenyearrisk = 31
else if (score <= 7)
tenyearrisk = 34
else if (score <= 9)
tenyearrisk = 38
else if (score <= 12)
tenyearrisk = ">40"
else if (score <= 14.9)
tenyearrisk = ">40"
else if (score > 14.9)
tenyearrisk = ">40"
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 70 && agescore <= 74))
{
if (score <= .1)
tenyearrisk = 3
else if (score <= .3)
tenyearrisk = 6
else if (score <= .5)
tenyearrisk = 8
else if (score <= .8)
tenyearrisk = 11
else if (score <= 1)
tenyearrisk = 13
else if (score <= 1.25)
tenyearrisk = 17
else if (score <= 1.5)
tenyearrisk = 21
else if (score <= 1.75)
tenyearrisk = 23
else if (score <= 2)
tenyearrisk = 25
else if (score <= 2.5)
tenyearrisk = 28
else if (score <= 3)
tenyearrisk = 31
else if (score <= 4)
tenyearrisk = 34
else if (score <= 5)
tenyearrisk = 37
else if (score <= 7)
tenyearrisk = 40
else if (score <= 9)
tenyearrisk = ">40"
else if (score <= 12)
tenyearrisk = ">40"
else if (score <= 14.9)
tenyearrisk = ">40"
else if (score > 14.9)
tenyearrisk = ">40"
}
else if((genderscore == "f" || genderscore == "F") && (agescore >= 75))
{
if (score <= .1)
tenyearrisk = 4
else if (score <= .3)
tenyearrisk = 7
else if (score <= .5)
tenyearrisk = 10
else if (score <= .8)
tenyearrisk = 14
else if (score <= 1)
tenyearrisk = 17
else if (score <= 1.25)
tenyearrisk = 20
else if (score <= 1.5)
tenyearrisk = 24
else if (score <= 1.75)
tenyearrisk = 27
else if (score <= 2)
tenyearrisk = 30
else if (score <= 2.5)
tenyearrisk = 33
else if (score <= 3)
tenyearrisk = 36
else if (score <= 4)
tenyearrisk = 39
else if (score <= 5)
tenyearrisk = 40
else if (score <= 7)
tenyearrisk = ">40"
else if (score <= 9)
tenyearrisk = ">40"
else if (score <= 12)
tenyearrisk = ">40"
else if (score <= 14.9)
tenyearrisk = ">40"
else if (score > 14.9)
tenyearrisk = ">40"
}

// male
else if((genderscore == "m" || genderscore == "M") && agescore < 25) //this maybe should not be "else if"
{
if (score < .1)
tenyearrisk = "<1"
else if (score < .3)
tenyearrisk = "<1"
else if (score <= .5)
tenyearrisk = "<1"
else if (score <= .8)
tenyearrisk = "<1"
else if (score <= 1)
tenyearrisk = "<1"
else if (score <= 1.25)
tenyearrisk = 1
else if (score <= 1.5)
tenyearrisk = 1
else if (score <= 1.75)
tenyearrisk = 2
else if (score <= 2)
tenyearrisk = 2
else if (score <= 2.5)
tenyearrisk = 2
else if (score <= 3)
tenyearrisk = 3
else if (score <= 4)
tenyearrisk = 3
else if (score <= 5)
tenyearrisk = 4
else if (score <= 7)
tenyearrisk = 5
else if (score <= 9)
tenyearrisk = 6
else if (score <= 12)
tenyearrisk = 7
else if (score <= 14.9)
tenyearrisk = 9
else if (score > 14.9)
tenyearrisk = 12
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 25 && agescore <= 29))
{
if (score <= .1)
tenyearrisk = "<1"
else if (score <= .3)
tenyearrisk = "<1"
else if (score <= .5)
tenyearrisk = "<1"
else if (score <= .8)
tenyearrisk = 1
else if (score <= 1)
tenyearrisk = 1
else if (score <= 1.25)
tenyearrisk = 2
else if (score <= 1.5)
tenyearrisk = 3
else if (score <= 1.75)
tenyearrisk = 4
else if (score <= 2)
tenyearrisk = 5
else if (score <= 2.5)
tenyearrisk = 6
else if (score <= 3)
tenyearrisk = 8
else if (score <= 4)
tenyearrisk = 10
else if (score <= 5)
tenyearrisk = 12
else if (score <= 7)
tenyearrisk = 14
else if (score <= 9)
tenyearrisk = 16
else if (score <= 12)
tenyearrisk = 18
else if (score <= 14.9)
tenyearrisk = 20
else if (score > 14.9)
tenyearrisk = 24
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 30 && agescore <= 34))
{
if (score <= .1)
tenyearrisk = "<1"
else if (score <= .3)
tenyearrisk = "<1"
else if (score <= .5)
tenyearrisk = 1
else if (score <= .8)
tenyearrisk = 1
else if (score <= 1)
tenyearrisk = 2
else if (score <= 1.25)
tenyearrisk = 3
else if (score <= 1.5)
tenyearrisk = 4
else if (score <= 1.75)
tenyearrisk = 6
else if (score <= 2)
tenyearrisk = 7
else if (score <= 2.5)
tenyearrisk = 9
else if (score <= 3)
tenyearrisk = 11
else if (score <= 4)
tenyearrisk = 14
else if (score <= 5)
tenyearrisk = 17
else if (score <= 7)
tenyearrisk = 20
else if (score <= 9)
tenyearrisk = 23
else if (score <= 12)
tenyearrisk = 26
else if (score <= 14.9)
tenyearrisk = 29
else if (score > 14.9)
tenyearrisk = 33
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 35 && agescore <= 39))
{
if (score <= .1)
tenyearrisk = "<1"
else if (score <= .3)
tenyearrisk = 1
else if (score <= .5)
tenyearrisk = 1
else if (score <= .8)
tenyearrisk = 2
else if (score <= 1)
tenyearrisk = 2
else if (score <= 1.25)
tenyearrisk = 3
else if (score <= 1.5)
tenyearrisk = 5
else if (score <= 1.75)
tenyearrisk = 7
else if (score <= 2)
tenyearrisk = 9
else if (score <= 2.5)
tenyearrisk = 11
else if (score <= 3)
tenyearrisk = 14
else if (score <= 4)
tenyearrisk = 17
else if (score <= 5)
tenyearrisk = 20
else if (score <= 7)
tenyearrisk = 23
else if (score <= 9)
tenyearrisk = 26
else if (score <= 12)
tenyearrisk = 29
else if (score <= 14.9)
tenyearrisk = 32
else if (score > 14.9)
tenyearrisk = 36
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 40 && agescore <= 44))
{
if (score <= .1)
tenyearrisk = 1
else if (score <= .3)
tenyearrisk = 1
else if (score <= .5)
tenyearrisk = 2
else if (score <= .8)
tenyearrisk = 2
else if (score <= 1)
tenyearrisk = 3
else if (score <= 1.25)
tenyearrisk = 5
else if (score <= 1.5)
tenyearrisk = 7
else if (score <= 1.75)
tenyearrisk = 9
else if (score <= 2)
tenyearrisk = 12
else if (score <= 2.5)
tenyearrisk = 15
else if (score <= 3)
tenyearrisk = 18
else if (score <= 4)
tenyearrisk = 21
else if (score <= 5)
tenyearrisk = 24
else if (score <= 7)
tenyearrisk = 27
else if (score <= 9)
tenyearrisk = 30
else if (score <= 12)
tenyearrisk = 33
else if (score <= 14.9)
tenyearrisk = 36
else if (score > 14.9)
tenyearrisk = 42
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 45 && agescore <= 49))
{
if (score <= .1)
tenyearrisk = 1
else if (score <= .3)
tenyearrisk = 2
else if (score <= .5)
tenyearrisk = 2
else if (score <= .8)
tenyearrisk = 3
else if (score <= 1)
tenyearrisk = 4
else if (score <= 1.25)
tenyearrisk = 6
else if (score <= 1.5)
tenyearrisk = 8
else if (score <= 1.75)
tenyearrisk = 11
else if (score <= 2)
tenyearrisk = 14
else if (score <= 2.5)
tenyearrisk = 17
else if (score <= 3)
tenyearrisk = 20
else if (score <= 4)
tenyearrisk = 24
else if (score <= 5)
tenyearrisk = 28
else if (score <= 7)
tenyearrisk = 32
else if (score <= 9)
tenyearrisk = 36
else if (score <= 12)
tenyearrisk = 40
else if (score <= 14.9)
tenyearrisk = 44
else if (score > 14.9)
tenyearrisk = 50
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 50 && agescore <= 54))
{
if (score <= .1)
tenyearrisk = 2
else if (score <= .3)
tenyearrisk = 2
else if (score <= .5)
tenyearrisk = 3
else if (score <= .8)
tenyearrisk = 5
else if (score <= 1)
tenyearrisk = 6
else if (score <= 1.25)
tenyearrisk = 8
else if (score <= 1.5)
tenyearrisk = 10
else if (score <= 1.75)
tenyearrisk = 13
else if (score <= 2)
tenyearrisk = 16
else if (score <= 2.5)
tenyearrisk = 20
else if (score <= 3)
tenyearrisk = 24
else if (score <= 4)
tenyearrisk = 28
else if (score <= 5)
tenyearrisk = 32
else if (score <= 7)
tenyearrisk = 37
else if (score <= 9)
tenyearrisk = 42
else if (score <= 12)
tenyearrisk = 47
else if (score <= 14.9)
tenyearrisk = 52
else if (score > 14.9)
tenyearrisk = ">53"
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 55 && agescore <= 59))
{
if (score <= .1)
tenyearrisk = 2
else if (score <= .3)
tenyearrisk = 3
else if (score <= .5)
tenyearrisk = 4
else if (score <= .8)
tenyearrisk = 7
else if (score <= 1)
tenyearrisk = 9
else if (score <= 1.25)
tenyearrisk = 11
else if (score <= 1.5)
tenyearrisk = 13
else if (score <= 1.75)
tenyearrisk = 15
else if (score <= 2)
tenyearrisk = 18
else if (score <= 2.5)
tenyearrisk = 23
else if (score <= 3)
tenyearrisk = 28
else if (score <= 4)
tenyearrisk = 33
else if (score <= 5)
tenyearrisk = 38
else if (score <= 7)
tenyearrisk = 43
else if (score <= 9)
tenyearrisk = 48
else if (score <= 12)
tenyearrisk = 53
else if (score <= 14.9)
tenyearrisk = ">53"
else if (score > 14.9)
tenyearrisk = ">53"
}

else if((genderscore == "m" || genderscore == "M") && (agescore >= 60 && agescore <= 64))
{
if (score <= .1)
tenyearrisk = 2
else if (score <= .3)
tenyearrisk = 4
else if (score <= .5)
tenyearrisk = 6
else if (score <= .8)
tenyearrisk = 8
else if (score <= 1)
tenyearrisk = 10
else if (score <= 1.25)
tenyearrisk = 13
else if (score <= 1.5)
tenyearrisk = 16
else if (score <= 1.75)
tenyearrisk = 20
else if (score <= 2)
tenyearrisk = 24
else if (score <= 2.5)
tenyearrisk = 28
else if (score <= 3)
tenyearrisk = 33
else if (score <= 4)
tenyearrisk = 38
else if (score <= 5)
tenyearrisk = 43
else if (score <= 7)
tenyearrisk = 53
else if (score <= 9)
tenyearrisk = ">53"
else if (score <= 12)
tenyearrisk = ">53"
else if (score <= 14.9)
tenyearrisk = ">53"
else if (score > 14.9)
tenyearrisk = ">53"
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 65 && agescore <= 69))
{
if (score <= .1)
tenyearrisk = 3
else if (score <= .3)
tenyearrisk = 5
else if (score <= .5)
tenyearrisk = 7
else if (score <= .8)
tenyearrisk = 10
else if (score <= 1)
tenyearrisk = 13
else if (score <= 1.25)
tenyearrisk = 16
else if (score <= 1.5)
tenyearrisk = 20
else if (score <= 1.75)
tenyearrisk = 24
else if (score <= 2)
tenyearrisk = 28
else if (score <= 2.5)
tenyearrisk = 32
else if (score <= 3)
tenyearrisk = 37
else if (score <= 4)
tenyearrisk = 42
else if (score <= 5)
tenyearrisk = 42
else if (score <= 7)
tenyearrisk = 52
else if (score <= 9)
tenyearrisk = ">53"
else if (score <= 12)
tenyearrisk = ">53"
else if (score <= 14.9)
tenyearrisk = ">53"
else if (score > 14.9)
tenyearrisk = ">53"
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 70 && agescore <= 74))
{
if (score <= .1)
tenyearrisk = 4
else if (score <= .3)
tenyearrisk = 7
else if (score <= .5)
tenyearrisk = 10
else if (score <= .8)
tenyearrisk = 13
else if (score <= 1)
tenyearrisk = 17
else if (score <= 1.25)
tenyearrisk = 21
else if (score <= 1.5)
tenyearrisk = 25
else if (score <= 1.75)
tenyearrisk = 28
else if (score <= 2)
tenyearrisk = 32
else if (score <= 2.5)
tenyearrisk = 36
else if (score <= 3)
tenyearrisk = 41
else if (score <= 4)
tenyearrisk = 46
else if (score <= 5)
tenyearrisk = 51
else if (score <= 7)
tenyearrisk = ">53"
else if (score <= 9)
tenyearrisk = ">53"
else if (score <= 12)
tenyearrisk = ">53"
else if (score <= 14.9)
tenyearrisk = ">53"
else if (score > 14.9)
tenyearrisk = ">53"
}
else if((genderscore == "m" || genderscore == "M") && (agescore >= 75))
{
if (score <= .1)
tenyearrisk = 6
else if (score <= .3)
tenyearrisk = 9
else if (score <= .5)
tenyearrisk = 11
else if (score <= .8)
tenyearrisk = 15
else if (score <= 1)
tenyearrisk = 19
else if (score <= 1.25)
tenyearrisk = 23
else if (score <= 1.5)
tenyearrisk = 28
else if (score <= 1.75)
tenyearrisk = 32
else if (score <= 2)
tenyearrisk = 36
else if (score <= 2.5)
tenyearrisk = 40
else if (score <= 3)
tenyearrisk = 45
else if (score <= 4)
tenyearrisk = 49
else if (score <= 5)
tenyearrisk = ">53"
else if (score <= 7)
tenyearrisk = ">53"
else if (score <= 9)
tenyearrisk = ">53"
else if (score <= 12)
tenyearrisk = ">53"
else if (score <= 14.9)
tenyearrisk = ">53"
else if (score > 14.9)
tenyearrisk = ">53"
}


//this gets average scores for age/gender
if(genderscore == "f" || genderscore == "F")
{
if (agescore < 20)
averagescore = .1
else if (agescore <25)
averagescore = .1
else if (agescore <35)
averagescore = .3
else if (agescore <45)
averagescore = .8
else if (agescore <55)
averagescore = 1.5
else if (agescore <65)
averagescore = 2.4
else if (agescore >= 65)
averagescore = 2.4
}
else if(genderscore == "m" || genderscore == "M")
{
if (agescore < 20)
averagescore = .1
else if (agescore <25)
averagescore = .1
else if (agescore <35)
averagescore = .6
else if (agescore <45)
averagescore = 1.4
else if (agescore <55)
averagescore = 1.8
else if (agescore <65)
averagescore = 2.3
else if (agescore >= 65)
averagescore = 2.4
}

//this gets average 10-year risk
if(genderscore == "f" || genderscore == "F")
{
if (agescore < 25)
averageten = "<1"
else if (agescore <30)
averageten = "<1"
else if (agescore <35)
averageten = "1"
else if (agescore <40)
averageten = "1"
else if (agescore <45)
averageten = "2"
else if (agescore <50)
averageten = "4"
else if (agescore <55)
averageten = "6"
else if (agescore <60)
averageten = "9"
else if (agescore <65)
averageten = "11"
else if (agescore <70)
averageten = "15"
else if (agescore <75)
averageten = "17"
else if (agescore >=75)
averageten = "20"
}
else if(genderscore == "m" || genderscore == "M")
{
if (agescore < 25)
averageten = "1"
else if (agescore <30)
averageten = "2"
else if (agescore <35)
averageten = "3"
else if (agescore <40)
averageten = "3"
else if (agescore <45)
averageten = "5"
else if (agescore <50)
averageten = "6"
else if (agescore <55)
averageten = "8"
else if (agescore <60)
averageten = "11"
else if (agescore <65)
averageten = "13"
else if (agescore <70)
averageten = "16"
else if (agescore <75)
averageten = "21"
else if (agescore >=75)
averageten = "23"
}





//print19= "Male over 64".fontcolor("navy")}


if (score <= .2){
category = ("Very Low Risk")
advice = ("are generally safe from risk of developing heart disease and should keep up the good work.")
}
else if (score < .8){
category = ("Low Risk")
advice = ("are fairly safe, and would do well to reach the very low risk category.")
}
else if (score < 1.4){
category = ("Average Risk")
advice = ("should strive to lower their risk and might consider seeking medical attention.  Average risk is not safe. ")
}
else if (score < 2.5){
category = ("High Risk")
advice = ("should seriously consider seeking medical attention immediately. ")
}
else if (score < 4){
category = ("Very High Risk")
advice = ("<b>should seriously consider seeking medical attention immediately</b>. ")
}
else if (score >= 4){
category = ("Extremely High Risk")
advice = ("<b>should very seriously consider seeking medical attention immediately</b>. ")
}
else{
category = ("mistake")
advice = ("mistake.")
}


//august2001
//this is category after statin
if (statinscore <= .2){
statincategory = ("Very Low Risk")
}
else if (statinscore < .8){
statincategory = ("Low Risk")
}
else if (statinscore < 1.4){
statincategory = ("Average Risk")
}
else if (statinscore < 2.5){
statincategory = ("High Risk")
}
else if (statinscore < 4){
statincategory = ("Very High Risk")
}
else if (statinscore >= 4){
statincategory = ("Extremely High Risk")
}
else{
category = ("mistake")
advice = ("mistake.")
}



//august2001
//this is category after lifestyle
if (lifestylescore <= .2){
lifestylecategory = ("Very Low Risk")
}
else if (lifestylescore < .8){
lifestylecategory = ("Low Risk")
}
else if (lifestylescore < 1.4){
lifestylecategory = ("Average Risk")
}
else if (lifestylescore < 2.5){
lifestylecategory = ("High Risk")
}
else if (lifestylescore < 4){
lifestylecategory = ("Very High Risk")
}
else if (lifestylescore >= 4){
lifestylecategory = ("Extremely High Risk")
}
else{
category = ("mistake")
advice = ("mistake.")
}



//august2001
//this is category after lifestyle and statin
if (lifestyleandstatinscore <= .2){
lifestyleandstatincategory = ("Very Low Risk")
}
else if (lifestyleandstatinscore < .8){
lifestyleandstatincategory = ("Low Risk")
}
else if (lifestyleandstatinscore < 1.4){
lifestyleandstatincategory = ("Average Risk")
}
else if (lifestyleandstatinscore < 2.5){
lifestyleandstatincategory = ("High Risk")
}
else if (lifestyleandstatinscore < 4){
lifestyleandstatincategory = ("Very High Risk")
}
else if (lifestyleandstatinscore >= 4){
lifestyleandstatincategory = ("Extremely High Risk")
}
else{
category = ("mistake")
advice = ("mistake.")
}


//august2001
//this is category after smokingquit
if (smokingquitscore <= .2){
smokingquitcategory = ("Very Low Risk")
}
else if (smokingquitscore < .8){
smokingquitcategory = ("Low Risk")
}
else if (smokingquitscore < 1.4){
smokingquitcategory = ("Average Risk")
}
else if (smokingquitscore < 2.5){
smokingquitcategory = ("High Risk")
}
else if (smokingquitscore < 4){
smokingquitcategory = ("Very High Risk")
}
else if (smokingquitscore >= 4){
smokingquitcategory = ("Extremely High Risk")
}
else{
category = ("mistake")
advice = ("mistake.")
}

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////


//this begins printout
//this is printout for Netscape section, must make same changes below for IE

//if (navigator.appName == "Netscape")
if (navigator.appName == "Netscape" || navigator.appName == "Opera")
//if (navigator.appName != "Netscape" && navigator.appName != "Microsoft Internet Explorer")
//if (navigator.appName != "Netscape")
//if (navigator.appName == "Opera")


{
var namescore  ////netscape added 47
var timestamp  ////netscape added 47
//var hours  ////netscape added 47
var category  ////netscape added 47
var advice  ////netscape added 47
var averagescore ////netscape added 47
var bpscore  ////netscape added 47
var smokingscore2  ////netscape added 47
var lipidscore  ////netscape added 47
var glucosescore2  ////netscape added 47
var triglyceridesscore2  ////netscape added 47
var tenyearrisk  ////netscape added 47
var averageten  ////netscape added 47
var genderscore  ////netscape added 47
var cholesterolscore  ////netscape added 47
var tgscore  ////netscape added 47
var systolicscore  ////netscape added 47


//var win1 = window.open("Results", "Example1", "scrollbars");
//var win1 = window.open("Results", "Example1");
//both lines below need to be open in Opera
//var win1 = window.open("www.heartriskevaluations.com/test.htm", "Example1", "scrollbars");
//var win1 = window.open("c:\mydocuments\mywebs\web15\heartriskevaluations.com/test.htm", "Example1", "scrollbars");
var win1 = window.open("", "Example1");
win1.document.open()

//win1.document.close()

//heading
win1.document.write ("<h1>Heart Risk Evaluations Report</h1>")

win1.document.write ("<b>" + namescore + "</b>")
win1.document.write ("<b><BR>" + timestamp + "<BR>" + "<BR></b>")


//this is person's name
if (hours <=11)
win1.document.write ("Good morning " + namescore + ". Your personalized heart risk evaluation chart is as follows. " + "<BR>" + "<BR>")
else if (hours > 11 && hours < 18)
win1.document.write ("Good afternoon " + namescore + ". Your personalized heart risk evaluation chart is as follows. " + "<BR>" + "<BR>")
else if (hours > 17)
win1.document.write ("Good evening " + namescore + ". Your personalized heart risk evaluation chart is as follows. " + "<BR>" + "<BR>")
else
win1.document.write ("Greetings " + namescore + ". Your personalized heart risk evaluation chart is as follows. " + "<BR>" + "<BR>")  ////netscape added 47


win1.document.write ("Your score is: " + score + "<BR>")
win1.document.write ("Your risk level is: " + category)

win1.document.write("<BR>" + "<BR>" + "              Your score is " + score + ". The average American adult score is 1.0. You are therefore at " + score + " times the risk of the average American adult.  You are in the " + category + " category.  Those in the " + category + " category " + advice + " For comparison purposes, the average score for your age/gender group is " + averagescore + ". " );

//this is for syndrome X
var HDLx
var waistx
var tgx
var glucosex
var bpx
var genderscore
var waistscore
var triglyceridesscore
var HDLscore
var bpscore

var xscore

if (genderscore == "f" || genderscore == "F")
{
if (waistscore >= 35)
waistx = 1
else
waistx = 0
if (HDLscore < 50)
HDLx = 1
else
HDLx = 0
if (triglyceridesscore >150)
tgx = 1
else
tgx = 0
if (glucosescore > 110)
glucosex = 1
else
glucosex = 0
if (bpscore > .2)
bpx = 1
else
bpx = 0
}
else if (genderscore == "m" || genderscore == "M")
{
if (waistscore >= 40)
waistx = 1
else
waistx = 0
if (HDLscore < 40)
HDLx = 1
else
HDLx = 0
if (triglyceridesscore >150)
tgx = 1
else
tgx = 0
if (glucosescore > 110)
glucosex = 1
else
glucosex = 0
if (bpscore > .2)
bpx = 1
else
bpx = 0
}

xscore = (waistx + HDLx + tgx + glucosex + bpx)

if (xscore < 3)
win1.document.write ("")
else if (xscore >= 3)
win1.document.write ("<BR>" + "<BR>" + "Your results indicate possible Syndrome X, also known as Metabolic Syndrome, Insulin Resistance Syndrome and several similar names, usually including the words insulin or carbohydrate.  This is where the body has difficulty metabolizing sugars.  Triglyerices, blood pressure and glucose may rise, waist size may expand, and HDLs can lower.  Usually a low sugar diet is helpful in controlling this." + "<BR>" + "<BR>")


//blood pressure
if (bpscore <= .6)
win1.document.write ("")
else if (bpscore > .6)
win1.document.write ("Your blood pressure is dangerously high. It is important to bring your blood pressure well below 150/100. You may want to see a physician, who may recommend medication or another course of treatment.")
//else
//win1.document.write ("")

//smoking
if (smokingscore2 <= 0)
win1.document.write ("")
else if (smokingscore2 > 0)
win1.document.write (" Smoking adds greatly to heart risk, and is very avoidable.  If you stop smoking your risk will dramatically lessen.")
//else
//win1.document.write ("")

//lipid
lipidstatement = ""
if (lipidscore <= .9)
win1.document.write ("")
else if (lipidscore > .9 && lipidscore <=1.5)
win1.document.write (" Your lipid levels are in the average/high range.  Even those levels in the average range are not considered healthy or safe.  You can read about this in the online book, <u>Cholesterol and Heart Risk</u>, page 17, accessed from our home page or directly at <u>heartriskevaluations.com/cholesterolbook.htm</u>.")
else if (lipidscore > 1.5)
win1.document.write(" Your lipid profile is unhealthy. You would do well to either make lifestyle changes, see a physician regarding medication, or both.  You can read more about cholesterol and heart risk in the online book, <u>Cholesterol and Heart Risk</u>, accessed from our home page or directly at <u>heartriskevaluations.com/cholesterolbook.htm</u>.")
else
//win1.document.write ("")

var nomedication = ""
var bpmedication = ""
var diabetesmedication = ""
var lipidmedication = ""
var tgmedication = ""

//if (document.form1.txtCholesterol.value == "" && document.form1.txtHDL.value == "")
//win1.document.write ("<BR>" + "The test will be calculated without cholesterol values being entered, but please note that cholesterol levels are a key factor in heart risk asessment")

//MEDICATION ALERT LINE
//win1.document.write ("<BR>" + "<BR>" + "Medication Alert.  You may need medication for the following:" + "<BR>" + bpmedication + " " + diabetesmedication + " " + lipidmedication + " " + tgmedication + nomedication)
win1.document.write ("<BR>" + "<BR>" + "-----")
win1.document.write ("<BR>" + "<b>Medication Alert! You may need medication for the following:</b>")

//if (bpscore > .4||glucosescore2 > .4||lipidscore > .9||triglyceridesscore2 > .4)
//this one below does exaxt measurements of glucose and tgs, instead of by scores
if (bpscore > .5||glucosescore > 120||lipidscore > .7||triglyceridesscore > 300)

if (bpscore <= .4)
win1.document.write ("")
else if (bpscore < .7)
win1.document.write ("<BR>" + "Blood Pressure".fontcolor("goldenrod"))
else if (bpscore < 1.0)
win1.document.write ("<BR>" + "Blood Pressure".fontcolor("maroon"))
else if (bpscore >= 1.0)
win1.document.write ("<BR>" + "Blood Pressure".fontcolor("red"))

//if (glucosescore2 <= .4)
//win1.document.write ("")
//else if (glucosescore2 <= .6)
//win1.document.write ("<BR>" + "Diabetes".fontcolor("goldenrod"))
//else if (glucosescore2 <= .9)
//win1.document.write ("<BR>" + "Diabetes".fontcolor("maroon"))
//else if (glucosescore2 > .9)
//win1.document.write ("<BR>" + "Diabetes".fontcolor("red"))

if (glucosescore <= 120)
win1.document.write ("")
else if (glucosescore <= 140)
win1.document.write ("<BR>" + "Diabetes".fontcolor("goldenrod"))
else if (glucosescore <= 190)
win1.document.write ("<BR>" + "Diabetes".fontcolor("maroon"))
else if (glucosescore > 190)
win1.document.write ("<BR>" + "Diabetes".fontcolor("red"))


if (lipidscore <= .7)
win1.document.write ("")
else if (lipidscore < 1.3)
//win1.document.write("<BR>" + "Cholesterol".fontcolor("goldenrod"))
win1.document.write("<BR>" + "Cholesterol--see notes in Cholesterol section below regarding medication for 'average' cholesterol readings".fontcolor("goldenrod"))
else if (lipidscore < 1.7)
//August2001
win1.document.write("<BR>" + "Cholesterol--see medication note in cholesterol section".fontcolor("maroon"))
else if (lipidscore >= 1.7)
win1.document.write("<BR>" + "Cholesterol--see medication note in cholesterol section".fontcolor("red"))

//if (triglyceridesscore2 <= .4)
//win1.document.write ("")
//else if (triglyceridesscore2 < .6)
//win1.document.write ("<BR>" + "Triglycerides".fontcolor("goldenrod"))
//else if (triglyceridesscore2 < 1.4)
//win1.document.write ("<BR>" + "Triglycerides".fontcolor("maroon"))
//else if (triglyceridesscore2 >= 1.4)
//win1.document.write ("<BR>" + "Triglycerides".fontcolor("red"))

if (triglyceridesscore <= 300)
win1.document.write ("")
else if (triglyceridesscore < 550)
win1.document.write ("<BR>" + "Triglycerides".fontcolor("goldenrod"))
else if (triglyceridesscore < 900)
win1.document.write ("<BR>" + "Triglycerides".fontcolor("maroon"))
else if (triglyceridesscore >= 900)
win1.document.write ("<BR>" + "Triglycerides".fontcolor("red"))

else
win1.document.write ("")

//the exclamation mark below means NOT
//if (!(bpscore > .4||glucosescore2 > .4||lipidscore > .8||triglyceridesscore2 > .4))
if (!(bpscore > .4||glucosescore > 120||lipidscore > .7||triglyceridesscore > 300))
win1.document.write ("<BR>" + "<i>   You appear to have no need for heart-related medication</i>")

//if (bpscore > .4||glucosescore2 > .4||lipidscore > .8||triglyceridesscore2 > .4)
if (bpscore > .5||glucosescore > 120||lipidscore > .7||triglyceridesscore > 300)
win1.document.write ("<BR>" + "(Please see a physician regarding your possible need for medication)")


//if (bpscore > .4||glucosescore2 > .4||lipidscore > .8||triglyceridesscore2 > .4)
if (bpscore > .4||glucosescore > 120||lipidscore > .7||triglyceridesscore > 300)
{
win1.document.write ("<BR>" + "<BR>" + "Color coding for medication alert:")
//win1.document.write ("<BR>" + "Yellow:  There may be a good chance that you can improve this factor through natural means, such as diet and exercise.  The need for medication is possible".fontcolor("goldenrod"))
//win1.document.write ("<BR>" + "Red:  There is a chance that you can improve this factor through natural means, such as diet and exercise. The need for medication may be likely".fontcolor("maroon"))
//win1.document.write ("<BR>" + "Bright Red:  There is little chance that you can improve this factor sufficiently through natural means, such as diet and exercise.  The need for medication is likely.".fontcolor("red"))

win1.document.write ("<BR>" + "Yellow:  Your need for medication is possible".fontcolor("goldenrod"))
win1.document.write ("<BR>" + "Maroon:  Your need for medication is likely".fontcolor("maroon"))
win1.document.write ("<BR>" + "Red:  Your need for medication is very likely".fontcolor("red"))

//win1.document.write ("<BR>" + "In all cases please see a physician who will direct you as regards your specific needs for medication.  Bring this report to your appointment.")
win1.document.write ("<BR>" + "<BR>" + "You may, through natural means such as diet and lifestyle changes, be able to avoid medication.  Especially is this true of yellow coded categories and somewhat true of maroon categories. In all cases please see a physician who will direct you as regards your specific needs for medication.  Bring this report to your appointment.")
}
win1.document.write ("<BR>" + "-----")

//end medication alert



//else
//win1.document.write ("")


//medication alert line
//win1.document.write ("<BR>" + "<BR>" + "Medication Alert.  You may need medication for the following:" + "<BR>" + bpmedication + " " + diabetesmedication + " " + lipidmedication + " " + tgmedication + nomedication)
//win1.document.write ("<BR>" + "<BR>" + "Medication Alert.  You may need medication for the following:")

//if (bpscore > .6||glucosescore2 > .4||lipidscore > 1.1||triglyceridesscore2 > .6)
//if (bpscore > .6)
//win1.document.write ("<BR>" + "Blood Pressure".fontcolor("black"))
//else 
//win1.document.write ("")
//if (glucosescore2 > .4)
//win1.document.write ("<BR>" + "Diabetes".fontcolor("black"))
//else
//win1.document.write ("")

//if (lipidscore <= 1.1)
//win1.document.write ("")
//else if (lipidscore < 1.7)
//win1.document.write("<BR>" + "Cholesterol".fontcolor("goldenrod"))
//else if (lipidscore < 2.2)
//win1.document.write("<BR>" + "Cholesterol".fontcolor("maroon"))
//else if (lipidscore >= 2.2)
//win1.document.write("<BR>" + "Cholesterol".fontcolor("red"))

//if (triglyceridesscore2 > .6)
//win1.document.write ("<BR>" + "Triglycerides".fontcolor("black"))
//else
//win1.document.write ("")

//the exclamation mark below means NOT
//if (!(bpscore > .6||glucosescore2 > .4||lipidscore > 1.1||triglyceridesscore2 > .6))
//win1.document.write ("<BR>" + "<i>   You appear to have no need for heart-related medication</i>")

//win1.document.write ("<BR>" + "<BR>")

//if (bpscore > .6||glucosescore2 > .4||lipidscore > 1.1||triglyceridesscore2 > .6)
//win1.document.write ("<BR>" + "(Please see a physician regarding your possible need for medication)")

//win1.document.write ("<BR>" + "<BR>")
//end medication alert

if (genderscore == "f" || genderscore == "F" || genderscore == "m" || genderscore == "M")
win1.document.write ("<BR>" + "<BR>" + "Your 10-year risk of a heart attack is " + tenyearrisk + "%.")// Add this???  Average 10-year risk for your age/gender group is " + averageten + "%.")

//win1.document.write ("<BR>" + "<BR>")

var commentprintex
var commentprintstress
var commentprintheartdisease
var commentprintstroke
var commentprintsecondhand
var commentprintpm
var commentprintangina

//
//
//test below--worked!!
//var smokingcolor
//if (smokingscore < .1)
//smokingcolor = "green"
//else if (smokingscore >= .1)
//smokingcolor = "red"

//win1.document.write ("<BR>" + "Smoking: ".fontcolor(smokingcolor) + smokingscore)
//
//
//


//these are color scores
var lipidcolor
if (cholesterolscore > 2)
{
var lipidcolor
if (lipidscore <= 0)
lipidcolor = "green"
else if (lipidscore <= .7)
lipidcolor = "goldenrod"
else if (lipidscore <= 1.3)
lipidcolor = "maroon"
else if (lipidscore > 1.3)
lipidcolor = "red"
}
else
lipidcolor = "green"

var tgcolor
if (triglyceridesscore <= 165)
tgcolor = "green"
else if (triglyceridesscore <= 300)
tgcolor = "goldenrod"
else if (triglyceridesscore <= 500)
tgcolor = "maroon"
else if (triglyceridesscore > 500)
tgcolor = "red"

var systoliccolor
if (systolicscore <= 125)
systoliccolor = "green"
else if (systolicscore <= 140)
systoliccolor = "goldenrod"
else if (systolicscore <= 155)
systoliccolor = "maroon"
else if (systolicscore > 155)
systoliccolor = "red"

var diastoliccolor
if (diastolicscore <= 85)
diastoliccolor = "green"
else if (diastolicscore <= 92)
diastoliccolor = "goldenrod"
else if (diastolicscore <= 100)
diastoliccolor = "maroon"
else if (diastolicscore > 100)
diastoliccolor = "red"

var glucosecolor
if (glucosescore <= 105)
glucosecolor = "green"
else if (glucosescore <= 125)
glucosecolor = "goldenrod"
else if (glucosescore <= 150)
glucosecolor = "maroon"
else if (glucosescore > 150)
glucosecolor = "red"

var weightcolor
if (weightscore <= 10)
weightcolor = "green"
else if (weightscore <= 30)
weightcolor = "goldenrod"
else if (weightscore <= 60)
weightcolor = "maroon"
else if (weightscore > 60)
weightcolor = "red"

var waistcolor
if (waistscore <= 35)
waistcolor = "green"
else if (waistscore <= 40)
waistcolor = "goldenrod"
else if (waistscore <= 45)
waistcolor = "maroon"
else if (waistscore > 45)
waistcolor = "red"


var commentprintex
var commentprintstress
var commentprintangina
var commentprintheartdisease
var commentprintpm
var commentprintstroke
var commentprintsecondhand

var exercisecolor
if (exercisescore <= 1)
{
exercisecolor = "green"
commentprintex = " (very high exercise level)" //these are used in final print to clarify
}
else if (exercisescore <= 2)
{
exercisecolor = "green"
commentprintex = " (high exercise level)"
}
else if (exercisescore <= 3)
{
exercisecolor = "goldenrod"
commentprintex = " (average exercise level)"
}
else if (exercisescore <= 4)
{
exercisecolor = "maroon"
commentprintex = " (low exercise level)"
}
else if (exercisescore >= 5)
{
exercisecolor = "red"
commentprintex = " (very low exercise level)"
}


var stresscolor
if (stressscore <= 1)
{
stresscolor = "green"
commentprintstress = " (very low stress)"
}
else if (stressscore <= 2)
{
stresscolor = "green"
commentprintstress = " (low stress)"
}
else if (stressscore <= 3)
{
stresscolor = "green"
commentprintstress = " (average stress)"
}
else if (stressscore <= 4)
{
stresscolor = "goldenrod"
commentprintstress = " (high stress)"
}
else if (stressscore >= 5)
{
stresscolor = "maroon"
commentprintstress = " (very high stress)"
}


var heartattackscolor
if (heartattackscore <= .5)
heartattackscolor = "green"
else if (heartattackscore <= 1.5)
heartattackscolor = "goldenrod"
else if (heartattackscore <= 3)
heartattackscolor = "maroon"
else if (heartattackscore > 3)
heartattackscolor = "red"

var heartdiseasecolor
if (heartdiseasescore == "n" || (heartdiseasescore == "N" || heartdiseasescore == "NO" || heartdiseasescore == "no") || heartdiseasescore == "No" || heartdiseasescore == "")
{
heartdiseasecolor = "green"
commentprintheartdisease = " no"
}
else if (heartdiseasescore == "y" || (heartdiseasescore == "Y" || heartdiseasescore == "YES" || heartdiseasescore == "yes") || heartdiseasescore == "Yes")
{
heartdiseasecolor = "red"
commentprintheartdisease = " yes"
}
var anginacolor
if (anginascore == "m" || anginascore == "mild")
{
anginacolor = "maroon"
commentprintangina = " mild"
}
else if (anginascore == "mo" || anginascore == "moderate")
{
anginacolor = "red"
commentprintangina = " moderate"
}
else if (anginascore == "s" || anginascore == "severe")
{
anginacolor = "red"
commentprintangina = " severe"
}
else if (anginascore == "" || anginascore == 0 || anginascore == "none")
{
anginacolor = "green"
commentprintangina = " none"
}

var strokecolor
if (strokescore == "n" || strokescore == "N" || strokescore == "NO" || strokescore == "no" || strokescore == "No" || strokescore == "")
//if (strokescore <= .1)
{
strokecolor = "green"
commentprintstroke = " no"
}
else
{
strokecolor = "red"
commentprintstroke = " yes"
}

var parentscolor
if (parentsscore < 1)
parentscolor = "green"
else if (parentsscore < 2)
parentscolor = "goldenrod"
else if (parentsscore >= 2)
parentscolor = "red"

var grandparentscolor
if (grandparentsscore <= 1)
grandparentscolor = "green"
else if (grandparentsscore <= 2)
grandparentscolor = "goldenrod"
else if (grandparentsscore <= 4)
grandparentscolor = "maroon"

var smokingcolor
if (smokingscore < .1)
smokingcolor = "green"
else if (smokingscore >= .1)
smokingcolor = "red"

var secondhandsmokecolor
if (secondhandsmokescore == "m" || secondhandsmokescore == "mild")
{
secondhandsmokecolor = "goldenrod"
commentprintsecondhand = " mild"
}
else if (secondhandsmokescore == "mo" || secondhandsmokescore == "moderate")
{
secondhandsmokecolor = "maroon"
commentprintsecondhand = " moderate"
}
else if (secondhandsmokescore == "s" || secondhandsmokescore == "severe")
{
secondhandsmokecolor = "red"
commentprintsecondhand = " severe"
}
else if (secondhandsmokescore == "" || secondhandsmokescore == 0 || secondhandsmokescore == "none")
{
secondhandsmokecolor = "green"
commentprintsecondhand = " none"
}

var pmcolor
if (pmscore == "n" || pmscore == "N" || pmscore == "NO" || pmscore == "no" || pmscore == "No" ||pmscore == "")
{
pmcolor = "green"
commentprintpm = " no"
}
else if (pmscore == "y" || pmscore == "Y" || pmscore == "YES" || pmscore == "yes" || pmscore == "Yes")
{
pmcolor = "green"
commentprintpm = " yes"
}







win1.document.write ("<BR>" + "<BR>" + "Your responses were as follows:")

win1.document.write ("<BR>" + "<BR>" + "Total Cholesterol: ".fontcolor(lipidcolor) + cholesterolscore)
win1.document.write ("<BR>" + "HDL: ".fontcolor(lipidcolor) + HDLscore)
win1.document.write ("<BR>" + "Triglycerides: ".fontcolor(tgcolor) + triglyceridesscore)
win1.document.write ("<BR>" + "Systolic Blood Pressure: ".fontcolor(systoliccolor) + systolicscore)
win1.document.write ("<BR>" + "Diastolic Blood Pressure: ".fontcolor(diastoliccolor) + diastolicscore)
win1.document.write ("<BR>" + "Fasting Blood Sugar: ".fontcolor(glucosecolor) + glucosescore)
win1.document.write ("<BR>" + "Pounds Overweight: ".fontcolor(weightcolor) + weightscore)
win1.document.write ("<BR>" + "Waist Measurement: ".fontcolor(waistcolor) + waistscore)
win1.document.write ("<BR>" + "Exercise Level: ".fontcolor(exercisecolor) + exercisescore + commentprintex)
win1.document.write ("<BR>" + "Stress Level: ".fontcolor(stresscolor) + stressscore + commentprintstress)
win1.document.write ("<BR>" + "Number of Heart Attacks: ".fontcolor(heartattackscolor) + heartattacksnumberscore)
win1.document.write ("<BR>" + "Years Since Last Heart Attack: ".fontcolor(heartattackscolor) + heartattackslastscore)
win1.document.write ("<BR>" + "History Heart Disease, Bypass, Angioplasty: ".fontcolor(heartdiseasecolor) + commentprintheartdisease)
win1.document.write ("<BR>" + "Angina: ".fontcolor(anginacolor) + commentprintangina)
win1.document.write ("<BR>" + "History Stroke: ".fontcolor(strokecolor) + commentprintstroke)
win1.document.write ("<BR>" + "Family History--Parents: ".fontcolor(parentscolor) + parentsscore + " (parent(s) having heart attack before 65)")
win1.document.write ("<BR>" + "Family History--grandparents: ".fontcolor(grandparentscolor) + grandparentsscore + " (grandparent(s) having heart attack before 65)")
win1.document.write ("<BR>" + "Smoking: ".fontcolor(smokingcolor) + smokingscore)
win1.document.write ("<BR>" + "Second Hand Smoke: ".fontcolor(secondhandsmokecolor) + commentprintsecondhand)
win1.document.write ("<BR>" + "Postmenopausal: ".fontcolor(pmcolor) + commentprintpm)
win1.document.write ("<BR>" + "Age: " + agescore)
win1.document.write ("<BR>" + "Gender: " + genderscore)

//win1.document.write ("<BR>" + "<BR>" + "Your responses were as follows:")
//win1.document.write ("<BR>" + "<BR>")
//win1.document.write ("<BR>" + "<BR>")
//win1.document.write ("<BR>" + "<BR>" + "Total Cholesterol: ".fontcolor(lipidcolor) + cholesterolscore)
//win1.document.write ("<BR>" + "HDL: ".fontcolor(lipidcolor) + HDLscore)
//win1.document.write ("<BR>" + "Triglycerides: ".fontcolor(tgcolor) + triglyceridesscore)
//win1.document.write ("<BR>" + "Systolic Blood Pressure: ".fontcolor(systoliccolor) + systolicscore)
//win1.document.write ("<BR>" + "Diastolic Blood Pressure: ".fontcolor(diastoliccolor) + diastolicscore)
//win1.document.write ("<BR>" + "Fasting Blood Sugar: ".fontcolor(glucosecolor) + glucosescore)
//win1.document.write ("<BR>" + "Pounds Overweight: ".fontcolor(weightcolor) + weightscore)
//win1.document.write ("<BR>" + "Waist Measurement: ".fontcolor(waistcolor) + waistscore)
//win1.document.write ("<BR>" + "Exercise Level: ".fontcolor(exercisecolor) + exercisescore + commentprintex)
//win1.document.write ("<BR>" + "Stress Level: ".fontcolor(stresscolor) + stressscore + commentprintstress)
//win1.document.write ("<BR>" + "Number of Heart Attacks: ".fontcolor(heartattackscolor) + heartattacksnumberscore)
//win1.document.write ("<BR>" + "Years Since Last Heart Attack: ".fontcolor(heartattackscolor) + heartattackslastscore)
//win1.document.write ("<BR>" + "History Heart Disease, Bypass, Angioplasty: ".fontcolor(heartdiseasecolor) + commentprintheartdisease)
//win1.document.write ("<BR>" + "Angina: ".fontcolor(anginacolor) + commentprintangina)
//win1.document.write ("<BR>" + "History Stroke: ".fontcolor(strokecolor) + commentprintstroke)
//win1.document.write ("<BR>" + "Family History--Parents: ".fontcolor(parentscolor) + parentsscore + " (parent(s) having heart attack before 65)")
//win1.document.write ("<BR>" + "Family History--grandparents: ".fontcolor(grandparentscolor) + grandparentsscore + " (grandparent(s) having heart attack before 65)")
//win1.document.write ("<BR>" + "Smoking: ".fontcolor(smokingcolor) + smokingscore)
//win1.document.write ("<BR>" + "Second Hand Smoke: ".fontcolor(secondhandsmokecolor) + commentprintsecondhand)
//win1.document.write ("<BR>" + "Postmenopausal: ".fontcolor(pmcolor) + commentprintpm)
//win1.document.write ("<BR>" + "Age: " + agescore)
//win1.document.write ("<BR>" + "Gender: " + genderscore)
//win1.document.write ("<BR>" + "19. Your age/gender group is: " + print19)

//What the colors mean
win1.document.write ("<BR>" + "<BR>" + "Color Coding of Responses is as Follows:" + "<BR>")
//below puts them all on 1 line to save space
//win1.document.write ("Green is safe".fontcolor("green")+ " Yellow is borderline".fontcolor("goldenrod") + " Maroon is dangerous".fontcolor("maroon")+ (" Red is very dangerous".fontcolor("red")+ "<BR>"))

win1.document.write ("Green is safe".fontcolor("green")+ "<BR>")
win1.document.write ("Yellow is borderline".fontcolor("goldenrod")+" <BR>")
win1.document.write ("Maroon is dangerous".fontcolor("maroon")+ "<BR>")
win1.document.write ("Red is very dangerous".fontcolor("red"))


win1.document.write ("<BR>" + "<BR>" + namescore)
win1.document.write (", " + timestamp);

win1.document.write ("<BR>" + "<BR>" + " | | | | | | | | | | | | | | |")

//this is explanation of risk factors section
win1.document.write ("<BR>" + "<BR>" + "<b><big>Cholesterol</big></b>")
win1.document.write ("<BR>" + "Cholesterol is one of the biggest risk factors in the development of cardiovascular disease.  Total cholesterol and HDL work together.  The Framingham Heart Study showed that total cholesterol levels of 150 or less are considered very safe.  They are also very uncommon.  The higher the level of total cholesterol, the higher the level of good HDL cholesterol must be to offer protection.  See our online book Cholesterol and Heart Risk--link from our Home Page--for more information.")


//August2001
if (HDLscore > cholesterolscore)
window.alert ("It is impossible to have an HDL score higher than total cholesterol.  Please check your entries.")

if ((cholesterolscore / HDLscore) < 2)
window.alert ("It is very unusual to have so low a cholesterol/HDL ratio.  Please check your entries.")

if (cholesterolscore < 100)
win1.document.write (" Your cholesterol score is unusually low.  You may want to check your entry or see a physician.".fontcolor("goldenrod"))
else



if (cholesterolscore > 2)
{
if (lipidscore <= 0)
win1.document.write (" Your combination cholesterol and HDL levels are considered healthful.".fontcolor("green"))
else if (lipidscore <= .7)
win1.document.write (" Even though better than 'average', from a risk standpoint your combination cholesterol and HDL levels are considered borderline (total cholesterol must be very low, or HDL very high, for levels to be considered safe).  You would do well to lower your total cholesterol, raise your HDL, or both.".fontcolor("goldenrod"))
else if (lipidscore <= 1.3)
win1.document.write (" Though in the 'average' range, your combination cholesterol and HDL levels are considered dangerous. (For additional information on this subject, see our online book Cholesterol and Heart Risk, page 17, accessed from our home page or directly at www.heartriskevaluations.com/cholesterolbook.htm; also see two New York Times articles--Drug That Reduces Average Cholesterol Level Reduces Risk of Heart Attack, and Panel Touts Aggressive Cholesterol Treatment, linked from left column of our home page.)  You would do well to lower your total cholesterol, raise your HDL, or both.  You may want to see a physician.".fontcolor("maroon"))

else if (lipidscore > 1.3)
win1.document.write (" Your combination cholesterol and HDL levels are considered very dangerous.  You would do well to lower your total cholesterol, raise your HDL, or both.  At these levels it would be wise to see a physician.".fontcolor("red"))
}
else
win1.document.write ("")

//August2001
if (lipidscore >= .7)
//document.write ("<b><i>  Heart Risk Evaluations has calculated your predicted risk score and category if you were to begin taking cholesterol statin medication.  With typical results, your score would be reduced from " + (score) + " to " + (statinscore) + " and from the " + (category) + " category to the " + (statincategory) + " category.</i></b>")
//this way below was to make it easier to use color

//august2001b this is replaced by Goal section
//lipidstatement = ("<b><i>  Heart Risk Evaluations has calculated your predicted risk score and category if you were to begin taking cholesterol statin medication.  With typical results, your score would be reduced from " + (score) + " to " + (statinscore) + " and from the " + (category) + " category to the " + (statincategory) + " category.</i></b>")
//win1.document.write (lipidstatement.fontcolor("blue"))

//August2001
if (HDLscore > 125)
win1.document.write (" Your HDL score is unusually high.  You may want to check your entry or see a physician.".fontcolor("goldenrod"))


win1.document.write ("<BR>" + "<BR>" + "<b><big>Triglycerides</big></b>")
//August2001
win1.document.write ("<BR>" + "Triglycerides are a blood fat that in recent years have been recognized as a major factor in the development of heart disease.  In general, levels under 150-175 are considered safe, levels up to 300 borderline, and levels exceeding this high.  Some with very low total cholesterol levels, particularly those on high carbohydrate diets, may have high triglyceride levels.  Heart risk is considered to double when triglycerides reach the 500-700 level.")
if (triglyceridesscore <= 35)
win1.document.write (" Your triglyceride level is unusually low.  You may want to check your entry or see a physician".fontcolor("goldenrod"))
else if (triglyceridesscore <= 165)
win1.document.write (" Your triglyceride level is considered healthful.".fontcolor("green"))
else if (triglyceridesscore <= 300)
win1.document.write (" Your triglyceride level is considered borderline high.  You would do well to lower it somewhat.".fontcolor("goldenrod"))
else if (triglyceridesscore <= 500)
win1.document.write (" Your triglyceride level is considered dangerous.  You would do well to lower it. Aim for the 100-200 range.".fontcolor("maroon"))
else if (triglyceridesscore > 500)
win1.document.write (" Your triglyceride level is considered very dangerous.  You would do well to lower it.  You should consider seeing a physician for this condition.".fontcolor("red"))



//August2001
if (systolicscore <75 || diastolicscore <45)
document.write ("One or both of your blood pressure entries is very low.  You may want to check your entries or see a physician.".fontcolor("goldenrod"))
else


win1.document.write ("<BR>" + "<BR>" + "<b><big>Blood Pressure</big></b>")
win1.document.write ("<BR>" + " High Blood Pressure is a major risk factor for heart attack and even more so for stroke.  Blood pressure refers to the pressure of blood upon the artery walls.  Systolic is the pressure while blood is spurting after a heartbeat and diastolic is the pressure between beats.  Normal blood pressure is considered 120/80 (systolic/diastolic) or very close to it.  It is generally desirable to have blood pressure at this level or a little lower.  When the pressure rises to about 140/90 it is often considered borderline high, and over about 160/95 it is considered dangerously high.  Levels above 180/100 are usually considered very dangerously high.  If your blood pressure is high it is important to reduce it to normal or near normal levels.  Various measures can be taken to accomplish this.  Sometimes dietary changes, especially a reduction in salt and fat, will help.  Reducing stress is also helpful.")
//August2001
if (systolicscore <75 || diastolicscore <45)
document.write ("One or both of your blood pressure entries is very low.  You may want to check your entries or see a physician.".fontcolor("goldenrod"))
else
if (systolicscore > 1 || diastolicscore > 1)
{
if (bpscore <= .2)
win1.document.write (" Your blood pressure is in the healthful range.".fontcolor("green"))
else if (bpscore <= .6)
win1.document.write (" Your blood pressure is borderline.  You'd do well to lower it somewhat.".fontcolor("goldenrod"))
else if (bpscore <= 1.1)
win1.document.write (" Your blood pressure is dangerously high.  You'd do well to lower it.  You also may want to see a physician.".fontcolor("maroon"))
else if (bpscore > 1.1)
win1.document.write (" Your blood pressure is very dangerously high.  It is important that you lower it substantially.  It is recommended that you see a physician.".fontcolor("red"))
}
else
win1.document.write ("")




win1.document.write ("<BR>" + "<BR>" + "<b><big>Glucose</big></b>")
win1.document.write ("<BR>" + "Diabetes, usually defined as a fasting blood sugar level of 126 or higher, produces many devastating effects upon the body.  Included in these are a tendency to hardening of the arteries, thus leading to cardiovascular disease.  It is important to take steps to control diabetes immediatly.  With diabetes, the higher the fasting glucose level the more dangerous the condition becomes.  Some have found success with natural measures, such as diet and exercise, while many need medical treatment to bring this condition under control.")

//august2001
if (glucosescore <= 45)
win1.document.write (" Your glucose levels is very low. You may want to check your entry or see a physician.".fontcolor("goldenrod"))
else if (glucosescore <= 105)
win1.document.write (" Your glucose level is in the safe range.".fontcolor("green"))
else if (glucosescore <= 125)
win1.document.write (" Your glucose level is somewhat high, approaching diabetic levels.  Take steps to keep this under control.  A physician can help you with this.".fontcolor("goldenrod"))
else if (glucosescore <= 150)
win1.document.write (" Your glucose level indicated diabetes.  It is important to be under a physician's care.".fontcolor("maroon"))
else if (glucosescore > 150)
win1.document.write (" Your glucose level indicated diabetes.  It is important to be under a physician's care.".fontcolor("red"))

win1.document.write ("<BR>" + "<BR>" + "<b><big>Weight and Waist</big></b>")
win1.document.write ("<BR>" + " Excess body weight is a major risk factor in coronary heart disease.  Especially is this so where the condition is substantial.  Excess body weight places extra strain on the heart, as it must pump harder to circulate blood throughout the body.  Everyday tasks, such as walking, require more work from the heart.  Finally, excess body weight is frequently accompanied by higher than normal levels of total and LDL 'bad' cholesterol, which further damage the cardiovascular system.  Particular danger is associated with a large waist size.  If you tend to carry your weight in your stomach, you are at far greater risk than one who carries more weight below the waistline.  While being overweight is never good, being 'pear' shaped is better than being 'apple' shaped.")
if (weightscore <= 10)
win1.document.write (" Your body weight is in the healthful range.".fontcolor("green"))
else if (weightscore <= 30)
win1.document.write (" Your are slightly overweight.  Your heart health would improve if you lost a few pounds.".fontcolor("goldenrod"))
else if (weightscore <= 60)
win1.document.write (" With your current body weight your heart health would improve if you lost several pounds.".fontcolor("maroon"))
else if (weightscore > 60)
win1.document.write (" You are too heavy.  With your current body weight your heart health would improve if you lost several pounds.".fontcolor("red"))

//august2001
if (waistscore < 20)
window.alert ("Your waist measurement is unusually small.  You may want to check your entry.")

if (waistscore <= 35)
win1.document.write (" Your waist measurement is in the healthful range.".fontcolor("green"))
else if (waistscore <= 40)
win1.document.write (" Your waist measurement is in the borderline range.".fontcolor("goldenrod"))
else if (waistscore <= 45)
win1.document.write (" Your waist measurement is in the dangerous range.".fontcolor("maroon"))
else if (waistscore > 45)
win1.document.write (" Your waist measurement is in the very dangerous range.".fontcolor("red"))

win1.document.write ("<BR>" + "<BR>" + "<b><big>Exercise</big></b>")
win1.document.write ("<BR>" + " Exercise has been repeatedly proven to benefit your whole body, including the cardiovascular system.  Regular aerobic--repeated rhythmic movements, such as walking, biking, swimming and others--exercise strengthens the heart and lungs.  It also tends to raise the level of HDLs--good cholesterol--and promotes general well being and relaxation.  Moderate amounts of flexibility exercise, such as stretching, and strength training are also usually beneficial.  A good exercise program will likely improve both cardiovascular and overall health.  In general, a heart-healthy exercise program is one that is done for a minimum of 20 to 30 minutes at least 3 or 4 days per week at a moderate to brisk pace.  Forty minutes to one hour or more 4 to 6 days a week is ideal.  It is acceptable to break the exercise sections into smaller units--15 minutes of walking 3 times in a day provides similar benefits to walking 45 minutes in one session.  Most of us do well to not turn exercise sessions into conquests, as if we are training for a track meet.  We're not, and we'll get more benefit by enjoying ourselves and smelling some roses along the way.")
if (exercisescore <= 2)
win1.document.write (" Your exercise level is very good.  Keep it up!".fontcolor("green"))
else if (exercisescore <= 3)
win1.document.write (" Your exercise level is average.  You'll benefit yourself by moving up to the next level.".fontcolor("goldenrod"))
else if (exercisescore <= 4)
win1.document.write (" Your exercise level is below average.  You'll benefit yourself by moving up to level 1 or 2.".fontcolor("maroon"))
else if (exercisescore >= 5)
win1.document.write (" Your exercise level is very low.  You'll benefit yourself by diligently beginning a reasonable exercise program.  Those over 35 or concerned about their health should consult a physician before beginning to exercise.".fontcolor("red"))

win1.document.write ("<BR>" + "<BR>" + "<b><big>Stress</big></b>")
win1.document.write ("<BR>" + " Stress, while a part of normal everyday life, becomes very dangerous where stress is at excessive levels.  This is true particularly when the stress is prolonged, or chronic.  Stress places excessive demands on the heart, causing it to work harder.  Blood pressure and LDL bad cholesterol levels may also rise.  Prolonged stress may also have a negative effect on sleep habits, dietary choices, mental outlook and general well being.")
if (stressscore <= 2)
win1.document.write (" Your stress levels are very good.".fontcolor("green"))
else if (stressscore <= 3)
win1.document.write (" Your stress levels seem under reasonable control.".fontcolor("green"))
else if (stressscore <= 4)
win1.document.write (" Your stress levels are a little high--although in this stress-filled world this score is normal.  Consider taking action to lower your stress.".fontcolor("goldenrod"))
else if (stressscore >= 5)
win1.document.write (" Your stress levels are very high.  It is important to bring your stress to more manageable levels.".fontcolor("maroon"))

win1.document.write ("<BR>" + "<BR>" + "<b><big>Personal History of Heart Attack, Heart Disease and Stroke</big></b>")
win1.document.write ("<BR>" + " Personal history of heart attack, stroke and heart disease is probably the greatest predictor of having a heart event in the future. Those with a history of heart disease should lower other risk factors as much as possible.")
//if (heartattackscore <= .5)
//win1.document.write ("")
//else if (heartattackscore <= 1.5)
//win1.document.write (" With your history of heart attack it is important to be very vigilant and diligent with your risk factors.".fontcolor("red"))
//else if (heartattackscore <= 3)
//win1.document.write (" With your history of heart attack it is important to be very vigilant and diligent with your risk factors.".fontcolor("red"))
//else if (heartattackscore > 3)
//win1.document.write (" With your history of heart attack it is important to be very vigilant and diligent with your risk factors.".fontcolor("red"))
//else
//win1.document.write ("don't eat eggs")

if ((heartdiseasescore == "y" || heartdiseasescore == "Y" || heartdiseasescore == "YES" || heartdiseasescore == "yes" || heartdiseasescore == "Yes") & (heartattackscore <= .5))
win1.document.write (" With your history of heart disease it is important to be very vigilant and diligent with your risk factors.".fontcolor("red"))

win1.document.write ("<BR>" + "<BR>" + "<b><big>Angina</big></b>")
win1.document.write ("<BR>" + "Angina is normally recognized as pain in the middle of the chest, especially during stress or exertion.  Angina is usually a sign of narrowed coronary arteries and is to be taken as a major danger signal.")
if (anginascore == "m" || anginascore == "mild")
win1.document.write (" Your response indicates mild angina.  It would be appropriate to be under a physician's care for this condition.".fontcolor("maroon"))
else if (anginascore == "mo" || anginascore == "moderate")
win1.document.write (" Your response indicates moderate angina.  It would be appropriate to be under a physician's care for this condition.".fontcolor("red"))
else if (anginascore == "s" || anginascore == "severe")
win1.document.write (" Your response indicates severe angina.  It would be appropriate to be under a physician's care for this condition.".fontcolor("red"))
else if (anginascore == "" || anginascore == 0 || anginascore == "none")
//win1.document.write ("")
win1.document.write (" Your response indicates no angina.".fontcolor("green"))

win1.document.write ("<BR>" + "<BR>" + "<b><big>Family History</big></b>")
win1.document.write ("<BR>" + " Family history of heart disease is considered a risk factor, as studies have shown that other members of the family are at greater risk of suffering a heart attack.  Some of the reason for this is likely genetic--perhaps high cholesterol runs in the family due to genetic factors--while it is also likely that learned behavior is also often responsible--the high cholesterol may be caused by poor family dietary habits.  Those with a strong family history of heart disease should be extra careful to keep other risk factors low.")
if ((parentsscore2 + grandparentsscore2) < .2)
//{}
win1.document.write (" Your family history appears to be favorable.")
else if ((parentsscore2 + grandparentsscore2) <= .4)
win1.document.write (" With your family history of heart disease, it is important that you keep a close watch on your other risk factors.".fontcolor("goldenrod"))
else if ((parentsscore2 + grandparentsscore2) <= .6)
win1.document.write (" With your family history of heart disease, it is important that you keep a close watch on your other risk factors.".fontcolor("maroon"))
else if ((parentsscore2 + grandparentsscore2) > .6)
win1.document.write (" With your family history of heart disease, it is important that you keep a close watch on your other risk factors.".fontcolor("red"))


win1.document.write ("<BR>" + "<BR>" + "<b><big>Smoking and Second-hand smoke</big></b>")
win1.document.write ("<BR>" + " Tobacco use, particularly cigarette smoking, has been shown to increase the risk of heart attack from two to four times.  Smoking places increased strain on the cardiovascular system and damages the heart and lungs.  Smokers also tend to be less physically active, another heart risk factor.  Recently second-hand smoke has become recognized as a risk factor in its own right.  Smokers benefit themselves, and others, greatly by quitting.")
//if (smokingscore == null) //this may not be necessary
//{
if (smokingscore < .1)
win1.document.write (" Congratulations on not smoking!".fontcolor("green"))
else if (smokingscore >= .1)
win1.document.write (" Smoking has no true benefits and damages your health and that of your loved ones.  We encourage you to quit and reap the health and other benefits.".fontcolor("red"))
//}
else
win1.document.write (" Congratulations on not smoking.  Very good decision!".fontcolor("green"))


if (secondhandsmokescore == "m" || secondhandsmokescore == "mild")
win1.document.write (" It is not always possible to avoid second-hand smoke, but if you do your health and risk will improve.".fontcolor("goldenrod"))
else if (secondhandsmokescore == "mo" || secondhandsmokescore == "moderate")
win1.document.write (" It is not always possible to avoid second-hand smoke, but if you do your health and risk will improve.".fontcolor("maroon"))
else if (secondhandsmokescore == "s" || secondhandsmokescore == "severe")
win1.document.write (" It is not always possible to avoid second-hand smoke, but if you do your health and risk will improve.".fontcolor("red"))
else if (secondhandsmokescore == "" || secondhandsmokescore == 0 || secondhandsmokescore == "none")
{}

win1.document.write ("<BR>" + "<BR>" + "<b><big>Postmenopausal</big></b>")
win1.document.write ("<BR>" + " Post-Menopause adds to a woman's risk profile.  Hormonal changes at this time have a negative effect on the cholesterol levels, as LDL bad cholesterol tends to rise significantly, and HDL good cholesterol may decrease.  Although women up to this point statistically have much less incidence of heart attack then men, with post-menopausal changes the gap closes considerably.  It is important that post-menopausal women pay extra attention to other risk factors.")
if (pmscore == "n" || pmscore == "N" || pmscore == "NO" || pmscore == "no" || pmscore == "No" || pmscore == "")
{
if ((genderscore == "f" || genderscore == "F") && (agescore >37))
win1.document.write (" Though you are not post-menopausal, you are approaching the age where women tend to become so.  For this reason it is important to pay reasonably close attention to your other risk factors at this time.".fontcolor("green")) 
else
win1.document.write ("")
}
else if (pmscore == "y" || pmscore == "Y" || pmscore == "YES" || pmscore == "yes" || pmscore == "Yes")
win1.document.write (" While being postmenopausal is no cause for panic, it would be prudent to keep your eye on all your risk factors, particularly your cholesterol levels.".fontcolor("green"))


//august2001b  Goals and Projected

win1.document.write ("<BR>" + "<BR>" + "<b><big>Projected Goals</big></b>".fontcolor("navy"))
win1.document.write ("<BR>" + " Heart Risk Evaluations has analyzed your risk profile and made projections based on specific goals.  These goals, although requiring effort, can be reached by most patients in a one-year period.  The lifestyle changes normally include (depending upon your specific risk profile) reducing any overweight in half, beginning or increasing an excercise program, quitting smoking altogether, etc.")
win1.document.write ("<BR>" + "<BR>" + score + "--" + category + "--This is your <b>current</b> Heart Risk Evaluations score")
if (score <=.2)
win1.document.write ("<BR>" + "<BR>" + "Because you have such an excellent score and category rating, no goals for improvement are suggested in this section.")
else
{
if (lipidscore <= .7)
win1.document.write ("")
else
win1.document.write ("<BR>" + statinscore + "--" + statincategory + "--Your projected score if you were to begin taking <b>statin medication</b> for cholesterol, based on typical results")
win1.document.write ("<BR>" + lifestylescore + "--" + lifestylecategory + "--Your projected score if you were to make signifigant <b>lifestyle changes</b>")
if (smokingscore >= 1) // smoking score is number smoked
win1.document.write ("<BR>" + "  " + smokingquitscore + "--" + smokingquitcategory + "--Just the one change of <b>quitting smoking</b> would give you this lowered projected risk score and category rating")
if (lipidscore <= .7)
win1.document.write ("")
else
win1.document.write ("<BR>" + lifestyleandstatinscore + "--" + lifestyleandstatincategory + "--Your projected score if you were to combine <b>significant lifestyle changes and begin statin medication</b> for cholesterol")
if (score >.2 && score <=.5)
win1.document.write ("<BR>" + "NOTE--An optional goal is provided here but it is acknowledged that you have a much better than average risk profile")
if (lipidscore <= .7)
win1.document.write ("<BR>" + "<BR>" + "No projections have been made concerning statin cholesterol medication reduction, as your cholesterol levels are favorable")
}







//august2001b
//if (checkprint == ON)
if (printextras == "Y" || printextras == "y" || printextras == "Yes" || printextras == "yes" || printextras == "YES")
{
win1.document.write ("<BR>" + "<BR>" + "<b><big>The Heart Risk Evaluations Recommended Diet</b></big>".fontcolor("navy"))
win1.document.write ("<BR>" + "Expert sources such as Dr. Dean Ornish, Dr. William Castelli and Stanford University's Life Plan all suggest two different dietary programs-one for those with good heart-health and another more stringent one for those with a history of plaque buildup or heart disease.  We agree with this sound approach.")
if (score >= 3.0  || lipidscore >= 1.5 || heartattackscore >= .1 || anginascore >= .1)
win1.document.write ( "<b>(Your report indicates that you may do well to follow the more restrictive guidelines.</b>)")
else
win1.document.write ("")
if (score <= 1.0 && lipidscore <= 0.5 && heartattackscore < .1 && anginascore < .1)
win1.document.write ( "<b>There is nothing in your report that indicates a likely need to be on the more restrictive diet.</b>")
else
win1.document.write ("")
win1.document.write (" In general, a healthy diet should have the following characteristics.  It should:")  
win1.document.write ("<BR>" + "<BR>" + "1.  Be low in saturated fats.  Because the body uses saturated fats to produce cholesterol, saturated fats contribute most to our levels of serum cholesterol, even more so than dietary cholesterol.  For those without heart disease we recommend a limit of 25 grams a day.  For those with heart disease we recommend a limit of 10-15 grams--These limits are best implemented on a weekly basis by average.  This allows for the occasional--and perhaps necessary--splurge.")
win1.document.write ("<BR>" + "<BR>" + "2.  Reduce dietary cholesterol.   Dietary cholesterol will contribute to an increase in serum cholesterol.  And for those of you who may have wondered, there is no way of consuming HDL good cholesterol to increase your bodies level of that substance. Dietary cholesterol increases serum LDL cholesterol.  Heart Risk Evaluations recommends that those without heart disease limit their cholesterol intake to under 200 mg. a day.  Those with heart disease should not exceed 10-50 mg. a day.") 
win1.document.write ("<BR>" + "<BR>" + "3.  Control total fats.  Even unsaturated fats, such as those found in olive, canola and flax seed oil, are healthy only in small or moderate amounts.  We recommend a total fat intake of between 15-25 percent of all dietary calories, concentrating on such healthful sources as the three oils mentioned above and those occurring naturally in avocados, nuts and seeds.  For those with heart disease, we suggest reducing this to 10-20 percent.") 
win1.document.write ("<BR>" + "<BR>" + "4.  Be rich in healthy, natural foods such as whole grains and vegetables.  Fruits, while also natural and healthful, can contain lots of sugar, which can be harmful in excess.  Some limit fruit intake to 1-3 servings per day.")
win1.document.write ("<BR>" + "<BR>" + "5.  Limit consumption of animal products, while concentrating on leaner cuts of meat, such as chicken, fish and turkey, and low-fat or non-fat dairy products.  Egg yolks are very high in cholesterol, and two egg whites often provides a suitable substitute for one egg yolk in cooking.")
win1.document.write ("<BR>" + "<BR>" + "6.  Limits other substances that are harmful in large amounts, such as refined dietary sugar and alcohol.  Remember, you can wipe out all of the good effects of a lower-fat diet by pushing past reasonable limits in these areas.")
win1.document.write ("<BR>" + "<BR>" + "7.  Rule out overeating.  While it is very difficult to track precise caloric intake, and calorie requirements vary from person to person and even from day to day, it is taken for granted that a healthful diet would exclude overeating, especially so on a regular basis.")
win1.document.write ("<BR>" + "<BR>" + "8.  Include moderate to generous amounts of supplementation.  For some a simple, low potency multi-vitamin-mineral tablet may suffice.  Others will achieve better results with higher doses, especially of specific cardiovascular protective nutrients.  Some of the more recognized supplements are vitamins E and C, niacin, flax seed oil, psyllium, garlic--including deodorized--co-enzyme Q-10, and others.")
win1.document.write ("<BR>" + "<BR>" + "9.  Include an abundance of water.  The benefits of proper hydration are many.  A good rule of thumb is to drink eight glasses of water each day.  To tailor a program more closely to your needs, consider the following formula:  Drink one half of your total pounds of body weight in ounces.  Thus, a person weighing 150 pounds should drink 75 ounces of water a day.  We recommended drinking the majority of this away from the main meals. Some meet this requirement by sipping on water through a sports bottle throughout the day.")
win1.document.write ("<BR>" + "<BR>" + "10.  Not be an oppressive drag.  Learn to enjoy eating healthful foods, but don't become a fanatic (those with heart disease or who are at high risk need to be more stringent than the rest of the population, though).  Don't ruin the benefits of  your whole tropical vacation because of being inflexible with your eating habits.  An occasional splurge (not to be confused with binge), or eating small amounts of less than ideal foods, probably won't hurt you.  One famous health practitioner recommends that if you are going to splurge, do it with quality foods.  You'll probably be more satisfied with a smaller amount if you do this, she claims.")


//august2001b
win1.document.write ("<BR>" + "<BR>" + "<big><b>Heart Risk Evaluations Recommended Reading List</big></b>".fontcolor("navy"))

win1.document.write ("<BR>" + "<BR>" + "There is an abundance of excellent reading material available on various aspects of heart risk.  The list below mentions some of these, but is not intended to be all inclusive.") 
win1.document.write ("<BR>" + "<BR>" + "<u>The Stanford Life Plan For a Healthy Heart</u>, Helen Cassidy Page, John Speer Schroeder, M.D., Tara Coghlin Dickson, M.S., R.D., Chronicle Books.  An excellent, comprehensive, well-rounded book.  The dietary plan is easy to grasp, balanced and reasonable.")  
win1.document.write ("<BR>" + "<BR>" + "<u>Good Fat, Bad Fat: Lower Your Cholesterol & Reduce Your Odds of a Heart Attack</u>, William P. Castelli, M.D. and Glen C. Griffin, M.D., Fisher Books.  When William Castelli speaks the heart industry listens!  Dr. Castelli is the long-time medical director of the famed Framingham Heart Study.  This book contains many nuggets of insight, and has a very easy-to-grasp method for keeping cholesterol levels low.")
win1.document.write ("<BR>" + "<BR>" + "<u>Dr. Dean Ornish's Program for Reversing Heart Disease</u>, Dean Ornish, M.D., Random House.  Dr. Ornish's world-renowned heart program.  A well-written, balanced, effective and comprehensive book.")
win1.document.write ("<BR>" + "<BR>" + "<u>The McDougall Program For a Healthy Heart</u>, John A. McDougall, M.D., Dutton.  Another excellent overall heart health book.  Very well laid out, easy to follow.  Comprehensive and authoritative.")
win1.document.write ("<BR>" + "<BR>" + "<u>Eating Well for Optimum Health</u>, Andrew Weil,  Alfred A. Knopf, Inc.  Dr. Weil's series of books, including this, his newest, offer excellent, well-balanced, medical and nutritional information.  Dr. Weil avoids extremes, and in doing so presents his nutritional ideas with wisdom.")
win1.document.write ("<BR>" + "<BR>" + "<u>Fitness For Dummies</u>,  Suzanne Schloshberg, Liz Neporet, IDG Books Worldwide.  Very well organized and written.  One of the best all-around books on exercise and fitness.  Contrary to title, definitely not written for (or by) dummies.")
win1.document.write ("<BR>" + "<BR>" + "<u>Prevention Magazine.</u>  Prevention, a monthly periodical with wide distribution, does an excellent job educating the public concerning important health issues.  There is a heart-health related article in virtually every issue.  Prevention avoids fads and extremes, providing a wealth of the most current balanced research available.  Very readable.")
if (xscore >= 3)
win1.document.write ("<BR>" + "<BR>" + "<u>Syndrome X</u>, Jack Challem, Burt Berkson, M.D., Ph.D., Melissa Diane Smith, John Wiley & Sons. This book nicely describes the occurrence where insulin resistance or carbohydrate processing disorders cause many serious heart-related health problems.  Among these are high cholesterol, low healthy HDL, high triglycerides, high blood pressure, rising fasting glucose levels and a tendency to put on body fat, especially in the upper body.  These can all occur even in the presence of a low fat, low cholesterol diet, and especially where many refined carbohydrates are consumed.  Doctors are paying increasing attention to this syndrome now in the early 21st century.  This book may be of specific value to you based upon your report.")
//      There are many excellent heart health books, such as those by authors Robert Kowalski, Harvey Simon, Julian Whitaker, Kenneth Cooper, Terry Shintani, and others.  You can find all of these publications in your local bookstore, library, or on the web. 
}








win1.document.write ("<BR>" + "<BR>" + "<BR>" + "<i>This test, though medically accurate, is to be used as a preliminary health indicator.  If you have any questions about your heart health, please see a cardiologist, physician or your health care professional.  Good health to you.</i>")

win1.document.write ("<BR>" + "<BR>" + "End of Report")

win1.document.write ("<BR>" + "<BR>" + "Copyright Heart Risk Evaluations, " + year)


//august2001b
win1.document.write ("<BR>" + "<i>www.heartriskevaluations.com</i>")



//August2001changes

if (physicianinfo == "")
win1.document.write ("")
else
win1.document.write ("<BR>" + "<BR>" + "For more information contact:  ".fontcolor("navy"))

if (physicianinfo == "")
win1.document.write ("")
else if (physicianinfo == "gfpc24")
{
win1.document.write ("<BR>" + "Cardiac Rehab".fontcolor("navy"))
win1.document.write ("<BR>" + "Glens Falls Hospital".fontcolor("navy"))
win1.document.write ("<BR>" + "888 888-8888".fontcolor("navy"))
}
else if (physicianinfo == "bnb22")
{
win1.document.write ("<BR>" + "Bruce N. Brent, M.D.".fontcolor("navy"))
win1.document.write ("<BR>" + "2100 Webster Street, Suite 516, San Francisco, CA 94117".fontcolor("navy"))
win1.document.write ("<BR>" + "415 923-3006".fontcolor("navy"))
}




//DispWin = window.open('','NewWin', 'toolbar=no,status=no,scrollbars,width=500,height=400')

//DispWin.win1.document.write ("<BR>" + "<BR>" + "Copyright Heart Risk Evaluations, " + year)
//DispWin.win1.document.write ("<BR>" + "<BR>" + "Copyright Heart Risk Evaluations, " + year)
//DispWin.write ("<BR>" + "<BR>" + "Copyright Heart Risk Evaluations, " + year)
//DispWin.write ("<BR>" + "<BR>" + "Copyright Heart Risk Evaluations, " + year)

//win1.document.write ("<BR>" + "<BR>" + "Copyright Heart Risk Evaluations, 2001" )


//add below to make last line print on Netscape
win1.document.write ("<BR>" + "<BR>" + "")

win1.document.close()


//these print out  held score of each risk factor
//win1.document.write ("<BR>" + "<BR>" +"<big>Scoring:".fontcolor("purple"))
//win1.document.write ("<BR>" + "<BR>" + "Total Cholesterol: " + lipidscore)
//win1.document.write ("<BR>" + "HDL: ")
//win1.document.write ("<BR>" + "Triglycerides: " + triglyceridesscore2)
//win1.document.write ("<BR>" + "Blood Pressure: " + bpscore)
//win1.document.write ("<BR>" + "Fasting Blood Sugar: " + glucosescore2)
//win1.document.write ("<BR>" + "Pounds Overweight: " + weightscore2)
//win1.document.write ("<BR>" + "Waist Measurement: " + waistscore2)
//win1.document.write ("<BR>" + "Exercise Level: " + exercisescore2)
//win1.document.write ("<BR>" + "Stress Level: " + stressscore2)
//win1.document.write ("<BR>" + "Number of Heart Attacks: " + heartattackscore)
//win1.document.write ("<BR>" + "History Heart Disease, Bypass, Angioplasty: " + heartdiseasescore2)
//win1.document.write ("<BR>" + "Angina: " + anginascore2)
//win1.document.write ("<BR>" + "History Stroke: " + strokescore2)
//win1.document.write ("<BR>" + "Family History--Parents: " + parentsscore2)
//win1.document.write ("<BR>" + "Family History--grandparents: " + grandparentsscore2)
//win1.document.write ("<BR>" + "Smoking: " + smokingscore2)
//win1.document.write ("<BR>" + "Second Hand Smoke: " + secondhandsmokescore2)
//win1.document.write ("<BR>" + "Postmenopausal: " + pmscore2)
//win1.document.write ("<BR>" + "Age: " + agescore)
//win1.document.write ("<BR>" + "Gender: " + genderscore)


//return false
//}


//////changeover

////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////

//these are print changes for IE (Internet Explorer)
}
else
{
//this begins printout

//heading
//document.write ("<BR>" + "<BR>" + "<BR>" + "<BR>" +"<BR>" + "<BR>" +"<h1>Heart Risk Evaluations Report</h1>")

document.write ("<h1>Heart Risk Evaluations Report</h1>")

document.write ("<b>" + namescore + "</b>")
document.write ("<b><BR>" + timestamp + "<BR>" + "<BR></b>")




//this is person's name
if (hours <=11)
document.write ("Good morning " + namescore + ". Your personalized heart risk evaluation chart is as follows. " + "<BR>" + "<BR>")
else if (hours > 11 && hours < 18)
document.write ("Good afternoon " + namescore + ". Your personalized heart risk evaluation chart is as follows. " + "<BR>" + "<BR>")
else if (hours > 17)
document.write ("Good evening " + namescore + ". Your personalized heart risk evaluation chart is as follows. " + "<BR>" + "<BR>")
else
document.write ("Greetings " + namescore + ". Your personalized heart risk evaluation chart is as follows. " + "<BR>" + "<BR>")  ////netscape added 47



document.write ("Your score is: " + score + "<BR>")
document.write ("Your risk level is: " + category)

document.write("<BR>" + "<BR>" + "              Your score is " + score + ". The average American adult score is 1.0. You are therefore at " + score + " times the risk of the average American adult.  You are in the " + category + " category.  Those in the " + category + " category " + advice + " For comparison purposes, the average score for your age/gender group is " + averagescore + ". " );

//this is for syndrome X
var HDLx
var waistx
var tgx
var glucosex
var bpx

var xscore

if (genderscore == "f" || genderscore == "F")
{
if (waistscore >= 35)
waistx = 1
else
waistx = 0
if (HDLscore < 50)
HDLx = 1
else
HDLx = 0
if (triglyceridesscore >150)
tgx = 1
else
tgx = 0
if (glucosescore > 110)
glucosex = 1
else
glucosex = 0
if (bpscore > .2)
bpx = 1
else
bpx = 0
}
else if (genderscore == "m" || genderscore == "M")
{
if (waistscore >= 40)
waistx = 1
else
waistx = 0
if (HDLscore < 40)
HDLx = 1
else
HDLx = 0
if (triglyceridesscore >150)
tgx = 1
else
tgx = 0
if (glucosescore > 110)
glucosex = 1
else
glucosex = 0
if (bpscore > .2)
bpx = 1
else
bpx = 0
}



xscore = (waistx + HDLx + tgx + glucosex + bpx)

if (xscore < 3)
document.write ("")
else if (xscore >= 3)
document.write ("<BR>" + "<BR>" + "Your results indicate possible Syndrome X, also known as Metabolic Syndrome, Insulin Resistance Syndrome and several similar names, usually including the words insulin or carbohydrate.  This is where the body has difficulty metabolizing sugars.  Triglyerices, blood pressure and glucose may rise, waist size may expand, and HDLs can lower.  Usually a low sugar diet is helpful in controlling this." + "<BR>" + "<BR>")


//blood pressure
if (bpscore <= .6)
document.write ("")
else if (bpscore > .6)
document.write ("Your blood pressure is dangerously high. It is important to bring your blood pressure well below 150/100. You may want to see a physician, who may recommend medication or another course of treatment.")
//else
//document.write = ("")

//smoking
if (smokingscore2 <= 0)
document.write ("")
else if (smokingscore2 > 0)
document.write (" Smoking adds greatly to heart risk, and is very avoidable.  If you stop smoking your risk will dramatically lessen.")
//else
//document.write = ("")

//lipid
lipidstatement = ""
if (lipidscore <= .9)
document.write ("")
else if (lipidscore > .9 && lipidscore <=1.5)
document.write (" Your lipid levels are in the average/high range.  Even those levels in the average range are not considered healthy or safe.  You can read about this in the online book, <u>Cholesterol and Heart Risk</u>, page 17, accessed from our home page or directly at <u>heartriskevaluations.com/cholesterolbook.htm</u>.")
else if (lipidscore > 1.5)
document.write(" Your lipid profile is unhealthy. You would do well to either make lifestyle changes, see a physician regarding medication, or both.  You can read more about cholesterol and heart risk in the online book, <u>Cholesterol and Heart Risk</u>, accessed from our home page or directly at <u>heartriskevaluations.com/cholesterolbook.htm</u>.")
else
//document.write = ("")

var nomedication = ""
var bpmedication = ""
var diabetesmedication = ""
var lipidmedication = ""
var tgmedication = ""

//if (document.form1.txtCholesterol.value == "" && document.form1.txtHDL.value == "")
//document.write ("<BR>" + "The test will be calculated without cholesterol values being entered, but please note that cholesterol levels are a key factor in heart risk asessment")



//MEDICATION ALERT LINE
//document.write ("<BR>" + "<BR>" + "Medication Alert.  You may need medication for the following:" + "<BR>" + bpmedication + " " + diabetesmedication + " " + lipidmedication + " " + tgmedication + nomedication)
document.write ("<BR>" + "<BR>" + "-----")
document.write ("<BR>" + "<b>Medication Alert! You may need medication for the following:</b>")

//if (bpscore > .4||glucosescore2 > .4||lipidscore > .8||triglyceridesscore2 > .4)
//this one below does exaxt measurements of glucose and tgs, instead of by scores
if (bpscore > .4||glucosescore > 120||lipidscore > .7||triglyceridesscore > 300)

if (bpscore <= .4)
document.write ("")
else if (bpscore < .7)
document.write ("<BR>" + "Blood Pressure".fontcolor("goldenrod"))
else if (bpscore < 1.0)
document.write ("<BR>" + "Blood Pressure".fontcolor("maroon"))
else if (bpscore >= 1.0)
document.write ("<BR>" + "Blood Pressure".fontcolor("red"))

//if (glucosescore2 <= .4)
//document.write ("")
//else if (glucosescore2 <= .6)
//document.write ("<BR>" + "Diabetes".fontcolor("goldenrod"))
//else if (glucosescore2 <= .9)
//document.write ("<BR>" + "Diabetes".fontcolor("maroon"))
//else if (glucosescore2 > .9)
//document.write ("<BR>" + "Diabetes".fontcolor("red"))

if (glucosescore <= 120)
document.write ("")
else if (glucosescore <= 140)
document.write ("<BR>" + "Diabetes".fontcolor("goldenrod"))
else if (glucosescore <= 190)
document.write ("<BR>" + "Diabetes".fontcolor("maroon"))
else if (glucosescore > 190)
document.write ("<BR>" + "Diabetes".fontcolor("red"))

if (cholesterolscore == "")
document.write ("")
else
{
if (lipidscore <= .7)
document.write ("")
else if (lipidscore < 1.3)
document.write("<BR>" + "Cholesterol--see notes in Cholesterol section below regarding medication for 'average' cholesterol readings".fontcolor("goldenrod"))
else if (lipidscore < 1.7)
//August2001
document.write("<BR>" + "Cholesterol--see medication note in Cholesterol section below".fontcolor("maroon"))
else if (lipidscore >= 1.7)
document.write("<BR>" + "Cholesterol--see medication note in Cholesterol section below".fontcolor("red"))
}

//if (triglyceridesscore2 <= .4)
//document.write ("")
//else if (triglyceridesscore2 < .6)
//document.write ("<BR>" + "Triglycerides".fontcolor("goldenrod"))
//else if (triglyceridesscore2 < 1.4)
//document.write ("<BR>" + "Triglycerides".fontcolor("maroon"))
//else if (triglyceridesscore2 >= 1.4)
//document.write ("<BR>" + "Triglycerides".fontcolor("red"))

if (triglyceridesscore <= 300)
document.write ("")
else if (triglyceridesscore < 550)
document.write ("<BR>" + "Triglycerides".fontcolor("goldenrod"))
else if (triglyceridesscore < 900)
document.write ("<BR>" + "Triglycerides".fontcolor("maroon"))
else if (triglyceridesscore >= 900)
document.write ("<BR>" + "Triglycerides".fontcolor("red"))

else
document.write ("")

//the exclamation mark below means NOT
//if (!(bpscore > .4||glucosescore2 > .4||lipidscore > .9||triglyceridesscore2 > .4))
if (!(bpscore > .4||glucosescore > 120||lipidscore > .7||triglyceridesscore > 300))
document.write ("<BR>" + "<i>   You appear to have no need for heart-related medication</i>")

//if (bpscore > .4||glucosescore2 > .4||lipidscore > .9||triglyceridesscore2 > .4)
if (bpscore > .4||glucosescore > 120||lipidscore > .7||triglyceridesscore > 300)
document.write ("<BR>" + "(Please see a physician regarding your possible need for medication)")


//if (bpscore > .4||glucosescore2 > .4||lipidscore > .9||triglyceridesscore2 > .4)
if (bpscore > .4||glucosescore > 120||lipidscore > .7||triglyceridesscore > 300)
{
document.write ("<BR>" + "<BR>" + "Color coding for medication alert:")
//document.write ("<BR>" + "Yellow:  There may be a good chance that you can improve this factor through natural means, such as diet and exercise.  The need for medication is possible".fontcolor("goldenrod"))
//document.write ("<BR>" + "Red:  There is a chance that you can improve this factor through natural means, such as diet and exercise. The need for medication may be likely".fontcolor("maroon"))
//document.write ("<BR>" + "Bright Red:  There is little chance that you can improve this factor sufficiently through natural means, such as diet and exercise.  The need for medication is likely.".fontcolor("red"))

document.write ("<BR>" + "Yellow:  Your need for medication is possible".fontcolor("goldenrod"))
document.write ("<BR>" + "Maroon:  Your need for medication is likely".fontcolor("maroon"))
document.write ("<BR>" + "Red:  Your need for medication is very likely".fontcolor("red"))

//document.write ("<BR>" + "In all cases please see a physician who will direct you as regards your specific needs for medication.  Bring this report to your appointment.")
document.write ("<BR>" + "<BR>" + "You may, through natural means such as diet and lifestyle changes, be able to avoid medication.  Especially is this true of yellow coded categories and somewhat true of maroon categories. In all cases please see a physician who will direct you as regards your specific needs for medication.  Bring this report to your appointment.")
}
document.write ("<BR>" + "-----")

//end medication alert


//document.write ("<BR>" + "<BR>" + "Medication Alert.  You may need medication for the following:" + "<BR>" + bpmedication + " " + diabetesmedication + " " + lipidmedication + " " + tgmedication + nomedication)
//var allfactors = (bloodpressure + " " + smoking + " " + lipidstatement + " " + medication)

//document.write (allfactors)


if (genderscore == "f" || genderscore == "F" || genderscore == "m" || genderscore == "M")
document.write ("<BR>" + "<BR>" + "Your 10-year risk of a heart attack is " + tenyearrisk + "%.")// Add this???  Average 10-year risk for your age/gender group is " + averageten + "%.")



//these are color scores
var lipidcolor
if (cholesterolscore > 2)
{
var lipidcolor
if (lipidscore <= 0)
lipidcolor = "green"
else if (lipidscore <= .7)
lipidcolor = "goldenrod"
else if (lipidscore <= 1.3)
lipidcolor = "maroon"
else if (lipidscore > 1.3)
lipidcolor = "red"
}
else
lipidcolor = "green"

var tgcolor
if (triglyceridesscore <= 165)
tgcolor = "green"
else if (triglyceridesscore <= 300)
tgcolor = "goldenrod"
else if (triglyceridesscore <= 500)
tgcolor = "maroon"
else if (triglyceridesscore > 500)
tgcolor = "red"

var systoliccolor
if (systolicscore <= 125)
systoliccolor = "green"
else if (systolicscore <= 140)
systoliccolor = "goldenrod"
else if (systolicscore <= 155)
systoliccolor = "maroon"
else if (systolicscore > 155)
systoliccolor = "red"

var diastoliccolor
if (diastolicscore <= 85)
diastoliccolor = "green"
else if (diastolicscore <= 92)
diastoliccolor = "goldenrod"
else if (diastolicscore <= 100)
diastoliccolor = "maroon"
else if (diastolicscore > 100)
diastoliccolor = "red"

var glucosecolor
if (glucosescore <= 105)
glucosecolor = "green"
else if (glucosescore <= 125)
glucosecolor = "goldenrod"
else if (glucosescore <= 150)
glucosecolor = "maroon"
else if (glucosescore > 150)
glucosecolor = "red"

var weightcolor
if (weightscore <= 10)
weightcolor = "green"
else if (weightscore <= 30)
weightcolor = "goldenrod"
else if (weightscore <= 60)
weightcolor = "maroon"
else if (weightscore > 60)
weightcolor = "red"

var waistcolor
if (waistscore <= 35)
waistcolor = "green"
else if (waistscore <= 40)
waistcolor = "goldenrod"
else if (waistscore <= 45)
waistcolor = "maroon"
else if (waistscore > 45)
waistcolor = "red"


var commentprintex
var commentprintstress
var commentprintangina
var commentprintheartdisease
var commentprintpm
var commentprintstroke
var commentprintsecondhand

var exercisecolor
if (exercisescore <= 1)
{
exercisecolor = "green"
commentprintex = " (very high exercise level)" //these are used in final print to clarify
}
else if (exercisescore <= 2)
{
exercisecolor = "green"
commentprintex = " (high exercise level)"
}
else if (exercisescore <= 3)
{
exercisecolor = "goldenrod"
commentprintex = " (average exercise level)"
}
else if (exercisescore <= 4)
{
exercisecolor = "maroon"
commentprintex = " (low exercise level)"
}
else if (exercisescore >= 5)
{
exercisecolor = "red"
commentprintex = " (very low exercise level)"
}


var stresscolor
if (stressscore <= 1)
{
stresscolor = "green"
commentprintstress = " (very low stress)"
}
else if (stressscore <= 2)
{
stresscolor = "green"
commentprintstress = " (low stress)"
}
else if (stressscore <= 3)
{
stresscolor = "green"
commentprintstress = " (average stress)"
}
else if (stressscore <= 4)
{
stresscolor = "goldenrod"
commentprintstress = " (high stress)"
}
else if (stressscore >= 5)
{
stresscolor = "maroon"
commentprintstress = " (very high stress)"
}


var heartattackscolor
if (heartattackscore <= .5)
heartattackscolor = "green"
else if (heartattackscore <= 1.5)
heartattackscolor = "goldenrod"
else if (heartattackscore <= 3)
heartattackscolor = "maroon"
else if (heartattackscore > 3)
heartattackscolor = "red"

var heartdiseasecolor
if (heartdiseasescore == "n" || (heartdiseasescore == "N" || heartdiseasescore == "NO" || heartdiseasescore == "no") || heartdiseasescore == "No" || heartdiseasescore == "")
{
heartdiseasecolor = "green"
commentprintheartdisease = " no"
}
else if (heartdiseasescore == "y" || (heartdiseasescore == "Y" || heartdiseasescore == "YES" || heartdiseasescore == "yes") || heartdiseasescore == "Yes")
{
heartdiseasecolor = "red"
commentprintheartdisease = " yes"
}
var anginacolor
if (anginascore == "m" || anginascore == "mild")
{
anginacolor = "maroon"
commentprintangina = " mild"
}
else if (anginascore == "mo" || anginascore == "moderate")
{
anginacolor = "red"
commentprintangina = " moderate"
}
else if (anginascore == "s" || anginascore == "severe")
{
anginacolor = "red"
commentprintangina = " severe"
}
else if (anginascore == "" || anginascore == 0 || anginascore == "none")
{
anginacolor = "green"
commentprintangina = " none"
}

var strokecolor
if (strokescore == "n" || strokescore == "N" || strokescore == "NO" || strokescore == "no" || strokescore == "No" || strokescore == "")
//if (strokescore <= .1)
{
strokecolor = "green"
commentprintstroke = " no"
}
else
{
strokecolor = "red"
commentprintstroke = " yes"
}

var parentscolor
if (parentsscore < 1)
parentscolor = "green"
else if (parentsscore < 2)
parentscolor = "goldenrod"
else if (parentsscore >= 2)
parentscolor = "red"

var grandparentscolor
if (grandparentsscore <= 1)
grandparentscolor = "green"
else if (grandparentsscore <= 2)
grandparentscolor = "goldenrod"
else if (grandparentsscore <= 4)
grandparentscolor = "maroon"

var smokingcolor
if (smokingscore < .1)
smokingcolor = "green"
else if (smokingscore >= .1)
smokingcolor = "red"

var secondhandsmokecolor
if (secondhandsmokescore == "m" || secondhandsmokescore == "mild")
{
secondhandsmokecolor = "goldenrod"
commentprintsecondhand = " mild"
}
else if (secondhandsmokescore == "mo" || secondhandsmokescore == "moderate")
{
secondhandsmokecolor = "maroon"
commentprintsecondhand = " moderate"
}
else if (secondhandsmokescore == "s" || secondhandsmokescore == "severe")
{
secondhandsmokecolor = "red"
commentprintsecondhand = " severe"
}
else if (secondhandsmokescore == "" || secondhandsmokescore == 0 || secondhandsmokescore == "none")
{
secondhandsmokecolor = "green"
commentprintsecondhand = " none"
}

var pmcolor
if (pmscore == "n" || pmscore == "N" || pmscore == "NO" || pmscore == "no" || pmscore == "No" ||pmscore == "")
{
pmcolor = "green"
commentprintpm = " no"
}
else if (pmscore == "y" || pmscore == "Y" || pmscore == "YES" || pmscore == "yes" || pmscore == "Yes")
{
pmcolor = "green"
commentprintpm = " yes"
}


//type1 = document.write ("David Klein".fontcolor(tgcolor))

//type1

document.write ("<BR>" + "<BR>" + "Your responses were as follows:")
document.write ("<BR>" + "<BR>" + "Total Cholesterol: ".fontcolor(lipidcolor) + cholesterolscore)
document.write ("<BR>" + "HDL: ".fontcolor(lipidcolor) + HDLscore)
document.write ("<BR>" + "Triglycerides: ".fontcolor(tgcolor) + triglyceridesscore)
document.write ("<BR>" + "Systolic Blood Pressure: ".fontcolor(systoliccolor) + systolicscore)
document.write ("<BR>" + "Diastolic Blood Pressure: ".fontcolor(diastoliccolor) + diastolicscore)
document.write ("<BR>" + "Fasting Blood Sugar: ".fontcolor(glucosecolor) + glucosescore)
document.write ("<BR>" + "Pounds Overweight: ".fontcolor(weightcolor) + weightscore)
document.write ("<BR>" + "Waist Measurement: ".fontcolor(waistcolor) + waistscore)
document.write ("<BR>" + "Exercise Level: ".fontcolor(exercisecolor) + exercisescore + commentprintex)
document.write ("<BR>" + "Stress Level: ".fontcolor(stresscolor) + stressscore + commentprintstress)
document.write ("<BR>" + "Number of Heart Attacks: ".fontcolor(heartattackscolor) + heartattacksnumberscore)
document.write ("<BR>" + "Years Since Last Heart Attack: ".fontcolor(heartattackscolor) + heartattackslastscore)
document.write ("<BR>" + "History Heart Disease, Bypass, Angioplasty: ".fontcolor(heartdiseasecolor) + commentprintheartdisease)
document.write ("<BR>" + "Angina: ".fontcolor(anginacolor) + commentprintangina)
document.write ("<BR>" + "History Stroke: ".fontcolor(strokecolor) + commentprintstroke)
document.write ("<BR>" + "Family History--Parents: ".fontcolor(parentscolor) + parentsscore + " (parent(s) having heart attack before 65)")
document.write ("<BR>" + "Family History--grandparents: ".fontcolor(grandparentscolor) + grandparentsscore + " (grandparent(s) having heart attack before 65)")
document.write ("<BR>" + "Smoking: ".fontcolor(smokingcolor) + smokingscore)
document.write ("<BR>" + "Second Hand Smoke: ".fontcolor(secondhandsmokecolor) + commentprintsecondhand)
document.write ("<BR>" + "Postmenopausal: ".fontcolor(pmcolor) + commentprintpm)
document.write ("<BR>" + "Age: " + agescore)
document.write ("<BR>" + "Gender: " + genderscore)
//document.write ("<BR>" + "19. Your age/gender group is: " + print19)

//What the colors mean
document.write ("<BR>" + "<BR>" + "Color Coding of Responses is as Follows:" + "<BR>")
//below puts them all on 1 line to save space
//document.write ("Green is safe".fontcolor("green")+ " Yellow is borderline".fontcolor("goldenrod") + " Maroon is dangerous".fontcolor("maroon")+ (" Red is very dangerous".fontcolor("red")+ "<BR>"))

document.write ("Green is safe".fontcolor("green")+ "<BR>")
document.write ("Yellow is borderline".fontcolor("goldenrod")+" <BR>")
document.write ("Maroon is dangerous".fontcolor("maroon")+ "<BR>")
document.write ("Red is very dangerous".fontcolor("red"))


document.write ("<BR>" + "<BR>" + namescore)
document.write (", " + timestamp);

document.write ("<BR>" + "<BR>" + " | | | | | | | | | | | | | | |")

//this is explanation of risk factors section
document.write ("<BR>" + "<BR>" + "<b><big>Cholesterol</big></b>")
document.write ("<BR>" + "Cholesterol is one of the biggest risk factors in the development of cardiovascular disease.  Total cholesterol and HDL work together.  The Framingham Heart Study showed that total cholesterol levels of 150 or less are considered very safe.  They are also very uncommon.  The higher the level of total cholesterol, the higher the level of good HDL cholesterol must be to offer protection.  See our online book Cholesterol and Heart Risk--link from our Home Page--for more information.")

//August2001
if (HDLscore > cholesterolscore)
window.alert ("It is impossible to have an HDL score higher than total cholesterol.  Please check your entries.")

if ((cholesterolscore / HDLscore) < 2)
window.alert ("It is very unusual to have so low a cholesterol/HDL ratio.  Please check your entries.")

if (cholesterolscore < 100)
document.write (" Your cholesterol score is unusually low.  You may want to check your entry or see a physician.".fontcolor("goldenrod"))
else

if (cholesterolscore > 2)
{
if (lipidscore <= 0)
document.write (" Your combination cholesterol and HDL levels are considered healthful.".fontcolor("green"))
else if (lipidscore <= .7)
document.write (" Even though better than 'average', from a risk standpoint your combination cholesterol and HDL levels are considered borderline (total cholesterol must be very low, or HDL very high, for levels to be considered safe).  You would do well to lower your total cholesterol, raise your HDL, or both.".fontcolor("goldenrod"))
else if (lipidscore <= 1.3)
document.write (" Though in the 'average' range, your combination cholesterol and HDL levels are considered dangerous. (For additional information on this subject, see our online book Cholesterol and Heart Risk, page 17, accessed from our home page or directly at www.heartriskevaluations.com/cholesterolbook.htm; also see two New York Times articles--Drug That Reduces Average Cholesterol Level Reduces Risk of Heart Attack, and Panel Touts Aggressive Cholesterol Treatment, linked from left column of our home page.)  You would do well to lower your total cholesterol, raise your HDL, or both.  You may want to see a physician.".fontcolor("maroon"))
else if (lipidscore > 1.3)
document.write (" Your combination cholesterol and HDL levels are considered very dangerous.  You would do well to lower your total cholesterol, raise your HDL, or both.  At these levels it would be wise to see a physician.".fontcolor("red"))
}
else
document.write ("")

//August2001
if (lipidscore >= .7)
//document.write ("<b><i>  Heart Risk Evaluations has calculated your predicted risk score and category if you were to begin taking cholesterol statin medication.  With typical results, your score would be reduced from " + (score) + " to " + (statinscore) + " and from the " + (category) + " category to the " + (statincategory) + " category.</i></b>")
//this way below was to make it easier to use color
//august2001b this is replaced by the Goal section
//lipidstatement = ("<b><i>  Heart Risk Evaluations has calculated your predicted risk score and category if you were to begin taking cholesterol statin medication.  With typical results, your score would be reduced from " + (score) + " to " + (statinscore) + " and from the " + (category) + " category to the " + (statincategory) + " category.</i></b>")
//document.write (lipidstatement.fontcolor("blue"))

//August2001
if (HDLscore > 125)
document.write (" Your HDL score is unusually high.  You may want to check your entry or see a physician.".fontcolor("goldenrod"))

document.write ("<BR>" + "<BR>" + "<b><big>Triglycerides</big></b>")
//August2001
document.write ("<BR>" + "Triglycerides are a blood fat that in recent years have been recognized as a major factor in the development of heart disease.  In general, levels under 150-175 are considered safe, levels up to 300 borderline, and levels exceeding this high.  Some with very low total cholesterol levels, particularly those on high carbohydrate diets, may have high triglyceride levels.  Heart risk is considered to double when triglycerides reach the 500-700 level.")
if (triglyceridesscore <= 35)
document.write (" Your triglyceride level is unusually low.  You may want to check your entry or see a physician".fontcolor("goldenrod"))
else if (triglyceridesscore <= 165)
document.write (" Your triglyceride level is considered healthful.".fontcolor("green"))
else if (triglyceridesscore <= 300)
document.write (" Your triglyceride level is considered borderline high.  You would do well to lower it somewhat.".fontcolor("goldenrod"))
else if (triglyceridesscore <= 500)
document.write (" Your triglyceride level is considered dangerous.  You would do well to lower it. Aim for the 100-200 range.".fontcolor("maroon"))
else if (triglyceridesscore > 500)
document.write (" Your triglyceride level is considered very dangerous.  You would do well to lower it.  You should consider seeing a physician for this condition.".fontcolor("red"))

document.write ("<BR>" + "<BR>" + "<b><big>Blood Pressure</big></b>")
document.write ("<BR>" + " High Blood Pressure is a major risk factor for heart attack and even more so for stroke.  Blood pressure refers to the pressure of blood upon the artery walls.  Systolic is the pressure while blood is spurting after a heartbeat and diastolic is the pressure between beats.  Normal blood pressure is considered 120/80 (systolic/diastolic) or very close to it.  It is generally desirable to have blood pressure at this level or a little lower.  When the pressure rises to about 140/90 it is often considered borderline high, and over about 160/95 it is considered dangerously high.  Levels above 180/100 are usually considered very dangerously high.  If your blood pressure is high it is important to reduce it to normal or near normal levels.  Various measures can be taken to accomplish this.  Sometimes dietary changes, especially a reduction in salt and fat, will help.  Reducing stress is also helpful.")

//August2001
if (systolicscore <75 || diastolicscore <45)
document.write ("One or both of your blood pressure entries is very low.  You may want to check your entries or see a physician.".fontcolor("goldenrod"))
else

if (systolicscore > 1 || diastolicscore > 1)
{
if (bpscore <= .2)
document.write (" Your blood pressure is in the healthful range.".fontcolor("green"))
else if (bpscore <= .6)
document.write (" Your blood pressure is borderline.  You'd do well to lower it somewhat.".fontcolor("goldenrod"))
else if (bpscore <= 1.1)
document.write (" Your blood pressure is dangerously high.  You'd do well to lower it.  You also may want to see a physician.".fontcolor("maroon"))
else if (bpscore > 1.1)
document.write (" Your blood pressure is very dangerously high.  It is important that you lower it substantially.  It is recommended that you see a physician.".fontcolor("red"))
}
else
document.write ("")


document.write ("<BR>" + "<BR>" + "<b><big>Glucose</big></b>")
document.write ("<BR>" + "Diabetes, usually defined as a fasting blood sugar level of 126 or higher, produces many devastating effects upon the body.  Included in these are a tendency to hardening of the arteries, thus leading to cardiovascular disease.  It is important to take steps to control diabetes immediatly.  With diabetes, the higher the fasting glucose level the more dangerous the condition becomes.  Some have found success with natural measures, such as diet and exercise, while many need medical treatment to bring this condition under control.")

//august2001
if (glucosescore <= 45)
document.write (" Your glucose levels is very low. You may want to check your entry or see a physician.".fontcolor("goldenrod"))
else if (glucosescore <= 105)
document.write (" Your glucose level is in the safe range.".fontcolor("green"))
else if (glucosescore <= 125)
document.write (" Your glucose level is somewhat high, approaching diabetic levels.  Take steps to keep this under control.  A physician can help you with this.".fontcolor("goldenrod"))
else if (glucosescore <= 150)
document.write (" Your glucose level indicated diabetes.  It is important to be under a physician's care.".fontcolor("maroon"))
else if (glucosescore > 150)
document.write (" Your glucose level indicated diabetes.  It is important to be under a physician's care.".fontcolor("red"))


document.write ("<BR>" + "<BR>" + "<b><big>Weight and Waist</big></b>")
document.write ("<BR>" + " Excess body weight is a major risk factor in coronary heart disease.  Especially is this so where the condition is substantial.  Excess body weight places extra strain on the heart, as it must pump harder to circulate blood throughout the body.  Everyday tasks, such as walking, require more work from the heart.  Finally, excess body weight is frequently accompanied by higher than normal levels of total and LDL 'bad' cholesterol, which further damage the cardiovascular system.  Particular danger is associated with a large waist size.  If you tend to carry your weight in your stomach, you are at far greater risk than one who carries more weight below the waistline.  While being overweight is never good, being 'pear' shaped is better than being 'apple' shaped.")
if (weightscore <= 10)
document.write (" Your body weight is in the healthful range.".fontcolor("green"))
else if (weightscore <= 30)
document.write (" Your are slightly overweight.  Your heart health would improve if you lost a few pounds.".fontcolor("goldenrod"))
else if (weightscore <= 60)
document.write (" With your current body weight your heart health would improve if you lost several pounds.".fontcolor("maroon"))
else if (weightscore > 60)
document.write (" You are too heavy.  With your current body weight your heart health would improve if you lost several pounds.".fontcolor("red"))

//august2001
if (waistscore < 20)
window.alert ("Your waist measurement is unusually small.  You may want to check your entry.")

if (waistscore <= 35)
document.write (" Your waist measurement is in the healthful range.".fontcolor("green"))
else if (waistscore <= 40)
document.write (" Your waist measurement is in the borderline range.".fontcolor("goldenrod"))
else if (waistscore <= 45)
document.write (" Your waist measurement is in the dangerous range.".fontcolor("maroon"))
else if (waistscore > 45)
document.write (" Your waist measurement is in the very dangerous range.".fontcolor("red"))

document.write ("<BR>" + "<BR>" + "<b><big>Exercise</big></b>")
document.write ("<BR>" + " Exercise has been repeatedly proven to benefit your whole body, including the cardiovascular system.  Regular aerobic--repeated rhythmic movements, such as walking, biking, swimming and others--exercise strengthens the heart and lungs.  It also tends to raise the level of HDLs--good cholesterol--and promotes general well being and relaxation.  Moderate amounts of flexibility exercise, such as stretching, and strength training are also usually beneficial.  A good exercise program will likely improve both cardiovascular and overall health. In general, a heart-healthy exercise program is one that is done for a minimum of 20 to 30 minutes at least 3 or 4 days per week at a moderate to brisk pace.  Forty minutes to one hour or more 4 to 6 days a week is ideal.  It is acceptable to break the exercise sections into smaller units--15 minutes of walking 3 times in a day provides similar benefits to walking 45 minutes in one session.  Most of us do well to not turn exercise sessions into conquests, as if we are training for a track meet.  We're not, and we'll get more benefit by enjoying ourselves and smelling some roses along the way.")
if (exercisescore <= 2)
document.write (" Your exercise level is very good.  Keep it up!".fontcolor("green"))
else if (exercisescore <= 3)
document.write (" Your exercise level is average.  You'll benefit yourself by moving up to the next level.".fontcolor("goldenrod"))
else if (exercisescore <= 4)
document.write (" Your exercise level is below average.  You'll benefit yourself by moving up to level 1 or 2.".fontcolor("maroon"))
else if (exercisescore >= 5)
document.write (" Your exercise level is very low.  You'll benefit yourself by diligently beginning a reasonable exercise program.  Those over 35 or concerned about their health should consult a physician before beginning to exercise.".fontcolor("red"))

document.write ("<BR>" + "<BR>" + "<b><big>Stress</big></b>")
document.write ("<BR>" + " Stress, while a part of normal everyday life, becomes very dangerous where stress is at excessive levels.  This is true particularly when the stress is prolonged, or chronic.  Stress places excessive demands on the heart, causing it to work harder.  Blood pressure and LDL bad cholesterol levels may also rise.  Prolonged stress may also have a negative effect on sleep habits, dietary choices, mental outlook and general well being.")
if (stressscore <= 2)
document.write (" Your stress levels are very good.".fontcolor("green"))
else if (stressscore <= 3)
document.write (" Your stress levels seem under reasonable control.".fontcolor("green"))
else if (stressscore <= 4)
document.write (" Your stress levels are a little high--although in this stress-filled world this score is normal.  Consider taking action to lower your stress.".fontcolor("goldenrod"))
else if (stressscore >= 5)
document.write (" Your stress levels are very high.  It is important to bring your stress to more manageable levels.".fontcolor("maroon"))

document.write ("<BR>" + "<BR>" + "<b><big>Personal History of Heart Attack, Heart Disease and Stroke</big></b>")
document.write ("<BR>" + " Personal history of heart attack, stroke and heart disease is probably the greatest predictor of having a heart event in the future. Those with a history of heart disease should lower other risk factors as much as possible.")
if (heartattackscore <= .5)
{}
else if (heartattackscore <= 1.5)
document.write (" With your history of heart attack it is important to be very vigilant and diligent with your risk factors.".fontcolor("red"))
else if (heartattackscore <= 3)
document.write (" With your history of heart attack it is important to be very vigilant and diligent with your risk factors.".fontcolor("red"))
else if (heartattackscore > 3)
document.write (" With your history of heart attack it is important to be very vigilant and diligent with your risk factors.".fontcolor("red"))

if ((heartdiseasescore == "y" || heartdiseasescore == "Y" || heartdiseasescore == "YES" || heartdiseasescore == "yes" || heartdiseasescore == "Yes") & (heartattackscore <= .5))
document.write (" With your history of heart disease it is important to be very vigilant and diligent with your risk factors.".fontcolor("red"))

document.write ("<BR>" + "<BR>" + "<b><big>Angina</big></b>")
document.write ("<BR>" + "Angina is normally recognized as pain in the middle of the chest, especially during stress or exertion.  Angina is usually a sign of narrowed coronary arteries and is to be taken as a major danger signal.")
if (anginascore == "m" || anginascore == "mild")
document.write (" Your response indicates mild angina.  It would be appropriate to be under a physician's care for this condition.".fontcolor("maroon"))
else if (anginascore == "mo" || anginascore == "moderate")
document.write (" Your response indicates moderate angina.  It would be appropriate to be under a physician's care for this condition.".fontcolor("red"))
else if (anginascore == "s" || anginascore == "severe")
document.write (" Your response indicates severe angina.  It would be appropriate to be under a physician's care for this condition.".fontcolor("red"))
else if (anginascore == "" || anginascore == 0 || anginascore == "none")
//document.write ("")
document.write (" Your response indicates no angina.".fontcolor("green"))


document.write ("<BR>" + "<BR>" + "<b><big>Family History</big></b>")
document.write ("<BR>" + " Family history of heart disease is considered a risk factor, as studies have shown that other members of the family are at greater risk of suffering a heart attack.  Some of the reason for this is likely genetic--perhaps high cholesterol runs in the family due to genetic factors--while it is also likely that learned behavior is also often responsible--the high cholesterol may be caused by poor family dietary habits.  Those with a strong family history of heart disease should be extra careful to keep other risk factors low.")
if ((parentsscore2 + grandparentsscore2) < .2)
//{}
document.write (" Your family history appears to be favorable.".fontcolor("green"))
else if ((parentsscore2 + grandparentsscore2) <= .4)
document.write (" With your family history of heart disease, it is important that you keep a close watch on your other risk factors.".fontcolor("goldenrod"))
else if ((parentsscore2 + grandparentsscore2) <= .6)
document.write (" With your family history of heart disease, it is important that you keep a close watch on your other risk factors.".fontcolor("maroon"))
else if ((parentsscore2 + grandparentsscore2) > .6)
document.write (" With your family history of heart disease, it is important that you keep a close watch on your other risk factors.".fontcolor("red"))


document.write ("<BR>" + "<BR>" + "<b><big>Smoking and Second-hand smoke</big></b>")
document.write ("<BR>" + " Tobacco use, particularly cigarette smoking, has been shown to increase the risk of heart attack from two to four times.  Smoking places increased strain on the cardiovascular system and damages the heart and lungs.  Smokers also tend to be less physically active, another heart risk factor.  Recently second-hand smoke has become recognized as a risk factor in its own right.  Smokers benefit themselves, and others, greatly by quitting.")
//if (smokingscore == null) //this may not be necessary
//{
if (smokingscore < .1)
document.write (" Congratulations on not smoking!".fontcolor("green"))
else if (smokingscore >= .1)
document.write (" Smoking has no true benefits and damages your health and that of your loved ones.  We encourage you to quit and reap the health and other benefits.".fontcolor("red"))
//}
else
document.write (" Congratulations on not smoking.  Very good decision!".fontcolor("green"))


if (secondhandsmokescore == "m" || secondhandsmokescore == "mild")
document.write (" It is not always possible to avoid second-hand smoke, but if you do your health and risk will improve.".fontcolor("goldenrod"))
else if (secondhandsmokescore == "mo" || secondhandsmokescore == "moderate")
document.write (" It is not always possible to avoid second-hand smoke, but if you do your health and risk will improve.".fontcolor("maroon"))
else if (secondhandsmokescore == "s" || secondhandsmokescore == "severe")
document.write (" It is not always possible to avoid second-hand smoke, but if you do your health and risk will improve.".fontcolor("red"))
else if (secondhandsmokescore == "" || secondhandsmokescore == 0 || secondhandsmokescore == "none")
{}

document.write ("<BR>" + "<BR>" + "<b><big>Postmenopausal</big></b>")
document.write ("<BR>" + " Post-Menopause adds to a woman's risk profile.  Hormonal changes at this time have a negative effect on the cholesterol levels, as LDL bad cholesterol tends to rise significantly, and HDL good cholesterol may decrease.  Although women up to this point statistically have much less incidence of heart attack then men, with post-menopausal changes the gap closes considerably.  It is important that post-menopausal women pay extra attention to other risk factors.")
if (pmscore == "n" || pmscore == "N" || pmscore == "NO" || pmscore == "no" || pmscore == "No" || pmscore == "")
{
if ((genderscore == "f" || genderscore == "F") && (agescore >37))
document.write (" Though you are not post-menopausal, you are approaching the age where women tend to become so.  For this reason it is important to pay reasonably close attention to your other risk factors at this time.".fontcolor("green")) 
else
document.write ("")
}
else if (pmscore == "y" || pmscore == "Y" || pmscore == "YES" || pmscore == "yes" || pmscore == "Yes")
document.write (" While being postmenopausal is no cause for panic, it would be prudent to keep your eye on all your risk factors, particularly your cholesterol levels.".fontcolor("green"))


//august2001b  Goals and Projected

document.write ("<BR>" + "<BR>" + "<b><big>Projected Goals</big></b>".fontcolor("navy"))
document.write ("<BR>" + " Heart Risk Evaluations has analyzed your risk profile and made projections based on specific goals.  These goals, although requiring effort, can be reached by most patients in a one-year period.  The lifestyle changes normally include (depending upon your specific risk profile) reducing any overweight in half, beginning or increasing an excercise program, quitting smoking altogether, etc.")
document.write ("<BR>" + "<BR>" + score + "--" + category + "--This is your <b>current</b> Heart Risk Evaluations score")
if (score <=.2)
document.write ("<BR>" + "<BR>" + "Because you have such an excellent score and category rating, no goals for improvement are suggested in this section.")
else
{
if (lipidscore <= .7)
document.write ("")
else
document.write ("<BR>" + statinscore + "--" + statincategory + "--Your projected score if you were to begin taking <b>statin medication</b> for cholesterol, based on typical results")
document.write ("<BR>" + lifestylescore + "--" + lifestylecategory + "--Your projected score if you were to make significant <b>lifestyle changes</b>")
if (smokingscore >= 1) // smoking score is number smoked
document.write ("<BR>" + "  " + smokingquitscore + "--" + smokingquitcategory + "--Just the one change of <b>quitting smoking</b> would give you this lowered projected risk score and category rating")
if (lipidscore <= .7)
document.write ("")
else
document.write ("<BR>" + lifestyleandstatinscore + "--" + lifestyleandstatincategory + "--Your projected score if you were to combine <b>significant lifestyle changes and begin statin medication</b> for cholesterol")
if (score >.2 && score <=.5)
document.write ("<BR>" + "NOTE--An optional goal is provided here but it is acknowledged that you have a much better than average risk profile")
if (lipidscore <= .7)
document.write ("<BR>" + "<BR>" + "No projections have been made concerning statin cholesterol medication reduction, as your cholesterol levels are favorable")
}



//august2001b
//if (checkprint == ON)
if (printextras == "Y" || printextras == "y" || printextras == "Yes" || printextras == "yes" || printextras == "YES")
{
document.write ("<BR>" + "<BR>" + "<b><big>The Heart Risk Evaluations Recommended Diet</b></big>".fontcolor("navy"))
document.write ("<BR>" + "Expert sources such as Dr. Dean Ornish, Dr. William Castelli and Stanford University's Life Plan all suggest two different dietary programs-one for those with good heart-health and another more stringent one for those with a history of plaque buildup or heart disease.  We agree with this sound approach.")
if (score >= 3.0  || lipidscore >= 1.5 || heartattackscore >= .1 || anginascore >= .1)
document.write ( "<b>(Your report indicates that you may do well to follow the more restrictive guidelines.</b>)")
else
document.write ("")
if (score <= 1.0 && lipidscore <= 0.5 && heartattackscore < .1 && anginascore < .1)
document.write ( "<b>There is nothing in your report that indicates a likely need to be on the more restrictive diet.</b>")
else
document.write ("")
document.write (" In general, a healthy diet should have the following characteristics.  It should:")  
document.write ("<BR>" + "<BR>" + "1.  Be low in saturated fats.  Because the body uses saturated fats to produce cholesterol, saturated fats contribute most to our levels of serum cholesterol, even more so than dietary cholesterol.  For those without heart disease we recommend a limit of 25 grams a day.  For those with heart disease we recommend a limit of 10-15 grams--These limits are best implemented on a weekly basis by average.  This allows for the occasional--and perhaps necessary--splurge.")
document.write ("<BR>" + "<BR>" + "2.  Reduce dietary cholesterol.   Dietary cholesterol will contribute to an increase in serum cholesterol.  And for those of you who may have wondered, there is no way of consuming HDL good cholesterol to increase your bodies level of that substance. Dietary cholesterol increases serum LDL cholesterol.  Heart Risk Evaluations recommends that those without heart disease limit their cholesterol intake to under 200 mg. a day.  Those with heart disease should not exceed 10-50 mg. a day.") 
document.write ("<BR>" + "<BR>" + "3.  Control total fats.  Even unsaturated fats, such as those found in olive, canola and flax seed oil, are healthy only in small or moderate amounts.  We recommend a total fat intake of between 15-25 percent of all dietary calories, concentrating on such healthful sources as the three oils mentioned above and those occurring naturally in avocados, nuts and seeds.  For those with heart disease, we suggest reducing this to 10-20 percent.") 
document.write ("<BR>" + "<BR>" + "4.  Be rich in healthy, natural foods such as whole grains and vegetables.  Fruits, while also natural and healthful, can contain lots of sugar, which can be harmful in excess.  Some limit fruit intake to 1-3 servings per day.")
document.write ("<BR>" + "<BR>" + "5.  Limit consumption of animal products, while concentrating on leaner cuts of meat, such as chicken, fish and turkey, and low-fat or non-fat dairy products.  Egg yolks are very high in cholesterol, and two egg whites often provides a suitable substitute for one egg yolk in cooking.")
document.write ("<BR>" + "<BR>" + "6.  Limits other substances that are harmful in large amounts, such as refined dietary sugar and alcohol.  Remember, you can wipe out all of the good effects of a lower-fat diet by pushing past reasonable limits in these areas.")
document.write ("<BR>" + "<BR>" + "7.  Rule out overeating.  While it is very difficult to track precise caloric intake, and calorie requirements vary from person to person and even from day to day, it is taken for granted that a healthful diet would exclude overeating, especially so on a regular basis.")
document.write ("<BR>" + "<BR>" + "8.  Include moderate to generous amounts of supplementation.  For some a simple, low potency multi-vitamin-mineral tablet may suffice.  Others will achieve better results with higher doses, especially of specific cardiovascular protective nutrients.  Some of the more recognized supplements are vitamins E and C, niacin, flax seed oil, psyllium, garlic--including deodorized--co-enzyme Q-10, and others.")
document.write ("<BR>" + "<BR>" + "9.  Include an abundance of water.  The benefits of proper hydration are many.  A good rule of thumb is to drink eight glasses of water each day.  To tailor a program more closely to your needs, consider the following formula:  Drink one half of your total pounds of body weight in ounces.  Thus, a person weighing 150 pounds should drink 75 ounces of water a day.  We recommended drinking the majority of this away from the main meals. Some meet this requirement by sipping on water through a sports bottle throughout the day.")
document.write ("<BR>" + "<BR>" + "10.  Not be an oppressive drag.  Learn to enjoy eating healthful foods, but don't become a fanatic (those with heart disease or who are at high risk need to be more stringent than the rest of the population, though).  Don't ruin the benefits of  your whole tropical vacation because of being inflexible with your eating habits.  An occasional splurge (not to be confused with binge), or eating small amounts of less than ideal foods, probably won't hurt you.  One famous health practitioner recommends that if you are going to splurge, do it with quality foods.  You'll probably be more satisfied with a smaller amount if you do this, she claims.")


//august2001b
document.write ("<BR>" + "<BR>" + "<big><b>Heart Risk Evaluations Recommended Reading List</big></b>".fontcolor("navy"))

document.write ("<BR>" + "<BR>" + "There is an abundance of excellent reading material available on various aspects of heart risk.  The list below mentions some of these, but is not intended to be all inclusive.") 
document.write ("<BR>" + "<BR>" + "<u>The Stanford Life Plan For a Healthy Heart</u>, Helen Cassidy Page, John Speer Schroeder, M.D., Tara Coghlin Dickson, M.S., R.D., Chronicle Books.  An excellent, comprehensive, well-rounded book.  The dietary plan is easy to grasp, balanced and reasonable.")  
document.write ("<BR>" + "<BR>" + "<u>Good Fat, Bad Fat: Lower Your Cholesterol & Reduce Your Odds of a Heart Attack</u>, William P. Castelli, M.D. and Glen C. Griffin, M.D., Fisher Books.  When William Castelli speaks the heart industry listens!  Dr. Castelli is the long-time medical director of the famed Framingham Heart Study.  This book contains many nuggets of insight, and has a very easy-to-grasp method for keeping cholesterol levels low.")
document.write ("<BR>" + "<BR>" + "<u>Dr. Dean Ornish's Program for Reversing Heart Disease</u>, Dean Ornish, M.D., Random House.  Dr. Ornish's world-renowned heart program.  A well-written, balanced, effective and comprehensive book.")
document.write ("<BR>" + "<BR>" + "<u>The McDougall Program For a Healthy Heart</u>, John A. McDougall, M.D., Dutton.  Another excellent overall heart health book.  Very well laid out, easy to follow.  Comprehensive and authoritative.")
document.write ("<BR>" + "<BR>" + "<u>Eating Well for Optimum Health</u>, Andrew Weil,  Alfred A. Knopf, Inc.  Dr. Weil's series of books, including this, his newest, offer excellent, well-balanced, medical and nutritional information.  Dr. Weil avoids extremes, and in doing so presents his nutritional ideas with wisdom.")
document.write ("<BR>" + "<BR>" + "<u>Fitness For Dummies</u>,  Suzanne Schloshberg, Liz Neporet, IDG Books Worldwide.  Very well organized and written.  One of the best all-around books on exercise and fitness.  Contrary to title, definitely not written for (or by) dummies.")
document.write ("<BR>" + "<BR>" + "<u>Prevention Magazine.</u>  Prevention, a monthly periodical with wide distribution, does an excellent job educating the public concerning important health issues.  There is a heart-health related article in virtually every issue.  Prevention avoids fads and extremes, providing a wealth of the most current balanced research available.  Very readable.")
if (xscore >= 3)
document.write ("<BR>" + "<BR>" + "<u>Syndrome X</u>, Jack Challem, Burt Berkson, M.D., Ph.D., Melissa Diane Smith, John Wiley & Sons. This book nicely describes the occurrence where insulin resistance or carbohydrate processing disorders cause many serious heart-related health problems.  Among these are high cholesterol, low healthy HDL, high triglycerides, high blood pressure, rising fasting glucose levels and a tendency to put on body fat, especially in the upper body.  These can all occur even in the presence of a low fat, low cholesterol diet, and especially where many refined carbohydrates are consumed.  Doctors are paying increasing attention to this syndrome now in the early 21st century.  This book may be of specific value to you based upon your report.")
//      There are many excellent heart health books, such as those by authors Robert Kowalski, Harvey Simon, Julian Whitaker, Kenneth Cooper, Terry Shintani, and others.  You can find all of these publications in your local bookstore, library, or on the web. 
}

document.write ("<BR>" + "<BR>" + "<BR>" + "<i>This test, though medically accurate, is to be used as a preliminary health indicator.  If you have any questions about your heart health, please see a cardiologist, physician or your health care professional.  Good health to you.</i>")

document.write ("<BR>" + "<BR>" + "End of Report")

document.write ("<BR>" + "<BR>" + "Copyright Heart Risk Evaluations, " + year)

//august2001b
document.write ("<BR>" + "<i>www.heartriskevaluations.com</i>")


//August2001changes

if (physicianinfo == "")
document.write ("")
else
document.write ("<BR>" + "<BR>" + "For more information contact:  ".fontcolor("navy"))

if (physicianinfo == "")
document.write ("")
else if (physicianinfo == "gfpc24")
{
document.write ("<BR>" + "Cardiac Rehab".fontcolor("navy"))
document.write ("<BR>" + "Glens Falls Hospital".fontcolor("navy"))
document.write ("<BR>" + "888 888-8888".fontcolor("navy"))
}
else if (physicianinfo == "bnb22")
{
document.write ("<BR>" + "Bruce N. Brent, M.D.".fontcolor("navy"))
document.write ("<BR>" + "2100 Webster Street, Suite 516, San Francisco, CA 94117".fontcolor("navy"))
document.write ("<BR>" + "415 923-3006".fontcolor("navy"))
}


//august2001b
//document.write (triglycerideslifestyle2)
//document.write (exerciselifescore)
//document.write (weightscorelifestyle)
//document.write (waistscorelifestyle)
//document.write (lifestylescore)
//document.write (lifestyleandstatincategory)


//August2001
//document.write ("<BR>" + (scorestroke))

//add below to make last line print on Netscape
document.write ("<BR>" + "<BR>" + "")


//these print out  held score of each risk factor
//document.write ("<BR>" + "<BR>" +"<big>Scoring:".fontcolor("purple"))
//document.write ("<BR>" + "<BR>" + "Total Cholesterol: " + lipidscore)
//document.write ("<BR>" + "HDL: ")
//document.write ("<BR>" + "Triglycerides: " + triglyceridesscore2)
//document.write ("<BR>" + "Blood Pressure: " + bpscore)
//document.write ("<BR>" + "Fasting Blood Sugar: " + glucosescore2)
//document.write ("<BR>" + "Pounds Overweight: " + weightscore2)
//document.write ("<BR>" + "Waist Measurement: " + waistscore2)
//document.write ("<BR>" + "Exercise Level: " + exercisescore2)
//document.write ("<BR>" + "Stress Level: " + stressscore2)
//document.write ("<BR>" + "Number of Heart Attacks: " + heartattackscore)
//document.write ("<BR>" + "History Heart Disease, Bypass, Angioplasty: " + heartdiseasescore2)
//document.write ("<BR>" + "Angina: " + anginascore2)
//document.write ("<BR>" + "History Stroke: " + strokescore2)
//document.write ("<BR>" + "Family History--Parents: " + parentsscore2)
//document.write ("<BR>" + "Family History--grandparents: " + grandparentsscore2)
//document.write ("<BR>" + "Smoking: " + smokingscore2)
//document.write ("<BR>" + "Second Hand Smoke: " + secondhandsmokescore2)
//document.write ("<BR>" + "Postmenopausal: " + pmscore2)
//document.write ("<BR>" + "Age: " + agescore)
//document.write ("<BR>" + "Gender: " + genderscore)

}
//return false
//}
}

//}

