document.title = "Global Standard KEB";

/***********************************************************************************
**** Left Menu Script **************************************************************
**** Start **************************************************************************
************************************************************************************/
function leftMenuOnOff(mMode) {
	var source = event.srcElement;
	if (typeof(source.mouseAction) == "undefined") return;
	if (source.mouseAction == "false") return;
	leftMenuBulletOnOff(source.id,mMode);
}

function leftMenuBulletOnOff(objId,mMode) {
	var obj = document.getElementById("cursor_" + objId);	// 4µª½º ¸Þ´º Ä¿¼­
	if (obj) obj.src = getThisSrc(obj.src,mMode);
	var obj = document.getElementById("bu_" + objId);	// 5µª½º ¸Þ´º ºÒ¸´
	if (obj) obj.src = getThisSrc(obj.src,mMode);
}

function setLeftMenu() {
	var dirArray = nowFilePath.split('/');
	for (i = 1; i < dirArray.length; i++) {
		var prevDir = dirArray[i-1];
		var nowDir = dirArray[i];
		if (prevDir.indexOf('IBS') < 0 && nowDir.indexOf('IBS') < 0 && nowDir.indexOf('.jsp') < 0) {
			var thisLeftMenuId = prevDir+"_"+nowDir;
			var obj = document.getElementById(thisLeftMenuId);
			var objSub = document.getElementById("leftSub_"+thisLeftMenuId);
			if (obj) {
				if (objSub) objSub.style.display = "";
				leftMenuBulletOnOff(thisLeftMenuId,'on');
				obj.innerHTML = "<span>" + obj.innerHTML + "</span>";
				obj.mouseAction = "false";
			}
		}
	}
}

/***********************************************************************************
**** Left Menu Script **************************************************************
**** End ***************************************************************************
************************************************************************************/


/****** ÆË¾÷Ã¢ ¿ÀÇÂ **************************************************************/
function popOpen(thisURL,thisName) {
	var positionX = 0;
	var positionY = 0;
	//var positionX = (screen.width-400)/2;
	//var positionY = (screen.height-250)/2;
	var thisPopupName = "";
	if (thisName != null && thisName != "") thisPopupName = thisName;
	window.open(thisURL, thisPopupName,"left="+positionX+",top="+positionY+",width=400,height=250,toolbar=no,scrollbars=no,resizable=yes" );
}

/****** ÆË¾÷Ã¢ ¸®»çÀÌÁî **************************************************************/
function popResize() {
	var thisX = document.getElementById("offsetTable").offsetWidth;
	var thisY = document.getElementById("offsetTable").offsetHeight;
	var headerY = document.getElementById("offsetTableHeader").offsetHeight;
	var footerY = document.getElementById("offsetTableFooter").offsetHeight;
	var maxThisX = screen.width - 50;
	var maxThisY = screen.height - 80;
	var marginY = headerY + footerY + 20; //¸¶Áö¸· ¼ö´Â »óÈ²¿¡µû¶ó ¾Ë¸Â°Ô ³ÖÀ¸¼¼¿ä. (ÅÛÇÃ¸´ÀÇ Çì´õ³ôÀÌ + Ç²ÅÍ ³ôÀÌ + ¾ËÆÄ)
	var scrollbarValue = "no";
	if (thisX > maxThisX) {
		scrollbarValue = "yes";
		thisX = maxThisX;
	}
	if (thisY > maxThisY - marginY) {
		scrollbarValue = "yes";
		thisX += 19;
		thisY = maxThisY - marginY;
	}
	window.document.body.scroll = scrollbarValue;
	window.resizeTo(thisX+10,thisY+marginY);
	
	var windowX = (screen.width - (thisX+10))/2;
	var windowY = (screen.height - (thisY+marginY))/2 - 20;
	//window.moveTo(windowX,windowY);
	window.moveTo(0,0);
}


/****** µð½ºÇÃ·¹ÀÌ ÄÁÆ®·Ñ **************************************************************/
function setDisplay(objName,status) {
	var obj = document.all[objName];
	if (obj) {
		if (status == 'on') obj.style.display = "";
		if (status == 'off') obj.style.display = "none";
	}
}


