<!-- 
var g_acc="#F7F8FF";
var g_ucc="#F7F8FF";
var env  = new Is();

function Is () {
		  var agent=navigator.userAgent.toLowerCase();

		  this.major = parseInt(navigator.appVersion);
		  this.minor = parseFloat(navigator.appVersion);

	this.nav = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
	this.navonly = (this.nav && ((agent.indexOf(";nav") != -1) || (agent.indexOf(";nav") != -1)));
		  this.nav2 = (this.nav && (this.major == 2));
		  this.nav3 = (this.nav && (this.major == 3));
		  this.nav4 = (this.nav && (this.major == 4));
		  this.nav6 = (this.nav && (this.major >= 4));

		  this.ie = (agent.indexOf("msie") != -1 && (agent.indexOf("opera") == -1));
		  this.ie3 = (this.ie && (this.major < 3));
		  this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie") == -1));
		  this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0") != -1));
		  this.ie5_5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.5") != -1));
		  this.ie6 = (this.ie && (this.major == 5 || this.major == 6));

		  this.nav6over = this.nav && (this.major >= 5);
		  this.ie5up  = (this.ie && !this.ie3 && !this.ie4);
		  this.ie5_5up = (this.ie && !this.ie3 && !this.ie4 && !this.ie5);

		  this.gecko = (agent.indexOf("gecko") != -1);

		  this.opera = (agent.indexOf("opera") != -1);
		  this.opera4 = (agent.indexOf("opera 4") != -1);
		  this.opera5 = ((agent.indexOf("opera 5") != -1) && (this.major == 5));
		  this.opera5over = (this.opera && (this.major >= 5));

		  /********************************************************************************************
		  * AOL BROWSER Upversion Checking
		  *********************************************************************************************
		  * AOL : AOL(IE)
		  * AOL3 : AOL(IE) 3
		  * AOL4 : AOL(IE) 4
		  * AOL5 : AOL(IE) 5.xx
		  * AOL6 : AOL(IE) 6.xx
		  ********************************************************************************************/
		  this.aol = (agent.indexOf("aol") != -1);
		  this.aol3 = (this.aol && this.ie3);
		  this.aol4 = (this.aol && this.ie4);
		  this.aol5 = (agent.indexOf("aol 5") != -1);
		  this.aol6 = (agent.indexOf("aol 6") != -1);

		  /********************************************************************************************
		  * HOTJAVA BROWSER Upversion Checking
		  *********************************************************************************************
	* HOTJAVA : Sun HotJava
	* HOTJAVA3 : Sun HotJava 3
	* HOTJAVA3UP : Sun HotJava 3.xx ~ Over
		  ********************************************************************************************/
		  this.hotjava = (agent.indexOf("hotjava") != -1);
		  this.hotjava3 = (this.hotjava && (this.major == 3));
		  this.hotjava3up = (this.hotjava && (this.major >= 3));

		  /********************************************************************************************
		  * MAC BROWSER VERSION Checking
		  *********************************************************************************************
		  * isIE3Mac : this section is designed specifically for IE3 for the Mac
		  ********************************************************************************************/
	this.isIE3Mac = (navigator.appVersion.indexOf("Mac")!=-1) && (navigator.appVersion.indexOf("MSIE"!=-1)) && (parseInt(navigator.appVersion) == 3);

	/********************************************************************************************
		  * BROWSER VERSION Checking
		  * WEBTV : Web TV
		  ********************************************************************************************/
		  this.webtv = (agent.indexOf("webtv") != -1);

		  /********************************************************************************************
		  * Operating System Checking
		  *********************************************************************************************
		  * WIN9X
		  * WINNT
		  * OS2
		  * SUN
		  * IRIX
		  * HPUX
		  * AIX
		  * LINUX
		  * UNIXWARE
		  * MAC
		  * FREEBSD
		  * BSD
		  * VMS
		  ********************************************************************************************/
		  this.win9x = (agent.indexOf("win") != -1);
		  this.winnt = (agent.indexOf("winnt") != -1);
		  this.os2 = (agent.indexOf("os/2") != -1);
		  this.sun = (agent.indexOf("sunos") != -1);
		  this.irix = (agent.indexOf("irix") != -1);
		  this.hpux = (agent.indexOf("hp-ux") != -1);
		  this.aix = (agent.indexOf("aix") != -1);
		  this.linux = (agent.indexOf("linux") != -1);
		  this.unixware = (agent.indexOf("unix_system_v") != -1);
		  this.mac = (agent.indexOf("mac") != -1);
		  this.freebsd = (agent.indexOf("freebsd") != -1);
		  this.bsd = (agent.indexOf("bsd") != -1);
		  this.vms = ((agent.indexOf("vax") != -1) || (agent.indexOf("openvms") != -1));

}
function sessionDebug() {
	window.open('/jsp/sample/june/sessionInfo.jsp','sessionInfo','width=400, height=200');
}

function isNull ( obj ) {

	isValid = true;

	if ( obj != null && obj != "null" && obj != "undefined" && obj != "" )
		isValid = false;

	return isValid;
}

function blankCheck(textValue) {
	var isValid = true;

	if(textValue == "" || textValue == null ) {
		isValid = false;
	} else {
		isValid = true;
	}

	return isValid;
}


function isValidateDOM () {

	isValid = true;

	if(env.ie5up || env.nav6over) {
		isValid = true;
	} else {
		isValid = false;
	}

	return isValid;
}



function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	 var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	 if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	 d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

