/*
This script is copyright and may not be reproduced without permission. 
*/

var symptoms =  new Array();
var ingredientlist="";
var affiliatecode="asppd99a";
function symptom(pname,pingr)
{
	this.name=pname;
	this.ingredients=pingr;
}

function generatelist() 
{
	document.getElementById("suggestarea").innerHTML="";
	ingredientlist="";
	for (var ze=0;ze<document.wizard.length;ze++) {
		if (document.wizard[ze].type =="checkbox" && document.wizard[ze].checked == true) {
			ingredientlist+=document.wizard[ze].value;
		}
	}
	
	var temparray=new Array();
	temparray = ingredientlist.split('-');
//	alert(temparray.length);
	
	for (var pu=0;pu<temparray.length-1;pu++) {
		if (temparray[pu]=="") continue;
//		alert("___" + lasomma + "_____");
		for (var tu=pu+1;tu<temparray.length;tu++) {
			if (temparray[pu].substring(8) == temparray[tu].substring(8)) {
				temparray[tu]="";
//				alert("ok___"+lasomma+"____");
			}
		}
		document.getElementById("suggestarea").innerHTML += temparray[pu]+"<br>";
		//		alert(temparray[pu]);
	}
	
	ingredientlist=ingredientlist.replace(/-/g,"\n");
//	document.wizard.suggestarea.value = ingredientlist;
}

symptoms.push(new symptom("Scalp",new Array()));
symptoms.push(new symptom("Dry or tight scalp",new Array("Natural oil balance may be affected.  Use a gentle shampoo and hot oil treatment.")));
symptoms.push(new symptom("Greasy or oily hair & scalp",new Array("Natural oil balance may be affected.  Tea tree oil is good for treating oily greasy hair.")));
symptoms.push(new symptom("Itching or burning or “hot” scalp",new Array("Possible sensitivity to shampoo ingredients  and/or a yeast imbalance.  Use a natural shampoo & avoid certain chemical ingredients known to damage scalp & hair.  Minor dietary changes can help your condition as will using natural remedies at home.")));
symptoms.push(new symptom("Scaly white or silvery patches",new Array("Scalp white patches can be an indication of scalp psoriasis.  This can be aggravated by certain shampoo ingredients and foods.  Often scaly areas on other parts of the body.  Herbs such as Oregon grape and Saw Palmetto can help and aloe juice.")));
symptoms.push(new symptom("Dandruff or flaking",new Array("Possible sensitivity to shampoo ingredients  (including dandruff shampoos if dandruff is persistent) and/or a yeast imbalance.  Use a natural shampoo & avoid certain chemical ingredients known to damage scalp & hair.  Minor dietary changes can help your condition and using a natural remedy containing tea tree oil is highly beneficial.  Stripping your scalp with a harsh shampoo leaves your scalp with no defense or natural balance to fight dandruff causing bacteria.  Use a non stripping shampoo & a tea tree based home remedy is highly effective & beneficial.")));
symptoms.push(new symptom("Lumps, bumps, sores, infected or weepy areas",new Array("Scalp lumps bumps and sores are most commonly a sign of a reaction to an ingredient in shampoo or hair dye.  This can be treated by eliminating the offending chemical ingredient – use a natural foaming agent based shampoo.  The irritation can be soothed with a natural scalp remedy you can make at home.")));
symptoms.push(new symptom("Brittle/damaged or split ends in your hair",new Array("Use a home remedy treatment to boost the moisture content and rebalance your scalps sebum levels.")));
symptoms.push(new symptom("A red rash that is unbearably itchy and hot",new Array("Rashes are usually a sign of a reaction to an ingredient in shampoo or hair dye.  This can be treated by eliminating the offending chemical ingredient – use a natural foaming agent based shampoo.  The irritation can be soothed with natural scalp remedies which can also help the healing process." )));
symptoms.push(new symptom("Have had a reaction to hair dye before ",new Array("A lot of people will develop a sensitivity to hair dye which can also lead to sensitivities to shampoos and other hair products.  Use a gentle hair dye without an ammonia or peroxide base.")));
symptoms.push(new symptom("Have taken antibiotics in the last 2 years",new Array("Antibiotics can kill “good” bacteria flourishing in your body and scalp.   Candida is one yeast infection that can cause dandruff as well as other complications in your system.  Stripping your scalp with a harsh shampoo leaves your scalp with no defense or natural balance to fight dandruff causing bacteria. Taking acidophilus can help as well as using a tea tree based remedy is great for dandruff.")));