Make your own free website on Tripod.com
"); } else if (navigator.appName.indexOf ("Microsoft")>=0) { window.parent.frames[3].document.write(""); } } return true; } function calculate(menu) { var calTotal=0; var proTotal=0; var fatTotal=0; //var cholTotal=0; if (top.parent.preferences.document.topForm.sound.checked) { if (navigator.appName.indexOf("Netscape")>=0) { window.parent.frames[3].document.write(""); } else if (navigator.appName.indexOf ("Microsoft")>=0) { window.parent.frames[3].document.write(""); } } // Total the appetizer part of breakfast if (document.menu.b11.checked==true) {calTotal += 56; proTotal += 0; fatTotal += 0;}// fresh fruit cup if (document.menu.b12.checked==true) {calTotal += 81; proTotal += 1; fatTotal += 1;}// stewed prunes if (document.menu.b13.checked==true) {calTotal += 40; proTotal += 1; fatTotal += 0;}// mandarin oranges // Total and validate the entree part of breakfast var qty=document.menu.QtyB21.options[document.menu.QtyB21.selectedIndex].value; if (document.menu.b21.checked==true) {calTotal += 247; proTotal += 14; fatTotal += 7.3;}// lowfat scrambled eggs w/hash brown potatoes if (document.menu.b21.checked==false && (document.menu.b21a.checked==true || document.menu.b21b.checked==true || document.menu.b21c.checked==true || qty>0)) { window.alert("Please make sure the Breakfast 'Entree' box is checked if any of the sub-entree boxes are checked.\n\nOtherwise please uncheck all sub-entree boxes."); document.menu.b21.focus(); return false;} {calTotal += (qty * 37); fatTotal += (qty * 4.1); document.menu.QtyB21.blur()}// extra margarine if (document.menu.b21.checked==true && document.menu.b21a.checked==true) {calTotal -= 74; proTotal -= 2.5; fatTotal -= 1.1; document.menu.b21b.checked=true; // w/o toast document.menu.b21c.checked=true;} if (document.menu.b21.checked==true && document.menu.b21b.checked==true) {calTotal -= 37; proTotal -= 0; fatTotal -= 4.1;}// w/o margarine if (document.menu.b21.checked==true && document.menu.b21c.checked==true) {calTotal -= 17; proTotal -= 0; fatTotal -= 0;}// w/o low calorie jelly if (document.menu.b21.checked==true && (document.menu.b21b.checked==true && qty > 0)) { window.alert("The 'w/o margarine' box may not be checked if the 'extra margarine' quantity is one or greater.\n\nPlease use only one of the above selections."); document.menu.b21b.focus(); document.menu.QtyB21.selectedIndex="0"; document.menu.b21b.checked=false; if (document.menu.b21a.checked==true) document.menu.b21c.checked=false; return false; } // Total and validate the cereal part of breakfast var qty=document.menu.QtyB31.options[document.menu.QtyB31.selectedIndex].value; if (document.menu.b31.checked==true) {calTotal += 292; proTotal += 18.8; fatTotal += 11.1;}// cereal appetizer if (document.menu.b31.checked==false && (document.menu.b31a.checked==true || document.menu.b31b.checked==true || document.menu.b31c.checked==true || qty > 0)) { window.alert("Please make sure the Cereal 'Appetizer' box is checked if any of the sub-appetizer boxes are checked.\n\nOtherwise please uncheck all sub-appetizer boxes."); document.menu.b31.focus(); document.menu.QtyB31.selectedIndex=0; return false;} {calTotal += (qty * 37); fatTotal += (qty * 4.1); document.menu.QtyB31.blur()}// extra margarine if (document.menu.b31.checked==true && document.menu.b31a.checked==true) {calTotal -= 102; proTotal -= 15.6; fatTotal -= 2.2;}// w/o lowfat cottage cheese if (document.menu.b31.checked==true && document.menu.b31b.checked==true) {calTotal -= 153; proTotal -= 3.2; fatTotal -= 4.8; document.menu.b31c.checked=true;}// w/o muffin if (document.menu.b31.checked==true && document.menu.b31c.checked==true) {calTotal -= 37; proTotal -= 0; fatTotal -= 4.1;}// w/o margarine if (document.menu.b31.checked==true && (document.menu.b31c.checked==true && qty > 0)) { window.alert("The 'w/o margarine' box may not be checked if the 'extra margarine' quantity is one or greater.\n\nPlease use only one of the above selections."); document.menu.b31c.focus(); document.menu.QtyB31.selectedIndex="0"; document.menu.b31c.checked=false; return false; } if (document.menu.b32.checked==true) {calTotal += 60; proTotal += 2; fatTotal += 1;}// Cheerios if (document.menu.b33.checked==true) {calTotal += 120; proTotal += 6; fatTotal += 2;}// All Bran if (document.menu.b34.checked==true) {calTotal += 100; proTotal += 3; fatTotal += 0;}// Cream of Wheat if (document.menu.b35.checked==true) {calTotal += 71; proTotal += 4; fatTotal += .5;}// Bran Flakes if (document.menu.b36.checked==true) {calTotal += 82; proTotal += 2; fatTotal += 0;}// Cornflakes if (document.menu.b37.checked==true) {calTotal += 142; proTotal += 6.5; fatTotal += 3;}// Oatmeal // Total the beverage part of breakfast if (document.menu.b41a.checked==true) {calTotal += 70; proTotal += 5; fatTotal += 2.5;}// 4oz reduced fat milk if (document.menu.b41b.checked==true) {calTotal += 140; proTotal += 10; fatTotal += 5;}// 8oz reduced fat milk if (document.menu.b42a.checked==true) {calTotal += 50; proTotal += 5; fatTotal += 0;}// 4oz nonfat milk if (document.menu.b42b.checked==true) {calTotal += 100; proTotal += 10; fatTotal += 0;}// 8oz nonfat milk // Total and validate the appetizer part of lunch if (document.menu.L11.checked==true) {calTotal += 127; proTotal += 5.1; fatTotal += 2.7;}// lunch appetizer if (document.menu.L11.checked==false && (document.menu.L11a.checked==true || document.menu.L11b.checked==true || document.menu.L11c.checked==true)) { window.alert("Please make sure the Lunch 'Appetizer' box is checked if any of the sub-appetizer boxes are checked.\n\nOtherwise please uncheck all sub-appetizer boxes."); document.menu.L11.focus(); return false;} if (document.menu.L11.checked==true && document.menu.L11a.checked==true) {calTotal -= 45; proTotal -= 1.9; fatTotal -= 0;}// w/o vegetable soup if (document.menu.L11.checked==true && document.menu.L11b.checked==true) {calTotal -= 62; proTotal -= 1.3; fatTotal -= 1.7;}// w/o salt-free crackers if (document.menu.L11.checked==true && document.menu.L11c.checked==true) {calTotal -= 21; proTotal -= 1.9; fatTotal -= 1;}// w/o low calorie raspberry gelatin with cream rosette // Total the entree part of lunch if (document.menu.L21.checked==true) {calTotal += 423; proTotal += 30.2; fatTotal += 12.8;}// turkey sandwich if (document.menu.L22.checked==true) {calTotal += 188; proTotal += 14; fatTotal += 7.7;}// tuna pasta salad if (document.menu.L23.checked==true) {calTotal += 348; proTotal += 12.9; fatTotal += 7.8;}// spaghetti & meat sauce // Total the beverage part of lunch if (document.menu.L31a.checked==true) {calTotal += 70; proTotal += 5; fatTotal += 2.5;}// 4oz reduced fat milk if (document.menu.L31b.checked==true) {calTotal += 140; proTotal += 10; fatTotal += 5;}// 8oz reduced fat milk if (document.menu.L32a.checked==true) {calTotal += 50; proTotal += 5; fatTotal += 0;}// 4oz nonfat milk if (document.menu.L32b.checked==true) {calTotal += 100; proTotal += 10; fatTotal += 0;}// 8oz nonfat milk // Total and validate the Snacks var qty=document.menu.QtyS11.options[document.menu.QtyS11.selectedIndex].value; calTotal += (qty*100); proTotal += (qty*10); fatTotal += (qty*0); document.menu.QtyS11.blur();// nonfat milk var qty=document.menu.QtyS12.options[document.menu.QtyS12.selectedIndex].value; calTotal += (qty*140); proTotal += (qty*10); fatTotal += (qty*5); document.menu.QtyS12.blur();// reduced fat milk var qty=document.menu.QtyS13.options[document.menu.QtyS13.selectedIndex].value; calTotal += (qty*56); proTotal += (qty*0); fatTotal += (qty*0); document.menu.QtyS13.blur();// fruit cup var qty=document.menu.QtyS14.options[document.menu.QtyS14.selectedIndex].value; calTotal += (qty*52); proTotal += (qty*0); fatTotal += (qty*0); document.menu.QtyS14.blur();// fresh fruit var qty=document.menu.QtyS15.options[document.menu.QtyS15.selectedIndex].value; calTotal += (qty*85); proTotal += (qty*3.5); fatTotal += (qty*2); document.menu.QtyS15.blur();// low calorie pudding var qty=document.menu.QtyS16.options[document.menu.QtyS16.selectedIndex].value; calTotal += (qty*28); proTotal += (qty*.5); fatTotal += (qty*1); document.menu.QtyS16.blur();// regular crackers var qty=document.menu.QtyS16a.options[document.menu.QtyS16a.selectedIndex].value; calTotal += (qty*21); proTotal += (qty*.5); fatTotal += (qty*0); document.menu.QtyS16a.blur();// salt free crackers var qty=document.menu.QtyS17.options[document.menu.QtyS17.selectedIndex].value; calTotal += (qty*54); proTotal += (qty*1); fatTotal += (qty*1); document.menu.QtyS17.blur();// graham crackers var qty=document.menu.QtyS18.options[document.menu.QtyS18.selectedIndex].value; if ((document.menu.s18a.checked==true && document.menu.s18b.checked==true) || (document.menu.s18a.checked==true && document.menu.s18c.checked==true) || (document.menu.s18b.checked==true && document.menu.s18c.checked==true)) { window.alert("Only check one of the Snack 'sandwiches' before calculating total."); document.location="#snack"; document.menu.s18a.focus(); return false; } /*if (qty>0 && (document.menu.s18a.checked==false && document.menu.s18b.checked==false && document.menu.s18c.checked==false)){ window.alert("Please check one of the Snack 'Sandwich' boxes if quantity is .5 or more.\n\nOtherwise change the quantity to zero."); document.location="#snack"; document.menu.s18a.focus(); return false;}*/ if (document.menu.s18a.checked==false && document.menu.s18b.checked==false && document.menu.s18c.checked==false) {document.menu.QtyS18.selectedIndex="0";} if (document.menu.s18a.checked==true) { if (qty==0) { window.alert("Please enter a quantity for the Snack 'Turkey Sandwich'.\n\nOtherwise uncheck the 'Turkey Sandwich' box."); document.location="#snack"; document.menu.QtyS18.focus(); return false} else {calTotal += (qty*301); proTotal += (qty*24); fatTotal += (qty*11);} } if (document.menu.s18b.checked==true) { if (qty==0) { window.alert("Please enter a quantity for the Snack 'Tuna Sandwich'.\n\nOtherwise uncheck the 'Tuna Sandwich' box."); document.location="#snack"; document.menu.QtyS18.focus(); return false} else {calTotal += (qty*301); proTotal += (qty*28); fatTotal += (qty*3);} } if (document.menu.s18c.checked==true) { if (qty==0) { window.alert("Please enter a quantity for the Snack 'Roast Beef Sandwich'.\n\nOtherwise uncheck the 'Roast Beef Sandwich' box."); document.location="#snack"; document.menu.QtyS18.focus(); return false} else {calTotal += (qty*326); proTotal += (qty*23); fatTotal += (qty*13);} } var qty=document.menu.QtyS19.options[document.menu.QtyS19.selectedIndex].value; calTotal += (qty*10); proTotal += (qty*2); fatTotal += (qty*0); document.menu.QtyS19.blur();// low calorie gelatin // Total the appetizer part of dinner var qty=document.menu.QtyD11.options[document.menu.QtyD11.selectedIndex].value; if (document.menu.d11.checked==true) {calTotal += 146; proTotal += 3.9; fatTotal += 5.9;}// dinner appetizer if (document.menu.d11.checked==false && (document.menu.d12.checked==true || document.menu.d12a.checked==true ||document.menu.d13.checked==true || document.menu.d13a.checked==true || qty > 0)) { window.alert("Please make sure the Dinner 'Appetizer' box is checked if any of the sub-appetizer boxes are checked.\n\nOtherwise please uncheck all sub-appetizer boxes."); document.location="#dinner"; document.menu.d11.focus(); return false;} {calTotal += (qty * 37); fatTotal += (qty * 4.1); document.menu.QtyD11.blur();}// extra margarine if (document.menu.d11.checked==true && document.menu.d12.checked==true) {calTotal -= 11; proTotal -= 1; fatTotal -= .1; document.menu.d12a.checked=true;}// w/o green salad if (document.menu.d11.checked==true && document.menu.d12a.checked==true) {calTotal -= 8; proTotal -= 0; fatTotal -= .7;}// w/o low calorie dressing if (document.menu.d11.checked==true && document.menu.d13.checked==true) {calTotal -= 90; proTotal -= 2.9; fatTotal -= 1; document.menu.d13a.checked=true;}// w/o dinner roll if (document.menu.d11.checked==true && document.menu.d13a.checked==true) {calTotal -= 37; proTotal -= 0; fatTotal -= 4.1;}// w/o margarine if (document.menu.d11.checked==true && (document.menu.d13a.checked==true && qty > 0)) { window.alert("The 'w/o margarine' box may not be checked if the 'extra margarine' quantity is one or greater.\n\nPlease use only one of the above selections."); document.location="#dinner"; document.menu.d13a.focus(); document.menu.QtyD11.selectedIndex="0"; document.menu.d13a.checked=false; return false; } // Total the entree part of dinner if (document.menu.d21.checked==true) {calTotal += 350; proTotal += 24.5; fatTotal += 17.3;}// pot roast if (document.menu.d22.checked==true) {calTotal += 463; proTotal += 26.8; fatTotal += 11.1;}// penne pasta alfredo // Total the dessert part of dinner if (document.menu.d31.checked==true) {calTotal += 57; proTotal +=.9; fatTotal += .4;}// fresh fruit if (document.menu.d32.checked==true) {calTotal += 50; proTotal += 5; fatTotal += 0;}// nonfat sugar free yogurt // Total the beverage part of dinner if (document.menu.d41a.checked==true) {calTotal += 70; proTotal += 5; fatTotal += 2.5;}// 4oz reduced fat milk if (document.menu.d41b.checked==true) {calTotal += 140; proTotal += 10; fatTotal += 5;}// 8oz reduced fat milk if (document.menu.d42a.checked==true) {calTotal += 50; proTotal += 5; fatTotal += 0;}// 4oz nonfat milk if (document.menu.d42b.checked==true) {calTotal += 100; proTotal += 10; fatTotal += 0;}// 8oz nonfat milk calTotal=Math.round(calTotal);//*10)/10; proTotal=Math.round(proTotal*10)/10; fatTotal=Math.round(fatTotal*10)/10; //cholTotal=Math.round(cholTotal*10)/10; var checkedCalories2= top.parent.preferences.document.topForm.calories.checked; var checkedProtein2= top.parent.preferences.document.topForm.protein.checked; var checkedFat2= top.parent.preferences.document.topForm.fat.checked; //var checkedCholesterol2= top.parent.preferences.document.topForm.cholesterol.checked; if (checkedCalories2) {top.parent.results.document.middleForm.TotalCalories.value = calTotal;} if (checkedProtein2) {top.parent.results.document.middleForm.TotalProtein.value = proTotal;} if (checkedFat2) {top.parent.results.document.middleForm.TotalFat.value = fatTotal;} //if (checkedCholesterol2) {top.parent.results.document.middleForm.TotalCholesterol.value = cholTotal;} return true; }

