//·Ñ¿Àºê ÇÔ¼ö
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_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_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_showHideLayers() { //v3.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 top2menuView(a) //2????????
{
	if(this.id){
		eidStr = this.id;
		eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length);
		a = parseInt(eidNum);
	}
	top2menuHideAll();
	top1Menu = document.getElementById("top1m"+a);
	top2Menu = document.getElementById("top2m"+a);
	if(a<10){ann='0'+a;} else {ann=''+a;}
	if (a==0) { //?????2????O.-??o~-????
	} else {
		if (top1Menu) {
			//top1Menu.getElementsByTagName("img")[0].src="../images/2009/top_menu_"+parseInt(ann)+"_on.gif";
			if (top2Menu) { 
				top2Menu.style.display = 'inline';
				}
		}
	}
}
function top2menuHide(a) //2?????????
{
	if(this.id){
		eidStr = this.id;
		eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length);
		a = parseInt(eidNum);
	}
	//top2menuHideAll();
	top1Menu = document.getElementById("top1m"+a);
	top2Menu = document.getElementById("top2m"+a);
	top1MenuCurr = document.getElementById("top1m"+d1n);
	top2MenuCurr = document.getElementById("top2m"+d1n);
	if(a<10){ann='0'+a;} else {ann=''+a;}
	if (top1Menu) {
		//top1Menu.getElementsByTagName("img")[0].src="../images/2009/top_menu_"+parseInt(ann)+"_out.gif";
		if (top2Menu) { top2Menu.style.display = 'none'; }
		
		if (top1MenuCurr) {
			//top1MenuCurr.getElementsByTagName("img")[0].src = "../images/2009/top_menu_"+parseInt(d1nn)+"_on.gif";
		}
		
		if (top2MenuCurr) { 
			top2MenuCurr.style.display = 'inline';
		}
	}
}

function top2menuHideAll() //2???????????
{
	top1menuEl = document.getElementById("top1menu").childNodes;
	for (i=1;i<=top1menuEl.length;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		if(i<10){inn='0'+i;} else {inn=''+i;}
		if (top1Menu) {
			//top1Menu.getElementsByTagName("img")[0].src="../images/2009/top_menu_"+parseInt(inn)+"_out.gif";
			if (top2Menu) { top2Menu.style.display = 'none'; }
		}
	}
}

function initTopMenu(d1,d2) {
	d1n = d1;
	d2n = d2;
	d1nn = (d1n<10) ? '0'+d1n : d1n;
	d2nn = (d2n<10) ? '0'+d2n : d2n;
 	var topmenu = document.getElementById("topmenu");
	//if(topmenu) topmenu.style.background = "url(/img/inc/topmenu/top"+d1nn+"_menubg.gif) no-repeat";
 	top1menuEl = document.getElementById("top1menu").childNodes;
	
	for (i=1;i<=top1menuEl.length;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		if (top1Menu) {
			top1Menu.onmouseover = top1Menu.onfocus = top2menuView;
			top1Menu.onmouseout = top2menuHide;
			if (top2Menu) { 
				top2Menu.onmouseover = top2Menu.onfocus = top2menuView;
				top2Menu.onmouseout = top2menuHide;
			}
		}
	}
	top2MenuCurrAct = document.getElementById("top2m"+d1n+"m"+d2n);
	if (top2MenuCurrAct) {
		//top2MenuCurrAct.getElementsByTagName('a')[0].className = "active";
		top2MenuCurrAct.getElementsByTagName("a")[0].style.color="#000000";
	  top2MenuCurrAct.getElementsByTagName("a")[0].style.fontWeight="bold";
	}
	top2menuHide(d1);
}


function displayOver() {
	this.style.display = 'block';
}

function displayOut() {
	this.style.display = 'none';
}

function displayLanguage() {
	var languageObj = document.getElementById('languageUi');
	if(!languageObj) return false;
	var languageImg = languageObj.getElementsByTagName('img')[0];
	var languageDiv = document.getElementById('languageUi_select');
	languageImg.onclick = function() {
		if(languageDiv.style.display == 'block') languageDiv.style.display = 'none';
		else languageDiv.style.display = 'block';
		return false;
	}	
	languageDiv.onmouseover = displayOver;
	languageDiv.onmouseout = displayOut;
}


function totalAllMenuDisplay(pdivID) {
	var chkdisplay = document.getElementById(pdivID).style.display;
	if (chkdisplay=="none") {
		displayOn(pdivID);
	} else {
		displayOff(pdivID);
	}
}

