//È¨
function main(){window.document.location.href="/index.html";}

//´ëÇÐ¼Ò°³
function sub0101(){window.document.location.href="/about/sub01.html";}
function sub0102(){window.document.location.href="/about/sub02.html";}
function sub0103(){window.document.location.href="/about/sub03.html";}
function sub0104(){window.document.location.href="/about/sub04.html";}
function sub0105(){window.document.location.href="/about/sub05.html";}
function sub0106(){window.document.location.href="/about/sub06.html";}


//ÀÔÇÐ¾È³»
function sub0201(){window.document.location.href="/entrance/sub01.html";}
function sub0202(){window.document.location.href="/entrance/sub02.html";}
function sub0203(){window.document.location.href="/entrance/sub03.html";}


//±³À°°úÁ¤
function sub0301(){window.document.location.href="/education/sub01.html";}
function sub0302(){window.document.location.href="/education/sub02.html";}
function sub0303(){window.document.location.href="/education/sub03.html";}
function sub0304(){window.document.location.href="/education/sub04.html";}
function sub0305(){window.document.location.href="/education/sub05_01.html";}


//±³¼öÁø
function sub0401(){window.document.location.href="/professor/sub01.html";}
function sub0402(){window.document.location.href="/professor/sub02.html";}
function sub0403(){window.document.location.href="/professor/sub03.html";}
function sub0404(){window.document.location.href="/professor/sub04.html";}
function sub0405(){window.document.location.href="/professor/sub05.html";}
function sub0406(){window.document.location.href="/professor/sub06.html";}
function sub0407(){window.document.location.href="/professor/sub07.html";}
function sub0408(){window.document.location.href="/professor/sub08.html";}


//´ëÇÐ»ýÈ°
function sub0501(){window.document.location.href="/life/sub01.html";}
function sub0502(){window.document.location.href="/life/sub02.html";}
function sub0503(){window.document.location.href="/life/sub03.html";}
function sub0504(){window.document.location.href="/life/sub04.html";}
function sub0505(){window.document.location.href="/life/sub05.html";}
function sub0506(){window.document.location.href="/life/sub06.html";}


//Á¤º¸±¤Àå
function sub0601(){window.document.location.href="/info/sub01_01.html";}
function sub0602(){window.document.location.href="/info/sub02.html";}
function sub0603(){window.document.location.href="/info/sub03.html";}
function sub0604(){window.document.location.href="/info/sub04.html";}
function sub0605(){window.document.location.href="/info/sub05.html";}
function sub0606(){window.document.location.href="/info/sub06_01.html";}


//Ä¿¹Â´ÏÆ¼
function sub0701(){window.document.location.href="/community/sub01_01.html";}
function sub0702(){window.document.location.href="/community/sub01_02.html";}


function sub0801(){ alert("ÁØºñ Áß ÀÔ´Ï´Ù."); }

