<!--


//¼ýÀÚÀÎÁö Ã¼Å©
function isNumericDot( value )
{	
	if (value == 8 || value == 9 || value == 13 || (value >= 37 && value <= 40) || value == 46 || (value >= 48 && value <= 57) ||  value == 110 || value == 190 || value == 192 || value == 27 || value == 116 || (value >= 96 && value <= 105))
		 return true;
	else return false;
}
// ¼ýÀÚ¸¸ ÀÔ·Â
// onkeydownÀ» »ç¿ëÇÒ °Í 2004/05/08 - ¹ÚÀÏÇü
function num_chekDot() { 
  if (isNumericDot(event.keyCode)==false){
		alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
		event.returnValue=false;
	}
}

//¼ýÀÚÀÎÁö Ã¼Å©
function isNumeric( value )
{
	if (value == 8 || value == 9 || value == 13 || (value >= 37 && value <= 40) || value == 46 || value == 27 || value == 116 || (value >= 48 && value <= 57) || (value >= 96 && value <= 105))
		 return true;
	else return false;
}
// ¼ýÀÚ¸¸ ÀÔ·Â
// onkeydownÀ» »ç¿ëÇÒ °Í 2004/05/08 - ¹ÚÀÏÇü
function num_chek() { 
  if (isNumeric(event.keyCode)==false){
		alert("¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÕ´Ï´Ù.");
		event.returnValue=false;
	}
}
// ÆÄÀÏ ºÎºÐ¿¡ ÅØ½ºÆ® ÀÔ·Â ¸øÇÏ°Ô ÇÏ±â À§ÇØ¼­
function fileWriteNot(){  
  event.returnValue=false;  
}

// ±â´É: ¹®ÀÚ¿­ÀÇ ¾Õ, µÚ °ø¹éÀ» Á¦°ÅÇÑ´Ù
// ÆÄ¶ó¹ÌÅÍ: ¹®ÀÚ¿­
// ¸®ÅÏ°ª: ¹®ÀÚ¿­
function trim(str)
{
	var s = str.replace(/^ */, "");
	s = s.replace(/ *$/, "");
	return  s;
}

//°³¹ß °ü·Ã °øÅë js

// »õÃ¢ ¶ç¿ì±â
// ÆÄ¶ó¹ÌÅÍ ¼³¸í
// name  : À©µµ¿ì Ã¢ ÀÌ¸§
// url   : »Ñ·ÁÁÙ ÆäÀÌÁö
// width : À©µµ¿ì Ã¢ ³ÐÀÌ
// height: À©µµ¿ì Ã¢ ³ôÀÌ
// toolbar : Åø¹Ù ³ªÅ¸³¾Áö ¿©ºÎ
// menubar : ¸Þ´º¹Ù ³ªÅ¸³¾Áö ¿©ºÎ
// statusbar : »óÅÂ¹Ù ³ªÅ¸³¾Áö ¿©ºÎ
// scrollbar : ½ºÅ©·Ñ¹Ù ³ªÅ¸³¾Áö ¿©ºÎ
// resizable : ¸®»çÀÌÁî ±â´É ¿©ºÎ
// ¿¹Á¦  : open_window('./test.asp', 'test', '' ,'' ,'200','100','','','','','')
function open_window(url, name, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  /*
  target = window.open(url, name, 'left='+left+', top='+top+', width='+width+', height='+height+', toolbar='+toolbar_str+', menubar=' +menubar_str+', status='+statusbar_str+', scrollbars='+scrollbar_str+', resizable='+resizable_str);
  target.focus();
  */
 
  window.open(url, name, 'left='+left+', top='+top+', width='+width+', height='+height+', toolbar='+toolbar_str+', menubar=' +menubar_str+', status='+statusbar_str+', scrollbars='+scrollbar_str+', resizable='+resizable_str);
}

// ÆÄÀÏ¾÷·Îµå °ü·Ã progress Bar
function showProgress(o) 
{ 
   strAppVersion = navigator.appVersion; 
   if (o.fileValue.value != "") {
      if (strAppVersion.indexOf('MSIE')!=-1 && 
          strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) { 

          winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes"; 
          window.showModelessDialog("/showprogress/show_progress.asp?nav=ie", null, winstyle); 
      } 
      else { 
          winpos = "left=" + ((window.screen.width-380)/2)+",top=" +
               ((window.screen.height-110)/2); 
          winstyle = "width=380,height=110,status=no,toolbar=no,menubar=no," + 
               "location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos; 
          window.open("/showprogress/show_progress.asp",null,winstyle); 
      } 
   }
   return true; 
} 

// ´ÙÁß È­ÀÏ ¾÷·Îµå ½Ã ÁøÇà¸·´ë º¸ÀÌ±â
function MulShowProgress(o)
{
	strAppVersion = navigator.appVersion;
	if (o.fileValue(0).value != "" || o.fileValue(1).value != "" ) {
		if (strAppVersion.indexOf('MSIE') != -1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4) {
			winstyle = "dialogWidth=385px; dialogHeight:150px; center:yes";
			window.showModelessDialog("/showprogress/show_progress.asp?nav=ie", null, winstyle);
		}
		else {
			winpos = "left=" + ((window.screen.width-380)/2) + ",top=" + ((window.screen.height-110)/2);
			winstyle="width=380,height=110,status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=no,copyhistory=no," + winpos;
			window.open("/showprogress/show_progress.asp?nav=ns",null,winstyle);
		}
	}
	
	return true;
}

