﻿document.write("<SCRIPT LANGUAGE=\"JavaScript\" type=\"Text/JavaScript\" src=\"/common/js/makePCookie.js\"></" + "SCRIPT>");


	function get_main() {
		location.href = "/index.asp";

	}

//	function get_login(f){
//		//var f = document._leftlogin;
//
//	if (squeeze(f.uid.value)<2) {
//		alert("ID를  입력해 주십시오.");
//		f.uid.focus();
//		return;
//	}
//
//	if (squeeze(f.pwd.value)<2) {
//		alert("비밀번호를 입력해 주십시오.");
//		f.pwd.focus();
//		return;
//	}
//
//  //if (f.saveid) {
//	//
//         // 로그인 정보 저장 체크 확인하여 진행
//    //    if(f.saveid.checked) saveLogin(f.uid.value);
//    //    else  saveLogin("");
//    //}
//    //return true;
//
//		f.method = "post";
//		f.target = "_self";
//		//f.action = "/common/asp/_lgoinPress.asp";
//		f.action = "http://"+ location.hostname +""+":8080"+"/common/asp/_loginPress.asp";
//		f.submit();
//	}

/////////////
// 쿠키에서 로그인 정보 가져오기


    // 로그인 정보 저장
    function confirmSave(checkbox) {
        var isRemember;
        // 로그인 정보 저장한다고 선택할 경우
        if(checkbox.checked) {
            isRemember = confirm("이 PC에 로그인 정보를 저장하시겠습니까? \n\nPC방등의 공공장소에서는 개인정보가 유출될 수 있으니 주의해주십시오.");
            if(!isRemember)
                checkbox.checked = false;
        }
    }

    // 쿠키값 설정
    function setCookie(name, value, expiredays) {
        var today = new Date();
        today.setDate( today.getDate() + expiredays );
        document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + today.toGMTString() + ";"
    }

    // 쿠키값 가져오기
    function getCookie(key) {
        var cook = document.cookie + ";";
        var idx =  cook.indexOf(key, 0);
        var val = "";

        if(idx != -1) {
            cook = cook.substring(idx, cook.length);
            begin = cook.indexOf("=", 0) + 1;
            end = cook.indexOf(";", begin);
            val = unescape( cook.substring(begin, end) );
        }
        return val;
    }


    function getLogin() {
        var frm = document._leftlogin;

        // userid 쿠키에서 id 값을 가져온다.
        var id = getCookie("userid");

        // 가져온 쿠키값이 있으면
        if(id != "") {
            frm.uid.value = id;
            frm.saveid.checked = true;
        }
    }

    // 쿠키에 로그인 정보 저장
    function saveLogin(id){
        if(id != "") {
        // userid 쿠키에 id 값을 7일간 저장
            setCookie("userid", id, 7);
        }
        else {
        // userid 쿠키 삭제
            setCookie("userid", id, -1);
        }
    }