/****** 4/5µª½º Å¸ÀÌÆ² »Ñ·ÁÁÖ´Â ÇÔ¼ö ***************************************************/
function makeDetailTitle(nowPart,imgUrl,thisTableWidth) {
	if (thisTableWidth == null || thisTableWidth == "") thisTableWidth = "590";
	var titleImageHTML = ""
	titleImageHTML += "<table cellpadding='0' cellspacing='0' border='0' width='" + thisTableWidth + "'>"
	titleImageHTML += "	<tr>"
	titleImageHTML += "		<td>"
	titleImageHTML += "		<table cellpadding='0' cellspacing='0' border='0' width='100%'>"
	titleImageHTML += "			<tr>"
	titleImageHTML += "				<td valign='top'><img src='/english/images/common/titles/" + nowPart + "_bar.gif' border='0' width='12'></td>"
	titleImageHTML += "				<td valign='top' width='99%'>"
	titleImageHTML += "				<table cellpadding='0' cellspacing='0' border='0' width='100%'>"
	titleImageHTML += "					<tr>"
	titleImageHTML += "						<td><img src='" + imgUrl + "' border='0'></td>"
	titleImageHTML += "					</tr>"
	titleImageHTML += "					<tr>"
	titleImageHTML += "						<td><img src='/english/images/common/titles/" + nowPart + "_text.gif' border='0'></td>"
	titleImageHTML += "					</tr>"
	titleImageHTML += "				</table>"
	titleImageHTML += "				</td>"
	titleImageHTML += "			</tr>"
	titleImageHTML += "		</table>"
	titleImageHTML += "		</td>"
	titleImageHTML += "	</tr>"
	titleImageHTML += "</table>"
	return document.write(titleImageHTML);
}


/****** Text Å¸ÀÌÆ² »Ñ·ÁÁÖ´Â ÇÔ¼ö ***************************************************/
function makeTextTitle(nowPart,titleText) {
	var textTitleHTML = ""
	textTitleHTML += "<table cellpadding='0' cellspacing='0' border='0' width='590'>"
	textTitleHTML += "	<tr>"
	textTitleHTML += "		<td>"
	textTitleHTML += "		<table cellpadding='0' cellspacing='0' border='0' width='100%'>"
	textTitleHTML += "			<tr>"
	textTitleHTML += "				<td valign='top'><img src='/english/images/common/titles/" + nowPart + "_bar_short.gif' border='0' width='12'></td>"
	textTitleHTML += "				<td valign='top' width='99%' class='textTitle'>" + titleText + "<span id='thisTextTitleSubArea'></span></td>"
	textTitleHTML += "			</tr>"
	textTitleHTML += "		</table>"
	textTitleHTML += "		</td>"
	textTitleHTML += "	</tr>"
	textTitleHTML += "</table>"
	return document.write(textTitleHTML);
}

/****** »óÇ° ÆäÀÌÁö ¸µÅ©¿ë ÇÔ¼ö ***************************************************/
function goGoods(thisPage, thisCmd, thisSeq, thisSname, thisB2b, thisPop, thisGb) {
	kLink("/english/IBS/"+thisPage+"?cmd="+thisCmd+"&seq="+thisSeq+"&sname="+thisSname+"&b2b="+thisB2b+"&pop="+thisPop+"&gb="+thisGb);
}


/***********************************************************************************
**** Image Tab Button On Off Script ************************************************
**** Start **************************************************************************
************************************************************************************/
var nowSelectedTab = "";
function setTabOn() {
	var obj = document.getElementById(nowSelectedTab);
	if (obj) {
		setTabMode(obj,"on");
		obj.style.zIndex = "5";
		setTabTd();
	}
}

function setTabTd() {
	var obj = document.getElementById(nowSelectedTab);
	var objTd = document.getElementById(nowSelectedTab+"Td");
	if (objTd) objTd.width = obj.width - 3;
	setTimeout("setTabTd()",10);
}

