
function Img(n,tog){eval("document.m"+n+".src=m"+n+"_"+tog+".src"); } //ÀÌ¹ÌÁö ·Ñ¿À¹ö
function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no') } //Popup(½ºÅ©·Ñ¹Ù¾øÀ½)
function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(½ºÅ©·Ñ¹ÙÀÖÀ½)

//ÇÏÀÌÆÛ¸µÅ©
function home(){location.href="/index.asp";} //
// SSL Àû¿ë¿¡ µû¸¥ º¯°æ 2006.12.22 
//function login(){window.open('/join/pop_login.asp','login','width=440,height=295,scrollbars=no');} //·Î±×ÀÎ 
function login(){location.href="/join/login.asp";} //·Î±×ÀÎ
function sitemap(){location.href="/etc/sitemap.asp";} //»çÀÌÆ®¸Ê
function logout(){location.href="/common/logout.asp";} // ·Î±×¾Æ¿ô
function privacy(){window.open('/etc/pop_privacy.asp','privacy','width=565,height=550,scrollbars=yes');} // °³ÀÎÁ¤º¸º¸È£Á¤Ã¥

/* 1. µµ¼­¾È³»*/
u1="../aboutus/";

		/*µµ¼­¾È³» > °íµîµµ¼­*/
u11="../aboutus/ShowArticle.asp?ArticleID=48";
u111="/book/high/high_series.asp?sn=1";
u112="/book/high/high_series.asp?sn=2";
u113="/book/high/high_series.asp?sn=3";
u114="/book/high/high_series.asp?sn=4";
u115="/book/high/high_series.asp?sn=5";
u116="/book/high/high_series.asp?sn=6";
u117="/book/high/high_series.asp?sn=7";
u118="/book/high/high_series.asp?sn=8";
u119="/book/high/high_series.asp?sn=9";
u1110="/book/high/high_series.asp?sn=10";
u1111="/book/high/high_series.asp?sn=11";
u1112="/book/high/high_series.asp?sn=12";
u1113="/book/high/high_series.asp?sn=13";
u1114="/book/high/high_series.asp?sn=14";
u1115="/book/high/high_series.asp?sn=15";
u1116="/book/high/high_series.asp?sn=16";
u1117="/book/high/high_series.asp?sn=17";
u1118="/book/high/high_series.asp?sn=18";
u1119="/book/high/high_series.asp?sn=19";
u1120="/book/high/high_series.asp?sn=20";
u1121="/book/high/high_series.asp?sn=21";

		/*µµ¼­¾È³» > Áßµîµµ¼­*/
u12="/aboutus/ShowArticle.asp?ArticleID=54";
u121="/book/middle/middle_series.asp?sn=1";
u122="/book/middle/middle_series.asp?sn=2";
u123="/book/middle/middle_series.asp?sn=3";
u124="/book/middle/middle_series.asp?sn=4";
u125="/book/middle/middle_series.asp?sn=5";

		/*µµ¼­¾È³» > ÃÊµîµµ¼­*/
u13="/aboutus/ShowClass.asp?ClassID=27";
u131="/book/elementary/elementary_series.asp?sn=1";

		/*µµ¼­¾È³» > ¼±»ý´Ôµµ¼­*/
u14="/book/teacher/teacher.asp";
u141="/book/teacher/teacher_series.asp?sn=1";
u142="/book/teacher/teacher_series.asp?sn=2";
u143="/book/teacher/teacher_series.asp?sn=3";

		/*µµ¼­¾È³» > µµ¼­¼­Æò*/
u15="/book/review/review.asp";
u151="/book/review/review.asp";	
u152="/book/review/review_best.asp";

u18="/book/searchstore.asp";	// °¡±î¿î °÷¿¡ ÁÁÀºÃ¥ µµ¼­°¡ ¾ø´Ù¸é

