function setSelectIndexByValue(selectId, selectValue) {

	s = document.getElementById(selectId);
	options = s.options;

	var i=0;
	for (i=0; i<options.length; i++) {
		val = options[i];
		if (selectValue == val) {
			targetIndex = i;
			break;
		}
	}	
	
	s.selectedIndex = i;
}

function getSelectIndexByValue(selectId, selectValue) {

	s = document.getElementById(selectId);
	options = s.options;

	var i=0;
	var targetIndex=0;

	for (i=0; i<options.length; i++) {
		val = options[i].value;
		if (selectValue == val) {
			targetIndex = i;
			break;
		}
	}	
	return(targetIndex);
}