function setTabMode(obj,flag) {
	if (flag == "on") {
		obj.style.position = "absolute";
		obj.style.zIndex = "10"
	} else {
		obj.style.position = "static";
		obj.style.zIndex = "1"
	}
	obj.src = getThisSrc(obj.src,flag);
}

function getThisSrc(imgPath,flag) {	// ÁÂÃø¸Þ´º½ºÅ©¸³Æ®µµ °øÀ¯ÇÔ. ¼öÁ¤ ½Ã ÁÖÀÇÇØÁÖ¼¼¿ä.
	var imgPathLen = imgPath.length;
	var imgPathFlag = imgPath.lastIndexOf("/english/");
	var imgName = imgPath.substring(0,imgPathFlag+1);
	var fileType = imgPath.substring(imgPath.lastIndexOf("."),imgPathLen);
	var fileName = imgPath.substring(imgPathFlag+1,imgPath.lastIndexOf("_"));
	var nowImgUrl = imgName + fileName + "_" + flag + fileType;
	return nowImgUrl;
}
/***********************************************************************************
**** Image Tab Button On Off Script ************************************************
**** End **************************************************************************
************************************************************************************/


/***********************************************************************************
**** Text Tab Button On Off Script *************************************************
**** Start **************************************************************************
************************************************************************************/
function makeTextTab() {
	var thisGoodsNameArray = nowAllGoodsName.substring(0,nowAllGoodsName.length-1).split(';');
	var thisGoodsCodeArray = nowAllGoodsCode.substring(0,nowAllGoodsCode.length-1).split(';');
	var thisGoodsMaxNo = thisGoodsCodeArray.length;
	var nowRowMaxWidth = 550;
	var nowRowWidth = 0;
	var thisTabBrHTML = "";
	var thisTabSeparatorHTML = "";
	var thisTextTabHTML = "";
	
	thisTextTabHTML += "<table cellpadding='0' cellspacing='0' border='0' width='590'>";
	thisTextTabHTML += "	<tr>";
	thisTextTabHTML += "		<td><img src='/english/images/common/trans.gif' width='1' height='1' border='0'></td>";
	thisTextTabHTML += "		<td><img src='/english/images/common/trans.gif' width='586' height='1' border='0'></td>";
	thisTextTabHTML += "		<td><img src='/english/images/common/trans.gif' width='1' height='1' border='0'></td>";
	thisTextTabHTML += "		<td><img src='/english/images/common/trans.gif' width='2' height='1' border='0'></td>";
	thisTextTabHTML += "	</tr>";
	thisTextTabHTML += "	<tr>";
	thisTextTabHTML += "		<td bgcolor='#E5E5E5' colspan='3' height='1'></td>";
	thisTextTabHTML += "		<td bgcolor='#FFFFFF'></td>";
	thisTextTabHTML += "	</tr>";
	thisTextTabHTML += "	<tr>";
	thisTextTabHTML += "		<td bgcolor='#E5E5E5' height='1'></td>";
	thisTextTabHTML += "		<td bgcolor='#F9FAF9'></td>";
	thisTextTabHTML += "		<td bgcolor='#E5E5E5'></td>";
	thisTextTabHTML += "		<td bgcolor='#FFFFFF'></td>";
	thisTextTabHTML += "	</tr>";
	thisTextTabHTML += "	<tr>";
	thisTextTabHTML += "		<td bgcolor='#E5E5E5'></td>";
	thisTextTabHTML += "		<td bgcolor='#F9FAF9' style='padding:12px 0px 12px 15px;'>";
	
	for (i = 0; i < thisGoodsMaxNo; i++) {
		thisTextTabHTML += "		<table id='thisTabArea" + i + "' cellpadding='0' cellspacing='0' border='0' align='left'>";
		thisTextTabHTML += "			<tr>";
		thisTextTabHTML += "				<td height='1'></td>";
		thisTextTabHTML += "			</tr>";
		thisTextTabHTML += "			<tr>";
		if (thisGoodsCodeArray[i] == nowSelectedGoodsCode)
			thisTextTabHTML += "				<td class='textTab'><span style='white-space:nowrap;'><img src='/english/images/common/etc/textTab_bullet.gif' width='9' height='17' border='0' align='absmiddle'>" + thisGoodsNameArray[i] + "<span id='thisTabSeparator" + i + "'></span></span></td>";
		else
			thisTextTabHTML += "				<td class='textTab'><span style='white-space:nowrap;'><img src='/english/images/common/etc/textTab_bullet.gif' width='9' height='17' border='0' align='absmiddle'><a href='javascript:;' onclick='goNowSelectedGoods(\"" + thisGoodsCodeArray[i] + "\");return false;'>" + thisGoodsNameArray[i] + "</a><span id='thisTabSeparator" + i + "'></span></span></td>";
		thisTextTabHTML += "			</tr>";
		thisTextTabHTML += "		</table>";
		thisTextTabHTML += "		<span id='thisTabBr" + i + "'></span>";
		if (thisGoodsCodeArray[i] == nowSelectedGoodsCode) {
			var subTextObj = document.getElementById("thisTextTitleSubArea");
			if (subTextObj) subTextObj.innerHTML = "&nbsp; / " + thisGoodsNameArray[i];
		}
			
	}
	
	thisTextTabHTML += "		</td>";
	thisTextTabHTML += "		<td bgcolor='#E5E5E5'></td>";
	thisTextTabHTML += "		<td bgcolor='#EBEBEB'></td>";
	thisTextTabHTML += "	</tr>";
	thisTextTabHTML += "	<tr>";
	thisTextTabHTML += "		<td bgcolor='#E5E5E5' colspan='3' height='1'></td>";
	thisTextTabHTML += "		<td bgcolor='#EBEBEB'></td>";
	thisTextTabHTML += "	</tr>";
	thisTextTabHTML += "</table>";
	thisTextTabHTML += "<table cellpadding='0' cellspacing='0' border='0' width='590'>";
	thisTextTabHTML += "	<tr>";
	thisTextTabHTML += "		<td bgcolor='#FFFFFF'><img src='/english/images/common/trans.gif' width='2' height='2' border='0'></td>";
	thisTextTabHTML += "		<td bgcolor='#EBEBEB'><img src='/english/images/common/trans.gif' width='588' height='1' border='0'></td>";
	thisTextTabHTML += "	</tr>";
	thisTextTabHTML += "</table>";
	
	document.getElementById("thisTextTabArea").innerHTML = thisTextTabHTML;
	
	thisTabSeparatorHTML += "<img src='/english/images/common/etc/textTab_separator.gif' width='18' height='17' border='0' align='absmiddle'>";
	
	thisTabBrHTML += "		<table cellpadding='0' cellspacing='0' border='0' height='" + document.getElementById("thisTabArea0").offsetHeight + "'>";
	thisTabBrHTML += "			<tr>";
	thisTabBrHTML += "				<td></td>";
	thisTabBrHTML += "			</tr>";
	thisTabBrHTML += "		</table>";
	
	
	for (i = 0; i < thisGoodsMaxNo; i++) {
		nowRowWidth += document.getElementById("thisTabArea"+i).offsetWidth;
		if (nowRowWidth >= nowRowMaxWidth) {
			var obj = document.getElementById("thisTabBr"+(i-1));
			if (obj) obj.innerHTML = thisTabBrHTML;
			nowRowWidth = document.getElementById("thisTabArea"+i).offsetWidth;
		} else {
			var obj = document.getElementById("thisTabSeparator"+(i-1));
			if (obj) {
				obj.innerHTML = thisTabSeparatorHTML;
				nowRowWidth += document.getElementById("thisTabSeparator"+(i-1)).offsetWidth;
			}
		}
	}
}
/***********************************************************************************
**** Text Tab Button On Off Script *************************************************
**** End **************************************************************************
************************************************************************************/