/* 2. µµ¼­ÀÚ·á/Áú¹® , Ãß°¡:2006.01.02 */
u8="../wzjs/ShowArticle.asp?ArticleID=36";	/*µµ¼­ÀÚ·á, Áú¹® ¸ÞÀÎ (mp3) */

u81="/wzjs/ShowArticle.asp?ArticleID=36";	/*µµ¼­ÀÚ·á/Áú¹® > µµ¼­Áú¹®¹æ */
u811="/book/question/question.asp?sn=1";	
u812="/book/question/question.asp?sn=2";	
u813="/book/question/question.asp?sn=3";	
u814="/book/question/question.asp?sn=4";	
u815="/book/question/question.asp?sn=5";	

u82="/wzjs/ShowArticle.asp?ArticleID=59"; /*µµ¼­ÀÚ·á/Áú¹® > µµ¼­ÀÚ·á½Ç */
u821="/book/data/mp3.asp";	
u822="/book/data/solution.asp";	
u823="/book/data/etc.asp";	
u83="/book/proposal/proposal.asp"; /*µµ¼­ÀÚ·á/Áú¹® > µµ¼­Á¦¾È */

		/*µµ¼­ÀÚ·á/Áú¹® > µµ¼­¿À·ù ¹Ù·ÎÀâ±â , Ãß°¡:2006.02.13 */
u84 ="/book/data/false.asp"	// default : Á¤¿ÀÇ¥
u841 ="/book/data/false.asp"	// Á¤¿ÀÇ¥
u842 ="/book/data/error.asp"	// ¿À·ù½Å°íÇÏ±â

/* 3. ½Å»ç°í½ºÄð*/
u2="/shop/";
u21="/school/up/today.asp";
u211="/school/up/today.asp";
u212="/school/up/last.asp";
u213="/school/up/false.asp";
u214="/school/up/record.asp";
u22="/school/listening/today.asp";
u221="/school/listening/today.asp";
u222="/school/listening/last.asp";
u23="/Shop/ShowClass.asp?ClassID=31";
u24="/Shop/ShowClass.asp?ClassID=30";
u25="/school/essaytest/essaytest.asp";
//u26="/school/edunews/edunews.asp";

/* 4. ¿¡µàÄûÁî*/
u3="../wzxs/ShowNew.asp";
u31="/wzxs/ShowClass.asp?ClassID=17";
u32="/wzxs/ShowClass.asp?ClassID=18";
u33="/wzxs/ShowClass.asp?ClassID=19";
u34="/wzxs/ShowClass.asp?ClassID=20";
u35="/quiz/ranking/ranking.asp";
u36="/quiz/setquiz/setquiz.asp";


/* 5. ¿¡µàÁö½ÄQ&A*/
u4="../alzs/ShowNew.asp";
u41="/knowledge/about/about.asp?cid=knowledge";
u42="/knowledge/db.asp";
u43="";

/*¿ì¸®¹Ý¾ÅÄ¶¸°´õ
u5="/calendar/index.asp";
u51="/calendar/about/about.asp?cid=calendar";
u52="/calendar/best/best.asp";
u53="/calendar/shop/shop.asp";
*/

/* 6. ½Å»ç°íÄ«Æä*/
u6="../Article/";
u61="/Article/ShowClass.asp?ClassID=5";
u611="/cafe/entrance/entrance.asp";
u612="/cafe/entrance/studynote.asp?sn=2";
u613="/cafe/entrance/studynote.asp?sn=3";
u614="/cafe/entrance/free.asp?cid=1";
u615="/cafe/entrance/free.asp?cid=2";
u616="/cafe/entrance/fighting.asp";
u617="/cafe/entrance/member.asp";
u618="/cafe/entrance/member6_recruit.asp";
		// ²Ü´ÜÁö
