			var nutritionValues = 	[	{ fruits:'1.5',vegetables:'2', grains:'5', meat:'5', milk:'3' },
										{ fruits:'1.5',vegetables:'2.5', grains:'6', meat:'5', milk:'3' },
										{ fruits:'2',vegetables:'2.5', grains:'6', meat:'5.5', milk:'3' },
										{ fruits:'2',vegetables:'3', grains:'7', meat:'6', milk:'3' },
										{ fruits:'2',vegetables:'3', grains:'8', meat:'6.5', milk:'3' }
									];

			function drawPyramid(imagePath, contentId, amount, calorieIndex, type)
			{
				var value = 0;
				var recoValue = 0;

				if(type == 'fruits')
				{
					recoValue = nutritionValues[calorieIndex].fruits;
				}
				else if(type == 'vegetables')
				{
					recoValue = nutritionValues[calorieIndex].vegetables;
				}
				else if(type == 'grains')
				{
					recoValue = nutritionValues[calorieIndex].grains;
				}
				else if(type == 'meat')
				{
					recoValue = nutritionValues[calorieIndex].meat;
				}
				else if(type == 'milk')
				{
					recoValue = nutritionValues[calorieIndex].milk;
				}

				value = Math.floor(amount / recoValue * 100) + '%';
				
				if(value == '0%')
				{
					document.getElementById(contentId).innerHTML = '<img src="' + imagePath + 'recipe_dash.gif" alt="" />';
				}
				else
				{
					document.getElementById(contentId).innerHTML = '<div style="padding-top:15px;">' + getNumberImages(imagePath, value) + '</div>';
				}
			}					
							

			function getNumberImages(imagePath, value)
			{
				var images = '';

				if(value != null)
				{
					for(var x = 0 ; x < value.length ; x++)
					{
						var character = value.charAt(x);

						if(character == '%')
						{
							character = 'Percent';
						}
						else if(character == '+')
						{
							character = 'Plus';
						}

						images += createImageTag(imagePath, character);
					}
				}
				return images;
			}

			function createImageTag(imagePath, characterValue)
			{
				return '<img src="' + imagePath + 'num' + characterValue + '.gif" alt="" />';
			}
