//start text area character counter
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}


function checkrequiredMailingList(which) {
var pass=true;
fieldlist = "";
  var bgBad = "#ffcc00";
  var bgGood = "white";
  var err = "1";
  
	eNewsletter = which.eNewsletter.checked;
	events = which.events.checked;
	newCDs = which.newCDs.checked;
	specialBuys = which.specialBuys.checked;
	postcards = which.postcards.checked;

	if (document.images) {
	for (i=0;i<which.length;i++) {
		var tempobj=which.elements[i];
		if (tempobj.name=="firstName" && tempobj.value=='') {
			fieldlist = "First name is required";
			pass=false;
			break;
		}

		if (tempobj.name=="lastName" && tempobj.value=='') {
			fieldlist = "Last Name is required";
			pass=false;
			break;
		}

		if (tempobj.name=="emailAddress" && tempobj.value=='') {
			fieldlist = "Email Address is required";
			pass=false;
			break;
		}
		if (eNewsletter == false && events == false && newCDs == false && specialBuys == false && postcards == false) {
			fieldlist = "You must check at least one item";
			pass=false;
			err = "0";
			break;
		}
	}
}
if (!pass) {
	setColor(tempobj, bgBad);
	alert(fieldlist);
	if (err == "1") {
		tempobj.focus();
		tempobj.blur();
	}
	return false;
}
else
return true;
}

function gtpage(url,frname,height,width) {

        var p1 = 'toolbar=no,'
        var p2 = 'location=no,'
        var p3 = 'directories=no,'
        var p4 = 'status=no,'
        var p5 = 'menubar=no,'
        var p6 = 'resizable=no,'
        var p7 = 'scrollbars=no,'
        var p8=  'copyhistory=no,'
        var p9 = 'width='+width+',';
        var p10 = 'height='+height
        var props = p1+p2+p3+p4+p5+p6+p7+p8+p9+p10;

        themainwindow = window.open(url,frname,props);
        themainwindow.focus();

     }

function gtpage2(url,frname,height,width) {

        var p1 = 'toolbar=no,'
        var p2 = 'location=no,'
        var p3 = 'directories=no,'
        var p4 = 'status=no,'
        var p5 = 'menubar=no,'
        var p6 = 'resizable=yes,'
        var p7 = 'scrollbars=yes,'
        var p8=  'copyhistory=no,'
        var p9 = 'width='+width+',';
        var p10 = 'height='+height
        var props = p1+p2+p3+p4+p5+p6+p7+p8+p9+p10;

        themainwindow = window.open(url,frname,props);
        themainwindow.focus();

     }

function openpage(url,frname,height,width,top,left,scrollbars,resizable) {

        var p1 = 'toolbar=no,'
        var p2 = 'location=no,'
        var p3 = 'directories=no,'
        var p4 = 'status=no,'
        var p5 = 'menubar=no,'
        var p6 = 'resizable='+resizable+','
        var p7 = 'scrollbars='+scrollbars+','
        var p8=  'copyhistory=no,'
        var p9 = 'width='+width+','
        var p10 = 'height='+height+','
        var p11 = 'top='+top+','
        var p12 = 'left='+left+';'
        var props = p1+p2+p3+p4+p5+p6+p7+p8+p9+p10+p11+p12;

        themainwindow = window.open(url,frname,props);
        themainwindow.focus();

     }

function setColor(el, bg) {
  if (el.style) el.style.backgroundColor = bg;
}

function validate(field) {
var valid = "0123456789"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("Invalid entry!  Only numbers are accepted!");
field.focus();
field.select();
   }
}


function validateLocation(theForm)
{
//alert ("Hello");
//alert (theForm.ZipCode.value);
//alert ("Hi");
 
  if (theForm.ZipCode.value == "" || theForm.ZipCode.value == "enter your zip")
  {
    alert("You must enter a Zip Code.");
    theForm.ZipCode.focus();
    return (false);
  }
return (true);
}






function clearSearch(theText) {
     if (document.searchForm.searchfield.value == "search or keyword")
     {
	     document.searchForm.searchfield.value = "";
     }
}

function setSearch(theText) {
     if (document.searchForm.searchfield.value == "")
     {
	     document.searchForm.searchfield.value = "search or keyword";
     }
}


function clearZip(theText) {
     if (document.locationForm.ZipCode.value == "enter your zip")
     {
	     document.locationForm.ZipCode.value = "";
     }
}

function setZip(theText) {
     if (document.locationForm.ZipCode.value == "")
     {
	     document.locationForm.ZipCode.value = "enter your zip";
     }
}


function clearText(theText) {
     if (document.ContactUs.ContactUsText.value == "Type your message here...")
     {
	     document.ContactUs.ContactUsText.value = "";
     }
}

function setText(theText) {
     if (document.ContactUs.ContactUsText.value == "")
     {
	     document.ContactUs.ContactUsText.value = "Type your message here...";
     }
}


//ContactUsText



function check_date(field){
var checkstr = "0123456789";
var DateField = field;
var Datevalue = "";
var DateTemp = "";
var seperator = ".";
var day;
var month;
var year;
var leap = 0;
var err = 0;
var i;
   err = 0;
   DateValue = DateField.value;
   /* Delete all chars except 0..9 */
   for (i = 0; i < DateValue.length; i++) {
	  if (checkstr.indexOf(DateValue.substr(i,1)) >= 0) {
	     DateTemp = DateTemp + DateValue.substr(i,1);
	  }
   }
   DateValue = DateTemp;
   /* Always change date to 8 digits - string*/
   /* if year is entered as 2-digit / always assume 20xx */
   if (DateValue.length == 6) {
      DateValue = DateValue.substr(0,4) + '20' + DateValue.substr(4,2); }
   if (DateValue.length != 8) {
      err = 19;}
   /* year is wrong if year = 0000 */
   year = DateValue.substr(4,4);
   if (year == 0) {
      err = 20;
   }
   /* Validation of month*/
   month = DateValue.substr(2,2);
   if ((month < 1) || (month > 12)) {
      err = 21;
   }
   /* Validation of day*/
   day = DateValue.substr(0,2);
   if (day < 1) {
     err = 22;
   }
   /* Validation leap-year / february / day */
   if ((year % 4 == 0) || (year % 100 == 0) || (year % 400 == 0)) {
      leap = 1;
   }
   if ((month == 2) && (leap == 1) && (day > 29)) {
      err = 23;
   }
   if ((month == 2) && (leap != 1) && (day > 28)) {
      err = 24;
   }
   /* Validation of other months */
   if ((day > 31) && ((month == "01") || (month == "03") || (month == "05") || (month == "07") || (month == "08") || (month == "10") || (month == "12"))) {
      err = 25;
   }
   if ((day > 30) && ((month == "04") || (month == "06") || (month == "09") || (month == "11"))) {
      err = 26;
   }
   /* if 00 ist entered, no error, deleting the entry */
   if ((day == 0) && (month == 0) && (year == 00)) {
      err = 0; day = ""; month = ""; year = ""; seperator = "";
   }
   /* if no error, write the completed date to Input-Field (e.g. 13.12.2001) */
   if (err == 0) {
      DateField.value = day + seperator + month + seperator + year;
   }
   /* Error-message if err != 0 */
   else {
      alert("Date is incorrect!\n\nMust use format: mm/dd/yyyy");
      DateField.select();
	  DateField.focus();
   }
}



