var num_of_cats = 4; 
var open_in_newwindow=1; // 1 ÀÏ¶© »õÃ¢¿¡¼­ ¸µÅ©, 0 ÀÏ¶© ÇöÀç Ã¢¿¡¼­ ¸µÅ©
var option_array = new Array(num_of_cats);
option_array[0] = new Array(":: ¼±ÅÃÇÏ¼¼¿ä ::"); 
option_array[1] = new Array(":: ¼±ÅÃÇÏ¼¼¿ä ::","ÀÇÁ¤ºÎÃ»¿î","ºÎÆò¼¼Á¾Ã»¿î","ºÎÃµYJÇÐ¿ø","±¸¸®Ã»¿îÇÐ¿ø","¼ö¿øYJÇÐ¿ø","¾È¾ç/±ºÆ÷ÇÐ¿ø","¾È»ê¼öµµÇÐ¿ø");
option_array[2] = new Array(":: ¼±ÅÃÇÏ¼¼¿ä ::","Ã»ÁÖÃ»¿îÇÐ¿ø");
option_array[3] = new Array(":: ¼±ÅÃÇÏ¼¼¿ä ::","´ëÀüÃ»¿îÇÐ¿ø");
option_array[4] = new Array(":: ¼±ÅÃÇÏ¼¼¿ä ::","´ë±¸Ã»¿îÇÐ¿ø","´ë±¸°ñµçÅ°","±¸¹ÌÃ»¿îÇÐ¿ø");
option_array[5] = new Array(":: ¼±ÅÃÇÏ¼¼¿ä ::","ºÎ»êÃ»¿îÇÐ¿ø","±èÇØÃ»¿îÇÐ¿ø","¸¶»êÃ»¿îÇÐ¿ø");
option_array[6] = new Array(":: ¼±ÅÃÇÏ¼¼¿ä ::","ÀüÁÖÃ»¿îÇÐ¿ø","ÀÍ»êÃ»¿îÇÐ¿ø");
option_array[7] = new Array(":: ¼±ÅÃÇÏ¼¼¿ä ::","±¤ÁÖÃ»¿îÇÐ¿ø","¼øÃµÃ»¿îÇÐ¿ø","¸ñÆ÷Ã»¿îÇÐ¿ø");

var url_array = new Array(num_of_cats);
url_array[0] = new Array("#"); // ±âº» ÀÌ°÷Àº ¼öÁ¤ ¾ÈÇÏ¼Åµµ µË´Ï´Ù. "#".
url_array[1] = new Array("#","http://www.cwpass.co.kr/","http://www.sjgum.co.kr/","http://www.eyj.or.kr/","http://gumjung.com/","http://www.yjace.com/","http://www.gumjungkr.com/","http://www.ansnasudo.ce.ro/");
url_array[2] = new Array("#","http://gumjung.com/");
url_array[3] = new Array("#","http://www.blacktest.Com/");
url_array[4] = new Array("#","http://www.cwgosi.com/","http://www.gkey.co.kr/","http://www.cw-ac.net/");
url_array[5] = new Array("#","http://www.chungwoon.net/","http://www.khcw.co.kr/index.htm","http://www.wd-academy.com/index.htm");
url_array[6] = new Array("#","http://www.studyschool.net/","http://www.studyschool.net/");
url_array[7] = new Array("#","http://www.edkor.co.kr/","http://www.cwkc.net","http://www.gosimokpo.net");
function switch_select() {
	var f = window.document.cnjform;
	for (loop = f.cnj_sel_2.options.length-1; loop > 0; loop--) {
		f.cnj_sel_2.options[loop] = null;
	}

	for (loop = 0; loop < option_array[f.cnj_sel_1.selectedIndex].length; loop++) {
		f.cnj_sel_2.options[loop] = new Option(option_array[f.cnj_sel_1.selectedIndex][loop]);
	}
	f.cnj_sel_2.selectedIndex = 0;
}

function box() {
	var f = window.document.cnjform;
	if (f.cnj_sel_2.selectedIndex == 0) {
		alert("Áö¿ª ¹× ÇÐ¿øÀ» ¼±ÅÃÇØÁÖ¼¼¿ä!!");
	} else {
		if (open_in_newwindow==1) {
			window.open(url_array[f.cnj_sel_1.selectedIndex][f.cnj_sel_2.selectedIndex],"_blank");
		} else {
			window.location=url_array[f.cnj_sel_1.selectedIndex][f.cnj_sel_2.selectedIndex]
		}
	}
}

function set_orig() {
	var f = window.document.cnjform;
	f.cnj_sel_1.selectedIndex = 0;
	f.cnj_sel_2.selectedIndex = 0;
}
window.onload=set_orig

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_jumpMenu2(selObj,restore){ //v3.0
 if (selObj.options[selObj.selectedIndex].value != '') {
  url=(selObj.options[selObj.selectedIndex].value);
  window.open(url, 'win1');
  if (restore) selObj.selectedIndex=0;
 }
}