//È¸¿ø°¡ÀÔ Ã¼Å©
function signup_submit(f)
{
	if (f.name.value == 0 ) {		
		alert("ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.name.focus();
		return;
	} 

	var reg_num1 = f.reg_num1; 
	var reg_num2 = f.reg_num2; 
	var jumin1Num = reg_num1.value; 
	var jumin2Num = reg_num2.value; 
	var juminNum = reg_num1.value + reg_num2.value; 

	if(jumin1Num.length != 6 || jumin2Num.length != 7 || isNaN(juminNum) || juminNum.charAt(6)<1 || juminNum.charAt(6)>4) { 
		alert ("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä!"); 
		reg_num1.focus(); 
		return; 
	} 

	var check = 0 ; 
	for (var i=0 ; i<12 ; i++) { 
		check += (i%8+2) * juminNum.charAt(i); 
	} 
	check = (11-check%11) % 10; 

	if(check != juminNum.charAt(12)) { 
		alert ("À¯È¿ÇÏÁö ¾ÊÀº ÁÖ¹Îµî·Ï¹øÈ£ÀÔ´Ï´Ù..^.^"); 
		reg_num1.focus(); 
		return;
	} else if (f.input_id.value == 0 ) {		
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.input_id.focus();
		return;
	} else if (f.chk.value == 0 ) {		
		alert("¾ÆÀÌµð°¡ Áßº¹ÀÌ°Å³ª 5ÀÚ ¹Ì¸¸ÀÔ´Ï´Ù.");
		return;
	} else if (f.password.value == 0 ) {		
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.password.focus();
		return;
	} else if(f.password.value != f.re_password.value) {
		alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
		f.password.focus();
		return;
	} else if (f.answer.value == 0 ) {		
		alert("ºñ¹Ð¹øÈ£ Áú¹®ÀÇ ´äÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.answer.focus();
		return;
	} else if (f.tel2.value == 0 ) {		
		alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.tel2.focus();
		return;
	} else if (f.tel3.value == 0 ) {		
		alert("¿¬¶ôÃ³¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.tel3.focus();
		return;
	} else {
		f.submit();
	}
}

//·Î±×ÀÎ Ã¼Å©
function login_submit(f)
{
	if(f.id.value == 0) {
		alert("ID¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.id.focus();
	} else if (f.password.value == 0 ) {		
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.password.focus();
	} else {
		f.submit();
	}
}

//Ã¼Å©ÇÑ°Å ÀüºÎ »èÁ¦
function delete_all(f)
{
	if(confirm("¼±ÅÃÇÑ °ÍÀ» »èÁ¦ ÇÏ½Ã°Ú½À´Ï±î?")) {
		f.submit();
	}
}

//È¸¿ø¼öÁ¤ Ã¼Å©
function modify_submit(f)
{
	if (f.old_password.value == 0 ) {		
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.old_password.focus();
	} else if(f.password.value != 0) {
		if(f.password.value != f.re_password.value) {
			alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù.");
			f.password.focus();
		} else {
			f.submit();
		}
	} else {
		f.submit();
	}
}

//È¸¿øµî·Ï Ã¼Å©
function write_submit(f)
{
	if (f.subject.value == 0 ) {		
		alert("Á¦¸ñÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.subject.focus();
	} else if (f.contents.value == 0 ) {		
		alert("³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.contents.focus();
	} else {
		f.submit();
	}
}
function gallery_submit(f)
{
	if (f.subject.value == 0 ) {		
		alert("Á¦¸ñÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.subject.focus();
	} else if (f.cate.value == "0" ) {		
		alert("Ä«Å×°í¸®¸¦ ¼±ÅÃÇØÁÖ¼¼¿ä.");
	} else if (f.contents.value == 0 ) {		
		alert("³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.contents.focus();
	} else {
		f.submit();
	}
}

//ÄÚ¸àÆ® µî·Ï Ã¼Å©
function comment_submit(f)
{
	if (f.name.value == 0 ) {		
		alert("ÀÌ¸§À» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.name.focus();
	} else if (f.password.value == 0 ) {		
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.password.focus();
	} else if (f.content.value == 0 ) {		
		alert("³»¿ëÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		f.content.focus();
	} else {
		f.submit();
	}
}

//°³ÀÎÁ¤º¸µ¿ÀÇ Ã¼Å©
function public_check(f)
{
	if (!f.radiobutton[0].checked) {
		alert("ÀÌ¿ë¾à°ü¿¡ µ¿ÀÇÇØÁÖ¼¼¿ä.");
	} else {
		f.submit();
	}
}

//È¸¿ø ÄÚ¸àÆ® »èÁ¦
function comment_delete(bid,page,no,cno,member_id) {
	if (confirm("ÄÚ¸àÆ®¸¦ »èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) {
		if (member_id == "") {
			//CenterWin('comment_delete.php?bid=' + bid + '&page=' + page + '&no=' + no + '&cno=' + cno,'','width=350, height=150, scrollbars=no')
			location.href="comment_delete.php?bid=" + bid + '&page=' + page + '&no=' + no + '&cno=' + cno;
		} else {
			location.href = "comment_delete_process.php?bid=" + bid + "&page=" + page + "&no=" + no + "&cno=" + cno;
		}
	} else {
		return;
	}
}
//ÀÌ¹ÌÁö»çÀÌÁî¸Â°Ô¶ç¿ì±â
function popimage(imagesrc,winwidth,winheight){
    var look='width='+winwidth+',height='+winheight+','
        popwin=window.open("","",look)
        popwin.document.open()
        popwin.document.write('<title>Image Window</title><body topmargin=0 leftmargin=0><img style=cursor:hand; onclick="self.close()" src="'+imagesrc+'"></body>')
        popwin.document.close()
}

//ÆË¾÷Ã¢

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
    LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
    settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable' 
    win = window.open(mypage,myname,settings)
}

//ÆË¾÷Ã¢
function show(object) {
if (document.layers && document.layers[object] != null) document.layers[object].visibility = 'visible';
else if (document.all) document.all[object].style.visibility = 'visible';
}
function hide(object) {
if (document.layers && document.layers[object] != null) document.layers[object].visibility = 'hidden';
else if (document.all) document.all[object].style.visibility = 'hidden';
}

//·¹ÀÌ¾îÃ¢
function move_box(an, box) {
//¸µÅ©µÈ À§Ä¡¿¡¼­ ºÎÅÍÀÇ ¼³Á¤°ª ÁöÁ¤
  var cleft = 20;  //¿ÞÂÊ¸¶Áø  
  var ctop = -10;  //»ó´Ü¸¶Áø
  var obj = an;
  while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 8;
  if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
    ctop += parseInt(
      document.body.currentStyle['marginTop']);
  }
  box.style.top = ctop + 'px';
}

function move_box2(an, box) {
//¸µÅ©µÈ À§Ä¡¿¡¼­ ºÎÅÍÀÇ ¼³Á¤°ª ÁöÁ¤
  var cleft = -400;  //¿ÞÂÊ¸¶Áø  
  var ctop = -400;  //»ó´Ü¸¶Áø
  var obj = an;
  while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 8;
  if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
    ctop += parseInt(
      document.body.currentStyle['marginTop']);
  }
  box.style.top = ctop + 'px';
}

function show_hide_box(an, width, height, borderStyle) {
  var href = an.href;
  var boxdiv = document.getElementById(href);
  
  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
      move_box(an, boxdiv);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }

  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', href);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
  boxdiv.style.border = borderStyle;
  boxdiv.style.backgroundColor = '#fff';

  var contents = document.createElement('iframe');
  contents.scrolling = 'yes';
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;

  boxdiv.appendChild(contents);
  document.body.appendChild(boxdiv);
  move_box(an, boxdiv);

  return false;
}

function show_hide_box2(an, width, height, borderStyle) {
  var href = an.href;
  var boxdiv = document.getElementById(href);

  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
      move_box2(an, boxdiv);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }

  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', href);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
  boxdiv.style.border = borderStyle;
  boxdiv.style.backgroundColor = '#fff';

  var contents = document.createElement('iframe');
  contents.scrolling = 'no';
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;

  boxdiv.appendChild(contents);
  document.body.appendChild(boxdiv);
  move_box2(an, boxdiv);

  return false;
}

//½½¶óÀÌµù¸Þ´º
function slide(Id, interval, to) {
    var obj = document.getElementById(Id);
    var H, step = 5;

    if (obj == null) return;
    if (to == undefined) { // user clicking
        if (obj._slideStart == true) return;
        if (obj._expand == true) {
            to = 0;
            obj.style.overflow = "hidden";
        } else {
            slide.addId(Id);
            for(var i=0; i < slide.objects.length; i++) {
                if (slide.objects[i].id != Id && slide.objects[i]._expand == true) {
                    slide(slide.objects[i].id);
                }
            }

            obj.style.height = "";
            obj.style.overflow = "";
            obj.style.display = "block";
            to = obj.offsetHeight; // ÀÌ°ÅÀÌ°Å
            obj.style.overflow = "hidden";
            obj.style.height = "1px";
        }
        obj._slideStart = true;
    }
    
    step             = ((to > 0) ? 1:-1) * step;
    interval         = ((interval==undefined)?1:interval);

    obj.style.height = (H=((H=(isNaN(H=parseInt(obj.style.height))?0:H))+step<0)?0:H+step)+"px";
    
    
    if (H <= 0) {
        obj.style.display = "none";
        obj.style.overflow = "hidden";
        obj._expand = false;
        obj._slideStart = false;
    } else if (to > 0 && H >= to) {
        obj.style.display = "block";
        obj.style.overflow = "visible";
        obj.style.height = H + "px";
        obj._expand = true;
        obj._slideStart = false;
    } else {
        setTimeout("slide('"+Id+"' , "+interval+", "+to+");", interval);
    }
}
slide.objects = new Array();
slide.addId = function(Id)
{
    for (var i=0; i < slide.objects.length; i++) {
        if (slide.objects[i].id == Id) return true;
    }
    slide.objects[slide.objects.length] = document.getElementById(Id);
}




//Window Open
function na_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';
  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);
}

//Window Open
function large_window(large, width, height) {
open(large ,"free_mail","left=100px,top=100px,width="+width+",height="+height+", toolbar=no,location=no,directories=no,status=no, menubar=no, resizable=yes, scrollbars=yes");
}

//ÇÃ·¡½Ã Å×µÎ¸® »èÁ¦
function getFlash(src,w,h){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" id="param" width="'+w+'" height="'+h+'">';
	html += '<param name="movie" value="'+src+'">';
	html += '<param name="quality" value="high">';
	html += '<param name="wmode" value="transparent">';
	html += '<param name="bgcolor" value="#ffffff">';
	html += '<embed src="'+src+'" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+w+'" height="'+h+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>';
	html += '</object>';
	document.write(html);
}

//PNG24 ÀÌ¹ÌÁöÃ³¸®
function setPng24(obj){
	obj.width = obj.height = 1;
	obj.className = obj.className.replace(/\bpng24\b/i,'');
	obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
	obj.src = '';
	return '';
}

//¿ÀÇÂºê¶ó¿ìÀú ¿­±â
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//ÀÛÀº ÆË¾÷
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


//Ã¼Å©¹Ú½º ÀüÃ¼ Ã¼Å©
function chk_val( str ) {
       var chk_box = document.forms[0].elements['chk[]'];
       var chk_len = chk_box.length;
       str == null ? str = 'all' : '';
       for( var lo = 0; lo < chk_len; lo++) {
              str == 'all' ? chk_box[lo].checked = true  : '';
              str == 'nul' ? chk_box[lo].checked = false : '';
              str == 'rev' ? chk_box[lo].checked == true ? chk_box[lo].checked = false : chk_box[lo].checked = true : '';
       }
	   if (document.forms[0].elements['chk[]'].checked = true) {
		   document.forms[0].elements['chk_rev'].value = "ÀüÃ¼";
	   }
	   
	   if (document.forms[0].elements['chk[]'].checked = false) {		   
		   document.forms[0].elements['chk_rev'].value = "ÇØÁ¦";
	   }
}
//ÀÌ¸ÞÀÏ ¼¿·ºÆ®
function check_mail(frm) {
	if (frm.email_list.value!="" && frm.email_list.value!="self") {
		frm.email2.style.display = 'none';
		frm.email2.value = frm.email_list.value;
	} else if (frm.email_list.value=="self") {
		frm.email2.value = '';
		frm.email2.style.display = '';
		frm.email2.focus();
	}
}

//ÀüÃ¼ »èÁ¦
function del_all(){
	if(confirm("»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) {
		document.check_form.submit();
	}
}

var a = document.all;

function onChange_SEL_MAIL_SERVER() {
	if (a.SEL_MAIL_SERVER.options[a.SEL_MAIL_SERVER.selectedIndex].value == "°íµîÇÐ»ý") {
		a.TB_MAIL_SERVER.style.display = "";
		a.TB_MAIL_SERVER2.style.display ="";
	} else {
		a.TB_MAIL_SERVER.style.display = "none";
		a.TB_MAIL_SERVER2.style.display = "none";
	}
}

//ÀÚ¹Ù½ºÅ©¸³Æ® ÀÌ¹ÌÁö ¿øº»Å©±â·Î ¶ç¿ì±â ÇÑ±ÛÆÄÀÏ Àû¿ë¾ÈµÊ
<!--
var imgObj = new Image();
function showImgWin(imgName) {
  imgObj.src = imgName;
  setTimeout("createImgWin(imgObj)", 100);
}
function createImgWin(imgObj) {
  if (! imgObj.complete) {
    setTimeout("createImgWin(imgObj)", 100);
    return;
  }
  imageWin = window.open("", "imageWin",
    "width=1000,height=" + imgObj.height);
  imageWin.document.write("<html><body style='margin:0'>");
  imageWin.document.write("<a href=javascript:window.close()><img src='" + imgObj.src + "' border=0></a>");
  imageWin.document.write("</body><html>");
  imageWin.document.title = imgObj.src;
}
-->



