function fn_listCheckBoxs(boxName) { var obj = document.getElementsByName(boxName); if (obj) { if (obj.length == 0) { return false; } if (!obj.length) { if (!obj.checked) { alert("변경할 게시물을 선택해 주세요."); } else { return true; } } else { var check = false; for ( var i = 0; i < obj.length; i++) { if (obj[i].checked) { check = true; } } if (!check) { alert("변경할 게시물을 선택해 주세요."); return false; } else { return true; } } } } function fn_allChecked(boxName, listBoxName) { var checkAllObj = document.getElementById(boxName); var checkListObj = document.getElementsByName(listBoxName); if (checkAllObj.checked) { if (checkListObj) { if (!checkListObj.length) { checkListObj.checked = true; } else { for ( var i = 0; i < checkListObj.length; i++) { checkListObj[i].checked = true; } } } else { return false; } } else { if (checkListObj) { if (!checkListObj.length) { checkListObj.checked = false; } else { for ( var i = 0; i < checkListObj.length; i++) { checkListObj[i].checked = false; } } } else { return false; } } } function fn_submit(actionURL, type) { var f = document.listfrm; f.action = actionURL; if (type == 'DIS') { f.type.value = 'N'; } else if (type == 'HID') { f.type.value = 'Y'; } else { } if (fn_listCheckBoxs('boardID')) { f.submit(); } else { return false; } } function img_view(imgPath) { imgObject = new Image(); imgObject.src = imgPath; imgWidth = imgObject.width + 18; imgHeight = imgObject.height; if (screen.width < imgWidth) imgWidth = screen.width; if (screen.height < imgHeight) imgHeight = screen.height; LeftPosition = (screen.width) ? (screen.width - imgWidth) / 2 : 100; TopPosition = (screen.height) ? (screen.height - imgHeight) / 2 : 100; var winHandle = window.open("", "PictureView", "toolbar=no,scrollbars=yes,resizable=no,width=" + imgWidth + ",height=" + imgHeight + ",top=" + TopPosition + ",left=" + LeftPosition) if (winHandle != null) { var htmlString = ""; htmlString += "View Image" htmlString += "" htmlString += "" htmlString += "" winHandle.document.open() winHandle.document.write(htmlString) winHandle.document.close() } if (winHandle != null) winHandle.focus() return winHandle } function WinPop(url, name, w, h, s) { if(s == 99){ sOp = ",scrollbars=no,status=0,titlebar=0,toolbar=0"; }else{ if (s != 0) { sOp = ",scrollbars=yes"; } else { sOp = "status=1"; } } var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winOptions = 'width=' + w + ',height=' + h + ',top=' + wint + ',left=' + winl + ',' + sOp; var winObj = window.open(url, name, winOptions); return winObj; } //화면 부분인쇄 function printDiv() { window.open('/htm/common/print.html', '미리보기', 'width=800,height=700,top=0,left=0,noresizable,toolbar=no,status=no,scrollbars=yes,directory=no'); }