Cycle 1

Breakfast

Appetizer

Fresh Fruit Cup

Stewed Prunes

Mandarin Oranges

Entree
Lowfat Scrambled Eggs
     (w/hash brown potatoes)
Qtyextra margarine
w/o toast
       w/o margarine
       w/o jelly
Cereals
Cereal Appetizer
Qtyextra margarine
w/o cottage cheese
w/o muffin
       w/o margarine
   Cheerios
   All Bran
   Cream of Wheat
   Bran Flakes
   Cornflakes
   Oatmeal
Beverages

Reduced Fat Milk
4oz size
8oz size
NonFat Milk
4oz size
8oz size

Go To:  Breakfast   Lunch/Snack   Dinner  

Lunch                                                   Snack


Appetizer

Lunch Appetizer
w/o vegetable soup
w/o salt-free crackers
w/o raspberry jello/cream
Entree

Turkey Sandwich

Tuna Pasta Salad

Spaghetti & Meat Sauce

Beverages
Reduced Fat Milk
4oz size
8oz size
NonFat Milk
4oz size
8oz size
Snack

QtyNonfat Milk
QtyReduced Fat Milk
QtyFruit Cup
QtyFresh Fruit
QtyLow Calorie Pudding
QtyCrackers
QtyCrackers(salt-free)
QtyGraham Crackers
Qty Sandwich
                 Turkey
                 Tuna
                 Roast Beef
QtyLow Calorie Gelatin

Go To:  Breakfast   Lunch/Snack   Dinner  

Dinner


Appetizer

Appetizer
Qtyextra margarine
w/o green salad
       w/o dressing
w/o dinner roll
       w/o margarine
Entree

Pot Roast

Penne Pasta Alfredo

Dessert

Fresh Fruit

Nonfat Sugar Free Yogurt

Beverages
Reduced Fat Milk
4oz size
8oz size
NonFat Milk
4oz size
8oz size

Go To:  Breakfast   Lunch/Snack   Dinner  

Top of Menu

© Copyright 2000 Mark Aldridge
All Rights Reserved
This program is licensed, not sold