//==============================================================================
// °øÅëÇÔ¼ö
// Softvalley Co.Inc. (info@softvalley.co.kr)
//==============================================================================

var newWindow; 	            //À©µµ¿ì Àü¿ªº¯¼ö
var popWindow; 	            //À©µµ¿ì Àü¿ªº¯¼ö
var gimgextlist;            //±âº»ÀÌ¹ÌÁöÈ®ÀåÀÚµé
var gSetUserId;
var gSetLectermId;
var gLogin="1";
var gNameMenuShow="0";          //³×ÀÓ¸Þ´º


// ºê¶ó¿ìÁ®È®ÀÎ
var NS6 = (document.getElementById&&!document.all)
var IE = (document.all)
var NS = (navigator.appName=="Netscape" && navigator.appVersion.charAt(0)=="4")

gimgextlist = new Array();
gimgextlist[0]=".gif";
gimgextlist[1]=".jpg";
gimgextlist[2]=".jpeg";
gimgextlist[3]=".bmp";
gimgextlist[4]=".ico";
gimgextmaxnum= 5;

/* È­¸é»çÀÌÆ®Á¶Á¤¹× Áß¾ÓÁ¤·Ä */
function fncSizeAndPos(nWidthSize,nHeightSize)
{
    nWinLeftPos	= Math.round((screen.availWidth/2)-(nWidthSize/2)) ;
    nWinTopPos	= Math.round((screen.availHeight/2)-(nHeightSize/2)) ;

//À©µµ¿ì°íÀüÇüÅÂ
//    nHeightSize=nHeightSize+51;
//    nWidthSize =nWidthSize +12;

//Å×¸¶°¡ÀÖ´Â°æ¿ì
    nHeightSize=nHeightSize+51;
    nWidthSize =nWidthSize +12;

   try {
       top.window.resizeTo(nWidthSize,nHeightSize);
       top.window.moveTo(nWinLeftPos,nWinTopPos);
   } catch(e) {
   }
}
/* È­¸é»çÀÌÆ®Á¶Á¤¹× Áß¾ÓÁ¤·Ä ¾ÈÇÔ 20071128 jung*/
function fncSizeAndPos_move_no(nWidthSize,nHeightSize)
{
    nHeightSize=nHeightSize+51;
    nWidthSize =nWidthSize +12;

   try {
       top.window.resizeTo(nWidthSize,nHeightSize);
   } catch(e) {
   }
}
/* Å¸ÀÌÆ² ¾²±â 20071129 jung*/
function fncTitle1(rtitle2,rtitle1){
var rtitle_chk =rtitle1 ? "" :rtitle1;
	if(rtitle1=="4"){top.window.document.title = "¿ÜºÎ±â°ü¼­ºñ½º-" + rtitle2 ;}
	else if(rtitle1=="B"){top.window.document.title = "±³¿ø»çÀÌÆ®¼­ºñ½º-" + rtitle2 ;}
	else if(rtitle1=="N"){top.window.document.title = "¿ÜºÎ±â°ü¼­ºñ½º-" + rtitle2 ;}
	else if(rtitle1=="st"){top.window.document.title = "ÀÏ¹Ý¼­ºñ½º-½ºÅÍµð±×·ì-" + rtitle2 ;}
	else if(rtitle1=="bl"){top.window.document.title = "ÀÏ¹Ý¼­ºñ½º-ºí·¯±×-" + rtitle2 ;}
	else if(rtitle1=="H"){top.window.document.title = "ÇÐ½ÀÃ¢-" + rtitle2 ;}
	else{
	top.window.document.title = rtitle1 ? rtitle1+"-" + rtitle2 :"ÀÏ¹Ý¼­ºñ½º-" + rtitle2;
	}
}
//function fncTitle1(rtitle2,rtitle1){
//var rtitle_chk =rtitle1 ? "" :rtitle1;
	//if(rtitle_chk=="undefined" || rtitle_chk=="" ){
	//top.window.document.title = rtitle1 ? rtitle1+"-" + rtitle2 :"ÀÏ¹Ý¼­ºñ½º-" + rtitle2;
	//}else{
		//if(rtitle1=="4")top.window.document.title = "¿ÜºÎ±â°ü¼­ºñ½º-" + rtitle2 ;
	//	if(rtitle1=="B")top.window.document.title = "±³¿ø»çÀÌÆ®¼­ºñ½º-" + rtitle2 ;
		//if(rtitle1=="N")top.window.document.title = "¿ÜºÎ±â°ü¼­ºñ½º-" + rtitle2 ;
	//}

//}
function fncTitle2(rtitle2,rtitle1)  {
//if(rtitle1!="undefined"){top.window.document.title = rtitle1+"-" + rtitle2;top.window.document.title = "¹è¿ò³ª¶ó-" + rtitle2;
top.window.document.title = rtitle1 ? rtitle1+"-" + rtitle2 :"½Ã°¢Àå¾ÖÀÎ¼­ºñ½º-" + rtitle2;
}
function fncTitle3(rtitle2,rtitle1)  {
//if(rtitle1!="undefined"){top.window.document.title = rtitle1+"-" + rtitle2;top.window.document.title = "¹è¿ò³ª¶ó-" + rtitle2;
top.window.document.title = rtitle1 ? rtitle1+"-" + rtitle2 :"¿µ¹®¼­ºñ½º-" + rtitle2;
}

//±³¿øÁö¿ø
function fncSizeAndPos_new(nWidthSize,nHeightSize)
{
//    nWinLeftPos	= 0 ;
    nWinTopPos	= 0 ;
    nWinLeftPos	= Math.round((screen.availWidth/2)-(nWidthSize/2)) ;
//    nWinTopPos	= Math.round((screen.availHeight/2)-(nHeightSize/2)) ;

//À©µµ¿ì°íÀüÇüÅÂ
//    nHeightSize=nHeightSize+51;
//    nWidthSize =nWidthSize +12;

//Å×¸¶°¡ÀÖ´Â°æ¿ì
    nHeightSize=nHeightSize+51;
    nWidthSize =nWidthSize +12;

   try {
       top.window.resizeTo(nWidthSize,nHeightSize);
       top.window.moveTo(nWinLeftPos,nWinTopPos);
   } catch(e) {
   }
}


/* ¼ýÀÚÃ¼Å© */
function fncCheckNumber(){
    var keyCode = event.keyCode;
    var LeftArrowKey = 37;
    var RighArrowKeyt = 39;
    var DelKey1 = 46;
    var DelKey2 = 8;
    var TabKey = 9;
    var ShiftKey = 16;

    /* Æ¯¼öÅ°Çã¿ë*/
    if (keyCode == LeftArrowKey || keyCode == RighArrowKeyt ||
        keyCode == DelKey1 || keyCode == DelKey2 || keyCode == TabKey ||
        keyCode == ShiftKey) {
    } else {
        /* ¼öÄ¡°Ë»ç */
        if ((keyCode >= 48 && keyCode <= 57) || (keyCode >= 96 && keyCode <= 105)) {
            event.returnValue = true;
        } else {
            event.returnValue = false;
            return;
        }
    }
}