if(typeof HTMLElement!="undefined" && !HTMLElement.prototype.insertAdjacentElement){
	HTMLElement.prototype.insertAdjacentElement = function(where,parsedNode){
		switch (where){
			case 'beforeBegin':
			case 'BeforeBegin':
					this.parentNode.insertBefore(parsedNode,this);
				break;
			case 'afterBegin':
			case 'AfterBegin':
					this.insertBefore(parsedNode,this.firstChild);
				break;
			case 'beforeEnd':
			case 'BeforeEnd':
					this.appendChild(parsedNode);
				break;
			case 'afterEnd':
			case 'AfterEnd':
					if (this.nextSibling) this.parentNode.insertBefore(parsedNode,this.nextSibling);
					else this.parentNode.appendChild(parsedNode);
				break;
		}
	}

	HTMLElement.prototype.insertAdjacentHTML = function(where,htmlStr) {
		var r = this.ownerDocument.createRange();
		r.setStartBefore(this);
		var parsedHTML = r.createContextualFragment(htmlStr);
		this.insertAdjacentElement(where,parsedHTML);
	}


	HTMLElement.prototype.insertAdjacentText = function(where,txtStr){
		var parsedText = document.createTextNode(txtStr);
		this.insertAdjacentElement(where,parsedText);
	}
}


function getStringLength(str) {
	return(str.length+(escape(str)+"%u").match(/%u/g).length-1);
}

function formNecessaryValidate (oForm) {

	for (var i = 0; i < oForm.length; i++) {
		if (oForm.elements[i].getAttribute("mandatory") != null) {
			if (getOnlyString(oForm.elements[i].value.trim()).length == 0) {
				alert (oForm.elements[i].alt + "을(를) 입력하세요!");

				if ( 'hidden' != oForm.elements[i].type )
					oForm.elements[i].focus();

				return false;
			}
		}
	}
	return true;
}

function getRadioCheckedValue (array) {
	var result;
	for (var i = 0; i < array.length; i++) {
		if ( array[i].checked ) {
			result = array[i].value;
			break;
		}
	}

	return result;
}

function getRadioCheckedTitle (array) {
	var result;
	for (var i = 0; i < array.length; i++) {
		if ( array[i].checked ) {
			result = array[i].title;
			break;
		}
	}

	return result;
}

function getOnlyString(str)
{
	var index, len;

	if ( isNull(str) ) {
		// remove the null string
		while(true) {
			index = str.indexOf(" ");
			if( index == -1 ) break;
			len = str.length;
			str = str.substring(0, index) + str.substring((index+1),len);
		}

		// remove the carrage return
		while(true) {
			index = str.indexOf("\r");
			if( index == -1 ) break;
			len = str.length;
			str = str.substring(0, index) + str.substring((index+2),len);
		}
	}

	return str;
}

function strTrim(str)
{
	 return str.replace(/(^\s*)|(\s*$)/g, "");
}


function checkChar(checkStr) {

	checkNumber = 0;
	tempStr = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';

	for (i=0; i<checkStr.length; i++) {
		for(j=0; j<tempStr.length; j++) {
			if (checkStr.charAt(i) == tempStr.charAt(j)) checkNumber++;
		}
	}

	if (checkNumber != checkStr.length) return false;
	else	return true;
}

function checkNumber(checkStr) {

	rValue = false;
	chkNum=0;
	tempStr = '0123456789';

	for (i=0; i<checkStr.length; i++) {
		for(j=0; j<tempStr.length; j++) {
			if (checkStr.charAt(i) == tempStr.charAt(j))
				chkNum++;
		}
	}

	if (chkNum != checkStr.length)
		rValue = false;
	else
		rValue = true;

	return rValue;
}

function checkNumberWithComma(checkStr) {

	rValue = false;
	checkNumber=0;
	tempStr = '0123456789.';

	for (i=0; i<checkStr.length; i++) {
		for(j=0; j<tempStr.length; j++) {
			if (checkStr.charAt(i) == tempStr.charAt(j))
				checkNumber++;
		}
	}

	if (checkNumber != checkStr.length)
		rValue = false;
	else
		rValue = true;

	return rValue;
}

function validateSize(str, size) {
	if( getStringLength(str) < size ) {
		return true;
	} else {
		return false;
	}
}

function onlyNumInput(obj){

	if (event.keyCode >= 48 && event.keyCode <= 57) {
		return true;
	} else {
		alert('숫자만 입력 가능합니다!');
		event.returnValue = false;
	}
}

function onlyHangul(obj){
	var str = obj.value;
	for(i=0; i<str.length; i++ ){
		if(!((str.charCodeAt(i) > 0x3130 && str.charCodeAt(i) < 0x318F) || (str.charCodeAt(i) >= 0xAC00 && str.charCodeAt(i) <= 0xD7A3))) {
			alert(obj.title+" have to insert korean.");
			obj.value = "";
			return false;
		} else {
		}
	}
}

function isValidURL(url){
    var RegExp = /^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/;
    if(RegExp.test(url)){
        return true;
    }else{
        return false;
    }
}



function popWindow (objName, src, width, height, toolbar, scrollbars, resizable) {
	var lSize = ( screen.width - width ) / 2;
	var tSize = ( screen.height - height ) / 2;

	var pWin = window.open( src,
				objName,
				"top="+tSize+",left="+lSize+",status=no,toolbar="+toolbar+",scrollbars="+scrollbars+",resizable="+resizable+",menubar=no,width="+width+",height="+height );

	if ( pWin ) eval(pWin).focus();

	return pWin;
}

function popWindowSubmit (form, objName, src, width, height, toolbar, scrollbars, resizable) {
	var lSize = ( screen.width - width ) / 2;
	var tSize = ( screen.height - height ) / 2;

	var wmd = window.open( "",
				objName,
				"top="+tSize+",left="+lSize+",status=no,toolbar="+toolbar+",scrollbars="+scrollbars+",resizable="+resizable+",menubar=no,width="+width+",height="+height );

	var prevTarget = form.target;
	form.target = objName;
	form.action = src;
	form.submit();
	form.target = prevTarget;

	if ( wmd ) eval(wmd).focus();

	return wmd;
}

