function jsSearchId(vPpgm_id){
	var form = this.document.forms[0];
	        var vUcall_url = vPpgm_id;
	        window.open(vUcall_url,'newWindow','toolbar=no,location=0, top=280,left=350,directories=no,status=no,menubar=no,scrollbars=no,resizable=1,width=320,height=230');
	}

function jsCheckHangul(s) // ÀÔ·ÂÇÑ ¹®ÀÚ°¡ ¿µ¹®ÀÚ¿Í ¼ýÀÚ¸¸À¸·Î ÀÌ·ç¾îÁ®¾ß ÇÏ´Â °æ¿ì ¸ÂÀ¸¸é true ¾Æ´Ï¸é false
{
     var chkstr = s;
     var is_verify = true ;
     var flag = "N";
	 var truestr = new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9","-","@");
    
     for ( j = 0 ; is_verify && ( j < chkstr.length ) ; j++) {
         flag = "N";   
         for ( i = 0 ; i < truestr.length ; i++ ) {
     	   if( chkstr.toUpperCase().substring( j , j+1 ) == truestr[i] ) flag = "Y" ;
         }
		 if ( flag == "N" ) { 
             return(false);  		 
		 }
	 }
	 return(true);	   
}


	function getCookieValue( 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 ""; 
   } 

/////////////////////////////////////////////////////////////////
//////    GENERAL VALIDATION  CHECK  RETURN MESSAGE /////////////
/////////////////////////////////////////////////////////////////

/*--------------------------------------------------
  ±â´É   : Check Null RETURN Message
  RETURN : NONE
     MSG : alert("Ç×¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.") ;
  AUTHOR : H.J.Lim
----------------------------------------------------*/

function jsCheckNullMessage(toCheck) 
{
     var chkstr = toCheck.value + "";
     var is_Space=true ;
    
     if ( ( toCheck.value == "") || ( chkstr == null ) ) 
     {
        alert("Ç×¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.") ;
        toCheck.focus() ;
        toCheck.select() ;
        return(false);
     }

     for ( j = 0 ; is_Space && ( j < chkstr.length ) ; j++)
     	 if( chkstr.substring( j , j+1 ) != " " ) is_Space = false ;

     if ( is_Space)
     {
        alert("Ç×¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.") ;
        toCheck.focus() ;
        toCheck.select() ;
        return(false);
     }
     return ( true );
} 



/*--------------------------------------------------
  ±â´É   : Check Number RETURN Message 
  RETURN : NONE
     MSG : alert("ÀÔ·ÂÇÑ Ç×¸ñ¿¡ ¹®ÀÚ°¡ Æ÷ÇÔµÇ¾ú½À´Ï´Ù.") ;
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsCheckNumberMessage(toCheck) 
{
     var isNum = true;
     var chkstr = toCheck.value + "" ;

     if ( !jsCheckNullMessage( toCheck ) ) return(false); 

     for (j = 0; isNum && (j < chkstr.length); j++) 
     {
         if ((chkstr.substring(j,j+1) < "0") || (chkstr.substring(j,j+1) > "9"))
         {
             alert("ÀÔ·ÂÇÑ Ç×¸ñ¿¡ ¹®ÀÚ°¡ Æ÷ÇÔµÇ¾ú½À´Ï´Ù.") ;
             toCheck.focus() ;
             toCheck.select() ;
             return(false);
         }
     }
     return(true);
} 



/////////////////////////////////////////////////////////////////
////  GENERAL VALIDATION  CHECK  RETURN TRUE OR FALSE ///////////
/////////////////////////////////////////////////////////////////


/*--------------------------------------------------
  ±â´É   : Check Null RETURN T/F
  INPUT  : check  data
  RETURN : true  -> NULL
           false -> NOT NULL
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsCheckNull( toCheck ) 
{
     var chkstr = toCheck + "";
     var is_Space = true ;
    
     if ( ( chkstr == "") || ( chkstr == null ) ) 
	   return( true );

     for ( j = 0 ; is_Space && ( j < chkstr.length ) ; j++)
     {
	     if( chkstr.substring( j , j+1 ) != " " ) 
         {
	       is_Space = false ;
         }
     }
     return ( is_Space );
} 


/*--------------------------------------------------
  ±â´É   : Check Number RETURN T/F
  INPUT  : toCheck  -> check data 
  RETURN : true  -> number
           false -> not number
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsCheckNumber(toCheck) 
{
     var chkstr = toCheck+"" ;
     var isNum = true ;

     if ( jsCheckNull(toCheck) ) 
          return false;

     for (j = 0 ; isNum && (j < toCheck.length) ; j++) 
     {
          if ((toCheck.substring(j,j+1) < "0") || (toCheck.substring(j,j+1) > "9"))
          {
             if ( toCheck.substring(j,j+1) == "-" || toCheck.substring(j,j+1) == "+")
             {
                if ( j != 0 ) 
                {
                   isNum = false;
                }
             }
             else
             {
                isNum = false ;
             }
          }
     }

     if (chkstr == "+" || chkstr == "-") isNum = false;

     return isNum;
} 


/*--------------------------------------------------
  ±â´É   : Check Float RETURN T/F
  INPUT  : toCheck  -> check data 
  RETURN : true  -> number
           false -> not number
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsCheckFloat(toCheck)
{
     var chkstr = toCheck+"" ;
     var isFloat = true;

     var chkPoint = false;
     var chkMinus = false;
	 
     if ( jsCheckNull(toCheck) )
     {
           return false;
     }	
	
	 for (j = 0 ; isFloat && (j < toCheck.length); j++)
     {
         if ( (toCheck.substring(j,j+1) < "0") || (toCheck.substring(j,j+1) > "9"))
         {

            if ( toCheck.substring(j,j+1) == "." )
            {
               if ( !chkPoint ) chkPoint = true ;
               else  isFloat = false ;
            }
            else if ( toCheck.substring(j,j+1) == "-" || toCheck.substring(j,j+1) == "+")
            {
               if ( ( j == 0 ) && ( !chkMinus ) ) chkMinus = true ; 
               else isFloat = false;
            }             
            else isFloat = false;
        }
    }

    return isFloat;
}


/*--------------------------------------------------
  ±â´É   : Trim RETURN toCheck
  INPUT  : toCheck  -> check data 
  RETURN : trim(toCheck)           
  AUTHOR : S.U.Lim
----------------------------------------------------*/
function jsTrim(toCheck)
{
     var chkstr 	= toCheck+"" ;
     var isStr  	= "";     
     var isStrBuf 	= "";
     var isStrTrim 	= "";
	 var isFlag 	= 0;

     if ( jsCheckNull(toCheck) )
     {
           return isStr;
     }

	 for (j = 0 ; j < toCheck.length ; j++)
     {
     
     	if ( toCheck.substring(j,j+1) == " " ) {     		
     		if (isFlag == 1 ) {     		     		
     			isStr = isStr + toCheck.substring(j,j+1);
     		}
     	} else {
     		isFlag = 1;     		
     		isStr = isStr + toCheck.substring(j,j+1);
     	}
     } 
          
     isFlag = 0;
     for( i = isStr.length; i  > 0 ; i--) {
     	
     	if ( isStr.substring(i,i-1) == " " ) {     		
     		if (isFlag == 1 ) {     		     		
     			isStrBuf = isStrBuf + isStr.substring(i,i-1);
     		}
     	} else {
     		isFlag = 1;     		
     		isStrBuf = isStrBuf + isStr.substring(i,i-1);
     	}
     }       
         
     for( k = isStrBuf.length; k  > 0 ; k--) {
     	isStrTrim = isStrTrim + isStrBuf.substring(k,k-1);
     }          
     
     return isStrTrim;
 }    
 





