//<![CDATA[

document.write('<script type=\"text/javascript\" src=\"/common/femco/script/calendar.js\"></script>');
document.write('<script type=\"text/javascript\" src=\"/common/femco/script/prototype.js\"></script>');
document.write('<script type=\"text/javascript\" src=\"/common/femco/script/rolling_banner.js\"></script>');
document.write('<script type=\"text/javascript\" src=\"/common/femco/script/scroll.js\"></script>');
document.write('<script type=\"text/javascript\" src=\"/common/femco/script/popup.js\"></script>');
document.write('<script type=\"text/javascript\" src=\"/common/femco/script/quick.js\"></script>');

//	화면 축소 확대
	var nowZoom = 100; // 현재비율
	var maxZoom = 500; // 최대비율(500으로하면 5배 커진다)
	var minZoom = 100; // 최소비율

	// +, - 키를 입력하면 화면 확대, 축소를 한다.
	document.onkeypress = getKey;

	function getKey(keyStroke) {
	isNetscape = (document.layers);
	eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
	which = String.fromCharCode(eventChooser).toLowerCase();
	which2 = eventChooser;

	var el = event.srcElement;

	if ((el.tagName != "INPUT") && (el.tagName != "TEXTAREA")) {
		if (which == "+") {
			zoomIn();
			} else if (which == "-") {
				zoomOut();
			}
		}
	}

	//화면 키운다.
	function zoomIn() {
		if (nowZoom < maxZoom) {
			nowZoom += 5; //5%씩 커진다.
		} else {
			return;
		}

		document.body.style.zoom = nowZoom + "%";
	}

	//화면 줄인다.
	function zoomOut() {
	if (nowZoom > minZoom) {
		nowZoom -= 5; //5%씩 작아진다.
		} else {
			return;
		}

		document.body.style.zoom = nowZoom + "%";
	}



//	onerror
window.onerror = function(ErrorMessage, Url, Line)
{
	window.status = 'Error: ' + ErrorMessage + ' : ' + Line + ' Line';
	window.status = '';
	return true;
}



//-----------------------------------------------------------------------------
// MM_swapImgRestore
//-----------------------------------------------------------------------------

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.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 showhidelayers() { //v6.0
	var i,p,v,obj,args=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; }
}


//-----------------------------------------------------------------------------
// restore_img_src
//-----------------------------------------------------------------------------

function restore_img_src(name, nsdoc)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
	return;
if (img && img.altsrc) {
	img.src    = img.altsrc;
	img.altsrc = null;
}
}

function preload_img()
{
var img_list = preload_img.arguments;
if (document.preloadlist == null)
	document.preloadlist = new Array();
var top = document.preloadlist.length;
for (var i=0; i < img_list.length-1; i++) {
	document.preloadlist[top+i] = new Image;
	document.preloadlist[top+i].src = img_list[i+1];
}
}

function change_img_src(name, nsdoc, rpath, preload)
{
var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
if (name == '')
	return;
if (img) {
	img.altsrc = img.src;
	img.src    = rpath;
}
}



//-----------------------------------------------------------------------------
// 교육정보 자료검색
//-----------------------------------------------------------------------------

	var bool = 1;

	function qValue(value)
	{
		bool = value;
	}

	function searchDOM(obj)
	{
		var url = "";
		with(obj){
			if(search.value == ""){
				alert("검색어를 입력하세요.");
				search.focus();
				return false;
			}
			if(bool == 1){
				 url = "http://www.edunet4u.net/tsearch/globalSearch.do?cityschl=cityschl&schurl=http%3A%2F%2F122.203.3.124%2Fver01%2Fedusearch.htm&schdata_no=11011&groups=&org_cd=SVCZ000001&data_no=11011&seq_no=1&mode+value%3D=&channel=teacher&category=&groupcategory=&search_re=&gubun=tsearch&searchWord="+search.value;
			}else{
				url = "http://www.edunet4u.net/ssearch/globalSearch.do?cityschl=cityschl&schurl=http%3A%2F%2F122.203.3.124%2Fver01%2Fedusearch.htm&schdata_no=11011&groups=&org_cd=SVCZ000001&data_no=11011&seq_no=1&mode+value%3D=&channel=student&category=&groupcategory=&search_re=&gubun=ssearch&searchWord="+search.value;
			}
		}
		window.open(url,"searchDOM","width=920,height=650,toolbar=no,location=no,directories=no,status=1,menubar=no,scrollbars=yes,resizable=yes");
		return false;
	}



//-----------------------------------------------------------------------------
// 미래의 직업의 세계
//-----------------------------------------------------------------------------

