var GHOME	= "http://www.odaeshop.co.kr";
var GDOMAIN	= "www.odaeshop.co.kr";
var GIMGURL	= "http://www.odaeshop.co.kr/images";

//----------------------------------------------------
// AGENT Ã³¸®
//----------------------------------------------------
if (typeof(nxAgent) == "undefined") {
	function nxAgent() {
		agent  = navigator.userAgent.toLowerCase();
		this.major	= parseInt(navigator.appVersion);
		this.minor	= parseFloat(navigator.appVersion);
		this.ns		= (agent.indexOf('mozilla') != -1 &&
					  agent.indexOf('spoofer') == -1 &&
					  agent.indexOf('compatible') == -1 &&
					  this.major >= 5);
		this.ie		= (agent.indexOf("msie") != -1 && this.major >= 4);
		this.ie7	= (agent.indexOf("msie 7") != -1);
		this.iex	= (this.ie && (this.minor >= 5.5));

		this.moz	= (this.ns && (this.major >= 5));

		this.getinfo = function() {
			if (this.ns) {
				this.pagewidth	= window.innerWidth;
				this.pageheight	= window.innerHeight;
				this.pagetop	= window.pageYOffset;
			this.pageleft	= window.pageXOffset;
			}
			else {
				this.pagewidth	= document.body.clientWidth;
				this.pageheight	= document.body.clientHeight;
				this.pagetop	= document.body.scrollTop;
				this.pageleft	= document.body.scrollLeft;
			}
		}
	};
}
if (typeof(agent) == "undefined") { var agent = new nxAgent(); }

//----------------------------------------------------
// Document
//----------------------------------------------------
function get_elmid(str) {return document.getElementById(str)?document.getElementById(str):(parent.document.getElementById(str)?parent.document.getElementById(str):null);};
function get_tagnm(str) {return document.getElementsByTagName?document.getElementsByTagName(str):new Array();};

//----------------------------------------------------
// ¹®ÀÚ¿­ Ã³¸®
//----------------------------------------------------
function str_upper(str) {return str.toUpperCase();};
function str_trim(str) {return (typeof(str) != "undefined")?str.replace(/^\s*|\s*$/g,""):"";};
function str_escape(str) {return window.encodeURIComponent?encodeURIComponent(str):escape(str);};
function str_decode(str) {return window.decodeURIComponent?decodeURIComponent(str):unescape(str)};

