function removeOptions(selectObj) {
	if (typeof selectObj != 'object') {
		selectObj = document.getElementById(selectObj);
	}
	var len = selectObj.options.length;
	for ( var i = 0; i < len; i++) {
		selectObj.options[0] = null;
	}
}
function setSelectOption(selectObj, optionList, firstOption, selected) {
	if (typeof selectObj != 'object') {
		selectObj = document.getElementById(selectObj);
	}
	removeOptions(selectObj);
	var start = 0;
	if (firstOption) {
		selectObj.options[0] = new Option(firstOption, '0');
		start++;
	}
	var len = optionList.length;
	for ( var i = 0; i < len; i++) {
		selectObj.options[start] = new Option(optionList[i].txt,
				optionList[i].val);
		if (selected == optionList[i].val) {
			selectObj.options[start].selected = true;
		}
		start++;
	}
}