PDA

View Full Version : Bugs..?? Dialog & Form Fields....


raprince
07-21-2007, 01:03 PM
In Advance....I think very sorry ...my English is so poor.. T.T;;

My Problem(bug..??) is this ::
When I open Dialog(LayoutDialog or common Dialog Object), All the Form's value are reset !! How Amazing to me...!!

My source is so Complicated and so ugly (I know..), Plz let me know where is my mistake..
For the fully understanding.. I attached my Full Source Here.....
Thanks...in advance...
---------------------------------------------------------------
ps: I'm Koeran ..so my source include Korean Language... but I'm using UTF-8 Charset and encoding..that is not matter....
---------------------------------------------------------------


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>■■■■■■ [청예단] 청소년 폭력 상담 관리 ■■■■■■</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="/resource/js/core/adapter/yui/yui-utilities.js"></script>
<script type="text/javascript" src="/resource/js/core/adapter/yui/ext-yui-adapter.js"></script>
<script type="text/javascript" src="/resource/js/core/ext-all.js"></script>
<script type="text/javascript" src="/resource/js/common/jquery-pack.js"></script>
<script type="text/javascript" src="/resource/js/common/jquery-form.js"></script>
<script type="text/javascript" src="/resource/js/core/Ext.ux.InfoPanel.js"></script>
<script type="text/javascript" src="/resource/js/core/Ext.ux.Accordion.js"></script>
<script type="text/javascript" src="/resource/js/common/prevent.js"></script>
<link rel="shortcut icon" href="/resource/image/icon/application_side_list.png" type="image/png">
<link rel="stylesheet" type="text/css" href="/resource/css/core/ext-all.css">
<link rel="stylesheet" type="text/css" href="/resource/css/page/highlight.css">
<link rel="stylesheet" type="text/css" href="/resource/css/core/accordion.css">
<link rel="stylesheet" type="text/css" href="/resource/css/page/form-style.css">
<link rel="stylesheet" type="text/css" href="/resource/css/page/body.css">
<link rel="stylesheet" type="text/css" href="feed-viewer.css"/>
<script type="text/javascript" src="/resource/js/common/encodeURL.js"></script>
<link rel="stylesheet" type="text/css" href="/resource/css/core/xtheme-aero.css">
<SCRIPT LANGUAGE="JavaScript">
<!--
var LayoutAddr;
var domShow;
var vBrchCd = "01"; //지부번호
var vOccYm = "200707"; //오늘년월
var vSubSeq = "1"; //현재 마지막 상담차수
var vSubSeqNext = "2"; //다음 상담차수
var vNewCompleted = false; //초기정보가 입력됐는가의 정보
var iconPath = '/resource/image/icon/';
Ext.onReady(function() {

// {{{
// function to remove loading mask
var unmask = function() {
var mask = Ext.get('loading-mask');
var msg = Ext.get('loading-msg');
if(mask && msg) {
mask.shift({
xy:msg.getXY()
, width:msg.getWidth()
, height:msg.getHeight()
, remove: true
, duration: 1.6
, opacity: 0.3
, easing: 'bounceOut'
, callback: function(){Ext.fly(msg).remove();}
});
}
};//end Ext.onReady
/**
* Ext.subPage() 등록
*/
Ext.subPage = function() {
/** 선택 알림창 **/
var msgCt;
function createBox(t, s){
return ['<div class="msg">',
'<div class="x-box-blue"><div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div></div>',
'<div class="x-box-blue"><div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3><img src="/resource/image/icon/mini/comment_yellow.gif" align="abs-middle"/> ', t,
'</h3>', s, '</div></div></div></div>',
'<div class="x-box-blue"><div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div></div>',
'</div>'].join('');
}
return {
msg : function(title, format){
if(!msgCt){
msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true);
msgCt.alignTo(document, 'bl-bl', [400, -500]);//(left, upperTop)
}
msgCt.alignTo(document, 'bl-bl', [400, -500]);//(left, upperTop)
var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true);
m.slideIn('b').pause(1).ghost("b", {remove:true});
}
};
}();//end Ext.subPage
// install onclick handler to unmask body (for debugging)
Ext.fly('loading-mask').on('click', unmask);
// initialize state manager, we will use cookies
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
var tabIdInit = Ext.state.Manager.get("tab");
// initialize QuickTips
Ext.QuickTips.init();
Ext.apply(Ext.QuickTips, {interceptTitles: true});
/**
* Page Layout 설정
*/
var layout = new Ext.BorderLayout(document.body, {
hideOnLayout: true,
center: {
titlebar: true,
autoScroll:true,
tabPosition: 'top',
closeOnTab: true,
alwaysShowTabs: true,
resizeTabs: false,
maxTabWidth:10,
minTabWidth:10,
collapsable: true,
title: '<img src="'+iconPath+'mini/list_users.gif" align="absmiddle"/><b style="font-size:12x">학교 폭력 상담 사례 기록</b>'
}
});
/**************************************************/
/** 1 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc1 = new Ext.ux.Accordion('tab-1', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-1'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc1.toolbar = new Ext.Toolbar('acc-tb-1', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기 '
, scope: acc1
, handler: function(btn, e) {
acc1.collapseAll(true);
}
},
// expand all (Independent mode일 경우에만)
{ tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc1
, handler: function(btn, e) {
acc1.expandAll();
}
},
// modify
{ tooltip: '저장(수정)하기 (마지막 회차만 수정할 수 있습니다.)'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/action_save.gif'
, text: '수정하기'
, scope: acc1
, handler: function(btn, e) {
//this.expandAll();-저장로직
$('#form-1-1').submit();
}
},

// insert
{ tooltip: '새로운 상담회차 입력<BR/>(입력후에는 반드시 저장 버튼을 클릭해 주셔야 반영이 됩니다.)'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/folder_new.gif'
, text: '신규회차입력'
, scope: acc1
, handler: function(btn, e) {
$('#form-1-2').submit();
btn.disable();
vNewCompleted = true;
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
var panel_1_1 = new Ext.ux.InfoPanel('acc-panel-1-1', {
trigger:'title'
, collapsed:false
, icon: iconPath + 'mini/action_paste.gif'
, showPin: true
, collapseOnUnpin: true
});
acc1.add(panel_1_1);
//panel_1_1.on('expand', function(panel) {
// Ext.subPage.msg('알림', '차수 선택: <b>' + panel_1_1.getTitle() + '</b>');
//});
//예비--신규입력용
var panel_1_2 = new Ext.ux.InfoPanel('acc-panel-1-2', {
trigger:'title'
, collapsed:true
, icon: iconPath + 'mini/action_paste.gif'
, showPin: true
, collapseOnUnpin: true
});
acc1.add(panel_1_2);
//panel_1_2.on('expand', function(panel) {
// Ext.subPage.msg('알림', '차수 선택: <b>' + panel_1_2.getTitle() + '</b>');
//});
/**************************************************/
/** 1 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 2 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc2 = new Ext.ux.Accordion('tab-2', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-2'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc2.toolbar = new Ext.Toolbar('acc-tb-2', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기'
, scope: acc2
, handler: function(btn, e) {
acc2.collapseAll(true);
}
}
// expand all (Independent mode일 경우에만)
, { tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc2
, handler: function(btn, e) {
acc2.expandAll();
}
}
// insert
, { tooltip: '새로운 상담회차 입력'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/folder_new.gif'
, text: '신규회차입력'
, scope: acc2
, handler: function(btn, e) {
//accDlgShow(btn, e);
//Ext.subPage.acc2.toolbar.getEl()[3].disable();
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
var panel_2_2 = new Ext.ux.InfoPanel('acc-panel-2-2', {
trigger:'title'
, collapsed:true
, icon: iconPath + 'mini/action_paste.gif'
, showPin: true
, collapseOnUnpin: true
});
acc2.add(panel_2_2);
/**************************************************/
/** 2 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 3 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc3 = new Ext.ux.Accordion('tab-3', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-3'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc3.toolbar = new Ext.Toolbar('acc-tb-3', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기'
, scope: acc3
, handler: function(btn, e) {
acc3.collapseAll(true);
}
}
// expand all (Independent mode일 경우에만)
, { tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc3
, handler: function(btn, e) {
acc3.expandAll();
}
}
// modify
, { tooltip: '새로운 상담회차 입력'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/folder_new.gif'
, text: '신규회차입력'
, scope: acc3
, handler: function(btn, e) {
//this.expandAll();-Dialog Form을 띄워야 하지 않을까..?
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
/**************************************************/
/** 3 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 4 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc4 = new Ext.ux.Accordion('tab-4', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-4'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc4.toolbar = new Ext.Toolbar('acc-tb-4', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기'
, scope: acc4
, handler: function(btn, e) {
acc4.collapseAll(true);
}
}
// expand all (Independent mode일 경우에만)
, { tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc4
, handler: function(btn, e) {
acc4.expandAll();
}
}
// modify
, { tooltip: '새로운 상담회차 입력'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/folder_new.gif'
, text: '신규회차입력'
, scope: acc4
, handler: function(btn, e) {
//this.expandAll();-Dialog Form을 띄워야 하지 않을까..?
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
/**************************************************/
/** 4 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 5 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc5 = new Ext.ux.Accordion('tab-5', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-5'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc5.toolbar = new Ext.Toolbar('acc-tb-5', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기'
, scope: acc5
, handler: function(btn, e) {
acc5.collapseAll(true);
}
}
// expand all (Independent mode일 경우에만)
, { tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc5
, handler: function(btn, e) {
acc5.expandAll();
}
}
// modify
, { tooltip: '새로운 상담회차 입력'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/folder_new.gif'
, text: '신규회차입력'
, scope: acc5
, handler: function(btn, e) {
//this.expandAll();-Dialog Form을 띄워야 하지 않을까..?
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
/**************************************************/
/** 5 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 6 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc6 = new Ext.ux.Accordion('tab-6', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-6'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc6.toolbar = new Ext.Toolbar('acc-tb-6', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기'
, scope: acc6
, handler: function(btn, e) {
acc6.collapseAll(true);
}
}
// expand all (Independent mode일 경우에만)
, { tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc6
, handler: function(btn, e) {
acc6.expandAll();
}
}
// modify
, { tooltip: '새로운 상담회차 입력'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/folder_new.gif'
, text: '신규회차입력'
, scope: acc6
, handler: function(btn, e) {
//this.expandAll();-Dialog Form을 띄워야 하지 않을까..?
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
/**************************************************/
/** 6 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 7 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc7 = new Ext.ux.Accordion('tab-7', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-7'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc7.toolbar = new Ext.Toolbar('acc-tb-7', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기'
, scope: acc7
, handler: function(btn, e) {
acc7.collapseAll(true);
}
}
// expand all (Independent mode일 경우에만)
, { tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc7
, handler: function(btn, e) {
acc7.expandAll();
}
}
// modify
, { tooltip: '새로운 상담회차 입력'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/folder_new.gif'
, text: '신규회차입력'
, scope: acc7
, handler: function(btn, e) {
//this.expandAll();-Dialog Form을 띄워야 하지 않을까..?
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
/**************************************************/
/** 7 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 8 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc8 = new Ext.ux.Accordion('tab-8', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-8'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc8.toolbar = new Ext.Toolbar('acc-tb-8', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기'
, scope: acc8
, handler: function(btn, e) {
acc8.collapseAll(true);
}
}
// expand all (Independent mode일 경우에만)
, { tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc8
, handler: function(btn, e) {
acc8.expandAll();
}
}
// modify
, { tooltip: '새로운 상담회차 입력'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/folder_new.gif'
, text: '신규회차입력'
, scope: acc8
, handler: function(btn, e) {
//this.expandAll();-Dialog Form을 띄워야 하지 않을까..?
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
/**************************************************/
/** 8 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 9 단계의 상담회차 Accordian 만들기 시작 **/
/**************************************************/
var acc9 = new Ext.ux.Accordion('tab-9', {
title: '<b>[ TITLE ]</b>'
, body: 'tab-9'
, fitContainer: true
, fitToFrame: true
, useShadow: true
// , resizable: false
, draggable: false
});
/** Accordian Collapser Toolbar 설정 */
acc9.toolbar = new Ext.Toolbar('acc-tb-9', [
// Control Buttons
// collapse all (Independent mode일 경우에만)
{ tooltip: '모두 접기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_up.gif'
, text: '접기'
, scope: acc9
, handler: function(btn, e) {
acc9.collapseAll(true);
}
}
// expand all (Independent mode일 경우에만)
, { tooltip: '모두 펴기'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/page_down.gif'
, text: '펴기'
, scope: acc9
, handler: function(btn, e) {
acc9.expandAll();
}
}
// modify
, { tooltip: '현재 사례 종결'
, cls: 'x-btn-text-icon'
, icon: iconPath + 'mini/action_save.gif'
, text: '사례 종결'
, scope: acc9
, handler: function(btn, e) {
//this.expandAll();-저장로직
}
}
]);
// add panels to accordion
/** 상담회차 LOOP **/
var panel_9_1 = new Ext.ux.InfoPanel('acc-panel-9-1', {
trigger:'title'
, collapsed:false
, icon: iconPath + 'mini/action_paste.gif'
, showPin: false
, collapseOnUnpin: true
});
acc9.add(panel_9_1);
//panel_1_1.on('expand', function(panel) {
// Ext.subPage.msg('알림', '차수 선택: <b>' + panel_1_1.getTitle() + '</b>');
//});
var panel_9_2 = new Ext.ux.InfoPanel('acc-panel-9-2', {
trigger:'title'
, collapsed:false
, icon: iconPath + 'mini/action_paste.gif'
, showPin: true
, collapseOnUnpin: true
});
acc9.add(panel_9_2);
//panel_1_2.on('expand', function(panel) {
// Ext.subPage.msg('알림', '차수 선택: <b>' + panel_1_2.getTitle() + '</b>');
//});
/**************************************************/
/** 9 단계의 상담회차 Accordian 만들기 종료 **/
/**************************************************/
/**************************************************/
/** 각 단계의 탭 붙이기 시작 **/
/**************************************************/
layout.beginUpdate();
layout.add('center', new Ext.ContentPanel('tab-1', {
title:"기본정보"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
acc1.setIndependent(true);
//acc1.restoreState();
layout.add('center', new Ext.ContentPanel('tab-2', {
title:"의뢰자"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
layout.add('center', new Ext.ContentPanel('tab-3', {
title:"피해자"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
layout.add('center', new Ext.ContentPanel('tab-4', {
title:"가해자"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
layout.add('center', new Ext.ContentPanel('tab-5', {
title:"사건상황"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
layout.add('center', new Ext.ContentPanel('tab-6', {
title:"진행상황"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
layout.add('center', new Ext.ContentPanel('tab-7', {
title:"의뢰인욕구"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
layout.add('center', new Ext.ContentPanel('tab-8', {
title:"과정및평가"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
layout.add('center', new Ext.ContentPanel('tab-9', {
title:"종결및추후상담"
, tooltip: 'asldfjklsdfjk'
, fitContainer:true
, fitToFrame: true
, autoScroll: true
, closable:false
}));
acc2.setIndependent(true);
//acc2.restoreState();
acc3.setIndependent(true);
//acc3.restoreState();
acc4.setIndependent(true);
//acc4.restoreState();
acc5.setIndependent(true);
//acc5.restoreState();
acc6.setIndependent(true);
//acc6.restoreState();
acc7.setIndependent(true);
//acc7.restoreState();
acc8.setIndependent(true);
//acc8.restoreState();
acc9.setIndependent(true);
//acc9.restoreState();
/**************************************************/
/** 각 단계의 탭 붙이기 종료 **/
/**************************************************/

layout.endUpdate();

/** 상태 저장 시작 **/
//var tabId = Ext.state.Manager.get("tab");
// event handler that saves currently selected tab
var center = layout.getRegion('center');
center.on('panelactivated', function(region, panel) {
var tabId = panel.el.id;
tabId = panel.el.id;
Ext.state.Manager.set("tab", tabId);
});
layout.getRegion('center').showPanel(tabIdInit || 'tab-1');
layout.restoreState();
/** 상태 저장 끝 **/
// remove the loading mask
unmask.defer(100);

}); // end of onReady
//-->
/*************************/
/** 주소창 띄우기 위한 **/
/*************************/
// create the LayoutAddr application (single instance)
LayoutAddr = function(){
// everything in this space is private and only accessible in the HelloWorld block

// define some private variables
var dialog;

// return a public interface
return {
init : function(){
//showBtn = Ext.get('show-dialog-btn');
// attach to click event
//showBtn.on('click', this.showDialog, this);

},
showDialog : function(vDomZip, vDomBasAddr ){//폼,우편번호,기본주소
if(!dialog){ // lazy initialize the dialog and only create it once
dialog = new Ext.LayoutDialog("hello-dlg", {
modal:true,
width:500,
height:400,
shadow:true,
minWidth:400,
minHeight:300,
proxyDrag: true,
center: {
autoScroll:true,
// tabPosition: 'top',
// closeOnTab: true,
alwaysShowTabs: false
}
});
dialog.addKeyListener(27, dialog.hide, dialog);//esc
//dialog.addButton('Submit', dialog.hide, dialog);
dialog.addButton('Close', dialog.hide, dialog);

/************************************************** ****************************/
var urlOrg = '/teencall/getAddr.do?DONG=';
var ds = new Ext.data.Store({///teencall/getAddr.do?DONG=
// load using script tags for cross domain, if the data in on the same domain as
// this page, an HttpProxy would be better
proxy: new Ext.data.HttpProxy({
//url: urlDs
url: urlOrg //encodeURL('안양1동')
}),

// create reader that reads the Topic records
reader: new Ext.data.JsonReader({
root: 'DONG_LIST',
//totalProperty: 'totalcount',
id: 'seq'
}, [
{name: 'zipcode', mapping: 'zipcode'}
,{name: 'sido', mapping: 'sido'}
,{name: 'gugun', mapping: 'gugun'}
,{name: 'dong', mapping: 'dong'}
,{name: 'bunji', mapping: 'bunji'}
]),

// turn on remote sorting
remoteSort: false
});

ds.setDefaultSort('zipcode', 'asc');


// the column model has information about grid columns
// dataIndex maps the column to the specific data field in
// the data store
var cm = new Ext.grid.ColumnModel([
{
header: '우편번호'
,dataIndex: 'zipcode'
,align: 'center'
,width: 60
,autoSizeColumn: true
}
,{
header: '시/도'
,dataIndex: 'sido'
,align: 'center'
,width: 60
,autoSizeColumn: true
}
,{
header: '구/군'
,dataIndex: 'gugun'
,align: 'center'
,width: 100
,autoSizeColumn: true
}
,{
header: '동/리'
,dataIndex: 'dong'
,align: 'center'
,width: 160
,autoSizeColumn: true
}
,{
header: '번지'
,dataIndex: 'bunji'
,align: 'center'
,width: 100
,autoSizeColumn: true
}
]);

// by default columns are sortable
cm.defaultSortable = true;

// create the editor grid
var grid = new Ext.grid.Grid('addr-grid', {
ds: ds,
cm: cm,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
enableColLock:false,
loadMask: true
});
//Grid Row DoubleClick Event Listener Adding...
grid.on('rowdblclick', function(grid, rowIndex, e){
//var selectedId = ds.data.items[rowIndex].id;
//alert(selectedId);//get Seq(==id)
var selectedRow = grid.getSelectionModel();
//vDomZip, vDomBasAddr
//vDomZip.value=selectedRow.getSelected().get('zipco de');
//vDomBasAddr.value=selectedRow.getSelected().get('s ido')+" "+selectedRow.getSelected().get('gugun')+" "+ selectedRow.getSelected().get('dong');
dialog.hide();
});

/**
var layoutGrid = Ext.BorderLayout.create({
center: {
margins:{left:5,top:5,right:5,bottom:5},
panels: [new Ext.GridPanel(grid)]
}
}, 'grid-panel');
**/
var layout = dialog.getLayout();
layout.add('center', new Ext.GridPanel(grid));
grid.render();
var gridHead = grid.getView().getHeaderPanel(true);

var tb1 = new Ext.Toolbar(gridHead);
var inputForm = new Ext.form.TextField({allowBlank:false,grow:true, width:40, growMin:40, growMax:200, selectOnFocus:true});
inputForm.on("specialkey", function(field, ev){
if(ev.getKey() == ev.ENTER){
ev.preventDefault();
var dong = inputForm.getValue();
if(dong == "") {
Ext.subPage.msg('알림', '동명을 입력하여 주십시요.');
} else {
//Ext.subPage.msg('알림', '입력하신 동명은 '+dong+'입니다.');
ds.removeAll();
ds.proxy = new Ext.data.HttpProxy({url: urlOrg+encodeURL(dong) });
ds.load({params:{start:0, limit:10}});

//document.location.href = urlDs;
}
}});
tb1.add('<b>동이름 입력 : </b>'
,'-'
//,vInputField
,inputForm
,'-'
, { //"-" : seperator
icon: iconPath+'mini/page_find.gif', // icons can also be specified inline
cls: 'x-btn-text-icon',
text: '조회',
tooltip: '<b>찾기</b><br/>동 이름을 입력하신 후 검색해 주십시요.',
scope: this,
handler: function() {//찾기 동작
var dong = inputForm.getValue();
if(dong == "") {
Ext.subPage.msg('알림', '동명을 입력하여 주십시요.');
} else {
//Ext.subPage.msg('알림', '입력하신 동명은 '+dong+'입니다.');
ds.removeAll();
ds.proxy = new Ext.data.HttpProxy({url: urlOrg+encodeURL(dong) });
ds.load({params:{start:0, limit:10}});

//document.location.href = urlDs;
}
}
}
);
srchBtn = tb1.handler;
/************************************************** ****************************/
}
dialog.show(domShow);
}
};
}();
Ext.EventManager.onDocumentReady(LayoutAddr.init, LayoutAddr, true);
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
//AJAX Tx
$(document).ready(function() {
var options = {
target: '#resultAjax', // target element(s) to be updated with server response
beforeSubmit: showRequest, // pre-submit callback
success: showResponse, // post-submit callback

// other available options:
url: '/teencall/paperRes.do', // override for form's 'action' attribute
//type: 'post', // 'get' or 'post', override for form's 'method' attribute
dataType: 'json' // 'xml', 'script', or 'json' (expected server response type)
//clearForm: true // clear all form fields after successful submit
//resetForm: true // reset the form after successful submit

// $.ajax options can be used here too, for example:
,timeout: 3000
};

// bind form using 'ajaxForm'
$('#form-1-1').ajaxForm(options);
$('#form-1-2').ajaxForm(options);
$('#form-2-1').ajaxForm(options);
$('#form-2-2').ajaxForm(options);
$('#form-3-1').ajaxForm(options);
$('#form-3-2').ajaxForm(options);
$('#form-4-1').ajaxForm(options);
$('#form-4-2').ajaxForm(options);
$('#form-5-1').ajaxForm(options);
$('#form-5-2').ajaxForm(options);
$('#form-6-1').ajaxForm(options);
$('#form-6-2').ajaxForm(options);
$('#form-7-1').ajaxForm(options);
$('#form-7-2').ajaxForm(options);
$('#form-8-1').ajaxForm(options);
$('#form-8-2').ajaxForm(options);
$('#form-9-1').ajaxForm(options);
$('#form-9-2').ajaxForm(options);
});

//alert($("#form-1-3").serialize());
function showRequest(formData, jqForm, options) {
var queryString = $.param(formData);
//alert('About to submit: \n\n' + queryString);

}

// post-submit callback
function showResponse(responseText, statusText) {
if(statusText == "success"){
Ext.MessageBox.alert('작업완료', '요청하신 작업이 완료되었습니다.');
} else {
Ext.MessageBox.alert('작업완료', '요청하신 작업이 완료되었습니다.');
}
/**
alert('status: ' + statusText + '\n\nresponseText: \n' + responseText.OP_CD +
'\n\nThe output div should have already been updated with the responseText.');
**/
if(responseText.OP_CD == "INSNEW_01"){
document.location.href = "/teencall/paper.do?CST_CONT_CD="+responseText.CST_CONT_CD+"&PAPER_NO="+responseText.BRCH_CD+"-"+responseText.OCC_YM+"-"+responseText.MAIN_SEQ;
}
}
</SCRIPT>
<!-- calendar stylesheet -->
<link rel="stylesheet" type="text/css" media="all" href="/resource/js/jscalendar/calendar-blue.css" title="win2k-cold-1" />
<script type="text/javascript" src="/resource/js/jscalendar/calendar.js"></script>
<script type="text/javascript" src="/resource/js/jscalendar/lang/calendar-en.js"></script>
<script type="text/javascript" src="/resource/js/jscalendar/calendar-setup.js"></script>
<SCRIPT LANGUAGE="JavaScript">
function disableCheck(obj) {
if (obj[obj.selectedIndex].className != 'selected') {
for (var i=0; obj[i].className != "selected"; i++);
obj.selectedIndex = i;
return;
}
}
</SCRIPT>
<style type="text/css">
option.disabled { font-color: blue; }
</style>
<SCRIPT LANGUAGE="JavaScript">
function selCat(oTgt, val)
{
if( val == "01" || val == "02"){//피해자,가해자
oTgt.REQR_REL_CD.options.length = 6;
oTgt.REQR_REL_CD.options[0].value="01";
oTgt.REQR_REL_CD.options[0].text="부";
oTgt.REQR_REL_CD.options[1].value="02";
oTgt.REQR_REL_CD.options[1].text="모";
oTgt.REQR_REL_CD.options[2].value="03";
oTgt.REQR_REL_CD.options[2].text="친척 및 형제";
oTgt.REQR_REL_CD.options[3].value="09";
oTgt.REQR_REL_CD.options[3].text="본인";
oTgt.REQR_REL_CD.options[4].value="04";
oTgt.REQR_REL_CD.options[4].text="친구";
oTgt.REQR_REL_CD.options[5].value="10";
oTgt.REQR_REL_CD.options[5].text="지인";
} else if( val == "03"){//교사
oTgt.REQR_REL_CD.options.length = 5;
oTgt.REQR_REL_CD.options[0].value="05";
oTgt.REQR_REL_CD.options[0].text="담임교사";
oTgt.REQR_REL_CD.options[1].value="06";
oTgt.REQR_REL_CD.options[1].text="학교폭력책임교사";
oTgt.REQR_REL_CD.options[2].value="07";
oTgt.REQR_REL_CD.options[2].text="상담교사";
oTgt.REQR_REL_CD.options[3].value="08";
oTgt.REQR_REL_CD.options[3].text="교감";
oTgt.REQR_REL_CD.options[4].value="09";
oTgt.REQR_REL_CD.options[4].text="교장";
} else if( val == "04"){//가해자
oTgt.REQR_REL_CD.options.length = 8;
oTgt.REQR_REL_CD.options[0].value="13";
oTgt.REQR_REL_CD.options[0].text="학교관계자";
oTgt.REQR_REL_CD.options[1].value="14";
oTgt.REQR_REL_CD.options[1].text="교육청";
oTgt.REQR_REL_CD.options[2].value="15";
oTgt.REQR_REL_CD.options[2].text="청소년상담실";
oTgt.REQR_REL_CD.options[3].value="16";
oTgt.REQR_REL_CD.options[3].text="기타상담실";
oTgt.REQR_REL_CD.options[4].value="17";
oTgt.REQR_REL_CD.options[4].text="쉼터";
oTgt.REQR_REL_CD.options[5].value="18";
oTgt.REQR_REL_CD.options[5].text="경찰서";
oTgt.REQR_REL_CD.options[6].value="19";
oTgt.REQR_REL_CD.options[6].text="복지시설";
oTgt.REQR_REL_CD.options[7].value="99";
oTgt.REQR_REL_CD.options[7].text="기타";
} else {}
oTgt.REQR_REL_CD.selectedIndex = 0;
}
</SCRIPT>
</head>
<body scroll="no" id="idsubPage" oncontextmenu='return true'">
<inpyt type="hidden" id="resultAjax"/>
<!-- {{{ 페이지 로딩 안내 -->
<div id="loading-mask" class="ext-el-mask"></div>
<div id="loading-msg" class="ext-el-mask-msg x-mask-loading"><div>페이지 로딩중...</div></div>
<!-- 페이지 로딩 안내 }}}-->

<!-- {{{ 각 탭별 자료 -->
<!--TAB 1 Start-->
<div class="x-layout-inactive-content" id="tab-1" style="margin-top:10px:width:100%">
<h2>&nbsp;1. 상담 기본 정보</h2>
<div id="acc-tb-1"></div>
<div id="acc-panel-1-1">
<div>1회차 상담 : 2007-07-21</div>
<div>
<div class="text-content" style="background-color:#EAF9FF">
<form method="post" name="vbform" id="form-1-1">
<input type="hidden" name="OP_CD" value="UPT_01">
<input type="hidden" name="BRCH_CD" value="01">
<input type="hidden" name="OCC_YM" value="200707">
<input type="hidden" name="MAIN_SEQ" value="14">
<input type="hidden" name="SUB_SEQ" value="1">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="96%" align="center">
<tr>
<td class="panelsurround" align="center">
<table class="panel" cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>상담 초기 정보</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">상담관리번호:</td>
<td>
<input type="text" name="MST_NO" class="bginput" style="width:99%" value="01-200707-14" readonly />
</td>
</tr>
<tr>
<td>상담 내용:
</td>
<td>
<input type="hidden" name="CST_CONT_CD" value="01"/>
<input type="text" class="bginput" style="width:99%" value="학교폭력상담" readonly/>
</td>
</tr>
<tr>
<td>상담 방법:</td>
<td>
<select name="CST_MTD_CD" style="width:100%" onChange="disableCheck(this)">>
<option value="01" selected class='selected'>전화수신</option>
<option value="02" >면접</option>
<option value="03" >방문</option>
</select>
</td>
</tr>
<tr>
<td>수신 번호:</td>
<td>
<select name="RCV_TEL_NO_CD" style="width:100%" onChange="disableCheck(this)">
<option value="01" selected class='selected'>1588-9128</option>
<option value="02" >1588-7179</option>
<option value="03" >02-585-9128</option>
<option value="04" >02-585-0098</option>
</select>
</td>
</tr>
<tr>
<td>알게된 경위:</td>
<td>
<select name="FROM_RSN_CD" style="width:100%" onChange="disableCheck(this)">
<option value="01" selected class='selected'>1388</option>
<option value="02" >청소년상담실</option>
<option value="03" >홈페이지</option>
<option value="99" >기타</option>
</select>
</td>
</tr>
<tr>
<td>기타 사항:</td>
<td>
<input type="text" name="FROM_RSN_DESC" class="bginput" style="width:99%" value="asdfasdf" maxlength="20" readonly/>
</td>
</tr>
<tr>
<td>종결여부:</td>
<td>
<span style='font-color:blue'>미결</span>
</td>
</tr>
</table>
</fieldset>
</td>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>상담 관리 정보</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">상담 시작일시:</td>
<td>
<input type="text" name="CST_STT_DATE" id="idDate-1-1-STT" class="bginput" style="width:85%" readonly value="2007-07-21 22:11:00"/>
<button type="reset" id="idDate-1-1-SBTN" style="border:0px;background-color:#EAF9FF">
<img src="/resource/image/icon/mini/calendar.gif" border="0" align="absmiddle">
</button>
<script type="text/javascript">
Calendar.setup({
inputField : "idDate-1-1-STT",
ifFormat : "%Y-%m-%d %I:%M",
showsTime : true,
button : "idDate-1-1-SBTN",
singleClick : false,
step : 1,
time24 : true
});
</script>
</td>
</tr>
<tr>
<td>상담 종료일시:</td>
<td>
<input type="text" name="CST_END_DATE" id="idDate-1-1-END" class="bginput" style="width:85%" readonly value="2007-07-21 22:11:00"/>
<button type="reset" id="idDate-1-1-EBTN" style="border:0px;background-color:#EAF9FF">
<img src="/resource/image/icon/mini/calendar.gif" border="0" align="absmiddle">
</button>
<script type="text/javascript">
Calendar.setup({
inputField : "idDate-1-1-END",
ifFormat : "%Y-%m-%d %I:%M",
showsTime : true,
button : "idDate-1-1-EBTN",
singleClick : false,
step : 1,
time24 : true
});
</script>
</td>
</tr>
<!--
<tr>
<td>상담 시간:</td>
<td>
<input type="text" class="bginput" style="width:50%;text-align:right" readonly value="160"> 분간
</td>
</tr>
-->
</table>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<div id="acc-panel-1-2">
<div><b>[신규] 2 회차 상담 : 2007-07-22</b></div>
<div>
<div class="text-content" style="background-color:#FFFFC0">
<form method="post" name="vbform" id="form-1-2">
<input type="hidden" name="OP_CD" value="INS_01">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="96%" align="center">
<tr>
<td class="panelsurround" align="center">
<table class="panel" cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>상담 초기 정보</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">상담관리번호:</td>
<td>
<input type="text" name="MST_NO" class="bginput" style="width:99%" value="01-200707-14" readonly/>
<input type="hidden" name="BRCH_CD" value="01">
<input type="hidden" name="OCC_YM" value="200707">
<input type="hidden" name="MAIN_SEQ" value="14">
</td>
</tr>
<tr>
<td>상담 내용:
</td>
<td>
<input type="hidden" name="CST_CONT_CD" value="01"/>
<input type="text" class="bginput" style="width:99%" value="학교폭력상담" readonly/>
</td>
</tr>
<tr>
<td>상담 방법:</td>
<td>
<select name="CST_MTD_CD" style="width:100%">>
<option value="01" selected>전화수신</option>
<option value="02" >면접</option>
<option value="03" >방문</option>
</select>
</td>
</tr>
<tr>
<td>수신 번호:</td>
<td>
<select name="RCV_TEL_NO_CD" style="width:100%" >
<option value="01" selected class='selected'>1588-9128</option>
<option value="02" >1588-7179</option>
<option value="03" >02-585-9128</option>
<option value="04" >02-585-0098</option>
</select>
</td>
</tr>
<tr>
<td>알게된 경위:</td>
<td>
<select name="FROM_RSN_CD" style="width:100%" >
<option value="01" selected class='selected'>1388</option>
<option value="02" >청소년상담실</option>
<option value="03" >홈페이지</option>
<option value="99" >기타</option>
</select>
</td>
</tr>
<tr>
<td>기타 사항:</td>
<td>
<input type="text" name="FROM_RSN_DESC" class="bginput" style="width:99%" value="asdfasdf" maxlength="20"/>
</td>
</tr>
<tr>
<td>종결여부:</td>
<td>
<span style='font-color:blue'>미결</span>
</td>
</tr>
</table>
</fieldset>
</td>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>상담 관리 정보</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">상담 시작일시:</td>
<td>
<input type="text" name="CST_STT_DATE" id="idDate-1-2-STT" class="bginput" style="width:85%" readonly value="2007-07-22 01:53:00"/>
<button type="reset" id="idDate-1-2-SBTN" style="border:0px;background-color:#EAF9FF">
<img src="/resource/image/icon/mini/calendar.gif" border="0" align="absmiddle">
</button>
<script type="text/javascript">
Calendar.setup({
inputField : "idDate-1-2-STT",
ifFormat : "%Y-%m-%d %I:%M:%S",
showsTime : true,
button : "idDate-1-2-SBTN",
singleClick : false,
step : 1,
time24 : true
});
</script>
</td>
</tr>
<tr>
<td width="30%">상담 종료일시:</td>
<td>
<input type="text" name="CST_END_DATE" id="idDate-1-2-END" class="bginput" style="width:85%" readonly value="2007-07-22 01:53:00"/>
<button type="reset" id="idDate-1-2-EBTN" style="border:0px;background-color:#EAF9FF">
<img src="/resource/image/icon/mini/calendar.gif" border="0" align="absmiddle">
</button>
<script type="text/javascript">
Calendar.setup({
inputField : "idDate-1-2-END",
ifFormat : "%Y-%m-%d %I:%M:%S",
showsTime : true,
button : "idDate-1-2-EBTN",
singleClick : false,
step : 1,
time24 : true
});
</script>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<!--TAB 1 End-->
<!--TAB 2 Start-->
<div class="x-layout-inactive-content" id="tab-2" style="margin-top:10px:width:100%">
<h2>&nbsp;2. 의뢰자 정보</h2>
<div id="acc-tb-2"></div>
<div id="acc-panel-2-2">
<div><b>[신규] 2 회차 상담 : 2007-07-22</b></div>
<div>
<div class="text-content" style="background-color:#FFFFC0">
<form method="post" name="nameform-2-2" id="form-2-2">
<input type="hidden" name="OP_CD" value="INS_02">
<input type="hidden" name="BRCH_CD" value="01">
<input type="hidden" name="OCC_YM" value="200707">
<input type="hidden" name="MAIN_SEQ" value="14">
<input type="hidden" name="SUB_SEQ" value="1">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="96%" align="center">
<tr>
<td class="panelsurround" align="center">
<table class="panel" cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>인적 상황</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">이름:</td>
<td>
<input type="text" name="NM" class="bginput" style="width:99%" value=""/>
</td>
</tr>
<tr>
<td>성별:</td>
<td>
<select name="GEND_CD" style="width:100%" >
<option value="M" >남</option>
<option value="F" >여</option>
</select>
</td>
</tr>
<tr>
<td>직업:</td>
<td>
<input name="JOB" type="text" class="bginput" style="width:99%" value="" maxlength="20"/>
</td>
</tr>
<tr>
<td>유선전화:
</td>
<td>
<input type="text" name="PHONE_NO" class="bginput" style="width:99%" value="" maxlength="13"/>
</td>
</tr>
<tr>
<td>무선전화:</td>
<td>
<input type="text" name="CELL_PHONE_NO" class="bginput" style="width:99%" value="" maxlength="13"/>
</td>
</tr>
<tr>
<td>E-Mail:</td>
<td>
<input type="text" name="EMAIL" class="bginput" style="width:99%" value="" maxlength="20"/>
</td>
</tr>
<tr>
<td align="top">주소:</td>
<td>
<input type="text" name="ZIP_NO" class="bginput" style="width:30%" value="" maxlength="7" />&nbsp;<button type="reset" style="border:0px;background-color:#FFFFC0;cursor:hand" id="show-dialog-btn" onClick='domShow=this;LayoutAddr.showDialog(docume nt.forms["nameform-2-2"].ZIP_NO, document.forms["nameform-2-2"].BAS_ADDR)'><img src="/resource/image/icon/mini/icon_home.gif" align="absmiddle" border="0"> 주소찾기</button><BR/>
<input type="text" name="BAS_ADDR" class="bginput" style="width:99%" value="" maxlength="7" readonly/><BR/>
<input type="text" name="DTL_ADDR" class="bginput" style="width:99%" value="" maxlength="7"/><BR/>
</td>
</tr>
</table>
</fieldset>
</td>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>상세 정보</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">분류:</td>
<td>
<select name="REQR_GRP_CD" style="width:45%" onChange="selCat(document.forms['nameform-2-2'], this.value)">
<option value="01" >피해자</option>
<option value="02" >가해자</option>
<option value="03" >교사</option>
<option value="04" >기타</option>
</select>
&nbsp;-&nbsp;
<select name="REQR_REL_CD" style="width:45%" >

<option value="01" >부</option>
<option value="02" >모</option>
<option value="03" >친척 및 형제</option>
<option value="09" >본인</option>
<option value="04" >친구</option>
<option value="10" >지인</option>

</select>
</td>
</tr>
<tr>
<td>의뢰자 추가기록:</td>
<td>
<textarea name="REQR_GRP_ETC_DESC" class="bginput" style="width:100%;height:40px" value=""></textarea>
</td>
</tr>
<tr>
<td>내담자</td>
<td>
<textarea name="CONTR_ETC" class="bginput" style="width:100%;height:80px" value=""></textarea>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<!--TAB 2 End-->
<!--TAB 3 Start-->
<div class="x-layout-inactive-content" id="tab-3" style="margin-top:10px:width:100%">
<h2>&nbsp;3. 피해자 정보</h2>
<div id="acc-tb-3"></div>
<div id="acc-panel-3-2">
<div>2회차 상담 : 2007-05-17</div>
<div>
<div class="text-content" style="background-color:#EAF9FF">
<form method="post" name="vbform" id="form-10-2">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="96%" align="center">
<tr>
<td class="panelsurround" align="center">
<table class="panel" cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>인적 상황</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">이름:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="홍길동" readonly/>
</td>
</tr>
<tr>
<td>성별 & 나이:</td>
<td>
<select name="CONT_MTD_CD" style="width:40%" >
<option value="00" selected="selected">남</option>
<option value="00">여</option>
</select>
&nbsp;
<select name="CONT_MTD_CD" style="width:55%">
<option value="00" selected="selected">7세</option>
<option value="00">8세</option>
<option value="00">8세</option>
<option value="00">8세</option>
<option value="00">8세</option>
<option value="00">8세</option>
</select>
</td>
</tr>
<tr>
<td>학교:</td>
<td>
<input type="text" class="bginput" style="width:35%" value="안양서" readonly maxlength="10"/>
<select name="CONT_MTD_CD" style="width:30%" >
<option value="00" selected="selected">초등학교</option>
<option value="00">중등학교</option>
<option value="00">고등학교</option>
</select>
-
<select name="CONT_MTD_CD" style="width:20%" >
<option value="00" selected="selected">공립</option>
<option value="00">사립</option>
<option value="00">대안</option>
<option value="00">특수</option>
</select>
</td>
</tr>
<td>학력:</td>
<td>
<select name="CONT_MTD_CD" style="width:60%" >
<option value="00" selected="selected">초등학교 - 1학년</option>
<option value="00">초등학교 - 2학년</option>
<option value="00">초등학교 - 3학년</option>
<option value="00">초등학교 - 4학년</option>
<option value="00">초등학교 - 5학년</option>
</select>
-
<select name="CONT_MTD_CD" style="width:35%" >
<option value="00" selected="selected">재학중</option>
<option value="00">학업중단</option>
</select>
</td>
</tr>
<tr>
<td>유선전화:
</td>
<td>
<input type="text" class="bginput" style="width:100%" value="031-4444-9898" readonly maxlength="13"/>
</td>
</tr>
<tr>
<td>무선전화:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="010-0101-0101" readonly maxlength="13"/>
</td>
</tr>
<tr>
<td>E-Mail:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="test@test.com" readonly maxlength="20"/>
</td>
</tr>
<tr>
<td>주소:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">경기도</option>
<option value="00">강원도</option>
<option value="00">동작구</option>
<option value="00">노원구</option>
</select>
</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldset" style="margin:3px">
<legend>가족 및 개인 환경</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="40%">부모 양육태도:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">자녀방임</option>
<option value="00">과잉보호</option>
<option value="00">가정폭력</option>
<option value="00">지지적 가정</option>
<option value="00">억압·통제 가정</option>
<option value="00">평범</option>
</select>
</td>
</tr>
<tr>
<td width="30%">가족형태 & 경제수준:</td>
<td>
<select name="CONT_MTD_CD" style="width:40%" >
<option value="00" selected="selected">일반</option>
<option value="00">편부</option>
<option value="00">편모</option>
<option value="00">소년소녀 가장</option>
<option value="00">조손 가정</option>
<option value="00">친족</option>
<option value="00">시설</option>
</select>
<select name="CONT_MTD_CD" style="width:55%" >
<option value="00" selected="selected">기초생활 수급자</option>
<option value="00">차상위 계층</option>
<option value="00">중산층</option>
<option value="00">고소득층</option>
</select>
</td>
</tr>
<tr>
<td>가족 구성:</td>
<td>
<textarea class="bginput" style="width:100%;height:40px" readonly></textarea>
</td>
</tr>
<tr>
<td>성격 & 신체적 특성:</td>
<td>
<select name="CONT_MTD_CD" style="width:45%" >
<option value="00" selected="selected">외향</option>
<option value="00">내향</option>
<option value="00">적극</option>
<option value="00">소극</option>
<option value="00">보통</option>
</select>
-
<select name="CONT_MTD_CD" style="width:30%" >
<option value="00" selected="selected">왜소</option>
<option value="00">보통</option>
<option value="00">건장</option>
<option value="00">장애무</option>
<option value="00">장애유</option>
</select>
</td>
</tr>
<td>보충 기록:</td>
<td>
<textarea class="bginput" style="width:100%;height:40px" readonly></textarea>
</td>
</tr>
</table>
</fieldset>
</td>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>대외 환경</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="40%">친구관계:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">많다</option>
<option value="00">보통</option>
<option value="00">적다</option>
<option value="00">없다</option>
</select>
</td>
</tr>
<tr>
<td width="30%">폭력서클 가입경험:</td>
<td>
<select name="CONT_MTD_CD" style="width:45%" >
<option value="00" selected="selected">무</option>
<option value="00">유</option>
</select>
</td>
</tr>
<tr>
<td>이전 피·가해 여부 & 성적:</td>
<td>
<select name="CONT_MTD_CD" style="width:45%" >
<option value="00" selected="selected">무</option>
<option value="00">유 - 피해</option>
<option value="00">유 - 가해</option>
</select>
&nbsp;-&nbsp;
<select name="CONT_MTD_CD" style="width:45%" >
<option value="00" selected="selected">상</option>
<option value="00">중</option>
<option value="00">하</option>
</select>
</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldset" style="margin:3px">
<legend>심리상담 및 정신과 치료 경험</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="40%">심리상담 경험:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">무</option>
<option value="00">유</option>
</select>
</td>
</tr>
<tr>
<td>증세:</td>
<td>
<textarea class="bginput" style="width:100%;height:30px" readonly></textarea>
</td>
</tr>
<tr>
<td>상담기관명:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="상담기관" readonly/>
</td>
</tr>
<tr>
<td>상담기간:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="10개월" readonly/>
</td>
</tr>
<tr>
<td width="30%">정신과 치료경험 & 분류:</td>
<td>
<select name="CONT_MTD_CD" style="width:30%" >
<option value="00" selected="selected">무</option>
<option value="00">유</option>
</select>
<select name="CONT_MTD_CD" style="width:65%" >
<option value="00" selected="selected">우울</option>
<option value="00">불안</option>
<option value="00">ADHD</option>
<option value="00">기타</option>
</select>
</td>
</tr>
<tr>
<td>진단명:</td>
<td>
<textarea class="bginput" style="width:100%;height:30px" readonly></textarea>
</td>
</tr>
<tr>
<td>치료기관명:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="상담기관" readonly/>
</td>
</tr>
<tr>
<td>치료기간:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="10개월" readonly/>
</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldset" style="margin:3px">
<legend>기타 정보</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">기타 피해자 정보:</td>
<td>
<textarea class="bginput" style="width:100%;height:60px" readonly></textarea>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<!--TAB 3 End-->
<!--TAB 4 Start-->
<div class="x-layout-inactive-content" id="tab-4" style="margin-top:10px:width:100%">
<h2>&nbsp;4. 가해자 정보</h2>
<div id="acc-tb-4"></div>
<div id="acc-panel-4-2">
<div>2회차 상담 : 2007-05-17</div>
<div>
<div class="text-content" style="background-color:#EAF9FF">
<form method="post" name="vbform" id="form-10-2">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="96%" align="center">
<tr>
<td class="panelsurround" align="center">
<table class="panel" cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>인적 상황</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">이름:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="홍길동" readonly/>
</td>
</tr>
<tr>
<td>성별 & 나이:</td>
<td>
<select name="CONT_MTD_CD" style="width:40%" >
<option value="00" selected="selected">남</option>
<option value="00">여</option>
</select>
&nbsp;
<select name="CONT_MTD_CD" style="width:55%">
<option value="00" selected="selected">7세</option>
<option value="00">8세</option>
<option value="00">8세</option>
<option value="00">8세</option>
<option value="00">8세</option>
<option value="00">8세</option>
</select>
</td>
</tr>
<tr>
<td>학교:</td>
<td>
<input type="text" class="bginput" style="width:35%" value="안양서" readonly maxlength="10"/>
<select name="CONT_MTD_CD" style="width:30%" >
<option value="00" selected="selected">초등학교</option>
<option value="00">중등학교</option>
<option value="00">고등학교</option>
</select>
-
<select name="CONT_MTD_CD" style="width:20%" >
<option value="00" selected="selected">공립</option>
<option value="00">사립</option>
<option value="00">대안</option>
<option value="00">특수</option>
</select>
</td>
</tr>
<td>학력:</td>
<td>
<select name="CONT_MTD_CD" style="width:60%" >
<option value="00" selected="selected">초등학교 - 1학년</option>
<option value="00">초등학교 - 2학년</option>
<option value="00">초등학교 - 3학년</option>
<option value="00">초등학교 - 4학년</option>
<option value="00">초등학교 - 5학년</option>
</select>
-
<select name="CONT_MTD_CD" style="width:35%" >
<option value="00" selected="selected">재학중</option>
<option value="00">학업중단</option>
</select>
</td>
</tr>
<tr>
<td>유선전화:
</td>
<td>
<input type="text" class="bginput" style="width:100%" value="031-4444-9898" readonly maxlength="13"/>
</td>
</tr>
<tr>
<td>무선전화:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="010-0101-0101" readonly maxlength="13"/>
</td>
</tr>
<tr>
<td>E-Mail:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="test@test.com" readonly maxlength="20"/>
</td>
</tr>
<tr>
<td>주소:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">경기도</option>
<option value="00">강원도</option>
<option value="00">동작구</option>
<option value="00">노원구</option>
</select>
</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldset" style="margin:3px">
<legend>가족 및 개인 환경</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="40%">부모 양육태도:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">자녀방임</option>
<option value="00">과잉보호</option>
<option value="00">가정폭력</option>
<option value="00">지지적 가정</option>
<option value="00">억압·통제 가정</option>
<option value="00">평범</option>
</select>
</td>
</tr>
<tr>
<td width="30%">가족형태 & 경제수준:</td>
<td>
<select name="CONT_MTD_CD" style="width:40%" >
<option value="00" selected="selected">일반</option>
<option value="00">편부</option>
<option value="00">편모</option>
<option value="00">소년소녀 가장</option>
<option value="00">조손 가정</option>
<option value="00">친족</option>
<option value="00">시설</option>
</select>
<select name="CONT_MTD_CD" style="width:55%" >
<option value="00" selected="selected">기초생활 수급자</option>
<option value="00">차상위 계층</option>
<option value="00">중산층</option>
<option value="00">고소득층</option>
</select>
</td>
</tr>
<tr>
<td>가족 구성:</td>
<td>
<textarea class="bginput" style="width:100%;height:40px" readonly></textarea>
</td>
</tr>
<tr>
<td>성격 & 신체적 특성:</td>
<td>
<select name="CONT_MTD_CD" style="width:45%" >
<option value="00" selected="selected">외향</option>
<option value="00">내향</option>
<option value="00">적극</option>
<option value="00">소극</option>
<option value="00">보통</option>
</select>
-
<select name="CONT_MTD_CD" style="width:30%" >
<option value="00" selected="selected">왜소</option>
<option value="00">보통</option>
<option value="00">건장</option>
<option value="00">장애무</option>
<option value="00">장애유</option>
</select>
</td>
</tr>
<td>보충 기록:</td>
<td>
<textarea class="bginput" style="width:100%;height:40px" readonly></textarea>
</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldset" style="margin:3px">
<legend>기타 정보</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="30%">기타 가해자 정보:</td>
<td>
<textarea class="bginput" style="width:100%;height:60px" readonly></textarea>
</td>
</tr>
</table>
</fieldset>
</td>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>대외 환경</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="40%">친구관계:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">많다</option>
<option value="00">보통</option>
<option value="00">적다</option>
<option value="00">없다</option>
</select>
</td>
</tr>
<tr>
<td width="30%">폭력서클 가입경험:</td>
<td>
<select name="CONT_MTD_CD" style="width:45%" >
<option value="00" selected="selected">무</option>
<option value="00">유</option>
</select>
</td>
</tr>
<tr>
<td>이전 피·가해 여부 & 성적:</td>
<td>
<select name="CONT_MTD_CD" style="width:45%" >
<option value="00" selected="selected">무</option>
<option value="00">유 - 피해</option>
<option value="00">유 - 가해</option>
</select>
&nbsp;-&nbsp;
<select name="CONT_MTD_CD" style="width:45%" >
<option value="00" selected="selected">상</option>
<option value="00">중</option>
<option value="00">하</option>
</select>
</td>
</tr>
<tr>
<td valign="top">이전 처벌 경험:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">무</option>
<option value="00">유</option>
</select>
<span style="line-height:80%">
<input type="checkbox" name="chk01" id="chk01"/><label for="chk01">학교징계</label>
<input type="checkbox" name="chk01" id="chk02" checked disabled/><label for="chk02">경찰훈방</label><br/>
<input type="checkbox" name="chk01" id="chk03"/><label for="chk03">보호관찰1호</label>
<input type="checkbox" name="chk01" id="chk04"/><label for="chk04">보호관찰2호</label><br/>
<input type="checkbox" name="chk01" id="chk05"/><label for="chk05">보호관찰3호</label>
<input type="checkbox" name="chk01" id="chk06"/><label for="chk06">보호관찰4호</label><br/>
<input type="checkbox" name="chk01" id="chk07"/><label for="chk07">보호관찰5호</label>
<input type="checkbox" name="chk01" id="chk08"/><label for="chk08">보호관찰6호</label><br/>
<input type="checkbox" name="chk01" id="chk09"/><label for="chk09">보호관찰7호</label>
</span>
</td>
</tr>
</table>
</fieldset>
<fieldset class="fieldset" style="margin:3px">
<legend>심리상담 및 정신과 치료 경험</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td width="40%">심리상담 경험:</td>
<td>
<select name="CONT_MTD_CD" style="width:100%" >
<option value="00" selected="selected">무</option>
<option value="00">유</option>
</select>
</td>
</tr>
<tr>
<td>증세:</td>
<td>
<textarea class="bginput" style="width:100%;height:30px" readonly></textarea>
</td>
</tr>
<tr>
<td>상담기관명:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="상담기관" readonly/>
</td>
</tr>
<tr>
<td>상담기간:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="10개월" readonly/>
</td>
</tr>
<tr>
<td width="30%">정신과 치료경험 & 분류:</td>
<td>
<select name="CONT_MTD_CD" style="width:30%" >
<option value="00" selected="selected">무</option>
<option value="00">유</option>
</select>
<select name="CONT_MTD_CD" style="width:65%" >
<option value="00" selected="selected">우울</option>
<option value="00">불안</option>
<option value="00">ADHD</option>
<option value="00">기타</option>
</select>
</td>
</tr>
<tr>
<td>진단명:</td>
<td>
<textarea class="bginput" style="width:100%;height:30px" readonly></textarea>
</td>
</tr>
<tr>
<td>치료기관명:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="상담기관" readonly/>
</td>
</tr>
<tr>
<td>치료기간:</td>
<td>
<input type="text" class="bginput" style="width:100%" value="10개월" readonly/>
</td>
</tr>
</table>
</fieldset>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
<!--TAB 4 End-->
<!--TAB 5 Start-->
<div class="x-layout-inactive-content" id="tab-5" style="margin-top:10px:width:100%">
<h2>&nbsp;5. 사건상황 정보</h2>
<div id="acc-tb-5"></div>
<div id="acc-panel-5-2">
<div>2회차 상담 : 2007-05-17</div>
<div>
<div class="text-content" style="background-color:#EAF9FF">
<form method="post" name="vbform" id="form-10-2">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="96%" align="center">
<tr>
<td class="panelsurround" align="center">
<table class="panel" cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td align="left" valign="top" width="50%">
<fieldset class="fieldset" style="margin:3px">
<legend>폭력형태</legend>
<table cellpadding="0" cellspacing="3" border="0" width="100%">
<tr>
<td valign="top" width="35%">폭력유형:</td>
<td valign="top">
<span style="line-height:80%">
<input type="checkbox" name="chk01" id="chk01"/><label for="chk01">신체폭행</label>
<input type="checkbox" name="chk01" id="chk01"/><label for="chk01">금품갈취</label>
<input