
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.router.assessment, "spq","SPQ","");
addOption(document.router.assessment, "sspa","SSPA","");
addOption(document.router.assessment, "jsi","JSI","");
addOption(document.router.assessment, "csi","CSI","");
addOption(document.router.assessment, "mpq","MPQ","");
addOption(document.router.assessment, "rpm","RPM","");
addOption(document.router.assessment, "lnq","LNQ","");
}

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

removeAllOptions(document.router.lang);
addOption(document.router.lang, "", "Select", "");

if(document.router.assessment.value == 'spq'){
addOption(document.router.lang,"da","Danish" );
addOption(document.router.lang,"du","Dutch" );
addOption(document.router.lang,"english","English-American");
addOption(document.router.lang,"ae","English-Anglicised" );
addOption(document.router.lang,"fi","Finnish" );
addOption(document.router.lang,"fc","French-Canadian");
addOption(document.router.lang,"fr","French-Parisian");
addOption(document.router.lang,"nw","Norwegian");
addOption(document.router.lang,"sp","Spanish-Castilion" );
addOption(document.router.lang,"sw","Swedish" );
}

if(document.router.assessment.value == 'sspa'){
addOption(document.router.lang,"english","English-American");
addOption(document.router.lang,"sw","Swedish" );
}
if(document.router.assessment.value == 'jsi'){
addOption(document.router.lang,"english","English-American");
addOption(document.router.lang,"sw","Swedish" );
}
if(document.router.assessment.value == 'csi'){
addOption(document.router.lang,"english","English-American");
addOption(document.router.lang,"sw","Swedish" );
}
if(document.router.assessment.value == 'mpq'){
addOption(document.router.lang,"english","English-American");
}
if(document.router.assessment.value == 'rpm'){
addOption(document.router.lang,"english","English-American");
}
if(document.router.assessment.value == 'lnq'){
addOption(document.router.lang,"english","English-American");
addOption(document.router.lang,"sw","Swedish" );
}

// Disable the submit button
{document.getElementById("btn_begin").disabled = true;
}

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

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

