function showOrHideSection(id)
{
	try
	{
		var div = document.getElementById(id);
		var divExpP = document.getElementById(id + 'ExpP');
		var divExpM = document.getElementById(id + 'ExpM');
		var divHdr = document.getElementById(id + 'Hdr');

		if(div.style.display=='none')
		{
			div.style.display = 'block';
			divExpM.style.display = 'block';
			divExpP.style.display = 'none';
			divHdr.style.backgroundColor = '#676767';
			divHdr.style.color = '#FFFFFF';
		}else{
			div.style.display='none';
			divExpM.style.display = 'none';
			divExpP.style.display = 'block';
			divHdr.style.backgroundColor = '#FFFFFF';
			divHdr.style.color = '#9A9A9A';
		}
		
		
	}catch(err){
		// Do nothing because this just a display effect
	}
	
}

function recipePageLinkClicked(pageNumber)
{
	document.recipeForm.pageNumber.value = pageNumber;
	document.recipeForm.submit();
}

/*  CALCULATE BMI  */
function calcEnglish(form, feet, inches, pounds) {
   if ((! inches) || isNaN(inches)){
	   inches = 0;
   }
   
   if ((pounds <= 0) || isNaN(pounds)){
	   alert ('Please enter your weight.');
	   return false;
   }
   
      if (((inches <= 0) || isNaN(inches)) && ((feet <= 0) || isNaN(feet))){
	   alert ('Please enter your height.');
	   return false;
   }
   
   TotalInches = eval(feet*12) + eval(inches)
   form.calcval.value = Math.round(pounds * 703 * 10 / TotalInches / TotalInches) / 10
   return false;
}

function calcMetric(form, meters, kilograms) {
	if ((kilograms <= 0) || isNaN(kilograms)){
		alert ('Please enter your weight.');
		return false;
	}
	if ((meters <= 0) || isNaN(meters)){
		alert ('Please enter your height.');
		return false;
	}

	form.calcval.value = Math.round(kilograms * 10 / meters / meters) / 10
}