<!--
var agoal=new Array(0,0,0,0,0,0);	// store current topic in 0
var asst=new Array();
asst[0]='';
asst[21]='<a href="javascript:void sstclick(0);">Muscle Gain &amp; Recovery</a>'
asst[22]='<a href="javascript:void sstclick(0);">Longevity</a>';
asst[23]='<a href="javascript:void sstclick(0);">Mental Functioning</a>';
asst[24]='<a href="javascript:void sstclick(0);">Fat Loss</a>';
asst[25]='<a href="javascript:void sstclick(0);">Energy &amp; Endurance</a>';
asst[26]='';
asst[27]='';
asst[28]='Proteins-11111';
asst[29]='Essential Fats-11111';
asst[210]='Carbohydrates-00101';
asst[211]='';
asst[41]='Vitamins &amp; Minerals-11111';
asst[42]='Muscle Builders-10000';
asst[43]='Joint Repair Aids-11000';
asst[44]='Antioxidants-01000';
asst[45]='Cognitive Enhancers-01100';
asst[46]='Fat Loss Agents-00010';
asst[47]='Stimulants-00101';
asst[48]='Meal Replacements-11111';
asst[49]='Weight Gainers-10000-00010';
asst[410]='Nutrition Bars-11101';
asst[411]='Sports Drinks-00001-00010';
asst[71]='this tool';
var aa=new Array(21,22,23,24,25,26,27,28,29,210,211,41,42,43,44,45,46,47,48,49,410,411);
var amark=new Array();
for(var i=0;i<aa.length;i++) amark[aa[i]]=0;
function sstcell(n){
	if(asst[n].length){
		var aa=asst[n].split('-');
		var s='<table border="0" cellpadding="0" cellspacing="0">';
		s+='<tr><td rowspan="3"><img name="sst'+n+'1" src="images/1.gif" width="22" height="22"></td>';
		s+='<td><img name="sst'+n+'2" src="images/1.gif" width="144" height="3"></td>';
		s+='<td rowspan="3"><img name="sst'+n+'3" src="images/1.gif" width="22" height="22"></td></tr>';
		s+='<tr><td class="hand" height="16" align="center" valign="middle" onClick="sstclick('+n+');">'+aa[0]+'</td></tr>';
		s+='<tr><td><img name="sst'+n+'4" src="images/1.gif" width="144" height="3"></td></tr></table>';
		document.write(s);
	}
}
function sstclick(n){
	if(n<0) n=agoal[0];
	else if(asst[n].length==0) return;
	if(n>20 && n<26){
		// mark goals
		var j=n%10;
		agoal[j]=(agoal[j]+1)%2;
		sstmark(n,agoal[j]);
		
		// mark categories
		var aseq=new Array(28,29,210,41,42,43,44,45,46,47,48,49,410,411);
		for(var i=0;i<aseq.length;i++){
			var aa=asst[aseq[i]].split('-');
			var k=0;
			if(aa.length>2){
				for(var j=0;j<agoal.length-1;j++) k+=agoal[j+1]*(aa[2].substring(j,j+1)-0);
				if(k) sstmark(aseq[i],0);
			}
			if(!k){
				for(var j=0;j<agoal.length-1;j++) k+=agoal[j+1]*(aa[1].substring(j,j+1)-0);
				sstmark(aseq[i],k);
			}
		}
		// show pyramid
		var goals=agoal[1];
		for(var i=2;i<agoal.length;i++) goals+=agoal[i];
		document.form1.sst611.src='images/sst0'+Math.min(goals,1)+'.jpg';
		// connect lines
		var aa=new Array(amark[21],amark[22],amark[23],amark[24],amark[25],amark[26],amark[27],amark[28],amark[29],amark[210],amark[211]);	
		var ac=new Array(11,12,13,14,15,16,17,18,19,110,111);
		sstmarkline(aa,aa,ac);
		var aa=new Array(amark[21],amark[22],amark[23],amark[24],amark[25],amark[26],amark[27]);
		var ab=new Array(amark[41],amark[42],amark[43],amark[44],amark[45],amark[46],amark[47]);
		var ac=new Array(31,32,33,34,35,36,37);
		sstmarkline(aa,ab,ac);
		var aa=new Array(amark[28],amark[29],amark[210],amark[211]);
		var ab=new Array(amark[48],amark[49],amark[410],amark[411]);
		var ac=new Array(38,39,310,311);
		sstmarkline(aa,ab,ac);
		var aa=new Array();
		aa[0]=amark[41];
		var ab=new Array(0);
		ab[0]=goals;
		var ac=new Array();
		ac[0]=51;
		sstmarkline(aa,ab,ac);
		var aa=new Array(amark[42],amark[43],amark[44],amark[45],amark[46],amark[47]);
		var ab=new Array(goals,0,0,0,0,0);
		var ac=new Array(52,53,54,55,56,57);
		sstmarkline(aa,ab,ac);
		var aa=new Array(amark[48],amark[49],amark[410],amark[411]);
		var ab=new Array(goals,0,0,0);
		var ac=new Array(58,59,510,511);
		sstmarkline(aa,ab,ac);
		return;
	}
	agoal[0]=n;
	var aa=asst[n].split('-');
	var j=sreplace('&amp;','&',aa[0]);
	document.form1.about.value=(asst[n].length ? 'ABOUT '+j.toUpperCase()+'\n' : '')+ssttopic(n);
}
function sstline(n){
	document.write('<img name="sst'+n+'1" src="images/1.gif" width="2" height="22">');
}
function sstmark(n,p){
	if(p) for(var i=1;i<5;i++) document.form1[('sst'+n)+i].src='images/sst1'+i+'.gif';
	else for(var i=1;i<5;i++) document.form1[('sst'+n)+i].src='images/1.gif';
	amark[n]=p;
}
function sstmarkline(aa,ab,ac){
	var ad=new Array();											// output seq
	for(var i=0;i<aa.length;i++) ad[i]=(aa[i]+ab[i] ? 1 : 0) ;
	var j=0;														// first
	while(!ad[j] && j<ad.length-1) j++;
	var k=ad.length-1;											// last
	while(!ad[k] && k>0) k--;		
	if(k>j){
		ad[j]=2;
		for(i=j+1;i<k;i++) ad[i]=3;
		ad[k]=4;
	}
	for(i=0;i<ac.length;i++) document.form1['sst'+ac[i]+'1'].src='images/'+(ad[i]==0 ? '1' : 'sst2'+ad[i])+'.gif';
}
function sstreport(n){
	var goals=agoal[1];
	for(var i=2;i<agoal.length;i++) goals+=agoal[i]*Math.pow(2,i-1);
	if(!goals) alert('Nothing to report! Please select goals first.');
	else window.location='sst.php?q='+goals;
}
function ssttopic(n){
	switch(n){
		case 28: return 'Without protein, we can\'t build, repair, or maintain muscle. Studies have shown that exercise boosts the body\'s protein turnover rate, so athletes, weight trainers, and fitness enthusiasts alike have increased needs for protein, which is the foundation of any nutrition program.';
		case 29: return 'Essential fats are fats that our bodies cannot produce on their own. They play a critical role in thousands of chemical reactions within our bodies, including energy production, transporting oxygen, normal cell growth, nerve functioning, and hormone regulation.';
		case 210: return 'Carbohydrates are the perfered fuel for your body and brain. While most people can easily obtain sufficent carbohydrates from the foods they consume, endurance athletes often need to supplement carbs to meet their body\'s accelerated needs.';
		case 41: return 'Many vitamins and minerals are considered "essential" nutrients - meaning our bodies don\'t make them, so they must be obtained from either the foods we eat or from supplementation. These nutrients are vitally important to our health (and life), serving as the basis for proper brain function, muscular contraction, fluid balance, and energy production.';
		case 42: return 'Stimulating muscle protein synthesis is essential for us to maintain and even gain muscle during times of increased stress, such as intense exercise. Targeted supplements may help delay training fatigue, produce longer muscle contractions, and allow us to train harder, leading to accelerated muscle growth and greater strength.';
		case 43: return 'Our internal fire department (the inflammatory response function) works like firefighters hosing down a burning building, continually attacking toxins that damage tissue throughout our bodies. But when a joint is injured, the inflammatory process can sometimes get out of control. When our elbows or knees beg for help, specific supplements can help nourish and lubricate joint components to restore their function.';
		case 44: return 'Free radicals freely roam throughout our bodies, actively seeking places to step in and short-circuit (damage) the normal, healthy functions of a cell. Antioxidants are a class of compounds that, when consumed in specific ranges, play a vital role in protecting our bodies from these damaging substances.';
		case 45: return 'Perception is reality. Visualize what you want to achieve, stay focused on it, and it will happen. Virtually every athlete knows this. As long as you stay positive, the world will be with you. And a healthy outlook is tied closely to good nutrition. Many supplements also help increase happiness and optimistism by regulating neurotransmitters in our brains so we perform at our best.';
		case 46: return 'Excess bodyfat is the enemy of athletes and anyone interested in optimal health. Many elite athletes even hone their bodyfat percentages down to single digits. Several supplements may help accelerate fat loss when used with an exercise program, and often, these supplements can become even more effective when used in combination.';
		case 47: return 'Stimulants are specific supplements that help increase energy levels immediately. The surge of energy these supplements provide may also help promote fat burning, curb appetite, and increase mental alertness for physical activities.';
		case 48: return 'Meal Replacement products (MRP\'s) are powdered formulas and pre-mixed drinks (a.k.a. RTD\'s) that are scientifically formulated to replace a meal; serve as a pre- or post-workout meal; or serve as a quick, nutritious meal on the go.';
		case 49: return 'Ranging from traditional weight gainers with excess calories and sugar to the scientifically savvy lean mass stimulators of today - these are supplements for the "hard-gainer" who wants to pack on some additional pounds.';
		case 410: return 'Nutrition bars are compact food products designed to give you maximum nutritional support in a portable form. There are specific bars to target your every need. Whether it\'s high protein, low carb, instant energy, or balanced nutrition you\'re seeking, they\'re readily available to eat just about anytime, and they taste great, too.';
		case 411: return 'Sports drinks have been around since the 1960\'s when Gatorade developed its breakthrough product, using a simple combination of sodium, glucose (sugar), and water that encouraged rapid rehydration. Today, science has furthered the innovations. Although some sports drinks are nothing more than "souped up" soft drinks, claiming instant energy surges, sports drinks are typically designed to provide the fuel our bodies need for prolonged, intense physical activity.';
		case 71:
			var s='This Supplement Solution Tool (SST) uses Nutros\' knowledgebase to find the highest rated supplements from each category related to your performance goals.\n\n';
			s+='Click on one or more goals in the upper portion of the left column, and the SST will identify the most appropriate supplement categories. Click on any supplement category to learn more about it. Then click on the link in the right column for a report that explains your supplement solution in detail.';
			return s;
	}
	return '';
}
//-->

