// JavaScript Documentvar request = false;
var wait_html = '<table width=160 border="0" cellspacing="0" cellpadding="0" align=center><tr><td height=100 align=center style="background-image:url(/_direct/images/wait_bg.gif);"><img src="/_direct/images/wait.gif" /><br><br>잠시기다려 주세요.</td></tr></table>';
// 엑셀 스타일의 반올림 함수 정의
function roundXL(n, digits) {
  if (digits >= 0) return parseFloat(n.toFixed(digits)); // 소수부 반올림

  digits = Math.pow(10, digits); // 정수부 반올림
  var t = Math.round(n * digits) / digits;

  return parseFloat(t.toFixed(0));
}

function comma(str) {
  str = String(str);
  len = str.length;
  str1 = "";

  for(i=1; i<=len; i++) {
   str1 = str.charAt(len-i)+str1;
   if((i%3 == 0)&&(len-i != 0)) str1 = ","+str1;
  }
  return str1;
 }
// JavaScript Document
    // ajax 통신중 대기 메세지 출력 (show_waiting_message값을 false로 세팅시 보이지 않음)
function wait_message_view() {
	var waiting_obj = xGetElementById("waitingforserverresponse");

    if(waiting_obj) {
        xInnerHtml(waiting_obj, waiting_message);

        xTop(waiting_obj, xScrollTop()+20);
        xLeft(waiting_obj, xScrollLeft()+20);
        waiting_obj.style.visibility = "visible";
    }
}

function wait_message_hide() {
	var waiting_obj = xGetElementById("waitingforserverresponse");
	if(waiting_obj) waiting_obj.style.visibility = "hidden";
}

function check_email_host(obj, obj_etc) {
	if (obj.value == "직접입력") {
		obj_etc.readOnly = false;
		obj_etc.focus();
	}
	else {
		obj_etc.readOnly = true;
	}
}

function onlynum_check() {
	if((event.keyCode < 48) || (event.keyCode > 57))
	  event.returnValue = false;
}

function onlyfloatnum_check() {
	if(!((event.keyCode != 47) && (event.keyCode >= 45) && (event.keyCode <= 57))) {
	  event.returnValue = false;
	 }
}

/**
 *@author boy0
 * ajax로 로딩후 내용물의 자바스크립트를 로딩하기 위한 유틸 제공.
 *	사용예1: testDiv라는 아이디를 가진 div태그안에 file.html을 로딩하고 file.html의 스크립트를 로딩한다.  
 *		LazyLoader.load({el:'testDiv', url:'file.html'});
 *	사용예2: loadedDiv라는 아이디를 가진 div태그안에 내용중 스크립트를 로딩한다.
 *		LazyLoader.loadAllScriptIn('loadedDiv');
 * 파일명으로 자바스크립트나 css를 로딩하는 함수도 별도로 제공.
 *	사용예3: 'file.js'를 head에 로딩한다.
 *		LazyLoader.loadScript('file.js');
 *	사용예4: '/scripts/'경로에 있는 'file.js'를 'testDiv'에 로딩한다.
 *		LazyLoader.loadScript('file.js', '/scripts/', 'testDiv');
 *	사용예5: 'file.css'를 head에 로딩한다.
 *		LazyLoader.loadCss('file.css');
 *	사용예6: '/css/'경로에 있는 'file.css'를 'testDiv'에 로딩한다.
 *		LazyLoader.loadScript('file.css', '/css/', 'testDiv');
 */

