var nowOpenedSelectBox = ""; var mousePosition = ""; function selectThisValue(thisId,thisIndex,thisValue,thisString) { var objId = thisId; var nowIndex = thisIndex; var valueString = thisString; var sourceObj = document.getElementById(objId); var nowSelectedValue = document.getElementById(objId+"SelectBoxOptionValue"+nowIndex).value; hideOptionLayer(objId); if (sourceObj) sourceObj.value = nowSelectedValue; settingValue(objId,valueString); selectBoxFocus(objId); if (sourceObj.onchange) sourceObj.onchange(); } function settingValue(thisId,thisString) { var objId = thisId; var valueString = thisString; var selectedArea = document.getElementById(objId+"selectBoxSelectedValue"); if (selectedArea) { if(navigator.appName.indexOf("Explorer") > -1) selectedArea.innerText = valueString; else selectedArea.textContent = valueString; } } function viewOptionLayer(thisId) { var objId = thisId; var optionLayer = document.getElementById(objId+"selectBoxOptionLayer"); if (optionLayer) optionLayer.style.display = ""; nowOpenedSelectBox = objId; setMousePosition("inBox"); } function hideOptionLayer(thisId) { var objId = thisId; var optionLayer = document.getElementById(objId+"selectBoxOptionLayer"); if (optionLayer) optionLayer.style.display = "none"; } function setMousePosition(thisValue) { var positionValue = thisValue; mousePosition = positionValue; } function clickMouse() { if (mousePosition == "out") hideOptionLayer(nowOpenedSelectBox); } function selectBoxFocus(thisId) { var objId = thisId; var obj = document.getElementById(objId + "selectBoxSelectedValue"); obj.className = "selectBoxSelectedAreaFocus"; obj.focus(); } function selectBoxBlur(thisId) { var objId = thisId; var obj = document.getElementById(objId + "selectBoxSelectedValue"); obj.className = "selectBoxSelectedArea"; } function makeSelectBox(thisId, imgsrc) { var downArrowSrc = imgsrc + "images/down.gif"; var downArrowSrcWidth = 16; var optionHeight = 16; var optionMaxNum = 8; var optionInnerLayerHeight = ""; var objId = thisId; var obj = document.getElementById(objId); var selectBoxWidth = parseInt(obj.style.width); var selectBoxHeight = parseInt(obj.style.height); if (obj.options.length > optionMaxNum) optionInnerLayerHeight = "height:"+ (optionHeight * optionMaxNum) + "px"; newSelect = "