/* ÈÞÈ¿¼ºÃ¼Å©±âÁØ */
function isEmptyElement(fmID) {
    var f=document.frm1;
    if (trim(f.elements[fmID].value)=="") {
        return false;
    }
    return true;
}


/* Æ®¸²ÇÔ¼öÀÇ±¸Çö */
function ltrim(str)
{
    var s = new String(str);

    if (s.substr(0,1) == " ") {
        return ltrim(s.substr(1));
    } else {
        return s;
    }
}

function rtrim(str)
{
    var s = new String(str);
    if(s.substr(s.length-1,1) == " ") {
        return rtrim(s.substring(0, s.length-1))
    } else {
        return s;
    }
}

function trim(str)
{
    return ltrim(rtrim(str));
}

/*0Ã¤¿ì±â*/
function getChargeLeftBlank(str,nMaxLength) {

        var nStrLen=0;
        var sEmpty="";

        if (str == null) {
            str = "";
        } else {
        }

        if (nMaxLength <= 0) {
            nMaxLength = 0;
            return str;
        } else {
        }
        for (var i=1; i<= nMaxLength; i++) {
            sEmpty += "0";
        }
        return (sEmpty.substring(0,nMaxLength-str.length) + str);
}

/* ÀÚ·á°¡ Å¬¶§ Ç¥ÇöÇÔ¼ö */
function fncViewLarge(objName) {
    alert("±ÛÀÚ¼ö°¡ ³Ê¹« Å®´Ï´Ù.");
    fncSetFocus(objName);
}

/* ÀÚ·á°¡ ÀÛÀ»¶§ Ç¥ÇöÇÔ¼ö */
function fncViewSmall(objName) {
    alert("±ÛÀÚ¼ö°¡ ³Ê¹« ÀÛ½À´Ï´Ù.");
    fncSetFocus(objName);
}

/* Æ÷Ä¿½º¼±ÅÃÇÔ¼ö */
function fncSetFocus(objName) {
    var f=document.frm1;
    f.elements[objName].focus();
    f.elements[objName].select();
}


/* form¿¡¼­ ¿£ÅÍÅ°¸¦ ´­·¶À» °æ¿ì submitµÇ´Â °ÍÀ» ¸·´Â´Ù.*/
function fncEnterKeyRestick() {
    var key = window.event.keyCode
    if (key==13) {
        event.returnValue = false;
        return;
    }
}

/* »õÀ©µµ¿ì */
function fncNewWindow(lnkURL,targetName,nWidth,nHeight)
{
    var gWinheight= 0;
   // nHeight=nHeight+15;
	var nWinLeftPos	= Math.round((screen.availWidth/2)-(nWidth/2)) ;
    var nWinTopPos	= Math.round((screen.availHeight/2)-(nHeight/2)) ;


    var gDialogsize = "width="+nWidth+",height="+nHeight+",left="
                    + nWinLeftPos+",top="+nWinTopPos
    var winopen = window.open(lnkURL,targetName,"status=yes,toolbar=no,menubar=no,"
        + "location=no,resizable=no,"+gDialogsize,true);

    if (winopen==null) {
        alert("À©µµ¿ìXP¸¦ ÀÌ¿ëÇÏ¿© ¹è¿ò³ª¶ó¿¡ Á¢¼ÓÇÏ½Ã´Â ºÐ²²¼­´Â ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇÏ¿© ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.\r\n\r\nÆË¾÷Â÷´ÜÇØÁ¦¸¦ ÇÑ´Ù¸é Á¤»óÀûÀ¸·Î ÀÌ ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\r\n\r\nÈ­¸éÀ§ÂÊ¿¡ ÀÖ´Â ÆË¾÷Â÷´Ü¾È³»¸¦ ´­·¯ [ÇöÀç»çÀÌÆ®¸¦ Ç×»óÇã¿ë]À¸·Î ¼³Á¤ÇØ ÁÖ¼¼¿ä.");
    } else {
        winopen.focus();
    }
}

/* »õÀ©µµ¿ì */
function fncNewWindow_tmp(lnkURL,targetName,nWidth,nHeight)
{
    var gWinheight= 0;
   // nHeight=nHeight+15;
	var nWinLeftPos	= 10 ;
    var nWinTopPos	= 10 ;


    var gDialogsize = "width="+nWidth+",height="+nHeight+",left="
                    + nWinLeftPos+",top="+nWinTopPos
    var winopen = window.open(lnkURL,targetName,"status=yes,toolbar=no,menubar=no,"
        + "location=no,resizable=no,"+gDialogsize,true);

    if (winopen==null) {
        alert("À©µµ¿ìXP¸¦ ÀÌ¿ëÇÏ¿© ¹è¿ò³ª¶ó¿¡ Á¢¼ÓÇÏ½Ã´Â ºÐ²²¼­´Â ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇÏ¿© ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.\r\n\r\nÆË¾÷Â÷´ÜÇØÁ¦¸¦ ÇÑ´Ù¸é Á¤»óÀûÀ¸·Î ÀÌ ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\r\n\r\nÈ­¸éÀ§ÂÊ¿¡ ÀÖ´Â ÆË¾÷Â÷´Ü¾È³»¸¦ ´­·¯ [ÇöÀç»çÀÌÆ®¸¦ Ç×»óÇã¿ë]À¸·Î ¼³Á¤ÇØ ÁÖ¼¼¿ä.");
    } else {
        winopen.focus();
    }
}

/* »õÀ©µµ¿ì2 */
function fncNewWindow2(lnkURL,targetName,nWidth,nHeight)
{
    var gWinheight= 0;
   // nHeight=nHeight+15;
	var nWinLeftPos	= Math.round((screen.availWidth/2)-(nWidth/2)) ;
    var nWinTopPos	= Math.round((screen.availHeight/2)-(nHeight/2)) ;


    var gDialogsize = "width="+nWidth+",height="+nHeight+",left=120,top=100"
    var winopen = window.open(lnkURL,targetName,"status=yes,toolbar=no,menubar=no,"
        + "location=no,resizable=no,"+gDialogsize,true);

    if (winopen==null) {
        alert("À©µµ¿ìXP¸¦ ÀÌ¿ëÇÏ¿© ¹è¿ò³ª¶ó¿¡ Á¢¼ÓÇÏ½Ã´Â ºÐ²²¼­´Â ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇÏ¿© ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.\r\n\r\nÆË¾÷Â÷´ÜÇØÁ¦¸¦ ÇÑ´Ù¸é Á¤»óÀûÀ¸·Î ÀÌ ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\r\n\r\nÈ­¸éÀ§ÂÊ¿¡ ÀÖ´Â ÆË¾÷Â÷´Ü¾È³»¸¦ ´­·¯ [ÇöÀç»çÀÌÆ®¸¦ Ç×»óÇã¿ë]À¸·Î ¼³Á¤ÇØ ÁÖ¼¼¿ä.");
    } else {
        winopen.focus();
    }
}