var LazyLoader = {
	// 설정 부분. 블랙 리스트
	notAllowed: [
		//'gmodules.com'
	],
	checkNotAllowed: function(path) {
		var list = this.notAllowed;
		for (var i=0; i<list.length; i++) {
			if(path.indexOf(list[i]) != -1) {
				return true;
			}
		}
		return false;	// It's allowed
	},
	// Ext JS의 Element.load()와 비슷하다. 하지만 Ext 라이브러리 없이 작동한다.
	// 가능한 options로는... (Ext보다 제한적이다)
	// el : 반드시 필요하다. 로드한 데이터가 들어갈 대상이 되는 엘리먼트 또는 그 id
	// url : 반드시 필요하다.
	// method : get 또는 post (기본값 get)
	// postData : post 방식인 경우 전송할 데이터
	// callback : 함수(options, success, response)
	// success : 함수(response, options)
	// failure : 함수(response, options)
	// scope : 콜백 함수들에서 this로 사용될 값
	// baseUri : 스크립트를 로드할때 사용할 baseUri 
	// scriptTargetEl : 스크립트 태그를 붙일 엘리먼트 또는 그 id 
	// (비어 있는 경우 스크립트태그가 있던 자리에 대체 되므로 비워두길 추천함)
	load: function(options) {
		if (!options.el || !options.url) return false;
		var el = this.get(options.el);
		var baseUri = options.baseUri || options.url;
		var method = options.method || 'get';
		var xmlhttp = false;
		if (window.XMLHttpRequest) {
			xmlhttp = new XMLHttpRequest();
		} else if (window.ActiveXObject) {
			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
		}
		xmlhttp.open(method, options.url);
		xmlhttp.onreadystatechange = function () {
			if (xmlhttp.readyState == 4) {
				var success = (xmlhttp.status == 200);
				if (success) {
					LazyLoader.update(el, xmlhttp.responseText);
					LazyLoader.loadAllScriptIn(el, baseUri, options.scriptTargetEl);
					if (typeof options.success == "function") {
						options.success.apply(options.scope, [xmlhttp, options]);
					}
				} else {
					if (typeof options.failure == "function") {
						options.failure.apply(options.scope, [xmlhttp, options]);
					}
				}
				if (typeof options.callback == "function") {
					options.callback.apply(options.scope, [options, success, xmlhttp]);
				}
			}
		};
		xmlhttp.send(options.postData);
	},
	loadExt: function(options) {
		if (!options.el || !options.url) return false;
		var el = Ext.get(options.el);
		var baseUri = options.baseUri || options.url;
		var userSuccess = options.success;
		options.success = function(r, o){
			LazyLoader.update(el.dom, r.responseText);
			LazyLoader.loadAllScriptIn(el.dom, baseUri, options.scriptTargetEl);
			if (typeof userSuccess == "function") {
				userSuccess.apply(options.scope, [r, o]);
			}
		};
		Ext.Ajax.request(options);
	},
	// el에 들어있는 모든 스크립트 태그를 로딩
	loadAllScriptIn: function(el, /* optional */ baseUri, targetEl) {
		if (typeof el == 'string') {
			el = document.getElementById(el);
		}
		var s = el.getElementsByTagName('script');
		var len = s.length;		// 꼭 필요함. 지우지 마세요.
		for (var i=0; i<len; i++) {
			this.appendScript(s[i], baseUri, targetEl);
		}
	},
	// 특정 스크립트태그를 로딩
	appendScript: function(script, /* optional */ baseUri, targetEl) {
		var newScript = document.createElement('script');
		newScript.type = script.type;
		newScript.text = script.text;
		newScript.charset = script.charset;
		newScript.defer = script.defer;
		if (script.src) {
			var src = script.getAttribute('src');
			newScript.src = this.constructPathUsingBaseUri(src, baseUri);
			if (this.checkNotAllowed(newScript.src)) return false;
		}
		if (targetEl) {
			// target이 있으면 그곳에 추가
			if (script.src) {
				this.appendNode(newScript, targetEl);
			} else {
				this.deferedFunction(this.appendNode, 100, [newScript, targetEl]);
			}
		} else {
			// 없으면 있던자리에 넣고 원본 삭제
			if (script.src) {
				this.replaceNode(newScript, script);
			} else {
				this.deferedFunction(this.replaceNode, 100, [newScript, script]);
			}
		}
	},
	// 파일명으로 스크립트 로딩
	loadScript: function(file, /* optional */ baseUri, targetEl) {
		if (!file) return false;
		var newScript = document.createElement('script');
		newScript.type= 'text/javascript';
		newScript.src = this.constructPathUsingBaseUri(file, baseUri);
		if (this.checkNotAllowed(newScript.src)) return false;
		this.appendNode(newScript, targetEl);
	},
	// 파일명으로 css 로딩
	loadCss: function(file, /* optional */ baseUri, targetEl) {
		if (!file) return false;
		var newCss = document.createElement('link');
		newCss.rel = 'stylesheet';
		newCss.type = 'text/css';
		newCss.href = this.constructPathUsingBaseUri(file, baseUri);
		this.appendNode(newCss, targetEl);
	},
	appendNode: function(c, targetEl) {
		var p = this.get(targetEl);
		p.appendChild(c);
	},
	replaceNode: function(newNode, oldNode) {
		var p = oldNode.parentNode;
		try {
			p.insertBefore(newNode, oldNode);
			p.removeChild(oldNode);
		}
		catch(nn) {
			;
		}
	},
	// 유틸 함수
	get: function(el) {
		if (!el) {
			return document.getElementsByTagName('head')[0];
		} else if (typeof el == 'string') {
			return document.getElementById(el);
		} else {
			return el;
		}
	},
	update: function(el, content) {
		// IE의 innerHTML 관련 버그 회피
		content = '<body>' + content.replace(/<\/?head>/gi, '')
				.replace(/<\/?html>/gi, '')
				.replace(/<body/gi, '<div')
				.replace(/<\/body/gi, '</div') + '</body>';
		el.innerHTML = content;
	},
	constructPathUsingBaseUri: function(fileName, baseUri) {
		if (!baseUri) {
			return fileName;
		} else {
			// netPath=http://시작 , absPath=/시작 , query=?뒤
			var queryIndex = baseUri.indexOf('?');
			if (queryIndex != -1) {
				baseUri = baseUri.substring(0, baseUri.indexOf('?'));
			}
			if (fileName.indexOf('https://') == 0) {
				// net path
				return fileName;
			} else if (fileName.indexOf('/') == 0) {
				// abs path
				if (baseUri.indexOf('https://') == 0) {
					return baseUri.substring(0, baseUri.indexOf('/', 7)) + fileName;
				} else {
					return fileName;
				}
			} else {
				// rel path
				return baseUri.substring(0, baseUri.lastIndexOf('/') + 1) + fileName;
			}
		}
	},
	// setTimeout 함수 대신 사용. 브라우저 호환성 확보. args인자는 반드시 배열로
	deferedFunction: function(func, millis, args) {
		var fn = this.createDelegate(func, args);
		return setTimeout(fn, millis);
	},
	createDelegate: function(func, args){
		return function() {
			return func.apply(LazyLoader, args);
		};
	}
}
_editor_url = "/_direct/_include/htmlarea/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
  document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
  document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }


