// fn01)°ø¹é Ã¼Å©

function Jaysoo_Empty_Check_Boo(Source_Str) { 
   var Count_Int
   for (Count_Int = 0; Count_Int < Source_Str.length; Count_Int++)
   {
      if ( Source_Str.substring(Count_Int, Count_Int+1) != ' ' )
      {
          return false;
      }
   }
   return true;
}



// fn02) ¼ýÀÚÅ°¸¸ ÀÔ·Â

function Jaysoo_CheckNum()
	{
		if ( (event.keyCode < 48) || (event.keyCode>57 ) && (event.keyCode != 13 ) )
           {
     	   	event.returnValue = false;
           }
	}



// fn03) ¿£ÅÍÅ°½Ã ´ÙÀ½ÇÊµå·Î ÀÌµ¿
function Jaysoo_f_move_focus(Obj) { 
  if(event.keyCode == 13) {
      eval("self.document.INPUT_FORM." + Obj+ ".focus();");
  }
}



// fn04) ¸®½ºÆ® ¹Ú½º,¶óµð¿À¹Ú½º,Ã¼Å©¹Ú½º ¿ÂÅ¬¸¯, ¿ÂÃ¼ÀÎÁö½Ã ÀÌµ¿
function Jaysoo_f_select_move_focus(Obj)
  {
       eval("self.document.INPUT_FORM." + Obj+ ".focus();");
  }


// fn05) ÀÔ·Â°ª ÀÚ¸´¼ö Ã¼Å©ÈÄ¿¡ ÀÚµ¿Æ÷Ä¿½ºÀÌµ¿

function Jaysoo_auto_move(Obj,Len_Int,Obj1)

{
  
  var Obj_Str   = eval("self.document.INPUT_FORM." + Obj+ ".value;");
  var str       = Obj_Str.length;
  
  if(str == Len_Int)
    
    eval("self.document.INPUT_FORM." + Obj1 + ".focus();");
}




// fn06) ÁÖ¹Îµî·Ï¹øÈ£ ÀÔ·ÂÈÄ ÀÚµ¿À¸·Î »ýÀÏ°ª ÀÔ·Â 
function Jaysoo_birth_auto_input()
    {
          
      var birth_month, birth_day, sex
      var jumin1     = self.document.INPUT_FORM.JUMIN1.value
      var jumin2     = self.document.INPUT_FORM.JUMIN2.value
      var jumin      = jumin1 + jumin2

          if (jumin2.substring(0,1) < 3 )
          {
          self.document.INPUT_FORM.BIRTH_YEAR.value="19" + jumin.substring(0,2)   
          }
          else if (jumin2.substring(0,1) > 3 )   
          {
          self.document.INPUT_FORM.BIRTH_YEAR.value="20" + jumin.substring(0,2)   
          }
          
          birth_month = (jumin.substring(2,4) * 1) 
                self.document.INPUT_FORM.BIRTH_MONTH.options[birth_month].selected = true
            
          birth_day   = (jumin.substring(4,6) * 1) 
               self.document.INPUT_FORM.BIRTH_DAY.options[birth_day].selected = true
      
          self.document.INPUT_FORM.BIRTH_CAL[0].focus()
    
    }
    

// fn07) À©µµ¿ìÃ¢ Áß¾Ó¿¡ ¶Ù¿ì±â

function Jaysoo_openWin(sURL, sWindowName, w, h, sScroll)
{
	// È­¸é Áß¾ÓÀ¸·Î Popup ¶ç¿ì±â.. ½ºÅ©·Ñ¹Ù´Â ¿É¼Ç..
	// ex)
	//			openWin("test.asp", "winTest", 400, 300);			¢Ñ ½ºÅ©·Ñ¹Ù ¾øÀ½
	//			openWin("test.asp", "winTest", 400, 300, "yes");	¢Ñ ½ºÅ©·Ñ¹Ù ÀÖÀ½
	//			openWin("test.asp", "winTest", 400, 300, "auto");	¢Ñ ½ºÅ©·Ñ¹Ù ÀÚµ¿

	var x = (screen.width - w) / 2;
	var y = (screen.height - h) / 2;

	if (sScroll==null) sScroll = "no";

	var sOption = "";
	sOption = sOption + "toolbar=no, channelmode=no, location=no, directories=no, resizable=no, menubar=no";
	sOption = sOption + ", scrollbars=" + sScroll + ", left=" + x + ", top=" + y + ", width=" + w + ", height=" + h;

	window.open(sURL, sWindowName, sOption);
}

// fn07) À©µµ¿ìÃ¢ Æ¯Á¤À§Ä¡¿¡ ¶ç¿ì±â