//#ÀüÃ¼¸Þ´ºº¸±â

function totalAllMenuDisplay(pdivID, id) {
	var chkdisplay = document.getElementById(pdivID).style.display;
	if (chkdisplay=="none") {
		displayOn(pdivID);
		//id.innerHTML = "ÀüÃ¼¸Þ´º´Ý±â";
	} else {
		displayOff(pdivID);
		//id.innerHTML = "ÀüÃ¼¸Þ´ºº¸±â";
	}
}

// º¸ÀÌ±â°¨Ãß±â
//ex) displayOff('idName','idName'); displayOn('idName','idName'); //ÀÎ¼ö °³¼ö¿¡ »ó°ü¾ø´Ù.
function displayOn() {
	var i,j,a=displayOn.arguments;
	for(i=0;i<a.length;i++) {
		obj = document.getElementById(a[i]);
		if (obj) { obj.style.display = "block"; }
	}
}

function displayOff() {
	var i,j,a=displayOff.arguments;
	for(i=0;i<a.length;i++) {
		obj = document.getElementById(a[i]);
		if (obj) { obj.style.display = "none"; }
	}
}

//±×·¡ÇÈ ¸ðµå
function InfoDisPlay(idName){
  var obj = document.getElementById(idName);
  var obj2 = document.getElementById('info_img1');
  var obj3 = document.getElementById('info_img2');
  var obj4 = document.getElementById('info_img3');
  var obj5 = document.getElementById('info_img4');
  if(obj.style.display == "none"){
    obj.style.display = "block";
    obj2.style.display = "none";
    obj3.style.display = "block";
	obj4.style.display = "none";
    obj5.style.display = "block";

  }
  else if(obj.style.display == "block"){
    obj.style.display = "none";
    obj2.style.display = "block";
    obj3.style.display = "none";
	obj4.style.display = "block";
    obj5.style.display = "none";
  }
}

//ÅØ½ºÆ® ¸ðµå
function InfoDisPlay2(idName){
  var obj = document.getElementById(idName);
  if(obj.style.display == "none"){
    obj.style.display = "block";
  }
  else if(obj.style.display == "block"){
    obj.style.display = "none";
  }
}

//-->


// ¿ÞÂÊ¸Þ´º ÀüÃ¼º¸±â
function pageMenuAll(kk){
  var obj = document.getElementById('page_1depm').getElementsByTagName('ol');
  var j=0;
  
  for(i=0;i<obj.length;i++){
    if(obj[i].className == "page_2depm"){
      if(obj[i].style.display == "none"){
        obj[i].style.display = "block";
        j++;
      }
      else{
        if(i == kk){
          obj[i].style.display = "block";
          j++;
        }
        else{
          obj[i].style.display = "none";
          j--;
        }
      }
    }
  }
  
  var obj3 = document.getElementById('menuAll');  
  if(j > 0){
    obj3.src = "2009/menu_view_btn_close.gif";
  }
  else{
    obj3.src = "2009/menu_view_btn.gif";
  }
}

function pageMenuAll2(kk){
  var obj = document.getElementById('page_1depm').getElementsByTagName('ol');
  var j=0;
  
  for(i=0;i<obj.length;i++){
    if(obj[i].className == "page_2depm"){
      if(obj[i].style.display == "none"){
        obj[i].style.display = "block";
        j++;
      }
      else{
        if(i == kk){
          obj[i].style.display = "block";
          j++;
        }
        else{
          obj[i].style.display = "none";
          j--;
        }
      }
    }
  }
  
  
  var obj3 = document.getElementById('menu_text');
  if(j > 0){
    obj3.innerHTML = "¸Þ´º ´Ý±â";
  }
  else{
    obj3.innerHTML = "¸Þ´ºÆîÃÄº¸±â";
  }
}



//Æò°¡ÆäÀÌÁö DISPLAY
function ratingDisplay(id){
  var obj = eval("document.getElementById('"+id+"')");
  if(obj.style.display == "none"){
    obj.style.display = "block";
  }
  else{
    obj.style.display = "none";
  }
}

/* Select Go */
function goSelectUrl(num){
			var obj = document.getElementById('select'+num);
			if(obj.value == '' || obj.value == 'total'){
			}else{
				window.open(obj.value);
			}
}

// »õÃ¢¶çÀ§±â
<!--
var win1Open = null

function displayImage(picName, windowName, windowWidth, windowHeight){
return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20) + ",height=" + (parseInt(windowHeight)+15)) 
}

