// À¯Æ¿¸®Æ¼ ÇÔ¼ö
if(typeof config_home_root_url == "undefined"){
	var config_home_root_url = "/";
} // config_home_root_url º¯¼ö°ªÀÌ Á¸Àç ÇÏ´Â°¡ ÆÇ´Ü

function openWin(url,width,height) {
	var argv = openWin.arguments;
	var argc = openWin.arguments.length;
	var scl=(argc>3)?"yes":"no";
	var str,top,left;
	top = parseInt(screen.height/3 - height/2);
	left = parseInt(screen.width/3 - width/2);
	if(top<0) top=0;
	if(left<0) left=0;
	str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scl+",resizable=no,copyhistory=no,";
	str=str+"width="+width+",height="+height;
	str=str+",top="+top;
	str=str+",left="+left;
	var st = window.open(url,"",str);
	st.focus();
	}
function openWinS(url,width,height,pname) {
	var argv = openWinS.arguments;
	var argc = openWinS.arguments.length;
	var scl=(argc>4)?"yes":"no";
	var str,top,left;
	top = parseInt(screen.height/3 - height/2);
	left = parseInt(screen.width/3 - width/2);
	if(top<0) top=0;
	if(left<0) left=0;
	str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scl+",resizable=no,copyhistory=no,";
	str=str+"width="+width+",height="+height;
	str=str+",top="+top;
	str=str+",left="+left;
	var st = window.open(url,pname,str);
	st.resizeTo(width,(height+30))
	st.focus();
	}
function openWinSr(url,width,height,pname) {
	var argv = openWinSr.arguments;
	var argc = openWinSr.arguments.length;
	var scl=(argc>4)?"yes":"no";
	var str,top,left;
	top = parseInt(screen.height/3 - height/2);
	left = parseInt(screen.width/3 - width/2);
	if(top<0) top=0;
	if(left<0) left=0;
	str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scl+",resizable=yes,copyhistory=no,";
	str=str+"width="+width+",height="+height;
	str=str+",top="+top;
	str=str+",left="+left;
	var st = window.open(url,pname,str);
	st.resizeTo(width,(height+30))
	st.focus();
	}
function openWinStop(url,width,height,pname){
	var argv = openWinStop.arguments;
	var argc = openWinStop.arguments.length;
	var scl=(argc>4)?"yes":"no";
	str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scl+",resizable=yes,copyhistory=no,";
	str=str+"width="+width+",height="+height;
	str=str+",top=0,left=0";
	var st = window.open(url,pname,str);
	st.focus();
}
function readdoc(st){
	var width=780,height=570;
	var str,top,left;
	top = parseInt(screen.height/3 - height/2);
	if(top<0) top=0;
	left = parseInt(screen.width/3 - width/2);
	str="toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,";
	str=str+"width="+width+",height="+height;
	str=str+",top="+top;
	str=str+",left="+left;
	var st = window.open(st,"readDocSrc",str);
	st.focus();
	}

function PicPrevWin(st){
	var str,top,left, width, height;
	width=200;
	height=200;
	top = parseInt((screen.availHeight / 3) - (height / 2));
	left = parseInt((screen.availWidth / 3) - (width / 2));
	str="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,";
	str=str+"width=" + width + ",height=" + height;
	str=str+",top=" + top;
	str=str+",left="+left;
	ff = window.open(config_home_root_url + "usr/imgview.php?p="+st,"Flist_image_view_win",str);
	ff.focus();
}
function checkemail(st){
	if(st=="") return true;
	var email=/^([A-Za-z0-9_\.\-]{1,15})(@{1})([A-Za-z0-9_\-]{1,15})(.{1})([A-Za-z0-9_\-]{2,10})(.{1}[A-Za-z]{2,10})?(.{1}[A-Za-z\-]{2,10})?$/;
	if (!email.test(st))
	{
		alert("eMail Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù.\n\nÀÔ·ÂÇÏÁö ¾ÊÀ»°æ¿ì »èÁ¦ ÇÏ½Ê½Ã¿À");
		return false;
	}
	return true;
}
function checkTelNum(st){
	var telF = /^0[0-9]{1,2}[\-\) ]{0,1}[0-9]{3,4}[\- ]{0,1}[0-9]{4}$/;
	if(st=="") return true
	if(!telF.test(st)){
		alert("ÀüÈ­¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.\n\n033)1234-5678 ÇüÅÂ·Î ÀÔ·ÂÇÏ½Ê½Ã¿À\n\nÀÔ·ÂÇÏÁö ¾ÊÀ»°æ¿ì »èÁ¦ ÇÏ½Ê½Ã¿À");
		return false;
	}
	return true;
}
function chkresno(resno) {
	if(resno=="") return true;
	var fmt = /^\d{6}-[1234]\d{6}$/;
	if (!fmt.test(resno)) {
		alert("ÁÖ¹Îµî·Ï ¹øÈ£ Çü½ÄÀÌ ¾Æ´Õ´Ï´Ù.\n\n¼ýÀÚ6ÀÚ¸®-¼ýÀÚ7ÀÚ¸®");
		return false;
	}
	var buf = new Array(13);
	for (i = 0; i < 6; i++) buf[i] = parseInt(resno.charAt(i));
	for (i = 6; i < 13; i++) buf[i] = parseInt(resno.charAt(i + 1));
	multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
	for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);
	if ((11 - (sum % 11)) % 10 != buf[12]) {
		alert("¿Ã¹Ù¸¥ ÁÖ¹Îµî·Ï ¹øÈ£°¡ ¾Æ´Õ´Ï´Ù.");
		return false;
	}
	return true;
}
function go(st){
	location.href = st;
}
function getByte(message){
	var nbytes = 0;
	for (i=0; i<message.length; i++) {
		var ch = message.charAt(i);
		if(escape(ch).length > 4) {
			nbytes += 2;
		} else if (ch == '\n') {
			if (message.charAt(i-1) != '\r') {
				nbytes += 1;
			}
		} else if (ch == '<' || ch == '>') {
		nbytes += 4;
		} else {
		nbytes += 1;
		}
	}
	return nbytes;
}
function trim(strSource) { 
	re = /^ +| +$/g; 
	return strSource.replace(re, ''); 
} 

/*==========================================================================================
		ÄíÅ° À¯Æ¿¸®Æ¼
------------------------------------------------------------------------------------------*/
function getCookieVal (offset) {
   var endstr = document.cookie.indexOf (";", offset);
   if (endstr == -1) endstr = document.cookie.length;
   return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
   var arg = name + "=";
   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)
         return getCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) break; 
   }
   return null;
}

function SetCookie (name, value) {
   var argv = SetCookie.arguments;
   var argc = SetCookie.arguments.length;
   var expires = (2 < argc) ? argv[2] : null;
   var path = (3 < argc) ? argv[3] : null;
   var domain = (4 < argc) ? argv[4] : null;
   var secure = (5 < argc) ? argv[5] : false;
   document.cookie = name + "=" + escape (value) +
      ((expires == null) ? "" : 
         ("; expires=" + expires.toGMTString())) +
      ((path == null) ? "" : ("; path=" + path)) +
      ((domain == null) ? "" : ("; domain=" + domain)) +
      ((secure == true) ? "; secure" : "");
} 

function IE_AUTO_ACTIVE(id){
	document.write(id.text);
	id.id = '';
}



function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}