//¼ýÀÚÀÎÁö Ã¼Å©
function isNumericDot( value )
{	
	if (value == 8 || value == 9 || value == 13 || (value >= 37 && value <= 40) || value == 46 || (value >= 48 && value <= 57) ||  value == 110 || value == 190 || value == 192 || value == 27 || value == 116 || (value >= 96 && value <= 105))
		 return true;
	else return false;
}
// ¼ýÀÚ¸¸ ÀÔ·Â
// onkeydownÀ» »ç¿ëÇÒ °Í 2004/05/08 - ¹ÚÀÏÇü
function num_chekDot() { 
  if (isNumericDot(event.keyCode)==false){
		alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
		event.returnValue=false;
	}
}

//¼ýÀÚÀÎÁö Ã¼Å©
function isNumeric( value )
{
	if (value == 8 || value == 9 || value == 13 || (value >= 37 && value <= 40) || value == 46 || value == 27 || value == 116 || (value >= 48 && value <= 57) || (value >= 96 && value <= 105))
		 return true;
	else return false;
}
// ¼ýÀÚ¸¸ ÀÔ·Â
// onkeydownÀ» »ç¿ëÇÒ °Í 2004/05/08 - ¹ÚÀÏÇü
function num_chek() { 
  if (isNumeric(event.keyCode)==false){
		alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
		event.returnValue=false;
	}
}
// ÆÄÀÏ ºÎºÐ¿¡ ÅØ½ºÆ® ÀÔ·Â ¸øÇÏ°Ô ÇÏ±â À§ÇØ¼­
function fileWriteNot(){
  event.returnValue=false;
}

// ±â´É: ¹®ÀÚ¿­ÀÇ ¾Õ, µÚ °ø¹éÀ» Á¦°ÅÇÑ´Ù
// ÆÄ¶ó¹ÌÅÍ: ¹®ÀÚ¿­
// ¸®ÅÏ°ª: ¹®ÀÚ¿­
function trim(str)
{
	var s = str.replace(/^ */, "");
	s = s.replace(/ *$/, "");
	return  s;
}

//°³¹ß °ü·Ã °øÅë js

// »õÃ¢ ¶ç¿ì±â
// ÆÄ¶ó¹ÌÅÍ ¼³¸í
// name  : À©µµ¿ì Ã¢ ÀÌ¸§
// url   : »Ñ·ÁÁÙ ÆäÀÌÁö
// width : À©µµ¿ì Ã¢ ³ÐÀÌ
// height: À©µµ¿ì Ã¢ ³ôÀÌ
// toolbar : Åø¹Ù ³ªÅ¸³¾Áö ¿©ºÎ
// menubar : ¸Þ´º¹Ù ³ªÅ¸³¾Áö ¿©ºÎ
// statusbar : »óÅÂ¹Ù ³ªÅ¸³¾Áö ¿©ºÎ
// scrollbar : ½ºÅ©·Ñ¹Ù ³ªÅ¸³¾Áö ¿©ºÎ
// resizable : ¸®»çÀÌÁî ±â´É ¿©ºÎ
// ¿¹Á¦  : open_window('./test.asp', 'test', '' ,'' ,'200','100','','','','','')
function open_window(url, name, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  /*
  target = window.open(url, name, 'left='+left+', top='+top+', width='+width+', height='+height+', toolbar='+toolbar_str+', menubar=' +menubar_str+', status='+statusbar_str+', scrollbars='+scrollbar_str+', resizable='+resizable_str);
  target.focus();
  */
  window.open(url, name, 'left='+left+', top='+top+', width='+width+', height='+height+', toolbar='+toolbar_str+', menubar=' +menubar_str+', status='+statusbar_str+', scrollbars='+scrollbar_str+', resizable='+resizable_str);
}

function opWin(val, width, height)
{
  window.open(val,'','width='+width+', height='+height+', scrollbars=no');
}

// ÆÄÀÏ¾÷·Îµå °ü·Ã progress Bar
function showProgress(o) 
{ 
   strAppVersion = navigator.appVersion; 
   if (o.fileValue.value != "") {
      if (strAppVersion.indexOf('MSIE')!=-1 && 
          strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

          winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
          window.showModelessDialog("/showprogress/show_progress.asp?nav=ie", null, winstyle); 
      } 
      else { 
          winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
               ((window.screen.height-110)/2); 
          winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
               "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
          window.open("/showprogress/show_progress.asp",null,winstyle); 
      } 
   }
   return true; 
} 