function winClose(){
if(win1Open != null) win1Open.close() 
}

function doNothing(){}
//-->

<!-- 
function displayImage(picName, windowName, windowWidth, windowHeight){
var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
if(winHandle != null){
var htmlString = "<html><head><title>Picture</title></head>" 
htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"
htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=Ã¢´Ý±â></a>"
htmlString += "</body></html>"
winHandle.document.open()
winHandle.document.write(htmlString)
winHandle.document.close()
} 
if(winHandle != null) winHandle.focus()
return winHandle
}
//-->

//ÅÇ±â´É¿¡ ¸¶¿ì½º ¿À¹ö±â´É
b = 0;									
function gongover(a,ulID) {	//a : ¿À¹ö ¹øÈ£  ulID : °¨½Î´Â UL ¾ÆÀÌµð
  img_el = document.getElementById(ulID).getElementsByTagName("img")
	for (j = 0; j < img_el.length; j++) {
		if (a == j) {
			if(a != b){
			img_el.item(j).src = img_el.item(j).src.replace("_out.gif", "_on.gif");
			b = a;
			}
		}else{
			img_el.item(j).src = img_el.item(j).src.replace("_on.gif", "_out.gif");
		}
	}
}

c = 0;									
function groupover(d,ulID) {	//a : ¿À¹ö ¹øÈ£  ulID : °¨½Î´Â UL ¾ÆÀÌµð
  img_el = document.getElementById(ulID).getElementsByTagName("img")
	for (j = 0; j < img_el.length; j++) {
		if (d == j) {
			if(d != c){
			img_el.item(j).src = img_el.item(j).src.replace("_out.gif", "_on.gif");
			c = d;
			}
		}else{
			img_el.item(j).src = img_el.item(j).src.replace("_on.gif", "_out.gif");
		}
	}
}


//¸ÞÀÎ ÅÇ¸®½ºÆ®
function ListOver2(upno,listname,cnt){
  var moreTarget = "moreTarget";
  for(i=0;i<=cnt;i++){
    document.getElementById(listname + i).style.display = "none";
    document.getElementById(moreTarget + i).style.display = "none";
  }
  document.getElementById(listname + upno).style.display = "block";
  document.getElementById(moreTarget + upno).style.display = "block";
}

//¸ÞÀÎ Áñ°ÜÃ£´Â ¸Þ´º ¼³Á¤
function InfoSetting(infoNo){
  for(i=1;i<=3;i++){
	  var obj = eval("document.getElementById('info_list_"+i+"')");
		if(i == infoNo){
		  obj.style.display = "block";
		}
		else{
		  obj.style.display = "none";
		}
	}
}

//°øÁö»çÇ×,ÀÚÁÖ¾²´Â¸Þ´º ¸®½ºÆ® ¿À¹ö±â´É
var boardSelected = 1;
function ListOver(upno,listname) {
  document.getElementById(listname + boardSelected).style.display = "none";
  document.getElementById(listname + upno).style.display = "block";
  boardSelected = upno;
}

var groupSelected = 1;
function GroupOver(board,listname) {
  document.getElementById(listname + groupSelected).style.display = "none";
  document.getElementById(listname + board).style.display = "block";
  groupSelected = board;
}
var searchSelected = 1;
function SearchOver(board,listname) {
  document.getElementById(listname + searchSelected).style.display = "none";
  document.getElementById(listname + board).style.display = "block";
  searchSelected = board;
}


//±ÛÀÚÅ©±â 
//ex) onclick="setFontSize(+1);"	 onclick="setFontSize(-1);"
function setFontSize(a) {
	var defaultFontSize = 1;//em
	var minFontSize = 1;//em
	var maxFontSize = 2;//em
	obj = document.getElementById("contents");
	var objFontSize = obj.style.fontSize;
	if (!objFontSize) { objFontSize = parseFloat(defaultFontSize)+"em"; }
	var checkFontSize = (Math.round(12*parseFloat(objFontSize))+(a*2))/12;
	if (checkFontSize >= maxFontSize) { checkFontSize = maxFontSize; obj.style.fontSize = checkFontSize+"em"; alert("´õÀÌ»ó ´Ã¸± ¼ö ¾ø½À´Ï´Ù."); }
	else if (checkFontSize <= minFontSize) { checkFontSize = minFontSize; obj.style.fontSize = checkFontSize+"em"; alert("´õÀÌ»ó ÁÙÀÏ ¼ö ¾ø½À´Ï´Ù."); }
	else { obj.style.fontSize = checkFontSize+"em"; }
//	alert(checkFontSize);
}