/* »õÀ©µµ¿ìdownload */
function fncNewWindowDown(lnkURL)
{
    popWindow = window.open(lnkURL,"down","status=no,toolbar=no,menubar=no,location=no,resizable=0,width=50,height=50,left=900,top=550",true);
    if (popWindow==null) {
        alert("À©µµ¿ìXP¸¦ ÀÌ¿ëÇÏ¿© ¹è¿ò³ª¶ó¿¡ Á¢¼ÓÇÏ½Ã´Â ºÐ²²¼­´Â ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇÏ¿© ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.\r\n\r\nÆË¾÷Â÷´ÜÇØÁ¦¸¦ ÇÑ´Ù¸é Á¤»óÀûÀ¸·Î ÀÌ ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\r\n\r\nÈ­¸éÀ§ÂÊ¿¡ ÀÖ´Â ÆË¾÷Â÷´Ü¾È³»¸¦ ´­·¯ [ÇöÀç»çÀÌÆ®¸¦ Ç×»óÇã¿ë]À¸·Î ¼³Á¤ÇØ ÁÖ¼¼¿ä.");
    } else {
        popWindow.focus();
    }
}

/* »õÀ©µµ¿ì */
function fncNewWindowPos0(lnkURL,targetName,nWidth,nHeight)
{
    var gWinheight= 0;
	var nWinLeftPos	= 0;
    var nWinTopPos	= 0;

    var gDialogsize = "width="+nWidth+",height="+nHeight+",left="
                    + nWinLeftPos+",top="+nWinTopPos
    var winopen = window.open(lnkURL,targetName,"status=yes,toolbar=no,menubar=no,"
        + "location=no,resizable=1,"+gDialogsize,true);

    if (winopen==null) {
        alert("À©µµ¿ìXP¸¦ ÀÌ¿ëÇÏ¿© ¹è¿ò³ª¶ó¿¡ Á¢¼ÓÇÏ½Ã´Â ºÐ²²¼­´Â ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇÏ¿© ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.\r\n\r\nÆË¾÷Â÷´ÜÇØÁ¦¸¦ ÇÑ´Ù¸é Á¤»óÀûÀ¸·Î ÀÌ ¼­ºñ½º¸¦ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.\r\n\r\nÈ­¸éÀ§ÂÊ¿¡ ÀÖ´Â ÆË¾÷Â÷´Ü¾È³»¸¦ ´­·¯ [ÇöÀç»çÀÌÆ®¸¦ Ç×»óÇã¿ë]À¸·Î ¼³Á¤ÇØ ÁÖ¼¼¿ä.");
    } else {
        winopen.focus();
    }
}

/* »õÀ©µµ¿ì(½ºÅ©·Ñ) */
function fncNewWindowScrol(lnkURL,targetName,nWidth,nHeight)
{
    nHeight=nHeight+15;
    var gWinheight= 0;
    var nWinLeftPos = ((screen.availWidth/2)-(nWidth/2)) ;
    var nWinTopPos  = ((screen.availHeight/2)-(nHeight/2)) ;

    var gDialogsize = "width="+nWidth+",height="+nHeight+",left="
                    + nWinLeftPos+",top="+nWinTopPos
    var winopen = window.open(lnkURL,targetName,"status=yes,toolbar=no,menubar=no,scrollbars=yes,"
        + "location=no,resizable=yes,"+gDialogsize,true);
    winopen.focus();
}
/* »õÀ©µµ¿ì */
function fncNewWindow01(lnkURL,targetName,nWidth,nHeight)
{
    var gWinheight= 0;
    nHeight=nHeight+15;
    var nWinLeftPos = ((screen.availWidth/2)-(nWidth/2)) ;
    var nWinTopPos  = ((screen.availHeight/2)-(nHeight/2)) ;

    var gDialogsize = "width="+nWidth+",height="+nHeight+",left="
                    + nWinLeftPos+",top="+nWinTopPos
    var winopen = window.open(lnkURL,targetName,"status=yes,toolbar=no,menubar=no,scrollbars=no,"
        + "location=no,resizable=yes,"+gDialogsize,true);
    winopen.focus();
}

/*¿ÀÇÁ³ÊÀÇ Æ÷Ä¿½ºÁÖ±â*/
function fncOpenerFocus() {
    try {
        opener.focus();
    } catch (e) {
    }
}


/* ¿À¸¥ÂÊ¹öÆ°ºñÈ°¼ºÈ­Ã³¸®*/
var contextOk = false;

function context(b) {
    if ( b ) {
        contextOk = true;
    } else {
        if ( !contextOk ) {
            return false;
        } else {
            contextOk = false;
            return true;
        }
    }
    return false;
}

/* »óÅ×Ã¢Ç¥½Ã */
function fncShowStatus()
{
    window.status = "";
    setTimeout("fncShowStatus();",500);
}


/*ÀüÃ¼¼±ÅÃ*/
function fncSetAll() {
    var f=document.frm1;
    try {
        chk1 = f.chk1.length;

        /* 1°³ÀÇ checkBox*/
        if (chk1==null) {
            if (f.chk1.checked) {
                f.chk1.checked=false
            } else {
                f.chk1.checked=true
            }
        /* ´ÙÁßÀÇ checkBox*/
        } else {
            nLen = f.chk1.length;
            for(i=0;i<nLen;i++) {
                if (f.chk1[i].checked) {
                    f.chk1[i].checked=false
                } else {
                    f.chk1[i].checked=true
                }
            }
        }
    }catch(e) {
    }
}

/*¼±ÅÃµÈ ¸®½ºÆ®¸¸µé±â*/
function fncSetDataList() {
    var f=document.frm1;
    var isChk=1;
    f.humanSetList.value=""
    try {
        chk1 = f.chk1.length;

        /* 1°³ÀÇ checkBox*/
        if (chk1==null) {
            if (f.chk1.checked) {
                f.humanSetList.value=f.chk1.value;
                isChk=2;
            }
        /* ´ÙÁßÀÇ checkBox*/
        } else {
            nLen = f.chk1.length;
            for(i=0;i<nLen;i++) {
                if (f.chk1[i].checked) {
                    if (f.humanSetList.value=="") {
                        f.humanSetList.value=f.chk1[i].value;
                    } else {
                        f.humanSetList.value=f.humanSetList.value + "," + f.chk1[i].value;
                    }
                    isChk=2;
                }
            }
        }
    }catch(e) {
        isChk=0;
    }

    return isChk;
}