function showShop(what,obj) {
// id="LocationHide" assigned to the table row with the "Shop:" text
	var hide=document.getElementById('LocationHide');
//	alert (hide);
	if (document.ContactUs.DepartmentID.value == "99") {
		hide.style.visibility = "visible";
	}
	else
	{
		hide.style.visibility = "hidden";
	}
//	alert (hide.style.visibility);
}




function FormValidator(theForm)
{
    if (theForm.LocationForLunch.value == "0")
    {
      alert ("You must select a Location.");
      theForm.LocationForLunch.focus();
      return (false);
    }
    if (theForm.LocationForDinner.value == "0")
    {
      alert ("You must select a Location.");
      theForm.LocationForDinner.focus();
      return (false);
    }
    if (theForm.LocationAtWork.value == "0")
    {
      alert ("You must select a Location.");
      theForm.LocationAtWork.focus();
      return (false);
    }
    if (theForm.LocationAtHome.value == "0")
    {
      alert ("You must select a Location.");
      theForm.LocationAtHome.focus();
      return (false);
    }
 
	if (theForm.MonthCount.value == "")
	{
		alert("You must enter the number of times you use DAVANNI'S.");
		theForm.MonthCount.focus();
		return (false);
	}
 
	var EI = 0.0;
	var TO = 0.0;
	var DL = 0.0;
	var TotalPercent = 0.0;
	EI = parseInt(theForm.EatInPercent.value);
	TO = parseInt(theForm.TakeOutPercent.value);
	DL = parseInt(theForm.DeliveryPercent.value);
	TotalPercent = EI + TO + DL;	
//	alert ("Total Percentage: " + TotalPercent);
	
	if (TotalPercent != 100)
	{
		alert("Your selections must total 100%.  Your total is " + TotalPercent + " percent.");
		theForm.EatInPercent.focus();
		return (false);
	}
 
	if (!(theForm.HowLong[0].checked == true || theForm.HowLong[1].checked == true || theForm.HowLong[2].checked == true || theForm.HowLong[3].checked == true))
	{
		alert("You must specify how long you have been using DAVANNI'S.");
		theForm.HowLong[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Pizzas[0].checked == true || theForm.UsageCount_Pizzas[1].checked == true || theForm.UsageCount_Pizzas[2].checked == true || theForm.UsageCount_Pizzas[3].checked == true))
	{
		alert("You must select the frequency of ordering Pizza.");
		theForm.UsageCount_Pizzas[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Hoagies[0].checked == true || theForm.UsageCount_Hoagies[1].checked == true || theForm.UsageCount_Hoagies[2].checked == true || theForm.UsageCount_Hoagies[3].checked == true))
	{
		alert("You must select the frequency of ordering Hot Hoagies.");
		theForm.UsageCount_Hoagies[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Calzones[0].checked == true || theForm.UsageCount_Calzones[1].checked == true || theForm.UsageCount_Calzones[2].checked == true || theForm.UsageCount_Calzones[3].checked == true))
	{
		alert("You must select the frequency of ordering Calzones.");
		theForm.UsageCount_Calzones[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Pasta[0].checked == true || theForm.UsageCount_Pasta[1].checked == true || theForm.UsageCount_Pasta[2].checked == true || theForm.UsageCount_Pasta[3].checked == true))
	{
		alert("You must select the frequency of ordering Lasagna.");
		theForm.UsageCount_Pasta[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Salads[0].checked == true || theForm.UsageCount_Salads[1].checked == true || theForm.UsageCount_Salads[2].checked == true || theForm.UsageCount_Salads[3].checked == true))
	{
		alert("You must select the frequency of ordering Salads.");
		theForm.UsageCount_Salads[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Sides[0].checked == true || theForm.UsageCount_Sides[1].checked == true || theForm.UsageCount_Sides[2].checked == true || theForm.UsageCount_Sides[3].checked == true))
	{
		alert("You must select the frequency of ordering Breadsticks or Cheesebread.");
		theForm.UsageCount_Sides[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Desserts[0].checked == true || theForm.UsageCount_Desserts[1].checked == true || theForm.UsageCount_Desserts[2].checked == true || theForm.UsageCount_Desserts[3].checked == true))
	{
		alert("You must select the frequency of ordering Desserts.");
		theForm.UsageCount_Desserts[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_KidsMeals[0].checked == true || theForm.UsageCount_KidsMeals[1].checked == true || theForm.UsageCount_KidsMeals[2].checked == true || theForm.UsageCount_KidsMeals[3].checked == true))
	{
		alert("You must select the frequency of ordering Desserts.");
		theForm.UsageCount_KidsMeals[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Combos[0].checked == true || theForm.UsageCount_Combos[1].checked == true || theForm.UsageCount_Combos[2].checked == true || theForm.UsageCount_Combos[3].checked == true))
	{
		alert("You must select the frequency of ordering Desserts.");
		theForm.UsageCount_Combos[0].focus();
		return (false);
	}
 
	if (!(theForm.UsageCount_Drinks[0].checked == true || theForm.UsageCount_Drinks[1].checked == true || theForm.UsageCount_Drinks[2].checked == true || theForm.UsageCount_Drinks[3].checked == true))
	{
		alert("You must select the frequency of ordering Drinks.");
		theForm.UsageCount_Drinks[0].focus();
		return (false);
	}
 
	if (theForm.AnyRestaurantFrequency.value == "")
	{
		alert("You must enter the number of times you used other restaurants in the last 14 days.");
		theForm.AnyRestaurantFrequency.focus();
		return (false);
	}
 
	if (theForm.DavannisFrequency.value == "")
	{
		alert("You must enter the number of times you used DAVANNI'S in the last 14 days.");
		theForm.DavannisFrequency.focus();
		return (false);
	}
 
	if (theForm.Education.value == "0")
	{
		alert("You must select an education response.");
		theForm.Education.focus();
		return (false);
	}
 
	if (theForm.AgeRange.value == "0")
	{
		alert("You must select an age range response.");
		theForm.AgeRange.focus();
		return (false);
	}
 
	if (theForm.Children.value == "")
	{
		alert("You must specify the number of children at home.");
		theForm.Children.focus();
		return (false);
	}
 
	if (theForm.IncomeRange.value == "0")
	{
		alert("You must select an income range response.");
		theForm.IncomeRange.focus();
		return (false);
	}
 
	if (!(theForm.Gender[0].checked == true || theForm.Gender[1].checked == true || theForm.Gender[2].checked == true))
	{
		alert("You must specify your gender.");
		theForm.Gender[0].focus();
		return (false);
	}
 
	if (!(theForm.OnlineSurvey[0].checked == true || theForm.OnlineSurvey[1].checked == true))
	{
		alert("You must specify whether you would like to participate in an online survey.");
		theForm.OnlineSurvey[0].focus();
		return (false);
	}
 
	if (!(theForm.TelephoneSurvey[0].checked == true || theForm.TelephoneSurvey[1].checked == true))
	{
		alert("You must specify whether you would like to participate in a telephone survey.");
		theForm.TelephoneSurvey[0].focus();
		return (false);
	}
 
	if (theForm.TelephoneSurvey[0].checked == true && (theForm.TelephoneNumber.value == "" || theForm.BestTime.value == ""))
	{
		alert("You must specify your Telephone Number and Best Time to Call in order to participate in a telephone survey.");
		theForm.TelephoneNumber.focus();
		return (false);
	}
 
	if (!(theForm.FocusGroup[0].checked == true || theForm.FocusGroup[1].checked == true))
	{
		alert("You must specify whether you would like to participate in an In-Store Focus Group.");
		theForm.FocusGroup[0].focus();
		return (false);
	}
 
	if (!(theForm.TasteTesting[0].checked == true || theForm.TasteTesting[1].checked == true))
	{
		alert("You must specify whether you would like to participate in In-Store Taste Testing.");
		theForm.TasteTesting[0].focus();
		return (false);
	}
 
  return (true);
}
 