function checkQuotChar(checkStr) {
	if ( checkStr == "" ) return true;

	result = true;

	quot = '"';
	apos = "'";

	if ( isNull(checkStr) ) alert ( "'checkStr' Values is NULL OR EMPTY!");

	for (i=0; i<checkStr.length; i++) {
		if (checkStr.charAt(i) == quot) {
			result = false;
			break;
		}
		if (checkStr.charAt(i) == apos) {
			result = false;
			break;
		}
	}

	return result;
}

function checkSpecialChar(checkStr) {
	if ( checkStr == "" ) return true;
	tempStr = '~`!@#$%^&*()_-+=|\\{}[]:;\'\"<>,.?/';

	if ( isNull(checkStr) ) alert ( "'checkStr' Values is NULL OR EMPTY!");

	for (i=0; i<checkStr.length; i++) {
		for(j=0; j<tempStr.length; j++) {
			if (checkStr.charAt(i) == tempStr.charAt(j))
				return false;
		}
	}

	return true;
}



function checkInterval(obj, min, max) {
	num = obj.value;

	if ( isNaO(max) && isNaO(min) ) {
		return false;
	} else if ( isNaO(min) ) {
		return false;
	} else if (isNaO(max) ) {
		return false;
	} else if ( compare(num, min) && compare(max, num) ) {
		return true;
	} else {
		obj.focus();
		return false;
	}
}

// compare
function compare(seed, tnum) {
	if ( seed >= tnum ) return true;
}

function isNaO ( obj ) {
	isValid = true;
	if ( obj != null && obj != "null" )
		isValid = false;
	return isValid;
}
function nvl( str, str2 ) {
	if ( str == null || str == "null" || str == "undefined" || str == '' ) return str2;
	else return str;
}

function check_jumin(input, input2) {

	
		var p_no	= new Array(13);
		var preg1	= input.value;
		var preg2	= input2.value;
		var last_id, no_mod, no_minus, no_last;
		
	if (preg1 == "123000"){
		return true;
	}
	else{
	
		if (preg1 == '' || preg1.length !=6) {
			input.focus();
			input.select();
			return false;
		}
	
		if (preg2 == '' || preg2.length !=7) {
			input2.focus();
			input2.select();
			return false;
		}
		if (!((preg2.substring(0,1) == '1') || (preg2.substring(0,1) == '2') || (preg2.substring(0,1) == '3') || (preg2.substring(0,1) == '4'))) {
			input2.focus();
			input2.select();
			return false;
		}
	
		last_id		= parseInt(preg2.substring(6,7));
		p_no[0]		= parseInt(preg1.substring(0,1)) * 2;
		p_no[1]		= parseInt(preg1.substring(1,2)) * 3;
		p_no[2]		= parseInt(preg1.substring(2,3)) * 4;
		p_no[3]		= parseInt(preg1.substring(3,4)) * 5;
		p_no[4]		= parseInt(preg1.substring(4,5)) * 6;
		p_no[5]		= parseInt(preg1.substring(5,6)) * 7;
		p_no[6]		= parseInt(preg2.substring(0,1)) * 8;
		p_no[7]		= parseInt(preg2.substring(1,2)) * 9;
		p_no[8]		= parseInt(preg2.substring(2,3)) * 2;
		p_no[9]		= parseInt(preg2.substring(3,4)) * 3;
		p_no[10]	= parseInt(preg2.substring(4,5)) * 4;
		p_no[11]	= parseInt(preg2.substring(5,6)) * 5;
		p_no[12]	= 0;
	
		for (var i	= 0; i < 12; i++) {
			p_no[12] = p_no[12] + p_no[i];
		}
		no_mod		= p_no[12] % 11;
		no_minus	= 11 - no_mod;
		no_last		= no_minus % 10;
	
		if (no_last != last_id) {
			input.focus();
			input.select();
			return false;
		}

		return true;
	}
}

function forignIdentity(foreignIdentity){
	if (foreignIdentity == ''){
		return false;
	}

	if (foreignIdentity.length != 13) {
		return false;
	}
	if ((foreignIdentity.charAt(6) == "5") || (foreignIdentity.charAt(6) == "6")) {
		birthYear = "19";
	}else if ((foreignIdentity.charAt(6) == "7") || (foreignIdentity.charAt(6) == "8")) {
		birthYear = "20";
	}else if ((foreignIdentity.charAt(6) == "9") || (foreignIdentity.charAt(6) == "0")) {
		birthYear = "18";
	}else{
		return false;
	}

	birthYear += foreignIdentity.substr(0, 2);
	birthMonth = foreignIdentity.substr(2, 2) - 1;
	birthDate = foreignIdentity.substr(4, 2);
	birth = new Date(birthYear, birthMonth, birthDate);

	if ( birth.getYear() % 100 != foreignIdentity.substr(0, 2) ||
		birth.getMonth() != birthMonth ||
		birth.getDate() != birthDate) {
		return false;
	}

	return true;
}


function telNoChk(objValue){
	if(strTrim(objValue).length <= 0) return false;
	 if(strTrim(objValue) == '') return true;

	 var text = objValue.split('-');
	 var arrNo = new Array('02'   
			 ,'031'   
			 ,'032'   
			 ,'033'  
			 ,'041'  
			 ,'042'  
			 ,'043'  
			 ,'051'  
			 ,'052'  
			 ,'053'  
			 ,'054'  
			 ,'055'  
			 ,'061'  
			 ,'062'  
			 ,'063'  
			 ,'064'  
			 ,'010'  
			 ,'011'
			 ,'016'
			 ,'017'
			 ,'018'
			 ,'019');

	 var newLen = objValue.length;
	 var flag = false;

	  if(newLen  < 11 ||
		 newLen  > 13 ||
		 text.length != 3 ||
		 text[1].length < 3 ||
		 text[2].length != 4)
	  {
		return false;
	  }

	  for(var i=0; i<arrNo.length; i++ )  {
		if(text[0] == arrNo[i]) {
		 flag = true;
		 break;
		}
	  }
	  if(!flag){
		return false;
	  }
	  return true;

}

