
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list.Category, "Nursing", "Nursing", "");
addOption(document.drop_list.Category, "Laboratory", "Laboratory", "");
addOption(document.drop_list.Category, "Pharmacy", "Pharmacy", "");
addOption(document.drop_list.Category, "Radiology", "Radiology", "");
addOption(document.drop_list.Category, "Radiation Oncology", "Radiation Oncology", "");
addOption(document.drop_list.Category, "Rehabilitation", "Rehabilitation", "");
addOption(document.drop_list.Category, "Respiratory", "Respiratory", "");
addOption(document.drop_list.Category, "Other", "Other", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat);
addOption(document.drop_list.SubCat, "SPECIALTY", "SPECIALTY", "");

if(document.drop_list.Category.value == 'Nursing'){
addOption(document.drop_list.SubCat,"Cath Lab/Dialysis", "Cath Lab/Dialysis");
addOption(document.drop_list.SubCat,"Case Mgmt.", "Case Mgmt.");
addOption(document.drop_list.SubCat,"ER", "ER");
addOption(document.drop_list.SubCat,"Endoscopy", "Endoscopy");
addOption(document.drop_list.SubCat,"Home Healthcare", "Home Healthcare");
addOption(document.drop_list.SubCat,"ICU/CCU", "ICU/CCU");
addOption(document.drop_list.SubCat,"Labor & Delivery", "Labor & Delivery");
addOption(document.drop_list.SubCat,"Long Term Care", "Long Term Care");
addOption(document.drop_list.SubCat,"Medical Surgical", "Medical Surgical");
addOption(document.drop_list.SubCat,"Nurse Educator", "Nurse Educator");
addOption(document.drop_list.SubCat,"OB/GYN", "OB/GYN");
addOption(document.drop_list.SubCat,"OR", "OR");
addOption(document.drop_list.SubCat,"PACU", "PACU");
addOption(document.drop_list.SubCat,"Pediatric", "Pediatric");
addOption(document.drop_list.SubCat,"Post Partum", "Post Partum");
addOption(document.drop_list.SubCat,"Psychiatric", "Psychiatric");
addOption(document.drop_list.SubCat,"Telemetry", "Telemetry");
addOption(document.drop_list.SubCat,"Utilization Review", "Utilization Review");

}
if(document.drop_list.Category.value == 'Laboratory'){
addOption(document.drop_list.SubCat,"Histology Tech", "Histology Tech");
addOption(document.drop_list.SubCat,"Medical Technologist", "Medical Technologist");

}
if(document.drop_list.Category.value == 'Pharmacy'){
addOption(document.drop_list.SubCat,"Pharmacy Tech", "Pharmacy Tech");
addOption(document.drop_list.SubCat,"Pharmacist", "Pharmacist");
}
if(document.drop_list.Category.value == 'Radiology'){
addOption(document.drop_list.SubCat,"CT Tech", "CT Tech");
addOption(document.drop_list.SubCat,"MRI Tech", "MRI Tech");
addOption(document.drop_list.SubCat,"Mammography Tech", "Mammography Tech");
addOption(document.drop_list.SubCat,"Nuclear Medicine Tech", "Nuclear Medicine Tech");
addOption(document.drop_list.SubCat,"Special Procedures/Cath Lab", "Special Procedures/Cath Lab");
addOption(document.drop_list.SubCat,"Ultra/Echo/Vasc Tech", "Ultra/Echo/Vasc Tech");
addOption(document.drop_list.SubCat,"X-Ray Tech", "X-Ray Tech");
}

if(document.drop_list.Category.value == 'Radiation Oncology'){
addOption(document.drop_list.SubCat,"Dosimetrist", "Dosimetrist");
addOption(document.drop_list.SubCat,"Radiation Therapist", "Radiation Therapist");
addOption(document.drop_list.SubCat,"Physicist", "Physicist");
}

if(document.drop_list.Category.value == 'Rehabilitation'){
addOption(document.drop_list.SubCat,"Occupational Therapist", "Occupational Therapist");
addOption(document.drop_list.SubCat,"Occupational Therapy Asst.", "Occupational Therapy Asst.");
addOption(document.drop_list.SubCat,"Physical Therapist", "Physical Therapist");
addOption(document.drop_list.SubCat,"Physical Therapy Asst.", "Physical Therapy Asst.");
addOption(document.drop_list.SubCat,"Speech Therapist", "Speech Therapist");
}

if(document.drop_list.Category.value == 'Respiratory'){
addOption(document.drop_list.SubCat,"Sleep Tech", "Sleep Tech");
addOption(document.drop_list.SubCat,"Respiratory Therapist", "Respiratory Therapist");
}

if(document.drop_list.Category.value == 'Other'){
addOption(document.drop_list.SubCat,"CVOR Tech", "CVOR Tech");
addOption(document.drop_list.SubCat,"EEG/EKG Tech", "EEG/EKG Tech");
addOption(document.drop_list.SubCat,"Nurse Practitioner", "Nurse Practitioner");
addOption(document.drop_list.SubCat,"Physician Assistant", "Physician Assistant");
addOption(document.drop_list.SubCat,"Sterile Processing Tech", "Sterile Processing Tech");
addOption(document.drop_list.SubCat,"Surgical Tech", "Surgical Tech");

}

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

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);
}