// ´ÙÁß È­ÀÏ ¾÷·Îµå ½Ã ÁøÇà¸·´ë º¸ÀÌ±â
function MulShowProgress(o)
{
	strAppVersion = navigator.appVersion;
	if (o.fileValue(0).value != "" || o.fileValue(1).value != "" ) {
		if (strAppVersion.indexOf('MSIE') != -1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) {
			winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes";
			window.showModelessDialog("/showprogress/show_progress.asp?nav=ie", null, winstyle);
		}
		else {
			winpos = "left=" + ((window.screen.width-380)/2) + ",top=" + ((window.screen.height-110)/2);
			winstyle="width=380,height=110,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos;
			window.open("/showprogress/show_progress.asp?nav=ns",null,winstyle);
		}
	}
	
	return true;
}

// °Ë»ö¾î Æ¯¼ö ¹®ÀÚ Ã¼Å©
// return : false (°Ë»ö¾ÈµÊ), true (Æ¯¼ö¹®ÀÚ°Ë»ö ¹× ¸Þ¼¼Áö)
function chkSpeChar( oInputCtrl)
{
	var speChar = " `~!#$%^&*+=|\\[]{}:;-,<>/?'\"";
	for(var iCnt = 0; iCnt < speChar.length; iCnt++)
	{
		special = speChar.substr(iCnt, 1);
		if( oInputCtrl.value.indexOf(special) != -1)
		{
			alert("Æ¯¼ö¹®ÀÚ[" + special + "]¸¦ °Ë»ö¾î¿¡ ÀÔ·Â ÇÒ ¼ö ¾ø½À´Ï´Ù.");
			return true;
		}
	}
	return false;
}


// Æ¯¼ö ¹®ÀÚ Ã¼Å©
// return : false (°Ë»ö¾ÈµÊ), true (Æ¯¼ö¹®ÀÚ°Ë»ö ¹× ¸Þ¼¼Áö)
function chkSpeChar2( oInputCtrl)
{
	var speChar = " `~!#$%^&*+=|\\[]{}:;-,<>/?'\"";
	for(var iCnt = 0; iCnt < speChar.length; iCnt++)
	{
		special = speChar.substr(iCnt, 1);
		if( oInputCtrl.value.indexOf(special) != -1)
		{
			alert("Æ¯¼ö¹®ÀÚ[" + special + "]¸¦ ÀÔ·Â ÇÒ ¼ö ¾ø½À´Ï´Ù.");
			oInputCtrl.value = "";
			oInputCtrl.focus();
			return true;
		}
	}
	return false;
}



// Æ¯¼ö ¹®ÀÚ Ã¼Å©
// return : false (°Ë»ö¾ÈµÊ), true (Æ¯¼ö¹®ÀÚ°Ë»ö ¹× ¸Þ¼¼Áö)
function chkSpeChar3( oInputCtrl)
{

	var speChar = " `~!#$%^&*+=|\\[]{}:;-,<>/?'\"";
	for(var iCnt = 0; iCnt < speChar.length; iCnt++)
	{
		special = speChar.substr(iCnt, 1);
		if( oInputCtrl.value.indexOf(special) != -1)
		{
			alert("Æ¯¼ö¹®ÀÚ[" + special + "]¸¦ ÀÔ·Â ÇÒ ¼ö ¾ø½À´Ï´Ù.");
			oInputCtrl.value = "";
			oInputCtrl.focus();
		}
	}
}

