function del(href) {
  if(confirm("Á¤¸» »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) {
    document.location.href = href;
  }
}

//// calendar.js  2007/10/23 ...cheori27 modified. (source from 2002/11/22)
////###################################################################
////È­¸éÃâ·Â(Layer ºÎºÐ)

document.writeln("<DIV class=calculateinfo id=Calendar style=\"position:absolute; top:-500; width:183px; height:173px; z-index:1; background-color: #999999; layer-background-color: #999999; border: 1px none #000000; VISIBILITY: hidden\"><!  reader=\"title:´Þ·Â\">");
document.writeln("  <img src=\"/images/bg_1x1.gif\" width=1 height=1><br>");
document.writeln("  <table border=0 cellpadding=0 cellspacing=0 bgcolor=DEDEDE align=center style='font-size:8pt;' width=181 height=30><tr><td align=center><table style=table-layout:fixed>");
document.writeln("    <tr>"); 
document.writeln("      <td width=50><b><font color=\"0D004C\"><div id=yearDIV style=\"FONT-SIZE: 9pt\">³â</div></font> </td>");
document.writeln("      <td width=30><font onclick=\"javascript:CalculateNextDate('year')\" style=cursor:hand;font-size:7pt>¡â</font><br><font onclick=\"javascript:CalculatePrevDate('year')\" style=cursor:hand;font-size:7pt>¡ä</font><!--img name=\"Image152\" border=\"0\" src=\"/images/cal_up1.gif\" width=\"16\" height=\"9\"></a--><!--img name=\"Image162\" border=\"0\" src=\"/images/cal_down1.gif\" width=\"16\" height=\"9\"></a--></td>");
document.writeln("      <td width=30><b><font color=\"0D004C\"><div id=monthDIV style=\"FONT-SIZE: 9pt\">¿ù</div></font> </td>");
document.writeln("      <td width=30><font onclick=\"javascript:CalculateNextDate()\" style=cursor:hand;font-size:7pt>¡â</font><br><font onclick=\"javascript:CalculatePrevDate()\" style=cursor:hand;font-size:7pt>¡ä</font><!--img name=\"Image1511\" border=\"0\" src=\"/images/cal_up1.gif\" width=\"16\" height=\"9\"></a--><!--img name=\"Image1611\" border=\"0\" src=\"/images/cal_down1.gif\" width=\"16\" height=\"9\"></a--></td>");
document.writeln("    </tr>");
document.writeln("  </table></tr></tr></table>");
document.writeln("  <div align=\"center\" style=font-size:9pt>³¯Â¥¸¦ ¼±ÅÃÇÏ¼¼¿ä<!--img src=\"/images/cal_1.gif\" width=181 height=22--></div>");

document.writeln("  <table border=0 cellpadding=0 cellspacing=1 height=150 width=183>");
document.writeln("  <DIV id=carendarForm>");

for(var i = 1; i <= 6*7; i++) {
 if(1 == i%7) {
  document.writeln("<tr bgcolor=#dedede>");
  document.writeln("<TD id=C" + i + " style=\"COLOR: red\" align=middle onclick=SetCalculate(this.innerValue) onmouseover=\"this.style.background = '#9DBAC8'\"  onmouseout=\"this.style.background = '#dedede'\" style=font-size:8pt></TD>");
 } else if (0 == i%7) {
  document.writeln("<TD id=C" + i + " style=\"COLOR: blue\" align=middle onclick=SetCalculate(this.innerValue) onmouseover=\"this.style.background = '#9DBAC8'\"  onmouseout=\"this.style.background = '#dedede'\" style=font-size:8pt></TD>");
  document.writeln("</TR>");
 } else {
  document.writeln("<TD id=C" + i + " align=middle onclick=SetCalculate(this.innerValue) onmouseover=\"this.style.background = '#9DBAC8'\"  onmouseout=\"this.style.background = '#dedede'\" style=font-size:8pt></TD>");
 }
}

document.writeln("</DIV>");
document.writeln("<TR align=middle bgcolor=#dedede>");
document.writeln("<TD colSpan=7 style=\"FONT-WEIGHT: bold; FONT-SIZE: 9pt; COLOR: blue; BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none\"><font onclick=\"hideLayer(Calendar)\">´Ý±â</font>");
document.writeln("</TD></TR></TABLE>");
document.writeln("</DIV>");

////È­¸éÃâ·ÂºÎºÐ ³¡
////###################################################################
////###################################################################
////º¯¼ö ÃÊ±âÈ­
n4 = (document.layers) ? 1 : 0;
e4 = (document.all)    ? 1 : 0;
theyear  = 0;
themonth = 0;
tmpA_B = '';
tmpIndex = 9999;
token  = '-';
xPosition = 0;
yPosition = 0;

var lastdays = new Array(12);
lastdays[1]  = 31;
lastdays[2]  = 0;
lastdays[3]  = 31;
lastdays[4]  = 30;
lastdays[5]  = 31;
lastdays[6]  = 30;
lastdays[7]  = 31;
lastdays[8]  = 31;
lastdays[9]  = 30;
lastdays[10] = 31;
lastdays[11] = 30;
lastdays[12] = 31;

////º¯¼ö ÃÊ±âÈ­ ³¡
////###################################################################
////###################################################################
////ÇÔ¼ö ½ÃÀÛ

function getTodayCheck() {
 var day    = new Date();
 var year   = day.getYear() * 10000;
 var month  = (day.getMonth() + 1) * 100;
 var today  = day.getDate();
 var result = year + month + today;

 return (result);
}

////*******************************************************
function hideLayer(X) {
 if(n4) { 
  document.layers[X].visibility = 'hidden';
 } else if(e4) {
  X = tmpCurrentDocID;
  document.all[X].style.visibility = 'hidden';
 }
}

////*******************************************************
function showLayer_token(X, e, A_B, t) {
  token = t;  // ³â¿ùÀÏ ±¸ºÐÀÚ

  showLayer(X, e, A_B);
} //showLayer_token

////*******************************************************
//// index°ªÀ¸·Î form ¾ÈÀÇ ´Þ·ÂÀ» ¹è¿­·Î »ý¼ºÇÏ°Ô ÇÑ´Ù.
function showLayer_array(X, e, A_B, index) {
 tmpIndex = index;
 
 showLayer(X, e, A_B);
} //showLayer_array

////*******************************************************
//// x, y ÁÂÇ¥°ªÀ¸·Î ´Þ·ÂÃ¢ÀÇ À§Ä¡¸¦ ¼³Á¤ÇÑ´Ù.
function showLayer_pos(X, e, A_B, x, y) {
 xPosition = x;
 yPosition = y;
 
 showLayer(X, e, A_B);
} //showLayer

////*******************************************************
function showLayer(X, e, A_B) {
 var OBJ;
  
 if(n4) { 
  OBJ = document.layers[X];
  OBJ.left = e.pageX - parseInt(OBJ.document.width/2) + xPosition;
  OBJ.top  = e.pageY + yPosition;
  OBJ.visibility = 'visible';
 } else if(e4) {
  OBJ = document.all[X];
  OBJ.style.pixelTop  = parseInt(event.clientY*(18/17)) + document.body.scrollTop + parseInt(yPosition);
  OBJ.style.pixelLeft = event.clientX + document.body.scrollLeft - parseInt(OBJ.offsetWidth/2) + 80 + parseInt(xPosition); // 100¿¡¼­ 80À¸·Î...
  OBJ.style.visibility = 'visible';
  tmpCurrentDocID = X;
  tmppixelTop = event.clientY + document.body.scrollTop + 140;
  
  if(tmppixelTop > document.body.clientHeight + document.body.scrollTop) {
   OBJ.style.pixelTop = e.clientY + document.body.scrollTop - 180;
  }
 } 
 tmpA_B = A_B;
 make_cal();
} //showLayer

////*******************************************************
function showCalendar(year, month) {
 var total_days;
 var lasttotal_days;
 var orgyear  = year;
 var orgmonth = month;
  
// if( tmpA_B == "birthDay")
// {
//  token = "-";
// }
  
    // °¢ ´ÞÀÇ ÃÑ ³¯¼ö¸¦ ±¸ÇÑ´Ù. 
 total_days = lastdays[month];
 if (total_days == 0) {
  // À±³â Á¶»ç
  if(((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
   total_days = 29;
  else
   total_days = 28;
 }
 
 // ÁöÁ¤µÈ ´ÞÀÇ 1ÀÏÀÌ ¹«½¼ ¿äÀÏÀÎÁö Á¶»çÇØ º¸ÀÚ. 
 // ÀÚ¹Ù½ºÅ©¸³Æ® Date °´Ã¼ÀÇ ¿ùÀº 0ºÎÅÍ ½ÃÀÛÇÏ±â ¶§¹®¿¡ 1À» »«´Ù.
 var first_date = new Date(year, month - 1, 1);
 var first_day  = first_date.getDay();
          
    // 1ÀÏÀÌ ½ÃÀÛÇÒ ¶§±îÁö ºó°ø°£ Ã¤¿ì±â
    for(ii = 0; ii < first_day; ii++) {
        CalName = document.all['C' + (ii + 1)];
      CalName.innerText  = '';
         CalName.innerValue = year + token + month + token + '01';               
    } //for
    
    month = orgmonth;
    year  = orgyear;
 // 1ÀÏºÎÅÍ ±×´Þ ¸»ÀÏ±îÁö 
 if(month < 10) month = '0' + month;
    else month = month;
    
 for(ii = 1; ii <= total_days; ii++) { //i=1
  // °¢ ³¯Â¥¸¶´Ù ¹öÆ°¿¡ °ªÀ» ³Ö¾îÁØ´Ù. 
  CalName = document.all['C' + (ii + first_day)];
  CalName.innerText = ii;
  if( ii < 10 ) 
   CalName.innerValue = year + token + month + token + '0' + ii;
  else
   CalName.innerValue = year + token + month + token + ii;
 }
        
 month = orgmonth;   
 year  = orgyear;
 //¸»ÀÏºÎÅÍ ³¡±îÁö Clear
 for(ii = first_day + total_days + 1; ii <= 42; ii++) {
  CalName = document.all['C' + ii];
  CalName.innerText = '';  
         
  if(month < 10)
   CalName.innerValue= year + token + '0' + month + token + total_days;            
  else
   CalName.innerValue= year + token + month + token + total_days;
 } //for
}

////*******************************************************
function make_cal() {
 // ³â°ú ¿ùÀ» ±¸ÇØ Á¤¼öÇüÀ¸·Î ¹Ù²Û´Ù.
 preValue = document.all[tmpA_B].value;
 
 var oneDate = new Date();
 theyear  = (oneDate.getYear() > 100 ? oneDate.getYear() : oneDate.getYear() + 1900);
 themonth = oneDate.getMonth() + 1;
 if (themonth == 13) {
  themonth = 1;
 }
 theday = oneDate.getDay();

// if( tmpA_B == "birthDay" && document.form.juminNo1.value != "")
// {
//  var nyear;
//  var sex = document.form.juminNo2.value.substring(0,1);
//  if( sex == "3" || sex == "4" ) nyear = "20";
//  else       nyear = "19";
  
//  theyear  = nyear + document.form.juminNo1.value.substring(0,2);
//  themonth = document.form.juminNo1.value.substring(2,4);
 
// } 
 yearDIV.innerHTML  = theyear  + "³â";
 monthDIV.innerHTML = themonth + "¿ù";
 showCalendar(theyear, themonth);
}

////*******************************************************
function CalculatePrevDate(type) {
 if (type == "year") {
  theyear = parseInt(theyear) - 1; 
 } else {
  if (themonth == 1) {
   theyear  = parseInt(theyear)-1;
   themonth = 12;
  } else {
   themonth = parseInt(themonth) - 1;
  }
 }
 yearDIV.innerHTML  = theyear + "³â";
 monthDIV.innerHTML = themonth +"¿ù";
 showCalendar(theyear, themonth);
}

////*******************************************************
function CalculateNextDate(type) {
 if(type == "year") {
  theyear = parseInt(theyear) + 1; 
 } else {
  if(themonth == 12) {
   theyear  = parseInt(theyear) + 1;
   themonth = 1;
  } else {
   themonth = parseInt(themonth) + 1;
  }
 }
 yearDIV.innerHTML  = theyear + "³â";
 monthDIV.innerHTML = themonth +"¿ù";
 showCalendar(theyear, themonth)
}

////*******************************************************
function SetCalculate(tmpDate) {
 if(tmpIndex == 9999) {
  document.all[tmpA_B].value = tmpDate;
 } else {
  document.all[tmpA_B][tmpIndex].value = tmpDate;
 }

 hideLayer('Calendar');
}

////ÇÔ¼ö ³¡
////###################################################################
////end of 'calendar.js'