/////////////


	function get_leftlogout(){
		var f = document._leftlogin;
		f.method = "post";
		f.target = "_self";
		f.action = "/common/asp/_logOut.asp";
		f.submit();
	}

	//서브페이지에서 로그아웃
	function get_toplogout() {
		location.href = "/common/asp/_logOut.asp";
	}

	//회원가입
	function get_join(f){
		//var f = document._leftlogin;
		f.method = "post";
		f.target = "_self";
		f.action = "/mypage/login.asp?m=2";
		f.submit();
	}


    //공백 제거 후 길이 반환
    function squeeze(str) {
        str = str.replace(/ /g, "");
        return str.length;
    }

	function open_pop4(frm) {

		js_open('/mypage/_pop4.asp','id_pwd','width=442,height=300,status=no,menubar=no', "post", frm);
	}



	//MY PAGE
	function get_leftmypage(){
		var f = document._leftlogin;
		f.method = "post";
		f.target = "_self";
		f.action = "/mypage/main.asp";
		f.submit();
	}




    //Left Togle Menu

        var stmnLEFT = 900; //-> 왼쪽 여백 (메뉴가 왼쪽에서 10픽셀 떨어진 곳에 보여집니다)
        var stmnGAP1 = 90; //위쪽 여백 (메뉴가 위에서 10픽셀 떨어진 곳에 보여집니다)
        var stmnGAP2 = 10;  //-> 스크롤시 브라우저 위쪽과 떨어지는 거리
        var stmnBASE = 200;

        var stmnActivateSpeed = 200; //-> 이건 메뉴 속도 에요~ 숫자가 빠를수록 느리게 움직입니다.
        var stmnScrollSpeed = 10;

        var stmnTimer;

        // 쿠키 읽기
        function ReadCookie(name)
        {
                var label = name + "=";
                var labelLen = label.length;
                var cLen = document.cookie.length;
                var i = 0;

                while (i < cLen) {
                        var j = i + labelLen;

                        if (document.cookie.substring(i, j) == label) {
                                var cEnd = document.cookie.indexOf(";", j);
                                if (cEnd == -1) cEnd = document.cookie.length;

                                return unescape(document.cookie.substring(j, cEnd));
                        }

                        i++;
                }

                return "";
        }

        // 쿠키 저장
        function SaveCookie(name, value, expire)
        {
                var eDate = new Date();
                eDate.setDate(eDate.getDate() + expire);
                document.cookie = name + "=" + value + "; expires=" +  eDate.toGMTString()+ "; path=/";
        }

        // 스크롤 메뉴의 위치 갱신
        function RefreshStaticMenu()
        {
                var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;

                stmnStartPoint = parseInt(STATICMENU.style.top, 10);
                stmnEndPoint = document.body.scrollTop + stmnGAP2;
                if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;

                stmnRefreshTimer = stmnActivateSpeed;

                if ( stmnStartPoint != stmnEndPoint ) {
                        stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
                        STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
                        stmnRefreshTimer = stmnScrollSpeed;
                }

                stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
        }

        // 메뉴 ON/OFF 하기
        function ToggleAnimate()
        {
                if (document.all.ANIMATE.checked) { // 이동하기 버튼이 체크되었다면
                        RefreshStaticMenu(); // 메뉴위치를 다시 조정
                        SaveCookie("ANIMATE", "true", 300); // 이동이 ON 상태라고 쿠키를 설정
                }
                else { // 아니라면... (이동하기 버튼이 체크되어 있지 않으면)
                        clearTimeout(stmnTimer); // 이동용 타이머 해제
                        STATICMENU.style.top = stmnGAP1; // 메뉴의 위치를 상단으로 옮긴다.
                        SaveCookie("ANIMATE", "false", 300); // 이동상태가 "OFF" 임
                }
        }

        // 메뉴 초기화
        function InitializeStaticMenu()
        {

                if (ReadCookie("ANIMATE") == "false") { // 이동상태가 off 상태라면
                        document.all.ANIMATE.checked = false; // 체크표시를 지우고
                        STATICMENU.style.top = document.body.scrollTop + stmnGAP1; // 맨 위에 들러 붙는다.
                }
                else { // 이동 on 상태라면
                        document.all.ANIMATE.checked = true; // 체크표시를 하고
                        STATICMENU.style.top = document.body.scrollTop + stmnBASE; // 기본위치로 이동한다.
                        RefreshStaticMenu(); // 스크립트 가동
                }

                STATICMENU.style.left = stmnLEFT; // 메뉴 왼쪽 위치 초기화. 필요없을 경우 삭제
        }


        /////////////////////////////
        /////////////////////////////
        /////////////////////////////


		//이올라스와의 특허 침해 소송과 관련한 IE의 부분수정
		//2006-02-06
		function ms70_setEmbed()
		{
			var obj = new String;
			var parameter = new String;
			var embed = new String;
			var html = new String;
			var allParameter = new String;
			var clsid = new String;
			var codebase = new String;
			var pluginspace = new String;
			var embedType = new String;

			var Mstandby = new String;
			var Mtype    = new String;
			var Mstyle   = new String;
			var Mid      = new String;
			var Mdata    = new String;
			var Metc     = new String;

			var Mname    = new String;
			var src = new String;
			var width = new String;
			var height = new String;


			this.ms70_init = function( getType , s ,w , h, id ) {

				if ( getType == "flash")
				{

					clsid = "D27CDB6E-AE6D-11cf-96B8-444553540000";
					codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0";
					pluginspage = "http://www.macromedia.com/go/getflashplayer";
					embedType = "application/x-shockwave-flash";

					parameter += "<param name='movie' value='"+ s + "'>\n";
					parameter += "<param name='quality' value='high'>\n";




				}
				/* type 추가
				else if ( )
				{

				}
				*/
				src = s;
				width = w;
				height = h;
			}

			this.ms70_parameter = function( parm , value )
			{
				parameter += "<param name='"+parm +"' value='"+ value + "'>\n";
				allParameter += " "+parm + "='"+ value+"'";
			}

			this.ms70_show = function(getType)
			{

				if ( clsid )
				{

					obj = "<object ";
					if(Mtype.length > 0)
						obj = obj + " type =\""+ Mtype +"\" ";
					if(Mname.length > 0)
						obj = obj + " name =\""+ Mname +"\" ";
					if(Mid.length > 0)
						obj = obj + " id =\""+Mid +"\" ";
					if(Mstandby.length > 0)
						obj = obj + " standby=\""+ Mstandby +"\"  ";
					if(Mstyle.length >0)
						obj = obj + " style=\""+ Mstyle +"\"  ";
					if(Metc.length > 0)
						obj = obj +  Metc ;
					if(clsid.length > 0)
						obj = obj + " classid=\"clsid:"+ clsid +"\" ";
					if(codebase.length > 0)
						obj = obj + " codebase=\""+ codebase +"\"  ";
					if(width.length > 0)
						obj = obj + " width=\""+ width +"\" ";
					if(height.length > 0)
						obj = obj + " height=\""+ height +"\" ";

					obj = obj + ">\n";

				}
				if ( getType == "flash")
				{
					embed = "<embed src='" + src + "' pluginspage='"+ pluginspage + "' type='"+ embedType + "' width='"+ width + "' height='"+ height +"'"+ allParameter +" ></embed>\n";
				}

				if ( obj )
				{
					embed += "</object>\n";
				}

				html = obj + parameter + embed;
				//alert(html);
				document.write( html);
			}
		}


        function viewLoc(img) {
			if(img != ""){
				htmlz = "<html><head><title>이미지 확대    </title><style>body{margin:0;cursor:hand;}</style></head><body scroll=auto onload='winResize();' onclick='top.window.close();'><img src='"+img+"' title='클릭하시면 닫힙니다.' name='Timage' id='Timage'></body></html><script>function winResize(){var tmp_height=0;if(document.all.Timage.height<screen.availHeight)tmp_height = 15;var Dwidth = parseInt(document.body.scrollWidth)-tmp_height;var Dheight = parseInt(document.body.scrollHeight);var divEl = document.createElement('div');divEl.style.position = 'absolute';divEl.style.left = '0px';divEl.style.top = '0px';divEl.style.width = '100%';divEl.style.height = '100%';document.body.appendChild(divEl);window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight);document.body.removeChild(divEl);}</script>";
				try {
				    imagez = window.open('', "image", "width="+ 100 +", height="+ 100 +", top=0,left=0,scrollbars=auto,resizable=1,toolbar=0,menubar=0,location=0,directories=0,status=1");

				    imagez.document.open();
				    imagez.document.write(htmlz)
				    imagez.document.close();

                } catch(e) {

                    alert("팝업 창을 오픈 할 수 없습니다.\n팝업 차단 프로그램이 설치되어 있으면 팝업 창을 허용하여 팝업 창을 여십시오.");
                }
			}

        }


		function winResize()
		{
			var Dwidth = parseInt(document.body.scrollWidth);
			var Dheight = parseInt(document.body.scrollHeight);
			var divEl = document.createElement("div");
			divEl.style.position = "absolute";
			divEl.style.left = "0px";
			divEl.style.top = "0px";
			divEl.style.width = "100%";
			divEl.style.height = "100%";

			document.body.appendChild(divEl);

			window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight);
			document.body.removeChild(divEl);
		}


    /********************************************************************
    *  Input Data    : window.open()와 같음
    * onClick="js_open(this.href,'newwin','width=400,height=300,status=yes,menubar=yes');return false"
    ********************************************************************/
    function js_open(url, wname, wopt , method, form) {

		var newopt = "", wHeight = 0, wWidth = 0;
    	if (wopt != undefined) {
    		var woptlist = wopt.replace(/ /g, "").split(",");
    		for (var i in woptlist) {
    			if (woptlist[i].match(/^height=/i)) {
    				wHeight = parseInt(woptlist[i].substr(7),10);
    				if (!isNaN(wHeight)) newopt += "top=" + Math.floor((screen.availHeight - wHeight) / 2) + ",";
    			}
    			if (woptlist[i].match(/^width=/i)) {
    				wWidth = parseInt(woptlist[i].substr(6),10);
    				if (!isNaN(wWidth)) newopt += "left=" + Math.floor((screen.availWidth - wWidth) / 2) + ",";
    			}
    		}
    	}
    	//return window.open(url, wname, newopt + wopt);


      try {
		  if (method=="get"){
			  var pop_win = window.open(url, wname, newopt + wopt);
		  }
          else {
			  var f  = eval("document."+ form);
			  var pop_win = window.open('', wname, newopt + wopt);
			  f.method = method;
			  f.target = wname;
			  f.action = url;
			  f.submit();

		  }

		pop_win.focus();
      } catch(e) {

        alert("팝업 창을 오픈 할 수 없습니다.\n팝업 차단 프로그램이 설치되어 있으면 팝업 창을 허용하여 팝업 창을 여십시오.");
      }


    }
    function MM_openBrWindow(url,name,size){

    		open(url,name,size);
    }




	/************************************************************************
	*  Function Name : checklen() +
	*  Description   : Form 글자수 체크
	*  Input Data    : value,maxlength
	*  Output Data   : onKeyUp="checklen(this,40)"
	*************************************************************************/
	function checklen(fform,maxlength)
	{
		var msgtext, msglen;

		msgtext = fform.value;

		var i=0,l=0;
		var temp,lastl;

		//길이를 구한다.
		while(i < msgtext.length)
		{
			temp = msgtext.charAt(i);

			if (escape(temp).length > 4)
				l+=2;
			else if (temp!='\r')
				l++;
			// OverFlow
			if(l>maxlength)
			{
				alert("허용 길이 이상의 글을 쓰셨습니다.\n한글 "+ maxlength/2 +"자, 영문"+ maxlength +"자까지만 쓰실 수 있습니다.");
				temp = fform.value.substr(0,i);
				fform.value = temp;
				l = lastl;
				return false;
				//break;
			}
			lastl = l;
			i++;
		}
		return true;
	}

    /*------------------------------------------------------------------------------
       start ; Start number ,   end ; End number
       inpt  :선택되어진 값,  adds;증감값 , strd: 설명
    -------------------------------------------------------------------------------*/
    function selectBox(start,end,inpt,adds,strd) {
        var i=0,iinput=0;
        var t = eval(adds);
        var sTemp="";
        var strString="";

    	//if(inpt !=""){
    	    iinput=inpt;
    		for(i=start ; i<=end ; i+=t){
    			if(i==iinput){
    				if(i<10){
    					sTemp="0"+ i;
    				}
    				else{
    					sTemp= i;
    				}
    				strString+=" <option value='"+sTemp+"' selected>"+i+" "+strd+"</option>";
    			}
    			else{
    				if(i<10){
    					sTemp="0"+ i;
    				}
    				else{
    					sTemp= i;
    				}
    				strString+=" <option value='"+sTemp+"'>"+i+" "+strd +"</option>";
    			}
    		}
    	//}

        return strString;

    }


    //라디오 버튼 선택 .. 체크
    function chk_radio(frm)
    {

    	var check_val='';
    	if( frm.length == undefined )
    	{
    		if(frm.checked)
            {
    			check_val = frm.value;
    		}
    	}
        else{
    		for(var i=0; i < frm.length; i++)
            {
    			if(frm[i].checked)
                {
    				check_val = frm[i].value;
    			}
    		}
    	}
    	return check_val;
    }



	function ExtendCheck(obj){
		var permit_Reg_ext="/";
		var permit_ext =new Array("txt", "hwp", "doc", "ppt", "xls", "pdf", "jpg", "gif", "tar", "alz", "rar", "zip", "mp3", "for", "csv", "swf", "ai", "psd", "ico");
		var loop=permit_ext.length;
		var fileName=new Array();
		var fileExt=new Array();
		var upload = false;

		fileName=obj.value.split("\\");
		fileExt=obj.value.split("\.");

		for(i=0;i<loop;i++){
			permit_Reg_ext+="(.*\."+permit_ext[i]+(i==loop-1 ? "$)/img":"$)|"); // 허용되는 확장자명
		}

		if(eval(permit_Reg_ext).test(obj.value)) {
			//alert(" 확장자가"+permit_ext +"파일만 가능합니다.\n"+'"'+fileName[fileName.length-1]+'"'+"은 "+fileExt[fileExt.length-1]+" 파일로 업로드 가능한 파일입니다. ");}
			upload = true;

		}
		else {
			if (fileName[fileName.length-1] != "")
			{

				alert("확장자가 "+permit_ext +" 파일만 가능합니다.\n\r\n"+'파일명 ["'+fileName[fileName.length-1]+'"]'+"파일은 \n확장자가 "+fileExt[fileExt.length-1]+" 파일로 업로드 금지된 확장자 파일입니다.");
			}
			upload = false;

		}
		return upload;
	}


    //메인 Pop 1
	function main_pop1()
	{

			js_open('/Intro/RoadMap/pop6.asp','main_pop1','width=624,height=410,status=no,menubar=no', "get", '');
	}

    //메인 Pop 2
	function main_pop2()
	{

			js_open('/Intro/RoadMap/pop7.asp','main_pop2','width=624,height=410,status=no,menubar=no', "get", '');
	}




