/*FSFI self assessment form*/
function calculateFSFIScore() {

	var numChoices = 5, score = 0, desire = 0, arousal = 0, lubrication = 0, orgasm = 0, satisfaction = 0, pain = 0;
	
	for (i = 0; i <= numChoices; i++)
	{
		if(document.fsfi.q1[i].checked) { desire += parseFloat(document.fsfi.q1[i].value); }
		if(document.fsfi.q2[i].checked) { desire += parseFloat(document.fsfi.q2[i].value); }
		
		if(document.fsfi.q3[i].checked) { arousal += parseFloat(document.fsfi.q3[i].value); }
		if(document.fsfi.q4[i].checked) { arousal += parseFloat(document.fsfi.q4[i].value); }
		if(document.fsfi.q5[i].checked) { arousal += parseFloat(document.fsfi.q5[i].value); }
		if(document.fsfi.q6[i].checked) { arousal += parseFloat(document.fsfi.q6[i].value); }
		
		if(document.fsfi.q7[i].checked) { lubrication += parseFloat(document.fsfi.q7[i].value); }
		if(document.fsfi.q8[i].checked) { lubrication += parseFloat(document.fsfi.q8[i].value); }
        if(document.fsfi.q9[i].checked) { lubrication += parseFloat(document.fsfi.q9[i].value); }
		if(document.fsfi.q10[i].checked) { lubrication += parseFloat(document.fsfi.q10[i].value); }
		
		if(document.fsfi.q11[i].checked) { orgasm += parseFloat(document.fsfi.q11[i].value); }
		if(document.fsfi.q12[i].checked) { orgasm += parseFloat(document.fsfi.q12[i].value); }
		if(document.fsfi.q13[i].checked) { orgasm += parseFloat(document.fsfi.q13[i].value); }

		if(document.fsfi.q14[i].checked) { satisfaction += parseFloat(document.fsfi.q14[i].value); }
		if(document.fsfi.q15[i].checked) { satisfaction += parseFloat(document.fsfi.q15[i].value); }
		if(document.fsfi.q16[i].checked) { satisfaction += parseFloat(document.fsfi.q16[i].value); }
		
		if(document.fsfi.q17[i].checked) { pain += parseFloat(document.fsfi.q17[i].value); }
		if(document.fsfi.q18[i].checked) { pain += parseFloat(document.fsfi.q18[i].value); }
		if(document.fsfi.q19[i].checked) { pain += parseFloat(document.fsfi.q19[i].value); }
	}
	score = Math.round(desire + arousal + lubrication + orgasm + satisfaction + pain);
	//document.getElementById("total").innerHTML = "YOUR TOTAL SCORE IS: " + score;

	if (score > 30) {
		document.getElementById("total").innerHTML = "<div class='fsfiresult'><h3>YOUR TOTAL SCORE IS: " + score + "</h3><p><a href=\"/patient/products/androfeme.htm\" target=\"_blank\"><img src=\"http://www.lawleybasecamp.com/media/images/booklets/condition-booklets/Testosterone-for-Women/Testosterone-for-Women_183x150.jpg\" /></a>No action required – results are within the accepted normal range. <br />A regular exercise regimen, stress control and weight management is advised, if not already in place. <br />Baseline sex hormone binding-globulin, total and calculated free testosterone blood levels can be taken at your next doctors visit and kept for future reference. <br />If you have concerns with regards your sexual function an investigation of testosterone hormone blood status by a medical practitioner experienced in the management of sexual function issues is recommended. Exclude underlying medical conditions that may be present - depression, excess alcohol, stress, prescription and recreational drugs, anaemia and relationship problems. <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">Download the FREE information booklet 'The safe and effective use of testosterone in women'</a>";

		
	} else if (score > 23){	   
		document.getElementById("total").innerHTML = "<div class='fsfiresult'><h3>YOUR TOTAL SCORE IS: " + score + "</h3><p><a href=\"/patient/products/androfeme.htm\" target=\"_blank\" style=\"float:left; padding:5px;\"><img src=\"http://www.lawleybasecamp.com/media/images/booklets/condition-booklets/Testosterone-for-Women/Testosterone-for-Women_183x150.jpg\" /></a>No action required - results are within the accepted normal range.<br/>A regular exercise regimen, stress control and weight management is advised, if not already in place.<br />Baseline sex hormone binding-globulin, total and calculated free testosterone blood levels should be taken at your next doctor's visit and kept for future reference.<br />If you have concerns with regards your sexual function an investigation of testosterone hormone blood status by a medical practitioner experienced in the management of sexual function issues is recommended. Exclude underlying medical conditions that may be present - depression, excess alcohol, stress, prescription and recreational drugs, anaemia and relationship problems. <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">Download the FREE information booklet 'The safe and effective use of testosterone in women'</a>";

		
	} else if (score > 15){
		document.getElementById("total").innerHTML = "<div class='fsfiresult'><h3>YOUR TOTAL SCORE IS: " + score + "</h3><p><a href=\"/patient/products/androfeme.htm\" target=\"_blank\" style=\"float:left; padding:5px;\"><img src=\"http://www.lawleybasecamp.com/media/images/booklets/condition-booklets/Testosterone-for-Women/Testosterone-for-Women_183x150.jpg\" /></a>Testosterone supplementation with <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">AndroFeme<sup>&reg;</sup></a> testosterone cream for women <strong>may be required</strong>.<br /> Investigation of testosterone hormone blood status by a medical practitioner experienced in the management of sexual function issues is recommended - sex hormone binding-globulin, total and calculated free testosterone levels need to be measured. If blood results indicate low range testosterone a three month trial with <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">AndroFeme<sup>&reg;</sup></a> can be initiated. Exclude underlying medical conditions that may be present - depression, excess alcohol, stress, prescription and recreational drugs, anaemia and relationship problems. <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">Download the FREE information booklet 'The safe and effective use of testosterone in women'</a>";
		
	} else if (score > 1){
		document.getElementById("total").innerHTML = "<div class='fsfiresult'><h3>YOUR TOTAL SCORE IS: " + score + "</h3><p><a href=\"/patient/products/androfeme.htm\" target=\"_blank\" style=\"float:left; padding:5px;\"><img src=\"http://www.lawleybasecamp.com/media/images/booklets/condition-booklets/Testosterone-for-Women/Testosterone-for-Women_183x150.jpg\" /></a>Testosterone supplementation with <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">AndroFeme<sup>&reg;</sup></a> testosterone cream for women <strong>highly recommended</strong> investigating.<br /> Investigation of testosterone hormone blood status by a medical practitioner experienced in the management of sexual function issues is recommended - sex hormone binding-globulin, total and calculated free testosterone levels need to be measured. If blood results indicate low range testosterone a three month trial with <a href=\"/patient/products/androfeme.htm\" blank=\"_blank\">AndroFeme<sup>&reg;</sup></a> can be initiated. Exclude underlying medical conditions that may be present - depression, excess alcohol, stress, prescription and recreational drugs, anaemia and relationship problems. <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">Download the FREE information booklet 'The safe and effective use of testosterone in women'</a>";
	
	} else {
		document.getElementById("total").innerHTML = "<div class='fsfiresult'><h3>YOUR TOTAL SCORE IS: " + score + "</h3><p><a href=\"/patient/products/androfeme.htm\" target=\"_blank\" style=\"float:left; padding:5px;\"><img src=\"http://www.lawleybasecamp.com/media/images/booklets/condition-booklets/Testosterone-for-Women/Testosterone-for-Women_183x150.jpg\" /></a>Testosterone supplementation with <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">AndroFeme<sup>&reg;</sup></a> testosterone cream for women <strong>highly recommended</strong> investigating.<br /> Investigation of testosterone hormone blood status by a medical practitioner experienced in the management of sexual function issues is recommended - sex hormone binding-globulin, total and calculated free testosterone levels need to be measured. If blood results indicate low range testosterone a three month trial with <a href=\"/patient/products/androfeme.htm\" blank=\"_blank\">AndroFeme<sup>&reg;</sup></a> can be initiated. Exclude underlying medical conditions that may be present - depression, excess alcohol, stress, prescription and recreational drugs, anaemia and relationship problems. <a href=\"/patient/products/androfeme.htm\" target=\"_blank\">Download the FREE information booklet 'The safe and effective use of testosterone in women'</a>";
	}

}