function validate(field) {
	var valid = "0123456789."
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) {
	temp = "" + field.value.substring(i, i+1);
	if (valid.indexOf(temp) == "-1") ok = "no";
	}
	if (ok == "no") {
	alert("Invalid entry!  Only numbers and a decimal are accepted!");
	field.focus();
	field.select();
	   }
	}






function updateNutrition(IngrCount) {

	// Set the form background color to gray
	t = DisplayFormValues("#dddddd");

	t = InitializeTimer();

	var vCalories, vFatCalories, vFat, vSaturatedFat, vTransFat, vCholesterol, vSodium, vCarbohydrates, vFiber, vSugars, vProtein, vFactor, vVitaminA, vVitaminC, vCalcium, vIron, vDairy, vEggs, vFish, vPeanuts, vShellFish, vSoy, vTreeNuts, vWheat, vGluten, IsPizza, IsSolo, checked_image, unchecked_image;

	vCalories = 0;
	vFatCalories = 0;
	vFat = 0;
	vSaturatedFat = 0;
	vTransFat = 0;
	vCholesterol = 0;
	vSodium = 0;
	vCarbohydrates = 0;
	vFiber = 0;
	vSugars = 0;
	vProtein = 0;
	vVitaminA = 0;
	vVitaminC = 0;
	vCalcium = 0;
	vIron = 0;
	vDairy = 0;
	vEggs = 0;
	vFish = 0;
	vPeanuts = 0;
	vShellFish = 0;
	vSoy = 0;
	vTreeNuts = 0;
	vWheat = 0;
	vGluten = 0;
	vFactor = 1;
	IsPizza = false;
	IsSolo = false;


	if (document.ingredientsForm.menuCategoryID.value == "2") {
//		alert ("Pizza Size: " + document.ingredientsForm.itemsize[0].checked + "|" + document.ingredientsForm.itemsize[1].checked);
		IsPizza = true;
		if (document.ingredientsForm.itemsize[1].checked) {
			IsSolo = true;
		}
		if (document.ingredientsForm.itemsize[0].checked) {
			document.nutritionTable.servingSize.value = "Slice";
		}
		else
		{
			document.nutritionTable.servingSize.value = "Solo";
		}
	}

//alert ("Is Pizza: " + IsPizza + "| Is Solo: " + IsSolo);
	
	// Go through each option to determine if the item is on or off
	if (IngrCount >= 1) {
		if (document.ingredientsForm.Ingr1.type > "") {
			if (document.ingredientsForm.Ingr1.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories1.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories1.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat1.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat1.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat1.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol1.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium1.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates1.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber1.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar1.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein1.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA1.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC1.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium1.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron1.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo1.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo1.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo1.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo1.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo1.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo1.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo1.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo1.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo1.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo1.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo1.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo1.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo1.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo1.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo1.value * 1;
				}
				if (document.ingredientsForm.Dairy1.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs1.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish1.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts1.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish1.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy1.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts1.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat1.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten1.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr1.length; i++) { 
				if (document.ingredientsForm.Ingr1[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories1[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories1[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat1[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat1[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat1[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol1[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium1[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates1[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber1[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar1[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein1[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA1[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC1[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium1[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron1[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo1[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo1[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo1[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo1[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo1[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo1[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo1[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo1[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo1[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo1[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo1[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo1[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo1[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo1[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo1[i].value * 1;
					}
					if (document.ingredientsForm.Dairy1[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs1[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish1[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts1[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish1[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy1[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts1[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat1[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten1[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}





	if (IngrCount >= 2) {
		if (document.ingredientsForm.Ingr2.type > "") {
			if (document.ingredientsForm.Ingr2.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories2.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories2.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat2.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat2.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat2.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol2.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium2.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates2.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber2.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar2.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein2.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA2.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC2.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium2.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron2.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo2.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo2.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo2.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo2.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo2.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo2.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo2.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo2.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo2.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo2.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo2.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo2.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo2.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo2.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo2.value * 1;
				}
				if (document.ingredientsForm.Dairy2.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs2.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish2.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts2.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish2.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy2.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts2.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat2.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten2.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr2.length; i++) { 
				if (document.ingredientsForm.Ingr2[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories2[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories2[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat2[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat2[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat2[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol2[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium2[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates2[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber2[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar2[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein2[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA2[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC2[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium2[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron2[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo2[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo2[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo2[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo2[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo2[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo2[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo2[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo2[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo2[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo2[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo2[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo2[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo2[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo2[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo2[i].value * 1;
					}
					if (document.ingredientsForm.Dairy2[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs2[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish2[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts2[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish2[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy2[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts2[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat2[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten2[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}







	if (IngrCount >= 3) {
		if (document.ingredientsForm.Ingr3.type > "") {
			if (document.ingredientsForm.Ingr3.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories3.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories3.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat3.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat3.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat3.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol3.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium3.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates3.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber3.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar3.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein3.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA3.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC3.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium3.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron3.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo3.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo3.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo3.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo3.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo3.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo3.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo3.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo3.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo3.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo3.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo3.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo3.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo3.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo3.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo3.value * 1;
				}
				if (document.ingredientsForm.Dairy3.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs3.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish3.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts3.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish3.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy3.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts3.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat3.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten3.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr3.length; i++) { 
				if (document.ingredientsForm.Ingr3[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories3[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories3[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat3[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat3[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat3[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol3[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium3[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates3[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber3[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar3[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein3[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA3[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC3[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium3[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron3[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo3[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo3[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo3[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo3[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo3[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo3[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo3[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo3[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo3[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo3[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo3[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo3[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo3[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo3[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo3[i].value * 1;
					}
					if (document.ingredientsForm.Dairy3[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs3[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish3[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts3[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish3[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy3[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts3[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat3[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten3[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}








	if (IngrCount >= 4) {
		if (document.ingredientsForm.Ingr4.type > "") {
			if (document.ingredientsForm.Ingr4.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories4.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories4.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat4.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat4.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat4.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol4.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium4.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates4.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber4.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar4.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein4.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA4.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC4.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium4.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron4.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo4.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo4.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo4.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo4.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo4.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo4.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo4.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo4.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo4.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo4.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo4.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo4.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo4.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo4.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo4.value * 1;
				}
				if (document.ingredientsForm.Dairy4.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs4.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish4.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts4.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish4.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy4.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts4.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat4.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten4.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr4.length; i++) { 
				if (document.ingredientsForm.Ingr4[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories4[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories4[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat4[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat4[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat4[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol4[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium4[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates4[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber4[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar4[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein4[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA4[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC4[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium4[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron4[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo4[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo4[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo4[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo4[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo4[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo4[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo4[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo4[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo4[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo4[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo4[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo4[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo4[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo4[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo4[i].value * 1;
					}
					if (document.ingredientsForm.Dairy4[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs4[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish4[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts4[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish4[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy4[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts4[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat4[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten4[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}








	if (IngrCount >= 5) {
		if (document.ingredientsForm.Ingr5.type > "") {
			if (document.ingredientsForm.Ingr5.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories5.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories5.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat5.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat5.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat5.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol5.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium5.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates5.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber5.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar5.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein5.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA5.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC5.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium5.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron5.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo5.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo5.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo5.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo5.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo5.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo5.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo5.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo5.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo5.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo5.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo5.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo5.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo5.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo5.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo5.value * 1;
				}
				if (document.ingredientsForm.Dairy5.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs5.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish5.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts5.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish5.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy5.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts5.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat5.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten5.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr5.length; i++) { 
				if (document.ingredientsForm.Ingr5[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories5[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories5[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat5[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat5[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat5[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol5[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium5[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates5[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber5[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar5[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein5[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA5[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC5[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium5[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron5[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo5[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo5[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo5[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo5[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo5[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo5[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo5[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo5[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo5[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo5[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo5[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo5[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo5[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo5[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo5[i].value * 1;
					}
					if (document.ingredientsForm.Dairy5[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs5[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish5[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts5[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish5[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy5[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts5[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat5[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten5[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 6) {
		if (document.ingredientsForm.Ingr6.type > "") {
			if (document.ingredientsForm.Ingr6.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories6.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories6.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat6.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat6.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat6.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol6.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium6.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates6.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber6.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar6.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein6.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA6.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC6.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium6.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron6.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo6.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo6.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo6.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo6.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo6.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo6.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo6.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo6.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo6.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo6.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo6.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo6.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo6.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo6.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo6.value * 1;
				}
				if (document.ingredientsForm.Dairy6.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs6.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish6.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts6.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish6.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy6.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts6.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat6.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten6.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr6.length; i++) { 
				if (document.ingredientsForm.Ingr6[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories6[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories6[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat6[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat6[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat6[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol6[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium6[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates6[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber6[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar6[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein6[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA6[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC6[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium6[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron6[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo6[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo6[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo6[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo6[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo6[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo6[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo6[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo6[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo6[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo6[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo6[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo6[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo6[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo6[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo6[i].value * 1;
					}
					if (document.ingredientsForm.Dairy6[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs6[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish6[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts6[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish6[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy6[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts6[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat6[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten6[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 7) {
		if (document.ingredientsForm.Ingr7.type > "") {
			if (document.ingredientsForm.Ingr7.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories7.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories7.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat7.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat7.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat7.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol7.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium7.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates7.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber7.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar7.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein7.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA7.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC7.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium7.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron7.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo7.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo7.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo7.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo7.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo7.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo7.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo7.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo7.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo7.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo7.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo7.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo7.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo7.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo7.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo7.value * 1;
				}
				if (document.ingredientsForm.Dairy7.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs7.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish7.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts7.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish7.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy7.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts7.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat7.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten7.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr7.length; i++) { 
				if (document.ingredientsForm.Ingr7[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories7[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories7[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat7[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat7[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat7[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol7[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium7[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates7[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber7[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar7[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein7[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA7[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC7[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium7[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron7[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo7[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo7[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo7[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo7[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo7[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo7[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo7[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo7[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo7[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo7[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo7[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo7[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo7[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo7[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo7[i].value * 1;
					}
					if (document.ingredientsForm.Dairy7[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs7[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish7[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts7[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish7[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy7[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts7[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat7[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten7[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 8) {
		if (document.ingredientsForm.Ingr8.type > "") {
			if (document.ingredientsForm.Ingr8.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories8.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories8.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat8.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat8.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat8.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol8.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium8.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates8.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber8.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar8.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein8.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA8.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC8.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium8.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron8.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo8.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo8.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo8.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo8.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo8.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo8.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo8.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo8.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo8.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo8.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo8.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo8.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo8.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo8.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo8.value * 1;
				}
				if (document.ingredientsForm.Dairy8.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs8.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish8.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts8.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish8.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy8.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts8.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat8.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten8.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr8.length; i++) { 
				if (document.ingredientsForm.Ingr8[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories8[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories8[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat8[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat8[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat8[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol8[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium8[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates8[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber8[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar8[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein8[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA8[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC8[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium8[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron8[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo8[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo8[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo8[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo8[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo8[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo8[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo8[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo8[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo8[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo8[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo8[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo8[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo8[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo8[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo8[i].value * 1;
					}
					if (document.ingredientsForm.Dairy8[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs8[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish8[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts8[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish8[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy8[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts8[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat8[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten8[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 9) {
		if (document.ingredientsForm.Ingr9.type > "") {
			if (document.ingredientsForm.Ingr9.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories9.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories9.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat9.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat9.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat9.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol9.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium9.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates9.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber9.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar9.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein9.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA9.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC9.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium9.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron9.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo9.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo9.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo9.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo9.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo9.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo9.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo9.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo9.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo9.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo9.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo9.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo9.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo9.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo9.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo9.value * 1;
				}
				if (document.ingredientsForm.Dairy9.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs9.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish9.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts9.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish9.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy9.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts9.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat9.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten9.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr9.length; i++) { 
				if (document.ingredientsForm.Ingr9[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories9[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories9[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat9[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat9[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat9[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol9[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium9[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates9[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber9[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar9[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein9[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA9[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC9[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium9[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron9[i].value * 1;
					}
					else {				
						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo9[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo9[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo9[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo9[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo9[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo9[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo9[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo9[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo9[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo9[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo9[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo9[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo9[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo9[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo9[i].value * 1;
					}
					if (document.ingredientsForm.Dairy9[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs9[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish9[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts9[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish9[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy9[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts9[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat9[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten9[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}





	if (IngrCount >= 10) {
		if (document.ingredientsForm.Ingr10.type > "") {
			if (document.ingredientsForm.Ingr10.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories10.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories10.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat10.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat10.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat10.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol10.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium10.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates10.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber10.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar10.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein10.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA10.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC10.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium10.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron10.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo10.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo10.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo10.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo10.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo10.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo10.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo10.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo10.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo10.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo10.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo10.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo10.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo10.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo10.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo10.value * 1;
				}
				if (document.ingredientsForm.Dairy10.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs10.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish10.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts10.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish10.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy10.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts10.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat10.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten10.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr10.length; i++) { 
				if (document.ingredientsForm.Ingr10[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories10[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories10[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat10[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat10[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat10[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol10[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium10[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates10[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber10[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar10[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein10[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA10[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC10[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium10[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron10[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo10[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo10[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo10[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo10[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo10[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo10[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo10[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo10[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo10[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo10[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo10[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo10[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo10[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo10[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo10[i].value * 1;
					}
					if (document.ingredientsForm.Dairy10[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs10[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish10[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts10[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish10[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy10[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts10[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat10[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten10[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 11) {
		if (document.ingredientsForm.Ingr11.type > "") {
			if (document.ingredientsForm.Ingr11.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories11.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories11.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat11.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat11.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat11.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol11.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium11.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates11.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber11.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar11.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein11.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA11.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC11.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium11.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron11.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo11.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo11.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo11.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo11.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo11.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo11.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo11.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo11.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo11.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo11.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo11.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo11.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo11.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo11.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo11.value * 1;
				}
				if (document.ingredientsForm.Dairy11.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs11.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish11.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts11.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish11.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy11.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts11.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat11.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten11.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr11.length; i++) { 
				if (document.ingredientsForm.Ingr11[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories11[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories11[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat11[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat11[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat11[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol11[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium11[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates11[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber11[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar11[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein11[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA11[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC11[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium11[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron11[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo11[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo11[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo11[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo11[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo11[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo11[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo11[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo11[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo11[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo11[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo11[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo11[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo11[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo11[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo11[i].value * 1;
					}
					if (document.ingredientsForm.Dairy11[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs11[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish11[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts11[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish11[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy11[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts11[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat11[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten11[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 12) {
		if (document.ingredientsForm.Ingr12.type > "") {
			if (document.ingredientsForm.Ingr12.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories12.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories12.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat12.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat12.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat12.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol12.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium12.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates12.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber12.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar12.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein12.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA12.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC12.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium12.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron12.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo12.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo12.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo12.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo12.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo12.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo12.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo12.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo12.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo12.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo12.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo12.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo12.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo12.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo12.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo12.value * 1;
				}
				if (document.ingredientsForm.Dairy12.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs12.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish12.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts12.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish12.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy12.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts12.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat12.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten12.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr12.length; i++) { 
				if (document.ingredientsForm.Ingr12[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories12[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories12[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat12[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat12[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat12[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol12[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium12[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates12[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber12[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar12[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein12[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA12[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC12[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium12[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron12[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo12[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo12[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo12[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo12[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo12[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo12[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo12[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo12[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo12[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo12[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo12[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo12[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo12[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo12[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo12[i].value * 1;
					}
					if (document.ingredientsForm.Dairy12[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs12[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish12[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts12[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish12[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy12[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts12[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat12[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten12[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 13) {
		if (document.ingredientsForm.Ingr13.type > "") {
			if (document.ingredientsForm.Ingr13.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories13.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories13.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat13.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat13.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat13.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol13.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium13.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates13.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber13.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar13.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein13.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA13.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC13.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium13.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron13.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo13.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo13.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo13.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo13.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo13.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo13.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo13.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo13.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo13.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo13.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo13.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo13.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo13.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo13.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo13.value * 1;
				}
				if (document.ingredientsForm.Dairy13.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs13.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish13.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts13.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish13.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy13.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts13.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat13.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten13.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr13.length; i++) { 
				if (document.ingredientsForm.Ingr13[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories13[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories13[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat13[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat13[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat13[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol13[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium13[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates13[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber13[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar13[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein13[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA13[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC13[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium13[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron13[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo13[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo13[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo13[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo13[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo13[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo13[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo13[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo13[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo13[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo13[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo13[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo13[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo13[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo13[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo13[i].value * 1;
					}
					if (document.ingredientsForm.Dairy13[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs13[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish13[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts13[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish13[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy13[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts13[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat13[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten13[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 14) {
		if (document.ingredientsForm.Ingr14.type > "") {
			if (document.ingredientsForm.Ingr14.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories14.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories14.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat14.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat14.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat14.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol14.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium14.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates14.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber14.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar14.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein14.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA14.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC14.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium14.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron14.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo14.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo14.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo14.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo14.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo14.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo14.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo14.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo14.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo14.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo14.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo14.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo14.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo14.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo14.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo14.value * 1;
				}
				if (document.ingredientsForm.Dairy14.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs14.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish14.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts14.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish14.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy14.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts14.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat14.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten14.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr14.length; i++) { 
				if (document.ingredientsForm.Ingr14[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories14[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories14[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat14[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat14[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat14[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol14[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium14[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates14[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber14[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar14[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein14[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA14[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC14[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium14[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron14[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo14[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo14[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo14[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo14[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo14[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo14[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo14[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo14[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo14[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo14[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo14[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo14[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo14[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo14[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo14[i].value * 1;
					}
					if (document.ingredientsForm.Dairy14[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs14[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish14[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts14[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish14[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy14[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts14[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat14[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten14[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 15) {
		if (document.ingredientsForm.Ingr15.type > "") {
			if (document.ingredientsForm.Ingr15.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories15.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories15.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat15.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat15.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat15.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol15.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium15.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates15.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber15.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar15.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein15.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA15.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC15.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium15.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron15.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo15.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo15.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo15.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo15.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo15.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo15.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo15.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo15.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo15.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo15.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo15.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo15.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo15.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo15.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo15.value * 1;
				}
				if (document.ingredientsForm.Dairy15.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs15.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish15.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts15.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish15.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy15.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts15.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat15.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten15.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr15.length; i++) { 
				if (document.ingredientsForm.Ingr15[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories15[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories15[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat15[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat15[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat15[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol15[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium15[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates15[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber15[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar15[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein15[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA15[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC15[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium15[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron15[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo15[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo15[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo15[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo15[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo15[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo15[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo15[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo15[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo15[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo15[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo15[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo15[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo15[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo15[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo15[i].value * 1;
					}
					if (document.ingredientsForm.Dairy15[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs15[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish15[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts15[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish15[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy15[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts15[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat15[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten15[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 16) {
		if (document.ingredientsForm.Ingr16.type > "") {
			if (document.ingredientsForm.Ingr16.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories16.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories16.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat16.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat16.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat16.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol16.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium16.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates16.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber16.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar16.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein16.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA16.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC16.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium16.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron16.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo16.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo16.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo16.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo16.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo16.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo16.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo16.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo16.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo16.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo16.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo16.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo16.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo16.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo16.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo16.value * 1;
				}
				if (document.ingredientsForm.Dairy16.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs16.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish16.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts16.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish16.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy16.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts16.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat16.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten16.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr16.length; i++) { 
				if (document.ingredientsForm.Ingr16[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories16[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories16[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat16[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat16[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat16[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol16[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium16[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates16[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber16[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar16[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein16[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA16[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC16[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium16[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron16[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo16[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo16[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo16[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo16[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo16[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo16[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo16[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo16[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo16[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo16[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo16[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo16[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo16[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo16[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo16[i].value * 1;
					}
					if (document.ingredientsForm.Dairy16[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs16[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish16[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts16[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish16[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy16[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts16[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat16[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten16[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 17) {
		if (document.ingredientsForm.Ingr17.type > "") {
			if (document.ingredientsForm.Ingr17.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories17.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories17.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat17.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat17.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat17.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol17.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium17.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates17.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber17.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar17.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein17.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA17.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC17.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium17.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron17.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo17.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo17.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo17.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo17.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo17.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo17.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo17.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo17.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo17.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo17.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo17.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo17.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo17.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo17.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo17.value * 1;
				}
				if (document.ingredientsForm.Dairy17.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs17.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish17.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts17.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish17.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy17.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts17.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat17.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten17.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr17.length; i++) { 
				if (document.ingredientsForm.Ingr17[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories17[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories17[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat17[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat17[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat17[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol17[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium17[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates17[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber17[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar17[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein17[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA17[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC17[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium17[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron17[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo17[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo17[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo17[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo17[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo17[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo17[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo17[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo17[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo17[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo17[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo17[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo17[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo17[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo17[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo17[i].value * 1;
					}
					if (document.ingredientsForm.Dairy17[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs17[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish17[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts17[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish17[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy17[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts17[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat17[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten17[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 18) {
		if (document.ingredientsForm.Ingr18.type > "") {
			if (document.ingredientsForm.Ingr18.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories18.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories18.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat18.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat18.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat18.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol18.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium18.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates18.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber18.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar18.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein18.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA18.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC18.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium18.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron18.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo18.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo18.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo18.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo18.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo18.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo18.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo18.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo18.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo18.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo18.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo18.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo18.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo18.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo18.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo18.value * 1;
				}
				if (document.ingredientsForm.Dairy18.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs18.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish18.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts18.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish18.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy18.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts18.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat18.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten18.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr18.length; i++) { 
				if (document.ingredientsForm.Ingr18[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories18[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories18[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat18[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat18[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat18[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol18[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium18[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates18[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber18[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar18[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein18[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA18[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC18[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium18[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron18[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo18[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo18[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo18[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo18[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo18[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo18[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo18[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo18[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo18[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo18[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo18[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo18[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo18[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo18[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo18[i].value * 1;
					}
					if (document.ingredientsForm.Dairy18[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs18[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish18[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts18[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish18[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy18[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts18[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat18[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten18[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 19) {
		if (document.ingredientsForm.Ingr19.type > "") {
			if (document.ingredientsForm.Ingr19.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories19.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories19.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat19.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat19.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat19.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol19.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium19.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates19.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber19.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar19.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein19.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA19.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC19.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium19.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron19.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo19.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo19.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo19.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo19.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo19.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo19.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo19.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo19.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo19.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo19.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo19.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo19.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo19.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo19.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo19.value * 1;
				}
				if (document.ingredientsForm.Dairy19.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs19.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish19.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts19.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish19.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy19.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts19.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat19.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten19.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr19.length; i++) { 
				if (document.ingredientsForm.Ingr19[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories19[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories19[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat19[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat19[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat19[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol19[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium19[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates19[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber19[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar19[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein19[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA19[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC19[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium19[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron19[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo19[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo19[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo19[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo19[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo19[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo19[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo19[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo19[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo19[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo19[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo19[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo19[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo19[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo19[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo19[i].value * 1;
					}
					if (document.ingredientsForm.Dairy19[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs19[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish19[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts19[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish19[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy19[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts19[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat19[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten19[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 20) {
		if (document.ingredientsForm.Ingr20.type > "") {
			if (document.ingredientsForm.Ingr20.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories20.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories20.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat20.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat20.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat20.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol20.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium20.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates20.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber20.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar20.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein20.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA20.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC20.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium20.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron20.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo20.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo20.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo20.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo20.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo20.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo20.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo20.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo20.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo20.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo20.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo20.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo20.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo20.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo20.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo20.value * 1;
				}
				if (document.ingredientsForm.Dairy20.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs20.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish20.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts20.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish20.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy20.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts20.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat20.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten20.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr20.length; i++) { 
				if (document.ingredientsForm.Ingr20[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories20[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories20[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat20[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat20[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat20[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol20[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium20[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates20[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber20[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar20[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein20[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA20[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC20[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium20[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron20[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo20[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo20[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo20[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo20[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo20[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo20[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo20[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo20[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo20[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo20[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo20[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo20[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo20[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo20[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo20[i].value * 1;
					}
					if (document.ingredientsForm.Dairy20[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs20[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish20[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts20[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish20[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy20[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts20[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat20[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten20[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 21) {
		if (document.ingredientsForm.Ingr21.type > "") {
			if (document.ingredientsForm.Ingr21.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories21.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories21.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat21.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat21.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat21.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol21.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium21.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates21.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber21.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar21.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein21.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA21.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC21.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium21.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron21.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo21.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo21.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo21.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo21.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo21.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo21.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo21.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo21.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo21.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo21.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo21.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo21.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo21.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo21.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo21.value * 1;
				}
				if (document.ingredientsForm.Dairy21.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs21.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish21.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts21.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish21.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy21.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts21.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat21.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten21.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr21.length; i++) { 
				if (document.ingredientsForm.Ingr21[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories21[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories21[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat21[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat21[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat21[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol21[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium21[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates21[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber21[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar21[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein21[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA21[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC21[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium21[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron21[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo21[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo21[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo21[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo21[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo21[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo21[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo21[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo21[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo21[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo21[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo21[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo21[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo21[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo21[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo21[i].value * 1;
					}
					if (document.ingredientsForm.Dairy21[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs21[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish21[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts21[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish21[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy21[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts21[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat21[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten21[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 22) {
		if (document.ingredientsForm.Ingr22.type > "") {
			if (document.ingredientsForm.Ingr22.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories22.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories22.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat22.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat22.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat22.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol22.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium22.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates22.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber22.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar22.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein22.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA22.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC22.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium22.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron22.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo22.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo22.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo22.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo22.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo22.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo22.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo22.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo22.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo22.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo22.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo22.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo22.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo22.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo22.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo22.value * 1;
				}
				if (document.ingredientsForm.Dairy22.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs22.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish22.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts22.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish22.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy22.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts22.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat22.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten22.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr22.length; i++) { 
				if (document.ingredientsForm.Ingr22[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories22[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories22[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat22[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat22[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat22[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol22[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium22[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates22[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber22[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar22[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein22[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA22[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC22[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium22[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron22[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo22[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo22[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo22[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo22[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo22[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo22[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo22[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo22[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo22[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo22[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo22[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo22[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo22[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo22[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo22[i].value * 1;
					}
					if (document.ingredientsForm.Dairy22[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs22[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish22[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts22[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish22[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy22[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts22[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat22[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten22[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 23) {
		if (document.ingredientsForm.Ingr23.type > "") {
			if (document.ingredientsForm.Ingr23.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories23.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories23.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat23.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat23.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat23.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol23.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium23.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates23.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber23.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar23.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein23.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA23.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC23.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium23.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron23.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo23.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo23.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo23.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo23.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo23.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo23.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo23.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo23.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo23.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo23.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo23.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo23.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo23.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo23.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo23.value * 1;
				}
				if (document.ingredientsForm.Dairy23.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs23.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish23.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts23.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish23.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy23.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts23.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat23.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten23.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr23.length; i++) { 
				if (document.ingredientsForm.Ingr23[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories23[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories23[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat23[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat23[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat23[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol23[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium23[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates23[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber23[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar23[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein23[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA23[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC23[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium23[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron23[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo23[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo23[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo23[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo23[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo23[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo23[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo23[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo23[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo23[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo23[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo23[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo23[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo23[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo23[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo23[i].value * 1;
					}
					if (document.ingredientsForm.Dairy23[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs23[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish23[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts23[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish23[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy23[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts23[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat23[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten23[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 24) {
		if (document.ingredientsForm.Ingr24.type > "") {
			if (document.ingredientsForm.Ingr24.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories24.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories24.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat24.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat24.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat24.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol24.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium24.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates24.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber24.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar24.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein24.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA24.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC24.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium24.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron24.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo24.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo24.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo24.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo24.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo24.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo24.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo24.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo24.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo24.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo24.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo24.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo24.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo24.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo24.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo24.value * 1;
				}
				if (document.ingredientsForm.Dairy24.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs24.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish24.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts24.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish24.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy24.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts24.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat24.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten24.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr24.length; i++) { 
				if (document.ingredientsForm.Ingr24[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories24[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories24[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat24[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat24[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat24[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol24[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium24[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates24[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber24[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar24[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein24[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA24[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC24[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium24[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron24[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo24[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo24[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo24[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo24[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo24[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo24[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo24[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo24[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo24[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo24[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo24[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo24[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo24[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo24[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo24[i].value * 1;
					}
					if (document.ingredientsForm.Dairy24[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs24[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish24[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts24[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish24[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy24[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts24[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat24[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten24[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}






	if (IngrCount >= 25) {
		if (document.ingredientsForm.Ingr25.type > "") {
			if (document.ingredientsForm.Ingr25.checked == true) {
				if (IsSolo == false) {
					vCalories = vCalories + document.ingredientsForm.IngrCalories25.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories25.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFat25.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat25.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFat25.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol25.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodium25.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates25.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiber25.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugar25.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProtein25.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA25.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC25.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalcium25.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIron25.value * 1;
				}
				else {				
					vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo25.value * 1;
					vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo25.value * 1;
					vFat = vFat + document.ingredientsForm.IngrFatSolo25.value * 1;
					vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo25.value * 1;
					vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo25.value * 1;
					vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo25.value * 1;
					vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo25.value * 1;
					vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo25.value * 1;
					vFiber = vFiber + document.ingredientsForm.IngrFiberSolo25.value * 1;
					vSugars = vSugars + document.ingredientsForm.IngrSugarSolo25.value * 1;
					vProtein = vProtein + document.ingredientsForm.IngrProteinSolo25.value * 1;
					vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo25.value * 1;
					vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo25.value * 1;
					vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo25.value * 1;
					vIron = vIron + document.ingredientsForm.IngrIronSolo25.value * 1;
				}
				if (document.ingredientsForm.Dairy25.value == "1") {
					vDairy = 1;}
				if (document.ingredientsForm.Eggs25.value == "1") {
					vEggs = 1;}
				if (document.ingredientsForm.Fish25.value == "1") {
					vFish = 1;}
				if (document.ingredientsForm.Peanuts25.value == "1") {
					vPeanuts = 1;}
				if (document.ingredientsForm.ShellFish25.value == "1") {
					vShellFish = 1;}
				if (document.ingredientsForm.Soy25.value == "1") {
					vSoy = 1;}
				if (document.ingredientsForm.TreeNuts25.value == "1") {
					vTreeNuts = 1;}
				if (document.ingredientsForm.Wheat25.value == "1") {
					vWheat = 1;}
				if (document.ingredientsForm.Gluten25.value == "1") {
					vGluten = 1;}
			}
		}
		else
		{
			for (var i = 0; i < document.ingredientsForm.Ingr25.length; i++) { 
				if (document.ingredientsForm.Ingr25[i].checked == true) {
					if (IsSolo == false) {
						vCalories = vCalories + document.ingredientsForm.IngrCalories25[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCalories25[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFat25[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFat25[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFat25[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterol25[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodium25[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydrates25[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiber25[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugar25[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProtein25[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminA25[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminC25[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalcium25[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIron25[i].value * 1;
					}
					else {				

						vCalories = vCalories + document.ingredientsForm.IngrCaloriesSolo25[i].value * 1;
						vFatCalories = vFatCalories + document.ingredientsForm.IngrFatCaloriesSolo25[i].value * 1;
						vFat = vFat + document.ingredientsForm.IngrFatSolo25[i].value * 1;
						vSaturatedFat = vSaturatedFat + document.ingredientsForm.IngrSaturatedFatSolo25[i].value * 1;
						vTransFat = vTransFat + document.ingredientsForm.IngrTransFatSolo25[i].value * 1;
						vCholesterol = vCholesterol + document.ingredientsForm.IngrCholesterolSolo25[i].value * 1;
						vSodium = vSodium + document.ingredientsForm.IngrSodiumSolo25[i].value * 1;
						vCarbohydrates = vCarbohydrates + document.ingredientsForm.IngrCarbohydratesSolo25[i].value * 1;
						vFiber = vFiber + document.ingredientsForm.IngrFiberSolo25[i].value * 1;
						vSugars = vSugars + document.ingredientsForm.IngrSugarSolo25[i].value * 1;
						vProtein = vProtein + document.ingredientsForm.IngrProteinSolo25[i].value * 1;
						vVitaminA = vVitaminA + document.ingredientsForm.IngrVitaminASolo25[i].value * 1;
						vVitaminC = vVitaminC + document.ingredientsForm.IngrVitaminCSolo25[i].value * 1;
						vCalcium = vCalcium + document.ingredientsForm.IngrCalciumSolo25[i].value * 1;
						vIron = vIron + document.ingredientsForm.IngrIronSolo25[i].value * 1;
					}
					if (document.ingredientsForm.Dairy25[i].value == "1") {
						vDairy = 1;}
					if (document.ingredientsForm.Eggs25[i].value == "1") {
						vEggs = 1;}
					if (document.ingredientsForm.Fish25[i].value == "1") {
						vFish = 1;}
					if (document.ingredientsForm.Peanuts25[i].value == "1") {
						vPeanuts = 1;}
					if (document.ingredientsForm.ShellFish25[i].value == "1") {
						vShellFish = 1;}
					if (document.ingredientsForm.Soy25[i].value == "1") {
						vSoy = 1;}
					if (document.ingredientsForm.TreeNuts25[i].value == "1") {
						vTreeNuts = 1;}
					if (document.ingredientsForm.Wheat25[i].value == "1") {
						vWheat = 1;}
					if (document.ingredientsForm.Gluten25[i].value == "1") {
						vGluten = 1;}
				}
			}
		}
	}









	// Now, put these values onto the Nutrition Facts label
	document.nutritionTable.calories.value = Math.round(vCalories*vFactor)/vFactor;
	document.nutritionTable.fatCalories.value = Math.round(vFatCalories*vFactor)/vFactor;
	document.nutritionTable.fat.value = Math.round(vFat*vFactor)/vFactor + "g";
	document.nutritionTable.saturatedFat.value = Math.round(vSaturatedFat*vFactor)/vFactor + "g";
//	document.nutritionTable.transFat.value = Math.round(vTransFat*vFactor)/vFactor + "g";
	document.nutritionTable.cholesterol.value = Math.round(vCholesterol*vFactor)/vFactor + "mg";
	document.nutritionTable.sodium.value = Math.round(vSodium*vFactor)/vFactor + "mg";
	document.nutritionTable.carbohydrates.value = Math.round(vCarbohydrates*vFactor)/vFactor + "g";
	document.nutritionTable.fiber.value = Math.round(vFiber*vFactor)/vFactor + "g";
	document.nutritionTable.sugars.value = Math.round(vSugars*vFactor)/vFactor + "g";
	document.nutritionTable.protein.value = Math.round(vProtein*vFactor)/vFactor + "g";

	document.nutritionTable.fatPct.value = Math.round(vFat*100/document.nutritionTable.RDAFat.value);
	document.nutritionTable.satfatPct.value = Math.round(vSaturatedFat*100/document.nutritionTable.RDASaturatedFat.value);
	document.nutritionTable.cholesterolPct.value = Math.round(vCholesterol*100/document.nutritionTable.RDACholesterol.value);
	document.nutritionTable.sodiumPct.value = Math.round(vSodium*100/document.nutritionTable.RDASodium.value);
	document.nutritionTable.carbohydratesPct.value = Math.round(vCarbohydrates*100/document.nutritionTable.RDACarbohydrates.value);
	document.nutritionTable.fiberPct.value = Math.round(vFiber*100/document.nutritionTable.RDAFiber.value);
//	document.nutritionTable.VitaminAPct.value = Math.round(vVitaminA*100/document.nutritionTable.RDAVitaminA.value);
//	document.nutritionTable.VitaminCPct.value = Math.round(vVitaminC*100/document.nutritionTable.RDAVitaminC.value);
//	document.nutritionTable.CalciumPct.value = Math.round(vCalcium*100/document.nutritionTable.RDACalcium.value);
//	document.nutritionTable.IronPct.value = Math.round(vIron*100/document.nutritionTable.RDAIron.value);

	checked_image = "/images/web-images/icons/redcheck16.png";
	unchecked_image = "/images/web-images/icons/blank16.png";

	if (vDairy == 1) {
		document.allergensTable.allergenDairy.src = checked_image;}
	else {
		document.allergensTable.allergenDairy.src = unchecked_image;}
	if (vEggs == 1) {
		document.allergensTable.allergenEggs.src = checked_image;}
	else {
		document.allergensTable.allergenEggs.src = unchecked_image;}
	if (vFish == 1) {
		document.allergensTable.allergenFish.src = checked_image;}
	else {
		document.allergensTable.allergenFish.src = unchecked_image;}
	if (vPeanuts == 1) {
		document.allergensTable.allergenPeanuts.src = checked_image;}
	else {
		document.allergensTable.allergenPeanuts.src = unchecked_image;}
	if (vShellFish == 1) {
		document.allergensTable.allergenShellFish.src = checked_image;}
	else {
		document.allergensTable.allergenShellFish.src = unchecked_image;}
	if (vSoy == 1) {
		document.allergensTable.allergenSoy.src = checked_image;}
	else {
		document.allergensTable.allergenSoy.src = unchecked_image;}
	if (vTreeNuts == 1) {
		document.allergensTable.allergenTreeNuts.src = checked_image;}
	else {
		document.allergensTable.allergenTreeNuts.src = unchecked_image;}
	if (vWheat == 1) {
		document.allergensTable.allergenWheat.src = checked_image;}
	else {
		document.allergensTable.allergenWheat.src = unchecked_image;}
//	if (vGluten == 1) {
//		document.allergensTable.allergenGluten.src = checked_image;}
//	else {
//		document.allergensTable.allergenGluten.src = unchecked_image;}

}







<!--
// Timer to delay changing of field background colors
var secs
var timerID = null
var timerRunning = false
var delay = 250

function InitializeTimer()
{
    // Set the length of the timer, in seconds
    secs = 2
    StopTheClock()
    StartTheTimer()
}


function StopTheClock()
{
    if(timerRunning)
        clearTimeout(timerID)
    timerRunning = false
}

function StartTheTimer()
{
    if (secs==0)
    {
        StopTheClock()
        // Here's where you put something useful that's
        // supposed to happen after the allotted time.
        // For example, you could display a message:

	// Set the form background color to white
	t = DisplayFormValues("#ffffff");


//        alert("You have just wasted 10 seconds of your life.")
    }
    else
    {
        self.status = secs
        secs = secs - 1
        timerRunning = true
        timerID = self.setTimeout("StartTheTimer()", delay)
    }
}
//-->



 function DisplayFormValues(vColor) 
 { 
	 var str = ''; 
	 var elem = document.nutritionTable.elements; 
	 for(var i = 0; i < elem.length; i++) { 
		elem[i].style.backgroundColor = vColor;
	} 
	 var elem = document.allergensTable.elements; 
	 for(var i = 0; i < elem.length; i++) { 
		elem[i].style.backgroundColor = vColor;
	} 
	document.nutritionTable.servingSize.style.background = "#cccccc";
}