/***********************************************************************************
**** 5Depth Menu make Script ******************************************************
**** Start **************************************************************************
************************************************************************************/
function makeLeftDepth5() {
	var thisMenuNameArray = nowAllMenuName.substring(0,nowAllMenuName.length-1).split(';');
	var thisMenuCodeArray = nowAllMenuCode.substring(0,nowAllMenuCode.length-1).split(';');
	var thisMenuMaxNo = thisMenuCodeArray.length;
	var thisLeftDepth5HTML = "";
	
	thisLeftDepth5HTML += "	<table cellpadding='0' cellspacing='0' border='0' width='125'>";
	thisLeftDepth5HTML += "		<tr>";
	thisLeftDepth5HTML += "			<td><img src='/english/images/common/trans.gif' width='7' height='1' border='0'></td>";
	thisLeftDepth5HTML += "			<td><img src='/english/images/common/trans.gif' width='118' height='1' border='0'></td>";
	thisLeftDepth5HTML += "		</tr>";
	for (i = 0; i < thisMenuMaxNo; i++) {
		if (thisMenuCodeArray[i] == nowSelectedMenuCode) {
			thisLeftDepth5HTML += "		<tr>";
			thisLeftDepth5HTML += "			<td valign='top'><img src='/english/images/common/include/left/bu_menu02_on.gif' border='0' class='bu_menu02' id='bu_depth5_" + thisMenuCodeArray[i] + "'></td>";
			thisLeftDepth5HTML += "			<td class='leftMenu02'><a href='javascript:goThisDepth5Menu(\"" + thisMenuCodeArray[i] + "\");' onfocus='this.blur()' mouseAction='false' id='depth5_" + thisMenuCodeArray[i] + "'><span>" + thisMenuNameArray[i] + "</span></a></td>";
			thisLeftDepth5HTML += "		</tr>";
			var historyAreaObject = document.getElementById("historyLastDepthArea");
			if (historyAreaObject) {
				var lastHistoryText;
				try {
					var thisMenuRealNameArray = nowAllMenuRealName.substring(0,nowAllMenuRealName.length-1).split(';');
					lastHistoryText = thisMenuRealNameArray[i];
				} catch(e) {
					lastHistoryText = thisMenuNameArray[i];
				} finally {
					historyAreaObject.innerHTML = "<b>" + lastHistoryText + "</b>";
				}
			}
		} else {
			thisLeftDepth5HTML += "		<tr>";
			thisLeftDepth5HTML += "			<td valign='top'><img src='/english/images/common/include/left/bu_menu02_off.gif' border='0' class='bu_menu02' id='bu_depth5_" + thisMenuCodeArray[i] + "'></td>";
			thisLeftDepth5HTML += "			<td class='leftMenu02'><a href='javascript:goThisDepth5Menu(\"" + thisMenuCodeArray[i] + "\");' onfocus='this.blur()' mouseAction='true' id='depth5_" + thisMenuCodeArray[i] + "'>" + thisMenuNameArray[i] + "</a></td>";
			thisLeftDepth5HTML += "		</tr>";
		}
	}
	thisLeftDepth5HTML += "		<tr>";
	thisLeftDepth5HTML += "			<td colspan='2' height='5'></td>";
	thisLeftDepth5HTML += "		</tr>";
	thisLeftDepth5HTML += "	</table>";
	
	var dirArray = nowFilePath.split('/');
	for (i = 1; i < dirArray.length; i++) {
		var prevDir = dirArray[i-1];
		var nowDir = dirArray[i];
		if (prevDir.indexOf('IBS') < 0 && nowDir.indexOf('IBS') < 0 && nowDir.indexOf('.jsp') < 0) {
			var thisLeftMenuId = prevDir+"_"+nowDir;
			var obj = document.getElementById("subMenuArea_"+thisLeftMenuId);
			if (obj) {
				obj.innerHTML = thisLeftDepth5HTML;
			}
		}
	}
}
/***********************************************************************************
**** 5Depth Menu make Script ******************************************************
**** End **************************************************************************
************************************************************************************/