function Jaysoo_openWinFreePos(sURL, sWindowName, w, h, x, y, sScroll)
{
	// È­¸é Æ¯Á¤À§Ä¡·Î Popup ¶ç¿ì±â.. ½ºÅ©·Ñ¹Ù´Â ¿É¼Ç..
	// ex)
	//			openWin("test.asp", "winTest", 400, 300, 0, 0);			¢Ñ ½ºÅ©·Ñ¹Ù ¾øÀ½
	//			openWin("test.asp", "winTest", 400, 300, 0, 0 "yes");	¢Ñ ½ºÅ©·Ñ¹Ù ÀÖÀ½
	//			openWin("test.asp", "winTest", 400, 300, 0, 0 "auto");	¢Ñ ½ºÅ©·Ñ¹Ù ÀÚµ¿

	if (sScroll==null) sScroll = "no";

	var sOption = "";
	sOption = sOption + "toolbar=no, channelmode=no, location=no, directories=no, resizable=no, menubar=no";
	sOption = sOption + ", scrollbars=" + sScroll + ", left=" + x + ", top=" + y + ", width=" + w + ", height=" + h;

	window.open(sURL, sWindowName, sOption);
}





function doNothing(){}


function displayImage(picName, windowName, windowWidth, windowHeight)
{

    var x = (screen.width - windowWidth) / 2;
	var y = (screen.height - windowHeight) / 2;

	var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no, left=" + x + ", top=" + y + ", width=" + windowWidth + ",height=" + windowHeight)
	if(winHandle != null)
	{
		var htmlString = "<html><head><title> ::: KD & T :::</title></head>" 
		htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"
		htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=´Ý±â></a>"
		htmlString += "</body></html>"
		winHandle.document.open()
		winHandle.document.write(htmlString)
		winHandle.document.close()
	} 
	if(winHandle != null) winHandle.focus()
	return winHandle
}



function Auto_Image_View(img)
 { 

	Image_Obj     = new Image();  // ÀÌ¹ÌÁö °´Ã¼ »ý¼º
	Image_Obj.src = (img) ;       // ÀÌ¹ÌÁö °æ·Î È®ÀÎ 
	//Image_Controlla(img);         // 


  if((Image_Obj.width!=0) && (Image_Obj.height!=0))
    { 
    var Image_Width  =  Image_Obj.width  ;   // ÀÌ¹ÌÁö Æø
    var Image_Height =  Image_Obj.height ;  // ÀÌ¹ÌÁö ³ôÀÌ

    Image_view(img,Image_Width,Image_Height);
    
    } 
  
  else
  
   { 
    funzione="Auto_Image_View('"+img+"')"; 
    intervallo=setTimeout(funzione,20); 
   } 

 } 


function Image_view(img,Image_Width,Image_Height)
 { 
    var Location_X       = (screen.width - Image_Width)   / 2;   // ÀÌ¹ÌÁöÀÇ Å©±â¿¡ µû¸¥ ½ºÅ©¸° Áß¾Ó¿¡ À©µµ¿ì Ç¥½Ã¸¦ À§ÇÑ X ÁÂÇ¥
	var Location_Y       = (screen.height - Image_Height) / 2;   // ÀÌ¹ÌÁöÀÇ Å©±â¿¡ µû¸¥ ½ºÅ©¸° Áß¾Ó¿¡ À©µµ¿ì Ç¥½Ã¸¦ À§ÇÑ Y ÁÂÇ¥

    var Image_View_Open  = window.open("" ,"Image_Win","toolbar=no,scrollbars=no,resizable=no, left=" + Location_X + ", top=" + Location_Y + ", width=" + Image_Width + ",height=" + Image_Height);

	var Html_Str = "<html><head><title> ::: 365ÀÏ °Ç°­ Ä£±¸ ¸¶ÀÌ»ê ÀÎÁø¾¦ :::</title></head>" 
		Html_Str += "<body leftmargin = 0 topmargin = 0  marginwidth= 0 marginheight= 0 >"
		Html_Str += "<a href=javascript:window.close()><img src=" + img + " border=0 alt=´Ý±â></a>"
		Html_Str += "</body></html>"
	
		Image_View_Open.document.open();
		Image_View_Open.document.write(Html_Str);
		Image_View_Open.document.close();
     	Image_View_Open.focus();
 }









// fn08) Æû°ªÃÊ±âÈ­

function Jaysoo_reset_void()
{
	
 self.document.INPUT_FORM.reset();
 self.document.INPUT_FORM.ID.focus();
 
 
}



function Jaysoo_Value_Check(Obj,Lowval,Hival,Form)
 {
 if( Obj.Value < Lowval || Obj > Hival)
   {
   alert("Àß¸øµÈ ÀÔ·Â ÀÔ´Ï´Ù.");
   eval("self.document.INPUT_FORM." + Form+ ".focus();");
   }
 }

function Jaysoo_Log_Flag()
 {
   alert("È¸¿øÀü¿ëÀÔ´Ï´Ù. ·Î±×ÀÎÇÏ½Ê½Ã¿ä.");
 }