function isID(m) {
	if(isNull(m)){
		return false;
	}
	m = strTrim(m).toUpperCase();
	var c = m.charAt(0);
	if(!('A' <= c && c <= 'Z')){
		return false;
	}
	var n = m.length;
	for(var i=1; i < n; i++) {
		c = m.charAt(i);
		if(!(('A' <= c && c <= 'Z') || ('0' <= c && c <= '9') ||
			 (c == '_'))){
			return false;
		}
	}
	return true;
}

var mArray = new Array(11);
for ( i=1 ; i<13 ; i++) mArray[i-1] = i;

//date object
var dateObj = new Date();

var selectedYear = dateObj.getFullYear();
var selectedMonth = 1;

var monthDays;
monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);

function convertDayByMonth (checkYear, checkMonth) {
	if (((checkYear % 4 == 0) && (checkYear % 100 != 0)) || (checkYear % 400 == 0))
		monthDays[1] = 29;
}

function selectCurrentYear(ySelectTag) {
	selectedYear = ySelectTag.options[ySelectTag.selectedIndex].value;
}

function selectCurrentMonth(mSelectTag, dayTag) {

	selectedMonth = mSelectTag.options[mSelectTag.selectedIndex].value;

	convertDayByMonth(selectedYear, selectedMonth);

	displayDay(dayTag);
}

function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11) {
	this[0] = m0;
	this[1] = m1;
	this[2] = m2;
	this[3] = m3;
	this[4] = m4;
	this[5] = m5;
	this[6] = m6;
	this[7] = m7;
	this[8] = m8;
	this[9] = m9;
	this[10] = m10;
	this[11] = m11;
}


//changeColor(this,'000000'); restoreColor(thsi);
function changeColor(obj,colorNo) {
	obj.style.backgroundColor = colorNo;
}

function restoreColor(obj) {
	obj.style.backgroundColor = '';
}

//changeFWBColor(this,'000000'); restoreFColor(thsi);
function changeWBColor(obj, colorNo, _borderStyle) {
	obj.style.backgroundColor = colorNo;

	obj.style.border = _borderStyle;
}

function restoreWBColor(obj) {
	obj.style.backgroundColor = '';
	obj.style.border = "solid #cccccc 1px";
}

//changeFColor(this,'000000'); restoreFColor(thi);
function changeFColor(obj, colorNo) {
	obj.style.color = colorNo;
}

//changeFColor(this,'000000'); restoreFColor(thsi);
function restoreFColor(obj, colorNo) {
	obj.style.color = colorNo;
}

function convertFromNRToBR ( _str ) {

	if ( null != _str && 'undefined' != _str ) {
		_temp = _str.replace(/\r\n/gi, "<br>")
	} else {
		_temp = "";
	}

	return _temp;
}

function convertFromBRToNR ( _str ) {

	if ( null != _str && 'undefined' != _str ) {
		_temp = _str.replace(/<BR>/gi, "\r\n");
	} else {
		_temp = "";
	}

	return _temp;
}

function convertFromNRToBlank ( _str ) {
	if ( null != _str && 'undefined' != _str ) {
		_temp = _str;
		while( _temp.substr(_str.length-2, 2) == "\r\n" ) {
			_temp = _temp.substr(0, _temp.length - 2);
		}
	} else {
		_temp = "";
	}

	return _temp;
}


//create innerWindow
function setInnerWindow(url, inWinWidth, inWinHeight, inWinScrolling, _innerFrameName) {

	//document.body.style.overflow = "hidden";

	inWin = getObject(_innerFrameName);

	getInnerWindow(inWin, url, inWinWidth, inWinHeight, inWinScrolling);

	getInnerWindowShow(inWin);
	centerInnerWindow();
	
	Event.observe (window, "resize", centerInnerWindow);
	Event.observe (window, "scroll", centerInnerWindow);
}
function centerInnerWindow(event) {
	thisDIVObject = getStyleObject( inWin );
	
	var docElem = document.documentElement;
	var leftPos = ( (self.innerWidth || (docElem&&docElem.clientWidth) || document.body.clientWidth) - parseInt(inWin.clientWidth) ) / 2;
	var topPos = ( (self.innerHeight || (docElem&&docElem.clientHeight) || document.body.clientHeight) - parseInt(inWin.clientHeight) ) / 2;
	var scrollX = self.pageXOffset || (docElem&&docElem.scrollLeft) || document.body.scrollLeft;
	var scrollY = self.pageYOffset || (docElem&&docElem.scrollTop) || document.body.scrollTop;
	
	thisDIVObject.left = leftPos + scrollX;
	thisDIVObject.top = topPos + scrollY;
}
//create innerWindow width event position
function setInnerWindowEvent(_event, url, inWinWidth, inWinHeight, inWinScrolling, _innerFrameName) {

	inWin = getObject(_innerFrameName);

	getInnerWindowEvent(_event, inWin, url, inWinWidth, inWinHeight, inWinScrolling);

	getInnerWindowShow(inWin);
}

//create innerWindow width event position
function setInnerWindowEventLeft(_event, url, inWinWidth, inWinHeight, inWinScrolling, _innerFrameName) {

	inWin = getObject(_innerFrameName);

	getInnerWindowEventLeft(_event, inWin, url, inWinWidth, inWinHeight, inWinScrolling);

	getInnerWindowShow(inWin);
}

//create innerWindow width event position
function setInnerWindowEventRight(_event, url, inWinWidth, inWinHeight, inWinScrolling, _innerFrameName) {

	inWin = getObject(_innerFrameName);

	getInnerWindowEventRight(_event, inWin, url, inWinWidth, inWinHeight, inWinScrolling);

	getInnerWindowShow(inWin);
}