// °Ë»ö¾î Æ¯¼ö ¹®ÀÚ Ã¼Å© 
// return : false (°Ë»ö¾ÈµÊ), true (Æ¯¼ö¹®ÀÚ°Ë»ö ¹× ¸Þ¼¼Áö)
function chkSpeChar( oInputCtrl)
{
	var speChar = " `~!#$%^&*+=|\\[]{}:;-,<>/?'\"";
	for(var iCnt = 0; iCnt < speChar.length; iCnt++)
	{
		special = speChar.substr(iCnt, 1);
		if( oInputCtrl.value.indexOf(special) != -1)
		{
			alert("Æ¯¼ö¹®ÀÚ[" + special + "]¸¦ °Ë»ö¾î¿¡ ÀÔ·Â ÇÒ ¼ö ¾ø½À´Ï´Ù.");
			return true;
		}
	}
	return false;
}

/*
//Çà´ç¿ùÀÇ ³¯Â¥ ¼¿·ºÆ® ¹Ú½º
function chkDay(o,val,dayValue){
	var tyearName,tMonthName,tDayName, lastDay,i;
	tyearName = eval(o + "." + val + "Year");
	tMonthName = eval(o + "." + val + "Month");
	tDayName = eval(o + "." + val + "Day");
	//lert(tyearName.selectedIndex)
	
	if(tyearName.selectedIndex>0 && tMonthName.selectedIndex>0){
		lastDay = getDayNum(parseInt(tyearName.value,10), parseInt(tMonthName.value,10));
		tDayName.options.length = lastDay+1;
		tDayName.options[0].value = "";
		tDayName.options[0].text  = "ÀÏ";
		
		for(i=0 ; i < lastDay ; i++) {
        //alert(tDayName.options[i].value);
		 if (i+1<10){
			 tDayName.options[i+1].value = "0"+(i+1);		  
			 tDayName.options[i+1].text  = "0"+(i+1);
		 }else{
			 tDayName.options[i+1].value = i+1;		  
			 tDayName.options[i+1].text  = i+1;
		 }
		}
		if (dayValue!=""){
			tDayName.selectedIndex = dayValue;
		}
		tDayName.focus();
	}else{		
		tDayName.options.length = 1;
		tDayName.options[0].value = "";
		tDayName.options[0].text  = "ÀÏ";
	}
}
*/
//Çà´ç¿ùÀÇ ³¯Â¥ ¼¿·ºÆ® ¹Ú½º
function chkDay(o,valYear, valMonth, valDay, dayValue){
	var tyearName,tMonthName,tDayName, lastDay,i;
	tyearName = eval(o + "." + valYear);
	tMonthName = eval(o + "." + valMonth);
	tDayName = eval(o + "." + valDay);
	//lert(tyearName.selectedIndex)
  //alert(tyearName.selectedIndex);
  //alert(tMonthName.selectedIndex);
	if(tyearName.selectedIndex>0 && tMonthName.selectedIndex>0){
		lastDay = getDayNum(parseInt(tyearName.value,10), parseInt(tMonthName.value,10));
		tDayName.options.length = lastDay+1;
		tDayName.options[0].value = "";
		tDayName.options[0].text  = "ÀÏ";
		
		for(i=0 ; i < lastDay ; i++) {
        //alert(tDayName.options[i].value);
		 if (i+1<10){
			 tDayName.options[i+1].value = "0"+(i+1);		  
			 tDayName.options[i+1].text  = "0"+(i+1);
		 }else{
			 tDayName.options[i+1].value = i+1;		  
			 tDayName.options[i+1].text  = i+1;
		 }
		}
		if (dayValue!=""){
			tDayName.selectedIndex = dayValue;
		}
		tDayName.focus();
	}else{		
		tDayName.options.length = 1;
		tDayName.options[0].value = "";
		tDayName.options[0].text  = "ÀÏ";
	}
}

//ÇØ´ç¿ùÀÇ ¸¶Áö¸·³¯Â¥
function getDayNum(valYear, valMonth){
	var monthDays;
		monthDays = [31,28,31,30,31,30,31,31,30,31,30,31];
		if ((((valYear % 4) == 0) && ((valYear % 100) != 0)) || ((valYear % 400) == 0)){
			monthDays[1] = 29;
		}
		return monthDays[parseInt(valMonth)-1];
}

// ¸ÞÀÏÁÖ¼Ò Ã¼Å©
function chkEmailAddr( sEmail)
{
	var sRegExp = /([\w|\-]+)@([\w|\-]+)\.(\w+)/;
	return sRegExp.test( sEmail)
}

//textarea ¹Ú½ºÀÇ ±ÛÀÚ Á¦¾î ÇÔ¼ö
//pInName : (¿¹ document.frmForm.content)
function showMsgLen(pInName, pLen, pMsgLen){
   if (getStrLen(eval(pInName+".value"))>pLen){
	  alert("¿µ¹® " + pLen + "ÀÚ, ÇÑ±Û " + pLen/2 + " ÀÌ³»·Î ÀÛ¼ºÇØ ÁÖ¼¼¿ä.");
	  eval(pInName+".focus()");
   }
	  pMsgLen.innerHTML = getStrLen(eval(pInName+".value")) + '/' + pLen;
}
function getStrLen(str){
	var len=0, j;
	
	for (i=0, j=str.length;
		i<j;
		i++, len++)
	{
		if ( (str.charCodeAt(i)<0)||(str.charCodeAt(i)>127) )
		{
			len = len+1;
		}
	}
	return len;
}

