var old='';

function menu(name)
{
submenu=eval("submenu_"+name+".style");
		if(old!=submenu)
	{
		if(old!='')
		{
			old.display='none';
		}
		submenu.display='block';
		old=submenu;
	}
	else
	{
		submenu.display='none';
		old='';
	}
}

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.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_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_jumpMenu_form_NewWin(jForm,selObj,restore){ //v3.0
	jForm.target="NewLink"
	jForm.action=selObj.options[selObj.selectedIndex].value
	jForm.submit()
  if (restore) selObj.selectedIndex=0;
}

// ½Å±Ô ÇÃ·¡½Ã ¾×Æ¼ºê ÄÁÆ®·Ñ

function flash(AMovie, AWMode, AWidth, AHeight) {
 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + AWidth + '" height="' + AHeight + '">');
 document.write('<param name="movie" value="' + AMovie + '">');
 document.write('<param name="wmode" value="' + AWMode + '">');
 document.write('<embed src="' + AMovie + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + AWidth + '" height="' + AHeight + '"></embed>');
 document.write('</object>');
}

//Å¾¸Þ´º ½ºÅ©¸³Æ®

function cnjRol(id,after) { 
eval(id+'.filters.blendTrans.stop();'); 
eval(id+'.filters.blendTrans.Apply();'); 
eval(id+'.src="'+after+'";'); 
eval(id+'.filters.blendTrans.Play();'); 
} 

// µ¿¿µ»ó ¾×Æ¼ºê ÄÁÆ®·Ñ
function media(DMovie, DWidth, DHeight) {
 document.write('<embed src="' + DMovie + '" quality="high" showcontrols="0" AUTOSTART="1" enablecontextmenu="0" width="' + DWidth + '" height="' + DHeight + '"></embed>');
}

//È®Àå
function f_toggle(i) {
	menu=eval("document.all.menu"+i+".style"); 

	if (menu.display=="block") {
		menu.display="none"; 
	} else {
		menu.display="block"; 
	}
}


// ÇÏ´Ü ¼¿·ºÆ® ¹Ú½º
function showUtil()
{
    var bx = document.getElementById("vlink");
    if (bx.style.display == 'block') 
    {
        bx.style.display='none';
    }
    else
    {
        bx.style.display='block';
    }
}
function menuOn(imgEl) {
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}
 
function menuOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}

// °í¿ëº¸Çè È¯±ÞÁ¦µµ ¾È³» ÆË¾÷
   function newopen_info(){
	   //window.open('/site_share/etc/pop.htm','','status=no, width=766, height=600, scrollbars=yes');
	   location.href = "http://edu.inausacademy.com/etc/file/confile.zip";
   }

// ¿Â¶óÀÎ ¹®Á¦ÇØ°á ¸¶¹ý»ç
	function magicOpenWinddd(file,x,y) {
	var param='width='+x+',height='+y+',top='+(screen.height-y)/2+',left='+(screen.width-x)/2;
	popupWin = window.open(file, 'magic', 'toolbar=no,menubar=no,resizable=no,scrollbars=yes,'+param);
	popupWin.focus();
}

// Áß¼Ò±â¾÷Á÷¹«±³À° »õÃ¢
	function newopen_hrd(){
	  	window.open ("http://hrd.inausacademy.com/");
	}

// Áß¼Ò±â¾÷Á÷¹«±³À° »õÃ¢
	function newopen_hrd2(){
	  	window.open ("http://open.inausacademy.com/lecture/lec_year.asp?pageNum=1&subNum=10");
	}

// ¿¬¸»Á¤»ê¼¾ÅÍ »õÃ¢
	function newopen_year(){
	  	window.open ("http://open.inausacademy.com/year_new/main.asp");
	}

// ¹ýÀÎ°á»ê¼¾ÅÍ »õÃ¢
	function newopen_corp(){
//	  	alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.");
		window.open ("http://open.inausacademy.com/corp/corp_main.asp");
	}

// ¹ýÀÎ°á»ê¼¾ÅÍ »õÃ¢
	function newopen_corp2(){
		window.open ("http://open.inausacademy.com/lecture/lec_corporation.asp?pageNum=1&subNum=9");
	}
	
// ¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù!
	function alert_stop(){
	  	alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.");
	}

// ºñÁî¸¶½ºÅÍ(BSG) »õÃ¢
	function newopen_bsg(){
		window.open ("http://www.inausbsg.com/");
	}

// ¿¬¸»Á¤»ê¼¾ÅÍ ¾È³»¹®±¸
	function alert_leade(){
	  	alert("2011³â 1¿ù Áß °³¼³ÇÒ ¿¹Á¤ÀÔ´Ï´Ù.");
	}

// ¿¬¸»Á¤»ê¼¾ÅÍ ¾È³»¹®±¸
	function alert_leade2(){
	  	alert("2010³â 11¿ù 20ÀÏºÎÅÍ ¼­ºñ½º ¿¹Á¤ÀÔ´Ï´Ù.");
	}

// ¿¬¸»Á¤»ê¼¾ÅÍ ¾È³»¹®±¸
	function alert_leade3(){
	  	alert("11¿ù 7ÀÏ (¿ù) OPEN ¿¹Á¤!\n»õ·Ó°Ô ±¸¼ºµÇ´Â ¿¬¸»Á¤»ê¼¾ÅÍ¿¡ ¸¹Àº ¼º¿øÀ» ºÎÅ¹µå¸³´Ï´Ù.");
	}

// ÄÚ½º°­ÀÇ ¾È³» ¹®±¸
	function alert_courseInfo(){
	  	alert("¼ö°­½ÅÃ»ÀÌ Á¾·áµÈ ÄÚ½º°­ÁÂ ÀÔ´Ï´Ù.\nÀüÈ­(02-2232-1581)·Î ¹®ÀÇÇØÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù..");
	}


// ·Î±×ÀÎÆû
function loginchk() {
	if (document.frm_login.userid.value == "") {
		alert("È¸¿ø ¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä." );
		document.frm_login.userid.focus();
		return false;
	}
	if (document.frm_login.pwd.value == "") {
		alert("È¸¿ø ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä.");
		document.frm_login.pwd.focus();
		return false;
	}
	//document.frm_login.action = "https://www.inausacademy.com/site_share/member/mLoginProc.asp";
	document.frm_login.action = "/site_share/include/https_gateway_page.asp?targetURL=/site_share/member/mLoginProc.asp";
	return true;
}

// °­»çÁ¤º¸
function teacher_pop(no){
	window.open('/site_share/include/teacher_pop.asp?no='+no,'','status=no, width=516, height=550, scrollbars=yes')
}

// ¼¼ÀÌºê ÀåÇÐ±Ý Á¤º¸
function savePop(){
	window.open("/site_share/include/save_pop.asp","savePop","width=500, height=775, menubar=no, toolbar=no, location=no, status=no, scrollbars=no, resizable=no");
}