/*
//Çà´ç¿ùÀÇ ³¯Â¥ ¼¿·ºÆ® ¹Ú½º
function chkDay(o,val,dayValue){
	var tyearName,tMonthName,tDayName, lastDay,i;
	tyearName = eval(o + "." + val + "Year");
	tMonthName = eval(o + "." + val + "Month");
	tDayName = eval(o + "." + val + "Day");
	//lert(tyearName.selectedIndex)
	
	if(tyearName.selectedIndex>0 && tMonthName.selectedIndex>0){
		lastDay = getDayNum(parseInt(tyearName.value,10), parseInt(tMonthName.value,10));
		tDayName.options.length = lastDay+1;
		tDayName.options[0].value = "";
		tDayName.options[0].text  = "ÀÏ";
		
		for(i=0 ; i < lastDay ; i++) {
        //alert(tDayName.options[i].value);
		 if (i+1<10){
			 tDayName.options[i+1].value = "0"+(i+1);		  
			 tDayName.options[i+1].text  = "0"+(i+1);
		 }else{
			 tDayName.options[i+1].value = i+1;		  
			 tDayName.options[i+1].text  = i+1;
		 }
		}
		if (dayValue!=""){
			tDayName.selectedIndex = dayValue;
		}
		tDayName.focus();
	}else{		
		tDayName.options.length = 1;
		tDayName.options[0].value = "";
		tDayName.options[0].text  = "ÀÏ";
	}
}
*/
//ÇØ´ç¿ùÀÇ ³¯Â¥ ¼¿·ºÆ® ¹Ú½º
function chkDay(o,valYear, valMonth, valDay, dayValue){
	var tyearName,tMonthName,tDayName, lastDay,i;
	tyearName = eval(o + "." + valYear);
	tMonthName = eval(o + "." + valMonth);
	tDayName = eval(o + "." + valDay);
	//lert(tyearName.selectedIndex)
  //alert(tyearName.selectedIndex);
  //alert(tMonthName.selectedIndex);
	if(tyearName.selectedIndex>0 && tMonthName.selectedIndex>0){
		lastDay = getDayNum(parseInt(tyearName.value,10), parseInt(tMonthName.value,10));
		tDayName.options.length = lastDay+1;
		tDayName.options[0].value = "";
		tDayName.options[0].text  = "ÀÏ";
		
		for(i=0 ; i < lastDay ; i++) {
        //alert(tDayName.options[i].value);
		 if (i+1<10){
			 tDayName.options[i+1].value = "0"+(i+1);		  
			 tDayName.options[i+1].text  = "0"+(i+1);
		 }else{
			 tDayName.options[i+1].value = i+1;		  
			 tDayName.options[i+1].text  = i+1;
		 }
		}
		if (dayValue!=""){
			tDayName.selectedIndex = dayValue;
		}
		tDayName.focus();
	}else{		
		tDayName.options.length = 1;
		tDayName.options[0].value = "";
		tDayName.options[0].text  = "ÀÏ";
	}
}

//ÇØ´ç¿ùÀÇ ¸¶Áö¸·³¯Â¥
function getDayNum(valYear, valMonth){
	var monthDays;
		monthDays = [31,28,31,30,31,30,31,31,30,31,30,31];
		if ((((valYear % 4) == 0) && ((valYear % 100) != 0)) || ((valYear % 400) == 0)){
			monthDays[1] = 29;
		}
		return monthDays[parseInt(valMonth)-1];
}

// ¸ÞÀÏÁÖ¼Ò Ã¼Å©
function chkEmailAddr( sEmail)
{
	var sRegExp = /([\w|\-]+)@([\w|\-]+)\.(\w+)/;
	return sRegExp.test( sEmail)
}

//textarea ¹Ú½ºÀÇ ±ÛÀÚ Á¦¾î ÇÔ¼ö
//pInName : (¿¹ document.frmForm.content)
function showMsgLen(pInName, pLen, pMsgLen){
   if (getStrLen(eval(pInName+".value"))>pLen){
	  alert("¿µ¹® " + pLen + "ÀÚ, ÇÑ±Û " + pLen/2 + " ÀÌ³»·Î ÀÛ¼ºÇØ ÁÖ¼¼¿ä.");
	  eval(pInName+".focus()");
   }
	  pMsgLen.innerHTML = getStrLen(eval(pInName+".value")) + '/' + pLen;
}
function getStrLen(str){
	var len=0, j;
	
	for (i=0, j=str.length;
		i<j;
		i++, len++)
	{
		if ( (str.charCodeAt(i)<0)||(str.charCodeAt(i)>127) )
		{
			len = len+1;
		}
	}
	return len;
}