//´ÙÀ½ ÅÜÀ¸·Î ÀÌµ¿ÇÏ±â (ÁÖ¹Î¹øÈ£³ª ÀüÈ­ ¹øÈ£ µî)
function numTeb(o, pLen, pPre, pNext){
	if (eval("o." + pPre + ".value.length==" + pLen)){
    eval("o." + pNext + ".focus();");
		return;
	}
}


// Form Validation:
// @author ¿ìµ¿½Ä
// control : text box name
// msg : ("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.")
// return : false (form validation fail), true (form validation ¼º°ø)

function isFilled(control, msg) {	
	if (control.value == null || control.value.length == 0) {
		alert(msg);
		control.focus();
		control.select();
		return false;
	}
	return true;
}
// Form Validation:
// @author ¿ìµ¿½Ä
// control : radio box 
// return : false (form validation fail), true (form validation ¼º°ø)
function isChecked(control, msg) {	// radio button.
	var val = false;
	for (var i=0; i<control.length; i++) {
		if (control[i].checked == true) val = true;
	}
	if(val==false) alert(msg);
	return val;
}
// Form Validation:
// @author ¿ìµ¿½Ä
// control : select box 
// return : false (form validation fail), true (form validation ¼º°ø)
function isSelected(control, msg) {	// drop box.	
	var val = false;
	for (var i=1; i<control.length; i++) {
		if (control.options[i].selected == true) val = true;		
	}
	if(val==false && msg.length>0) {
		control.focus();
		alert(msg);
	}
	return val;
}


//iframÀÇ Å©±â¸¦ Á¶ÀýÇÏ´Â ÇÔ¼ö ½ÃÀÛ
function reSize(){
	    var objBody	    =	bbsFrm.document.body;
	    var objFrame	=	document.all["bbsFrm"];
      var objFrameHeightSize = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
      if (objFrameHeightSize==0){
        //objFrame.style.height = 500;
        //objFrame.style.width = '100%';
        document.all["bbsFrm"].reload();
      }else{
        objFrame.style.height = objFrameHeightSize;
        objFrame.style.width = '100%';
      }
}

function init() {
  frame_init();
}  

// iframe initialize Function
function frame_init()
{
    try{

	    parent.reSize();
	    //parent.document.location.href = parent.document.location.href + '#';
	}
	catch(e)
	{
	 
	}
}
// iframÀÇ Å©±â Á¶ÀýÇÔ¼ö ³¡

// ¸®½ºÆ®ÀÇ Ã¼Å©¹Ú½º ÀüÃ¼ ¼±ÅÃ ¹× ÇØÁö ÇÔ¼ö ½ÃÀÛ
/*ÀüÃ¼ ¼±ÅÃ ÇØÁ¦*/
function AllChk(o, pAll, pChk){
  var value;
  var tmpChkAll, tmpChk;
  tmpChkAll = eval("o." + pAll);
  tmpChk = eval("o." + pChk);   
  if (tmpChkAll.checked==true){
    value=true;
  }else{
    value=false;
  }
  if ( tmpChk != null ){
    var olen = eval(tmpChk.length);
    if ( olen != null ){
      for ( var i = 0 ; i < tmpChk.length ; i++ ){
        tmpChk[i].checked = value;
       }
    }else{
      tmpChk.checked = value;
    }
  }
}
/*°¢ Ã¼Å© ¹Ú½º¸¦ ¼±ÅÃÇÏ¿© ÀüÃ¼ Ã¼Å©¹Ú½º Á¦¾î*/
function chkBox(o, pAll, pChk){
  var value;
  var tmpChkAll, tmpChk;
  tmpChkAll = eval("o." + pAll);
  tmpChk = eval("o." + pChk);
  value = true;
  if ( tmpChk != null ){
    var olen = eval(tmpChk.length);
    if ( olen != null ){
      for ( var i = 0 ; i < tmpChk.length ; i++ ){
        if (tmpChk[i].checked == false){
          value=false;
          break;
        }
      }
    }else{
      if (tmpChk.checked == false){
          value=false;
      }
    }
  }
  tmpChkAll.checked=value;
}
 // ¸®½ºÆ®ÀÇ Ã¼Å©¹Ú½º ÀüÃ¼ ¼±ÅÃ ¹× ÇØÁö ÇÔ¼ö ³¡


 /*±ÝÁö´Ü¾î ÆË¾÷Ã¢*/
 function curseWordOpen(){
  var winWord = window.open("/admin/inc/curseWord.asp",winWord , "width=420,height=570,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes");
 }

 /*ÆäÀÌÂ¡ Æû submit*/
function listPage(val){
  document.listFrm.page.value = val;
  document.listFrm.submit();
}
//À¥¿¡µðÅÍ ºÎºÐ
function BackGroundColor(o){
  var bgcolorChk;
	bgcolorChk = o.tbContentElement.DOM.body.style.backgroundColor;
    if (bgcolorChk==""){
			o.contentValue.value = o.tbContentElement.DOM.body.innerHTML;
		}else{
			o.contentValue.value = "<div style='background-color: " + bgcolorChk + "'>" + o.tbContentElement.DOM.body.innerHTML + "</div>";
		}
}


