function NM_onload()
{
	UpdateItems();
	RecHelp("");
}

function UpdateItems()
{
	sRec = "";
	
	bRoving = document.formWiz.radRoving[1].checked;
	
	bLow = document.formWiz.radLevel[0].checked;
	bHigh = document.formWiz.radLevel[1].checked;
	bVeryHigh = document.formWiz.radLevel[2].checked;
	
	bLots = document.formWiz.radUse[1].checked;
	
	if(!bRoving)
	{
		if(bLow && !bLots)
			sRec = "CK262A";
		if(bLow && bLots)
			sRec = "CK262P";
		
		if(bHigh && !bLots)
			sRec = "CK264P";
		if(bHigh && bLots)
			sRec = "EMS230-2";

		if(bVeryHigh)
			sRec = "EMS230-2";
	}
	else
	{
		if(bLow && !bLots)
			sRec = "CK110-2";
		if(bLow && bLots)
			sRec = "CK110-5";
			
		if(bHigh && !bLots)
			sRec = "CK110-3-HP";
		if(bHigh & bLots)
			sRec = "CK110-5-PC";
		
		if(bVeryHigh)
			sRec = "CK110-5-PC";
	}

	document.getElementById("divCK262A").className = "wiz-disabled";
	document.getElementById("divCK262P").className = "wiz-disabled";
	document.getElementById("divCK264P").className = "wiz-disabled";
	document.getElementById("divEMS230-2").className = "wiz-disabled";
	document.getElementById("divCK110-2").className = "wiz-disabled";
	document.getElementById("divCK110-5").className = "wiz-disabled";
	document.getElementById("divCK110-3-HP").className = "wiz-disabled";
	document.getElementById("divCK110-5-PC").className = "wiz-disabled";

	document.getElementById("div" + sRec).className = "";
	
//	alert(sRec);
}

function RecHelp(sSubject)
{
	document.getElementById("divStationaryArrowHead").style.display = "none";
	document.getElementById("divStationaryArrowBody").style.display = "none";
	document.getElementById("divRovingArrowBody").style.display = "none";
	document.getElementById("divRovingArrowHead").style.display = "none";
	document.getElementById("divLowArrowBody").style.display = "none";
	document.getElementById("divLowArrowHead").style.display = "none";
	document.getElementById("divHighArrowBody").style.display = "none";
	document.getElementById("divHighArrowHead").style.display = "none";
	document.getElementById("divVeryHighArrowBody").style.display = "none";
	document.getElementById("divVeryHighArrowHead").style.display = "none";
	document.getElementById("divFewArrowBody").style.display = "none";
	document.getElementById("divFewArrowHead").style.display = "none";
	document.getElementById("divManyArrowBody").style.display = "none";
	document.getElementById("divManyArrowHead").style.display = "none";
	
	document.getElementById("divRec").style.display = "none";
	
	sHelp = "";
	
	if(sSubject == "Stationary")
		sHelp = "Monitoring workers who tend to work at one location or moving between just a few fixed locations.<br><br>In this case it is often easier and more accurate to use a hand-held sound level meter than a noise dosemeter.<br><br>You will have to calculate the LEP,d based on the time the worker spends at each location. If you want a meter that does it for you then click the <b>Roving</b> option.";
	if(sSubject == "Roving")
		sHelp = "These recommendations are ideal for:<br><br><b>Roving: </b>Workers who are moving between many different locations.<br><br>" +
		        "<b>Confined Spaces: </b>Working in confined spaces or in locations where measurement with a sound level meter is difficult.<br><br>" +
				"<b>Many Workers: </b>Monitoring a large number of workers at the same time.";
	if(sSubject == "Low")
		sHelp = "You expect the noise levels to be below or around 90 dB(A). At these levels you should monitor the levels on a regular bases using a suitable meter but more detailed frequency analysis should not be necessary.<br><br><b>Not sure of the levels?</b> - if you have to raise your voice to be heard by somebody at arm's length then the noise levels are probably above 90 dB(A).";
	if(sSubject == "High")
		sHelp = "You expect the noise levels to be regularly above 90 dB(A). At these levels further analysis needs to be carried out to ensure that the hearing protection being used is adequate.<br><br><b>Not sure of the levels?</b> - if you have to raise your voice to be heard by somebody at arm's length then the noise levels are probably above 90 dB(A).";
	if(sSubject == "VeryHigh")
		sHelp = "You expect the noise levels to be regularly above 90 dB(A) and vary quite rapidly. At these levels further analysis needs to be carried out to ensure that the hearing protection being used is adequate. A <em>Real-Time</em> meter with wide dynamic span should be used due to the varying nature of the noise<br><br><b>Not sure of the levels?</b> - if you have to raise your voice to be heard by somebody at arm's length then the noise levels are probably above 90 dB(A).";
	if(sSubject == "Few")
		sHelp = "You will only be making occasional measurements, maybe in a small factory or similar environment.<br><br>For low noise levels you can keep things simple and keep costs down by using a simple hand-held meter and noting the measurements down by hand.<br><br>For higher but steady state noise levels you can use a meter with serial filters, keeping the costs down.";
	if(sSubject == "Many")
		sHelp = "You will be making regular noise measurements, maybe in a large factory or working as a noise consultant.<br><br>For low noise levels a simple meter is recommended with data logging and software that will calculate the LEP,d and generate reports.<br><br>For higher noise levels a real-time octave band analyser with wide dynamic span is prefered as it makes the measurement process considerably quicker.";
	
	bArrows = true;
	
	if(sSubject == "Rec")
	{
		sHelp = "<b>Our recommendation</b><br><br>Based on the selected Work Environment, Typical Noise Levels and Amount of Use that the equipment will get, we would recommend the following:";
		document.getElementById("divRec").style.display = "block";
		bArrows = false;
	}
	if(sHelp == "")			// Nothing defined, give general help
	{
		sHelp = "Select the options that best describe your application.<br><br><b>Work Environment</b> is a description of the type of work involved and whether the workers tend move round a lot.<br><br><b>Typical Noise Levels</b> is an indication of the noise that the workers are exposed to.<br><br><b>Amount of Use</b> is an indication of how much you will be using the noise monitoring equipment.";
		bArrows = false;
	}

	if(bArrows)
	{
		document.getElementById("div" + sSubject + "ArrowHead").style.display = "block";
		document.getElementById("div" + sSubject + "ArrowBody").style.display = "block";
	}

	document.getElementById("divRecHelp").innerHTML = sHelp;
}

