//¿ùÀÇ ³¡ ÀÏÀÚ ¾ò±â
    function getEndDate(datestr){
          
     //±æÀÌ°¡ 8ÀÚ¸®?
     if(datestr.length != 6){
       return null;
     }
     
     var yy = Number(datestr.substring(0,4));
     var mm = Number(datestr.substring(4,6));
     
     //À±³â °ËÁõ
     var boundDay = "";
   
     if(mm != 2){
        var mon=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
        boundDay = mon[mm-1];
     } else {
       if (yy%4 == 0 && yy%100 != 0 || yy%400 == 0){
           boundDay = 29;
       }else {
           boundDay = 28;
       }
     }
     
     return boundDay;  
    }
 
    function makeDatePicker(targetId) {
	    $( "#" + targetId).datepicker({
			showOn: "button",
			buttonImage: "/common/images/ico/ico_calendar.gif",
			buttonImageOnly: true,
			showMonthAfterYear:true, 
			changeMonth: true,
			changeYear: true
		});
    }
    
    function makeDatePicker(targetId, minDate, maxDate) {
	    $( "#" + targetId).datepicker({
			showOn: "button",
			buttonImage: "/common/images/ico/ico_calendar.gif",
			buttonImageOnly: true,
			showMonthAfterYear:true, 
			changeMonth: true,
			changeYear: true,
			minDate:minDate,
			maxDate:maxDate
		});
    }
    
    
    function reMakeDatePicker(targetId, minDate, maxDate) {
    	$( "#" + targetId).removeClass('hasDatepicker').datepicker({			
			buttonImage: "/common/images/ico/ico_calendar.gif",
			buttonImageOnly: true,
			showMonthAfterYear:true, 
			changeMonth: true,
			changeYear: true,
			minDate:minDate,
			maxDate:maxDate
		});
    }