function str_tagesc(str) {return (typeof(str) != "undefined")? str.replace(/</g,"&lt;").replace(/>/g,"&gt;"):"";};
function str_quoesc(str) {return (typeof(str) != "undefined")?str.replace(/"/g,'`').replace(/'/g,"`"):"";};
function str_urlesc(str) {return (typeof(str) != "undefined")? str.replace(/&/g,"%26").replace(/=/g,"%3D").replace(/\?/g,"%3F").replace(/\'/g,"%27"):"";};

// ['~`!@#$%^&*(){}-_=+\|<>?,./;:"] [1234567890]
function str_validate(pttn, pstr) {
	for (var i = 0; i < pstr.length; i++)  {
		if (pttn.indexOf(pstr.substring(i, i+1)) > 0) break;
	}
	if (i != pstr.length) return false;
	return true;
};
function str_len(pstr) {
	var cnt = 0;
	if (typeof(pstr) != "undefined") {
		for (var i = 0; i < pstr.length; i++) {
			if (pstr.charCodeAt(i) < 127) cnt++;
			else cnt = cnt + 2;
		}
	}
	return cnt;
};
function str_cut(pstr, pnum, pext) {
	if (pstr == null) return pstr;
	var res	= "";
	var tmp	= "";
	var cnt	= 0;
	for (var i = 0; i < pstr.length; i++) {
		tmp	= pstr.substr(i, 1);
		if (tmp.charCodeAt(0) < 127) cnt++;
		else cnt = cnt + 2;
		if (cnt > pnum) return res.substr(0,res.length-2)+pext;
		res += tmp;
	}
	return pstr;
};
function str_onlykor(pstr) {
	for (var i = 0; i < pstr.length; i++) {
		if (pstr.charCodeAt(i) < 0xAC00 || pstr.charCodeAt(i) > 0xD7A3) {
			if (( pstr.charCodeAt(i) < 12593 || pstr.charCodeAt(i) > 12643) && (pstr.charCodeAt(i) != 32)) {
				return true;
			}
		}
	}
	return false;
};
function url_fixparam() {return document.location.search?document.location.search+"&":"?";};
var retry_framesize = 3;

function key_ignore(e) { if (e.keyCode == 13) { return false; } };
function key_active(e, next) { if (e.keyCode == 13) { next(); } };

function number_format(pnum){
	pnum = (pnum == "" || !pnum)? 0 : pnum;
	var input = String(pnum);
	var pttn = /(\-?\d+)(\d{3})($|\.\d+)/;
	if (pttn.test(input)) {
		return input.replace(pttn,
			function(str,p1,p2,p3){return number_format(p1)+","+p2+""+p3;});
	}
	else return input;
}
function moneykey(frm) {
	if (frm.value == "") return;
	var curr = parseInt(frm.value.replace(/,/g,''));
	frm.value = number_format(curr);
}

function FormPattern() {
	function Validator (pttn, mesg) {
		this.pattern	= pttn;
		this.message	= mesg;
		this.validate	= function(str) {
			if (this.pattern == "nullcheck") return (str_trim(str)=="")?false:true;
			else return (str_trim(str)=="")?false:this.pattern.exec(str);
		}
	}
	this.email	= new Validator(/^[_0-9a-zA-Z-]+(.[_0-9a-zA-Z-]+)*@[0-9a-zA-Z-]+(.[0-9a-zA-Z]+)*$/, "ÀÌ¸ÞÀÏ Çü½ÄÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù.");
	this.url	= new Validator(/^http:\/\/+[\.a-zA-Z0-9-]+\.[a-zA-Z]+/, "URL Çü½ÄÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù.");
	this.number	= new Validator(/^[0-9\.\-]+$/, " Çü½ÄÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù.");
	this.userid	= new Validator(/^[0-9a-z]+$/, " Çü½ÄÀÌ Àß¸ø µÇ¾ú½À´Ï´Ù.");
	this.memo	= new Validator("nullcheck", " ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä.");
	this.combo	= new Validator("nullcheck", " ¼±ÅÃÇÏÁö ¾Ê¾Ò½À´Ï´Ù.");
};

var formchecker = new FormPattern();

function reg_checkform(thisform) {
	var forms	= thisform.elements;
	var errmsg	= null;
	for (var i = 0; i < forms.length; i++) {
		if (forms[i].getAttribute("validtype")) {
			//alert(forms[i].getAttribute("validtitle")+":"+forms[i].getAttribute("validtype"));
			var validator = formchecker[forms[i].getAttribute("validtype")];
			if (validator && !validator.validate(forms[i].value)){
				if (errmsg == null) errmsg = forms[i].getAttribute("validtitle") + validator.message;
				else errmsg += "\n\n" + forms[i].getAttribute("validtitle") + validator.message;
				break;
			}
			else if (forms[i].getAttribute("validmin") > str_len(forms[i].value)) {
				errmsg = forms[i].getAttribute("validtitle") + " »çÀÌÁî°¡ ÀÛ½À´Ï´Ù\n\nÃÖ¼Ò »çÀÌÁî:" + forms[i].getAttribute("validmin");
				break;
			}
		}
	}
	if (errmsg != null) {
		alert(errmsg); forms[i].focus(); return false;
	}
	return true;
};
function reg_checkvalid(thisform) {
	var errmsg	= null;
	if (thisform.getAttribute("validtype")) {
		var validator = formchecker[thisform.getAttribute("validtype")];
		if (validator && !validator.validate(str_trim(thisform.value))){
			if (errmsg == null) errmsg = thisform.getAttribute("validtitle") + validator.message;
			else errmsg += "\n\n" + thisform.getAttribute("validtitle") + validator.message;
		}
	}
	if (errmsg != null) {
		alert(errmsg);
		thisform.focus();
		return false;
	}
	return true;
};
function reg_onlycheckform(thisform, target) {
	var forms	= thisform.elements;
	var errmsg	= null;
	for (var i = 0; i < forms.length; i++) {
		if (forms[i].getAttribute("validtype")) {
			var validator = formchecker[forms[i].getAttribute("validtype")];
			if (validator && !validator.validate(forms[i].value)){
				if (errmsg == null) errmsg = forms[i].getAttribute("validtitle") + validator.message;
				else errmsg += "\n\n" + forms[i].getAttribute("validtitle") + validator.message;
				break;
			}
		}
	}
	if (errmsg != null) {alert(errmsg);target.focus();return false;}
	return true;
};
function nextform(currform, nextform, maxsize) {
	var len = currform.value.length;
	if (len == maxsize) { nextform.focus(); }
}

function send_ajax(purl, pfunc) {
	var req = req_xmlhttp();
	if (!req || agent && !pfunc) {(new Image()).src = purl;}
	else {
		req.open("GET", purl+((purl.indexOf('?') != -1)? "&": "?")+"nocache="+new Date().getTime(), true);
		req.setRequestHeader("Content-Type", "text/html; charset=euc-kr");
		req.setRequestHeader("Accept-Language", "ko");
		if (pfunc) {
			req.onreadystatechange = function() {
				if (req.readyState == 4) pfunc(req.responseText);
			}
		}
		req.send(null);
	}
};
function send_idajax(pid, purl, pfunc) {
	var obj = document.getElementById(pid);
	if (!obj || typeof(obj) == "undefined") return false;
	var req = req_xmlhttp();
	if (!req || agent && !pfunc) {(new Image()).src = purl;}
	else {
		req.open("GET", purl+((purl.indexOf('?') != -1)? "&": "?")+"nocache="+new Date().getTime(), true);
		req.setRequestHeader("Content-Type", "text/html;charset=euc-kr");
		req.setRequestHeader("Accept-Language", "ko");
		if (pfunc) {
			req.onreadystatechange = function() {
				if (req.readyState == 4) pfunc(obj, req.responseText);
			}
		}
		req.send(null);
	}
};
function send_postajax(purl, pdata, pfunc) {
	var req = req_xmlhttp();
	if (!req || agent && !pfunc) {(new Image()).src = purl;}
	else {
		req.open("POST", purl/*+((purl.indexOf('?') != -1)? "&": "?")+"nocache="+new Date().getTime()*/, true);
		req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=euc-kr');
		req.setRequestHeader("Accept-Language", "ko");
		if (pfunc) {
			req.onreadystatechange = function() { if (req.readyState == 4) pfunc(req.responseText); }
		}
		req.send(pdata);
	}
};
function send_xmlajax(purl, pfunc) {
	var req = req_xmlhttp();
	if (!req || agent && !pfunc) {(new Image()).src = purl;}
	else {
		req.open("GET", purl+((purl.indexOf('?') != -1)? "&": "?")+"nocache="+new Date().getTime(), true);
		req.setRequestHeader("Content-Type", "text/xml;charset=euc-kr");
		req.setRequestHeader("Accept-Language", "ko");
		if (pfunc) {
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					if (req.status == 200) pfunc(req.responseXML);
					else if (req.status == 404) alert("ÁË¼ÛÇÕ´Ï´Ù. µ¥ÀÌÅÍ°¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.");
				}
			}
			//if (req.readyState == 4) pfunc(req.responseXml);
		}
		req.send(null);
	}
};
function req_xmlhttp() {
	var obj = null;
	if (window.ActiveXObject) {
		obj = new ActiveXObject("Msxml2.XMLHTTP");
		if (!obj) obj = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if (window.XMLHttpRequest) obj = new XMLHttpRequest();
	return obj;
};
function set_cookie(pname,pvalue,expires,pdomain,path) {
	var expdate = new Date();
	expdate.setDate(expdate.getDate() + expires);
	var str = pname + "=" + escape(pvalue);
	str += ((expires == null || expires == 0)? "" : (" ; expires=" + expdate.toGMTString()));
	str += "; domain=" + (pdomain ? pdomain : GDOMAIN);
	str += "; " + (path? "path="+path+";" : "");
	document.cookie = str;
};
function get_cookie(pname) {
	var arg		= pname + "=";
	var alen	= arg.length;
	var clen	= document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i,j) == arg) {
			var end = document.cookie.indexOf(";", j);
			if (end == -1) end = document.cookie.length;
			return unescape(document.cookie.substring(j, end));
		}
		i = document.cookie.indexOf(" ",i) + 1;
		if (i == 0) break;
	}
	return "";
};
function resizeH(pwidth, retime) {
//	var ext = ((agent.ie7)? 70 : (agent.ie)?29:48);
//	var ext = ((agent.ie7)? 70 : 48);
	var ext = ((agent.ie)? 80 : 80);
	var _height = get_abspos(get_elmid("winbtnarea"), 0) + get_elmid("winbtnarea").offsetHeight + ext;
	self.resizeTo(pwidth, _height);
	if (retime != null && retime) {setTimeout("resizeH("+pwidth+")", retime);}
}
function closerewin() {
	try {opener.location.reload(); opener.focus();} catch(e){};
	self.close();
}
function set_homepage(thisform, url) {
	var browser = 0, version = 0;

	if (navigator.appName.indexOf('Explorer') != -1) browser = 1;
	else if (navigator.appName.indexOf('Netscape') != -1) browser = 2;
	version = navigator.appVersion.substr(0, 1) * 1;

	if (navigator.appVersion.indexOf('MSIE 3') != -1 || navigator.appVersion.indexOf('MSIE 4') != -1) {
		alert('½ÃÀÛ È¨ÆäÀÌÁö¸¦ "' + url + '" À¸·Î ¼³Á¤ÇÏ½Ã°Ú½À´Ï±î?\n¸¸¾à Ã¢ÀÌ ¶ß¸é [°è ¼Ó] ¹öÆ°À» ´­¸¥ ÈÄ [ÆÄÀÏ ¿­±â]¸¦ ¼±ÅÃÇÏ½Ã°í È®ÀÎ ¹öÆ°À» ´­·¯ÁÖ¼¼¿ä.');
		top.location = GHOME+'/zllog.reg';
	}
	else if (browser == 1) {
		thisform.style.behavior = 'url(#default#homepage)';
		thisform.setHomePage(url);
	}
	else {
		top.alert('ÁË¼ÛÇÕ´Ï´Ù.\n\n±ÍÇÏÀÇ ºê¶ó¿ìÀú¿¡¼­´Â ÀÚµ¿À¸·Î ½ÃÀÛÆäÀÌÁö¸¦ ¼³Á¤ÇÒ ¼ö ¾ø½À´Ï´Ù.\n¼öµ¿À¸·Î ½ÃÀÛÆäÀÌÁö ¼³Á¤À» ÇÏ½Ã±â ¹Ù¶ø´Ï´Ù.');
	}
};
function get_abspos(player, isxy) {
	var pos = 0;
	while(player != null && player.tagName != "BODY") {
		pos += player["offset"+(isxy?"Left":"Top")];
		pos -= (isxy?0:player["scrollTop"]);
		player = player.offsetParent;
	}
	return pos;
};