u62="/Article/ShowClass.asp?ClassID=5";
u621="/cafe/exhibition/last.asp";
u622="/cafe/exhibition/last2/prize.asp";
u623="/cafe/exhibition/last3/intro.asp";
u624="/cafe/exhibition/join.asp";
u63="/Article/ShowClass.asp?ClassID=1";

u64="/Article/ShowClass.asp?ClassID=4";

u65="/Article/ShowClass.asp?ClassID=28";

u66="/Article/ShowClass.asp?ClassID=29";
u671="/cafe/power/power.asp?cid=4";
u672="/cafe/power/power.asp?cid=5";
u673="/cafe/power/power.asp?cid=8";
u674="/cafe/power/power.asp?cid=1";
u675="/cafe/power/power.asp?cid=7";
u676="/cafe/power/power.asp?cid=3";
u677="/cafe/power/power.asp?cid=9";


/* 7. ½Ì¾ÅÀÌº¥Æ®*/
u7="../aboutus/ShowArticle.asp?ArticleID=51";
u71="/event/fortunecookie/fortunecookie.asp";
u711="/event/fortunecookie/fortunecookie.asp";
u72="/event/auction/auction.asp";
u721="/event/auction/auction.asp";
u722="/event/auction/auction2.asp";
u73="/event/mall/mall.asp";
u74="/event/share/share.asp";
u741="/event/share/share.asp";
u742="/event/share/share01.asp";
u743="/event/share/share02.asp";
u744="/event/share/share03.asp";
u75="/event/schoollove/schoollove.asp";
u76="/event/prize/prize.asp";
u77="/event/tomyteacher/tomyteacher.asp";


/*¸¶ÀÌ½Å»ç°í*/
u02="/index.asp";
u021="/my/helper/bestbook.asp";
u0211="/my/helper/bestbook.asp";
u0212="/my/helper/scrap.asp";
u0213="/my/helper/counsel.asp";
u022="/my/secretary/myssing.asp";
u0221="/my/secretary/myssing.asp";
u0222="/my/secretary/fortunecookie.asp";
u0223="/my/secretary/auction.asp";
u0224="/my/secretary/mymsg.asp";
u0225="/my/secretary/inquiry.asp";
u0226="/my/secretary/mall.asp";		//¾Å¸ô½ÅÃ»Á¶È¸
//u0227="/my/secretary/mypromotion.asp";	// ÀÌº¥Æ® ´çÃ· ³»¿ª Á¶È¸

u023="/HappyTime/Order/OrderDeliveryResult.asp"; // ÇØÇÇÅ¸ÀÓ
u0231="/HappyTime/Order/OrderDeliveryResult.asp"; // ÇØÇÇÅ¸ÀÓ > ÁÖ¹®¹è¼ÛÁ¶È¸
u0232="/HappyTime/MyPage.asp"; // ÇØÇÇÅ¸ÀÓ > ¸¶ÀÌÆäÀÌÁö

u024="/my/dream/dream.asp";
u025="/join/join_input.asp?act=edit";
u026="/join/withdraw.asp";

u723=u0223; //¸¶ÀÌ¾Å°æ¸Å´Â ¸¶ÀÌ½Å»ç°í ÆäÀÌÁö·Î ÀÌµ¿
u712=u0222; //ÀÌº¥Æ® ¸¶ÀÌÆ÷ÃáÄíÅ°´Â ¸¶ÀÌ½Å»ç°í¿¡ ¸¶ÀÌÆ÷ÃáÄíÅ°·Î ÀÌµ¿

/*°í°´¼¾ÅÍ*/
u03="../wzjs/ShowArticle.asp?ArticleID=36";
u031="/customer/qsearch/qsearch.asp";
u032="/customer/qna/qna.asp";
u033="/customer/news/news.asp";
u034=u81;//µµ¼­Áú¹®¹æ
u035=u82;//µµ¼­ÀÚ·á½Ç
//u034=u15;//µµ¼­Áú¹®¹æ
//u035=u16;//µµ¼­ÀÚ·á½Ç
u036=u18;//