/*
    ÀÌµ¿ºÎÇÏÁÙÀÓÇÔ¼ö
    ÁöÁ¤ÆäÀÌÁö°¡ ¾ø´Ù¸é ÆäÀÌÁö·Î ÀÌµ¿, ÀÖ´Ù¸é history.back(-1)
*/
function fncHistoryPlus(pageid) {
    if (document.referrer!="") {
        try {
            var refpage=document.referrer;
            var nfind = refpage.indexOf(pageid);
            if (nfind<0) {
                location.href=pageid;
            } else {
                history.back(-1);
            }
        } catch(e) {
            location.href=pageid;
        }
    } else {

        location.href=pageid;
    }
}


/* ÇØ´ç Div·¹ÀÌ¾î¸¦ °¨Ãß°í ¿­°í ÇÏ´Â ±âº»±â´É */
function  fncToggleLayer(objname) {
    var objDiv = document.getElementById(objname)
//    alert(objDiv.length);
    tmp = objDiv.style.display;

    if (tmp=="block") {
        objDiv.style.display="none"
        try {
            document.images["Img_"+objname].src="/kado2005/0700/0703/ico/plus.gif";
        } catch(e) {}

    } else {
        objDiv.style.display="block"
        try {
            document.images["Img_"+objname].src="/kado2005/0700/0703/ico/minus.gif";
         } catch(e) {}
    }
}

/*
    Ã¥°¥ÇÇÇüÅÂÀÇ ·¹ÀÌ¾î º¸ÀÌ±â(obj¼±¾ð)
    lname:·¹ÀÌ¾î¸í
    iname:ÀÌ¹ÌÁö
    n: ·¹ÀÌ¾î°¹¼ö
*/
function bookStyleMenuObj(lname,iname,n) {

    this.layerName          =lname;
    this.imageName          =iname;
    this.layerLen           =n;


    this.hide               =hide;
    this.show               =show;

    /* ¸ðµÎ °¨Ãß±â */
    function hide() {
        try {
            for (var i=0;i<this.layerLen;i++) {
                document.getElementById(this.layerName+(i+1)).style.display="none";
            }
        } catch(e) {}
    }

    /* ÇØ´ç¹øÈ£·Î º¯°æ */
    function show(n) {
        try {
            name=this.layerName+ "" + n;
            document.getElementById(name).style.display="block";
        } catch(e) {
        }
    }
}
/* Ã¥°¥ÇÇ È£Ãâ±â´É */
function changeShow(layername,objNum,showNum) {
        var  menuObj=new bookStyleMenuObj(layername,"",objNum);
        menuObj.hide();
        menuObj.show(showNum);
}


/* ³ªÀÇ ¸Þ´º¿¡ µî·ÏÇÏ±â */
function fncMyMenuReg(pcode) {
    var t1,t2;
    t1 = document.title;
    t2 = document.location.href;
    fncNewWindow("/kado2005/0100/0199/MyMenuReg.asp?pcode="+pcode+"&t1="+t1+"&t2="+t2,"menuReg",500,300)
}


/* °­ÁÂPOP¸Þ´º*/
function fncLecturePopMenu(lectermId) {
    gSetLectermId = lectermId;

/*
    var obj = document.getElementById(tobj).style;

    if (obj==null) {
    } else {
        alert(obj.left + ":"+ obj.pixelLeft+":"+obj.offsetLeft)
    }
*/

    try {
        fncLayerPopMenuHide("idHumanPopMenu");
        fncLayerPopMenuHide("idTuterPopMenu");
    } catch(e) {}

    fncLayerPopMenuShow("idLecturePopMenu");
}
function fncLecturePopMenuHide() {
    fncLayerPopMenuHide("idLecturePopMenu");
}


/* ¸Þ´º·¹ÀÌ¾î¼³Á¤ACTION */
function fncLayerPopMenuShow(obj) {
    var idMenuList;
    x = event.x;
    y = event.y;

    if (NS6){
        idMenuList=document.getElementById(obj).style;
        idMenuList.left = x + "px";
        idMenuList.top= y + "px";
        idMenuList.visibility="visible";
        idMenuList.zindex=1;
    } else if (IE) {
        idMenuList=document.getElementById(obj).style;
        idMenuList.pixelLeft = x;
        idMenuList.pixelTop=    y;
        idMenuList.visibility = "visible";
        idMenuList.zindex=1;
    } else if (NS) {
        idMenuList=document.layers[obj];
        idMenuList.left = x+"px";
        idMenuList.top= y+"px";
        idMenuList.visibility = "show";
        idMenuList.zindex=1;
    }
}

function fncLayerPopMenuHide(obj) {
    var idMenuList;
    if (NS6){
        idMenuList=document.getElementById(obj).style;
        idMenuList.left = "1px";
        idMenuList.top="1px";
        idMenuList.visibility="hidden";
        idMenuList.zindex=0;
    } else if (IE) {
        idMenuList=document.getElementById(obj).style;
        idMenuList.pixelLeft = 1;
        idMenuList.pixelTop=    1;
        idMenuList.visibility = "hidden";
        idMenuList.zindex=0;
    } else if (NS) {
        idMenuList=document.layers[obj];
        idMenuList.left = "1px";
        idMenuList.top="1px";
        idMenuList.visibility = "hidden";
        idMenuList.zindex=0;
    }
}

function fncMyHome() {
    location.href="/kado2005/0100/0108/UM000.ASP";
}
function fncMyMail() {
    location.href="/kado2005/0100/0112/UM150.ASP";
}
function fncMyMemo() {
    location.href="/kado2005/0100/0112/UM130.ASP";
}
function fncMyPrivate() {
    location.href="/kado2005/0100/0108/UM240.ASP";
}
function fncMyPrivate_0400() {
    location.href="/kado2005/0400/0499/UM240.ASP";
}
function fncMyPrivate2() {
    location.href="/kado2005/0400_new/0499/UM240.ASP";
}
function fncMyPrivate_typeB() {
    location.href="/kado2005/0400_typeB/0499/UM240.ASP";
}
function fncOrgMyPrivate() {
    location.href="/kado2005/0400/0499/UM240_INTERNATIONAL.ASP";
}

/* ÂÊÁö¹ß¼Û */
function fncSendMemo(uid,uname) {
    fncNewWindow("/kado2005/0100/0112/UM142.asp?uid=" + uid + "&uname="+uname,"memo",493,310)
}

/* ¸ÞÀÏ¹ß¼Û */
function fncSendMail(uid,uname) {
    fncNewWindow("/kado2005/0100/0112/UM144.asp?uid=" + uid + "&uname="+uname,"memo",493,355)
}
function fncSendMail_heler(uid,uname) {
    fncNewWindow("/kado2005/0100/0112/UM144_toHelper.asp?uid=" + uid + "&uname="+uname,"memo",493,355)
}