/***********************************************************************************
**** Select Box Design Script ******************************************************
**** Start *************************************************************************
************************************************************************************/
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) selectedArea.innerHTML = valueString.replace("&","&amp;");
}

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 selectBoxOptionRefresh(thisId) {
	var optionHeight = 17; // option ÇÏ³ªÀÇ ³ôÀÌ
	var optionMaxNum = 6; // ÇÑ¹ø¿¡ º¸¿©Áö´Â optionÀÇ °¹¼ö
	var objId = thisId;
	var obj = document.getElementById(objId);
	var trgObj = document.getElementById(objId+"SelectBoxOptionArea");
	var newOption = "";
	
	newOption += "		<table cellpadding='0' cellspacing='0' border='0' width='100%' style='table-layout:fixed;word-break:break-all;'>";
	for (var i=0 ; i < obj.options.length ; i++) {
		var nowValue = obj.options[i].value;
		var nowText = obj.options[i].text;
		newOption += "			<tr>";
		newOption += "				<td height='" + optionHeight + "' class='selectBoxOption' onMouseOver=\"this.className='selectBoxOptionOver'\" onMouseOut=\"this.className='selectBoxOption'\" onClick=\"selectThisValue('"+ objId + "'," + i + ",'" + nowValue + "','" + nowText + "')\" style='cursor:hand;'>" + nowText + "</td>";
		newOption += "				<input type='hidden' id='"+ objId + "SelectBoxOptionValue" + i + "' value='" + nowValue + "'>";
		newOption += "			</tr>";
	}
	newOption += "		</table>";
	
	if(trgObj) {
		if (obj.options.length > optionMaxNum) trgObj.style.height = (optionHeight * optionMaxNum) + "px";
		else trgObj.style.height = (optionHeight * obj.options.length) + "px";
		trgObj.innerHTML = newOption;
		var haveSelectedValue = false;
		for (var i=0 ; i < obj.options.length ; i++) {
			if (obj.options[i].selected == true) {
				haveSelectedValue = true;
				settingValue(objId,obj.options[i].text);
			}
		}
		if (!haveSelectedValue) settingValue(objId,obj.options[0].text);
	}
}