//게시판 검색 추가 ..
/**
 * 입력값이 NULL인지 체크
 */
    function isNull(input) {
        if (input.value == null || input.value == "") {
            return true;
        }
        return false;
    }

    /**
     * 입력값에 스페이스 이외의 의미있는 값이 있는지 체크
     * ex) if (isEmpty(form.keyword)) {
     *         alert("검색조건을 입력하세요.");
     *     }
     */
    function isEmpty(input) {
        if (input.value == null || input.value.replace(/ /gi,"") == "") {
            return true;
        }
        return false;
    }

    /**
     * 입력값에 특정 문자(chars)가 있는지 체크
     * 특정 문자를 허용하지 않으려 할 때 사용
     * ex) if (containsChars(form.name,"!,*&^%$#@~;")) {
     *         alert("이름 필드에는 특수 문자를 사용할 수 없습니다.");
     *     }
     */
    function containsChars(input,chars) {

        for (var inx = 0; inx < input.value.length; inx++) {

            if (chars.indexOf(input.value.charAt(inx)) != -1)
                return true;
        }
        return false;
    }


//메뉴link값
<!--

function menu00() {	location.href=base_path;}	//  홈

/////////////////////////////////////////////////////////////////


function menu01() {	menu0101();}	// ILS소개
function menu0101() {	location.href=base_path + "default.html"}	    // 인사말