//------------------- SWF Á¦¾îÇÔ¼ö ½ÃÀÛ

function SWFLoader() {
	var obj = new String;
	var parameter = new String;
	var embed = new String;
	
	var classId = new String;
    var codeBase = new String;
	var pluginSpage = new String;
	var embedType = new String;	
	var allParameter = new String;	
	
	var src = new String;
	var width = new String;
	var height = new String;
	var id = new String;
	var layer = new String;
	var arg = new String;
	var altText = new String;
	var wmode = new String;

	this.init = function ( w, h, s, a) {
		width = w; //³ÐÀÌ
		height = h; //³ôÀÌ
		src = s; //ÆÄÀÏ°æ·Î
		arg = a; // ¸Å°³º¯¼ö
		wmode = 'transparent'; //¸ðµå¼³Á¤

		classId = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
		codeBase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0';
		pluginSpage = 'http://www.macromedia.com/go/getflashplayer';
		embedType = 'application/x-shockwave-flash';

		parameter += "<param name='allowScriptAccess' value='always'>\n";
		parameter += "<param name='allowFullScreen' value='false'\n>";
		parameter += "<param name='movie' value='"+ s + "'>\n";
		parameter += "<param name='quality' value='high'>\n";
		parameter += "<param name='base' value='.'>\n";
		parameter += "<param name='FlashVars' value='"+a+"'>\n";
	}
	
	

	//ÇÃ·¡½Ã ¿ÀºêÁ§Æ® ¿É¼Ç¼³Á¤
	this.parameter = function ( param, value ) {
		 parameter += "<param name='"+param +"' value='"+ value + "'>\n";
	}

	// ÇÃ·¡½Ã wmode ¼³Á¤ setFlash.wmode('window')
	this.wmode = function ( value ) {
		wmode = value;
	}

	// ÇÃ·¡½Ã ¾ÆÀÌµð ¼³Á¤
	this.id = function ( value ) {
		id = value;
	}
	
	// ÇÃ·¡½Ã ´ëÃ¼ÅØ½ºÆ® ¼³Á¤
	
	this.alt = function ( value ) {
		altText = value;
	}

	// ÇÃ·¡½Ã »ðÀÔ ·¹ÀÌ¾î ¼³Á¤
	this.layer = function ( value ) {
		if(value == undefined) {
			layer = "";
		} else {
			layer = value;
		}
	}

	this.show = function () {
		obj = '<object id="'+id+'" width="'+width+'" height="'+height+'" classid="'+classId+'" codebase="'+codeBase+'">\n'+
			parameter +
			'<param name="wmode" value="'+wmode+'">\n'+
			'<!--[if !IE]>-->\n' +
			'<object type="application/x-shockwave-flash" data="' + src + '" width="' + width + '" height="' + height + '" name="' + id + '">\n' +
				parameter +
				'<param name="wmode" value="'+wmode+'">\n'+
			'<!--<![endif]-->\n' +
				'<div class="alt-content alt-' + id + '">' + altText + '</div>\n' +
			'<!--[if !IE]>-->\n' +
			'</object>\n' +
			'<!--<![endif]-->\n' +
		'</object>';

		if(layer == "") {
			document.write(obj);
		}else{
			var div = document.getElementById( layer);
			div.style.display = "";
			div.innerHTML = obj;
		}
	}
}

function hideSWFLayer( div) {
	var div = document.getElementById( div);
	div.style.display = "";
	div.innerHTML = "";
}

function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	}
	else {
		return document[movieName];
	}
 }

 function callExternalInterface(movieId) {
    thisMovie(movieId).moveMc();	
}
//------------------- SWF Á¦¾îÇÔ¼ö ³¡