/* ½ºÅÍµð±×·ì */
function fncGoStudyCafe(grp) {
//    var w = screen.availWidth;
//    var h = screen.availHeight;
    w = 1000;
    h = 640;

    fncNewWindowPos0("/kado2005/0100/0106/UG599.ASP?gp="+grp,"STUDYGROUP_HOME",w,h);
}

/* ³ªÀÇ»ó´ãÁ¤º¸ */
function fncGoQuestion(seq) {

    location.href="/kado2005/0100/0108/UM210/board02.ASP?start=1&view=1&seq="+ seq;
}


/* ºí·Î±× */
function fncGoBlog(uid) {
    w = 1000;
    h = 640;

    fncNewWindowPos0("/kado2005/0100/0107/UB599.ASP?u="+uid,"BLOG_HOME",w,h);
}

/* ºí·Î±×¹Ì¸®º¸±â */
function fncGoBlogPreview(uid,prefile) {
    w = 1000;
    h = 640;

    fncNewWindowPos0("/kado2005/0100/0107/UB599.ASP?u="+uid+"&preview="+prefile,"BLOG_HOME",w,h);
}


/* ºóÃ¼Å© */
function fncAlertEmpty(obj) {
    alert("ÀÚ·á°¡ ºñ¾î ÀÖ½À´Ï´Ù.");
    document.frm1.elements[obj].focus();
    return;
}

/* ¼öÄ¡Ã¼Å© */
function fncAlertNumeric(obj) {
    alert("¼öÄ¡°¡ ¾Æ´Õ´Ï´Ù.");
    document.frm1.elements[obj].focus();
    document.frm1.elements[obj].select();
    return;
}


/* ±âº»°ª¼ÂÆÃ(TEXT/TEXTAREA) */
function fncDefaultSetOn(obj,imgname) {
    var tmp=obj.value;
    if (tmp=="" && imgname!="") {
        obj.style.backgroundRepeat="no-repeat"
        obj.style.backgroundImage="url(/kado2005/0700/0703/input_title/"+imgname+")";
    } else {
        obj.style.backgroundImage="";
    }
}

/* ±âº»°ª¼ÂÆÃÇØÁ¦ */
function fncDefaultSetOff(obj) {
    obj.style.backgroundImage="";
}



/* Æ©ÅÍPOP¸Þ´º */
function fncToturPopMenu(uid) {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    gSetUserId = uid;

/*
    try {
        fncLayerPopMenuHide("idHumanPopMenu");
        fncLayerPopMenuHide("idLecturePopMenu");
    } catch(e) {}
    fncLayerPopMenuShow("idTuterPopMenu");
*/
    fncPopMenuAct_TutorInfo();

}
function fncToturPopMenuHide() {
    fncLayerPopMenuHide("idTuterPopMenu");
}

/* È¸¿øPOP¸Þ´º*/
function fncHumanPopMenu(uid) {
    gSetUserId = uid;

    try {
        fncLayerPopMenuHide("idTuterPopMenu");
        fncLayerPopMenuHide("idLecturePopMenu");
    } catch(e) {}

    fncLayerPopMenuShow("idHumanPopMenu");
}
function fncHumanPopMenuHide() {
    fncLayerPopMenuHide("idHumanPopMenu");
}


/* ¼ö°­½ÅÃ» */
function fncSukang(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecSukang();
}

function fncSukang2(lid,uid) {
    gSetLectermId = lid;
    gSetUserId = uid;
    fncPopMenuAct_LecSukang();
}

function fncPopMenuAct_LecSukang() {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    if (gSetLectermId=="") {
        return;
    }

    fncNewWindow("/kado2005/0100/0102/US091.ASP?lectermId="+gSetLectermId+"&ck_userid="+gSetUserId,"",430,235);
}


function fncSukang_org_0400(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecSukang_org_0400();
}

function fncPopMenuAct_LecSukang_org_0400() {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    if (gSetLectermId=="") {
        return;
    }

    fncNewWindow("/kado2005/0400/0470/0102/US091.ASP?lectermId="+gSetLectermId+"&ck_userid="+gSetUserId,"",430,235);
}

function fncSukang_org_0400_typeB(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecSukang_org_0400_typeB();
}

function fncPopMenuAct_LecSukang_org_0400_typeB() {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    if (gSetLectermId=="") {
        return;
    }

    fncNewWindow("/kado2005/0400_typeB/0470/0102/US091_pay.ASP?lectermId="+gSetLectermId+"&ck_userid="+gSetUserId,"",430,560);
}
function fncSukang_org_0400_typeB_free(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecSukang_org_0400_typeB_free();
}

function fncPopMenuAct_LecSukang_org_0400_typeB_free() {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    if (gSetLectermId=="") {
        return;
    }

    fncNewWindow("/kado2005/0400_typeB/0470/0102/US091.ASP?lectermId="+gSetLectermId+"&ck_userid="+gSetUserId,"",430,560);
}

function fncSukang_org_0400_new(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecSukang_org_0400_new();
}

function fncPopMenuAct_LecSukang_org_0400_new() {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    if (gSetLectermId=="") {
        return;
    }

    fncNewWindow("/kado2005/0400_new/0470/0102/US091.ASP?lectermId="+gSetLectermId+"&ck_userid="+gSetUserId,"",430,235);
}

/* ´ÜÃ¼ °áÁ¦ */
function fncGroup_PAY() {

fncNewWindow("/kado2005/0400_typeB/0470/0102/US091_PAY_GROUP.ASP","",430,235);

}

/* ¼ö°­½ÅÃ»Ãë¼Ò */
function fncSukangCancel(lid) {
    if (lid=="") return;

    if (confirm("¼ö°­Ãë¼Ò¸¦ ÇÏ½Ã°Ú½À´Ï±î?\r\n\r\nÃë¼Ò¸¦ ÇÏ·Á¸é È®ÀÎ¹öÆ°À» ´©¸¥ ÈÄ Àá½Ã¸¸ ±â´Ù·Á ÁÖ¼¼¿ä.")) {
        fncNewWindow("/kado2005/0100/0102/US092_CANCEL.ASP?lectermId="+lid,"",300,240);
    }
}

function fncSukangCancel_typeB(lid,sid) {
    if (lid=="") return;

    if (confirm("¼ö°­Ãë¼Ò¸¦ ÇÏ½Ã°Ú½À´Ï±î?\r\n\r\nÃë¼Ò¸¦ ÇÏ·Á¸é È®ÀÎ¹öÆ°À» ´©¸¥ ÈÄ Àá½Ã¸¸ ±â´Ù·Á ÁÖ¼¼¿ä.")) {
        fncNewWindow("/kado2005/0400_typeB/0470/0102/US092_CANCEL.ASP?lectermId="+lid+"&sukangid="+sid,"",300,240);
    }
}


