function showFAQ(FAQnumber) {
	
	for (i=1; i<=11; i++) {
	
	if (i == FAQnumber) {
	document.getElementById('question'+i).style.display = "block";
	}
	else {
	document.getElementById('question'+i).style.display = "none";
	}
	
	}
// loops thru 8 times,  turns off all boxes except the selected one.	
}


// FOR BEGINS PAGE //

function show(id) {
	if(id == 'rebiana') { 
		document.getElementById('rebiana-info').style.display = 'block';
		document.getElementById('stevia-info').style.display = 'none';
		document.getElementById('rebiana').className = 'rebiana_on';
		document.getElementById('stevia').className = 'stevia';
	} else {
		document.getElementById('stevia-info').style.display = 'block';
		document.getElementById('rebiana-info').style.display = 'none';
		document.getElementById('rebiana').className = 'rebiana';
		document.getElementById('stevia').className = 'stevia_on';
	}
}

// FOR HCP FAQ PAGE //

function showHCPFAQ(id) {
	for(var i = 1; i <= 18; i++) {
		if(i == id) {
			document.getElementById('question' + i).style.display = "block";
		} else {
			document.getElementById('question' + i).style.display = "none";
		}
	}
}

function printPage(){
	for(var i = 1; i <= 11; i++) {
		document.getElementById('question' + i).style.display = "block";
	}
	window.print();
}

// FOR HOMEPAGE //

function chooseFFE() {
	var randomNumber = randomToN(2, 0);
	//var randCheck = checkRandomNumber(randomNumber);
	document.getElementById('homepageFFE').src = 'images/ffe' + randomNumber + '.jpg';
}

function randomToN(maxVal,floatVal) {
   var randVal = Math.random()*maxVal;
   return typeof floatVal=='undefined'?Math.round(randVal):randVal.toFixed(floatVal);
}
function checkRandomNumber(num) {
	if(num == 0) {
		return randomToN(3, 0);
	} else {
		return num;
	}
}