function goSearchIfrm(){
     var f=document.msearch;
	 if ( f.srchKey.value  == "")   {
		alert(" 검색어를 넣어주세요!");
		f.srchKey.focus();
		return;
	}

	var url = "http://www.career.go.kr/career/data/fusion2009/school_search_window02.html?searchkey=";
	url = url + document.msearch.srchKey.value.toUpperCase();
	url = url + "&field=0&mode=2";
	 window.open( url,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes ,width=930,height=600');
}



//-----------------------------------------------------------------------------
// 로그인
//-----------------------------------------------------------------------------

	function mLcheckVar(){
		if(!document.layerPopup_form.userID.value){
			alert('아이디를 입력해 주십시오.');
			document.layerPopup_form.userID.focus();
			return false;
		}
		if(!document.layerPopup_form.password.value){
			alert('비밀번호를 입력해 주십시오.');
			document.layerPopup_form.password.focus();
			return false;
		}
		return true;
	}



//-----------------------------------------------------------------------------
// 윈도우 오픈
//-----------------------------------------------------------------------------

function open_window(name, url, 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';
		cookie_str = document.cookie;
		cookie_str.toString();
		pos_start  = cookie_str.indexOf(name);
		pos_start  = cookie_str.indexOf('=', pos_start);
		pos_end    = cookie_str.indexOf(';', pos_start);
		if (pos_end <= 0) pos_end = cookie_str.length;
		cookie_val = cookie_str.substring(pos_start + 1, pos_end);
		if (cookie_val  == "done")
		return;
		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);
	}



//-----------------------------------------------------------------------------
// 메인에 탭메뉴(공지사항, 질문&답변)
//-----------------------------------------------------------------------------

	function Timg_change(T,cnt){ // 공지탭 바꾸기
	for(var i = 1; i <= cnt; i++) {
		img = document.getElementById('T'+i);
		img.src = "/board/listSkin/skin01/tab_img/tab0"+i+"_off.gif";
		eval("document.all.TAB"+i+".style.display = 'none'");
		eval("document.all.MORE"+i+".style.display = 'none'")

		if ( T == i ) {
			img.src = "/board/listSkin/skin01/tab_img/tab0"+i+"_on.gif";
			eval("document.all.TAB"+i+".style.display = ''");
			eval("document.all.MORE"+i+".style.display = ''");
		}
	}
	}

	function Qimg_change(Q,cnt){ // 장착점
	for(var i = 1; i <= cnt; i++) {
		img = document.getElementById('Q'+i);
		img.src = "/common/skin01/images/banner/quick0"+i+"_off.gif";
		eval("document.all.MENU"+i+".style.display = 'none'");

		if ( Q == i ) {
			img.src = "/common/skin01/images/banner/quick0"+i+"_on.gif";
			eval("document.all.MENU"+i+".style.display = ''");
		}
	}
	}



//-----------------------------------------------------------------------------
// 하단 셀렉트 메뉴 및 마우스 오른쪽 클릭 제어
//-----------------------------------------------------------------------------

var workWin;
var TempTranCode = '';
//var secuCtlCheck = false;
var secuCtlCheck = true;

function nomenu(){
	return false;
}
function hidestatus()
{
	window.status='';
	return true;
}
//document.oncontextmenu = nomenu;  //오른쪽마우스클릭
document.onmouseover=hidestatus;  //상태바제어
document.onmouseout=hidestatus;   //상태바제어

if(top.cibtop){
	if(top.cibtop.layerPopupfo){
		if(top.cibtop.layerPopupfo.length > 0){
			alert(top.cibtop.layerPopupfo);
			top.cibtop.layerPopupfo = "";
		}
	}
}



//-----------------------------------------------------------------------------
// 하단 셀렉트 메뉴 및 마우스 오른쪽 클릭 제어
//-----------------------------------------------------------------------------

//전체페이지 탑의 select(combo)
function showcombo(what){
	if (what.style.display=='')
		what.style.display='none';

	else if (what.style.display=='none')
		what.style.display='';
}


function showcombo2(what){
	if (what.style.display=='')
		what.style.display='none';

	else if (what.style.display=='none')
		what.style.display='';
}



//-----------------------------------------------------------------------------
// 인풋 자동넘김
//-----------------------------------------------------------------------------

	var isNN = (navigator.appName.indexOf("Netscape")!=-1);
	function autoTab(input,len, e) {
	var keyCode = (isNN) ? e.which : e.keyCode;
	var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
	if(input.value.length >= len && !containsElement(filter,keyCode)) {
	input.value = input.value.slice(0, len);
	input.form[(getIndex(input)+1) % input.form.length].focus();
	}
	function containsElement(arr, ele) {
	var found = false, index = 0;
	while(!found && index < arr.length)
	if(arr[index] == ele)
	found = true;
	else
	index++;
	return found;
	}
	function getIndex(input) {
	var index = -1, i = 0, found = false;
	while (i < input.form.length && index == -1)
	if (input.form[i] == input)index = i;
	else i++;
	return index;
	}
	return true;
	}