// ÇÁ¸°Æ® ÇÔ¼ö
function printpage() {

  var url;
  var envwin;
  envwin = "width=697,height=400,menubar=1,resizable=1,scrollbars=1,status=1";

  tm = window.open("","printform",envwin)
  tm.document.open();

  tm.document.write("<html><head><title>ÇÁ¸°Æ® ÇÏ±â</title>");
	tm.document.write("<link rel='stylesheet' type='text/css' href='/_yc/common/css/sub.css' />");
	tm.document.write("</head>");
//		tm.document.write("<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0 onLoad=\"return window.print()\">");	//·Îµå½Ã ÇÁ¸°Æ®ÇÏ±â
	tm.document.write("<body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>");
	tm.document.write("<table border=0 cellpadding=0 cellspacing=0 width=100% height=30><tr>");
	tm.document.write("<td bgcolor=#f4f4f4 align=right style=padding-right:10px><A HREF=\"#\"  onMouseOver=\"window.status=('print'); return true;\" onClick=\"return window.print()\"><img src=/_yc/images/btn_print.gif border=0 alt='ÇÁ¸°Æ®'></a>");
	tm.document.write("<a href=javascript:self.close()><img src=/_yc/images/btn_close.gif border=0 hspace=5 alt='´Ý±â'></a></td>");
	tm.document.write("</tr></table>");
	tm.document.write("<table border=0 width=100%><tr><td><div id='contents'>");
	tm.document.write(document.all.printarea.outerHTML);
	tm.document.write("</div></td></tr></table>");
	tm.document.write("<table border=0 cellpadding=0 cellspacing=0 width=100% height=30><tr>");
	tm.document.write("<td bgcolor=#f4f4f4 align=right style=padding-right:10px><A HREF=\"#\"  onMouseOver=\"window.status=('print'); return true;\" onClick=\"return window.print()\"><img src=/_yc/images/btn_print.gif border=0 alt='ÇÁ¸°Æ®'></a>");
	tm.document.write("<a href=javascript:self.close()><img src=/_yc/images/btn_close.gif border=0 hspace=5 alt='´Ý±â'></a></td>");
	tm.document.write("</tr></table>");
	tm.document.write("</body>");
	tm.document.write("</html>");
	tm.document.close();
	//window.open("/common/print.asp", "", envwin);
}

// Áñ°ÜÃ£±â

function addfavorites(favoriteurl,favoritetitle){
  if (document.all)
    window.external.AddFavorite(favoriteurl,favoritetitle);
}

// ÀÌ¸ÞÀÏ ÁÖ¼ÒÈ®ÀÎ
function Email(id) {
	window.open('/common/antispam/antispamin.asp?type=email&id='+id,'AntiSpam','width=180,height=350,left=1,top=1');
}

function StaffEmail(staff) {
	window.open('/common/antispam/antispamin.asp?type=staff&staff='+staff, 'AntiSpam', 'width=180,height=350,left=1,top=1');
}

function BoardEmail(id, post) {
	window.open('/common/antispam/antispamin.asp?type=board&id='+id+'&post='+post, 'AntiSpam', 'width=180,height=350,left=1,top=1');
}

function ForumEmail(forum, post) {
	window.open('/common/antispam/antispamin.asp?type=forum&forum='+forum+'&post='+post, 'AntiSpam', 'width=180,height=350,left=1,top=1');
}

function ForumProposalEmail(proposal) {
	window.open('/common/antispam/antispamin.asp?type=forum_proposal&proposal='+proposal, 'AntiSpam', 'width=180,height=350,left=1,top=1');
}

function TeacherEmail(teacher) {
	window.open('/common/antispam/antispamin.asp?type=teacher&teacher='+teacher, 'AntiSpam', 'width=180,height=350,left=1,top=1');
}

// ÆË¾÷Á¸ÇÔ¼ö
function prevnextCheck(listname,mode,cnt){
  var displayNo = "";
  for(i=1;i<=cnt;i++){
    var obj = document.getElementById(listname + i);
    if(obj.style.display == "block"){
      displayNo = i;
      obj.style.display = "none";
      break;
    }
  }
        
  if(mode == "prev") displayNo = displayNo - 1
  if(mode == "next") displayNo = displayNo + 1
        
  if(displayNo < 1) displayNo = cnt;
  if(displayNo > cnt) displayNo = 1;
        
  var obj2 = document.getElementById(listname + displayNo);
  obj2.style.display = "block";
}
      
// »õÃ¢¶ç¿ì±â
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// ÄíÅ° ³Ö±â
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 Viewer() {		//ºä¾î´õº¸±â
  window.open("../other/pop_viewer.asp", "yc_viewer", "width=500px,height=300px,scrollbars=yes,resizable=yes");
}

// ÀÎ±âÅÂ±× ¼­ºê¹Ô ÇÔ¼ö
function interestSubmit(url){
  var w = 850;
  var h = 650;

  var leftPos = 0;  
  var topPos  = 0;

  //window.open(url, 'search_window', 'width=' + w + ', height=' + h + ', left=' + leftPos + ', top=' + topPos + ', scrollbars=yes');
  window.open(url,'search_window','');
}


