/*
###############################################################################################
# ÆÄÀÏ °æ·Î : /includes/custom.js
# ¼³¸í : 
# DB Á¤º¸ :
# ÀÛ¼ºÀÚ : 2006-09-08 VarDim ÀüÁø±â
# ¼öÁ¤ÀÚ : 
# Âü°í»çÇ× :
###############################################################################################
*/

// µðÀÚÀÎ ¿ë
  function na_restore_img_src(name, nsdoc)
  {
    var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
    if (name == '')
    return;
    if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
    } 
  }

  function na_preload_img()
  { 
    var img_list = na_preload_img.arguments;
    if (document.preloadlist == null) 
    document.preloadlist = new Array();
    var top = document.preloadlist.length;
    for (var i=0; i < img_list.length; i++) {
    document.preloadlist[top+i]     = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
    } 
  }

  function na_change_img_src(name, nsdoc, rpath, preload)
  { 
    var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
    if (name == '')
    return;
    if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
    } 
  }

// ¹Ì´Ï È¨ÇÇ ¹Ù·Î°¡±â
  function fnJumpPg(intIdx)
  {
    if (intIdx != '')
    {
      window.location = '/professor/professorHome.php?id=' + intIdx;
    }
  }

  function fnJumpNewWinPg(intIdx)
  {
    if (intIdx != '')
    {
      window.open('/professor/professorHome.php?id=' + intIdx, '', '');
    }
  }

  function fnJumpToPrivateHomeSite(strHomeSite)
  {
    window.open(strHomeSite, '', '');
  }

// ±ÇÇÑ °æ°í
  function fnNoAuth()
  {
    alert ('±ÇÇÑÀÌ ¾ø½À´Ï´Ù');
    return;
  }

// ¾ÆÀÌµð Áßº¹°Ë»ç
  function fnChkEmail(objFrm, objEmail)
  {
    var check_email = email_check(objEmail.value, 1, 'y');

    if (check_email != 'true')
    {
      alert (check_email);
      objEmail.focus();
      objEmail.select();
      return;
    }

    var id_url = '/member/chkEmail.htm?email=' + objEmail.value;

    var id_win = window.open(id_url, '', 'width=309,height=172');
  }

// ·¹ÀÌ¾î ÆË¾÷ ´Ý±â
  function fnMoveBox(objId)
  {
    objId.style.display = 'none';
  }

// ·Î±×ÀÎ Ã¼Å©
  function fnCheckLogin(objForm)
  {
    if (!objForm.txtEmail.value)
    {
      alert ('ÀÌ¸ÞÀÏÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
      objForm.txtEmail.focus();
      return false;
    }

    if (!objForm.txtPw.value)
    {
      alert ('ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä');
      objForm.txtPw.focus();
      return false;
    }
  }