
function fillCategory(){ 
 // this function is used to fill the category list on load
 //Rads Says first is the VALUE then the DISPLAY NAME
addOption(document.drop_list.Category, "Nelson Mandela Metropolitan University", "Nelson Mandela Metropolitan University", "");
addOption(document.drop_list.Category, "North West University", "North West University", "");
addOption(document.drop_list.Category, "Rhodes University", "Rhodes University", "");
addOption(document.drop_list.Category, "University of Cape Town", "University of Cape Town", "");
addOption(document.drop_list.Category, "University of Fort Hare", "University of Fort Hare", "");
addOption(document.drop_list.Category, "University of Free State", "University of Free State", "");
addOption(document.drop_list.Category, "University of Johannesburg", "University of Johannesburg", "");
addOption(document.drop_list.Category, "University of KwaZulu-Natal", "University of KwaZulu-Natal", "");
addOption(document.drop_list.Category, "University of South Africa (UNISA)", "University of South Africa (UNISA)", "");
addOption(document.drop_list.Category, "University of Stellenbosch", "University of Stellenbosch", "");
addOption(document.drop_list.Category, "University of Pretoria", "University of Pretoria", "");
addOption(document.drop_list.Category, "University of the Western Cape", "University of the Western Cape", "");
addOption(document.drop_list.Category, "University of the Witwatersrand", "University of the Witwatersrand", "");
addOption(document.drop_list.Category, "Other", "Other", "");
}

function SelectSubCat(){
// ON selection of category this function will work
 //Rads Says first is the VALUE then the DISPLAY NAME

removeAllOptions(document.drop_list.SubCat);
addOption(document.drop_list.SubCat, "", "-- Please Select --", "");

if(document.drop_list.Category.value == 'Nelson Mandela Metropolitan University'){
addOption(document.drop_list.SubCat,"B Com (Accounting for Chartered Accountants)", "B Com (Accounting for Chartered Accountants)");
addOption(document.drop_list.SubCat,"B Com (Rationum)", "B Com (Rationum)");
addOption(document.drop_list.SubCat,"B Com Hons (Accounting)", "B Com Hons (Accounting)");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'North West University'){
addOption(document.drop_list.SubCat,"B Com (Chartered Accountancy)", "B Com (Chartered Accountancy)");
addOption(document.drop_list.SubCat,"B Com (Accounting – professional stream)", "B Com (Accounting – professional stream)");
addOption(document.drop_list.SubCat,"B Comm Hons (Chartered Accountancy)", "B Comm Hons (Chartered Accountancy)", "");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'Rhodes University'){
addOption(document.drop_list.SubCat,"B Com / B Com(Accounting)", "B Com / B Com(Accounting)");
addOption(document.drop_list.SubCat,"Postgraduate Diploma in Accounting (PGDA)", "Postgraduate Diploma in Accounting (PGDA)");
addOption(document.drop_list.SubCat,"B Acc", "B Acc");
addOption(document.drop_list.SubCat,"B Com Hons (Financial Accounting)", "B Com Hons (Financial Accounting)");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of Cape Town'){
addOption(document.drop_list.SubCat,"B Com Financial Accounting (CA stream)", "B Com Financial Accounting (CA stream)");
addOption(document.drop_list.SubCat,"B Bus Sci Finance (CA stream)", "B Bus Sci Finance (CA stream)");
addOption(document.drop_list.SubCat,"Postgraduate Diploma in Management (Accounting conversion)", "Postgraduate Diploma in Management (Accounting conversion)");
addOption(document.drop_list.SubCat,"Postgraduate Diploma in Management (Financial Accounting)", "Postgraduate Diploma in Management (Financial Accounting)");
addOption(document.drop_list.SubCat,"Postgraduate Diploma in Accounting (PGDA)", "Postgraduate Diploma in Accounting (PGDA)");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of Fort Hare'){
addOption(document.drop_list.SubCat,"B Acc", "B Acc");
addOption(document.drop_list.SubCat,"B Com (Accounting)", "B Com (Accounting)");
addOption(document.drop_list.SubCat,"Postgraduate Diploma in Accounting (PGDA) (Preliminary)", "Postgraduate Diploma in Accounting (PGDA) (Preliminary)");
addOption(document.drop_list.SubCat,"Postgraduate Diploma in Accounting (PGDA)", "Postgraduate Diploma in Accounting (PGDA)");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of Free State'){
addOption(document.drop_list.SubCat,"B Acc", "B Acc");
addOption(document.drop_list.SubCat,"B Com Hons (Accounting)", "B Com Hons (Accounting)");
addOption(document.drop_list.SubCat,"B Acc Hons", "B Acc Hons");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of Johannesburg'){
addOption(document.drop_list.SubCat,"B Com (Accounting)", "B Com (Accounting)");
addOption(document.drop_list.SubCat,"Bridging Certificate in the Theory of Accounting (BCTA)", "Bridging Certificate in the Theory of Accounting (BCTA)");
addOption(document.drop_list.SubCat,"B Com (Chartered Accountancy) Hons", "B Com (Chartered Accountancy) Hons");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of KwaZulu-Natal'){
addOption(document.drop_list.SubCat,"B Com (Accounting)", "B Com (Accounting)");
addOption(document.drop_list.SubCat,"B Com Hons (Accounting)", "B Com Hons (Accounting)");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of South Africa (UNISA)'){
addOption(document.drop_list.SubCat,"BCompt (Bachelor of Accounting Science)", "BCompt (Bachelor of Accounting Science)");
addOption(document.drop_list.SubCat,"Postgraduate Diploma in Accounting Sciences (for entry into Hons BCompt)", "Postgraduate Diploma in Accounting Sciences (for entry into Hons BCompt)");
addOption(document.drop_list.SubCat,"Hons BCompt", "Hons BCompt");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of Stellenbosch'){
addOption(document.drop_list.SubCat,"B Acc", "B Acc");
addOption(document.drop_list.SubCat,"B Acc LLB (Admitted to Hons after completion of BAcc & LLB)", "B Acc LLB (Admitted to Hons after completion of BAcc & LLB)");
addOption(document.drop_list.SubCat,"B Acc Hons", "B Acc Hons");
addOption(document.drop_list.SubCat,"Postgraduate Diploma in Accounting", "Postgraduate Diploma in Accounting");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of Pretoria'){
addOption(document.drop_list.SubCat,"B Com (Accounting Sciences)", "B Com (Accounting Sciences)");
addOption(document.drop_list.SubCat,"B Com Hons (Accounting Sciences)", "B Com Hons (Accounting Sciences)");
addOption(document.drop_list.SubCat,"Certificate in the Theory of Accountancy (CTA)", "Certificate in the Theory of Accountancy (CTA)");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of the Western Cape'){
addOption(document.drop_list.SubCat,"B Com (Accounting)", "B Com (Accounting) ");
addOption(document.drop_list.SubCat,"B Com Hons (Accounting)", "B Com Hons (Accounting)");
addOption(document.drop_list.SubCat,"Other", "Other");
}
if(document.drop_list.Category.value == 'University of the Witwatersrand'){
addOption(document.drop_list.SubCat,"B Acc Sci", "B Acc Sci ");
addOption(document.drop_list.SubCat,"HDip Acc", "HDip Acc");
addOption(document.drop_list.SubCat,"B Acc Sc (Hons)", "B Acc Sc (Hons)");
addOption(document.drop_list.SubCat,"Other", "Other");
}

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

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