function prod_check()
{
if (document.getElementById("Category").value == "-1")
{
alert("Please Select Category");
return false;
}
else if (document.getElementById("Product").value == "-1")
{
alert("Please Select Product");
return false;
}
else
{
if(document.getElementById("Category").value =='Vacuum Components' && document.getElementById("Product").value == 'Vacuum Pumps')
{
window.location='Rotary Vane Pump.html';
}
else if(document.getElementById("Category").value =='Vacuum Components' && document.getElementById("Product").value == 'Vacuum Gauges')
{
window.location='inconvenience_pg.html';
}
else if(document.getElementById("Category").value =='Vacuum Components' && document.getElementById("Product").value == 'Leak detectors')
{
window.location='Other leak detection applications.html';
}
else if(document.getElementById("Category").value =='Vacuum Components' && document.getElementById("Product").value == 'Vacuum Valves')
{
window.location='inconvenience_pg.html';
}
else if(document.getElementById("Category").value =='Vacuum Components' && document.getElementById("Product").value == 'Electrostatic Filter')
{
window.location='electrostatic-filters.html';
}

else if(document.getElementById("Category").value =='Vacuum Equipments' && document.getElementById("Product").value == 'Helium leak system for mass production')
{
window.location='heat-pump_new.html';
}
else if(document.getElementById("Category").value =='Vacuum Equipments' && document.getElementById("Product").value == 'Vacuum Furnace')
{
window.location='inconvenience_pg.html';
}
else if(document.getElementById("Category").value =='Vacuum Equipments' && document.getElementById("Product").value == 'Other Equipments')
{
window.location='inconvenience_pg.html';
}
}

}

function display_dropdown_products()
{
if (document.getElementById("Category").value == "Vacuum Components")
{
display_dropdown_components();	
}
else if (document.getElementById("Category").value == "Vacuum Equipments")
{
display_dropdown_equipments();	
}
else
{
while(document.getElementById("Product").options.length>0)
{
document.getElementById("Product").options[0] = null;
}
addOption(document.getElementById("Product"), "------Select Category First------","-1");	
document.getElementById("Product").disabled = true;		
}
}

function display_dropdown_components()
{
document.getElementById("Product").disabled = false;	
while(document.getElementById("Product").options.length>0)
{
document.getElementById("Product").options[0] = null;
}
addOption(document.getElementById("Product"), "------Select Product------","-1");	
addOption(document.getElementById("Product"), "Vacuum Pumps","Vacuum Pumps");
addOption(document.getElementById("Product"), "Vacuum Gauges","Vacuum Gauges");
addOption(document.getElementById("Product"), "Leak detectors","Leak detectors");
addOption(document.getElementById("Product"), "Vacuum Valves","Vacuum Valves");
addOption(document.getElementById("Product"), "Electrostatic Filter","Electrostatic Filter");	
}

function display_dropdown_equipments()
{
document.getElementById("Product").disabled = false;	
while(document.getElementById("Product").options.length>0)
{
document.getElementById("Product").options[0] = null;
}
addOption(document.getElementById("Product"), "------Select Product------","-1");
addOption(document.getElementById("Product"), "Helium leak system for mass production","Helium leak system for mass production");
addOption(document.getElementById("Product"), "Vacuum Furnace","Vacuum Furnace");
addOption(document.getElementById("Product"), "Other Equipments","Other Equipments");
}

function addOption(selectbox,text,value )
{
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
selectbox.options.add(optn);
}