/*--------------------------------------------------
  ±â´É   : NULLÀ» Çã¿ëÇÏ´Â Check Float RETURN T/F
  INPUT  : toCheck  -> check data 
  RETURN : true  -> number
           false -> not number
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsNullOkCheckFloat(toCheck)
{
     var chkstr = toCheck+"" ;
     var isFloat = true;

     var chkPoint = false;
     var chkMinus = false;

     if ( jsCheckNull(toCheck) )
     {
           return true;
     }


     for (j = 0 ; isFloat && (j < toCheck.length); j++)
     {
         if ( (toCheck.substring(j,j+1) < "0") || (toCheck.substring(j,j+1) > "9"))
         {

            if ( toCheck.substring(j,j+1) == "." )
            {
               if ( !chkPoint ) chkPoint = true ;
               else  isFloat = false ;
            }
            else if ( toCheck.substring(j,j+1) == "-" || toCheck.substring(j,j+1) == "+")
            {
               if ( ( j == 0 ) && ( !chkMinus ) ) chkMinus = true ; 
               else isFloat = false;
            }
            else isFloat = false;
        }
    }

    return isFloat;
}


/*--------------------------------------------------
  ±â´É   : ÀÚ¸´¼ö check RETURN T/F
  INPUT  : toCheck  -> check data 
  RETURN : true  -> number
           false -> not number
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsCheckPoint( toCheck , Positive , Negative )
{
     var strPos = toCheck + "" ;
     var isPoint = true ;

     if ( jsCheckFloat ( toCheck ) )
     {

         var inx = strPos.indexOf(".") ; // String °³Ã¼ ¾È¿¡¼­ ºÎºÐ ¹®ÀÚ¿­ÀÌ Ã³À½ ³ª¿À´Â ¹®ÀÚ À§Ä¡¸¦ ¹ÝÈ¯ÇÕ´Ï´Ù. 

         if ( inx == -1 )
         {
              if ( strPos.length > parseInt(Positive) )
                 isPoint = false ;
              else
                 isPoint = true ;
          }
          else
          {
               var pos = strPos.substring( 0, inx ) ;
               var nev = strPos.substring(inx + 1) ;				
               if ( pos.length > parseInt(Positive) )
                     isPoint = false ;
               else if ( nev.length > parseInt(Negative) )
                     isPoint = false ;
               else
                     isPoint = true ;
          }
      }
      else if ( jsCheckNumber (toCheck) ) 
            isPoint = true  ;
      else 
            isPoint = false ;

      return isPoint ;

}


/*--------------------------------------------------
  ±â´É   : calender¿¡¼­ »ç¿ëÇÒ ¿ùº° ¹è¿­¸¦ ¸¸µç´Ù.
  INPUT  : °¢ ÀÎÀÚÀÇ °ª 
  AUTHOR : H.J.Lim
----------------------------------------------------*/
/**
function jsMonthArray(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;
	  
}        **/