function resizeImage(o, pWidth){
	var MAX_WIDTH=pWidth;
	if (o.width > MAX_WIDTH) {
		o.width = MAX_WIDTH;
	}
}

//´ÙÀ½ ÅÜÀ¸·Î ÀÌµ¿ÇÏ±â (ÁÖ¹Î¹øÈ£³ª ÀüÈ­ ¹øÈ£ µî)
function numTeb(o, pLen, pPre, pNext){
	if (eval("o." + pPre + ".value.length==" + pLen)){
    eval("o." + pNext + ".focus();");
		return;
	}
}


// Form Validation:
// @author ¿ìµ¿½Ä
// control : text box name
// msg : ("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.")
// return : false (form validation fail), true (form validation ¼º°ø)

function isFilled(control, msg) {	
	if (control.value == null || control.value.length == 0) {
		alert(msg);
		control.focus();
		return false;
	}
}
// Form Validation:
// @author ¿ìµ¿½Ä
// control : radio box 
// return : false (form validation fail), true (form validation ¼º°ø)
function isChecked(control, msg) {	// radio button.
	var val = false;
	for (var i=0; i<control.length; i++) {
		if (control[i].checked == true) val = true;
	}
	if(val==false) alert(msg);
	return val;
}
// Form Validation:
// @author ¿ìµ¿½Ä
// control : select box 
// return : false (form validation fail), true (form validation ¼º°ø)
function isSelected(control, msg) {	// drop box.	
	var val = false;
	for (var i=1; i<control.length; i++) {
		if (control.options[i].selected == true) val = true;		
	}
	if(val==false && msg.length>0) {
		control.focus();
		alert(msg);
	}
	return val;
}


//iframÀÇ Å©±â¸¦ Á¶ÀýÇÏ´Â ÇÔ¼ö ½ÃÀÛ
function reSize(){
	    var objBody	  =	 frameLeftLogin.document.body;
	    var objFrame	=	document.all["frameLeftLogin"];
	    objFrame.style.height = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight)
	    objFrame.style.width = '100%'
}

function init() {
  
  frame_init();
}  

// iframe initialize Function
function frame_init()
{
    try{

	    parent.reSize();
	    //parent.document.location.href = parent.document.location.href + '#';
	}
	catch(e)
	{
	 
	}
}
// iframÀÇ Å©±â Á¶ÀýÇÔ¼ö ³¡