//create innerWindow width event position
function setInnerWindowEventAlignCenter(event, url, inWinWidth, inWinHeight, inWinScrolling, _innerFrameName) {

	inWin = getObject(_innerFrameName);

	getInnerWindowEventAlignCenter(event, inWin, url, inWinWidth, inWinHeight, inWinScrolling);

	getInnerWindowShow(inWin);
}

//exit innerWindow
function exitInnerWindow(_innerFrameWin) {

	inWin = getObject(_innerFrameWin);

	getInnerWindowHide(inWin);
	if ( window && window.document && window.document.body && window.document.body.style )
		//window.document.body.style.overflow = "";

	Event.stopObserving (window, "resize", centerInnerWindow);
}
function getObject ( el ) {
	obj = $(el);
	return obj;
}
function getStyleObject ( el ) {
	var styleObject = null;
	if ( el ) {
		if ( el.style )
			styleObject = el.style;
		else
			styleObject = el;
	}

	return styleObject;
}
// inner window ( in DIV )
function getInnerWindow (iwObject, iwSrc, iwWidth, iwHeight, iwScrolling) {

	inWinIFSrc = "<iframe name='inWinIF' id='inWinIF' src='"+iwSrc+"' width='"+iwWidth+"' height='"+iwHeight+"' frameborder='no' marginwidth='0px' marginheight='0px' style='border:0px;padding:0px;margin:0px' scrolling='"+iwScrolling+"'></iframe>";

	//getStyleObject() is declared in env.js
	thisDIVObject = getStyleObject( iwObject );

	var leftPos = ( document.body.clientWidth - parseInt(iwWidth) ) / 2;
	var topPos = ( document.body.clientHeight - parseInt(iwHeight) ) / 2;

	thisDIVObject.width = iwWidth;
	thisDIVObject.height = iwHeight;
	thisDIVObject.left = leftPos;
	thisDIVObject.top = topPos;

	iwObject.innerHTML = inWinIFSrc;
}

// inner window ( in DIV ) width event
function getInnerWindowEvent (_event, iwObject, iwSrc, iwWidth, iwHeight, iwScrolling) {
	inWinIFSrc = "<iframe name='inWinIF' id='inWinIF' src='"+iwSrc+"' width='"+iwWidth+"' height='"+iwHeight+"' frameborder='no' scrolling='"+iwScrolling+"' style='padding:0px;margin:0px'></iframe>";

	//getStyleObject() is declared in env.js
	thisDIVObject = getStyleObject( iwObject );

	thisDIVObject.width = iwWidth;
	thisDIVObject.height = iwHeight;

	thisDIVObject.left = document.body.scrollLeft + _event.clientX - iwWidth;
	thisDIVObject.top = document.body.scrollTop + _event.clientY;
	//tmpTopPos = parseInt(event.clientY-iwHeight);
	//tmpTopPos = parseInt(event.clientY);
	//if ( tmpTopPos < 0 ) tmpTopPos = 0;
	//thisDIVObject.top = tmpTopPos;


	iwObject.innerHTML = inWinIFSrc;
}

// inner window ( in DIV ) width event
function getInnerWindowEventLeft (_event, iwObject, iwSrc, iwWidth, iwHeight, iwScrolling) {
	inWinIFSrc = "<iframe name='inWinIF' id='inWinIF' src='"+iwSrc+"' width='99%' height='98%' frameborder='no' scrolling='"+iwScrolling+"' marginwidth='0' marginheight='0' style='padding:5 5 5 5;'></iframe>";

	//getStyleObject() is declared in env.js
	thisDIVObject = getStyleObject( iwObject );

	thisDIVObject.width = iwWidth;
	thisDIVObject.height = iwHeight;

	thisDIVObject.left = document.body.scrollLeft + _event.clientX - iwWidth;
	thisDIVObject.top = document.body.scrollTop + (_event.clientY/2);
	//tmpTopPos = parseInt(event.clientY-iwHeight);
	//tmpTopPos = parseInt(event.clientY);
	//if ( tmpTopPos < 0 ) tmpTopPos = 0;
	//thisDIVObject.top = tmpTopPos;


	iwObject.innerHTML = inWinIFSrc;
}

// inner window ( in DIV ) width event
function getInnerWindowEventRight (_event, iwObject, iwSrc, iwWidth, iwHeight, iwScrolling) {
	inWinIFSrc = "<iframe name='inWinIF' id='inWinIF' src='"+iwSrc+"' width='99%' height='98%' frameborder='no' scrolling='"+iwScrolling+"' marginwidth='0' marginheight='0' style='padding:5 5 5 5;'></iframe>";

	//getStyleObject() is declared in env.js
	thisDIVObject = getStyleObject( iwObject );

	thisDIVObject.width = iwWidth;
	thisDIVObject.height = iwHeight;

	thisDIVObject.left = document.body.scrollLeft + _event.clientX;
	thisDIVObject.top = document.body.scrollTop + (_event.clientY/2);
	//tmpTopPos = parseInt(event.clientY-iwHeight);
	//tmpTopPos = parseInt(event.clientY);
	//if ( tmpTopPos < 0 ) tmpTopPos = 0;
	//thisDIVObject.top = tmpTopPos;


	iwObject.innerHTML = inWinIFSrc;
}

// inner window ( in DIV ) width event
function getInnerWindowEventAlignCenter (event, iwObject, iwSrc, iwWidth, iwHeight, iwScrolling) {

	inWinIFSrc = "<iframe name='inWinIF' id='inWinIF' src='"+iwSrc+"' width='100%' height='100%' frameborder='no' scrolling='"+iwScrolling+"' style='padding:0px; margin:0px;'></iframe>";

	//getStyleObject() is declared in env.js
	thisDIVObject = getStyleObject( iwObject );

	thisDIVObject.width = iwWidth;
	thisDIVObject.height = iwHeight;

	thisDIVObject.left = (parseInt(screen.availWidth) - parseInt(iwWidth))/2;
	thisDIVObject.top = ( document.body.clientHeight - parseInt(iwHeight) ) / 2;

	iwObject.innerHTML = inWinIFSrc;
}