// JavaScript Document
			var Base64 = {

				// private property
				_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",

				// public method for encoding
				encode : function (input) {
					var output = "";
					var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
					var i = 0;
					input = "" + input;
					input = Base64._utf8_encode(input);

					while (i < input.length) {

						chr1 = input.charCodeAt(i++);
						chr2 = input.charCodeAt(i++);
						chr3 = input.charCodeAt(i++);

						enc1 = chr1 >> 2;
						enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
						enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
						enc4 = chr3 & 63;

						if (isNaN(chr2)) {
							enc3 = enc4 = 64;
						} else if (isNaN(chr3)) {
							enc4 = 64;
						}

						output = output +
						this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
						this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);

					}

					return output;
				},

				// public method for decoding
				decode : function (input) {
					var output = "";
					var chr1, chr2, chr3;
					var enc1, enc2, enc3, enc4;
					var i = 0;

					input = "" + input;
					input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

					while (i < input.length) {

						enc1 = this._keyStr.indexOf(input.charAt(i++));
						enc2 = this._keyStr.indexOf(input.charAt(i++));
						enc3 = this._keyStr.indexOf(input.charAt(i++));
						enc4 = this._keyStr.indexOf(input.charAt(i++));

						chr1 = (enc1 << 2) | (enc2 >> 4);
						chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
						chr3 = ((enc3 & 3) << 6) | enc4;

						output = output + String.fromCharCode(chr1);

						if (enc3 != 64) {
							output = output + String.fromCharCode(chr2);
						}
						if (enc4 != 64) {
							output = output + String.fromCharCode(chr3);
						}

					}

					output = Base64._utf8_decode(output);

					return output;

				},

				// private method for UTF-8 encoding
				_utf8_encode : function (string) {
					string = string.replace(/\r\n/g,"\n");
					var utftext = "";

					for (var n = 0; n < string.length; n++) {

						var c = string.charCodeAt(n);

						if (c < 128) {
							utftext += String.fromCharCode(c);
						}
						else if((c > 127) && (c < 2048)) {
							utftext += String.fromCharCode((c >> 6) | 192);
							utftext += String.fromCharCode((c & 63) | 128);
						}
						else {
							utftext += String.fromCharCode((c >> 12) | 224);
							utftext += String.fromCharCode(((c >> 6) & 63) | 128);
							utftext += String.fromCharCode((c & 63) | 128);
						}

					}

					return utftext;
				},

				// private method for UTF-8 decoding
				_utf8_decode : function (utftext) {
					var string = "";
					var i = 0;
					var c = c1 = c2 = 0;

					while ( i < utftext.length ) {

						c = utftext.charCodeAt(i);

						if (c < 128) {
							string += String.fromCharCode(c);
							i++;
						}
						else if((c > 191) && (c < 224)) {
							c2 = utftext.charCodeAt(i+1);
							string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
							i += 2;
						}
						else {
							c2 = utftext.charCodeAt(i+1);
							c3 = utftext.charCodeAt(i+2);
							string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
							i += 3;
						}

					}

					return string;
				},
				
				URLEncode : function (string) {   
			        return escape(this._utf8_encode(string));   
			    },   
			  
			    // public method for url decoding   
			    URLDecode : function (string) {   
			        return this._utf8_decode(unescape(string));   
			    }
			}