function makeSelectBox01(thisId) {
	var downArrowSrc = "/english/images/common/etc/selectbox_bu01.gif";	//¿À¸¥ÂÊ È­»ìÇ¥ÀÌ¹ÌÁö
	var downArrowSrcWidth = 13;	//¿À¸¥ÂÊ È­»ìÇ¥ÀÌ¹ÌÁö width
	var optionHeight = 17; // option ÇÏ³ªÀÇ ³ôÀÌ
	var optionMaxNum = 6; // ÇÑ¹ø¿¡ º¸¿©Áö´Â optionÀÇ °¹¼ö
	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  = "<table id='" + objId + "selectBoxOptionLayer' cellpadding='0' cellspacing='0' border='0' style='position:absolute;z-index:100;display:none;' onMouseOver=\"viewOptionLayer('"+ objId + "')\" onMouseOut=\"setMousePosition('out')\">";
	newSelect += "	<tr>";
	newSelect += "		<td height='" + (selectBoxHeight - 1) + "' style='cursor:hand;' onClick=\"hideOptionLayer('"+ objId + "')\"></td>";
	newSelect += "	</tr>";
	newSelect += "	<tr>";
	newSelect += "		<td bgcolor='#CECEC7' style='padding:0px 1px 1px 1px'>";
	newSelect += "		<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
	newSelect += "			<tr>";
	newSelect += "				<td height='3' bgcolor='#FFFFFF'></td>";
	newSelect += "			</tr>";
	newSelect += "		</table>";
	newSelect += "		<div id='"+ objId + "SelectBoxOptionArea' class='selectBoxOptionInnerLayer' style='width:" + (selectBoxWidth-2) + "px;" + optionInnerLayerHeight + "'>";
	newSelect += "		<table cellpadding='0' cellspacing='0' border='0' width='100%' style='table-layout:fixed;word-break:break-all;'>";
	for (var i=0 ; i < obj.options.length ; i++) {
		var nowValue = obj.options[i].value;
		var nowText = obj.options[i].text;
		if (nowValue != null && nowValue != "") { // value°¡ ¾ø°Å³ª ºó°ªÀÌ¸é ÀÎµ¦½º·Î Ãë±ÞÇÏ°í »Ñ·ÁÁÖÁö ¾Ê°ÔÇÔ.
			newSelect += "			<tr>";
			newSelect += "				<td height='" + optionHeight + "' class='selectBoxOption' onMouseOver=\"this.className='selectBoxOptionOver'\" onMouseOut=\"this.className='selectBoxOption'\" onClick=\"selectThisValue('"+ objId + "'," + i + ",'" + nowValue + "','" + nowText + "')\" style='cursor:hand;'>" + nowText + "</td>";
			newSelect += "				<input type='hidden' id='"+ objId + "SelectBoxOptionValue" + i + "' value='" + nowValue + "'>";
			newSelect += "			</tr>";
		}
	}
	newSelect += "		</table>";
	newSelect += "		</div>";
	newSelect += "		<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
	newSelect += "			<tr>";
	newSelect += "				<td height='4' bgcolor='#FFFFFF'></td>";
	newSelect += "			</tr>";
	newSelect += "		</table>";
	newSelect += "		</td>";
	newSelect += "	</tr>";
	newSelect += "</table>";
	newSelect += "<table cellpadding='0' cellspacing='1' border='0' bgcolor='#CECEC7' onClick=\"viewOptionLayer('"+ objId + "')\" style='cursor:hand;' onMouseOut=\"setMousePosition('out')\">";
	newSelect += "	<tr>";
	newSelect += "		<td bgcolor='#FFFFFF'>";
	newSelect += "		<table cellpadding='0' cellspacing='0' border='0'>";
	newSelect += "			<tr>";
	newSelect += "				<td><div id='" + objId + "selectBoxSelectedValue' class='selectBoxSelectedArea' style='width:" + (selectBoxWidth - downArrowSrcWidth - 2) + "px;height:" + (selectBoxHeight - 2) + "px;overflow:hidden;' onBlur=\"selectBoxBlur('" + objId + "')\"></div></td>";
	newSelect += "				<td><img src='" + downArrowSrc + "' width='" + downArrowSrcWidth + "' border='0'></td>";
	newSelect += "			</tr>";
	newSelect += "		</table>";
	newSelect += "		</td>";
	newSelect += "	</tr>";
	newSelect += "</table>";
	document.write(newSelect);
	
	var haveSelectedValue = false;
	for (var i=0 ; i < obj.options.length ; i++) {
		if (obj.options[i].selected == true) {
			haveSelectedValue = true;
			settingValue(objId,obj.options[i].text);
		}
	}
	if (!haveSelectedValue) settingValue(objId,obj.options[0].text);
}