u037="/customer/ssystem/ssystem.asp";	// ¾Å¾Å¾Å½Ã½ºÅÛ

/*ÁÁÀºÃ¥¼Ò°³*/
u04="../wzjs/ShowArticle.asp?ArticleID=57";
u041="/company/index.asp";
u0411="/company/history.asp";
u0412="/company/contact.asp";

u042="/company/fam_01.asp";
u0421="/company/fam_01.asp";
u0422="/company/fam_02.asp";
u0423="/company/fam_03.asp";
u0424="/company/fam_04.asp";

u043="/company/ad.asp";
u0431="/company/ad.asp";
u0432="/company/news.asp";
u044="/company/recruit.asp";

/*È¸¿ø°¡ÀÔ*/
u05="/join/join.asp";
u051="/join/join.asp";
u052="/join/searchid.asp";
u053="/join/searchpw.asp";

/*¼±»ý´Ô°ø°£*/
u06="/teacher/index.asp";
u061="/teacher/data/data.asp";
u062="/teacher/free/free.asp";
u063="/teacher/correct/correct.asp";
u064="/teacher/favorites/favorites.asp";
u065="/teacher/fortunecookie/fortunecookie.asp";
u066="/book/searchstore.asp";

u07="/wzjs/ShowArticle.asp?ArticleID=55";


function getCookie(Name) {
	var search = Name + "=";
	var cookies = unescape(document.cookie);
	if (document.cookie.length > 0) {
	offset = cookies.indexOf(search);

	if (offset != -1) {
	offset += search.length;
	end = cookies.indexOf(";", offset);

	if (end == -1) end = cookies.length;
	return cookies.substring(offset, end);
	}
	else return false;
	}

	else return false;
}

function link(){ //link(1,2)
	
	var depth = arguments.length;
	switch(depth){
		case 0:
			return;
			break;
		case 1:
			url = eval("u"+arguments[0]);
			break;
		case 2:
			url = eval("u"+arguments[0]+arguments[1]);
			break;
		case 3:
			url = eval("u"+arguments[0]+arguments[1]+arguments[2]);
			break;
		case 4:
			url = eval("u"+arguments[0]+arguments[1]+arguments[2]+arguments[3]);
			break;
	}

	if(url == u21 || url == u211 || url == u212 || url == u213 || url == u214 || url == u22 || url == u221 || url == u222){
			if(getCookie("u_id")==""){
				alert("·Î±×ÀÎÀ» ¾ÈÇÏ¼Ì³×¿ä.\r\n\r·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ÆäÀÌÁö ÀÔ´Ï´Ù.");
				b_login.userid.focus();
			}else{
				parent.location.href=url;
			}
	}else{
		parent.location.href=url;
	}
/*
if (arguments[0]=="5" && arguments[1] =="5") {
			window.open('/cyberpr/mania/living/living.jsp','living','width=765,height=570,scrollbars=no');
			return;
		}
*/
}

/*°Ô½ÃÆÇ¸®½ºÆ®*/
function listover(obj){ obj.className="listover";}
function listout(obj){obj.className="listout";}

/*µµ¿ò¸»·¹ÀÌ¾î*/
var overnum = 0;
var prevnum = 0;
function showLayer(num){
	var sub="";
	overnum = num;
	if(prevnum){
		sub = eval("document.all.sub"+prevnum);
		sub.style.display = "none";
	}
	prevnum = num;
	sub = eval("document.all.sub"+num);
	//sub.style.top = event.clientY+5;
	sub.style.top = event.clientY + document.body.scrollTop - 90;
	sub.style.left = event.clientX+5-70;
	sub.style.display = "block";
}
function hideLayer(num){
	if(overnum=="0"){
		sub = eval("document.all.sub"+num);
		sub.style.display = "none";
	}
}