// inner window ( in DIV ) visible
function getInnerWindowShow (iwObject) {
	//message() si declared in env.js
	//conceal() is message div visibility set to hide
	mi = new message();

	mi.look(iwObject);
}

// inner window ( in DIV ) hidden
function getInnerWindowHide (iwObject) {
	//message() si declared in env.js
	//conceal() is message div visibility set to hide
	mi = new message();

	iwObject.innerHTML = "";

	mi.conceal(iwObject);
}

function isOldNAV () {

	isValid = true;

	if ( env.nav6 )
		isValid = true;
	else
		isvalid = false;

	return isValid;
}
var visibleValue = new Array(3);
var inVisibleValue = new Array(3);

//DOM and IE
visibleValue[0] = "visible";
//NS
visibleValue[1] = "show";
visibleValue[2] = "";

//DOM and IE
inVisibleValue[0] = "hidden";
//NS
inVisibleValue[1] = "hide";
inVisibleValue[2] = "none";

//message class
function message() {

	this.display = function( _target, _message ) {

		//cross browsing
		if ( _target.innerText ) {
			_target.innerText = _message;
		} else {
				while ( _target.hasChildNodes() )
					_target.removeChild( _target.firstChild );

			_target.appendChild( document.createTextNode(_message) );
		}
	}

	this.look = function( el ) {

		_target = getStyleObject(el);

		if ( !isValidateDOM() && isOldNAV() )
			_target.visibility = visibleValue[1];
		else
			_target.visibility = visibleValue[0];

		_target.padding = "2";
	}

	this.conceal = function( el ) {

		_target = getStyleObject(el);

		if ( !isValidateDOM() && isOldNAV() )
			_target.visibility = inVisibleValue[1];
		else
			_target.visibility = inVisibleValue[0];
	}
	this.show = function( el ) {

		_target = getStyleObject(el);
		_target.display = visibleValue[2];
	}

	this.hide = function( el ) {

		_target = getStyleObject(el);
		_target.display = inVisibleValue[2];
	}
}

String.prototype.trim = function() {
	return this.replace(/(^\s*)|(\s*$)/gi, "");
}

String.prototype.replaceAll = function(str1, str2) {
	var temp_str = "";

	if (this.trim() != "" && str1 != str2) {
		temp_str = this.trim();

		while (temp_str.indexOf(str1) > -1) {
			temp_str = temp_str.replace(str1, str2);
		}
	}

	return temp_str;
 }

function replaceDelimiter( _str, _delimiter, _dest ) {
	_temp = _str.replaceAll(_delimiter, _dest);

	return _temp;
}

function formatDate( _str ) {

	var _temp = _str;

	if ( null != _str && 'undefined' != _str && 'null' != _str) {
		if ( 10 < _str.length ) {
			_temp = _str.substring(0, 10);
		}
	}

	return _temp;
}

function convertDate( _str ) {
	var _temp = "";

	if ( null!= _str && 'undefined' != _str && 'null' != _str) {
		_temp = _str.substr(0,4) + "-" + _str.substr(4,2) + "-" + _str.substr(6,2);
	}

	return _temp;
}
function convertDateComma( _str ) {
	var _temp = "";

	if ( null!= _str && 'undefined' != _str && 'null' != _str) {
		_temp = _str.substr(0,4) + "." + _str.substr(5,2) + "." + _str.substr(8,2);
	}

	return _temp;
}

function convertDateWithTime(_date) {
	var _temp = "";

	if ( null != _date && 'undefined' != _date && 'null' != _date) {
		_temp = _date.substr(0,4) + "/" + _date.substr(5,2) + "/" + _date.substr(8,2) + " (" + _date.substr(11,2) + ":" + _date.substr(14, 2) + ")";
	}

	return _temp;
}


function boundNullToString(_str) {
	if ( null == _str || 'undefined' == _str || 'null' == _str )
		_str = "";
	return _str;
}


function convertNumber(num) {
	var i=0, j;
	var len, startStrLen, divideNum;
	var tmpStr, remainStr, startStr, resultStr;
	num = num + "";

	var minusFlag = (num.indexOf('-') == -1);
	num = (minusFlag)?num:num.substring(1, num.length);
	len = num.length;
	divideNum = Math.floor(len / 3);
	startStrLen = len % 3;

	resultStr = num.substr(0, startStrLen );

	remainStr =  num.substr(startStrLen, len - startStrLen );
	tmpStr = "";

	if ( remainStr != "" ) {
		for ( i = 0; i < divideNum ; i++ ) {
			tmpStr = tmpStr + "," + remainStr.substr(i*3, 3);
		}
	}

	resultStr = resultStr + tmpStr;

	if ( startStrLen == 0 )
		resultStr = resultStr.substr(1, resultStr.length - 1);

	resultStr = (minusFlag)?resultStr:'-'+resultStr;
	return resultStr;
}

function concatString( _str, _len ) {
	var _return = "";

	if ( null != _str && 'undefined' != _str && "null" != _str ) {

		if ( getStringLength(_str) > _len ) {
			_return = _str.substring(0, _len-1) + "...";
		} else {
			_return = _str;
		}
	}

	return _return;
}

function concatStringToLine( _str, _maxlength, _line ) {
	var _return = "";
	var lineNum = _line;

	if ( null != _str && 'undefined' != _str && "null" != _str ) {

		if ( _str.length > _maxlength ) {
			var _temp = _str.split("\r\n");

			for(var i=0; i < lineNum; i++) {
				var lineLength = getStringLength(_temp[i]);
				lineNum = lineNum - ( Math.round(lineLength / _maxlength));

				if( i < lineNum-1 ) {
					_return += _temp[i] + "\r\n";
				} else if( lineLength > _maxlength ){
					_return += _temp[i].substr(0, _maxlength) + "...";
				} else {
					_return += _temp[i];
				}
			}
		}
	}

	return _return;
}