function encode64(input) {
	var keystr64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789*@_";
	var output = "";
	var chr1, chr2, chr3;
	var enc1, enc2, enc3, enc4;
	var i = 0;
	do {
		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 + keystr64.charAt(enc1) + keystr64.charAt(enc2) + keystr64.charAt(enc3) + keystr64.charAt(enc4);
	} while (i < input.length);
	return output;
}
function decode64(input) {
	var keystr64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789*@^";
	var output = "";
	var chr1, chr2, chr3;
	var enc1, enc2, enc3, enc4;
	var i = 0;
	input = input.replace(/[^A-Za-z0-9\*@\^]/g, "");
	do {
		enc1 = keystr64.indexOf(input.charAt(i++));
		enc2 = keystr64.indexOf(input.charAt(i++));
		enc3 = keystr64.indexOf(input.charAt(i++));
		enc4 = keystr64.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);
	} while (i < input.length);

	return output;
}
function encode64han(str) { return encode64(escape(str)); }
function decode64han(str) { return unescape(decode64(str)); }
function setradio(pradio, pval) {
	for (var i = 0; i < pradio.length; i++) {
		if (pradio[i].value == pval) pradio[i].checked = true;
		else pradio[i].checked = false;
	}
}
function getradio(pradio) {
	for (var i = 0; i < pradio.length; i++) {
		if (pradio[i].checked == true) return pradio[i].value;
	}
	return "";
}
function dotoggle(thisform) {
	for (var i = 0; i < thisform.elements.length; i++) {
		if (thisform.elements[i].name == 'checkid[]') {
			if (thisform.elements[i].checked == true) thisform.elements[i].checked = false;
			else thisform.elements[i].checked = true;
		}
	}
}

