
/************************************
*  ±â´É :  ¹®ÀÚ¿­ ±æÀÌ Ã³¸®          *
*  parameter : obj, obj2, maxlength *
*************************************/
function CheckLength(obj, ostr, maxlength) {
   var length = CalculateMessage(obj.value);
   var obj2 = document.getElementById(ostr);

   obj2.value = length;
   if (length > maxlength) {
      alert("ÀÔ·ÂÇÏ½Å ³»¿ëÀÌ " + maxlength + " bytes°¡ ³Ñ¾ú½À´Ï´Ù.");
   }

   return length;
}

/******************************
*  ±â´É :  ¹®ÀÚ¿­ ¹ÙÀÌÆ® Ã³¸® *
*  parameter : msg           *
*******************************/
function CalculateMessage(msg) {
   var nbytes = 0;

   for (var i = 0; i < msg.length; i++) {
      var ch = msg.charAt(i);
      if (escape(ch).length > 4) {
         nbytes += 2;
      }
      else if (ch == "\n") {
         if (msg.charAt(i - 1) != "\r") {
            nbytes += 1;
         }
      }
      else if (ch == "<" || ch == ">") {
         nbytes += 4;
      }
      else {
         nbytes += 1;
      }
   }

   return nbytes;
}

	// »ç¿ëÀÚ Á¤º¸ Ã¢
	function fncGetMemberInfo(L) {
		var barron = document.all[L];

		barron.style.pixelLeft = event.clientX;
		barron.style.pixelTop = event.clientY + document.body.scrollTop + 5;
		barron.style.visibility = "visible";
	}
	function fncSetMemberInfo(L) {
		document.all[L].style.visibility = "hidden"
	}
   // ±³À°¼¾ÅÍ ·Î±×ÀÎ
   function fncGetEducenterLogin( obj, key, memberid ) {
      if( key != "" && memberid != "" ) {
         window.open( "http://educenter.nurscape.net/member/nurscape_log_ins_ex.asp?key=" + key + "&id=" + memberid + "&type=0", "educenter" );
      }
      fncSetMemberInfo(obj);
   }
   // ³Ê½ºÄÉÀÔ ·Î±×ÀÎ
   function fncGetNurscapeLogin( obj, memberid, memberpwd ) {
      if( memberid != "" && memberpwd != "" ) {
         window.open( "http://www.nurscape.net/intro/chkid.asp?strID=" + memberid + "&strPW=" + memberpwd, "educenter" );
      }
      fncSetMemberInfo(obj);
   }
   // ÆÇ¸ÅÁ¤º¸
   function fncGetSettlementList( obj, memberid ) {
      location.href = "/administrator/settlement/settlement_lst.asp?strSDate=2007-01-01&strTerm=B.id&strWord=" + memberid;

      fncSetMemberInfo(obj);
   }
   // ÂÊÁöº¸³»±â
   function fncGetEducenterMemo( obj, memberid ) {
      window.open("/common/pop/memo_pop_ins.asp?id=" + memberid,"memo","width=400,height=400,toolbar=no");

      fncSetMemberInfo(obj);
   }
   // ¸ÞÀÏº¸³»±â
   function fncGetEducenterMail( obj, membername, memberid, memberemail ) {
      window.open("/common/pop/mail_pop_ins.asp?id=" + memberid + "&name=" + membername + "&email=" + memberemail, "mail", "width=550,height=450,toolbar=no");

      fncSetMemberInfo(obj);
   }
   // ¸®Æ÷Æ® Á¦Ãâ
   function fncSetReport( key2, key3 ) {
      window.open("/common/pop/report_pop_ins.asp?key2=" + key2 + "&key3=" + key3, "report", "width=550,height=400,toolbar=no");
   }
   // ÇÊµ¶ ÆË¾÷
   function fncGetRequiredReading(pagename, tablename, fieldname) {
      window.open("/common/pop/requiredreading_pop_ins.asp?pagename=" + pagename + "&tablename=" + tablename + "&fieldname=" + fieldname, "requiredreading", "width=430,height=330,toolbar=no,scrollbars=yes");
   }

   // °´Ã¼ÀÇ ÀÔ·ÂµÈ¹®ÀÚ¿­±æÀÌ ¹× ±æÀÌ¸¸Å­ÀÇ Á¦ÇÑ(°´Ã¼, ±æÀÌ)
   function fncGetStringByte(obj, len) {
      var intByte = 0;
      var str     = "";

      obj = eval(obj).value;

      for( var i=0; i<obj.length; i++ ) {
         var strCharAt = obj.charAt(i);

         if( escape(strCharAt).length > 4 ) {
            intByte += 2;
         }
         else if( strCharAt == "<" || strCharAt == ">" ) {
            intByte += 4;
         }
         else if( strCharAt == "\n" ) {
            if( obj.charAt(i-1) != "\r") {
               intByte += 1;
            }
         }
         else {
            intByte += 1;
         }

		   if( eval(len) != 0 && eval(intByte) > eval(len) ) {
			   break;
		   }

         str += strCharAt;
      }

      if( eval(len) == 0 )
         return intByte;
      else
         return str;
   }

   // ¹®ÀÚ¿­ È®ÀÎ(°´Ã¼, ±æÀÌ°´Ã¼, ±æÀÌ)
   function fncGetTextLength( obj, obj2, len ) {
      obj  = eval(obj);
      obj2 = eval(obj2);

      // ÄÚ¸àÆ® ¹ÙÀÌÆ® ¼ö
      var intByte = fncGetStringByte(obj, 0);
      obj2.value  = intByte;

      // ±æÀÌ È®ÀÎ
      if( intByte > eval(len) ) {
         alert( "Á¦ÇÑµÈ ±ÛÀÚ ¼ö¸¦ ÃÊ°úÇÏ¿´½À´Ï´Ù!\nÃÊ°úµÈ ±ÛÀÚ ¼ö´Â ÀÚµ¿À¸·Î »èÁ¦µË´Ï´Ù!" );
         obj.value  = fncGetStringByte(obj, len).replace(/\r\n$/, "");
         obj2.value = fncGetStringByte(obj, 0);
      }
   }

   // ´ñ±Û ÀÔ·Â()
   function fncSetCommonComment() {
      var objFrm  = document.frmCommonComment;
      var objType = objFrm.strType.value;

      if( objType == "ÀÔ·Â" || objType == "¼öÁ¤" ) {
	      if( !CheckBlank( objFrm.strCommonComment ) ) {
		      alert( "´ñ±ÛÀ» " + objType + "ÇÏ¿© ÁÖ½Ê½Ã¿ä!" );
		      ResetValue( objFrm.strCommonComment );
		      return false;
	      }
		}

		var flag   = confirm( "ÇØ´ç ´ñ±ÛÀ» " + objType + "ÇÏ½Ã°Ú½À´Ï±î?" );

		if( flag ) {
         objFrm.action = "/common/asp/comment_ex.asp";
         objFrm.submit();
		}
		else {
		   if( objType == "»èÁ¦" ) {
		      location.reload();
		   }
		}
   }

   // ´ñ±Û ¼öÁ¤(no)
   function fncUpdateCommonComment(key) {
      var objFrm  = document.frmCommonComment;

      objFrm.key.value              = objFrm.arrListKey[key].value;
      objFrm.strType.value          = "¼öÁ¤";
      objFrm.strCommonComment.value = objFrm.arrListComment[key].value;
      objFrm.intCommentLength.value = fncGetStringByte(objFrm.strCommonComment, 0);
   }

   // ´ñ±Û »èÁ¦(no)
   function fncDelteCommonComment(key) {
      var objFrm  = document.frmCommonComment;

      objFrm.key.value              = objFrm.arrListKey[key].value;
      objFrm.strType.value          = "»èÁ¦";
      fncSetCommonComment();
   }

   // ³¯Â¥ Á¤º¸ Á¦°Å
   function fncDateFieldInit(obj) {
      obj.value = "";
   }

   // ¼­ºê ¸Þ´º Ç¥½Ã
   function MM_swapDiv(key) {
      var obj = window.topMenu_sub;

      for(var i=0; i<obj.length; i++) {
         if( i == key ) {
            obj[i].style.visibility = "visible";
         }
         else {
            obj[i].style.visibility = "hidden";
         }
      }
   }

   // ¼­ºê ¸Þ´º Á¦°Å
   function MM_swapDivRestore() {
      var obj = window.topMenu_sub;

      for(var i=0; i<obj.length; i++) {
         obj[i].style.visibility = "hidden";
      }
   }
   // »ó´Ü ¸Þ´º °ü·Ã
   function MM_swap( obj_id, obj_src, no ) {
      MM_swapImage(obj_id,'',obj_src,1);
      MM_swapDiv(no);
   }
   // ¼­ºê ¸Þ´º ¿Â¿À¹ö
   function MM_subRestore(id, src) {
      var obj = eval(id);

      obj.src = src;
   }

   // µ¿¿µ»ó FAQ
   function fncGetMovieFAQ() {
      window.open( "/common/pop/xinicsfaq_pop_st1.asp" ,"xinicsfaq_","menubar=no,toolbar=no,width=635,height=650,resize=1,left=5,top=5,scrollbars=yes" );
   }

   // Ä«µå ¿µ¼öÁõ
   function fncGetCardReceipt(val) {
      if( val.substring(0, 6) == "INIpay" ) {
         window.open( "https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid=" + val + "&noMethod=1" ,"popWinName","menubar=1,toolbar=no,width=431,height=724,resize=1,left=252,top=116" );
      }
      else {
         alert( "ÁË¼ÛÇÕ´Ï´Ù!\nÇöÀç PG»çÀÇ »çÁ¤À¸·Î ¿µ¼öÁõÀ» Ãâ·ÂÇÒ ¼ö ¾ø½À´Ï´Ù!" );
      }
   }

   // Çö±Ý¿µ¼öÁõ
   function fncGetCashReceipt(key) {
		window.open( "/common/pop/cashreceipt_pop_ins.asp?key=" + key , "cashreceipt", "top=116,left=252,width=398,height=350,menubar=0,status=0,toolbar=no,resize=0" );
   }

   // ¿ìÆí ¹øÈ£ °Ë»ö
   function fncGetZipCode() {
      window.open( "/common/pop/zip_pop.asp", "zipfind", "width=430, height=230, scrollbars=yes, statusbar=no" );
   }

   // ·Î±×ÀÎ Á¤º¸
   function fncSetLogin() {
		var objFrm = document.frmLogin;

		// ¾ÆÀÌµð È®ÀÎ
		if( !CheckBlank( objFrm.strID ) ) {
			alert( "¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä!" );
			ResetValue( objFrm.strID );
			return;
		}
		// ºñ¹Ð¹øÈ£ È®ÀÎ
		if( !CheckBlank( objFrm.strPWD ) ) {
			alert( "ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä!" );
			ResetValue( objFrm.strPWD );
			return;
		}

		objFrm.action = "/member/log_ins_ex.asp";
		objFrm.submit();
   }

   // ·Î±×¾Æ¿ô
   function fncSetLogout() {
      var flag = confirm( "Á¤¸» ·Î±× ¾Æ¿ô ÇÏ½Ã°Ú½À´Ï±î?" );

      if( flag ) {
         location.href = "/member/log_del_ex.asp";
      }
   }

   // ¸ðÀÇ°í»ç ¼ö°­±â·Ï
   function fncSetNclexRNTestStart(key, code) {
	   var flag = confirm( "ÀÌ¿ë½Ã ÁÖÀÇ »çÇ×\n\n1. ÇÑ¹ø ¹Û¿¡ ÀÀ½ÃÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.\n2. ¹®Á¦¸¦ skip ÇÏ°Å³ª, µÇµ¹¾Æ °¡¼­ ´äÀ» ¼öÁ¤ ÇÒ ¼ö ¾øÀ¸´Ï ´ä ¼±ÅÃ¿¡ ½ÅÁßÇÏ¼¼¿ä.\n3. ½Ã°£ Á¦ÇÑÀº 3½Ã°£ÀÔ´Ï´Ù. 3½Ã°£ÀÌ Áö³ª¸é ½ÃÇèÀº ÀÚµ¿ Á¾·áµË´Ï´Ù.\n\n½ÃÇè¿¡ ÀÀ½ÃÇÏ½Ã°Ú½À´Ï±î?" );

      if( flag ) {
         window.open( "/exam/testexam.asp?CookiesKeyId=" + key + "&ex_code=" + code , "exam", "width=800,height=430,toolbar=no" );
			//window.open( "http://www.nurscape.net/edu/testexam/testexam.asp?CookiesKeyId=" + key + "&ex_code=" + code , "exam", "width=800,height=430,toolbar=no" );
		}
   }

   // °Ë»ö
   function searchPage() {
      var objFrm = document.frmSearch;

      // °Ë»ö¹üÀ§ È®ÀÎ
      if( objFrm.strTerm.value == "" ) {
         alert( "°Ë»ö ¹üÀ§¸¦ ¼±ÅÃÇÏ¿© ÁÖ½Ê½Ã¿ä!" );
         objFrm.strTerm.focus();
         return;
      }
	   // °Ë»ö¾î È®ÀÎ
	   if( !CheckBlank( objFrm.strWord ) ) {
		   alert( "°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä!" );
		   ResetValue( objFrm.strWord );
		   return;
	   }

      objFrm.submit();
   }

   // º£³Ê ¿­±â
   function bannerOpen(ur,tn){
	   window.open("/common/pop/banner_count.asp?Url="+ ur +"&bn_idx="+ tn,"","");
   }
   function bannerOpen2(ur,tn){
	  document.location.href="/common/pop/banner_count.asp?Url="+ ur +"&bn_idx="+ tn;
   }

   // ÆäÀÌÁö ¸®·Îµå
   function reloadPage( page ) {
      location.href = page;
   }

	// ¸ðµç ¸µÅ© blur Àû¿ë
	function allblur() {
		for( i=0; i<document.links.length; i++ )
			document.links[i].onfocus = document.links[i].blur;
	}

   // ÀÌÀü±Ûº¸±â
   function fncGetPreContents() {
      var obj1 = window.trPreContents;
      var obj2 = window.divPreContents;

      // °¨Ãß±â ¼³Á¤
      if( obj1.style.display == "none") {
         obj1.style.display = "block";
         obj2.innerHTML = "¡ä ÀÌÀü±Û°¨Ãß±â";
      }
      else {
         obj1.style.display = "none";
         obj2.innerHTML = "¡â ÀÌÀü±Ûº¸±â";
      }
   }

   // À©µµ¿ì ·Îµå
   function fncGetWindowLoad() {
   }

   // À©µµ¿ì FOCUS
   function fncGetWindowFocus() {
   }

   // »ùÇÃ °­ÀÇ
   function fncViewLectureSample( ccode ) {
      var url;
      var u_key = frmLogin.intUserCheckKey.value;

      url = "http://www.nurscape.net/XinicsWeb/Viewer/eStream/default.asp?codeNumber=" + ccode + "&u_id=" + u_key + "&con_kind=N";
      window.open(url, "estream", "width=1014, height=739, scrollbars=no, resizable=no, menubar=no, top=0, left=0, fullscreen=no, statusbar=no");
   }
   
   // °­ÀÇ
   function fncViewLecture( ccode ) {
      var url;
      var u_key = frmLogin.intUserCheckKey.value;

      url = "http://www.nurscape.net/XinicsWeb/Viewer/eStream/default.asp?codeNumber=" + ccode + "&u_id=" + u_key ;
      window.open(url, "estream", "width=1014, height=739, scrollbars=no, resizable=no, menubar=no, top=0, left=0, fullscreen=no, statusbar=no");
   }

   // »ùÇÃ °­ÀÇ
   function fncViewLecture4Sample( ccode ) {
      var url;
      var u_key = frmLogin.intUserCheckKey.value;

      url = "http://www.nurscape.net/XinicsWeb/Viewer4/Viewer.asp?codeNumber=" + ccode;
      window.open(url, "estream4", "width=1014, height=610, scrollbars=no, resizable=no, menubar=no, top=0, left=0, fullscreen=no, statusbar=no,location=no");
   }   
   // °­ÀÇ
   function fncViewLecture4( ccode ) {
      var url;
      var u_key = frmLogin.intUserCheckKey.value;

      url = "http://www.nurscape.net/XinicsWeb/Viewer4/Viewer.asp?codeNumber=" + ccode + "&u_id=" + u_key ;
      window.open(url, "estream4", "width=1014, height=610, scrollbars=no, resizable=no, menubar=no, directories=no,location=no, top=0, left=0, fullscreen=no, statusbar=no");
   }   

   // RMP °­ÀÇ
   function fncViewRMPLecture( l_code, r_code, r_folder ) {
      if (r_code < 10) {
         r_code = "0" + r_code;
      }
      var id = frmLogin.intUserCheckKey.value;
      var url = "http://www.nurscape.net/xinicsweb/viewer/rmp/default.asp?id=" + id + "&l_code=" + l_code + "&r_code=" + r_code + "&r_folder=" + r_folder;

      w = window.open(url, "", "width=1010,height=670,left=0,top=0,directories=no");
      w.focus();
   }

   // eduspa °­ÀÇ
   function fncViewEduspaLecture( r_folder, r_no, memid, l_code, ordertype ) {
      var url = "/common/pop/eduspa_pop.asp?OpenCrsCode=" + r_folder + "&CrsCode=" + r_no + "&ID=" + memid + "&PlayerType=94&FileType=94&URLOrder=" + ordertype + "&CrsSecNo=" + l_code + "&AutoBookmark=0";

      w = window.open(url, "CrsPlay", "scrollbars=no,status=no,resizable=no,left=0,top=0,width=100,height=100");
      w.focus();
   }

   // ¿µ¾î °­ÀÇ
   function goYBMLecture( day_section, lev, step ) {
	   var url;

	   // °£È£½Ç¹« 1
	   if( step <= 3 ) {
		   url = "http://203.231.233.145/nov/nov_engnurse.asp?memberid=novnurscape&day_section="+ day_section +"&lev="+lev+"&step="+ step;
	   }
	   // °£È£½Ç¹« 2ÀÇ Step1
	   else if( step == 4 ) {
		   url = "http://cyber.ybmsisa.com/mycampus/engnurse2/intro.asp?lecture_num=1187677&day_section="+ day_section +"&typenum=1";
	   }
	   else if( step == 5 ) {
		   url = "http://cyber.ybmsisa.com/mycampus/engnurse2/intro.asp?lecture_num=1187678&day_section="+ day_section +"&typenum=1";
	   }
	   else if( step == 6 ) {
		   url = "http://cyber.ybmsisa.com/mycampus/engnurse2/intro.asp?lecture_num=1187679&day_section="+ day_section +"&typenum=1";
	   }

	   window.open(url, "_blank", "width=760, height=533, scrollbars=no, resizable=no, menubar=no, top=0, left=0, fullscreen=no");
   }

	// MS
	function mhHover(tbl, idx, cls) {
		var t = document.getElementById(tbl);
		if (t == null) return;
		var d = t.getElementsByTagName("TD");
		if (d == null) return;
		if (d.length <= idx) return;
		d[idx].className = cls;
	}

   // ¿©·¯ ´äÀÇ ¼±ÅÃ È®ÀÎ
   function getMultiAnswer( obj, str ) {
      var intTmp  = 0;

		for( var i=0; i<obj.length; i++ ) {
		   if( obj[i].checked ) {
		      intTmp = 1;
		   }
		}

		if( intTmp == 0 ) {
			alert( str );
			obj[0].focus();
			return false;
		}

      return true;
   }

   // ¼ýÀÚ¸¸ ÀÔ·Â
   function checkNo( obj, opt ) {
      var chk = "0123456789" + opt;
      var j   = 0;

      obj = eval(obj);

      for( var i=0; i<obj.value.length; i++ ) {
         if( chk.indexOf(obj.value.charAt(i)) == -1 ) {
            j = 1;
            break;
         }
      }

      if( j == 1 ) {
         if( opt != "" ) {
            alert( "¼ýÀÚ¿Í " + opt + "¸¸ ÀÔ·ÂÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù!" );
         }
         else {
            alert( "¼ýÀÚ¸¸ ÀÔ·ÂÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù!" );
         }
         obj.value = obj.value.substring( 0, obj.value.length-1 );
         obj.focus();
      }
   }

   // Æ¯¼ö¹®ÀÚ Á¦¿Ü
   function checkText( obj, opt ) {
      var chk = opt;
      var j   = 0;

      obj = eval(obj);

      for( var i=0; i<obj.value.length; i++ ) {
         if( !(chk.indexOf(obj.value.charAt(i)) == -1) ) {
            j = 1;
            break;
         }
      }

      if( j == 1 ) {
         if( opt != "" ) {
            alert( opt + " ¹®ÀÚ´Â ÀÔ·ÂÇÏ½Ç ¼ö ¾ø½À´Ï´Ù!" );
         }

         obj.value = obj.value.substring( 0, obj.value.length-1 );
         obj.focus();
      }
   }

	// ÁÖ¾îÁø ¹®ÀÚ¿­(str)ÀÇ °ø¹é Á¦°Å
	function RemoveBlank( str ) {
		var zero = String.fromCharCode(32); //blank(32) °ø¹é¹®ÀÚ¿­
		var temp = "", ch = "";

		for (i = 0; i < str.length; i++) {
			ch = str.charAt(i);

			if (ch == zero)
				continue;
			else
				temp += ch;
		}

		return temp;
	}

	// ´Ü¼ø °ø¹é ¿©ºÎ °Ë»ç
	function CheckBlank( obj ) {
		var str = RemoveBlank( obj.value );

		if( (parseInt(str.length) < 1) || (str == "undefined") )
			return false;
		else
			return true;
	}

	// °´Ã¼ÀÇ °ª(value)¸¦ ÃÊ±âÈ­ ÇÑ ÈÄ Æ÷Ä¿½º ÀÌµ¿
	function ResetValue( obj ) {
		obj.focus();
		obj.select();
	}

	// obj : ±æÀÌ¸¦ Ã¼Å©ÇÒ °³Ã¼, msg : ¹®ÀÚ¿­(err), lnum : ÃÖ¼Ò±æÀÌ
	function lencheck( obj,lnum ) {
		var temp = RemoveBlank( obj.value );
		obj = eval(obj);

		if( temp.length < lnum ) 
			return false; 
		else
			return true;
	}

	// Æ÷Ä¿½º ÀÌµ¿
	function MoveFocus( iLen, obj1, obj2 ) {
		if( obj1.length == iLen ) {
			obj2.focus();
		}
	}

   // ÁÖ¾îÁø ¹®ÀÚ¿­ÀÌ ºñ¾îÀÖ´ÂÁö °Ë»çÇÑ´Ù. 
   function CheckEmpty( str ) {
	   var chkstr = str + ""; 
	   var is_Space = true; 

	   if( ( chkstr == "") || (chkstr == null) )
         return false;
    
      for( j = 0; is_Space && j < chkstr.length; j++ ) {
         if( chkstr.substring(j, j+1) != " " )
            is_Space = false ;
	   } 

	   return is_Space; 
   }

   // ÁÖ¾îÁø ¹®ÀÚ¿­ÀÌ ¼ýÀÚ·Î¸¸ ÀÌ·ç¾îÁ®ÀÖ´ÂÁö °Ë»çÇÑ´Ù. 
   function CheckInteger( obj ) { 
	   if( !CheckEmpty( obj ) ) { 
		   for (j = 0; j < obj.length; j++) 
			   if (((obj.substring(j, j+1) < "0") || (obj.substring(j, j+1) > "9"))) 
				   return false;
	   }
	   else 
         return false; 

      return true; 
   }

   // ÀÌ¸ÞÀÏ ÀÎÁõ
   function CheckEmail( str ) { 
      var check1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; 
      var check2 = /^[a-zA-Z0-9\-\.\_]+\@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4})$/; 
     
      if ( !check1.test(str) && check2.test(str) ) { 
         return true; 
      }
      else { 
         return false; 
      }
   }

   // ÁÖ¹Îµî·Ï¹øÈ£ ÀÎÁõ
   function CheckJuminNo( str1, str2 ) { 
      var li_lastid,li_mod,li_minus,li_last; 
      var value0,value1,value2,value3,value4,value5,value6; 
      var value7,value8,value9,value10,value11,value12; 

      if( CheckInteger(str1) && CheckInteger(str2) ) { 
         li_lastid = parseFloat(str2.substring(6,7)); 
         value0  = parseFloat(str1.substring(0,1)) * 2; 
         value1  = parseFloat(str1.substring(1,2)) * 3; 
         value2  = parseFloat(str1.substring(2,3)) * 4; 
         value3  = parseFloat(str1.substring(3,4)) * 5; 
         value4  = parseFloat(str1.substring(4,5)) * 6; 
         value5  = parseFloat(str1.substring(5,6)) * 7; 
         value6  = parseFloat(str2.substring(0,1)) * 8; 
         value7  = parseFloat(str2.substring(1,2)) * 9; 
         value8  = parseFloat(str2.substring(2,3)) * 2; 
         value9  = parseFloat(str2.substring(3,4)) * 3; 
         value10 = parseFloat(str2.substring(4,5)) * 4; 
         value11 = parseFloat(str2.substring(5,6)) * 5; 
         value12 = value0 + value1 + value2 + value3 + value4 + value5 + 
         value6 + value7 + value8 + value9 + value10 + value11; 

         li_mod = value12 % 11; 
         li_minus = 11 - li_mod; 
         li_last = li_minus % 10; 

         if (li_last != li_lastid) { 
            return false; 
         } 
         else 
            return true; 
      } 
      else { 
         return false;
      }
   }

   // ÇÃ·¡½¬ ÆÄÀÏ ÀÛ¼º
   function embed_convert(s,d,w,h,t) {
      return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width="+w+" height="+h+" id="+d+"><param name=wmode value="+t+" /><param name=movie value="+s+" /><param name=quality value=high /><param name=menu balue=false><embed src="+s+" quality=high wmode="+t+" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+w+" height="+h+"></embed></object>";
   }
   function embed_write(str) {
	   document.write(str);
   }

	//ÆË¾÷ ÄíÅ° ¼³Á¤
   function setCookie( name, value, expiredays ) { 
      var todayDate = new Date(); 
      todayDate.setDate( todayDate.getDate() + expiredays ); 
      document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" 
   }
   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 openWindow( theURL, winName, features ) {
		var blnCookie = getCookie( winName );
		
		if( !blnCookie ) {
		   window.open( theURL, winName, features );
		}
	}
   // ¿©±â¼­ºÎÅÍ´Â ÆË¾÷·¹ÀÌ¾î
   function openLayer( winName ) {
	   var blnCookie	= getCookie( winName );
	   var obj			= eval( "window." + winName );

	   if( !blnCookie ) {
		   //obj.style.display = "block";
	   }
	   else {
		   //obj.style.display = "none";		
	   }
   }
   function closeLayer(winName, key) { 
      if( key == 1 )
	      setCookie( winName, "done" , 1); 

	   var obj = eval( "window." + winName );

	   obj.style.display = "none";
   }

	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_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 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_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_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_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_jumpMenu(targ,selObj,restore){ //v3.0
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
		if (restore) selObj.selectedIndex=0;
	}
	function MM_openBrWindow( theURL, winName, features) { //v2.0
		window.open( theURL, winName, features );
	}

	// ÇÚµåÆù Ã¼Å©
	function setMobileValue(obj) {
	   var obj = eval(obj);

	   obj.isMobileCheck.value = "N";
	}
	function checkMobileNo(obj, hp, page) {
	   window.open("/common/pop/pop_mobilechk.asp?strHP=" + hp + "&strObject=" + obj + "&strPage=" + page, "mobilechk", "width=420, height=440, scrollbars=no");
	}

	document.onfocusin = allblur;

   // ·Ñ¸µÀÌ¹ÌÁö
   var _dropinslideshowcount=0
   function dropinslideshow(imgarray, w, h, delay){
       this.id="_dropslide"+(++_dropinslideshowcount) //Generate unique ID for this slideshow instance (automated)
       this.createcontainer(parseInt(w), parseInt(h))
       this.delay=delay
       this.imgarray=imgarray
       var preloadimages=[]
       for (var i=0; i<imgarray.length; i++){
           preloadimages[i]=new Image()
           preloadimages[i].src=imgarray[i][0]
       }
       this.animatestartpos=parseInt(h)*(-1) //Starting "top" position of an image before it drops in
       this.slidedegree=5 //Slide degree (> is faster)
       this.slidedelay=40 //Delay between slide animation (< is faster)
       this.activecanvasindex=0 //Current "active" canvas- Two canvas DIVs in total
       this.curimageindex=0
       this.zindex=100
       this.isMouseover=0
       this.init()
   }
   dropinslideshow.prototype.createcontainer=function(w, h){
   document.write('<div id="'+this.id+'" style="position:relative; width:'+w+'px; height:'+h+'px; overflow:hidden">')
       document.write('<div style="position:absolute; width:'+w+'px; height:'+h+'px; top:0;"></div>')
       document.write('<div style="position:absolute; width:'+w+'px; height:'+h+'px; top:-'+h+'px;"></div>')
       document.write('</div>')
       this.slideshowref=document.getElementById(this.id)
       this.canvases=[]
       this.canvases[0]=this.slideshowref.childNodes[0]
       this.canvases[1]=this.slideshowref.childNodes[1]
   }
   dropinslideshow.prototype.populatecanvas=function(canvas, imageindex){
       var imageHTML='<img src="'+this.imgarray[imageindex][0]+'" style="border: 0" />'
       if (this.imgarray[imageindex][1]!="")
           imageHTML='<a href="'+this.imgarray[imageindex][1]+'" target="'+this.imgarray[imageindex][2]+'">'+imageHTML+'</a>'
       canvas.innerHTML=imageHTML
   }
   dropinslideshow.prototype.animateslide=function(){
       if (this.curimagepos<0){ //if image hasn't fully dropped in yet
           this.curimagepos=this.curimagepos+this.slidedegree
           this.activecanvas.style.top=this.curimagepos+"px"
       }
       else{
           clearInterval(this.animatetimer)
           this.activecanvas.style.top=0
           this.setupnextslide()
           var slideshow=this
           setTimeout(function(){slideshow.rotateslide()}, this.delay)
       }
   }
   dropinslideshow.prototype.setupnextslide=function(){
       this.activecanvasindex=(this.activecanvasindex==0)? 1 : 0
       this.activecanvas=this.canvases[this.activecanvasindex]
       this.activecanvas.style.top=this.animatestartpos+"px"
       this.curimagepos=this.animatestartpos
       this.activecanvas.style.zIndex=(++this.zindex)
       this.curimageindex=(this.curimageindex<this.imgarray.length-1)? this.curimageindex+1 : 0
       this.populatecanvas(this.activecanvas, this.curimageindex)
   }
   dropinslideshow.prototype.rotateslide=function(){
       var slideshow=this
       if (this.isMouseover)
           setTimeout(function(){slideshow.rotateslide()}, 50)
       else
           this.animatetimer=setInterval(function(){slideshow.animateslide()}, this.slidedelay)
   }
   dropinslideshow.prototype.init=function(){
       var slideshow=this
       this.populatecanvas(this.canvases[this.activecanvasindex], 0)
       this.setupnextslide()
       this.slideshowref.onmouseover=function(){slideshow.isMouseover=1}
       this.slideshowref.onmouseout=function(){slideshow.isMouseover=0}
       setTimeout(function(){slideshow.rotateslide()}, this.delay)
   }