/*--------------------------------------------------
  ±â´É   : ³âµµ¸¦ checkÇÑ´Ù.
  INPUT  : toCheck  
  RETURN : NONE
     MSG : 
  AUTHOR : H.J.Lim
----------------------------------------------------*/

function jsCheckYYYY(toCheck) 
{
   return ( ( toCheck.length == 4) && ( jsCheckNumber(toCheck)  ) && ( toCheck != "0000") );
}



/*--------------------------------------------------
  ±â´É   : ¿ùÀ» checkÇÑ´Ù.
  INPUT  : toCheck  
  RETURN :
    MSG  : 
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsCheckMM(toCheck)
{
      return ((toCheck.length > 0) && (jsCheckNumber(toCheck)) && (0< eval(toCheck)) && (eval(toCheck) < 13));
}

/*--------------------------------------------------
  ±â´É   : ÀÏÀ» checkÇÑ´Ù.
  INPUT  : toCheck  
  RETURN : NONE
     MSG : 
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsCheckDD(yyyy,mm,toCheck)
{
      var isYMD  = false;
      var monthDD= new Array(31,28,31,30,31,30,31,31,30,31,30,31);
      var im     = eval(mm) - 1;
      if ( toCheck.length == 0 )  return false;
      if ( !jsCheckNumber(toCheck)  )  return false;
      var dd     = eval(toCheck);
      if ( ( (yyyy%4 == 0) && (yyyy%100 != 0) ) || (yyyy%400 == 0) )
      {
           monthDD[1] = 29;
      }
      if ( (0 < dd) && (dd <= monthDD[im]) ) isYMD = true;
           return isYMD;
}

/*--------------------------------------------------
  ±â´É   : ³â¿ù¸¦ checkÇÑ´Ù.
  INPUT  : toCheck  
  RETURN : NONE
     MSG : 
  AUTHOR : H.J.Lim
---------------------------------------------------*/
function jsCheckYYYYMM(toCheck)
{
     var isDate  = true ;

     if ( toCheck.length != 6 )
     {
          isDate = false ;
     }
     else
     {
           var yy = toCheck.substring(0,4) +"" ;
           var mm = toCheck.substring(4,6) +"" ;

           if ( !jsCheckYYYY(yy) )
              isDate = false ;
           else if ( !jsCheckMM(mm) )
              isDate = false ;
     }

     return isDate ;
}


/*--------------------------------------------------
  ±â´É   : ³¯Â¥¸¦ checkÇÑ´Ù.
  INPUT  : dateVal  
  RETURN : NONE
     MSG : 
  AUTHOR : H.J.Lim
----------------------------------------------------*/
function jsCheckDate( dateVal )
{

     var isDate  = true ;

     if ( dateVal.length != 8 )
     {
          isDate = false ;
     }
     else
     {

           var yy = dateVal.substring(0,4) +"" ;
           var mm = dateVal.substring(4,6) +"" ;
           var dd = dateVal.substring(6,8) +"" ;

           if ( !jsCheckYYYY(yy) )
              isDate = false ;
           else if ( !jsCheckMM(mm) )
              isDate = false ;
           else if ( !jsCheckDD (yy,mm,dd) )
              isDate = false ; 
     }

     return isDate ;

}
/*--------------------------------------------------
  ±â´É   : ³¯Â¥¸¦ checkÇÑ´Ù.8ÀÚ¸®¸¸ Ã¼Å©..µµ¼­ ¹ßÇà³âµµ¿¡ ¿ù/ÀÏ¾ø´Â µµ¼­ 0000À¸·Î µé¾î°¥¼ö ÀÕ°Ô Çã¿ë
  INPUT  : dateVal  
  RETURN : NONE
     MSG : 
  AUTHOR : H.J.Lim
----------------------------------------------------*/

function jsCheckDate_1( dateVal )
{

     var isDate  = true ;

     if ( dateVal.length != 8 )
     {
          isDate = false ;
     }
     

     return isDate ;

}

/*--------------------------------------------------
  ±â´É   : Check Time RETURN T/F
  INPUT  : check  time
  RETURN : true  -> TIME
           false -> NOT TIME
  AUTHOR : Kyung K.W
----------------------------------------------------*/
function jsCheckTime( toCheck ) 
{
     var chkstr  = toCheck + "";
    
     if ( ( chkstr == "") || ( chkstr == null ) ) 
	   return( false );

     var mm = chkstr.substring( 0 ,2 );
     var ss = chkstr.substring( 2 ,4 );
     
     if (( mm <= "23" ) && ( mm >= "00" ))
     {
         if (( ss <= "59" ) && ( ss >= "00" ))
         {
             return( true );
             /*
			 if ( chkstr.substring( 2 ,3 ) == ":")  
             {
	             return( true );
             }
             */
         }
     }
     return( false );
} 