function makeSelectBox02(thisId) {
	var downArrowSrc = "http://www.keb.co.kr/images/common/etc/selectbox_bu02.gif";	//¿À¸¥ÂÊ È­»ìÇ¥ÀÌ¹ÌÁö
	var downArrowSrcWidth = 15;	//¿À¸¥ÂÊ È­»ìÇ¥ÀÌ¹ÌÁö width
	var optionHeight = 19; // option ÇÏ³ªÀÇ ³ôÀÌ
	var optionMaxNum = 6; // ÇÑ¹ø¿¡ º¸¿©Áö´Â optionÀÇ °¹¼ö
	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  = "<table id='" + objId + "selectBoxOptionLayer' cellpadding='0' cellspacing='0' border='0' style='position:absolute;z-index:100;display:none;' onMouseOver=\"viewOptionLayer('"+ objId + "')\" onMouseOut=\"setMousePosition('out')\">";
	newSelect += "	<tr>";
	newSelect += "		<td height='" + (selectBoxHeight - 1) + "' style='cursor:hand;' onClick=\"hideOptionLayer('"+ objId + "')\"></td>";
	newSelect += "	</tr>";
	newSelect += "	<tr>";
	newSelect += "		<td bgcolor='#CECEC7' style='padding:0px 1px 1px 1px'>";
	newSelect += "		<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
	newSelect += "			<tr>";
	newSelect += "				<td height='3' bgcolor='#FFFFFF'></td>";
	newSelect += "			</tr>";
	newSelect += "		</table>";
	newSelect += "		<div class='selectBoxOptionInnerLayer' style='width:" + (selectBoxWidth-2) + "px;" + optionInnerLayerHeight + "'>";
	newSelect += "		<table cellpadding='0' cellspacing='0' border='0' width='100%' style='table-layout:fixed;word-break:break-all;'>";
	for (var i=0 ; i < obj.options.length ; i++) {
		var nowValue = obj.options[i].value;
		var nowText = obj.options[i].text;
		if (typeof(obj.options[i].separator) == "undefined") {
			newSelect += "			<tr>";
			newSelect += "				<td height='" + optionHeight + "' class='selectBoxOption' onMouseOver=\"this.className='selectBoxOptionOver'\" onMouseOut=\"this.className='selectBoxOption'\" onClick=\"selectThisValue('"+ objId + "'," + i + ",'" + nowValue + "','" + nowText + "')\" style='cursor:hand;padding-left:15px;'>" + nowText + "</td>";
			newSelect += "				<input type='hidden' id='"+ objId + "SelectBoxOptionValue" + i + "' value='" + nowValue + "'>";
			newSelect += "			</tr>";
		} else {
			/*
			newSelect += "			<tr>";
			newSelect += "				<td height='" + optionHeight + "' class='selectBoxOption' onMouseOver=\"this.className='selectBoxOptionOver'\" onMouseOut=\"this.className='selectBoxOption'\" onClick=\"selectThisValue('"+ objId + "'," + i + ",'" + nowValue + "','" + nowText + "')\" style='cursor:hand;'>" + nowText + "</td>";
			newSelect += "				<input type='hidden' id='"+ objId + "SelectBoxOptionValue" + i + "' value='" + nowValue + "'>";
			newSelect += "			</tr>";
			*/
		}
	}
	newSelect += "		</table>";
	newSelect += "		</div>";
	newSelect += "		<table cellpadding='0' cellspacing='0' border='0' width='100%'>";
	newSelect += "			<tr>";
	newSelect += "				<td height='4' bgcolor='#FFFFFF'></td>";
	newSelect += "			</tr>";
	newSelect += "		</table>";
	newSelect += "		</td>";
	newSelect += "	</tr>";
	newSelect += "</table>";
	newSelect += "<table cellpadding='0' cellspacing='1' border='0' bgcolor='#CECEC7' onClick=\"viewOptionLayer('"+ objId + "')\" style='cursor:hand;' onMouseOut=\"setMousePosition('out')\">";
	newSelect += "	<tr>";
	newSelect += "		<td bgcolor='#FFFFFF'>";
	newSelect += "		<table cellpadding='0' cellspacing='0' border='0'>";
	newSelect += "			<tr>";
	newSelect += "				<td><div id='" + objId + "selectBoxSelectedValue' class='selectBoxSelectedArea' style='width:" + (selectBoxWidth - downArrowSrcWidth - 2) + "px;height:" + (selectBoxHeight - 2) + "px;overflow:hidden;' onBlur=\"selectBoxBlur('" + objId + "')\"></div></td>";
	newSelect += "				<td><img src='" + downArrowSrc + "' width='" + downArrowSrcWidth + "' border='0'></td>";
	newSelect += "			</tr>";
	newSelect += "		</table>";
	newSelect += "		</td>";
	newSelect += "	</tr>";
	newSelect += "</table>";
	document.write(newSelect);
	
	var haveSelectedValue = false;
	for (var i=0 ; i < obj.options.length ; i++) {
		if (obj.options[i].selected == true) {
			haveSelectedValue = true;
			settingValue(objId,obj.options[i].text);
		}
	}
	if (!haveSelectedValue) settingValue(objId,obj.options[0].text);
}

document.onmousedown = clickMouse;

/***********************************************************************************
**** Select Box Design Script ******************************************************
**** End ***************************************************************************
************************************************************************************/