/* ÀüÃ¼¼ö°­½ÅÃ» */
function fncAllSukang() {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }
    
    var f=document.frm1;
    var lid="";
    
    var  clObj =  new PbcCheckListSameBox("frm1","chkLecId");
    n = clObj.GetCheckedLength();
    if (n==0) {
        alert("¼ö°­½ÅÃ»ÇÒ °­ÁÂ¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
        return;
    }

    if (n==1) {
        lid = clObj.GetCheckedData(",");
        fncSukang(lid);
        return;
    } else if (n>4) {
        alert("µ¿½Ã¿¡ 4°³ ÀÌ»óÀ» ½ÅÃ»ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
        return;

    } else {
        //## ÀÓ½Ã´ÙÁßµî·Ï¸·±â(1/8)##
//        alert("ÁË¼ÛÇÕ´Ï´Ù. Áö±ÝÀº °³º°½ÅÃ»¸¸ °¡´ÉÇÕ´Ï´Ù. ÇÑ°³¾¿ ½ÅÃ»ÇØ ÁÖ¼¼¿ä.\r\n\r\nºü¸¥½ÃÀÏ³»¿¡ ¿©·¯°³ ½ÅÃ»ÀÌ °¡´ÉÇÏµµ·Ï ÇÏ°Ú½À´Ï´Ù.")
//        return;
    }

    lid = clObj.GetCheckedData(",");
    fncNewWindow("/kado2005/0100/0102/US091_MULTI.ASP?sid="+lid,"",300,240);

}


/* ¸Àº¸±â */
function fncSample(a,b) {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    fncNewWindow("/kado2005/0500/SA000.ASP?x=0&a="+a+"&b="+b+"&c=0&z=1","studyRoom",1020,697);
//    window.open("/kado2005/0500/SA000.ASP?x=0&a="+a+"&b="+b+"&c=0&z=1","studyRoom","status=yes,toolbar=no,menubar=no,"
//        + "location=no,personalbar=no, resizable=1,left=0,top=0",true);
}

/* ´Ü¿ø°ñ¶ó */
function fncMyLecture(a) {
    fncNewWindow("/kado2005/0500/SA000.ASP?x=2&a="+a+"&b=0&c=0&z=0","studyRoom",1020,697);
//    window.open("/kado2005/0500/SA000.ASP?x=2&a="+a+"&b=0&c=0&z=0","studyRoom","status=yes,toolbar=no,menubar=no,"
//        + "location=no,personalbar=no, resizable=1,left=0,top=0",true);
}

/* ´Ü¿ø°ñ¶ó-¸ñÂ÷ */
function fncMyLectureMokcha(a) {
    fncNewWindow("/kado2005/0100/0102/US096_X2.ASP?lectureId="+a,"",470,510);
}


//kks 2007-07-04 ¼öÁ¤ Á¢¼Ó ¾ÆÇÇ¸¦ Ãß°¡ ÇÐ½ÀÃ¢ Á¤º¸ È®ÀÎÀ» À§ÇØ¼­

/* ÇÐ½ÀÃ¢µé¾î°¡±â */
function fncStudyGo(a,b,c,d) {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

//    fncNewWindow("/kado2005/0500/SA000.ASP?a="+a+"&b="+b+"&c="+c,"studyRoom",1020,697);

    window.open("/kado2005/0500/SA000.ASP?a="+a+"&b="+b+"&c="+c+"&d="+d,"studyRoom","status=yes,toolbar=no,menubar=no,"
        + "location=no,personalbar=no, resizable=0,left=0,top=0,width=1020,height=697",true);
}





function fncStudyGoThis(a,b,c) {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    location.href="/kado2005/0500/SA000.ASP?a="+a+"&b="+b+"&c="+c;
}


/* ÇÐ½ÀÇöÈ² */
function fncStudyStatus(a,b,c) {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }
    fncNewWindow("/kado2005/0100/0103/UL200.ASP?a="+a+"&b="+b+"&c="+c,"studyStatus",470,400);
}

function fncMokcha(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecMokcha();
}

function fncGrade(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecGrade();
}

function fncIWant(lid) {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    gSetLectermId = lid;
    fncPopMenuAct_LecIWant();
}

/* ¼ö°­°­ÁÂ¹Ù·Î°¡±â */
function fncMyLecListClick() {
    var f = document.frmMyLecPass
    var value;
    var tmp;

    value = f.idMyLecList.options[f.idMyLecList.selectedIndex].value;
    if (value=="") {
        return;
    }

    if (value=="TUTOR_LMS") {
        window.open("/kado2005/0602/main.asp", "TUTOR_LMS", "width=1100,height=700,toolbar=0, location=1, menubar=0, status=1, scrollbars=1, resizable=1");
        return;
    }

    tmp = value.split(",")

    if (tmp.length==3) {//ÀÏ¹Ý°­ÁÂ
        fncStudyGo(tmp[0],tmp[1],tmp[2]);
    } else if (tmp.length==1) {//³ª¸¸ÀÇ°­ÁÂ
        fncMyLecture(tmp[0]);
    }
}

/* ±³¿ø °áÁ¦¿©ºÎ È®ÀÎÈÄ ¼ö°­°­ÁÂ¹Ù·Î°¡±â */
function fncMyLecListClick_typeB() {
    var f = document.frmMyLecPass
    var value;
    var tmp;

    value = f.idMyLecList.options[f.idMyLecList.selectedIndex].value;
    if (value=="") {
        return;
    }

    tmp = value.split(",")

    if (tmp.length==4) {//ÀÏ¹Ý°­ÁÂ
        if (tmp[3]=="1") {
            fncStudyGo(tmp[0],tmp[1],tmp[2]);
        }else{
            //alert('¼ö°­À» À§ÇÑ °áÁ¦Á¤º¸¸¦ È®ÀÎÇÏ¿© ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.');
            fncStudyGo(tmp[0],tmp[1],tmp[2]);
        }

    } else if (tmp.length==1) {//³ª¸¸ÀÇ°­ÁÂ
        fncMyLecture(tmp[0]);
    } else if (tmp.length==3) {//Æ©ÅÍÀÇ °ü¸®°­ÁÂ
        fncStudyGo(tmp[0],tmp[1],tmp[2]);
    }
}


/*******************************************************************************
    È¸¿ø±â´É
*******************************************************************************/
function fncPopMenuAct_TutorInfo() {
    if (gSetUserId=="") {
        return;
    }

    fncNewWindow("/kado2005/0998/099806/tuterInfo.ASP?uid="+gSetUserId,"tutor",470,310);
}

function fncPopMenuAct_Chat() {
    if (gSetUserId=="") {
        return;
    }
    alert("Ã¤ÆÃ¼­ºñ½º´Â ±â´Ù·Á ÁÖ¼¼¿ä.");
   // fncNewWindow("/kado2005/0998/099806/tuterInfo.ASP?uid="+gSetUserId,"",600,550);
}