/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


function menu02() {	menu0201();}	// 교수진
function menu0201() {	location.href=base_path + "introduction/introduction.html"}	    // 명예교수 


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


function menu03() {	menu0303();}	// 교육과정
function menu0301() {	location.href=base_path + "program/program2006.html"}	// 학위과정
function menu0302() {	location.href=base_path + "program/program2008.html"}	// 교과과정
function menu0303() {	location.href=base_path + "program/program2009.html"}	// 실무수습


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


function menu04() {	menu0401();}	// 입학전형 
function menu0401() {	location.href=base_path + "information/usefulInformation.html"}


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


function menu05() {	menu0501();}	// 학생생활
function menu0501() {	location.href=base_path + "activity/scholarship.aspx"}	// 장학제도
function menu0502() {	location.href=base_path + "activity/welfare.aspx"}	// 복지시설
function menu0503() {	location.href=base_path + "activity/center_info.aspx"}	//
function menu0504() {	location.href=base_path + "board_actqna/list.aspx"}	// 
function menu0505() {	location.href=base_path + "board_actdata/list.aspx"}	// 
function menu0506() {	location.href=base_path + "activity/stdorg.aspx"}	// 
function menu0507() {	location.href=base_path + "board_actfree/list.aspx"}	// 


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////

function menu06() {	menu0601();}	// 법학연구소
function menu0601() {	location.href=base_path + "labor/chief_greetings.aspx"}	// 소장인사
function menu0602() {	location.href=base_path + "labor/labor_info.aspx"}	// 연구소 소개
function menu0603() {	location.href=base_path + "labor/org_research.aspx"}	// 연구센터
function menu0604() {	location.href=base_path + "board_laborlaw/list.aspx"}	// 법학연구
function menu0605() {	location.href=base_path + "board_labordata/list.aspx"}	// 연구소 자료실
function menu0606() {	location.href=base_path + "board_laborfree/list.aspx"}	// 행사일정


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