// ¸®½ºÆ®ÀÇ Ã¼Å©¹Ú½º ÀüÃ¼ ¼±ÅÃ ¹× ÇØÁö ÇÔ¼ö ½ÃÀÛ
/*ÀüÃ¼ ¼±ÅÃ ÇØÁ¦*/
function AllChk(o, pAll, pChk){
  var value;
  var tmpChkAll, tmpChk;
  tmpChkAll = eval("o." + pAll);
  tmpChk = eval("o." + pChk);   
  if (tmpChkAll.checked==true){
    value=true;
  }else{
    value=false;
  }
  if ( tmpChk != null ){
    var olen = eval(tmpChk.length);
    if ( olen != null ){
      for ( var i = 0 ; i < tmpChk.length ; i++ ){
        tmpChk[i].checked = value;
       }
    }else{
      tmpChk.checked = value;
    }
  }
}
/*°¢ Ã¼Å© ¹Ú½º¸¦ ¼±ÅÃÇÏ¿© ÀüÃ¼ Ã¼Å©¹Ú½º Á¦¾î*/
function chkBox(o, pAll, pChk){
  var value;
  var tmpChkAll, tmpChk;
  tmpChkAll = eval("o." + pAll);
  tmpChk = eval("o." + pChk);
  value = true;
  if ( tmpChk != null ){
    var olen = eval(tmpChk.length);
    if ( olen != null ){
      for ( var i = 0 ; i < tmpChk.length ; i++ ){
        if (tmpChk[i].checked == false){
          value=false;
          break;
        }
      }
    }else{
      if (tmpChk.checked == false){
          value=false;
      }
    }
  }
  tmpChkAll.checked=value;
}
 // ¸®½ºÆ®ÀÇ Ã¼Å©¹Ú½º ÀüÃ¼ ¼±ÅÃ ¹× ÇØÁö ÇÔ¼ö ³¡


 /*±ÝÁö´Ü¾î ÆË¾÷Ã¢*/
 function curseWordOpen(){
  var winWord = window.open("/admin/inc/curseWord.asp",winWord , "width=420,height=570,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
 }

 /*ÆäÀÌÂ¡ Æû submit*/
function listPage(val){
  document.listFrm.page.value = val;
  document.listFrm.submit();
}
//À¥¿¡µðÅÍ ºÎºÐ
function BackGroundColor(o){
  var bgcolorChk;
	bgcolorChk = o.tbContentElement.DOM.body.style.backgroundColor;
    if (bgcolorChk==""){
			o.contentValue.value = o.tbContentElement.DOM.body.innerHTML;
		}else{
			o.contentValue.value = "<div style='background-color: " + bgcolorChk + "'>" + o.tbContentElement.DOM.body.innerHTML + "</div>";
		}
}


// ½Å°í ÆË¾÷ ½ºÅ©¸³Æ®
function openReport(o){
 window.open("","reportForm","width=420,height=230,top=0,left=0,scrollbars=no,resizable=no")
  eval(o+".submit()");
}


// ÄíÅ°°ª °¡Á® ¿À±â (ÁÖ·Î ¿ÀÇÂÃ¢¿¡¼­ ÇÏ·ç¸¸ ºÎºÐ Á¦¿¡ ÇÒ¶§ »ç¿ë
function getCookie(name) {
	var nameOfCookie=name+"=";
	
  var x=0;
  while(x<=document.cookie.length) {
	var y=(x+nameOfCookie.length)
	if(document.cookie.substring(x,y)==nameOfCookie) {
      if((endOfCookie=document.cookie.indexOf(";",y))==-1)
	    endOfCookie=document.cookie.length;
	  return unescape(document.cookie.substring(y,endOfCookie));
    }
    x=document.cookie.indexOf(" ",x) +1;
	if(x==0)
	  break;
  }
  return "";
}

//·Î±×ÀÎ Ã¼Å©
function chkLogin(o){
  if(trim(o.loginName.value)==""){
    alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
    o.loginName.focus();
    return false;
  }
  if(trim(o.password.value)==""){
    alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
    o.password.focus();
    return false;
  }
  return;
}

//¿ìÆí¹øÈ£ Ã£±â... zipcode , address1 , address2
function zipSearch( formName ){
  url = "/join/zipSearch.asp?formName=" + formName;
  open_window(url, "zipSearch", "440", "400", "450", "360", "", "", "", "yes", ""); 
}

function zipSearch2( formName ){
  url = "/join/zipSearch.asp?FGubun=J&formName=" + formName;
  open_window(url, "zipSearch", "440", "400", "450", "360", "", "", "", "yes", ""); 
}

//¸ÞÀÏ ¹ß¼Û...........  javascript:mailSend( 'ÀÌ¸§' , 'ÀÌ¸ÞÀÏÁÖ¼Ò' )
function mailSend( name , email ){
  location.href="/admin/member/groupmail/mailForm.asp?uFlag=solo&name="+name+"&email="+email;
}




//ÀÌ¸ÞÀÏ ÀÔ·Â ¿©ºÎ Ã¼Å©
function mail_ck(frm)
{
	var frm = frm;
	if(frm.value.indexOf("@") +""=="-1" ||
		frm.value.indexOf(".") +""=="-1" || 
		frm.value=="")
	{
		alert("ÀüÀÚ¿ìÆíÀ» ÀÔ·ÂÇÏ¼¼¿ä.")
		frm.focus()
		return false;
	}
}

//ÀÌ¸ÞÀÏ Çü½Ä Ã¼Å©
function mailVal_ck(frm)
{
	var frm = frm;
	if(frm.value.indexOf("@") +""=="-1" ||
		frm.value.indexOf(".") +""=="-1")
	{
		alert("ÀüÀÚ¿ìÆíÇü½ÄÀ» Àß¸ø ÀÔ·ÂÇÏ¼Ì½À´Ï´Ù.")
		frm.focus()
		return false;
	}else{
		return true;
	}
}



//ÀÌ¸ÞÀÏ Çü½Ä Ã¼Å©
function mailVal_ck2(o, val)
{
	if(val.indexOf("@") +""=="-1" ||
		val.indexOf(".") +""=="-1")
	{
		alert("ÀüÀÚ¿ìÆíÇü½ÄÀ» Àß¸ø ÀÔ·ÂÇÏ¼Ì½À´Ï´Ù.")
		o.focus();
		return false;
	}else{
		return true;
	}
}

//ÇÑ±Û ¿©ºÎ Ã¼Å©
function isHangul(str) {
    var re = /[a-zA-Z0-9\s~!@#\$%\^&\*\(\)_\+\{\}|:"<>\?`\-=\[\]\\;',\.\/]/; // matches a alphanumeric character or space

    if (re.test(str))
        return false;

    return true;
}


//±æÀÌ Ã¼Å©
function checkLength(obj, min, max, nullable) {
    if (!nullable) {
        len = obj.value.length;

        if (len < min || len > max)
            return false;
    }
    return true;
}

//ÀÌ¸§ Ã¼Å© ½ÃÀÛ   
function checkFstName(obj) {
    if (!checkLength(obj, 2, 80, false)) {
        alert("ÀÌ¸§À» ÀÔ·ÂÇÏÁö ¾Ê¾Ò°Å³ª À¯È¿ÇÑ ÀÌ¸§ÀÌ ¾Æ´Õ´Ï´Ù.");
				obj.value = "";
        obj.focus();
        return false;
    }
    else if (!isHangul(obj.value)) {
        alert("ÀÌ¸§Àº °ø¹é ¾øÀÌ ÇÑ±Û·Î ½á ÁÖ¼¼¿ä.");
				obj.value = "";
        obj.focus();
        return false;
    }
    return true;
}



/**
 * ÀÔ·Â°ªÀÇ ¹ÙÀÌÆ® ±æÀÌ¸¦ ¸®ÅÏ
  */
function getByteLength(input, maxlength) {
    var byteLength = 0;
    for (var inx = 0; inx < input.value.length; inx++) {
        var oneChar = escape(input.value.charAt(inx));
        if ( oneChar.length == 1 ) {
            byteLength ++;
        } else if (oneChar.indexOf("%u") != -1) {
            byteLength += 2;
        } else if (oneChar.indexOf("%") != -1) {
            byteLength += oneChar.length/3;
        }
    }

    var kormaxlength = 0;
    kormaxlength = maxlength / 2;

    if(byteLength > maxlength){
      alert('ÇÑ±ÛÀº ÃÖ´ë '+kormaxlength+'ÀÚ ±îÁö °¡´ÉÇÏ°í,\n\n¿µ¹®ÀÌ³ª ¼ýÀÚ´Â ÃÖ´ë '+maxlength+'ÀÚ ±îÁö¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.');
      input.value = "";
      input.focus();
      return false;
    }
}


//100ÀÚ±îÁö Ã¼Å©ÇÏ´Â°Å ................................................
	var MSG_LEN_100				= 100;	
	var MSG_LEN_15				= 30;	
	var TOG_WORD				= '%0D';
	var REGIST_100_BYTE			= "ÃÖ´ë ÇÑ±Û 100ÀÚÀÌ³» ±îÁö °¡´ÉÇÕ´Ï´Ù";
	var REGIST_15_BYTE			= "ÃÖ´ë ÇÑ±Û 15ÀÚÀÌ³» ±îÁö °¡´ÉÇÕ´Ï´Ù";

	
	function checkShrtMsgLen(obj) {
		var bResult		= checkMsgLen(obj,MSG_LEN_100);
		var iCountByte	=0;
		var sContentMsg	= '';
		
		if (!bResult){
			
				alert(REGIST_100_BYTE);
				sContentMsg = cutText(obj,MSG_LEN_100);
				obj.value = sContentMsg;
			
		}
	
		iCountByte = getByteLen(obj);
	}

	function checkEventShrtMsgLen(obj) {
		var bResult		= checkMsgLen(obj,MSG_LEN_15);
		var iCountByte	=0;
		var sContentMsg	= '';
		
		if (!bResult){
			
				alert(REGIST_15_BYTE);
				sContentMsg = cutText(obj,MSG_LEN_15);
				obj.value = sContentMsg;
			
		}
	
		iCountByte = getByteLen(obj);
	}


	//100¹ÙÀÌÆ® ÀÌ»ó µÇ¸é º¯¼öÀÇ ±æÀÌ¸¦ ÀÚ¸£´Â ÇÔ¼ö
	function cutText(obj,sByteLen) {
	
		var sTmpMsg			= '';
		var iTmpMsgLen		= 0;
		var sOneChar		= '';
		var iCount			= 0;
		var sOneCharNext	= '';
	
		sTmpMsg = new String(obj.value);
		iTmpMsgLen = sTmpMsg.length;
	
		for (var k = 0 ;k < iTmpMsgLen ; k++) {
			sOneChar = sTmpMsg.charAt(k);
			sOneCharNext = sTmpMsg.charAt(k+1);
			if (escape(sOneChar) == TOG_WORD) {
				iCount++;
				if (iCount > sByteLen-1) {
					sTmpMsg = sTmpMsg.substring(0,k);
					break;
				}
			}
			else if (escape(sOneChar).length > 4) {
				iCount += 2;
			}
			else {
				iCount++;
			}
			if (iCount > sByteLen) {
				sTmpMsg = sTmpMsg.substring(0,k);
				break;
			}
		}
		return sTmpMsg;
	}


	//ÇÑ±ÛÀÏ °æ¿ì¿¡´Â 2byte¸¦ ±×¿ÜÀÇ ¹®ÀÚ´Â 1byte·Î °è»êÇÏ¿©  iCounts¿¡ ÀúÀåÇÏ¿© return ÇØÁØ´Ù.
	function getByteLen(obj,sMsgLng) {
	
		var sMsg       = obj.value;
		var sTmpMsg    = '';												//¸Þ½ÃÁö¸¦ ÀÓ½Ã·Î ÀúÀåÇÏ´Â º¯¼ö
		var sTmpMsgLen = 0;													//ÀÓ½Ã·Î ÀúÀåµÈ ¸Þ½ÃÁöÀÇ ±æÀÌ¸¦ ÀúÀåÇÏ´Â º¯¼ö
		var sOneChar   = '';												//ÇÑ¹®ÀÚ¸¦ ÀúÀåÇÏ´Â º¯¼ö
		var iCounts    = new Array();										//ÃÑ ¹ÙÀÌÆ®¿Í ÆäÀÌÁö´ç ¹ÙÀÌÆ® ¼ö¸¦ ÀúÀåÇÏ´Â ¹è¿­
	
		iCounts[0]= 0;														//ÃÑ ¹ÙÀÌÆ®¸¦ ÀúÀå ÇÏ´Â º¯¼ö
	
		if (sMsgLng != null) {
			sTmpMsg	= new String(sMsgLng);
		}
		else
			sTmpMsg	= new String(sMsg);
		sTmpMsgLen	= sTmpMsg.length;
	
		for (k = 0 ;k < sTmpMsgLen ;k++) {
			sOneChar = sTmpMsg.charAt(k);
			if (escape(sOneChar) == TOG_WORD) {
				iCounts[0]++;
			}
			else if (escape(sOneChar).length > 4) {
				iCounts[0] += 2;
			}
			else  {
				iCounts[0]++;
			}
		}
	
		return iCounts;
	}


	function checkMsgLen(obj,sByteLen) {
	
		var iCounts = new Array();
		iCounts = getByteLen(obj);											//º¯¼öÀÇ ±æÀÌ¸¦ ±¸ÇÏ´Â ÇÔ¼ö
	
		if (iCounts[0] > sByteLen)
			return false;
		else
			return true;
	}


//100ÀÚ±îÁö Ã¼Å©ÇÏ´Â°Å ................................................





//¼³¹®Ç×¸ñ ÅõÇ¥½Ã Ã¼Å© ÇÏ´Â ÇÔ¼ö
function pollSubmit(o){
	var val = false;

	for (var i=0; i<o.pollnum.length; i++) {
		if (o.pollnum[i].checked == true) val = true;
	}
	if(val==false) alert("ÅõÇ¥ÇÒ Ç×¸ñÀ» ¼±ÅÃÇÏ¼¼¿ä.");
	return val;
}




	//·Î±×ÀÎ½Ã ¾ÆÀÌµð/ºñ¹Ð¹øÈ£ Ã¼Å©
	function jsLoginSubmit(o)
	{
			if (trim(o.id.value)==""){
				alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
				o.id.focus();
				return false;
			}

			if (trim(o.password.value)==""){
				alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
				o.password.focus();
				return false;
			}

	}



	function jsIdpwcheckSubmit(o){

			//ÀüÃ¼ °øÅë
			if (trim(o.name.value)==""){
				alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä.");
				o.name.focus();
				return false;
			}

			if (trim(o.juminno1.value)=="" && trim(o.juminno2.value)=="" ){
				alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
				o.juminno1.focus();
				return false;
			}else{
				var check = jumin_check(o, o.juminno1, o.juminno2 );
				if (check == true)
				{
					alert(o.msg.value);
					o.juminno1.focus();
					return false;
				}
			}
		

			if (trim(o.email.value)==""){
				alert("ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
				o.email.focus();
				return false;
			}else {
					if (!mailVal_ck2(o.email, o.email.value)) return false;
			}
	}



function loginRedirect(gubun, rediecturl)
{
  var result
  result = alert('·Î±×ÀÎ ÇÏÁö ¾ÊÀ¸¼Ì³×¿ä? ·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ÆäÀÌÁöÀÔ´Ï´Ù.');
  location.href="/login/login.asp?gubun="+gubun+"&rediecturl="+rediecturl;
}

function loginRedirect_mini(ThisURL, gubun, rediecturl)
{
  var result
  result = alert('·Î±×ÀÎ ÇÏÁö ¾ÊÀ¸¼Ì³×¿ä? ·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ÆäÀÌÁöÀÔ´Ï´Ù.');
  parent.location.href="http://"+ThisURL+"/login/loginmini.asp?gubun="+gubun+"&rediecturl="+rediecturl;
}

function go_idpwSearch()
{
  opener.location.href='/login/idpwSearch.asp';
  opener.document.focus();
}

function go_joinform()
{
  opener.location.href='/member/joinform.asp';
  opener.document.focus();
}

//·Î±×ÀÎ Ã¼Å©
function frmChk(o){
  if(trim(o.title.value)==""){
    alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.title.focus();
    return false;
  }
  if(trim(o.content.value)==""){
    alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.content.focus();
    return false;
  }
  return true;
}

function BigImgWinOpen(p_pkid, p_filename, p_imageFolder){
window.open("/include/pop_image.asp?pkid="+p_pkid+"&filename="+p_filename+"&imageFolder="+p_imageFolder, "image", "width=250, height=250, top=300, left=300, scrollbars= 0, resizable=1, toolbar=0, menubar= 0,location=0, directories=0, status=0");
}

function BookOrderWinOpen(p_BBSCode, p_fkDiffusion){
window.open("/publication/p_data/book_order.asp?BBSCode="+p_BBSCode+"&fkDiffusion="+p_fkDiffusion, "image", "width=500, height=630, top=300, left=300, scrollbars= 0, resizable=1, toolbar=0, menubar= 0,location=0, directories=0, status=0");
}

function BookConfirmWinOpen(p_fkOrderList){
window.open("/mypage/apply/publication/view.asp?fkOrderList="+p_fkOrderList, "image", "width=500, height=630, top=300, left=300, scrollbars= 0, resizable=1, toolbar=0, menubar= 0,location=0, directories=0, status=0");
}

function CommentChk(o){
  if (trim(o.userName.value)==""){
    alert("ÀÛ¼ºÀÚ¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
    o.userName.focus();
    return false;
  }
  if (trim(o.content.value)==""){
      alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
      return false;
  }

}


//ÆÐ½º¿öµåÀÔ·Â
function frmChk2(o){
  if(trim(o.title.value)==""){
    alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.title.focus();
    return false;
  }
  if(trim(o.name.value)==""){
    alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.name.focus();
    return false;
  }
  if(trim(o.passwd.value)==""){
    alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
    o.passwd.focus();
    return false;
  }
  if(trim(o.content.value)==""){
    alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.content.focus();
    return false;
  }
  return true;
}