// Æû°ª Ã¼Å©
function chk_null(element,msg)
{
	var ele = frm.elements[element];

	if (ele.value == "")
	{
		alert(msg + "À»(¸¦) ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		ele.focus();
		return false;

	}

	return true;
}

// alert ¸àÆ®
function alert_m(no) { 
  if (no == '0') {alert('ÁØºñÁß ÀÔ´Ï´Ù...');}
  if (no == '1') {alert('·Î±×ÀÎ ÈÄ ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.');}
}

// ¿ìÆí¹øÈ£ Ã¢ ¶ç¿ì±â
function CheckZipCode(no) {
	window.open("/site_share/member/pop_add.asp?target="+no, "zipcode", "width=466,height=380,scrollbars=yes");
}

//°ø°³±³À° ¼ö°­ÀÚ Á¤º¸ º¸ÀÌ±â
function openMem(basket_no)	{	
	window.open('/site_share/mypage/viewMember.asp?basket_no=' + basket_no,'member','scrollbars=yes,width=680,height=300');
}


// Áß¼Ò±â¾÷ Á÷¹«±³À° - ÀÚºÎ´ã ÈÆ·Ãºñ¿ë
function expense_pop(){
   window.open('/hrd/hrd_expense_pop.asp','','status=no, width=300, height=164, scrollbars=no');
   }


// ÀÏ»çÃµ¸® ¿¢¼¿´Ù¿î·Îµå ¸®½ºÆ®
function excellist_pop(url){
   window.open('/include/excel_list_pop.asp?url='+url,'','status=no, width=360, height=230, scrollbars=no');
   }


/********************************************************************************************
** ÇÔ¼ö¼³¸í: 
** 1. Common.format ÇÔ¼ö´Â jSon Çü½ÄÀ¸·Î ¹ÞÀº object¸¦ ºÐ¼®ÇÏ¿© ÅäÅ«°ú ¸ÅÄªµÇ´Â°÷À» º¯°æÇÑ´Ù.
********************************************************************************************/
Common = {}

Common.format = function(text) {
    if (arguments.length <= 1) {
        return text;
    }
    var tokenCount = arguments.length - 2;
    for (var token = 0; token <= tokenCount; token++) {
        text = text.replace(new RegExp("\\{" + token + "\\}", "gi"),
                                                arguments[token + 1]);
    }
    return text;
}	


Common.queryString = function(name) {
    var q = location.search.replace(/^\?/, '').replace(/\&$/, '').split('&');
    for (var i = q.length - 1; i >= 0; i--) {
        var p = q[i].split('='), key = p[0], val = p[1];
        if (name.toLowerCase() == key.toLowerCase()) return val;
    }

    return "";
}
 


/* ÇÔ¼ö ¼³¸í : Windows open() ÇÔ¼ö */
function WinOpen(url, w, h, scroll) {
    
    var ww = (screen.availWidth - 10) / 2 - (w / 2);
    var hh = (screen.availHeight - 15) / 2 - (h / 2);
    var objWin = window.open(url, "Win_Open", "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars="+ scroll +",resizable=no,copyhistory=no,width=" + w + ",height=" + h + ",top=" + hh + ",left=" + ww);
    
    objWin.focus();
}
 
 /*
ÇÔ¼ö ¼³¸í: ³Ñ°Ü¹ÞÀº URL·Î »õÃ¢À» ¶ç¿î´Ù. 
*/
function openBlank(str){
	var openNewWindow = window.open("about:blank");
	openNewWindow.location.href = str;	
}
/*
ÇÔ¼ö ¼³¸í : ÀÔ·Â ¹ÞÀº String¿¡¼­ °ø¹éÀ» Á¦°ÅÇÏ´Â ÇÔ¼ö
ÀÔ·Â°ª : String
¸®ÅÏ°ª : String
*/
function trim(strs) { 	
	var count = strs.length;	
	var len = count;     
	var st = 0; 
             
	while ((st < len) && (strs.charAt(st) <= ' ')) { 
		st++; 
	}
	
	while ((st < len) && (strs.charAt(len - 1) <= ' ')) { 
		len--;
	}                 
	return ((st > 0) || (len < count)) ? strs.substring(st, len) : strs ;   
}

//========================= ¼­¹ö ÀÎÁõ¼­ ¾Á ½ºÅ©¸³Æ® ==========================
function vrsn_splash() {	
	u1 = "https://seal.verisign.com/splash?form_file=fdf/splash.fdf&dn=WWW.INAUSACADEMY.COM&lang=ko";	
	tbar = "location=yes,status=yes,resizable=yes,scrollbars=yes,width=560,height=500";
	sw = window.open(u1,'VRSN_Splash',tbar);
	sw.focus();
}
//===================================================================

/* 2011-07-06 ÇÑ¸¸°æ Ãß°¡
 * ¼ýÀÚ¸¸ ÀÔ·Â °¡´ÉÇÏ°Ô ÇÔ
 * onkeypress ÀÌº¥Æ®¿¡ Àû¿ë : ime-mode¸¦ ¹Ýµå½Ã disabled·Î ¼³Á¤ÇØ¾ß ÇÔ.
 * ¿¹) style="ime-mode:disabled" onkeypress="onlyNumber()"
 */
function onlyNumber(plus_keycode)
{
	if (plus_keycode == ""){
		if( window.event.keyCode >= 48 && window.event.keyCode <= 57) {
		} else {
			window.event.keyCode = "";
		}
	}else{
		if( (window.event.keyCode >= 48 && window.event.keyCode <= 57) || window.event.keyCode == plus_keycode ) {
		} else {
			window.event.keyCode = "";
		}
	}
}