function menu07() {	menu0701();}	// 정보마당
function menu0701() {	location.href=base_path + "board_notice/list.aspx"}	// 공지사항
function menu0702() {	location.href=base_path + "board_news/list.aspx"}	// ILS소식
function menu0703() {	location.href=base_path + "board_press/list.aspx"}	// 언론보도
function menu0704() {	location.href=base_path + "event/event.aspx"}	// 학사일정
function menu0705() {	location.href=base_path + "board_qna/list.aspx"}	// Q&A
function menu0706() {	location.href=base_path + "board_infodata/list.aspx"}	// 일반자료실
function menu0707() {	location.href=base_path + "board_form/list.aspx"}	// 규정 및 서식
function menu0708() {	location.href=base_path + "information/info_site.aspx"}	// 관련사이트

/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


function menu08() {	menu0801();}	// 사이트맵
function menu0801() {	location.href=base_path + "help/sitemap.aspx"}	// 사이트맵


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////

function menu09() {	menu0901();}	// 자료실
function menu0901() {	location.href=base_path + "data/univ.aspx"}	// 학사관련
function menu0902() {	location.href=base_path + "data/form.aspx"}	// 각종서식
function menu0903() {	location.href=base_path + "data/exam.aspx"}	// 자격시험
function menu0904() {	location.href=base_path + "data/thesis.aspx"}	// 논문


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


function menu10() {	location.href=base_path + "help/sitemap.aspx"}	// 사이트맵


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


function menu11() {	location.href=base_path + "login/login.aspx"}	// 로그인


/////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////


//function english() {	window.open('');}
function english() {alert("준비중입니다.");}