/*--------------------------------------------------
  ±â´É   : Check ÁÖ¹Îµî·Ï¹øÈ£ RETURN T/F
  INPUT  : toCheck
  RETURN : true  -> ¿Ã¹Ù¸¥ ¹øÈ£
           false -> 
  AUTHOR : HGLIM
----------------------------------------------------*/
function jsCheckJumin(toCheck) {
    var isJumin = true;
    if ( jsCheckNull(toCheck) ) {
          return false;
    } else if ( toCheck.length < 13 || toCheck.length > 13 ) {
          return false;
    } else if ( toCheck.substring(2,3) > "1" || toCheck.substring(6,7) > "4" || toCheck.substring(6,7) == "0" ) {
          return false;
    } else if ( toCheck.substring(2,3) == "1" && toCheck.substring(3,4) > "2" ){
          return false;
    } else if (!(toCheck.substring(4,6) >= "01" && toCheck.substring(4,6) <= "31")){
          return false;
    } else if ( toCheck == "1111111111111" ) {
	      return false;
	}
   for (j = 0; isJumin && (j < toCheck.length); j++) {
       if ( ( (toCheck.substring(j,j+1) < "0") || (toCheck.substring(j,j+1) > "9")) ) {
           isJumin = false;
       }
   }
   return isJumin;
}




/*------------------------------------------------------*/
/* ¼³ºñ part °øÅë java script function				    */
/* 1.¼ýÀÚÃ¼Å©      										*/
/* 2.¼ýÀÚ,NULLÃ¼Å© 										*/
/*------------------------------------------------------*/

function jsChkNum(toCheck) {

        if( (toCheck==null) || (toCheck=="") ) return false;
        for(var j=0; j< toCheck.length; j++){
            if( ( toCheck.substring(j,j+1) <"0" ) || ( toCheck.substring(j,j+1) > "9" ) ){
                return false;
            }
        }
        return true;
}

/*--------------------------------------------------
  ±â´É   : ¼ýÀÚ,NULLÃ¼Å© RETURN T/F
  INPUT  : data_form_field, name
  RETURN : true  -> ¿Ã¹Ù¸¥ ¹øÈ£
           false -> 
  AUTHOR : HGLIM
----------------------------------------------------*/
function jsValid (data_form_field,name)
{
        var rtn = true ;

		KorName = name;

        if ( data_form_field.length <= 0 )
        {
            alert(KorName+"À»(¸¦) ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä.") ;
            data_form_field.focus();
            rtn = false ;
            return rtn ;
        }
        else
        {
            if ( !jsChkNum(data_form_field.value) )
            {
                alert(KorName+"À»(¸¦) ¼ýÀÚ·Î ÀÔ·ÂÇÏ¼¼¿ä.") ;
            	data_form_field.focus();
                rtn = false ;
                return rtn ;
            }
        }

        return rtn ;
}


/*--------------------------------------------------
  ±â´É   : Check Internet Address
  INPUT  : check  address
  RETURN : true  -> Address
           false -> NOT Address
  AUTHOR : Kyung K.W
----------------------------------------------------*/
function jsChkEmail( theFieldValue ) 
{
     var foundSymbol = false ;
    
     for ( var i=0; i<theFieldValue.length; i++)
     {
         var ch = theFieldValue.substring(i,i+1);
         if ( ch=="@" )
             foundSymbol = true ;
     }
     return foundSymbol;
}


/*--------------------------------------------------
  ±â´É   : Æò¹æ¹ÌÅÍ¸¦ ÇíÅ¸¸£·Î °è»êÇÑ´Ù.
  INPUT  : Æò¹æ¹ÌÅÍ(Á¤¼ö),ÇíÅ¸¸£(¼Ò¼öµéÂ°ÀÚ¸®)
  RETURN : ha           
  AUTHOR : Woojin Jung
----------------------------------------------------*/
function jsM2H(vPh) {
	  var vPm1 = vPh / 10000;
	  var vPm2 = vPm1-Math.floor(vPm1);
	  var vPm3 = new String(vPm2);

	  if (vPm3.length <= 4){
	  var vPm = vPm1;
	  } else {
	  var vPm = Math.floor(vPm1) + "." + vPm3.substring(2,4) ;
	  } 
	  
	  return vPm;
}  
	
/*--------------------------------------------------
  ±â´É   : ÇíÅ¸¸£¸¦ Æò¹æ¹ÌÅÍ·Î °è»êÇÑ´Ù.
  INPUT  : ha(½Ç¼ö)
  RETURN : Æò¹æ¹ÌÅÍ           
  AUTHOR : Woojin Jung
----------------------------------------------------*/
function jsH2M(vPm) {
	  var vPh = Math.round(vPm * 10000);
	  return vPh;
}  

/*--------------------------------------------------
  ±â´É   : Æò¹æ¹ÌÅÍ¸¦ ÆòÀ¸·Î °è»êÇÑ´Ù.
  INPUT  : ha(½Ç¼ö)
  RETURN : Æò           
  AUTHOR : Woojin Jung
----------------------------------------------------*/
	function jsM2P(vPm) {
	  var vPp = Math.round(vPm / 3.3058);
	  return vPp;
    }
	
