	function goBoardList() {
		document.frmForm.func_name.value = "list";
		document.frmForm.event_id.value="5098";
		document.frmForm.rows_page.value = "10";
		document.frmForm.curr_page.value = "1";
		document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardList";	
		document.frmForm.action = "/ingevent.kto";
		document.frmForm.submit();
	}

	// 사진등록이벤트
	function fc_login_check2(loginCheck, eventid){
		if(loginCheck == "loginfalse") {
			// 이벤트에 참여하기 위해서는 로그인을 하셔야 합니다.
			if(confirm("You must first log in to participate in this event.")) {
				document.LoginForm.method.value = "loginForm";		
				document.LoginForm.next_url.value="/ingevent.kto?func_name=write||jsp_name=HD/event/enu_20090408/boardWrite||event_id=5078||md=enu||lang_se=ENG";
				document.LoginForm.action = "/login.kto?method=eLogin&md=enu";
				document.LoginForm.target = "_parent";
				document.LoginForm.submit();
			}
		}else{
			document.frmForm.func_name.value = "write";		
			document.frmForm.event_id.value="5078";			
			document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardWrite";
			document.frmForm.action = "ingevent.kto";
			document.frmForm.target = "_parent";
			document.frmForm.submit();
		}
	}

	function goBoardSave() {
		if(document.frmForm.subject.value == ""){
			alert("Please enter the Title");
			return;
		}

		if(document.frmForm.cn.value == ""){
			alert("Please enter the Contents");
			return;
		}

			
			if (document.frmForm.file1.value) {
				if (!checkImageFile(document.frmForm.file1.value)) {
					alert("'Image column JPG, GIF, JPEG only upload!");
					return;
				}

				if (!getFileSize(document.frmForm.file1.value)) {
					alert("'Image file capacity is exceeded");
					return;
				}
			}

			if (document.frmForm.file2.value) {
				if (!checkImageFile(document.frmForm.file2.value)) {
					alert("'Image column JPG, GIF, JPEG only upload!");
					return;
				}

				if (!getFileSize(document.frmForm.file2.value)) {
					alert("'Image file capacity is exceeded");
					return;
				}
			}

			if (document.frmForm.file3.value) {
				if (!checkImageFile(document.frmForm.file3.value)) {
					alert("'Image column JPG, GIF, JPEG only upload!");
					return;
				}

				if (!getFileSize(document.frmForm.file3.value)) {
					alert("'Image file capacity is exceeded");
					return;
				}
			}

		document.frmForm.action = "/ingevent.kto";
		document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardList";
		document.frmForm.event_id.value="5098";
		document.frmForm.rows_page.value = "10";
		document.frmForm.curr_page.value = "1";
		document.frmForm.lang_se.value = "ENG";
		document.frmForm.fileSe.value = "img";
		document.frmForm.jsp_page.value = "list";
		document.frmForm.thumb_yn.value = "N";
		document.frmForm.func_name.value = "writeProcess";
		document.frmForm.submit();
	}

	function goBoardModify() {
		document.frmForm.func_name.value = "modify";
		document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardModify";	
		document.frmForm.event_id.value="5098";
		document.frmForm.fileSe.value = "img";
		document.frmForm.action = "/ingevent.kto";
		document.frmForm.submit();
	}

	function goBoardUpdate(){
		if(document.frmForm.subject.value == ""){
			alert("Please enter the Title");
			return;
		}

		if(document.frmForm.cn.value == ""){
			alert("Please enter the Contents");
			return;
		}
		if (document.frmForm.file1.value) {
				if (!checkImageFile(document.frmForm.file1.value)) {
					alert("'Image column JPG, GIF, JPEG only upload!");
					return;
				}

				if (!getFileSize(document.frmForm.file1.value)) {
					alert("'Image file capacity is exceeded");
					return;
				}
			}

			if (document.frmForm.file2.value) {
				if (!checkImageFile(document.frmForm.file2.value)) {
					alert("'Image column JPG, GIF, JPEG only upload!");
					return;
				}

				if (!getFileSize(document.frmForm.file2.value)) {
					alert("'Image file capacity is exceeded");
					return;
				}
			}

			if (document.frmForm.file3.value) {
				if (!checkImageFile(document.frmForm.file3.value)) {
					alert("'Image column JPG, GIF, JPEG only upload!");
					return;
				}

				if (!getFileSize(document.frmForm.file3.value)) {
					alert("'Image file capacity is exceeded");
					return;
				}
			}
		
		document.frmForm.action = "/ingevent.kto";
		document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardList";
		document.frmForm.event_id.value="5098";
		document.frmForm.lang_se.value = "ENG";
		document.frmForm.fileSe.value = "img";
		document.frmForm.jsp_page.value = "list";
		document.frmForm.thumb_yn.value = "N";
		document.frmForm.func_name.value = "modifyProcess";
		document.frmForm.submit();		
	}
	
	function goBoardView(seqno) {
		document.frmForm.func_name.value = "view";
		document.frmForm.event_sn.value = seqno;
		document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardView";
		document.frmForm.event_id.value="5098";
		document.frmForm.action = "/ingevent.kto";
		document.frmForm.submit();		
	}