//-----------------------------------------------------------------------------
// 메뉴가 플래시 일 경우
//-----------------------------------------------------------------------------
	/****** 메인 메뉴 링크 *****************/
	function menu1() { location.href = "/1/1.php"; }
	function menu2() { location.href = "/2/2.php"; }
	function menu3() { location.href = "/3/3.php"; }
	function menu4() { location.href = "/4/4.php"; }
	function menu5() { location.href = "/5/5.php"; }


	/******* 샘플1 링크 *****************/
	function menu1sub1() { location.href = "/1/1.php"; }
	function menu1sub2() { location.href = "/1/2.php"; }
	function menu1sub3() { location.href = "/1/3.php"; }
	function menu1sub4() { location.href = "/1/4.php"; }
	function menu1sub5() { location.href = "/1/5.php"; }

	/******* 샘플2 링크 *****************/
	function menu2sub1() { location.href = "/2/1.php"; }
	function menu2sub2() { location.href = "/2/2.php"; }
	function menu2sub3() { location.href = "/2/3.php"; }
	function menu2sub4() { location.href = "/2/4.php"; }
	function menu2sub5() { location.href = "/2/5.php"; }

	/******* 샘플3 링크 *****************/
	function menu3sub1() { location.href = "/3/1.php"; }
	function menu3sub2() { location.href = "/3/2.php"; }
	function menu3sub3() { location.href = "/3/3.php"; }
	function menu3sub4() { location.href = "/3/4.php"; }
	function menu3sub5() { location.href = "/3/5.php"; }


	/******* 샘플4 링크 *****************/
	function menu4sub1() { location.href = "/4/1.php"; }
	function menu4sub2() { location.href = "/4/2.php"; }
	function menu4sub3() { location.href = "/4/3.php"; }
	function menu4sub4() { location.href = "/4/4.php"; }
	function menu4sub5() { location.href = "/4/5.php"; }

	/******* 샘플5 링크 *****************/
	function menu5sub1() { location.href = "/5/1.php"; }
	function menu5sub2() { location.href = "/5/2.php"; }
	function menu5sub3() { location.href = "/5/3.php"; }
	function menu5sub4() { location.href = "/5/4.php"; }
	function menu5sub5() { location.href = "/5/5.php"; }


	function FlashMainbody(Ftrans,wid,hei,Skin) {
		mainbody = "<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='"+ wid +"' height='"+ hei +"'>";
		mainbody += "<param name='movie' value='/common/"+ Skin +"/swf/"+ Ftrans +"'>";
		mainbody += "<param name='quality' value='high'>";
		mainbody += "<param name='wmode' value='transparent'>";
		mainbody += "<param name='menu' value='false'>";
		mainbody += "<embed src='/common/"+ Skin +"/swf/"+ Ftrans +"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+ wid +"' height='"+ hei +"' wmode='transparent'></embed>"
		mainbody += "</object>";

		//document.body.innerHTML = mainbody;
		document.write(mainbody);
		return;
	}


/* 추가(2008. 09. 20) */


//-----------------------------------------------------------------------------
// 플래시 삽입
//-----------------------------------------------------------------------------

function swfprint(furl,fwidth,fheight,transoption, Id) {
	if (Id) {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+ fwidth +'" height="' + fheight +'" align="top" id="'+Id+'">');
	} else {
		document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+ fwidth +'" height="' + fheight +'" align="top">');
	}
	document.write('<param name="movie" value="'+ furl +'"/>');
	document.write('<param name="allowScriptAccess" value="always"/>');
	if (transoption == "t") {
		document.write('<param name="wmode" value="transparent"/>');
	} else if (transoption == "o") {
		document.write('<param name="wmode" value="opaque"/>');
	} else if (transoption == "w") {
		document.write('<param name="wmode" value="window"/>');
	}
	document.write('<!-- Hixie method -->');
	document.write('<!--[if !IE]> <-->');
	document.write('<object type="application/x-shockwave-flash" allowScriptAccess="always" align="top" data="'+ furl +'" width="'+ fwidth +'" height="' + fheight +'"');
	if (transoption == "t") {
		document.write(' wmode="transparent"');
	} else if (transoption == "o") {
		document.write(' wmode="opaque"');
	}
	if (Id) {
		document.write(' id="'+Id+'"');
	}
	document.write('></object>');
	document.write('<!--> <![endif]-->');
	document.write('</object>');
}