function replaceStringWithOthers ( _str ) {
	var _return = "";

	if ( null != _str && "null" != _str && "undefined" != _str && getOnlyString(_str).length > 6 ) {
		_return = _str.substr(0, 6) + "-*******";
	} else {
		_return = _str;
	}

	return _return;
}


function replaceStringWithBirth ( _str ) {
	var _return = "";

	if ( null != _str && "null" != _str && "undefined" != _str && getOnlyString(_str).length == 8 ) {
		_return = _str.substr(0, 4) + ".";
		_return += _str.substr(4, 2) + ".";
		_return += _str.substr(6, 2);
	} else {
		_return = _str;
	}

	return _return;

}

function isValidDateOrder(sdate, edate, cdate) {

	var _isValidateFlag = false;

	if ( compareDate (sdate, cdate) > 0 && compareDate (cdate, edate) > 0 )
		_isValidateFlag = true;

	return _isValidateFlag
}

function compareDate (sdatestring, edatestring) {
	var lastIndex = -1;

	while (sdatestring.indexOf (".") != -1) {
		sdatestring = sdatestring.replace (".", "-");
	}

	while (edatestring.indexOf (".") != -1) {
		edatestring = edatestring.replace (".", "-");
	}

	lastIndex = sdatestring.indexOf("-");
	var syear = sdatestring.substring (0, lastIndex);
	lastIndex = sdatestring.indexOf("-", lastIndex + 1)
	var smonth = sdatestring.substring (syear.length + 1, lastIndex);
	smonth = (smonth.charAt(0) == '0') ? smonth.substring(1) : smonth;
	var sday = sdatestring.substring (lastIndex + 1, sdatestring.length);
	sday = (sday.charAt(0) == '0') ? sday.substring(1) : sday;

	lastIndex = -1;
	lastIndex = edatestring.indexOf("-");
	var eyear = edatestring.substring (0, lastIndex);
	lastIndex = edatestring.indexOf("-", lastIndex + 1)
	var emonth = edatestring.substring (eyear.length + 1, lastIndex);
	emonth = (emonth.charAt(0) == '0') ? emonth.substring(1) : emonth;
	var eday = edatestring.substring (lastIndex + 1, edatestring.length);
	eday = (eday.charAt(0) == '0') ? eday.substring(1) : eday;

	var sdate = new Date (parseInt(syear), parseInt(smonth) - 1, parseInt(sday));
	var edate = new Date (parseInt(eyear), parseInt(emonth) - 1, parseInt(eday));

	var termMilli = edate.getTime() - sdate.getTime()

	return termMilli / 1000 / 60 / 60 / 24;
}


	var isEmail = function(s) {
	  return s.search(/^\s*[\w\~\-\.]+\@[\w\~\-]+(\.[\w\~\-]+)+\s*$/g)>=0;
	};

	var isSms = function(s) {
	  return s.search(/^0(?:\d{1}|\d{2}|\d{3}|\d{4})-(?:\d{3}|\d{4})-\d{4}$/g)>=0;
	};
	/* ****************** Message Send  END ******************** */

	function limitTextarea(obj, max) {
		var size = getStringLength(obj.value);
		if(max <= size) {
			obj.value = obj.value.substring(0, obj.value.length-2);
			return;
		}
	}

	function fckIsNull(str){
		var result='';
		if(strTrim(str) != ''){
			result = str.replaceAll('<p>','').replaceAll('</p>','').replaceAll('&nbsp;','');
			if(strTrim(result) == ''){
				return true;
			}else{
				return false;
			}
		}else{
			return true;
		}
	}

	var nvlCnt = function (p, r) {
		return (!isNaN(p) && (p))?convertNumber(p):((isNaN(r) || r == null)?'&nbsp;':r);
	};
	var nvlScore= function (p, r) {
		return getFloat(p, 1, (isNaN(r) || r == null)?'&nbsp;':r);
	};
	var nvlRate= function (p, r) {
		return getFloat(p, 0, (isNaN(r) || r == null)?'&nbsp;':r);
	};

	var getFloat = function (p, pow, r) {
		return  (!isNaN(p) && (p))?Math.round(p*Math.pow(10, (pow)?pow:0))/Math.pow(10, (pow)?pow:0):( (isNaN(r) || r == null)?'&nbsp;':r);
	};

var bodytemp;
var pressCnt=0;
function doitConfirm(text,resultfn,butt1,butt2){
	Ext.onReady(function(){

		Ext.MessageBox.buttonText["yes"]=butt1;
		Ext.MessageBox.buttonText["no"]=butt2;
		Ext.MessageBox.confirm('OMEGA', text, dlogresult_proc);
		bodytemp=document.getElementsByTagName("BODY")[0];
		bodytemp.onkeydown = dlogkeyDown;
		function dlogresult_proc(btn){
			dlogresult(resultfn,btn);
		};
	});

}

function doitAlert(text,resultfn,butt1){
	Ext.onReady(function(){
		Ext.MessageBox.buttonText["ok"]=butt1;
		Ext.MessageBox.alert('OMEGA', text, dlogresult_proc);
		bodytemp=document.getElementsByTagName("BODY")[0];
		bodytemp.onkeydown = dlogkeyDown;
		function dlogresult_proc(btn){
			dlogresult(resultfn,btn);
		};
	});

}

