
function fillDiameter(){ 
 // this function is used to fill the Diameter list on load
addOption(document.drop_list.Diameter, "Pressure", "Pressure", "");
addOption(document.drop_list.Diameter, "Liquid Level and Flow", "Liquid Level and Flow", "");
addOption(document.drop_list.Diameter, "Temperature", "Temperature", "");
addOption(document.drop_list.Diameter, "Accessories", "Accessories", "");
addOption(document.drop_list.Diameter, "Test Equipment", "Test Equipment", "");
addOption(document.drop_list.Diameter, "Services", "Services", "");
}

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

removeAllOptions(document.drop_list.Range);
addOption(document.drop_list.Range, "", "Product", "");

if(document.drop_list.Diameter.value == 'Pressure'){
addOption(document.drop_list.Range,"General Purpose Small Diameter Gauges", "General Purpose Small Diameter Gauges");
addOption(document.drop_list.Range,"Industrial Pressure Gauges", "Industrial Pressure Gauges");
addOption(document.drop_list.Range,"Liquid Filled Pressure Gauges", "Liquid Filled Pressure Gauges");
addOption(document.drop_list.Range,"Stainless Steel Pressure Gauges", "Stainless Steel Pressure Gauges");
addOption(document.drop_list.Range,"Full Safety Pattern Pressure Gauges", "Full Safety Pattern Pressure Gauges");
addOption(document.drop_list.Range,"Traditional Brass Gauges", "Traditional Brass Gauges");
addOption(document.drop_list.Range,"Magnehelic Gauges", "Magnehelic Gauges");
addOption(document.drop_list.Range,"Test Gauges", "Test Gauges");
addOption(document.drop_list.Range,"Vacuum and Absolute Gauges", "Vacuum and Absolute Gauges");
addOption(document.drop_list.Range,"Differential Pressure Gauges", "Differential Pressure Gauges");
addOption(document.drop_list.Range,"Grout/Pulp Separator Gauges", "Grout/Pulp Separator Gauges");
addOption(document.drop_list.Range,"Chemical Seal Gauges", "Chemical Seal Gauges");
addOption(document.drop_list.Range,"Hygienic Seal Gauges", "Hygienic Seal Gauges");
addOption(document.drop_list.Range,"In Line Hygienic Seal Gauges", "In Line Hygienic Seal Gauges");
addOption(document.drop_list.Range,"Digital Display Pressure Gauge", "Digital Display Pressure Gauge");
addOption(document.drop_list.Range,"Pressure Transmitters", "Pressure Transmitters");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}
if(document.drop_list.Diameter.value == 'Liquid Level and Flow'){
addOption(document.drop_list.Range,"Tank contents Gauges (Hydrostatic)", "Tank contents Gauges (Hydrostatic)");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}
if(document.drop_list.Diameter.value == 'Temperature'){
addOption(document.drop_list.Range,"Dial Thermometers Rigid Stem", "Dial Thermometers Rigid Stem");
addOption(document.drop_list.Range,"Dial Thermometers Distance Reading", "Dial Thermometers Distance Reading");
addOption(document.drop_list.Range,"Thermowells/Pockets", "Thermowells/Pockets");
addOption(document.drop_list.Range,"Digital Display Thermometers", "Digital Display Thermometers");
addOption(document.drop_list.Range,"Hand Held Digital Display Thermometers", "Hand Held Digital Display Thermometers");
addOption(document.drop_list.Range,"Thermocouple/RTD", "Thermocouple/RTD");
addOption(document.drop_list.Range,"Type K Thermocouples", "Type K Thermocouples");
addOption(document.drop_list.Range,"Other (Specify below)", "Other (Specify below)");
}
if(document.drop_list.Diameter.value == 'Accessories'){
addOption(document.drop_list.Range,"Electrical Contacts", "Electrical Contacts");
addOption(document.drop_list.Range,"Accessories/Adapters", "Accessories/Adapters");
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 == 'Test Equipment'){
addOption(document.drop_list.Range,"Calibration Equipment Technical Data", "Calibration Equipment Technical Data");
addOption(document.drop_list.Range,"Hand Held Calibration Pumps", "Hand Held Calibration Pumps");
addOption(document.drop_list.Range,"Comparison Testers", "Comparison Testers");
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,"Deadweight Recertification/Refurbishment", "Deadweight Recertification/Refurbishment");
addOption(document.drop_list.Range,"On Site Calibration", "On Site 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);
}