function menuon(elm) { elm.src = elm.src.replace(".gif", "_on.gif"); }
function menuout(elm){ elm.src = elm.src.replace("_on.gif", ".gif"); }

var copenform, calsep;
function popcalendar(pform, ptype) {
	var url = "/common/html/calendar.htm";
	var xpos = 260; var ypos = 320;
	var tag = pform;
	var y = parseInt((window.screen.height - ypos) / 3);
	var x = parseInt((window.screen.width - xpos) / 2);
	if (y < 0) y = 0; if (x < 0) x = 0;
	copenform = pform; calsep = ptype;
	var win = window.open(url, "calendar","width=260,height=320,top="+y+",left="+x);
	win.moveTo(x, y); win.focus();
}

var uopenform;
function popstaff(pform) {
	var url = "/pstaff/staffwin.php";
	var xpos = 550; var ypos = 320;
	var tag = pform;
	var y = parseInt((window.screen.height - ypos) / 3);
	var x = parseInt((window.screen.width - xpos) / 2);
	if (y < 0) y = 0; if (x < 0) x = 0;
	uopenform = pform;
	var win = window.open(url, "winstaff","width=550,height=320,top="+y+",left="+x);
	win.moveTo(x, y); win.focus();
}
var gopenform;
function popgroup(pform, pgroup, ptype) {
	var url = "/pstaff/groupwin.php?group="+pgroup+"&type="+ptype;
	var xpos = 550; var ypos = 320;
	var tag = pform;
	var y = parseInt((window.screen.height - ypos) / 3);
	var x = parseInt((window.screen.width - xpos) / 2);
	if (y < 0) y = 0; if (x < 0) x = 0;
	gopenform = pform;
	var win = window.open(url, "wingroup","width=550,height=320,scrollbars=yes,resizable=no,top="+y+",left="+x);
	win.moveTo(x, y); win.focus();
}