// ½Å°í ÆË¾÷ ½ºÅ©¸³Æ®
function openReport(o){
 window.open("","reportForm","width=490,height=350,top=0,left=0,scrollbars=no,resizable=no")
  eval(o+".submit()");
}


// ÄíÅ°°ª °¡Á® ¿À±â (ÁÖ·Î ¿ÀÇÂÃ¢¿¡¼­ ÇÏ·ç¸¸ ºÎºÐ Á¦¿¡ ÇÒ¶§ »ç¿ë
function getCookie(name) {
	var nameOfCookie=name+"=";
	
  var x=0;
  while(x<=document.cookie.length) {
	var y=(x+nameOfCookie.length)
	if(document.cookie.substring(x,y)==nameOfCookie) {
      if((endOfCookie=document.cookie.indexOf(";",y))==-1)
	    endOfCookie=document.cookie.length;
	  return unescape(document.cookie.substring(y,endOfCookie));
    }
    x=document.cookie.indexOf(" ",x) +1;
	if(x==0)
	  break;
  }
  return "";
}

//·Î±×ÀÎ Ã¼Å©
function chkLogin(o){
  if(trim(o.loginName.value)==""){
    alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
    o.loginName.focus();
    return false;
  }
  if(trim(o.password.value)==""){
    alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
    o.password.focus();
    return false;
  }
  return;
}

//¿ìÆí¹øÈ£ Ã£±â... zipcode , address1 , address2.............  javascript:zipSearch( 'ÆûÀÌ¸§' , '¿ìÆí¹øÈ£' , 'ÁÖ¼Ò1' , 'ÁÖ¼Ò2' )
function zipSearch( formName , zipcode , addr1 , addr2 ){
  url = "/kdjlibrary/zip/zipSearch.asp?formName=" + formName + "&zipcode=" + zipcode + "&addr1=" + addr1 + "&addr2=" + addr2;
  open_window(url, "zipSearch", "0", "0", "470", "400", "", "", "", "auto", ""); 
}