function fncPopMenuAct_Memo(uid) {
    if (uid!=null && uid!="") {
        gSetUserId = uid;
    }

    if (gSetUserId=="") {
        return;
    }
    fncNewWindow("/kado2005/0100/0108/UM143.ASP?uid="+gSetUserId,"",600,550);
}

function fncPopMenuAct_Mail(uid) {
    if (uid!=null && uid!="") {
        gSetUserId = uid;
    }

    if (gSetUserId=="") {
        return;
    }
    alert("¸ÞÀÏ¼­ºñ½º´Â ±â´Ù·Á ÁÖ¼¼¿ä.");
    //fncNewWindow("/kado2005/0998/099806/tuterInfo.ASP?uid="+gSetUserId,"",600,550);
}


/*******************************************************************************
    °­ÁÂ±â´É
*******************************************************************************/
function fncPopMenuAct_LecSample() {
    if (gSetLectermId=="") {
        return;
    }
}

function fncPopMenuAct_LecDetail() {
    if (gSetLectermId=="") {
        return;
    }
    location.href="/kado2005/0100/0102/US090.ASP?lectermId="+gSetLectermId
}

function fncPopMenuAct_LecGrade() {
    if (gSetLectermId=="") {
        return;
    }
    fncNewWindow("/kado2005/0100/0102/US095.ASP?lectermId="+gSetLectermId,"",470,500);
}



function fncPopMenuAct_LecIWant() {
    if (gSetLectermId=="") {
        return;
    }
    fncNewWindow("/kado2005/0100/0102/US093.ASP?lectermId="+gSetLectermId,"",430,185);
}
function fncPopMenuAct_LecMokcha() {
    if (gSetLectermId=="") {
        return;
    }
    fncNewWindow("/kado2005/0100/0102/US096.ASP?lectermId="+gSetLectermId,"",470,510);
}




//¿ÜºÎ±â°ü Ãß°¡ »çÇ× ===========================================================

