
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.form1.Category, "Cardiology", "Cardiology", "");
addOption(document.form1.Category, "Cardaic Surgeon", "Cardaic Surgeon", "");
addOption(document.form1.Category, "Paediatric Cardiologist", "Paediatric Cardiologist", "");
addOption(document.form1.Category, "Pulmonologist", "Pulmonologist", "");
addOption(document.form1.Category, "Diabetologist", "Diabetologist", "");
addOption(document.form1.Category, "Psychologist", "Psychologist", "");
addOption(document.form1.Category, "Pulmonologist", "Pulmonologist", "");
addOption(document.form1.Category, "Endocrinologist", "Endocrinologist", "");
addOption(document.form1.Category, "Physiatrist", "Physiatrist", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.form1.SubCat);
addOption(document.form1.SubCat, "", "Select Doctor from List Below", "");

if(document.form1.Category.value == 'Cardiology'){
addOption(document.form1.SubCat,"---Full Timer Cardiologist ---", "---Full Timer Cardiologist ---");
addOption(document.form1.SubCat,"Dr. Anil Mishra", "Dr. Anil Mishra");
addOption(document.form1.SubCat,"Dr. D. Kahali", "Dr. D. Kahali");
addOption(document.form1.SubCat,"Dr. T. K. Praharaj", "Dr. T. K. Praharaj");
addOption(document.form1.SubCat,"Dr. S. Dutta", "Dr. S. Dutta");
addOption(document.form1.SubCat,"---Visiting Cardiologist ---", "---Visiting Cardiologist ---");
addOption(document.form1.SubCat,"Dr. P.S. Banerjee", "Dr. P.S. Banerjee");
addOption(document.form1.SubCat,"Dr. T. D. Bhattacharya", "Dr. T. D. Bhattacharya");
addOption(document.form1.SubCat,"DR. A. A. BHOWMIC", "DR. A. A. BHOWMIC");
addOption(document.form1.SubCat,"Dr. ARUP DAS BISWAS", "Dr. ARUP DAS BISWAS");
addOption(document.form1.SubCat,"DR. D. S. CHOPRA", "DR. D. S. CHOPRA");
addOption(document.form1.SubCat,"DR. MAHESH CHOWDHURY", "DR. MAHESH CHOWDHURY");
addOption(document.form1.SubCat,"DR. M. K. DAS", "DR. M. K. DAS");
addOption(document.form1.SubCat,"DR N. B. DAS", "DR N. B. DAS");
addOption(document.form1.SubCat,"DR. ASHOK DHAR", "DR. ASHOK DHAR");
addOption(document.form1.SubCat,"DR. SIBANANDA DUTTA", "DR. SIBANANDA DUTTA");
addOption(document.form1.SubCat,"PROF. DR. A. L. DUTTA", "PROF. DR. A. L. DUTTA");
addOption(document.form1.SubCat,"DR AZIZUL HAQUE", "DR AZIZUL HAQUE");
addOption(document.form1.SubCat,"PROF. DR. A. K. KAR", "PROF. DR. A. K. KAR");
addOption(document.form1.SubCat,"DR. BISWAKESH MAJUMDER", "DR. BISWAKESH MAJUMDER");
addOption(document.form1.SubCat,"DR A. MALPANI", "DR A. MALPANI");
addOption(document.form1.SubCat,"DR. B. P. PANDEY", "DR. B. P. PANDEY");
addOption(document.form1.SubCat,"PROF. DR. MANOTOSH PANJHA", "PROF. DR. MANOTOSH PANJHA");
addOption(document.form1.SubCat,"DR. SAUMITRA RAY", "DR. SAUMITRA RAY");
addOption(document.form1.SubCat,"DR. J. C. SHARMA", "DR. J. C. SHARMA");
addOption(document.form1.SubCat,"DR. K. K. H. SIDDIQUE", "DR. K. K. H. SIDDIQUE");
addOption(document.form1.SubCat,"DR. S. GHOSH", "DR. S. GHOSH");
addOption(document.form1.SubCat,"DR. R. P. VIDHWAN", "DR. R. P. VIDHWAN");

}
if(document.form1.Category.value == 'Cardaic Surgeon'){
addOption(document.form1.SubCat,"---Ful timer Consultants---", "---Full timer Consultants---");
addOption(document.form1.SubCat,"Dr. Lalit Kapoor", "Dr. Lalit Kapoor");
addOption(document.form1.SubCat,"Dr. Ajay Kaul", "Dr. Ajay Kaul");
addOption(document.form1.SubCat,"Dr. Sushan Mukhopadhayay", "Dr. Sushan Mukhopadhayay");
addOption(document.form1.SubCat,"Dr. Bhabatosh Biswas", "Dr. Bhabatosh Biswas");

}
if(document.form1.Category.value == 'Paediatric Cardiologist'){
addOption(document.form1.SubCat,"Dr. A. Sarkar", "Dr. A. Sarkar");
addOption(document.form1.SubCat,"Dr. S. Mondal", "Dr. S. Mondal");
}
if(document.form1.Category.value == 'Pulmonologist'){
addOption(document.form1.SubCat,"Dr. Pawan Agarwal", "Dr. Pawan Agarwal");
addOption(document.form1.SubCat,"Dr. R. K. Das", "Dr. R. K. Das");
}
if(document.form1.Category.value == 'Diabetologist'){
addOption(document.form1.SubCat,"Dr. Subhasish Chatterjee", "Dr. Subhasish Chatterjee");
}
if(document.form1.Category.value == 'Psychologist'){
addOption(document.form1.SubCat,"Dr. Anuradha Das", "Dr. Anuradha Das");
}
if(document.form1.Category.value == 'Endocrinologist'){
addOption(document.form1.SubCat,"Dr. S. Gopalka", "Dr. S. Gopalka");
addOption(document.form1.SubCat,"Dr. Sudip Mukherjee", "Dr. Sudip Mukherjee");
addOption(document.form1.SubCat,"Dr. V. K. Kejriwal", "Dr. V. K. Kejriwal");
addOption(document.form1.SubCat,"Dr. R. K. Saraogi", "Dr. R. K. Saraogi");
}
if(document.form1.Category.value == 'Physiatrist'){
addOption(document.form1.SubCat,"Dr. M. H. Sanwarwalla", "Dr. M. H. Sanwarwalla");
}
}
////////////////// 

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);
}