//-----------------------------------------------------------------------------
// 코멘트 접기,펴기-펼침
//-----------------------------------------------------------------------------

  function folder(commentObject){
	img = document.getElementById('commmentFolder');
	if(commentObject.className != "none"){
		  img.src = "/board/images/emo/spread_icon.gif";
		commentObject.className = "none";
	}
	else{
	  img.src = "/board/images/emo/fold_icon.gif";
	  commentObject.className = "show";
	}
  }


//-----------------------------------------------------------------------------
// 팝업 - 새창 중앙으로 띄우기
//-----------------------------------------------------------------------------

	function popup_center(name, url, width, height, scrollbar, resizeble, menubars){
		x = (screen.availWidth - width) / 2;
		y = (screen.availHeight - height) / 2;
		window.open(url, name, 'width='+width+', height='+height+', left='+x+', top='+y+',scrollbars='+scrollbar+',resizable='+resizeble+',menubars='+menubars);
	}

/* 추가(2000. 00. 00) */
//-----------------------------------------------------------------------------
// 탑으로
//-----------------------------------------------------------------------------
	function gotop() {
		window.scrollTo(0,0);
	}


//-----------------------------------------------------------------------------
// 메인 컨텐츠 접기,펴기-펼침
//-----------------------------------------------------------------------------

	function folder2(contentsObject, contentsObject2){
		if(contentsObject.className != "none"){
			contentsObject.className = "none";
			contentsObject2.className = "show";
		}
		else{
			contentsObject.className = "show";
			contentsObject2.className = "none";
		}
	}


//-----------------------------------------------------------------------------
// 하단 셀렉트 링크
//-----------------------------------------------------------------------------

	function GoUrl(f)
	{
		s_index = f.step.selectedIndex;
		s_url = f.step[s_index].value;
		if(s_url != "")
		{
			window.open(s_url);
		}

		return false;
	}


//-----------------------------------------------------------------------------
// 메인탭관련
//-----------------------------------------------------------------------------
function initTabMenu1(tabContainer1ID) {
	var tabContainer1 = document.getElementById(tabContainer1ID);
	var tabAnchor = tabContainer1.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tabbtn1")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer1;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" o", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer1.first)
		tabContainer1.first.onclick();
}

function initTabMenu2(tabContainer2ID) {
	var tabContainer2 = document.getElementById(tabContainer2ID);
	var tabAnchor = tabContainer2.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tabbtn2")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer2;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		thismenu.onclick = function tabMenuClick() {
			currentmenu = this.container.current;
			if (currentmenu == this)
				return false;

			if (currentmenu) {
				currentmenu.targetEl.style.display = "none";
				if (currentmenu.imgEl) {
					currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
				} else {
					currentmenu.className = currentmenu.className.replace(" o", "");
				}
			}
			this.targetEl.style.display = "";
			if (this.imgEl) {
				this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
			} else {
				this.className += " on";
			}
			this.container.current = this;

			return false;
		};

		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	if (tabContainer2.first)
		tabContainer2.first.onclick();
}


/* 플래시 처리 */	
function vod_param(fURL,wid,hei) {
document.write("<OBJECT id=oMediaPlayer codeBase='' width='"+wid+" height='"+hei+"'  classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 name=oMediaPlayer VIEWASTEXT>");
document.write("<PARAM NAME='URL' VALUE='"+fURL+"'>");
document.write("<PARAM NAME='TRANSPARENTATSTART' VALUE='1'>");
document.write("<PARAM NAME='ANIMATIONATSTART' VALUE='0'>");
document.write("<PARAM NAME='defaultFrame' VALUE='content'>");
document.write("<PARAM NAME='uiMode' VALUE='none'>");
document.write("<PARAM NAME='autoStart' VALUE='true'>");
document.write("<PARAM NAME='enableContextMenu' VALUE='false'>");
document.write("<PARAM NAME='fullScreen' VALUE='false'>");
document.write("<PARAM NAME='ShowPositonControls' VALUE='0'>");
document.write("<PARAM NAME='showstatusbar' VALUE='1'>");
document.write("<PARAM NAME='enabled' VALUE='True'>");
document.write("<PARAM NAME='stretchToFit' VALUE='true'>");
document.write("<PARAM NAME='volume' VALUE='30'>");
document.write("<PARAM NAME='PLAYCOUNT' VALUE='0'>");
document.write("</OBJECT>");
}


//]]>




//-----------------------------------------------------------------------------
// 레이어팝업창
//-----------------------------------------------------------------------------
var cc=0
function showHide(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="block";
    } else {
        cc=0
        document.getElementById(id).style.display="none";
    }
}

