function openImage(file, width, height) { var window_left = (screen.width-640)/2; var window_top = (screen.height-480)/2; image = window.open('', '', 'width=' + width + ', height=' + height + ', scrollbars=yes,top=' + window_top + ',left=' + window_left + ''); image.document.write(''); image.document.write(''); image.document.write(''); } // 그림 이미지 비례 조정 function resizeImg(target_img,s_width,s_height) { var newX; var newY; var newHeight; var newWidth; var maxWidth = s_width; var maxHeight = s_height; var newImg = new Image(); newImg.src = target_img.src; imgw = newImg.width; imgh = newImg.height; if (imgw > maxWidth || imgh > maxHeight) { if (imgw > imgh) { if (imgw > maxWidth) newWidth = maxWidth; else newWidth = imgw; newHeight = Math.round((imgh * newWidth) / imgw); } else { if (imgh > maxHeight) newHeight = maxHeight; else newHeight = imgh; newWidth = Math.round((imgw * newHeight) / imgh); } } else { newWidth = imgw; newHeight = imgh; } newX = maxWidth / 2 - newWidth / 2; newY = maxHeight / 2 - newHeight / 2; target_img.onload = null; target_img.src = newImg.src; target_img.width = newWidth; target_img.height = newHeight; } // 메모 입력시 입력값 검사하기 function checkMemo() { if(!document.frm_memo.f_name.value) { alert('이름를 입력하세요 !!'); document.frm_memo.f_name.focus(); return; } if(!document.frm_memo.f_passwd.value) { alert('비밀번호를 입력하세요 !!'); document.frm_memo.f_passwd.focus(); return; } if(!document.frm_memo.f_memo.value) { alert('메모를 입력하세요 !!'); document.frm_memo.f_memo.focus(); return; } document.frm_memo.submit(); } function deleteMemo() { if(!document.frm_memo.f_passwd.value) { alert('비밀번호를 입력하세요 !!'); document.frm_memo.f_passwd.focus(); return; } document.frm_memo.submit(); } // 메모 입력시 입력값 검사하기 function rpl_checkMemo() { if(!document.frm_memo.f_name.value) { alert('이름를 입력하세요 !!'); document.frm_memo.f_name.focus(); return; } if(!document.frm_memo.f_passwd.value) { alert('비밀번호를 입력하세요 !!'); document.frm_memo.f_passwd.focus(); return; } if(!document.frm_memo.f_memo.value) { alert('메모를 입력하세요 !!'); document.frm_memo.f_memo.focus(); return; } document.frm_memo.submit(); } function deleteMemo() { if(!document.frm_memo.f_passwd.value) { alert('비밀번호를 입력하세요 !!'); document.frm_memo.f_passwd.focus(); return; } document.frm_memo.submit(); } function search() { document.search.submit(); } function openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function login_chk() { alert("인코아 회원 전용 입니다.\n회원 인증 후에 이용하시기 바랍니다"); location.href="/member/login.html?rtnUrl=/eng/cgi/js/board.js"; }