var all_list1 = new Array(); var lista=new Array(); var listb=new Array(); var listc=new Array(); var listd=new Array(); function DeleteFrontZero(str){ val = new String(str) do { if (val.length==1) break; if (val.substr(0,1)=='0') val = val.substr(1, val.length - 1); else break; } while (true); return val } ///Int 형으로 변환한다. function ToInt(val){ val = DeleteFrontZero(val); return parseInt(val); } function CodeList() { var argv = CodeList.arguments; var argc = CodeList.arguments.length; //Property 선언 this.classname = "CodeList" //classname this.debug = false; //디버깅여부. this.codeA = new String((argc > 0) ? argv[0] : "000"); this.codeB = new String((argc > 1) ? argv[1] : "000"); this.codeC = new String((argc > 2) ? argv[2] : "000"); this.codeD = new String((argc > 3) ? argv[3] : "000"); this.type = new String((argc > 4) ? argv[4] : ""); this.code_name = new String((argc > 5) ? argv[5] : ""); } function CodeAList() { var argv = CodeAList.arguments; var argc = CodeAList.arguments.length; //Property 선언 this.classname = "CodeAList" //classname this.debug = false; //디버깅여부. this.CodeA = new String((argc > 0) ? argv[0] : "000"); this.CodeA_Name = new String((argc > 1) ? argv[1] : ""); this.CodeA_Type = new String((argc > 2) ? argv[2] : ""); this.CodeB = new Array(); } function CodeBList() { var argv = CodeBList.arguments; var argc = CodeBList.arguments.length; //Property 선언 this.classname = "CodeBList" //classname this.debug = false; //디버깅여부. this.CodeA = new String((argc > 0) ? argv[0] : "000"); this.CodeB = new String((argc > 1) ? argv[1] : "000"); this.CodeB_Name = new String((argc > 2) ? argv[2] : ""); this.CodeB_Type = new String((argc > 3) ? argv[3] : ""); this.CodeC = new Array(); } function CodeCList() { var argv = CodeCList.arguments; var argc = CodeCList.arguments.length; //Property 선언 this.classname = "CodeCList" //classname this.debug = false; //디버깅여부. this.CodeA = new String((argc > 0) ? argv[0] : "000"); this.CodeB = new String((argc > 1) ? argv[1] : "000"); this.CodeC = new String((argc > 2) ? argv[2] : "000"); this.CodeC_Name = new String((argc > 3) ? argv[3] : ""); this.CodeC_Type = new String((argc > 4) ? argv[4] : ""); this.CodeD = new Array(); } function CodeDList() { var argv = CodeDList.arguments; var argc = CodeDList.arguments.length; //Property 선언 this.classname = "CodeDList" //classname this.debug = false; //디버깅여부. this.CodeA = new String((argc > 0) ? argv[0] : "000"); this.CodeB = new String((argc > 1) ? argv[1] : "000"); this.CodeC = new String((argc > 2) ? argv[2] : "000"); this.CodeD = new String((argc > 3) ? argv[3] : "000"); this.CodeD_Name = new String((argc > 4) ? argv[4] : ""); this.CodeD_Type = new String((argc > 5) ? argv[5] : ""); } function SearchCodeInit(codeA, codeB, codeC, codeD) { if(typeof(document.form1.codeA)!="object") return; var d = new Option("--- 1차 카테고리 선택 ---"); document.form1.codeA.options[0] = d; document.form1.codeA.options[0].value = ""; for(var i=0;i 0) { plus = " ☞"; } var d = new Option(all_list1[i].CodeA_Name+plus); document.form1.codeA.options[i+1] = d; document.form1.codeA.options[i+1].value = all_list1[i].CodeA; if (all_list1[i].CodeA == codeA) { document.form1.codeA.selectedIndex = i+1; if(typeof(document.form1.codeB)!="object") return; try { if(all_list1[i].CodeA_Type=="LX" || all_list1[i].CodeA_Type=="TX") { var d = new Option("---- 단일 카테고리 ----"); document.form1.codeB.options[0] = d; document.form1.codeB.options[0].value = "000"; var d = new Option("---- 단일 카테고리 ----"); document.form1.codeC.options[0] = d; document.form1.codeC.options[0].value = "000"; var d = new Option("---- 단일 카테고리 ----"); document.form1.codeD.options[0] = d; document.form1.codeD.options[0].value = "000"; } else { var d = new Option("--- 2차 카테고리 선택 ---"); document.form1.codeB.options[0] = d; document.form1.codeB.options[0].value = ""; for(var j=0;j 0) { plus = " ☞"; } var d = new Option(all_list1[i].CodeB[j].CodeB_Name+plus); document.form1.codeB.options[j+1] = d; document.form1.codeB.options[j+1].value = all_list1[i].CodeB[j].CodeB; if (all_list1[i].CodeB[j].CodeB == codeB) { document.form1.codeB.selectedIndex = j+1; if(typeof(document.form1.codeC)!="object") return; try { if(all_list1[i].CodeB[j].CodeB_Type=="LMX" || all_list1[i].CodeB[j].CodeB=="TMX") { var d = new Option("---- 단일 카테고리 ----"); document.form1.codeC.options[0] = d; document.form1.codeC.options[0].value = "000"; var d = new Option("---- 단일 카테고리 ----"); document.form1.codeD.options[0] = d; document.form1.codeD.options[0].value = "000"; } else { var d = new Option("--- 3차 카테고리 선택 ---"); document.form1.codeC.options[0] = d; document.form1.codeC.options[0].value = ""; for(var y=0;y 0) { plus = " ☞"; } var d = new Option(all_list1[i].CodeB[j].CodeC[y].CodeC_Name+plus); document.form1.codeC.options[y+1] = d; document.form1.codeC.options[y+1].value = all_list1[i].CodeB[j].CodeC[y].CodeC; if (all_list1[i].CodeB[j].CodeC[y].CodeC == codeC) { document.form1.codeC.selectedIndex = y+1; if(typeof(document.form1.codeD)!="object") return; try { if(all_list1[i].CodeB[j].CodeC[y].CodeC_Type=="LMX" || all_list1[i].CodeB[j].CodeC[y].CodeC_Type=="TMX") { var d = new Option("---- 단일 카테고리 ----"); document.form1.codeD.options[0] = d; document.form1.codeD.options[0].value = "000"; } else { var d = new Option("--- 4차 카테고리 선택 ---"); document.form1.codeD.options[0] = d; document.form1.codeD.options[0].value = ""; for(var z=0;z 0) { plus = " ☞"; } var d = new Option(all_list1[i].CodeB[j].CodeB_Name+plus); document.form1.codeB.options[j+1] = d; document.form1.codeB.options[j+1].value = all_list1[i].CodeB[j].CodeB; } } } catch (e) {} break; } } } else if (gbn == 2) { if(typeof(document.form1.codeB)!="object") return; if(typeof(document.form1.codeC)=="object") { document.form1.codeC.length = 0; var d = new Option("--- 3차 카테고리 선택 ---"); document.form1.codeC.options[0] = d; document.form1.codeC.options[0].value = ""; } if(typeof(document.form1.codeD)=="object") { document.form1.codeD.length = 0; var d = new Option("--- 4차 카테고리 선택 ---"); document.form1.codeD.options[0] = d; document.form1.codeD.options[0].value = ""; } var codeA=document.form1.codeA.value; for(var i=0;i 0) { plus = " ☞"; } var d = new Option(all_list1[i].CodeB[j].CodeC[y].CodeC_Name+plus); document.form1.codeC.options[y+1] = d; document.form1.codeC.options[y+1].value = all_list1[i].CodeB[j].CodeC[y].CodeC; } } } catch (e) {} break; } } } catch (e) {} break; } } } else if (gbn == 3) { if(typeof(document.form1.codeC)!="object") return; if(typeof(document.form1.codeD)=="object") { document.form1.codeD.length = 0; var d = new Option("--- 4차 카테고리 선택 ---"); document.form1.codeD.options[0] = d; document.form1.codeD.options[0].value = ""; } var codeA = document.form1.codeA.value; var codeB = document.form1.codeB.value; for(var i=0;i