/*--------------------------------------------------
  ±â´É   : ÆòÀ» Æò¹æ¹ÌÅÍ·Î °è»êÇÑ´Ù.
  INPUT  : Æò(½Ç¼ö)
  RETURN : Æò¹æ¹ÌÅÍ           
  AUTHOR : Woojin Jung
----------------------------------------------------*/
	function jsP2M(vPp) {
	  var vPm = Math.round(vPp * 3.3058);
	  return vPm;
    }


/////////////////////////////////////////////////////////////////
/////////////////    HELP  BUTTON  SHOW    //////////////////////
/////////////////////////////////////////////////////////////////

/*--------------------------------------------------
  ±â´É   : 
  INPUT  : helpfile
  RETURN : 
  AUTHOR : HGLIM
----------------------------------------------------*/
function jsShowHelp( helpfile )
{
      var helpstr = helpfile + "" ;
      var URL     = "" ;
      var cWin ;
		   
      URL = "/help/"+helpfile+".html" ;

      cWin = window.open(URL,"help","toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=560,height=320");

      cWin.focus();
}

/////////////////////////////////////////////////////////////////
////////////    SELECT OPTION BOXÀÇ °ªÀ» RETURN ÇÑ´Ù. ///////////
/////////////////////////////////////////////////////////////////

function jsCheckSelectBox ( sb )
{
    var SelectValue = null ;

    for ( var i=0 ; i < sb.length  ; i++)
    {
        if ( sb.options[i].selected == true )
        {
           if ( sb.options[i].value != "" )
           {
             SelectValue = sb.options[i].value ;
             break;
           }
        }
    }
    return SelectValue  ;
}



/////////////////////////////////////////////////////////////////
////////////    TIMER                                 ///////////
/////////////////////////////////////////////////////////////////

var timerID = null;
var timerRunning = false;

function jsStopClock (){

    if(timerRunning)
        clearTimeout(timerID);
    timerRunning = false;
}

function jsShowTime () {

    var now = new Date();
    var hours = now.getHours();
    var minutes = now.getMinutes();
    var seconds = now.getSeconds();
    var tmp = now.getDay();

    if (tmp == 0)
         Week = "ÀÏ¿äÀÏ";
    else if (tmp == 1)
         Week = "¿ù¿äÀÏ";
    else if (tmp == 2)
         Week = "È­¿äÀÏ";
    else if (tmp == 3)
         Week = "¼ö¿äÀÏ";
    else if (tmp == 4)
         Week = "¸ñ¿äÀÏ";
    else if (tmp == 5)
         Week = "±Ý¿äÀÏ";
    else if (tmp == 6)
         Week = "Åä¿äÀÏ";

    var Month = now.getMonth()+1;
    var day = Month+"¿ù"+now.getDate()+"ÀÏ"+Week+" ";

    var tValue = ""+ ((hours >12) ? hours -12 :hours)
    tValue += ((minutes < 10) ? ":0" : ":") + minutes
    tValue += ((seconds < 10) ? ":0" : ":") + seconds
    tValue += (hours >= 12) ? " PM" : " AM"

    document.form1.tTime.value = day + tValue ;
    timerID = setTimeout("jsShowTime()",1000);
    timerRunning = true;

}

function jsStartClock () {

    jsStopClock();
    jsShowTime();
}