/* Marquee Stop&Start */
function MarqStop(chk) {
notimarq.stop();
return;
}

function MarqStart(chk)
{
notimarq.start();
return;
}

//·¹ÀÌ¾îº¸ÀÌ±â
var overnum = 0;
var prevnum = 0;
function showDiv(num){
	var sub="";
	overnum = num;
	if(prevnum){
		sub = eval("document.all.sub"+prevnum);
		sub.style.display = "none";
	}
	prevnum = num;
	sub = eval("document.all.sub"+num);
	sub.style.display = "block";
}

//Select Box
function setSelectBox(selName){
	sel = eval("document.all."+selName);

	borderColor = sel.bordercolor;
	selWidth = parseInt(sel.width);
	bgColor = sel.bgcolor;
	rectLeft = selWidth-2;
	spanWidth = selWidth;

	//span tag
	header  = "<span style='position:relative;margin-right:0px;";
	header += "width:"+spanWidth+";height:18px;border:1px solid "+borderColor+";background-color:"+bgColor+";'>\n";
	header += "<span style='position: absolute;left:0px;top:-2px;";
	header += "width:"+selWidth+";height:17px;clip:rect(2,"+rectLeft+",18,2);'>\n";
	footer = "</span></span>";

	sel.style.backgroundColor = bgColor;
	sel.style.width = selWidth;

	sel.outerHTML = header+sel.outerHTML+footer;
}


/*¶ó¿îµåÅ×ÀÌºí*/
function roundTable(objID) {
       var obj = document.getElementById(objID);
       var Parent, objTmp, Table, TBody, TR, TD;
       var bdcolor, bgcolor, Space;
       var trIDX, tdIDX, MAX;
       var styleWidth, styleHeight;

       // get parent node
       Parent = obj.parentNode;
       objTmp = document.createElement('SPAN');
       Parent.insertBefore(objTmp, obj);
       Parent.removeChild(obj);

       // get attribute
       bdcolor = obj.getAttribute('rborder');
       bgcolor = obj.getAttribute('rbgcolor');
       radius = parseInt(obj.getAttribute('radius'));
       if (radius == null || radius < 1) radius = 1;
       else if (radius > 6) radius = 6;

       MAX = radius * 2 + 1;

       /*
              create table {{
       */
       Table = document.createElement('TABLE');
       TBody = document.createElement('TBODY');

       Table.cellSpacing = 0;
       Table.cellPadding = 0;

       for (trIDX=0; trIDX < MAX; trIDX++) {
              TR = document.createElement('TR');
              Space = Math.abs(trIDX - parseInt(radius));
              for (tdIDX=0; tdIDX < MAX; tdIDX++) {
                     TD = document.createElement('TD');

                     styleWidth = '1px'; styleHeight = '1px';
                     if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
                     else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
                     else if (radius > 2) {
                            if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
                            if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
                     }

                     if (styleWidth != null) TD.style.width = styleWidth;
                     if (styleHeight != null) TD.style.height = styleHeight;

                     if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
                     else if (tdIDX > Space && Space < MAX - tdIDX - 1)  TD.style.backgroundColor = bgcolor;

                     if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
                     TR.appendChild(TD);
              }
              TBody.appendChild(TR);
       }

       /*
              }}
       */

       Table.appendChild(TBody);

       // insert table and remove original table
       Parent.insertBefore(Table, objTmp);
}


function blur() {//ÀüÃ¼ ¸µÅ© Blur
for (i = 0; i < document.links.length; i++)
if(document.links[i].name!="focus")
document.links[i].onfocus = document.links[i].blur;
}
window.onload=blur;


	//°³ÀÎ ¾ÅÄ¶¸°´õ ¿ÀÇÂ
	function win_open2(id, c, url, name, w, h){
		if(id == ""){
			alert("·Î±×ÀÎÀ» ÇÏÁö ¾ÊÀ¸¼Ì³×¿ä\n\n·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ÆäÀÌÁöÀÔ´Ï´Ù.")
			document.b_login.userid.focus();
			return;
		}
		if(c == '0'){
			alert("°¡ÀÔÇÑ ¹ÝÀÌ ¾ø½À´Ï´Ù")
			return;
		}
		if (c=='Y'){
			alert("ÀÌ¹Ì °¡ÀÔÇÑ ¹ÝÀÌ ÀÖ½À´Ï´Ù")
			return;
		}
		pop(url, name, w, h)
	}


