/**
 * 프로젝트명: ITIS 통합
 * 프로그램명: 지역 , 국가 Combo Ajax
 * 기    능 :   
 * 작 성 자 :  CJS Jeon
 * 작 성 일 : 2007. 12. 31
 *
 * 저 작 권 : Copyright (c) 2004 by CJSystems All rights Reserved
 **/
window.onload=function() {
	//select list TIC 지식 구분 1DEPTH
	var class_code1 = new ITISSelect(
		{
			
			selectElement:$("participationreqDTO.region"),	
			requestURL:"/kor/prtcpreq.kto?func_name=getRegionNation&lvl=1&participationreqDTO.jsp_name=bs/marketing/oversea_expo_event/oversea_expo_trade/RegionNationComboXML&loc=list",
			firstValue:"",
			firstText:"전체",
			value:"code",
			text:"code_nm",
			selectedValue:$("region").value,
			ajaxRunning:"false",
			onAfterFillSelect:function () {
			    if (class_code1.selectInfo.selectedValue != "") {
					classCode1IFOnChange();
				}
			}
		}
	);
	
	
	class_code1.fillSelect();
	//코드그룹 콤보 선택을 바꾸면 codeGrup 텍스트박스의 값을 바꾼다.
	$("participationreqDTO.region").onchange = classCode1IFOnChange;
	
	function classCode1IFOnChange() {
	   
		var CodeValue = $("participationreqDTO.region").value;
		if (CodeValue == "total") {
			class_code2.clearSelect();
			$("participationreqDTO.nation").value = "";
			
		}
		//선택된 구분1이 있으면 그 구분1에 대한 구분2을 선택 할 수 있다.
		else {
			class_code2.selectInfo.requestURL = "/kor/prtcpreq.kto?func_name=getRegionNation&lvl=2&participationreqDTO.jsp_name=bs/marketing/oversea_expo_event/oversea_expo_trade/RegionNationComboXML&loc=list&participationreqDTO.region=" + CodeValue;
			class_code2.selectInfo.selectedValue = $("nation").value;
			class_code2.fillSelect();
		}
	}

	//select list TIC 지식 구분 2DEPTH
	class_code2 = new ITISSelect(
	{
		selectElement:$("participationreqDTO.nation"),	
		requestURL:"",	
		firstValue:"",
		firstText:"전체",
		value:"code",
		text:"code_nm",
		selectedValue:$("nation").value,
		onAfterFillSelect:function () {
		}
	});
	
	//코드그룹 콤보 선택을 바꾸면 codeGrup 텍스트박스의 값을 바꾼다.
	$("participationreqDTO.nation").onchange = function() {}
		
}