/*--------------------------------------------------
  ±â´É   : »ç¾÷ÀÚ¹øÈ£ Ã¼Å© 
  INPUT  : check  »ç¾÷ÀÚ¹øÈ£ 
  RETURN : true  -> Address
           false -> NOT Address
  AUTHOR : Sokun Lim	(2000/01/24) 
  (ÂüÁ¶) :
	»ç¾÷ÀÚ¹øÈ£: 123-45-67890 ¶ó °¡Á¤ÇÏ°í..
	¾Õ¿¡¼­ ¿©´üÀÚ¸®±îÁö´Â °¢°¢ 1,3,7,1,3,7,1,3 À» °öÇÏ°í ±¸ÇØÁø °ªµéÀ» ´õÇÑ´Ù.
	Áï,À§ÀÇ »ç¾÷ÀÚ¹øÈ£¶ó¸é,,,
	(1*1) + (2*3) + (3*7) +(4*1) + (5*3) +(6*7)+ (7*1) + (8*3) = A ¶óÇÏ°í...

	´ÙÀ½Àº »ç¾÷ÀÚ¹øÈ£ 9Â°ÀÚ¸®¿¡ 5¸¦°öÇÏ°í ½ÊÀÚ¸®¿Í ´ÜÀÚ¸®°ªÀ» ´õÇÑ´Ù..
	Áï, À§ÀÇ ¿¹¶ó¸é 
	9 * 5 = 45 =====> 4 + 5 ÇÏ¸é 9°¡µÇ´Âµ¥ ÀÌ°ªÀ» B ¶óÇÏ¸é..
	A + B ÇÏ¿© ±¸ÇØÁø°ªÀÇ ´ÜÀÚ¸®¼ö¸¦ ±¸ÇÑ´Ù.( (A+B) / 10 ÇÏ¿© ³ª¸ÓÁö¸¦ ±¸ÇÏ´Â°Í°ú°°´Ù) 
	
	ÀÌ·¸°Ô ±¸ÇØÁø ¼öÀÇ 10ÀÇº¸¼ö¸¦ ±¸ÇØ¼­ »ç¾÷ÀÚ¹øÈ£ÀÇ ³¡ÀÚ¸®¿Í °°Àº°¡ Ã¼Å©ÇÏ¸éµÈ´Ù.
	Áï, ÀÌ·¸°Ô ±¸ÇØÁø °ªÀÌ 8ÀÌ¸é ³¡ÀÚ¸®°¡ 10ÀÇº¸¼ö Áï 2°¡µÈ´Ù.
----------------------------------------------------*/
function jsChkBusino( toCheck ) 
{   
	var isBusino = true;
	
	if ( jsCheckNull(toCheck) )
    {
    	return false;
    }	
    
                               
 	var p_saupno1=toCheck.substring(0,1);
 	var p_saupno2=toCheck.substring(1,2);
 	var p_saupno3=toCheck.substring(2,3);
 	var p_saupno4=toCheck.substring(3,4);
 	var p_saupno5=toCheck.substring(4,5);
 	var p_saupno6=toCheck.substring(5,6);
 	var p_saupno7=toCheck.substring(6,7);
 	var p_saupno8=toCheck.substring(7,8);
 	var p_saupno9=toCheck.substring(8,9);
 	var p_saupno0=toCheck.substring(9,10);
 	var p_check1 = "";
 	var p_check2 = "";
 	var p_check3 = "";
 	var p_check4 = "";
 	var p_mux1	 = "";	
  	var p_mux2	 = "";	
  	var p_lastcheck	 = "";	
  	var na_rc	 = "";	
  		                                                  
  	/*»ç¾÷ÀÚ¹øÈ£ÀÇ 8Â°ÀÚ¸®±îÁö °¢°¢ Æ¯¼öÇÑ ¼ö¿Í °öÇÏ¿© */
  	/*ÇÕ°è¸¦ ³½´Ù. */
  	if ( p_saupno1 == "" ) {     	
     	return false;    	
    } else if (p_saupno2 == "" ) {
    	return false;    	    
    } else if (p_saupno3 == "" ) {
    	return false;    	    
    } else if (p_saupno4 == "" ) {
    	return false;    	    
    } else if (p_saupno5 == "" ) {
    	return false;    	    
    } else if (p_saupno6 == "" ) {
    	return false;    	    
    } else if (p_saupno7 == "" ) {
    	return false;    	    
    } else if (p_saupno8 == "" ) {
    	return false;    	    
    } else if (p_saupno9 == "" ) {
    	return false;    	    					
    } else if (p_saupno0 == "" ) {
    	return false;   
    } 	    	  
  	var sum  = ( p_saupno1 * 1 ) +
                ( p_saupno2 * 3 ) +
                ( p_saupno3 * 7 ) +
                ( p_saupno4 * 1 ) +
                ( p_saupno5 * 3 ) +
                ( p_saupno6 * 7 ) +
                ( p_saupno7 * 1 ) +
                ( p_saupno8 * 3 ) +
                ( p_saupno9 * 5 ) ;                                                    
      
   	sum = sum + ( (p_saupno9 * 5) /10 );
   
   	var ly_y= parseInt(sum) % 10;
   	var epno_chk = 0;
 
   	if ( ly_y == 0 ) {
   		epno_chk = 0;
   	} else{
   		epno_chk = 10 - ly_y
   	}
   	if ( epno_chk == p_saupno0 ) {
   		return true;
   	} else {
   		return false;
   	}   	   	
 }  
 
 
/*-----------------------------------------------------------------------
  ±â´É   : ÇÊµåÀÇ ¹®ÀÚ°¹¼ö°¡ count ÀÌ»óÀÌ¸é Æ÷Ä¿½º°¡ next·Î ¹Ù²ï´Ù.
  INPUT  : current(ÇöÀçÇÊµå),count(ÀÔ·Â¹®ÀÚÀÇ °¹¼ö),next(¿Å°ÜÁú ÇÊµå)
  RETURN :           
  AUTHOR : Woojin Jung
  sample : onKeyUp = "jsMoveFocus(FRM1.vPaaa,20,FRM1.vPbbb)"
-----------------------------------------------------------------------*/
    function jsMoveFocus(current,count,next) {
	   var current   = current ;	
	   var next      = next ;
		if ( current.value.length >= count ) {
		     next.focus();
			 next.select();
		}
	}

	
/*-----------------------------------------------------------------------
  ±â´É   : ÀÔ·Â°ªÀ» ÀÐ¾î ¼ýÀÚ¸¸À» ÃëÇØ¼­ ±Ý¾×Çü½ÄÀ¸·Î ³ªÅ¸³½´Ù.
  INPUT  : ÀÔ·Â¹ÞÀº text ÇÊµåÀÇ °ª
  RETURN :           
  AUTHOR : Woojin Jung
  sample : jsFormatMoney(document.form1.vPmoney.value)
-----------------------------------------------------------------------*/
	
function jsFormatMoney(m)
	{
	var money, pmoney, mlength, z, textsize, i;
	textsize=20;
	pmoney="";
	z=0;
	money=m;
	money=jsClearString(money);
	money=Number(money);
	money=money+"";
	for(i=money.length-1;i>=0;i--)
		{
		z=z+1;
		if(z%3==0) 
			{
			pmoney=money.substr(i,1)+pmoney;
			if(i!=0)	pmoney=","+pmoney;
			}
		else pmoney=money.substr(i,1)+pmoney;
		}
	return pmoney;
	}