// °Ë»ö ½ºÅ©¸³Æ® ½ÃÀÛ
function MenuKeySearch(mno) {

  var search_key = "Searchm_text"+mno
	var key = document.all[search_key].value;
	if(key.length == 0)
		alert('Å°¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä');
	else
		window.open('/_yc/member/menu_search.asp?mode=search&add=no&keyword='+key,'menu','toolbars=no,scrollbars=yes,width=360,height=300');
}

function EnterKeyMenuKeySearch(event,mno) {

  if(event.keyCode == 13)
	  MenuKeySearch(mno);

}

function win_open() {

  f=document.search1;

  category=f.category.value;

  search_string=f.search_string.value;

  search_url="/search/kimap_search.cgi?category="+category+"&search_string="+search_string;

  window.open(search_url,'iyc_search','width=850,height=600,scrollbars=yes');

}
  
  function Search1Submit() {
	  var form = document.forms['search1'];
	  if(form.qt.value == "" || form.qt.value == "³»¿ë°Ë»ö") {
		window.alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		return;
	  }
		
		var w = 850;
    var h = 650;

    var leftPos = 0;  
    var topPos  = 0;

    //window.open('', 'search_window', 'width=' + w + ', height=' + h + ', left=' + leftPos + ', top=' + topPos + ', scrollbars=yes');
    window.open('','search_window','');
	form.target = 'search_window';

		form.submit();
	}
  
  
	function Search2Submit() {
	  var form = document.forms['search2'];
	  if(form.keyword.value == "" || form.keyword.value == "Á÷¿ø/¾÷¹«") {
		window.alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		return;
	  }
	  form.submit();
	}

	function Search3Submit() {
	  var form = document.forms['search3'];
	  if(form.keyword.value == "" || form.keyword.value == "¹Î¿ø°Ë»ö") {
		window.alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		return;
	  }
	  if(form.select.value == "") {
		window.alert("Ç×¸ñÀ» ¼±ÅÃÇÏ¼¼¿ä");
		return;
	  }
	  switch(form.select.value) {
		case "1":
		  form.method = "post";
		  form.action = "/emwp/gov/mogaha/ntis/web/caf/mwwd/action/CafMwWdContentAction.do?method=AutoCompleteMw&jndinm=CafMwWdContentEJB&methodnm=AutoCompleteMw&context=NTIS&menu_id=CAFSYSWebAdcdInfo&names=";
		  form.target = "_blank";
		  form.sMwAfrNm.value = form.keyword.value;
		  form.mw_afr_nm.value = form.keyword.value;
		  break;
		case "2":
		  form.method = "post";
		  form.action = "http://eminwon.iyc21.net/emwp/gov/mogaha/ntis/web/caf/mwwd/action/CafMwWdGuideAction.do";
		  form.target = "_blank";
		  form.searchWord.value = form.keyword.value;
		  form.searchGubun.value = "3";
		  break;
		case "3":
		  form.action = "/_yc/cham/a02_b01_c01_old.asp";
		  break;
		case "4":
		  form.action = "/_yc/min/a05_b03_c03.asp";
		  break;
		case "5":
		  form.action = "/_yc/min/a05_b03_c04.asp";
		  break;
		case "6":
		  form.action = "/_yc/hinfo/a03_b06_c01.asp";
		  break;

	  }

	  form.submit();
	}

	function life_search() {
		var selectBox = document.getElementById('lifes');
		var inputBox = document.getElementById('life_input');
		if(!selectBox.value) {
			alert('Ç×¸ñÀ» ¼±ÅÃÇÏ¼¼¿ä.');
			return;
		}
		if(!inputBox.value) {
			alert('°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.');
			inputBox.focus();
			return;
		}
		window.open(selectBox.value + inputBox.value);
	}

	function life_searchc() {
		if(document.getElementById('lifes').value == 'q_way')
			window.open('http://maps.naver.com/?menu=find_route','','');
	}


function goSelectUrl(num){
  var obj = document.getElementById('select'+num);
	if(obj.value == '' || obj.value == 'total'){
	}
	else{
		window.open(obj.value);
	}
}

// °Ë»ö ½ºÅ©¸³Æ® ³¡


//¹è³Ê´õº¸±â
function Banner() {
  window.open("../other/pop_banner.asp", "yc_banner", "width=500px,height=300px,scrollbars=yes,resizable=yes");
}


// ½Ç¸íÀÎÁõÃ¢
function fnPopup(){
  window.open('', 'popup','width=410, height=590');
  document.form.target = 'popup';
  document.form.action = 'https://cert.namecheck.co.kr/certnc_input.asp';
  document.form.submit();
}