/*			
			function doJob(strValue) {
				document.frm.base64_encoded.value = Base64.encode(strValue);
				document.frm.base64_decoded.value = Base64.decode(strValue);
				document.frm.UTF8_encoded.value = Base64._utf8_encode(strValue);
				document.frm.UTF8_decoded.value = Base64._utf8_decode(strValue);
				document.frm.URL_encoded.value = Base64.URLEncode(strValue);
				document.frm.URL_decoded.value = Base64.URLDecode(strValue);
			}
*/
	function ajax_encoding(str) {
		str = "" + str;
		return Base64.URLEncode(Base64.encode(Base64.URLEncode(str)));
	}
	// urldecode(base64_decode($str)) php used

// JavaScript Document
function get_address() {
	window.open("/zip/get_address.php","_get_address",
	   "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=500,height=400,left=100,top=100");
}

function get_address2(ezip, eaddress1, efocus, form) {
	window.open("/zip/get_address.php?ezip="+ezip+"&eaddress1="+eaddress1+"&efocus="+efocus+"&form="+form,"_get_address",
	   "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=500,height=400,left=100,top=100");
}

// s: source url
// d: flash id
// w: source width
// h: source height
// t: wmode ("" for none, transparent, opaque ...)
function mf(s,d,w,h,t){
        return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width="+w+" height="+h+" id="+d+"><param name=wmode value="+t+" /><param name=movie value="+s+" /><param name=quality value=high /><param name=menu value=false /><embed src="+s+" quality=high wmode="+t+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+w+" height="+h+"></embed></object>";
}

// write document contents
function documentwrite(src){
        document.write(src);
}

// assign code innerHTML
function setcode(target, code){
        target.innerHTML = code;
}