/*-----------------------------------------------------------------------
  ±â´É   : ÀÔ·Â¹ÞÀº °ªÁß ¼ýÀÚ¸¸À» ÃëÇÑ´Ù.
  INPUT  : ÀÔ·Â¹ÞÀº text ÇÊµåÀÇ °ª
  RETURN :           
  AUTHOR : Woojin Jung
  ÂüÁ¶   : isNaN() : ÀÔ·ÂÆÄ¶ó¹ÌÅÍÀÇ °ªÀÌ ¼ýÀÚ¸é false,¼ýÀÚ°¡ ¾Æ´Ï¸é true¸¦ ¹ÝÈ¯
-----------------------------------------------------------------------*/
	
function jsClearString(s)
{
	var pstr, sstr, iz;
	sstr=s;
	pstr="";
	for(iz=0;iz<sstr.length;iz++)
		{
		if(!isNaN(sstr.substr(iz,1))) pstr=pstr+sstr.substr(iz,1);
		}
	return pstr;
}
	

/************PopUp Window¸¦ ¶ç¿î´Ù.***********/
function jsPopUp(vPpgm_id){
	var vUcall_url = vPpgm_id;
	        
	var nUwin = window.open(vUcall_url,
              'newWindow',
              'toolbar=no,location=0,directories=no,status=no,menubar=no,scrollbars=yes,resizable=0,width=700,height=500');
            nUwin.focus();
}

/*--------------------------------------------------
  ±â´É   : ¹ÙÀÌÆ®±æÀÌ check RETURN T/F
  INPUT  : toCheck  -> check data 
  RETURN : true  -> number
           false -> not number
  AUTHOR : S.U.Lim
----------------------------------------------------*/
function jsLengthb(checkStr) {		
	var nUlength=checkStr.length;
 	var vUenglish='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 !@#$%^&*(),./<>?;\':"=-_+';
 	var rtn_val = 0;
 		
 	var MSIEIndex = navigator.userAgent.indexOf("MSIE");
	if (navigator.userAgent.indexOf("MSIE") == -1 ||
		navigator.userAgent.indexOf("Windows") == -1 || 
		navigator.userAgent.substring((MSIEIndex + 5),(MSIEIndex + 6)) < 4) 
	{				
		return  nUlength;
	}	
 		 		
 	for(var i=0 ; i < nUlength ; i++){
   		if( vUenglish.indexOf(checkStr.substring(i,i+1)) < 0){
    		rtn_val++;
    		rtn_val++;
    	} else {
    		rtn_val++;
    	}
    }
   	return rtn_val;
}

/*------------------------------------------------------------
  ±â´É   : ÁÖ¹Îµî·Ï¹øÈ£ Á¤È®ÇÏ°Ô Ã¼Å©(2000³â ÀÌÈÄ Ãâ»ýÀÚµµ Ã¼Å©)
  INPUT  : toCheck  -> check data 
  RETURN : true  -> number
           false -> not number
  AUTHOR : W,J,Jung
----------------------------------------------------*/

function makeArray(n)
{
        this.length = n;
        for(var i=1; i<=n; i++)
        this[i] = 0;
        return this;
}

function CheckValidIDDate(id, str)
{
        var TodayYear, TodayMon, TodayDay;
        var idYear, idMon, idDay, cfDate;

        idDay = new makeArray(13);


        idDay = new makeArray(13);
        Today = new makeArray(13);

        for(var i = 0; i < 13; i++){
                idDay[i] = parseInt(id.charAt(i), 10);
        }
        for(i = 0; i < 8; i++){
                Today[i] = parseInt(str.charAt(i), 10);
        }

	if (idDay[6] == 1 || idDay[6] == 2)	
                idYear = (idDay[0]*10 + idDay[1]) + 1900;
	if (idDay[6] == 3 || idDay[6] == 4)	
                idYear = (idDay[0]*10 + idDay[1]) + 2000;

        TodayYear = Today[0]*1000 + Today[1]*100 + Today[2]*10 + Today[3];

        idMon = idDay[2]*10 + idDay[3];
        idDay = idDay[4]*10 + idDay[5];

        TodayMon = Today[4]*10 + Today[5];
        TodayDay = Today[6]*10 + Today[7];

        if (idYear > TodayYear){
                return false;
        } else if (idYear < TodayYear){
                return true;
	} else {                // ¿¬µµ°¡ °°Àº°æ¿ì
                if (idMon > TodayMon){
                        return false;
                } else if (idMon < TodayMon){
                        return true;
                } else {                // ¿ùÀÌ °°Àº °æ¿ì
                        if (idDay > TodayDay){
                                return false;
                        } else
                                return true;
                }
        }
}

