//·Î±×ÀÎ ¾ÆÀÌµð ±â¾ï Ã¼Å© ÄíÅ°¼³Á¤
function setCookie (name, value, expires) {
   document.cookie = name + "=" + escape (value) +
  "; path=/; expires=" + expires.toGMTString();
 }

 function getCookie(Name)
 {
  var search = Name + "=";
  if (document.cookie.length > 0)
  { // ÄíÅ°°¡ ¼³Á¤µÇ¾î ÀÖ´Ù¸é
   offset = document.cookie.indexOf(search);
   if (offset != -1)
   { // ÄíÅ°°¡ Á¸ÀçÇÏ¸é
    offset += search.length;
    // set index of beginning of value
    end = document.cookie.indexOf(";", offset);
    // ÄíÅ° °ªÀÇ ¸¶Áö¸· À§Ä¡ ÀÎµ¦½º ¹øÈ£ ¼³Á¤
   if (end == -1)
    end = document.cookie.length;
    return unescape(document.cookie.substring(offset, end));
   }
  }
  return "";
 }

 function saveid(form) {
   var expdate = new Date();
   // ±âº»ÀûÀ¸·Î 30ÀÏµ¿¾È ±â¾ïÇÏ°Ô ÇÔ. ÀÏ¼ö¸¦ Á¶ÀýÇÏ·Á¸é * 30¿¡¼­ ¼ýÀÚ¸¦ Á¶ÀýÇÏ¸é µÊ
   if (form.checksaveid.checked)
  expdate.setTime(expdate.getTime() + 1000 * 3600 * 24 * 30); // 30ÀÏ
   else
  expdate.setTime(expdate.getTime() - 1); // ÄíÅ° »èÁ¦Á¶°Ç
   setCookie("saveid", form.Mem_ID.value, expdate);
 }
 function getid(form) {
   form.Mem_ID.value = getCookie("saveid");
 }

 window.onload = function()
 {
  getid(document.loginForm1);
  getid(document.loginForm2);
 }