function isNum(str)
{
	if(str.length <= 0)
		return false;

	for(i=0; i<str.length; i++)
	{
		var cv = str.charCodeAt(i);
		if(!( 0x30 <=cv && cv<= 0x39))
		{
			return false;
		}
	}

	return true;
}
function isValidPhone(obj,keyCode, sw)
{
	str = obj.value.replace(/-/g,"");
	var checkPhone = "010 011 013 016 017 018 019 070";
	var phoneLength = str.length;

	if(phoneLength < 2)
	{
		return true;
	}

	// 집 전화 폰일 경우의 수이다.
	if(str.indexOf("02") == 0)
	{
		if(str.length == 2 && keyCode != 8)
			obj.value = str+"-";
		else if(str.length == 5  && keyCode != 8)
			obj.value = str.substring(0,2)+"-"+str.substring(2,5)+"-";
		else if(str.length == 9  && keyCode != 8)
			obj.value = str.substring(0,2)+"-"+str.substring(2,5)+"-"+str.substring(5);
		else if(str.length == 10  && keyCode != 8)
			obj.value = str.substring(0,2)+"-"+str.substring(2,6)+"-"+str.substring(6);
		else if(str.length > 10)
		{
			obj.value = str.substring(0,10);
			obj.value = str.substring(0,2)+"-"+str.substring(2,6)+"-"+str.substring(6,10);
		}
	}
	else if(str.indexOf("15") == 0 || str.indexOf("16") == 0)
	{
		if(str.length == 4 && keyCode != 8)
			obj.value = str+"-";
		else if(str.length == 5  && keyCode != 8)
			obj.value = str.substring(0,4)+"-"+str.substring(4,8);
		else if(str.length > 8)
		{
			obj.value = str.substring(0,8);
			obj.value = str.substring(0,4)+"-"+str.substring(4,8);
		}
	}
	else
	{
		if(str.length == 3 && keyCode != 8)
			obj.value = str+"-";
		else if(str.length == 6  && keyCode != 8)
			obj.value = str.substring(0,3)+"-"+str.substring(3,6)+"-";
		else if(str.length == 10  && keyCode != 8)
			obj.value = str.substring(0,3)+"-"+str.substring(3,6)+"-"+str.substring(6);
		else if(str.length == 11  && keyCode != 8)
			obj.value = str.substring(0,3)+"-"+str.substring(3,7)+"-"+str.substring(7);
		else if(str.length > 11)
		{
			obj.value = str.substring(0,11);
			obj.value = str.substring(0,3)+"-"+str.substring(3,7)+"-"+str.substring(7,11);
		}
	}

	if (sw == 1) {
		if(phoneLength > 2)
		{
			if(checkPhone.indexOf(str.substring(0,3)) < 0)
			{
				alert("받는 번호 앞자리가 잘못되었습니다.");
				obj.value = "";
				obj.focus();
				return false;
			}
		}
	}


	if(phoneLength == 10 || phoneLength == 11)
		return true;
	else if(keyCode == "" && phoneLength < 10)
	{
		alert("유효 하지 않은 휴대폰 번호입니다. 해당 번호는 발송되지 않습니다.");
		obj.value = "";
		obj.focus();
		return false;
	}

	return true;
}

function go_append(obj) {
	append_num();
	obj.value = "";
	obj.focus();
}

function onlynum_key()	{
  if((event.keyCode < 48) || (event.keyCode > 57))
	  event.returnValue = false;
}


function phoneCheck(evt, obj, sw, go_func)
{
	var event = window.event ? window.event : evt;
	var keyCode = "";
	
	if(event)
	keyCode = event.charCode ? event.charCode : event.keyCode;

	if (keyCode == 13) {
		if (go_func == 1) go_append(obj);
		else {keyCode == null; return;}
	}

//	var obj = document.getElementById(idx);
	if(obj != null && obj.value != "")
	{
		var phone = obj.value;
		phone = phone.replace(/-/g,"");

		if(isNum(phone) && isValidPhone(obj,keyCode, sw))
		{
			if((((phone.indexOf("15") == 0 || phone.indexOf("16") == 0) && phone.length == 8) || (phone.indexOf("02") == 0 && phone.length == 10) || phone.length == 11) && go_func == 1) go_append(obj);
		}
		else
		{
			if(keyCode == 17)
			{
				alert("유효하지 않게 값이 입력 되었습니다. 다시 입력해 주십시오.");
				obj.focus();
			}
		}
	}
}

function formatPhone(phone)
{
	if(phone == null || phone == "" || phone.length < 8 || phone.length >11)
		return phone;

	if(phone.length == 8)
	{
		return phone.substring(0,4)+"-"+phone.substring(4,8);
	}
	else if(phone.length == 10)
	{
		return phone.substring(0,3)+"-"+phone.substring(3,6)+"-"+phone.substring(6);
	}
	else if(phone.length == 11)
	{
		return phone.substring(0,3)+"-"+phone.substring(3,7)+"-"+phone.substring(7);
	}
}

function select() {
	var i, chked=0;
	for(i=0;i<document.uni_form.length;i++) {
		if(document.uni_form[i].type=='checkbox') { 
			if(document.uni_form[i].checked) { document.uni_form[i].checked=false; }
			else { document.uni_form[i].checked=true; }
		}
	}
	 return false;
}