function userbox(puserid) {
	if (puserid == "") return;
	var url = "/pstaff/staffview.php?userid="+puserid;
	var xpos = 450; var ypos = 520;
	var y = parseInt((window.screen.height - ypos) / 3);
	var x = parseInt((window.screen.width - xpos) / 2);
	if (y < 0) y = 0; if (x < 0) x = 0;
	var win = window.open(url, "winuserbox","width=450,height=520,top="+y+",left="+x);
	win.moveTo(x, y); win.focus();
}

function mesgbox(pid) {
	var url = "/pmain/mesgsend.php?mesg="+pid;
	var xpos = 450; var ypos = 520;
	var y = parseInt((window.screen.height - ypos) / 3);
	var x = parseInt((window.screen.width - xpos) / 2);
	if (y < 0) y = 0; if (x < 0) x = 0;
	var win = window.open(url, "winmesgbox","width=380,height=320,top="+y+",left="+x);
	win.moveTo(x, y); win.focus();
}

function menupath(path) {
	var curr = get_cookie("menupath");
	if (path == null || typeof(path) == "undefined") { return (curr == "")? "" : curr.split("|"); }
	else {
		curr = path;
		set_cookie("menupath", curr, 0, GDOMAIN, "/");
		return curr.split("|");
	}
}

function err_photo(pimg) { pimg.src = GIMGURL + "/photo/noimage.gif"; }
function reload_mesg(ptext) {
	document.location.reload();
}

function iamtop() {
	url = self.location.href;
	if (parent != self) {
		if (location.replace) top.location.replace(url);
		else top.location.href = url;
	}
}

function set_noticeajax(ptext) { try {document.getElementById("flist_notice").innerHTML = ptext;} catch(e) {} }
function get_noticeajax() { send_ajax("/petc/getnotice.php", set_noticeajax); }
function set_mesgajax(ptext) { try {document.getElementById("flist_mesg").innerHTML = ptext;} catch(e) {} }
function get_mesgajax() { send_ajax("/petc/getmesg.php", set_mesgajax); }

