<!--
function calc(){
var $rank=0;
var $score=0;
var formed=document.forms[0].elements;
for (a=0; a<formed.length; a++){
	if(formed[a].type=="radio" && formed[a].checked){
		$score=$score+eval(formed[a].value);
		}
	}
//alert($score); -with extra info
result($score);
}


function result($score){
$theinfo="../cgi-bin/hysearch.pl?app=Yeast&mfg=&product=&sortby=Manufacturer&startitem=0&fixpath=yes";
if (quiz.male.value != ""){
	if (quiz.male.value == "male"){
		if ($score>=140){
			$rank=3;
			}
		if ($score>=90 && $score<140){
			$rank=2;
			}
		if ($score>=40 && $score<90){
			$rank=1;
			}
		if ($score<40){
			$rank=0;
			}
		}
	else{
		if ($score>=180){
			$rank=3;
			}
		if ($score>=120 && $score<180){
			$rank=2;
			}
		if ($score>=60 && $score<120){
			$rank=1;
			}
		if ($score<60){
			$rank=0;
			}
		}
if ($rank==0){
	$result= "Most likely your symptoms arn't related to yeast.";
	if(confirm($result+"\nClick \'OK\' for info on the book.")){
	document.location = "books.html";
	}

	}
if ($rank==1){
	$result="Yeasts possibly play a role in causing your symptoms.";
	if(	confirm($result+"\nClick \'OK\' to see products made to correct yeast problems.")){
		window.location=$theinfo;
		}
	}
if ($rank==2){
	$result="Yeasts probably play a role in causing your symptoms.";
	if(	confirm($result+"\nClick \'OK\' to see products made to correct yeast problems.")){
		window.location=$theinfo;
		}
	}
if ($rank==3){
	$result="Yeasts almost certainly play a role in causing your symptoms.";
	if(	confirm($result+"\nClick \'OK\' to see products made to correct yeast problems.")){
		window.location=$theinfo;
		}
	}
	}
	else{
		alert("You must select your sex");
	}
}
//-->