/*
    function checkImageFile(str) {
        var arr = ("file:///"+str.replace(/ /gi,"%20").replace(/\\/gi,"/")).split("/");
        var fname = arr[arr.length-1];
        var e = fname.length;
        var m=fname.lastIndexOf(".");
        var filename=fname.substring(0,m); //파일명
        var extname=fname.substring(m+1,e); //확장자명
            
        if(extname.toUpperCase()=="JPG" || extname.toUpperCase()=="GIF" || extname.toUpperCase()=="JPEG") {
            return true;
        } else {
            return false;
        }
    } 

	function getFileSize(filePath, idx) {
    	
    		var len = 0;
        var maxSize = 1024*1024*2;
        
       if ( navigator.appName.indexOf("Netscape") != -1) {
            try {
                netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
            } catch(e) {
                alert("'Signed.applets.codebase_principal_support'  S’il vous plaît laissez-moi série!\n"+e);
                return -1;
            }
            try {
                var file = Components.classes["@mozilla.org/file/local;1"]
                                     .createInstance(Components.interfaces.nsILocalFile);
                file.initWithPath ( filePath );
                
                len = file.fileSize;
            } catch(e) {
                alert("Error!!:"+e);
            }
        } else if (navigator.appName.indexOf('Microsoft') != -1) {
		     	//ie 7이 아닌 경우에는 스크립트에서 파일 사이즈 체크
		     	//ie 7일 경우에는 서버에서 사이즈 체크
					if(navigator.appVersion.indexOf("MSIE 7") < 0){  
						var img = new Image();
						img.dynsrc = filePath;
						len = img.fileSize;
					}
        }

        if (len > maxSize) {
            return false;
        } else {
            return true;
        }
    }
*/
	function goBoardPage(curr_page) {
		document.frmForm.func_name.value = "list";
		document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardList";
		document.frmForm.event_id.value="5098";
		document.frmForm.curr_page.value = curr_page;
		document.frmForm.action = "/ingevent.kto";
		document.frmForm.submit();
	}	

	function goBoardDelete() {
		if(confirm("Are you sure you want to delete?")){
			document.frmForm.func_name.value = "delete";
			document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardList";
			document.frmForm.event_id.value="5098";
			document.frmForm.jsp_page.value = "list";
			document.frmForm.thumb_yn.value = "N";
			document.frmForm.action = "/ingevent.kto";
			document.frmForm.submit();
		}
	}	

	/*
	' ------------------------------------------------------------------
	' Function    : fc_chk_byte(aro_name)
	' Description : 입력한 글자수를 체크
	' Argument    : Object Name(글자수를 제한할 컨트롤)
	' Return      : 
	' ------------------------------------------------------------------
	*/
	function fc_chk_byte(aro_name,ari_max)
	{
	   var ls_str     = aro_name.value; // 이벤트가 일어난 컨트롤의 value 값
	   var li_str_len = ls_str.length;  // 전체길이

	   // 변수초기화
	   var li_max      = ari_max; // 제한할 글자수 크기
	   var i           = 0;  // for문에 사용
	   var li_byte     = 0;  // 한글일경우는 3 그밗에는 1을 더함
	   var li_len      = 0;  // substring하기 위해서 사용
	   var ls_one_char = ""; // 한글자씩 검사한다
	   var ls_str2     = ""; // 글자수를 초과하면 제한할수 글자전까지만 보여준다.

	   for(i=0; i< li_str_len; i++)
	   {
		  // 한글자추출
		  ls_one_char = ls_str.charAt(i);

		  // 한글이면 2를 더한다.
		  if (escape(ls_one_char).length > 4)
		  {
			 li_byte += 3;
		  }
		  // 그밗의 경우는 1을 더한다.
		  else
		  {
			 li_byte++;
		  }

		  // 전체 크기가 li_max를 넘지않으면
		  if(li_byte <= li_max)
		  {
			 li_len = i + 1;
		  }
	   }
	   
	   // 전체길이를 초과하면
	   if(li_byte > li_max)
	   {
		  alert( " You cannot exceed 1000 number of characters. Exceeded characters are automatically deleted.");
		  ls_str2 = ls_str.substr(0, li_len);
		  aro_name.value = ls_str2;
		  
	   }
	   
	   aro_name.focus();   
	}

	function chrCnt(aro_name, input)
	{
		var ls_str     = aro_name.value; // 이벤트가 일어난 컨트롤의 value 값
	   var li_str_len = ls_str.length;  // 전체길이

	   // 변수초기화
	   var i           = 0;  // for문에 사용
	   var li_byte     = 0;  // 한글일경우는 3 그밗에는 1을 더함
	   var li_len      = 0;  // substring하기 위해서 사용
	   var ls_one_char = ""; // 한글자씩 검사한다
	   var ls_str2     = ""; // 글자수를 초과하면 제한할수 글자전까지만 보여준다.

	   for(i=0; i< li_str_len; i++)
	   {
		  // 한글자추출
		  ls_one_char = ls_str.charAt(i);

		  // 한글이면 2를 더한다.
		  if (escape(ls_one_char).length > 4)
		  {
			 li_byte += 3;
		  }
		  // 그밗의 경우는 1을 더한다.
		  else
		  {
			 li_byte++;
		  }
	   }

	   input.value = li_byte;
	}

	function goBoardDeleteFile(del_index) {
		if(confirm("Are you sure you want to delete?")){
			document.frmForm.func_name.value = "deleteFile";
			document.frmForm.jsp_name.value = "HD/event/enu_20090408/boardModify";
			document.frmForm.event_id.value="5098";
			document.frmForm.del_index.value=del_index;
			document.frmForm.jsp_page.value = "list";
			document.frmForm.thumb_yn.value = "N";
			document.frmForm.action = "/ingevent.kto";
			document.frmForm.submit();
		}
	}	