function jsCheck_Jumin(str) //¸ÂÀ¸¸é true,Æ²¸®¸é false¸¦ return
{
        num = new makeArray(13);
        digit = new makeArray(12);

        digit[1] = 2
        digit[2] = 3
        digit[3] = 4
        digit[4] = 5
        digit[5] = 6
        digit[6] = 7
        digit[7] = 8
        digit[8] = 9
        digit[9] = 2
        digit[10] = 3
        digit[11] = 4
        digit[12] = 5

        //»ç¶÷ÀÌ ÀÔ·ÂÇÑ ÁÖ¹Îµî·Ï ¹øÈ£¸¦ ¹è¿­¿¡ ³Ö´Â´Ù
        for(var j=1; j<=13; j++)
        {
                num[j] = parseInt(str.charAt(j-1),10)
        }

        if (CheckValidIDDate(str, '19991001') == false)
                return false;

        // Y2K source start : 2000³âÀÌÀü Ãâ»ýÀÚÀÇ ÁÖ¹Îµî·Ï ¹øÈ£ ÀÔ·ÂÀ» À§ÇÑ ºÎºÐ
        if (num[7] != 3 &&  num[7] != 4) {

        // Y2K source start : 2000³âÀÌÀü Ãâ»ýÀÚÀÇ ÁÖ¹Îµî·Ï ¹øÈ£ ÀÔ·ÂÀ» À§ÇÑ ºÎºÐ
        if (num[7] != 3 &&  num[7] != 4) {
                sum = 0;
                //check_digit¿Í ¹øÈ£¸¦ ¿¬»êÇÑ´Ù
                for(i=1; i<=12; i++)
                {
                        sum += digit[i] * num[i];
                }
                div = (sum%11);
                if(div == 1){
                        comp = 0;
                }
                else if(div == 0){
                        comp = 1;
                }
                else if((div != 0)&&(div != 1)){
                        comp = 11 - div;
                }

                if(div == 0)
                {
                        if(num[13] == 1)
                                return true;
                        else
                        {
                                return false;
                        }
                }
                else if(div == 1)
                {
                        if(num[13] == 0)
                                return true;
                        else
                        {
                                return false;
                        }
                }
                else if((11-div) == num[13])
                {
                        return true;
                }

                else
                {
                        {
                        return false;
                        }
                }
        }
        else {
        // 2000³â ÀÌÈÄ Ãâ»ýÀÚÀÇ ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å© ·çÆ¾
                if (num[3] != 0 && num[3] != 1) {
                        return false;
                }
                else if (num[5] != 0 && num[5] != 1 && num[5] != 2 && num[5] != 3) {
                        return false;
                }
                else if (num[7] != 1 && num[7] != 2 && num[7] != 3 && num[7] != 4) {
                        return false;
                }
                else if (num[3] == 0 && num[4] == 0) {
                        return false;
                }
                else if ((num[3] == 1) && (num[4] != 0 && num[4] != 1 && num[4] != 2)) {
                        return false;
                }
                else if (num[5] == 0 && num[6] == 0) {
                        return false;
                }
                else if (num[5] == 3 && (num[6] != 0 && num[6]  != 1)) {
                        return false;
                }
                else {
                        return true;
                }
        }
        // Y2K Source end
}
}


/*--------------------------------------------------
  ±â´É   : ´Ü¾î°Ë»ö¹× Replace
  INPUT  : toOldword  -> newWord 
  RETURN : 
  AUTHOR : W,J,Jung
----------------------------------------------------*/

function replace(target,oldTerm,newTerm,caseSens,wordOnly) {
      
	  var work = target;
	  var ind  = 0;
	  var next = 0;
	   
	  if ( !caseSens ) {
	    oldTerm = oldTerm.toLowerCase();
		work = target.toLowerCase();
	  }
	  
	  while((ind = work.indexOf(oldTerm,next)) >= 0) {
	    if (wordOnly) {
		 var before = ind - 1;
		 var after  = ind + oldTerm.length;
//		 if(!(space(work.charAt(before)) && space(work.charAt(after)))) {
		 if(space(work.charAt(after))) {
		   next = ind + oldTerm.length;
		   continue;
		 }
		}
		 target = target.substring(1,ind) + newTerm + target.substring(ind+oldTerm.length,target.length);
		 work = work.substring(0,ind)+newTerm+work.substring(ind+oldTerm.length,work.length);
		 next = ind + newTerm.length;
		 if(next >= work.length) {break; }
	  }
		 return work;
}

/*--------------------------------------------------
  ±â´É   : ¿öµåºê·¹ÀÌÅ©¸é ºÎ¿ï¸°°ª ¹ÝÈ¯ 
  INPUT  :  
  RETURN : 
  AUTHOR : W,J,Jung
----------------------------------------------------*/
 	   	 
function space(check) {

   var space = ".,/<>?!'`;:@#$%%^&*()=-|[]{}"+'"'+"\\\n\t";
   for(var i =0; i <space.length; i++)
     if(check == space.charAt(i)) {return true;}
   if(check == "") {return true;}
   if(check == null) {return true;}
   return false;

}   

function jsSearchType(selfPage){
	 var data_form = this.document.forms[0];
	 
		data_form.action = selfPage;
		data_form.submit();
}
function jsSearchRel(){
	 var data_form = this.document.forms[0];
		data_form.action = "/real_estate/real_e1.php";
		data_form.submit();
}
function jsSearchStore(){
	 var data_form = this.document.forms[0];
		data_form.action = "/real_estate/real_e7.php";
		data_form.submit();
}