function download(fname){
	window.open("/common/download.asp?file1="+fname,"filedownload","width=1,height=1,top=100000,left=100000");
}

function trim(inputString) {
		var retValue = inputString;
		var ch = retValue.substring(0, 1);
		while (ch == " ") {
			retValue = retValue.substring(1, retValue.length);
			ch = retValue.substring(0, 1);
		}
		ch = retValue.substring(retValue.length-1, retValue.length);
		while (ch == " ") {
		  retValue = retValue.substring(0, retValue.length-1);
		  ch = retValue.substring(retValue.length-1, retValue.length);
		}
	   while (retValue.indexOf("  ") != -1) { 
		  retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
	   }
		return retValue; 
	}


//ÆË¾÷Ã¢ ½ºÅ©¸³Æ® - ½ºÅ©·Ñ¹Ù ¾ø´Â °Í
function popwindow(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	window.open(url,"","toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";")
}

//ÆË¾÷Ã¢ ½ºÅ©¸³Æ® - ½ºÅ©·Ñ¹Ù ÀÖ´Â °Í
function popwindow2(pop,width,height)
{
	var url = pop;  
	var wd = width;
	var he = height;
	
	window.open(url,"","toolbar=0,menubar=0,scrollbars=yes,resizable=no,width=" + wd +",height=" + he + ";")
}


//eBook ½ÇÇà À§ÇÑ ÀÚ¹Ù½ºÅ©¸³Æ® 

function show(url,_width,_height) 
{ 
     if(window.clientInformation.userAgent.indexOf("SV1")>0){        //--WindowXP SP2°¡ ¼³Ä¡µÈ È¯°æ¿¡¼­ÀÇ ¼¼ÆÃÀÔ´Ï´Ù.
     newWin = window.open(url,"","toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no width=1024 height=768 top=0 left=0");
     newWin.moveTo(0,0);

     left1=(screen.availWidth-1024-5)/2;          //--1024X768 ÇØ»óµµ¿¡¼­ÀÇ eBook Popup Ã¢ÀÇ °¡·Î Áß¾Ó À§Ä¡¸¦ ÁöÁ¤.
     top1=(screen.availHeight-768-10)/2; //--1024X768 ÇØ»óµµ¿¡¼­ÀÇ eBook Popup Ã¢ÀÇ ¼¼·Î Áß¾Ó À§Ä¡¸¦ ÁöÁ¤.
                                //À§ 1024, 768 ÀÇ Á¶Á¤À¸·Î Ã¢ÀÌ ³ªÅ¸³ª´Â À§Ä¡¸¦ Á¶Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.
            
     newWin.resizeTo(1024,768);
     newWin.moveTo(left1,top1);

    }else{                        //--Windows XP SP2 °¡ ¼³Ä¡µÈ È¯°æÀ» Á¦¿ÜÇÑ È¯°æ
       if(screen.width==_width&&screen.height==_height) { 
           window.open(url,"","fullscreen"); 
                           window.open(url,"","fullscreen"); 
         } else { 
           left1=(screen.availWidth-1024-5)/2; 
           top1=(screen.availHeight-768-10)/2;       
     window.open(url,"","toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no width=1024 height=768 top="+top1+" left="+left1); 
              }
        }
}						
//-->					
//  eBook ½ÇÇà À§ÇÑ ÀÚ¹Ù½ºÅ©¸³Æ® /