function fncMokcha_org(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecMokcha_org();
}
function fncPopMenuAct_LecMokcha_org() {
    if (gSetLectermId=="") {
        return;
    }
    fncNewWindow("/kado2005/0400_new/0470/0102/US096.ASP?lectermId="+gSetLectermId,"",485,580);
}
function fncGrade_org(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecGrade_org();
}
function fncPopMenuAct_LecGrade_org() {
    if (gSetLectermId=="") {
        return;
    }
    fncNewWindow("/kado2005/0400_new/0470/0102/US095.ASP?lectermId="+gSetLectermId,"",470,500);
}
function fncSukang_org(lid) {
    gSetLectermId = lid;
    fncPopMenuAct_LecSukang_org();
}
function fncPopMenuAct_LecSukang_org() {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    if (gSetLectermId=="") {
        return;
    }
    fncNewWindow("/kado2005/0400_new/0470/0102/US091.ASP?lectermId="+gSetLectermId,"",430,240);
}
function fncToturPopMenu_org(uid) {
    if (gLogin=="0") {
        alert("·Î±×ÀÎÈÄ ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        return;
    }

    gSetUserId = uid;

/*
    try {
        fncLayerPopMenuHide("idHumanPopMenu");
        fncLayerPopMenuHide("idLecturePopMenu");
    } catch(e) {}
    fncLayerPopMenuShow("idTuterPopMenu");
*/
    fncPopMenuAct_TutorInfo_org();

}
function fncPopMenuAct_TutorInfo_org() {
    if (gSetUserId=="") {
        return;
    }

    fncNewWindow("/kado2005/0400_new/4998/tuterInfo.ASP?uid="+gSetUserId,"tutor",470,310);
}

//==============================================================================



/*
    ¹Ì¸®º¸±â ±â´É
    @param title    Ãâ·ÂÁ¦¸ñ
    @param sdata    Ãâ·ÂÇÒ html³»¿ë(ÆûÇÁ·Î¼¼½ºÀÌ¿ëÀÚ·á)
    @param width    Æø
    @param height   ³ôÀÌ
*/
function fncPreFormShow(title,sdata,width,height){
	var gWinheight
	var gDialogsize
	var ghelpwin
	var lnkURL="";
	var targetName="showdata";
	var nWidth	= width;
	var nHeight	= height;
	var showWin=null;

	gWinheight= 0;
	nWinLeftPos	= Math.round((screen.availWidth/2)-(nWidth/2)) ;
    nWinTopPos	= Math.round((screen.availHeight/2)-(nHeight/2)) ;
	gDialogsize= "width="+nWidth+",height="+nHeight+",left="+nWinLeftPos+",top="+nWinTopPos

    if (title=="") title="¹Ì¸®º¸±â";

	showWin=window.open("",targetName,"status=no,toolbar=no,menubar=no,location=no,resizable=no,"+gDialogsize,true);

    showWin.document.writeln("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 3.2//EN'>");
    showWin.document.writeln("<html>");
    showWin.document.writeln("<head>");
    showWin.document.writeln("<title>"+title+"</title>");
    showWin.document.writeln("<meta http-equiv='Content-Type' content='text/html; charset=euc-kr'>");
    showWin.document.writeln("<meta http-equiv='imagetoolbar' content='no'>");
//    showWin.document.writeln("<link href='/kado2005/0700/0705/com_style2.css' rel='stylesheet' type='text/css'>");
    showWin.document.writeln("</head>");
    showWin.document.writeln("<body><center>");
    showWin.document.writeln(sdata);
    showWin.document.writeln("</center></body>");
    showWin.document.writeln("</html>");
    showWin.document.close(sdata);
	showWin.focus();
}

function fncShowImagePop(title,imgpath,width,height){
	var gWinheight
	var gDialogsize
	var ghelpwin
	var lnkURL="";
	var targetName="showdata";
	var nWidth	= width + 50;
	var nHeight	= height + 20;
	var showWin=null;

	gWinheight= 0;
	nWinLeftPos	= Math.round((screen.availWidth/2)-(nWidth/2)) ;
    nWinTopPos	= Math.round((screen.availHeight/2)-(nHeight/2)) ;
	gDialogsize= "width="+nWidth+",height="+nHeight+",left="+nWinLeftPos+",top="+nWinTopPos

    if (title=="") title="¹Ì¸®º¸±â";

	showWin=window.open("",targetName,"status=yes,toolbar=no,menubar=no,location=no,resizable=yes,"+gDialogsize,true);

    showWin.document.writeln("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 3.2//EN'>");
    showWin.document.writeln("<html>");
    showWin.document.writeln("<head>");
    showWin.document.writeln("<title>"+title+"</title>");
    showWin.document.writeln("<meta http-equiv='Content-Type' content='text/html; charset=euc-kr'>");
    showWin.document.writeln("<meta http-equiv='imagetoolbar' content='no'>");
    showWin.document.writeln("</head>");
    showWin.document.writeln("<body leftmargin='0' topmargin='0' rightmargin='0' bottommargin='0' marginwidth='0' marginheight='0' scroll='yes' bgcolor='#000000'><table width='100%' height='100%' border=0><tr><td align=center valign=middle>");
    showWin.document.writeln("<img src='"+imgpath+"' border=0>");
    showWin.document.writeln("</td></tr></table></body>");
    showWin.document.writeln("</html>");
    showWin.document.close(sdata);
	showWin.focus();
}

/* Ãâ·Â»çÀÌÁîÁ¶Á¤ */
function fncBoardAdjViewSize() {
    var f;
    try {
        f=document.frmViewSizeTemp;
        val = f.viewSize.options[f.viewSize.selectedIndex].value;
    } catch(e) {
        alert("»çÀÌÁîÁ¶Á¤°´Ã¼°¡ ¾ø½À´Ï´Ù.")
        return;
    }
    try {
        top.frmAct2.location.href="/kado2005/0998/099805/ChangeBoardViewSize.asp?size="+val;
    } catch(e) {
        top.ReadMessageActFrm.location.href="/kado2005/0998/099805/ChangeBoardViewSize.asp?size="+val;
    }
}

/* ·Î±×¾Æ¿ô */
function fncSiteLogout() {
    //location.href="/kado2005/0998/099801/loginout.asp";

	frmLogout.returnurl.value = "/kado2005/0998/099801/loginout.asp";
    frmLogout.submit();
}

function fncSiteLogout_teacher() {
    //location.href="/kado2005/0998/099801/loginout_teacher.asp";
    

	frmLogout.returnurl.value = "/kado2005/0998/099801/loginout.asp";
    frmLogout.submit();
}

function fncOrgSiteLogout() {
    location.href="/kado2005/0998/099801/loginout.asp";

//    top.main1.frmLogout.target="ReadMessageActFrm";
//    top.main1.frmLogout.submit();
}
function fncSiteLogoutLocalCall() {
    location.href="/kado2005/0998/099801/loginout.asp";
}

/* ÀÌ¸ÞÀÏ esay¼±ÅÃ */
function fncMailEasy(frmName,objname){

    var f = document.forms[frmName];
	var value = f.elements[objname+"2"].value;
	if( value == "etc")  {
    	var urlname = "/kado2005/0100/0109/OC071_EMAIL_INPUT2.ASP?f="+frmName+"&objname="+objname;
    	addr_etc = window.open(urlname, "win1","status=no,resizable=no,menubar=no,scrollbars=no,width=385,height=125,left=10,top=10");
    	addr_etc.focus();
	}
	return;
}

/* °Ë»ö-·Î±×ÀÎÇÑ°æ¿ì¸¸Ã³¸® */
function fncSearchCnt(cd,txt) {
    if (gLogin=="0") {
        return;
    }

    try {
        top.ReadMessageActFrm.location.href="/kado2005/0100/0199/search_check.asp?cd="+cd+"&txt="+txt;
    } catch(e) {}
}

/* ¼ö°­½ÅÃ»¸¶¹ý»ç */
function fncSukangHelpMagic() {
    fncNewWindow("/kado2005/0100/0102/US080.ASP","HelpSukgnMagic",410,300)
}


/* °øÅë´Þ·Â */
function fncCommonCalenderShow(fname,objname) {
    fncNewWindow("/kado2005/0998/099806/calender.asp?fname="+fname+"&objname="+objname,"calender",300,270);
}

/*
    ÆË¾÷À¸·ÎÀÇ ½ÇÇàÃ³¸® Å¸ÄÏ¼³Á¤
    fncNewWindowAction();
    f.target="actWin";
*/
function fncNewWindowAction() {
    fncNewWindow("about:blank","actWin",400,400);
}


/* ³ªÀÇ¸Þ´º¹Ù·Î°¡±â */
function fncMyMenuGo(ul) {
    try {
        location.href=ul;
    } catch(e) {
//        alert("Àß¸øµÈ ºÏ¸¶Å©ÀÔ´Ï´Ù. ¸ÞÀÎÈ­¸éÀ¸·Î ÀÌµ¿ÇÑÈÄ¿¡ ´Ù½Ã ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
        alert("ÁË¼ÛÇÕ´Ï´Ù. ¸ÞÀÎÈ­¸éÀ¸·Î ÀÌµ¿ÇÑ ÈÄ¿¡ ´Ù½Ã ÀÌ¿ëÇØ ÁÖ¼¼¿ä.");
    	top.location.href="/";
    	return;
    }
}


function fncPMbr(uid) {
    if (gLogin=="0") {
        return;
    }

    var posX = 0;
    var posY = 0;

    try {
        posX = window.event.x-60;;
        posY = window.event.y+100;
    } catch(e) {
        posX = 600
        posY = 200
    }

    var loc;

    //ÆË¾÷¿©ºÎ
    if (opener) {
        //opener°¡ ÀÖ´Â°æ¿ì
        if (opener.name=="main1") {
            loc = opener.top.ReadMessageActFrm;
        }

        try {
            loc.location.href="/kado2005/0998/099806/checkNameMenu.asp?uid="+uid+"&posx="+posX+"&posy="+posY;
        } catch(e) {
        }

    } else {
        //¾ø´Â°æ¿ì
        loc = top.ReadMessageActFrm;

        if (gNameMenuShow=="1") {
            try {
                loc.location.href="/kado2005/0998/099806/checkNameMenu.asp?uid="+uid+"&posx="+posX+"&posy="+posY;
            } catch(e) {
            }
        }
    }
}

//ÀÌ¹ÌÁö¸ô
function fncItemImageMall() {
    fncNewWindow("/kado2005/0100/0113/IT000.ASP","ITEM_MALL",645,683);
}
//ÀÌ¹ÌÁö¸ô
function fncItemImageMallView(seq) {
    fncNewWindow("/kado2005/0100/0113/IT030.ASP?itemId="+seq,"ITEM_MALL",650,680);
}

// swfÈ£Ãâ
function f_menu_link(menuNum) {
    alert("°¢ ¸Þ´ºº°·Î ÀÌµ¿ÇÏ±â À§ÇØ¼­ °íÀ¯¹øÈ£¸¦ ÁöÁ¤ÇØ ÁÖ¼¼¿ä.\r\n\r\nÇöÀç ¼±ÅÃµÈ ¹øÈ£´Â "+menuNum+" ÀÔ´Ï´Ù.");
}

//ÇÐ½ÀÃ¢µµ¿ò¸»
function fncStudyRoomHelp() {
    fncNewWindow("/kado2005/0400/0403/ZE080.ASP","sutdyHelpWin",720,470)
}