//°úÁ¤Ã£±â... formName , cCode , courseName .............  javascript:searchCourse( 'ÆûÀÌ¸§' , '°úÁ¤ÄÚµå' , '°úÁ¤¸í' )
function searchCourse( formName , cCode , courseName ){
  url = "/admin/inc/searchCourse.asp?formName=" + formName + "&cCode=" + cCode + "&courseName=" + courseName;
  open_window(url, "searchCourse", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//°úÁ¤Ã£±â... formName , cCode , courseName, 1 .............  javascript:searchCourse( 'ÆûÀÌ¸§' , '°úÁ¤ÄÚµå' , '°úÁ¤¸í' , '1' )
//¿ÀÇÂ Ã¢ ´Ù½Ã ·ÎµåÇÏ±â.....
//°úÁ¤°³¼³ÇÏ´Â ÆäÀÌÁö¸¸ ÇöÀç »ç¿ë°¡´É...¸ÖÆ¼ »ç¿ëÀ» ÇÏ·Á¸é searchCourse.asp ¼Ò½º¸¦ ¼öÁ¤ÇØ¾ßÇÔ....
function searchCourse( formName , cCode , courseName , roadFlag ){
  url = "/admin/inc/searchCourse.asp?formName=" + formName + "&cCode=" + cCode + "&courseName=" + courseName + "&roadFlag=" + roadFlag;
  open_window(url, "searchCourse", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//ÁýÇÕ°úÁ¤Ã£±â... formName , cCode , courseName, 1 .............  javascript:searchCourse( 'ÆûÀÌ¸§' , '°úÁ¤ÄÚµå' , '°úÁ¤¸í' , '1' )
//¿ÀÇÂ Ã¢ ´Ù½Ã ·ÎµåÇÏ±â.....
//°úÁ¤°³¼³ÇÏ´Â ÆäÀÌÁö¸¸ ÇöÀç »ç¿ë°¡´É...¸ÖÆ¼ »ç¿ëÀ» ÇÏ·Á¸é searchCourse.asp ¼Ò½º¸¦ ¼öÁ¤ÇØ¾ßÇÔ....
function searchOffCourse( formName , offCode , courseName , roadFlag ){
  url = "/admin/inc/searchOffCourse.asp?formName=" + formName + "&offCode=" + offCode + "&courseName=" + courseName + "&roadFlag=" + roadFlag;
  open_window(url, "searchCourse", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//´ëºÐ·ùÃ£±â... formName , caCode , categoryName .............  javascript:searchSubject( 'ÆûÀÌ¸§' , '´ëºÐ·ùÄÚµå' , '´ëºÐ·ù¸í' )
function searchCategory( formName , caCode , categoryName ){
  url = "/admin/inc/searchCategory.asp?formName=" + formName + "&caCode=" + caCode + "&categoryName=" + categoryName;
  open_window(url, "searchCategory", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//°ú¸ñÃ£±â... formName , subCode , subjectName .............  javascript:searchSubject( 'ÆûÀÌ¸§' , '°ú¸ñÄÚµå' , '°ú¸ñ¸í' )
function searchSubject( formName , subCode , subjectName ){
  url = "/admin/inc/searchSubject.asp?formName=" + formName + "&subCode=" + subCode + "&subjectName=" + subjectName;
  open_window(url, "searchSubject", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//Â÷½ÃÃ£±â... formName , chapCode , chapterName .............  javascript:searchChapter( 'ÆûÀÌ¸§' , 'Â÷½ÃÄÚµå' , 'Â÷½Ã¸í' )
function searchChapter( formName , chapCode , chapterName ){
  url = "/admin/inc/searchChapter.asp?formName=" + formName + "&chapCode=" + chapCode + "&chapterName=" + chapterName;
  open_window(url, "searchChapter", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//°­»çÃ£±â... formName , userID , userName .............  javascript:searchTeacher( 'ÆûÀÌ¸§' , '°­»ç¾ÆÀÌµð' , '°­»ç¸í' )
function searchTeacher( formName , userID , userName ){
  url = "/admin/inc/searchTeacher.asp?formName=" + formName + "&userID=" + userID + "&userName=" + userName;
  open_window(url, "searchTeacher", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//Æ©ÅÍÃ£±â... formName , userID , userName .............  javascript:searchTutor( 'ÆûÀÌ¸§' , 'Æ©ÅÍ¾ÆÀÌµð' , 'Æ©ÅÍ¸í' )
function searchTutor( formName , userID , userName ){
  url = "/admin/inc/searchTutor.asp?formName=" + formName + "&userID=" + userID + "&userName=" + userName;
  open_window(url, "searchTutor", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//°ú¸ñÃ£±â... formName , subCode , subjectName ,cCode.............  javascript:searchSubject( 'ÆûÀÌ¸§' , '°ú¸ñÄÚµå' , '°ú¸ñ¸í' ,'°úÁ¤ÄÚµå')
function searchSubjectWithcCode( formName , subCode , subjectName,cCode ){
  url = "/admin/inc/searchSubjectWithcCode.asp?cCode=" + cCode + "&formName=" + formName + "&subCode=" + subCode + "&subjectName=" + subjectName;
  open_window(url, "searchSubjectWithcCode", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

//´ÜÀÏ°úÁ¤³» ¼ö°­»ý¸®½ºÆ® ... ocCode .............  javascript:openPerson( '°³¼³°úÁ¤ÄÚµå' )
function openPerson( ocCode ){
  url = "/admin/inc/personList.asp?ocCode=" + ocCode;
  open_window(url, "personList", "0", "0", "820", "500", "", "", "", "auto", ""); 
}

//´ÜÀÏ°úÁ¤³» °í¿ë¼ö°­»ý¸®½ºÆ® ... ocCode .............  javascript:openGoyongPerson( '°³¼³°úÁ¤ÄÚµå' )
function openGoyongPerson( ocCode ){
  url = "/admin/inc/personGoyongList.asp?ocCode=" + ocCode;
  open_window(url, "personList", "0", "0", "820", "500", "", "", "", "auto", ""); 
}

// ½ÇÀû°ü¸® ¼ö°­»ý ¸®½ºÆ®
function personListByPeriod( ocCode , startDate, endDate ){
  url = "/admin/inc/personListByPeriod.asp?ocCode=" + ocCode + "&startDate=" + startDate + "&endDate=" + endDate;
  open_window(url, "personListByPeriod", "0", "0", "820", "500", "", "", "", "auto", ""); 
}

//´ÜÃ¼ ¼ö°­»ý¸®½ºÆ® ... ocCode , groupCode .............  javascript:openPerson2( '°³¼³°úÁ¤ÄÚµå' , '±×·ìÄÚµå' )
function openPerson2( ocCode , groupCode ){
  url = "/admin/inc/personCompanyList.asp?ocCode=" + ocCode + "&groupCode=" + groupCode;
  open_window(url, "personList", "0", "0", "820", "500", "", "", "", "auto", ""); 
}

//¸ÞÀÏ ¹ß¼Û...........  javascript:mailSend( 'ÀÌ¸§' , 'ÀÌ¸ÞÀÏÁÖ¼Ò' )
function mailSend( name , email ){
  location.href="/admin/member/groupmail/mailForm.asp?uFlag=solo&name=" + name + "&email=" + email;
}

//¼³¹®°á°ú ... ocCode   javascript:openVoteResult( '°³¼³°úÁ¤ÄÚµå' )
function openVoteResult( ocCode  ){
  url = "/admin/inc/PopVote.asp?ocCode=" + ocCode;
  open_window(url, "voteResult", "0", "0", "820", "600", "", "", "", "auto", ""); 
}

//¿î¿µÀÏÁ¤ ÇÐ½À°èÈ¹¼­
 function openStudyPlan ( ocCode ) {
  url = "/admin/inc/PopStudyPlan.asp?ocCode=" + ocCode;
  open_window(url, "StudyPlan", "0", "0", "800", "700", "", "", "", "auto", ""); 
 }

//¿î¿µÀÏÁ¤ ÇÐ½À°èÈ¹¼­
 function openTutorStudyPlan ( ocCode ) {
  url = "/admin/tutor/report/tutorStudyPlan.asp?ocCode=" + ocCode;
  open_window(url, "StudyPlan", "0", "0", "800", "700", "", "", "", "auto", ""); 
 }

/*Æ©ÅÍ°ü¸® ¼ö°­»ý ¼ö·á°á°ú ÆË¾÷
 function openPersonResult ( ocCode, pkid ) {
  url = "/admin/inc/PopPersonResult.asp?ocCode=" + ocCode + "&pkid=" + pkid;
  open_window(url, "personResult", "0", "0", "800", "700", "", "", "", "auto", ""); 
}
*/

/*Æ©ÅÍ°ü¸® ¼ö°­»ý ¼ö·á°á°ú ÆË¾÷
 function openPersonResultByTutor ( ocCode, pkid ) {
  url = "/admin/tutor/report/PopPersonResult.asp?ocCode=" + ocCode + "&pkid=" + pkid;
  open_window(url, "personResult", "0", "0", "800", "700", "", "", "", "auto", ""); 
}
*/

// ÀÌ¹ÌÁö width ¸¸ ÁÙÀÌ±â
function resizeImage(o, pWidth){
	var MAX_WIDTH=pWidth;
	if (o.width > MAX_WIDTH) {
		o.width = MAX_WIDTH;
	}
}
// ÀÌ¹ÌÁö width, height ÁÙÀÌ±â
function resizeImageWH(o, pWidth, pHeight){
	var MAX_WIDTH=pWidth;
  var MAX_HEIGHT=pHeight;
	if (o.width > MAX_WIDTH) {
		o.width = MAX_WIDTH;
	}
  if (o.height > MAX_HEIGHT) {
		o.height = MAX_HEIGHT;
	}
}
// ÀÌ¹ÌÁö ÆË¾÷Ã¢ À©µµ¿ì Å©±â¿¡ µû¶ó¼­ Á¦¾î
function ImageReSizeWindow(o){
  var objBody, height, width
  var version;
  version = navigator.appVersion;
  objBody = document.body
  height = objBody.offsetHeight + (objBody.offsetHeight - objBody.clientHeight)
  width = objBody.offsetWidth + (objBody.offsetWidth - objBody.clientWidth)
  if (o.width > o.height) {
    if(o.width <= width){      
      width = o.width + 50;
      height = o.height + 120;
    }else if(o.width < window.screen.Width && o.width > width){
      width = o.width + 50;
      height = o.height + 120;
    }else if(o.width >= window.screen.Width){
      width = window.screen.Width - 100;
      height = window.screen.Height - 100;
    }
    if(version.indexOf("Windows NT 5.1") > -1){
      height = height  + 20;
    }
    window.resizeTo(width, height); 
	}else{
    if(o.height <= height){      
      width = o.width + 50;
      height = o.height + 120;
    }else if(o.height < window.screen.Height && o.height > height){
      width = o.width + 50;
      height = o.height + 120;
    }else if(o.height >= window.screen.Width){
      width = window.screen.Width - 100;
      height = window.screen.Height - 100;
    }
    if(version.indexOf("Windows NT 5.1") > -1){
      height = height  + 20;
    }
    window.resizeTo(width, height);
  }
}

  function mailCheck(ObjMail){
    ObjMail = trim(ObjMail);
    if (ObjMail.search(/(\S+)@(\S+)\.(\S+)/) == -1 ){
        return true;    
    }
    return false;
  }

	function OnlyNumber()          //¼ýÀÚ¸¸ ÀÔ·Â¹Þµµ·Ï.... 
	{
		if((event.keyCode<48)||(event.keyCode>57))
		{
			event.returnValue=false;
		}
	}
  function lengthCheck( formName , str , text ){
    
    var uID;
    uID = trim(str);
    if(uID.length==0){
      eval("document."+formName+".msg.value='"+trim(text)+" À»(¸¦) ÀÔ·Â ¶Ç´Â ¼±ÅÃÇØ ÁÖ¼¼¿ä.'");
      return true;
    }
    else{
      return false;
    }
  }
	function checkSpace( str ){
     if(str.search(/\s/) != -1){
      return 1;
     }
     else {
         return "";
     }
	}
	function validCommon( formName , str , text ){
		var retVal = checkSpace( str ); 
		if( retVal != "" ) {
      eval("document."+formName+".msg.value='"+trim(text)+"Àº(´Â) ºó °ø°£ ¾øÀÌ ¿¬¼ÓµÈ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.'");
			return true; 
		} 
		/* checkFormat  */
		var isID = /^[a-z0-9]{1,30}$/;
		if( !isID.test(str) ) {
      eval("document."+formName+".msg.value='"+trim(text)+"´Â ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.'");
			return true; 
		}
		return false;
	}

	function validID( formName , str ){

		var retVal = checkSpace( str ); 
		if( retVal != "" ) {
      eval("document."+formName+".msg.value='¾ÆÀÌµð´Â ºó °ø°£ ¾øÀÌ ¿¬¼ÓµÈ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.'");
			return true; 
		}
    if( str.indexOf("admin") == 0 || str.indexOf("master") == 0 || str.indexOf("superadmin") == 0 || str.indexOf("webmaster") == 0 ){
      eval("document."+formName+".msg.value='µî·ÏÇÒ¼ö ¾ø´Â ¾ÆÀÌµðÀÔ´Ï´Ù.'");
      return true;
    }
		if( str.charAt(0) == "_") {
      eval("document."+formName+".msg.value='¾ÆÀÌµðÀÇ Ã¹¹®ÀÚ´Â _ ·Î ½ÃÀÛÇÒ¼ö ¾ø½À´Ï´Ù.'");
			return true;
		}
		/* checkFormat  */
		var isID = /^[a-z0-9_]{4,12}$/;
		if( !isID.test(str) ) {
      eval("document."+formName+".msg.value='¾ÆÀÌµð´Â 4~12ÀÚÀÇ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ,Æ¯¼ö±âÈ£(_)¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.'");
			return true; 
		}
		return false;
	}


	function validPWD( formName , str ){
		var retVal = checkSpace( str ); 
		if( retVal != "" ) {
      eval("document."+formName+".msg.value='ºñ¹Ð¹øÈ£´Â ºó °ø°£ ¾øÀÌ ¿¬¼ÓµÈ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.'");
			return true; 
		} 
		/* checkFormat  */
		var isID = /^[a-z0-9]{4,12}$/;
		if( !isID.test(str) ) {
      eval("document."+formName+".msg.value='ºñ¹Ð¹øÈ£´Â 4~12ÀÚÀÇ ¿µ¹® ¼Ò¹®ÀÚ¿Í ¼ýÀÚ¸¸ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù.'");
			return true; 
		}
		return false;
	}
  function checkExpression(formName,name) { // 1-9 ±îÁö ¼ýÀÚÀÎ°æ¿ì ¾Õ¿¡ ÀÚµ¿À¸·Î 0 ºÙÀÌ±â.....
    if(!eval("document."+formName+"."+name+".value.match('^[0-9]{2}$')")) {
      var tnum = eval("document."+formName+"."+name+".value");
      var inum = "0"+tnum;
      eval("document."+formName+"."+name+".value='"+inum+"'");
    } 
    return;
  }
  function closeWin(){
    self.close();
  }
	function jumin_check( formName, registNum1, registNum2 ){               // ÁÖ¹Îµî·Ï¹øÈ£ Ã¼Å©
		var chk =0;
    var o = eval("document."+formName);
		var yy = eval("document."+formName+"."+registNum1+".value.substring(0,2)");
		var mm = eval("document."+formName+"."+registNum1+".value.substring(2,4)");
		var dd = eval("document."+formName+"."+registNum1+".value.substring(4,6)");
		var sex = eval("document."+formName+"."+registNum2+".value.substring(0,1)");
		if((eval("document."+formName+"."+registNum1+".value.length")!=6)||(yy <25||mm <1||mm>12||dd<1)){
			o.msg.value = "ÁÖ¹Îµî·Ï¹øÈ£¸¦ ¹Ù·Î ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.";
      eval("document."+formName+"."+registNum1+".value=''");
      eval("document."+formName+"."+registNum2+".value=''");
      eval("document."+formName+"."+registNum1+".focus()");
			return true;	
		}
		if((sex != 1 && sex !=2 && sex != 3 && sex != 4)||(eval("document."+formName+"."+registNum2+".value.length")!= 7 )){
			o.msg.value = "ÁÖ¹Îµî·Ï¹øÈ£¸¦ ¹Ù·Î ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿À.";
      eval("document."+formName+"."+registNum1+".value=''");
      eval("document."+formName+"."+registNum2+".value=''");
      eval("document."+formName+"."+registNum1+".focus()");
			return true;	
		}

		for (var i = 0; i <=5 ; i++){
			chk = chk + ((i%8+2) * parseInt(eval("document."+formName+"."+registNum1+".value.substring("+i+","+(i+1)+")")));
		}
		for (var i = 6; i <=11 ; i++){
			chk = chk + ((i%8+2) * parseInt(eval("document."+formName+"."+registNum2+".value.substring("+(i-6)+","+(i-5)+")")));
		}

		chk = 11 - (chk %11);
		chk = chk % 10;

		if (chk != eval("document."+formName+"."+registNum2+".value.substring(6,7)"))	{
		   	o.msg.value = "À¯È¿ÇÏÁö ¾Ê´Â ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù.\n\nÅ¸ÀÎÀÇ ÁÖ¹Îµî·Ï¹øÈ£¸¦ µµ¿ëÇÏ°Å³ª ÇãÀ§ ±âÁ¦ÇÒ °æ¿ì È¸¿ø°¡ÀÔÀÌ Ãë¼ÒµË´Ï´Ù.";
        eval("document."+formName+"."+registNum1+".value=''");
        eval("document."+formName+"."+registNum2+".value=''");
        eval("document."+formName+"."+registNum1+".focus()");
		   	return true;	
		}
	}
  function changeCourse( ocCode ){
    location.href="/admin/curriculum/curriMgtBylesson/?ocCode=" + ocCode;
  }

  function changeCourseTutor( ocCode ){
    location.href="/admin/tutor/?ocCode=" + ocCode;
  }

  function changeCourseTeacher( ocCode ){
    location.href="/admin/teacher/?ocCode=" + ocCode;
  }

  function changeCourse2( ocCode ){
    location.href="/admin/company/goyong/listView.asp?ocCode=" + ocCode;
  }

  function changeCourse4( ocCode ){
    location.href="/admin/company/nongoyong/listView.asp?ocCode=" + ocCode;
  }

  function changeCourse5( ocCode ){
    location.href="/admin/company/offline/listView.asp?ocCode=" + ocCode;
  }

  function changeCourse3( ocCode ){
    location.href="/admin/company/goyong/courseManager.asp?ocCode=" + ocCode;
  }
   function changeCourse6( cCode ){
    location.href="/admin/support/empInMgt/appointList.asp?cCode=" + cCode;
  }
    function changeCourse7( ocCode ){
    location.href="/admin/support/empInMgt/appointWrite.asp?ocCode=" + ocCode;
  }

  function changeCourse8( ocCode ){
    location.href="/admin/company/offline/courseManager.asp?ocCode=" + ocCode;
  }

  function changeCourse9( ocCode ){
    location.href="/admin/company/offline/courseManager.asp?ocCode=" + ocCode;
  }
  function changeJindo( pVal ){
    location.href="/admin/curriculum/prState/behindJindo.asp?jindoRate=" + pVal;
  }

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


 function calcul(){

    var o = document.rebateWriteForm;
    var tmpRebate

    if (o.preCompany.checked && o.enterprise.checked){
        tmpRebate=o.total.value=o.eaPrice.value*o.hourLesson.value*0.9*0.8;
    }else if  (o.preCompany.checked) {
        tmpRebate=o.total.value=o.eaPrice.value*o.hourLesson.value*0.9;
    }else if  (o.enterprise.checked) {
        tmpRebate=o.total.value=o.eaPrice.value*o.hourLesson.value*0.8;
    }else{
            tmpRebate=o.total.value=o.eaPrice.value*o.hourLesson.value;
    }
    o.total.value=tmpRebate;
  }



/*ÀÎÁöÁ¤ ³»¿ë µî·Ï½Ã Ã¼Å©*/
function aPpointInput(o){  
  if (trim(o.handlingDate.value)==""){
    alert("Ã³¸®±â°£À» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.handlingDate.focus();
    return false;
  }
}

/*³ëµ¿ºÎÁ¶Ä¡ µî·Ï½Ã Ã¼Å©*/
function govInput(o){  
  if (trim(o.docNumber.value)==""){
    alert("¹®¼­¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
    o.docNumber.focus();
    return false;
  }
    if (trim(o.applyDate.value)==""){
    alert("ÀÏÀÚ¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
    o.applyDate.focus();
    return false;
  }
    if (trim(o.title.value)==""){
    alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.title.focus();
    return false;
  }
    if (trim(o.content.value)==""){
    alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.content.focus();
    return false;
  }
  return;
}

 function openTeacher(teacherID)
{
	window.open('/admin/inc/PopTeacher.asp?teacherID='+teacherID,'teacherID_win','toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=510,height=270,left=0,top=0');
}

function openTutor(tutorID)
{
	window.open('/admin/inc/PopTutor.asp?tutorID='+tutorID,'tutorID_win','toolbar=no,location=no,directory=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=510,height=270,left=0,top=0');
}
function searchCourseBL( formName , cCode , courseName , roadFlag ){
  url = "/admin/inc/searchCourseBL.asp?formName=" + formName + "&cCode=" + cCode + "&courseName=" + courseName + "&roadFlag=" + roadFlag;
  open_window(url, "searchCourse", "0", "0", "370", "400", "", "", "", "auto", ""); 
}
function searchCourseBL2( formName , cCode , courseName , roadFlag,pkid ){
  url = "/admin/inc/searchCourseBL.asp?formName=" + formName + "&cCode=" + cCode + "&courseName=" + courseName + "&roadFlag=" + roadFlag + "&pkid=" + pkid;
  open_window(url, "searchCourse", "0", "0", "370", "400", "", "", "", "auto", ""); 
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
	if(selObj.options[selObj.selectedIndex].value.length > 0)
		window.open(selObj.options[selObj.selectedIndex].value);
	if (restore) selObj.selectedIndex=0;
}

/*³»¿ë µî·Ï½Ã Ã¼Å©*/
function MailInput(o){
   var uID;
    uID = o.email.value;

   if (trim(o.name.value)==""){
    alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.name.focus();
    return false;
  }
  if(uID.length==0){
      alert("ÀÌ¸ÞÀÏÀ»(¸¦) ÀÔ·Â ¶Ç´Â ¼±ÅÃÇØ ÁÖ¼¼¿ä.");
    o.email.focus();
      return false;
    }
  if((o.email.value.indexOf("@",0) == -1 || o.email.value.indexOf(".",0) == -1)){
      alert("Á¤È®ÇÑ ÀÌ¸ÞÀÏ ÁÖ¼Ò¸¦ Àû¾îÁÖ¼¼¿ä");  
      o.email.focus();      
      return false;
  }
  if (trim(o.title.value)==""){
    alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.title.focus();
    return false;
  } 
  if (trim(o.content.value)==""){
    alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
    o.content.focus();
    return false;
  } 
}
 
function popup(url){
 newwin=window.open(url,"new","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=756,height=585"); 
}

var rollFlag=0;
	function txt_roll(str)
	{
		nlength = str.length - 4;
		
		sub_num = str.substring(str.length - nlength);
		sub_str = str.substring(0, str.length - nlength);
		
		if (document.all[str].style.display=="")
		{
			document.all[str].style.display="none";
			rollFlag=0;
			return;
		}
		else
			{
			if(rollFlag != 0)
			{
				document.all[sub_str+rollFlag].style.display="none";
				document.all[str].style.display="";
			}
			document.all[str].style.display="";
			rollFlag=sub_num;
		}
	}


function historyHtmlSearch(news, urlPath ){
  url = "/data/"+news+"/"+urlPath;
  open_window(url, "dataPopup", "0", "0", "550", "500", "", "", "", "auto", ""); 
}

/* select box °Ë»ö */
  function change_sel(o){
    if (o=="1"){
      cp1.style.display="";
      cp2.style.display="none";
    }else if(o=="2"){
      cp1.style.display="none";
      cp2.style.display="";
    }
  }
//-->

// »õÃ¢¶ç¿ì±â-±Ý°æ¿Á
function PopupWin(o){ 
var win = window.open(o,win , "width=1010,height=700,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes");
}
function winPrint(){ 
window.print();
self.close(); 
}