function dlogkeyDown(e){
	var event = e ? e : window.event;
	var keycode = event.keyCode;

	if(keycode==9){
			if(pressCnt%2==0){
				if(temp_tab2 != null && temp_tab2 !='' && temp_tab2 !=undefined)temp_tab2.focus();
			}else{
				if(temp_tab1 != null && temp_tab1 !='' && temp_tab1 !=undefined)temp_tab1.focus();
			}
			pressCnt++;
		if(navigator.appName == 'Netscape'){
			return false;
		}else{
			event.returnValue = false;
			return false;
		}
	}
}

function dlogresult(resultfn,btn){
	temp_tab1=null;
	temp_tab2=null;
	pressCnt=0;
	bodytemp.onkeydown ='';
	resultfn(btn);
}

function aomor(obj){
	obj.style.backgroundColor=g_acc;
}
function aomot(obj){
	obj.style.backgroundColor="";
}
function uomor(obj){
	obj.style.backgroundColor=g_ucc;
}
function uomot(obj){
	obj.style.backgroundColor=""
}
/**
 * 	_sDelimeter - (default:' ')
 * 	_sDaySuffix - (default:'')
 * 	_sHourSuffix - (default:'')
 * 	_sMinuteSuffix - (default:'')
 * 	_sSecondSuffix - (default:'')
 */
function convertSecondToTerm (_nSecond, _sDelimeter, _sDaySuffix, _sHourSuffix, _sMinuteSuffix, _sSecondSuffix) {
	if ( !_sDelimeter ) _sDelimeter = '';
	if ( !_sDaySuffix ) _sDaySuffix = '';
	if ( !_sHourSuffix ) _sHourSuffix = ':';
	if ( !_sMinuteSuffix ) _sMinuteSuffix = ':';
	if ( !_sSecondSuffix ) _sSecondSuffix = '';

	var result = "";
	if ( _nSecond > 0 ) {
		var tmp = _nSecond;
		var day = parseInt(tmp / (24 * 60 * 60));
		tmp = tmp % (24 * 60 * 60);
		var hour = parseInt(tmp / (60 * 60));
		tmp = tmp % (60 * 60);
		var minute = parseInt(tmp / 60);
		tmp = tmp % 60;
		if ( day != 0 ) {
			if(day < 10)  day = "0"+day;
				result += day + _sDaySuffix + _sDelimeter;
		}
		if ( hour != 0 ) {
			if(hour < 10)  hour = "0"+hour;		
			result += hour + _sHourSuffix + _sDelimeter;
		}
		if ( minute != 0 ) {
			if(minute < 10)  minute = "0"+minute;				
			result += minute + _sMinuteSuffix + _sDelimeter;
		}

		if ( tmp != 0 ) {
			if(tmp < 10){
				tmp = "0"+tmp;
			}  

			if(minute == 0){
				result += "00:";
			}						
			result += tmp + _sSecondSuffix + _sDelimeter;
		}else{
			result += "00";
		}
	}else{
		result = "00:00";
	}
	return result;
}

/*
 *  자리수에 맞게 문자열을 잘라서 리턴해 주는 함수
 */
 
 function getStringBySize( data, size ) {
    var len = 0;
    var str = data.substring(0);
    var retStr = '';
    var flag = true;

    if ( str == null ) return 0;

    for(var i=0; i < str.length; i++) {
        var ch = escape(str.charAt(i));

        if( ch.length == 1 ) {
        	len++;
        } else if( ch.indexOf("%u") != -1 ) {
        	len += 2;
        } else if( ch.indexOf("%") != -1 ) {
        	len += ch.length/3;
        }
        
        retStr += str.charAt(i);
        
        if( len > size ) {
        	flag = false;
        	break;
        }
    }

    return retStr + ( flag ? "" : "...");
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


	var doit_Manager = function ( call_name, searchMap, key_array) {
		var _result = null;
		DWREngine.setAsync(false);
		if ( arguments.length < 3 ) {
			eval(call_name)(searchMap,{
				callback : function(dataFromServer) {
					_result = dataFromServer;
				}, errorHandler : function(errorMessage) {
					alert("Error Message : " + errorMessage);
				}
			});

		} else {
			eval(call_name)(searchMap, key_array,{
				callback : function(dataFromServer) {
					_result = dataFromServer;
				}, errorHandler : function(errorMessage) {
					alert("Error Message : " + errorMessage);
				}
			});
		}
		DWREngine.setAsync(true);
		return _result;
	};
	
	function fileDownload2(save, view, path){ 
		   // Form객체를 만들고 속성값들을 추가함
		   
		    var oForm = document.createElement("<form name=fomAction></form>");
		    var hiddenFrame = document.createElement("<iframe id='fileDownloadHidden' name='fileDownloadHidden' width='0' height='0'></iframe>");
		   
		    oForm.method = "post";
		    oForm.action = "/FileDownLoader";
		    oForm.target='fileDownloadHidden';
		   
		    var saveName = document.createElement("<input type = hidden name='saveName'>");
		    saveName.value = save;
		   
		    var viewName = document.createElement("<input type = hidden name='viewName'>");
		    viewName.value = view;

		    var savePath = document.createElement("<input type = hidden name='filePath'>");
		    savePath.value = path;
		   
		    oForm.appendChild(saveName);
		    oForm.appendChild(viewName);
		    oForm.appendChild(savePath);
		   
		    // Body안에 Form을 넣음
		    document.body.appendChild(hiddenFrame);
		    document.body.appendChild(oForm);
		   
		    // 해당 Form을 Submit함
		    oForm.submit();
		    document.body.removeChild(hiddenFrame);
		    document.body.removeChild(oForm);
	}
	
	function fileDownload(save, view, path){ 
				var oForm = document.getElementById("formAction");
		    oForm.method = "post";
		    oForm.action = "/FileDownLoader";
		    oForm.target='fileDownloadHidden';
		   
		    oForm.saveName.value = save;
		    oForm.viewName.value = view;
		    oForm.filePath.value = path;
		   
		    // 해당 Form을 Submit함
		    oForm.submit();
	}
//-->