gs_nwbWebRoot = "http://domisol.net/webboard/skin/js/../.."; function nwbOpenWindow( 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); } function nwbShowUserInfo( nUserIdx ) { sUrl = gs_nwbWebRoot + "/script/user_info.php?user_idx=" + nUserIdx ; //nwbOpenWindow( "user_information", sUrl, 0, 0, 405, 500, 0, 0, 1, , 1 ); window.open( sUrl, 'User_Infomation', 'scrollbars=yes,resizable=yes,width=430 ,height=680'); } // -- list page -- function nwbChangeCategory( nIdx ) { var oForm = document.form_category_change; oForm.ct.value = nIdx; oForm.submit(); } function nwbTrim( sStr ) { var il, ir, sl, sr, fComplete = false; il = 0; ir = sStr.length-1; while ( il <= ir && !fComplete ) { sl = sStr.charAt( il ); sr = sStr.charAt( ir ); if ( sl == ' ' || sl == '\t' ) { il++; fComplete = false; } else { fComplete = true; } if ( sr == ' ' || sr == '\t' ) { ir--; fComplete = false; } else { fComplete = true; } } return ( "" + sStr.slice( il, ir+1 ) ); } function nwbIsNumeric( sInput ) { return !isNaN( sInput ); } // -- Input Check Functions -- function nwbCheckInputText( oInput, sMsg, fFocus ) { var sTmp = nwbTrim( oInput.value ); var args = nwbCheckInputText.arguments; if ( sTmp == "" ) { alert( sMsg ); if ( fFocus || args.length == 2 ) { oInput.focus(); } return false; } return true; } function nwbCheckInputSelect( oInput, sMsg, fFocus ) { } function nwbCheckSearch() { form = document.form_search; fCheck = nwbCheckInputText(form.q, "°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁֽʽÿÀ."); if ( !fCheck ) return false; if ( form["qt[n]"].checked == false && form["qt[s]"].checked == false && form["qt[c]"].checked == false ) { alert( "°Ë»öÇ׸ñÀ» ÁöÁ¤ÇØÁֽʽÿÀ." ); return false; } return true; } function nwbCheckReplyMail( reply_field, mail_field ) { if ( reply_field.checked ) { if ( nwbTrim( mail_field.value ) == "" ) { mail_field.focus(); alert("À̸ÞÀÏ ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù."); return false; } } } var gfInProcessing = false; function nwbCheckWriteForm() { var form_write = document.form_write; var args = nwbCheckWriteForm.arguments; var nArgNum = args.length; // During submit process, prevent additional submit request. if ( gfInProcessing ) { return false; } for ( var i = 0; i < nArgNum; i++ ) { if (args[i] == "name") { if (nwbTrim(form_write.name.value) == "") { form_write.name.focus(); alert("ÀÛ¼ºÀÚ À̸§ÀÌ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "password") { if (nwbTrim(form_write.password.value) == "") { form_write.password.focus(); alert("ºñ¹Ð¹øÈ£°¡ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "subject") { if (nwbTrim(form_write.subject.value) == "") { form_write.subject.focus(); alert("Á¦¸ñÀÌ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "content") { if (nwbTrim(form_write.content.value) == "") { form_write.content.focus(); alert("±Û ³»¿ëÀÌ ¾ø½À´Ï´Ù."); return false; } if (form_write.content.value.length > 65536 ) { alert("±Û ¿ë·®ÀÌ ÃÊ°úµÇ¾î ÀúÀåÇÒ ¼ö ¾ø½À´Ï´Ù.\n±Û ¼ö¸¦ ÁÙÀ̽ñ⠹ٶø´Ï´Ù."); return false; } } if (args[i] == "category") { if (form_write.category.options[0].selected) { form_write.category.focus(); alert("Ä«Å×°í¸®¸¦ ¼±ÅÃÇÏÁö ¾Ê¾Ò½À´Ï´Ù."); return false; } } if (args[i] == "file") { if (document.form_upload_file.file_list.options.length < 2) { alert("ÆÄÀÏÀ» ¼±ÅÃÇÏÁö ¾Ê¾Ò½À´Ï´Ù."); return false; } } if (args[i] == "email") { if (nwbTrim(form_write.email.value) == "") { form_write.email.focus(); alert("À̸ÞÀÏ ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "homepage") { if (nwbTrim(form_write.homepage.value) == "") { form_write.homepage.focus(); alert("ȨÆäÀÌÁö ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "fileupload") { var sFileList = nwbGetFileList(); form_write.file_list.value = sFileList; } } // Submit form form_write.submit(); gfInProcessing = true; return false; } function nwbCheckWriteFormEx(form_name) { var form_write = document.forms[form_name]; var args = nwbCheckWriteFormEx.arguments; var nArgNum = args.length; if ( gfInProcessing ) { return false; } for ( var i = 1; i < nArgNum; i++ ) { if (args[i] == "name") { if (nwbTrim(form_write.name.value) == "") { form_write.name.focus(); alert("ÀÛ¼ºÀÚ À̸§ÀÌ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "password") { if (nwbTrim(form_write.password.value) == "") { form_write.password.focus(); alert("ºñ¹Ð¹øÈ£°¡ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "subject") { if (nwbTrim(form_write.subject.value) == "") { form_write.subject.focus(); alert("Á¦¸ñÀÌ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "content") { if (nwbTrim(form_write.content.value) == "") { form_write.content.focus(); alert("±Û ³»¿ëÀÌ ¾ø½À´Ï´Ù."); return false; } if (form_write.content.value.length > 65536 ) { alert("±Û ¿ë·®ÀÌ ÃÊ°úµÇ¾î ÀúÀåÇÒ ¼ö ¾ø½À´Ï´Ù.\n±Û ¼ö¸¦ ÁÙÀ̽ñ⠹ٶø´Ï´Ù."); return false; } } if (args[i] == "category") { if (form_write.category.options[0].selected) { form_write.category.focus(); alert("Ä«Å×°í¸®¸¦ ¼±ÅÃÇÏÁö ¾Ê¾Ò½À´Ï´Ù."); return false; } } if (args[i] == "file") { if (document.form_upload_file.file_list.options.length < 2) { alert("ÆÄÀÏÀ» ¼±ÅÃÇÏÁö ¾Ê¾Ò½À´Ï´Ù."); return false; } } if (args[i] == "email") { if (nwbTrim(form_write.email.value) == "") { form_write.email.focus(); alert("À̸ÞÀÏ ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "homepage") { if (nwbTrim(form_write.homepage.value) == "") { form_write.homepage.focus(); alert("ȨÆäÀÌÁö ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù."); return false; } } if (args[i] == "fileupload") { var sFileList = nwbGetFileList(); form_write.file_list.value = sFileList; } } // Submit form form_write.submit(); gfInProcessing = true; return false; } function nwbAddFile(sFileName, sTempDirFileName) { var oOption = new Option(sFileName, sTempDirFileName); var nLength = document.form_upload_file.file_list.length; document.form_upload_file.file_list.options[nLength] = oOption; // Save on Cookie gaAttachedFileList[gaAttachedFileList.length] = new Array( sTempDirFileName, sFileName ); sAttachedFileList = array2String( gaAttachedFileList ); setCookie( gsTempDirName, sAttachedFileList, getExpDate( 1, 0, 0 ) ); } function nwbDeleteFile() { var sDoc = document.form_upload_file.file_list; for (var i = 1; i < sDoc.options.length; i++) // Start from index 1 due to help message, "Max. attachments..." { if (sDoc.options[i].selected) { sDoc.options[i] = null; break; } } } function nwbDeleteTmpFile() { var sDoc = document.form_upload_file.file_list; sAttachedFileList = array2String( gaAttachedFileList ); var sDoc = document.form_upload_file.file_list; for (var i = 1; i < sDoc.options.length; i++) { if (sDoc.options[i].selected) { gaAttachedFileList[i-1] = null; document.form_delete_file.file_path.value = sDoc.options[i].value; break; } } // Save on Cookie sAttachedFileList = array2String( gaAttachedFileList ); setCookie( gsTempDirName, sAttachedFileList, getExpDate( 1, 0, 0 ) ); document.form_delete_file.submit(); } function nwbGetFileList() { var oSelect = document.form_upload_file.file_list; var aFileName = new Array(); var nCnt = 0; for (var i = 0; i < oSelect.options.length; i++) { if ( oSelect.options[i].value == -1 ) continue; aFileName[nCnt++] = oSelect.options[i].value; } var sFileList = aFileName.join(" "); return sFileList; } function nwbCheckRegistForm(mode, prev_photo_path) { var sDoc = window.document.form_regist; if (mode == "user_regist" ) { if (nwbTrim(sDoc.id.value) == "") { sDoc.id.focus(); alert("¾ÆÀ̵𰡠ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù."); return; } if (nwbTrim(sDoc.password1.value) == "") { sDoc.password1.focus(); alert("ºñ¹Ð¹øÈ£°¡ ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù."); return; } if (nwbTrim(sDoc.password2.value) == "") { sDoc.password2.focus(); alert("È®ÀÎ¿ë ºñ¹Ð¹øÈ£°¡ ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù."); return; } if (nwbTrim(sDoc.name.value) == "") { sDoc.name.focus(); alert("À̸§ÀÌ ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù."); return; } } if (sDoc.password1.value != sDoc.password2.value) { sDoc.password1.focus(); alert("ºñ¹Ð¹øÈ£°¡ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù."); return; } if (nwbTrim(sDoc.email.value) == "") { sDoc.email.focus(); alert("email ÁÖ¼Ò°¡ ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù."); return; } ret = sDoc.submit(); return true; } function nwbOpenIdCheck() { link = "http://domisol.net/webboard/skin/js/../../script/check_id.php?id=" + document.form_regist.id.value; window.open(link, '', 'scrollbars=yes,resizable=yes,width=350 ,height=230'); } function nwbOpenZipCode(form_name, tag_postcode, tag_addr) { link = "http://domisol.net/webboard/skin/js/../.." + "/script/post_code.php"; link += "?form_name=" + form_name; link += "&tag_postcode=" + tag_postcode; link += "&tag_addr=" + tag_addr; window.open( link, 'home_zipcode', 'scrollbars=yes,resizable=yes,width=350 ,height=300'); } function nwbSetFocusRegisterForm() { document.form_regist.id.focus(); } function nwbCheckIdForm() { var sDoc = window.document.form_check_id; if (nwbTrim(sDoc.user_id.value) == "" ) { alert("¾ÆÀ̵𸦠ÀÔ·ÂÇϽʽÿÀ."); sDoc.user_id.focus(); return; } sDoc.submit(); return true; } function nwbCloseWindow() { var sDoc = window.opener.document.form_regist; sDoc.id.value = document.form_check_id.user_id.value; self.close(); } function nwbLoginSetFocus() { document.form_check_password.user_id.focus(); } function nwbLoginShowWarning() { fCheck = true; if ( document.form_check_password.f_save_user_id.checked == true ) fCheck = confirm( "¾ÆÀ̵ð ÀúÀåÀ» üũÇÏ½Ã¸é ´ÙÀ½¹ø ·Î±×ÀÎ ÇÏ½Ç ¶§, ¾ÆÀ̵𸦠´Ù½Ã ÀÔ·ÂÇÒ ÇÊ¿ä°¡ ¾ø½À´Ï´Ù.\n´Ü, ¸ðµç »ç¶÷ÀÌ °øÀ¯ÇÏ´Â ÄÄÇ»Åͳª PC¹æ¿¡¼­´Â ³ëÃâÀÌ µÉ ¼ö ÀÖÀ¸´Ï »ç¿ëÇÏÁö ¸¶½Ê½Ã¿À." ); return fCheck; } function nwbLoginFormSubmit() { user_id = document.form_check_password.user_id; password = document.form_check_password.password; if ( !nwbCheckInputText( user_id, "¾ÆÀ̵𰡠ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù." ) ) return false; else if ( !nwbCheckInputText( password, "ºñ¹Ð¹øÈ£°¡ ÀԷµÇÁö ¾Ê¾Ò½À´Ï´Ù." ) ) return false; else return true; } var gOnLoadHandler = new Array(); function nwbAddOnLoad( funcOnLoad ) { isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false; IEmac = ((document.all)&&(isMac)) ? true : false; IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false; if (IEmac && IE4) { window.onload = nwbOnLoad; gOnLoadHandler[gOnLoadHandler.length] = funcOnLoad; } else if (window.onload) { if (window.onload != nwbOnLoad) { gOnLoadHandler[0] = window.onload; window.onload = nwbOnLoad; } gOnLoadHandler[gOnLoadHandler.length] = funcOnLoad; } else { window.onload = funcOnLoad; } } function nwbOnLoad() { for (var i=0;i' + sPreview + ''; oDivPreview.innerHTML= sPreview; oDivPreview.style.visibility = "visible"; return false; } function nwb_preview_photo_hide() { oDivPreview.style.visibility="hidden"; } document.write( '' ); // // -- Making a WB defined tag to be given attached files -- // function nwb_MakeImgTag( width, height, align ) { var oSelect = document.form_upload_file.file_list; var bChecked = false; if (oSelect.options.length <= 1) { alert("¾÷·ÎµåÇÑ ÆÄÀÏÀÌ ¾ø½À´Ï´Ù."); return; } for (var i = 0; i < oSelect.options.length; i++) { if (oSelect.options[i].selected == true && oSelect.options[i].value != -1) { bChecked= true; break; } } if (!bChecked) { alert("¸ñ·Ï¿¡¼­ À̹ÌÁö ÆÄÀÏ Çϳª¸¦ ¼±ÅÃÇϽʽÿÀ."); return; } else { if (nwbCheckImageExt(oSelect.options[i].value) == false ) { alert("¼±ÅÃÇÑ ÆÄÀÏ È®ÀåÀÚ´Â À̹ÌÁö ű׸¦ ¸¸µé ¼ö ¾ø½À´Ï´Ù."); return; } else { nwbWriteTextArea(oSelect.options[i].text, oSelect.options[i].value, width, height, align ); return; } } } function nwbWriteTextArea(text, value, width, height, align ) { var oTextarea = document.form_write.content var sPrefix = value.substring(0,21) oTextarea.value = document.form_write.content.value + "\n<%NWBIMG|" + text + "|" + sPrefix + "|WIDTH:" + width + "|HEIGHT:" + height + "|ALIGN:" + align + "|%>\n"; } function nwbCheckImageExt(sFileExt) { var sLowerStr = sFileExt.toLowerCase(); var nLastDot = sLowerStr.lastIndexOf("."); var sExt = sLowerStr.substring(nLastDot+1,sLowerStr.length) if (sExt == "jpg" ||sExt == "jpeg" || sExt == "jpe" || sExt == "gif" || sExt == "png" ) return true; else return false; }