function resize_pixel (OrgW, OrgH, ReW, ReH) {
	if ((OrgW < ReW) && (OrgH < ReH)) {
		image_w = OrgW; image_h = OrgH;
		return Array(image_w, image_h);
	}

	if (ReW <= 0) { // 가로가 0 이면 세로의 길이만 비교
		zh = OrgH / ReH;
		image_h = ReH;
		image_w = OrgW / zh;
		return Array(image_w, image_h);
	}
	
	if (ReH <= 0) { // 세로가 0 이면 가로의 길이만 비교
		zw = OrgW / ReW;
		image_w = ReW;
		image_h = OrgH / zw;
		return Array(image_w, image_h);
	}
	
	if (ReW && OrgW) {  // 이미지의 크기를 결정한다.
		if (OrgW == ReW) {
			zw = 1;
		}
		else {
			zw = OrgW / ReW;
		}
		if (OrgH == ReH) {
			zh = 1;
		}
		else {
			zh = OrgH / ReH;
		}
		if (zw > zh) {
			image_w = ReW;
			image_h = OrgH / zw;
		}
		else {
			image_h = ReH;
			image_w = OrgW / zh;
		}		
	}
	else {
		image_w = ReW; image_h = ReH;
	}

	return Array(image_w, image_h);
}

function list_select_checkbox(form, title, mode) {
	var i, j = 0, k = 0;
	for(i = 0; i < form.length;i++) {
		if(form[i].checked)
		k++;
	}
	if(k < 1) {
		alert("선택을 하여 주세요");
		return false;
	}
	if(confirm(title)) {
		form.exec_mode.value = mode;
		form.submit();
		return true;
	}
	return false;
}

function sort_table(table, name, num, other_view, index, url) {
	var href;
	href = "order_table=" + table;
	href = href + "&order_field=" + name;
	href = href + "&order_number=" + num;
	href = href + "&view_field=" + other_view;
	href = href + "&order_index=" + index;
	href = href + "&r_url=" + url;
	window.open("/_direct/_bin/sort_order_value.php?" + href, "_sort_jb", "toolbar=no, width=700, height=500, left=20, top=20");
}
function sort_select_table(table, name, num, other_view, index, select_field, select_value,  url) {
	var href;
	href = "order_table=" + table;
	href = href + "&order_field=" + name;
	href = href + "&order_number=" + num;
	href = href + "&view_field=" + other_view;
	href = href + "&order_index=" + index;
	href = href + "&select_field=" + select_field;
	href = href + "&select_value=" + select_value;
	href = href + "&r_url=" + url;
	window.open("/_direct/_bin/sort_order_value.php?" + href, "_sort_jb", "toolbar=no, width=700, height=500, left=20, top=20");
}

drj_list = function() {
	// var
	this.page_index = 0;
	this.page_size = 20;
	this.keyword1 = "";
	this.folder = "/";
	this.display_div = "admin_page";
	this.list_file = "";
	this.list_href = "";
	this.view_href = "";
	this.modify_href = "";
	this.list_name = "list.php";
	this.modify_name = "modify.php";
	this.view_name = "view.php";
	// function
	this.set_page_size = function(size) {
		this.page_size = size;
		this.move_page(0);
	}

	this.search_word = function(keyword1) {
		this.keyword1 = keyword1;
		this.move_page(0);
	}

	this.move_page = function(no) {
		this.page_index = no;
		this.all_list();
	}

	this.all_list = function() {
		wait_message_view();
		var now = new Date();
		var href = this.list_href ? eval(this.list_href) : "";
		var Lfile = (this.list_file ? this.list_file : this.folder+this.list_name);
		LazyLoader.load({el:this.display_div, url:Lfile+"?page_index="+this.page_index+"&page_size="+this.page_size+href+"&keyword1="+ajax_encoding(this.keyword1)+"&timenow="+now.getTime()});
		wait_message_hide();
	}

	this.modify = function(no) {
		var now = new Date();
		var href = this.modify_href ? eval(this.modify_href) : "";
		LazyLoader.load({el:this.display_div, url:this.folder+this.modify_name+"?no="+no+href+"&timenow="+now.getTime()});
	}

	this.view = function(no) {
		var now = new Date();
		var href = this.view_href ? eval(this.view_href) : "";
		LazyLoader.load({el:this.display_div, url:this.folder+this.view_name+"?no="+no+href+"&timenow="+now.getTime()});
	}
}

function WriteLeftSign() { document.write("{"); }
function WriteRightSign() { document.write("}"); }

function logis_search(slipno)
{
	slipno = slipno.replace("-", "");
	window.open("https://www.ilogen.com/iLOGEN.Web/TRACE/TraceDetail.aspx?slipno="+slipno+"&gubun=fromview", "_logis_status",'width=750,height=700, scrollbars=yes, resizable=yes, left=100, top=20' );
}