function show_flashplayer(pname, pval, pwidth, pheight) {
	var swf_src 		= "/common/flash/"+pname+".swf";
	var swf_width 		= pwidth;
	var swf_height		= pheight;
	var swf_version		= "9.0.47.00";
	var swf_id 			= (tmp = swf_src.split("/"), tmp = tmp[tmp.length - 1], tmp.split(".swf").shift());
	var swf_fullscreen	= "true";
	var swf_script		= "always";
	var swf_wmode		= "transparent"; //"window";
	var swf_bgcolor		= "";
	var swf_vars 		= pval;
	var nocache 		= Math.random()*3600000;
	var source = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
	source += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+swf_version+'" ';
	source += 'name="'+swf_id+'" width="'+swf_width+'" height="'+swf_height+'" id="'+swf_id+'">\n';
	source += ' <param name="movie" value="'+swf_src+'?nocache='+nocache+'" />\n';
	source += ' <param name="quality" value="high" />\n';
	source += ' <param name="allowFullScreen" value="'+swf_fullscreen+'" />\n';
	source += ' <param name="bgColor" value="' + swf_bgcolor + '" />\n';
	source += ' <param name="allowScriptAccess" value="'+swf_script+'" />\n';
	source += ' <param name="wmode" value="'+swf_wmode+'" />\n';
	source += ' <param name="FlashVars" value="'+swf_vars+'" />\n';
	source += ' <embed src="'+swf_src+'?nocache='+nocache+'" allowFullScreen="'+swf_fullscreen+'"';
	source += '   FlashVars="'+swf_vars+'" allowScriptAccess="'+swf_script+'" width="'+swf_width+'" height="'+swf_height+'" quality="high"';
	source += '   pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="'+swf_id+'"></embed>\n</object>';
	document.write(source);
}

function close_popdiv(pid) {
	var idx;
	if ((idx = pid.indexOf("__ajax_error__")) < 0) {
//		document.getElementById('login_wrap').style.display = 'none';
		document.getElementById(pid).style.display = 'none';
	}
	else {
		var arr = pid.split("|");
//		document.getElementById('login_wrap').style.display = 'none';
		document.getElementById(arr[1]).style.display = 'none';
		alert((arr[2] == "")? "¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù":arr[2]);
	}
}
function confirm_popdiv(pid) {
	var idx;
	if ((idx = pid.indexOf("__ajax_error__")) >= 0 || pid == "") {
		var arr = pid.split("|");
//		document.getElementById('login_wrap').style.display = 'none';
		document.getElementById(arr[1]).style.display = 'none';
		alert((arr[2] == "")? "¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù":arr[2]);
		return false;
	}
	return true;
}

function open_popdiv(pid) {
//	document.getElementById('login_wrap').style.display = 'block';
	document.getElementById(pid).style.display = 'block';
}
function toggle_popdiv(pid) {
	var pdiv = document.getElementById(pid);
	if (pdiv) {
		pdiv.style.display = (pdiv.style.display == 'none')? 'block' : 'none';
	}
}

//----------2008.05.28 ±è¿Õ±¸--------------------
function numkey(frm) {
	if (frm.value == "") return;
	var curr = parseInt(frm.value.replace(/,/g,''));
	var today = new Date();
	var year = today.getFullYear();
	//alert(today.getFullYear());
	if (frm.name == "year") {
		if (curr > year) {
			alert("ÇöÀç ³âµµº¸´Ù Å®´Ï´Ù.");
			frm.value = "";
			return;
		}
	}else if (frm.name == "month"){
		if (curr < 0 || curr > 12) {
			alert("¿ùÀº 1¿ùºÎÅÍ 12¿ù ±îÁö¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.");
			frm.value ="";
			return;
		}
	}else{
		if (curr < 0 || curr > 31) {
			alert("1ÀÏºÎÅÍ 31ÀÏ ±îÁö¸¸ ÀÔ·Â°¡´ÉÇÕ´Ï´Ù.");
			frm.value ="";
			return;
		}
	}

	frm.value = curr;
}
//------------------------------
