function clearDynaList(oList){
	for (var i = oList.options.length; i >= 0; i--){
		oList.options[i] = null;
	}
	oList.selectedIndex = -1;
}
function populateDynaList(oList, aArray, sdefCName){
	var iSelectedIndex = 0;
	for (var i = 0; i < aArray.length; i++){
		if (i==0) 
			oList.options[oList.options.length] = new Option(aArray[i], "");
		else		
			oList.options[oList.options.length] = new Option(aArray[i], aArray[i]);

		if (aArray[i] == sdefCName){
			iSelectedIndex = i;
		}
	}
	if (oList.options.length == 0){
		oList.options[oList.options.length] = new Option("[none available]",0);
	}
	oList.selectedIndex = iSelectedIndex;
	return iSelectedIndex;
}