
function fillDiameter(){ 
 // this function is used to fill the Diameter list on load
addOption(document.drop_list.Diameter, "Analogue Thermometers", "Analogue Thermometers", "");
addOption(document.drop_list.Diameter, "Digital Thermometers", "Digital Thermometers", "");
addOption(document.drop_list.Diameter, "Thermocouple/RTD", "Thermocouple/RTD", "");
addOption(document.drop_list.Diameter, "HVAC", "HVAC", "");
addOption(document.drop_list.Diameter, "Accessories", "Accessories", "");
}

function SelectRange(){
// ON selection of Diameter this function will work

removeAllOptions(document.drop_list.Range);
addOption(document.drop_list.Range, "", "Analogue Thermometers", "");

if(document.drop_list.Diameter.value == 'Analogue Thermometers'){
addOption(document.drop_list.Range,"Rigid Stem", "Rigid Stem");
addOption(document.drop_list.Range,"Distance Reading", "Distance Reading");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}
if(document.drop_list.Diameter.value == 'Digital Thermometers'){
addOption(document.drop_list.Range,"Rigid Stem", "Rigid Stem");
addOption(document.drop_list.Range,"Hand Held", "Hand Held");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}
if(document.drop_list.Diameter.value == 'Thermocouple/RTD'){
addOption(document.drop_list.Range,"Thermocouple/RTD", "Thermocouple/RTD");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}
if(document.drop_list.Diameter.value == 'HVAC'){
addOption(document.drop_list.Range,"Back Stem", "Back Stem");
addOption(document.drop_list.Range,"Bottom Stem", "Bottom Stem");
addOption(document.drop_list.Range,"Pipe Thermometers (Clip On)", "Pipe Thermometers (Clip On)");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}
if(document.drop_list.Diameter.value == 'Accessories'){
addOption(document.drop_list.Range,"Thermowells/Pockets", "Thermowells/Pockets");
addOption(document.drop_list.Range,"Electrical Contacts", "Electrical Contacts");
addOption(document.drop_list.Range,"Customised Dials and Scales", "Customised Dials and Scales");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}
if(document.drop_list.Diameter.value == 'Services'){
addOption(document.drop_list.Range,"Hire Equipment", "Hire Equipment");
addOption(document.drop_list.Range,"Repair", "Repair");
addOption(document.drop_list.Range,"Calibration", "Calibration");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}


}
////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}


