var WRITEFORM = document.form; var REMAIN_UPLOADSIZE; var GRPID; var ALBUMBOARD = false; var FLDID; var DATAID; var DESIGNMODE = "on"; var imgkey; function editor_load( mode ) { if ( typeof( mode ) != "undefined" ){ DESIGNMODE = mode; } if (ie) { getIframeDocumentObj(curEditor).designMode = DESIGNMODE; getIframeDocumentObj(curEditor).open(); getIframeDocumentObj(curEditor).write(window_style); getIframeDocumentObj(curEditor).close(); } else { initIframe_firefox(curEditor); } document.onclick = function() { if (supporterArea) editor_closeSupporter(); supporterArea = true; } } function loadContent(editortype, arg_remain_uploadsize, arg_albumboard, arg_grpid, arg_fldid, arg_dataid, arg_designmode) { DESIGNMODE = arg_designmode; REMAIN_UPLOADSIZE = arg_remain_uploadsize; GRPID = arg_grpid; FLDID = arg_fldid; ALBUMBOARD = arg_albumboard; DATAID = arg_dataid; imgkey = "ATTACH_IMAGES_"+arg_grpid+","+arg_fldid+","; if ( editortype == "Z" || editortype == "2") { editortype = "L"; } else if ( editortype == "z" || editortype == "" ) { editortype = "T"; } else if ( editortype == "9" || editortype == 1) { editortype = "G"; } var obj = document.createElement("SPAN"); var cont = ""; if ( WRITEFORM.content != null ) { cont = WRITEFORM.content.value; } if ( editortype == "L" ){ obj.id = "e_H"; var tmpObj = document.createElement("DIV"); try{ if ( cont.indexOf( "cafe_editor_main_table_color" ) > -1 && cont.indexOf( "cafe_editor_main_table" ) > -1 ){ tmpObj.innerHTML = cont; var bcolor = tmpObj.document.getElementById("cafe_editor_main_table_color").bgColor; getIframeDocumentObj(curEditor).body.style.backgroundColor= bcolor; getIframeDocumentObj(curEditor).body.innerHTML = tmpObj.document.getElementById("cafe_editor_main_table").innerHTML; } else{ getIframeDocumentObj(curEditor).body.innerHTML = cont; } } catch ( e ){ getIframeDocumentObj(curEditor).body.innerHTML = cont; } }else if ( editortype == "G" ) { obj.id = "e_S"; document.getElementById('e_S_body').value = cont; } else { obj.id = "e_T"; document.getElementById('e_T_body').value = cont; } editChangeTab(obj); } function isHtmlEditor(){ if ( edit_suffix == "L" ){ return true; } else { return false; } } var ie = (document.all ? true : false); var curEditor = 'e_H_body'; var e_selected_mode = "e_H"; var e_selected_mode_before = ""; var supporterArea = true; var curSelection; var window_style = ""; ///////////////////////////////////////////////////////////////////// // UI variables Start var e_supporter_template = new Array(); e_supporter_template[0] = '
'; e_supporter_template[1] = ''; e_supporter_template[2] = '
'; var e_s_size = new Array(); var e_default_word = "°¡³ª´Ù¶ó¸¶¹Ù»ç"; // Åø ÆË¾÷ Å×À̺í - ±ÛÀÚü e_s_size["e_font"] = [180, 137]; var e_font_Html=''; e_font_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (±¼¸²)
'; e_font_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (µ¸¿ò)
'; e_font_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (¹ÙÅÁ)
'; e_font_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (±Ã¼­)
'; e_font_Html+='abcdefghijklm (arial)
'; e_font_Html+='abcdefghijklm (verdana)
'; // Åø ÆË¾÷ Å×À̺í - ±ÛÀÚÅ©±â e_s_size["e_size"] = [322, 228]; var e_size_Html=''; e_size_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (8pt)
'; e_size_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (10pt)
'; e_size_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (12pt)
'; e_size_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (14pt)
'; e_size_Html+='°¡³ª´Ù¶ó¸¶¹Ù»ç (18pt)
'; e_size_Html+='°¡³ª´Ù¶ó¸¶ (24pt)
'; e_size_Html+='°¡³ª´Ù (36pt)
'; // Åø ÆË¾÷ Å×À̺í - ±ÛÀÚ»ö±ò e_s_size["e_color"] = [212, 257]; var e_color_list = new Array("#000000", "#ff3300", "#ff0099", "#ff6600", "#cc00ff", "#cc9900", "#0000ff", "#33cc00", "#0099ff", "#009999"); var e_color_Html=''; for (var i=0;i < e_color_list.length ; i++) { e_color_Html+= ''+e_default_word+''; if ( (i%2) == 1) e_color_Html+= '
'; else e_color_Html+= '   '; } // Åø ÆË¾÷ Å×À̺í - ±ÛÀÚ¹è°æ»ö e_s_size["e_bgcolor"] = [210, 258]; var e_bgcolor_Html=''; for (var i=0;i < e_color_list.length ; i++) { e_bgcolor_Html+= ''+e_default_word+''; if ( (i%2) == 1) e_bgcolor_Html+= '
'; else e_bgcolor_Html+= '  '; } // »ö±ò°ü·Ã var colorPickType = ""; var colortone = new Array(10); colortone[0] = new Array('#ffffff','#e5e4e4','#d9d8d8','#c0bdbd','#a7a4a4','#8e8a8b','#827e7f','#767173','#5c585a','#000000'); colortone[1] = new Array('#fefcdf','#fef4c4','#feed9b','#fee573','#ffed43','#f6cc0b','#e0b800','#c9a601','#ad8e00','#8c7301'); colortone[2] = new Array('#ffded3','#ffc4b0','#ff9d7d','#ff7a4e','#ff6600','#e95d00','#d15502','#ba4b01','#a44201','#8d3901'); colortone[3] = new Array('#ffd2d0','#ffbab7','#fe9a95','#ff7a73','#ff483f','#fe2419','#f10b00','#d40a00','#940000','#6d201b'); colortone[4] = new Array('#ffdaed','#ffb7dc','#ffa1d1','#ff84c3','#ff57ac','#fd1289','#ec0078','#d6006d','#bb005f','#9b014f'); colortone[5] = new Array('#fcd6fe','#fbbcff','#f9a1fe','#f784fe','#f564fe','#f546ff','#f328ff','#d801e5','#c001cb','#8f0197'); colortone[6] = new Array('#e2f0fe','#c7e2fe','#add5fe','#92c7fe','#6eb5ff','#48a2ff','#2690fe','#0162f4','#013add','#0021b0'); colortone[7] = new Array('#d3fdff','#acfafd','#7cfaff','#4af7fe','#1de6fe','#01deff','#00cdec','#01b6de','#00a0c2','#0084a0'); colortone[8] = new Array('#edffcf','#dffeaa','#d1fd88','#befa5a','#a8f32a','#8fd80a','#79c101','#3fa701','#307f00','#156200'); colortone[9] = new Array('#d4c89f','#daad88','#c49578','#c2877e','#ac8295','#c0a5c4','#969ac2','#92b7d7','#80adaf','#9ca53b'); e_s_size["e_bodybgcolor"] = [198, 144]; var e_bodybgcolor_Html = '
'; for (var i=0;i < colortone.length; i++) { for (var j=0; j < colortone[i].length ; j++) { e_bodybgcolor_Html += ' '; } e_bodybgcolor_Html += '
'; } e_bodybgcolor_Html += '
'; /* »õ À̸ðƼÄÜ °ü·Ã */ e_s_size["e_emoticon"] = [260, 135]; var emoticon_name = new Array(); var emoticon_img = new Array(); var total_imt_cnt= 0; var cnt_name_cnt=0; var n=0; /* function addIconIng(cnt,n){ var i= 0; var imtUrl= "http://cafeimg.hanmail.net/cf_img/m_icon/"; var imgNum= 1; var thema= "joy"; var start= 0; if(n==1){ start=60; imgNum=4; thema= "etc"; } for(i=0;i= 0 ? true : false; var nowkong = new kong(); function kong() { this.emoticon = 0; this.RestoreSelection = Kong_RestoreSelection; this.selection = null; } function Kong_RestoreSelection() { if (this.selection) { this.selection.select(); } } // ¸µÅ© °ü·Ã e_s_size["e_link"] = [240, 135]; var e_link_Html = ''; e_link_Html = '
¼±ÅÃµÈ ºÎºÐ¿¡ °É¸±
¸µÅ© ÁÖ¼Ò(url)¸¦ ³Ö¾î ÁÖ¼¼¿ä.

'; e_link_Html += '(¿¹ : http://www.batculture.co.kr)
"http://" ²À ½á¾ßÇÔ

'; e_link_Html += '
'; e_link_Html += '
'; // UI variables end ///////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// // editor Apply Act function e_font_func(value) { editor_focus(); getIframeDocumentObj(curEditor).execCommand("fontname", false, value); editor_closeSupporter(); editor_focus(); } function selectEdit(){ getIframeDocumentObj(curEditor).selection.createRange().select(); } function e_size_func(value) { editor_focus(); getIframeDocumentObj(curEditor).execCommand("FontSize", false, value); editor_closeSupporter(); editor_focus(); } function e_act_func(act) { editor_focus(); var action = act.split("_"); getIframeDocumentObj(curEditor).execCommand(action[1], false, null); editor_focus(); } function e_color_func(value) { editor_focus(); getIframeDocumentObj(curEditor).execCommand("ForeColor", false, value); editor_closeSupporter(); editor_focus(); } function e_bgcolor_func(value) { editor_focus(); if(ie) getIframeDocumentObj(curEditor).execCommand("BackColor", false, value); else getIframeDocumentObj(curEditor).execCommand("hilitecolor", false, value); editor_closeSupporter(); editor_focus(); } function e_bodybgcolor_func(value) { editor_focus(); if(ie){ getIframeDocumentObj(curEditor).body.style.backgroundColor= value; }else{ getIframeDocumentObj(curEditor).execCommand("backcolor", false, value); } editor_closeSupporter(); editor_focus(); } function e_colorPickType(value) { editor_focus(); if (ie) curSelection.select(); eval(colorPickType+'_func("'+value+'")'); editor_focus(); } function e_justifyact_func(act) { editor_focus(); var action_tmp = act.split("_"); var action = "justify" + action_tmp[1]; getIframeDocumentObj(curEditor).execCommand(action, false, ""); editor_focus(); } var keycnt = 0; function e_table_func (param) { var doc = document; var table = doc.createElement("table"); for (var field in param) { var value = param[field]; if (!value) { continue; } switch (field) { case "f_width" : table.style.width = value + param["f_unit"]; break; case "f_align" : table.align = value; break; case "f_border" : table.border = parseInt(value); break; case "f_spacing" : table.cellspacing = parseInt(value); break; case "f_padding" : table.cellpadding = parseInt(value); break; } } var tbody = doc.createElement("tbody"); table.appendChild(tbody); for (var i = 0; i < param["f_rows"]; ++i) { var tr = doc.createElement("tr"); tbody.appendChild(tr); for (var j = 0; j < param["f_cols"]; ++j) { var td = doc.createElement("td"); tr.appendChild(td); // Mozilla likes to see something inside the cell. if (!ie) { var br = doc.createElement("br"); td.appendChild(br); } } } if (ie) { curSelection.pasteHTML(table.outerHTML); } else { var cElement = getIframeDocumentObj(curEditor).createElement("SPAN"); getIframeDocumentObj(curEditor).body.appendChild(cElement); cElement.innerHTML = table.outerHTML; } } function addImage(opt) { if (isMSIE) { nowkong.RestoreSelection(); } if (opt != "") { var imginfo = opt.split(" "); var justify = "left"; var url; if (imginfo.length == 1) { url = imginfo[0]; } else { if ( imginfo[0] != "null" ){ justify = imginfo[0]; } url = imginfo[1]; } if(document.getElementById("e_H_body").contentWindow) document.getElementById("e_H_body").contentWindow.focus(); else document.getElementById("e_H_body").focus(); try{ getIframeDocumentObj("e_H_body").execCommand("justify" + justify, false, null); }catch(e){} getIframeDocumentObj("e_H_body").execCommand("insertimage", false, url); } else { return; } return; } var images_index = 0; function e_image_func(value, position, width, size){ // position L : left, R : right, T : top, B : bottom var str = ""; if (position == "T" || position == "B") { str += "
"; } for (var i=0; i < value.length ; i++){ keycnt++; str += ""; editor_focus(); if (position == "T") { getIframeDocumentObj(curEditor).body.innerHTML = str + getIframeDocumentObj(curEditor).body.innerHTML; } else if (position == "B") { getIframeDocumentObj(curEditor).body.innerHTML = getIframeDocumentObj(curEditor).body.innerHTML + str; } else { if (ie) { curSelection.pasteHTML(str); } else { var cElement = getIframeDocumentObj(curEditor).createElement("SPAN"); getIframeDocumentObj(curEditor).body.appendChild(cElement); cElement.innerHTML = str; } } editor_focus(); } function e_multi_func(value) { if ( edit_suffix != "L"){ alert( "¿¡µðÅÍ »óŰ¡ ¾Æ´Õ´Ï´Ù"); return; } editor_focus(); var ext = value.substr(value.lastIndexOf(".")+1, value.length).toLowerCase(); var str = ""; switch (ext) { // flash case "swf": str = ""; str += ""; str += ""; str += ""; break; // mp3 case "mp3": str = ""; str += ""; str += ""; str += ""; str += ""; str += ""; str += ""; break; // quicktime case "mov": str = ""; break; // window media player case "asf": case "asx": case "mpg": case "mpeg": case "wmv": case "avi": str = ""; str += ""; str += ""; str += ""; str += ""; str += ""; str += ""; break; default: str = ""; } if (ie) { curSelection.pasteHTML(str); } else { var cElement = getIframeDocumentObj(curEditor).createElement("SPAN"); getIframeDocumentObj(curEditor).body.appendChild(cElement); cElement.innerHTML = str; } editor_focus(); } function e_link_func(value) { editor_focus(); if (ie) { if (curSelection.text == ""){ curSelection.pasteHTML(""+value+""); curSelection.select(); } else { curSelection.select(); getIframeDocumentObj(curEditor).execCommand("createlink", false, value); } } else { if (curSelection == "") { var cElement = getIframeDocumentObj(curEditor).createElement("SPAN"); getIframeDocumentObj(curEditor).body.appendChild(cElement); cElement.innerHTML = ""+value+""; } else { getIframeDocumentObj(curEditor).execCommand("createlink", false, value); } } editor_closeSupporter(); editor_focus(); } //table insert action function makeTable() { editor_focus(); curSelection = getSelect(); var dest = newyork_contextPath+"/jsp/common/include/editor/pop_insert_table.jsp"; var width = "450"; var height = "300"; newWin = window.open(dest, "win", "scrollbars=no,toolbar=no,location=no,directories=no,width="+width+",height="+height+",resizable=no,mebar=no,left=250,top=65"); newWin.focus(); } function insertImage() { editor_focus(); curSelection = getSelect(); var upath = ""; if(document.form.upath){ upath = document.form.upath.value; } var dest = newyork_contextPath+"/jsp/common/include/editor/pop_insert_image.jsp?upath="+upath; var width = "450"; var height = "560"; newWin = window.open(dest, "win2", "scrollbars=no,toolbar=no,location=no,directories=no,width="+width+",height="+height+",resizable=no,mebar=no,left=250,top=65"); //newWin = window.open(dest, "win", "scrollbars=yes, status=yes, width="+width+",height="+height+",left=250,top=65"); newWin.focus(); } // editor Apply Act end ///////////////////////////////////////////////////////////////////// var oneshot; function goFileUpload(){ editor_focus(); curSelection = getSelect(); var dest = "image_popup"; var width = "688"; var height = "590"; oneshot = window.open(dest, "oneshot", "scrollbars=yes,toolbar=no,location=no,directories=no,width="+width+",height="+height+",resizable=no,mebar=no,left=250,top=65"); oneshot.focus(); } function goMultimedia( grpid ){ editor_focus(); curSelection = getSelect(); var dest = "/_c21_/pop_multimedia_link?grpid="+grpid; var width = "400"; var height = "250"; newWin = window.open(dest, "win", "scrollbars=no,toolbar=no,location=no,directories=no,width="+width+",height="+height+",resizable=no,mebar=no,left=250,top=65"); newWin.focus(); } function editorImgOver(obj, act) { if (act == 'U') { obj.style.border='1px solid #afafaf'; } else { obj.style.border='1px solid #e7e7e7'; } } function initIframe_firefox(objId) { try { document.getElementById(objId).contentDocument.designMode = DESIGNMODE; } catch(e) { //firefox's bug. document.getElementById(objId).contentWindow.document.open(); document.getElementById(objId).contentWindow.document.close(); document.getElementById(objId).contentDocument.designMode = DESIGNMODE; } document.getElementById(objId).contentWindow.document.open(); document.getElementById(objId).contentWindow.document.write(window_style); if (document.getElementById("e_S_body").value != "") { document.getElementById(objId).contentWindow.document.write(document.getElementById("e_S_body").value); } document.getElementById(objId).contentWindow.document.close(); } function editor_focus() { try { getFocusObj(curEditor).focus(); } catch(e) { } } function getSelect() { if (ie) { return eval(curEditor+".document.selection.createRange()"); } else { return (document.getElementById(curEditor).contentWindow) ? document.getElementById(curEditor).contentWindow.getSelection() : e_H_body.getSelection(); } } // editor supporter show function editor_showSupporter(obj) { var targetObj = document.getElementById("editor_supporter"); supporterArea = false; curSelection = getSelect(); colorPickType = obj.id; e_supporter_template[1] = eval(obj.id+"_Html"); if (obj.id == 'e_color' || obj.id == 'e_bgcolor') { e_supporter_template[1] += "
" + e_bodybgcolor_Html; } targetObj.innerHTML = e_supporter_template.join(""); targetObj.style.width = e_s_size[obj.id][0]; targetObj.style.height = e_s_size[obj.id][1]; var aPos = new Array(); aPos["T"] = getAbsoluteTop(obj) + obj.offsetHeight; aPos["L"] = getAbsoluteLeft(obj); if (document.getElementById("top_skin_img")) { aPos["T"] = aPos["T"] - 30; aPos["L"] = aPos["L"] - 25; } targetObj.style.top = aPos["T"]; targetObj.style.left = aPos["L"]; if (obj.id == 'e_link'||obj.id == 'e_bodybgcolor'||obj.id == 'e_emoticon') { targetObj.style.left = getAbsoluteLeft(obj) - e_s_size[obj.id][0] + obj.offsetWidth; } targetObj.style.display = 'block'; } function editorCoordinator(obj) { if (obj.id == "e_font" || obj.id == "e_size" || obj.id == 'e_color' || obj.id == 'e_bgcolor' || obj.id == 'e_bodybgcolor' || obj.id == 'e_link' || obj.id == 'e_emoticon') { editor_showSupporter(obj); } else if (obj.id == 'e_bold' || obj.id == 'e_underline' || obj.id == 'e_italic' || obj.id == 'e_strikethrough' || obj.id == 'e_InsertOrderedList' || obj.id == 'e_InsertUnorderedList') { e_act_func(obj.id); } else if (obj.id == 'e_left' || obj.id == 'e_center' || obj.id == 'e_right') { e_justifyact_func(obj.id); } else if (obj.id == 'e_image') { goFileUpload(); } else if (obj.id == 'e_multi') { goMultimedia(); } } // Àý´ë ³ôÀÌ °è»ê function getAbsoluteTop(oNode){ var oCurrentNode=oNode; var iTop=0; while(oCurrentNode.tagName!="BODY"){ iTop+=oCurrentNode.offsetTop; oCurrentNode=oCurrentNode.offsetParent; } return iTop; } // Àý´ë ÁÂÃø °è»ê function getAbsoluteLeft(oNode){ var oCurrentNode=oNode; var iLeft=0; while(oCurrentNode.tagName!="BODY"){ iLeft+=oCurrentNode.offsetLeft; oCurrentNode=oCurrentNode.offsetParent; } return iLeft; } function divDisplay(objId, act) { if (document.getElementById(objId)) { document.getElementById(objId).style.display = act; } } function editor_closeSupporter() { divDisplay("editor_supporter", 'none'); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // data transfer function editorBodyTransfer(M, before) { // M = e_H : HTML ÆíÁý±â, e_S : ¼Ò½ºÆíÁý, e_T : ÅØ½ºÆ® var rng; if (ie) { if (before == "e_H") { //from HTML ÆíÁý±â rng = getIframeDocumentObj("e_H_body").body.createTextRange( ); document.getElementById(M+"_body").value = rng.htmlText; } else if (M == "e_H") { //to HTML ÆíÁý±â getIframeDocumentObj("e_H_body").location.reload(); getIframeDocumentObj("e_H_body").write(window_style); getIframeDocumentObj("e_H_body").write(document.getElementById(before+"_body").value); //getIframeDocumentObj("e_H_body").write(document.getElementById(before+"_body").createTextRange( ).htmlText); editor_focus(); } else { //etc document.getElementById(M+"_body").value = document.getElementById(before+"_body").value; } } else { // ie°¡ ¾Æ´Ò°æ¿ì´Â ie¿Í ¹Ý´ë return; if (M == "e_H") { initIframe_firefox("e_H_body", "S"); var value = ""; if ( null != document.getElementById(before+"_body").value ) { value = document.getElementById(before+"_body").value; } getIframeDocumentObj("e_H_body").body.innerHTML = value; } else if (before == "e_H") { document.getElementById(M+"_body").value = getIframeDocumentObj("e_H_body").body.innerHTML; if (document.getElementById(M+"_body").value == "
\n") { document.getElementById(M+"_body").value = ""; } } else { document.getElementById(M+"_body").value = document.getElementById(before+"_body").value; } } } // data transfer end ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// var editor_timer; function tmp_timer() { divDisplay("editorHtml", 'block'); clearTimeout(editor_timer); } function editChangeTab( obj) { if (obj.id == "e_H"){ //alert('ÆíÁý±â'); edit_suffix = "L"; document.getElementById('tab_editor').style.display = 'block'; document.getElementById('tab_tag').style.display = 'none'; document.getElementById('tab_text').style.display = 'none'; }else if(obj.id =="e_S"){ edit_suffix = "G"; //alert('ű×'); document.getElementById('tab_editor').style.display = 'none'; document.getElementById('tab_tag').style.display = 'block'; document.getElementById('tab_text').style.display = 'none'; }else if(obj.id =="e_T"){ edit_suffix = "T"; //alert('ÅØ½ºÆ®'); document.getElementById('tab_editor').style.display = 'none'; document.getElementById('tab_tag').style.display = 'none'; document.getElementById('tab_text').style.display = 'block'; } e_selected_mode = obj.id; if (e_selected_mode == "e_H") { divDisplay("editorSource", 'none'); divDisplay("editorText", 'none'); divDisplay("editorHtml", 'block'); divDisplay("editorControls", 'block'); } else if (e_selected_mode == "e_S") { divDisplay("editorHtml", 'none'); divDisplay("editorControls", 'none'); divDisplay("editorText", 'none'); divDisplay("editorSource", 'block'); } else if (e_selected_mode == "e_T") { divDisplay("editorHtml", 'none'); divDisplay("editorControls", 'none'); divDisplay("editorSource", 'none'); divDisplay("editorText", 'block'); } } function editModeChange(obj) { e_selected_mode_before = e_selected_mode; e_selected_mode = obj.id; editorBodyTransfer(e_selected_mode, e_selected_mode_before); editChangeTab( obj ); } //window.onload = editor_load; var e_emoticon_Html =""; //tagEmo(0); /* function tagEmo(n){ e_emoticon_Html = ''; var cnt=0; addIconFnc(n); for(var i=0;i<6;i++){ if(i==0||i==6){ e_emoticon_Html += ""; } e_emoticon_Html += ""; for(var y=0;y<10;y++){ e_emoticon_Html += ""; cnt++; } e_emoticon_Html += ""; if(i==5||i==11){ e_emoticon_Html += "
\n"; e_emoticon_Html += "\"""; e_emoticon_Html += "
\n"; } } e_emoticon_Html += ""; e_emoticon_Html += ""; e_emoticon_Html += " "; e_emoticon_Html += " "; e_emoticon_Html += " "; e_emoticon_Html += " "; e_emoticon_Html += " "; e_emoticon_Html += " "; e_emoticon_Html += " "; e_emoticon_Html += ""; e_emoticon_Html += ""; e_emoticon_Html += "
"; e_emoticon_Html += " \"ÀÌÀü\""; e_emoticon_Html += " "; e_emoticon_Html += " \"´ÙÀ½\""; e_emoticon_Html += "
"; return e_emoticon_Html; } */ /* function previewNew(userid, css){ var tmp; if ( edit_suffix == "L" ){ var color = getIframeDocumentObj(curEditor).body.style.backgroundColor; tmp = "
"+ getIframeDocumentObj(curEditor).body.innerHTML.replace(/(
"; } else if ( edit_suffix == "G" ){ tmp = document.getElementById('e_S_body').value; } else if ( edit_suffix == "T" ){ tmp = document.getElementById('e_T_body').value; tmp = tmp.replace(/\n/g,"
"); } new_win=window.open("about:blank","HTMLPREVIEW","width=828, height=530, resizable=yes, scrollbars=yes"); new_win.document.write(""); if (css != '') { new_win.document.write(""); } new_win.document.write(""); new_win.document.write(" "); new_win.document.write(""); new_win.document.write(""); new_win.document.write("
"); new_win.document.write(""); new_win.document.write("
"); new_win.document.write("¹Ì¸®º¸±â"); new_win.document.write("

"); new_win.document.write(""); new_win.document.write(""); new_win.document.write(""); new_win.document.write("
.. "); new_win.document.write("
"); new_win.document.write(tmp); new_win.document.write("
"); new_win.document.write("
 "); if (userid != '') { new_win.document.write("

¾Æ¹ÙŸ ²Ù¹Ì±â
"); } new_win.document.write("
"); new_win.document.write("
"); new_win.document.write("close"); new_win.document.write("
"); new_win.document.write(""); new_win.document.write(""); document.close(); } */ //////////// bbs handler ///////////////// var totsize=0; var delete_fileids = new Array(); var delete_fileids_index = 0; function onSubmitMozilla() { if ( presubmit() ){ genderFile(); if ( genderImage() ){ WRITEFORM.submit(); } } } function genderFile(){ for ( var i = 0; i < files.length; i++){ if ( !files[i].serverside ){ document.getElementById("attach_file_hdn").appendChild( files[i].obj ); } } } function file_delete() { var form = document.ATT; for(var i=0;i fsize + totsize ){ lastIndex = list.options.length; list.options.length = lastIndex+1; list.options[lastIndex].text = fname+" "+ fsize +"kb"; list.options[lastIndex].label = fsize; totsize+=fsize; document.ATT.TOTAL.value = totsize; if ( typeof( fileid ) == "undefined"){ list.options[lastIndex].value = document.getElementById("attach_file").value; putFile( fsize ); }else{ list.options[lastIndex].value = fileid; // files.push ( new FileObj( null, fsize, fileid, true, "ATTACH_FILES","ATTACH_FILES", fileid ) ); files[files_index++] = new FileObj( null, fsize, fileid, true, "ATTACH_FILES","ATTACH_FILES", fileid ) ; } }else{ alert("¿ë·®ÀÌ Ãʰú µÇ¾ú½À´Ï´Ù"); } }else{ alert(message); } } var images = new Array(); function genderImage(isAtiveX){ setDeleteImage(); for ( var i = 0; i < attachFileList.length ; i++ ){ if ( attachFileList[i].quotayn =="N" && !attachFileList[i].exist){ // delete_fileids.push( attachFileList[i].fileid ); delete_fileids [ delete_fileids_index++ ] = attachFileList[i].fileid; } } var delete_file = ""; for ( var i =0 ; i < delete_fileids.length; i++ ){ if ( i == 0 ){ delete_file = delete_fileids[i]; }else{ delete_file += "," +delete_fileids[i]; } } WRITEFORM.DELETE_FILES.value = delete_file; var totimg_size = 0; var totimg_cnt = 0; for ( var i = 0; i < attachFileList.length ; i++ ){ if ( attachFileList[i].quotayn =="N" && attachFileList[i].exist ){ totimg_size += parseInt(attachFileList[i].filesize); totimg_cnt++; } } var cont = WRITEFORM.content.value; for ( var i = 0 ; i < images.length ; i++ ){ if (cont.indexOf(images[i].id) > -1){ totimg_size += parseInt(images[i].size,10); totimg_cnt++; images[i].exist = true; g_exist = true; }else{ images[i].exist = false; } } if ( ALBUMBOARD && !g_exist ){ alert("À̹ÌÁö¸¦ ÷ºÎ ÇØ ÁÖ¼¼¿ä."); return false; } if ( totimg_size > 1024 * 1204 * 2 ){ alert( "À̹ÌÁö size°¡ 2M¸¦ Ãʰú ÇÏ¿´½À´Ï´Ù"); return false; }else if ( totimg_cnt > 20 ){ alert( "À̹ÌÁö °¹¼ö°¡ 20°³¸¦ Ãʰú ÇÏ¿´½À´Ï´Ù"); return false; } for ( var i = 0 ; i < images.length ; i++ ){ if ( images[i].exist && !images[i].serverside){ if ( typeof(isAtiveX) != "undefined"){ multiuploadctrl.addimage( images[i].id, images[i].path ); }else{ document.getElementById("attach_file_hdn").appendChild( images[i].obj ); } } } return true; } var delete_images = new Array(); var g_exist = false; function isImageExist( line, key, value ){ if ( key == "grpid" ){ key = "[^m]"+key; } var re = new RegExp( key + "=(.+?)(&|$)","i"); var r = line.match(re); if ( r == null || r.length < 2 ){ return false; } else { if ( r[1] == value ) { return true; } return false; } } function setDeleteImage(){ var re = new RegExp("(S|s)(R|r)(C|c)[=Ɗ'\"]+http:\/\/((pds([0-9]+)|pdstest)\.cafe\.daum\.net/download.php|(front|cafe([0-9]+))\.daum\.net\/_c21_\/pds_down_hdn)\\?[_A-Za-z0-9&=.;#]+[=Ɗ'\"]","ig"); var cont = WRITEFORM.content.value; var r = cont.match(re); for ( var i = 0; i < attachFileList.length ; i++ ){ if ( attachFileList[i].quotayn =="N" ){ attachFileList[i].exist = false; if ( attachFileList[i].fileid == "1" ){ for( var j = 0 ; r != null && j < r.length ; j++ ){ if ( isImageExist ( r[j], "grpid", GRPID ) && isImageExist ( r[j], "fldid", FLDID ) && isImageExist ( r[j], "dataid", DATAID ) && r[j].indexOf("fileid") < 0 ){ attachFileList[i].exist = true; g_exist = true; } } } for( var j = 0 ; r != null && j < r.length ; j++ ){ if ( isImageExist ( r[j], "grpid", GRPID ) && isImageExist ( r[j], "fldid", FLDID ) && isImageExist ( r[j], "dataid", DATAID ) && isImageExist ( r[j], "fileid", attachFileList[i].fileid ) ){ attachFileList[i].exist = true; g_exist = true; } } } } } function getIframeDocumentObj(id) { if ( document.getElementById(id).contentWindow ){ return document.getElementById(id).contentWindow.document; } else { return e_H_body.document; } } function getFocusObj(id) { if ( document.getElementById(id).contentWindow ){ return document.getElementById(id).contentWindow; } else { return e_H_body.document; } } function modifyInit() { var theform=eval(WRITEFORM); if(theform.etype.value!="e_H") { //HTML, ÅØ½ºÆ® e_selected_mode_before = "e_H"; e_selected_mode = theform.etype.value; //editorBodyTransfer(e_selected_mode, e_selected_mode_before); if (WRITEFORM.etype.value == "e_S") WRITEFORM.e_S_body.value = WRITEFORM.content.value; else if (WRITEFORM.etype.value == "e_T") WRITEFORM.e_T_body.value = WRITEFORM.content.value; if(theform.etype.value =="e_S"){ edit_suffix = "G"; //alert('ű×'); document.getElementById('tab_editor').style.display = 'none'; document.getElementById('tab_tag').style.display = 'block'; document.getElementById('tab_text').style.display = 'none'; }else if(theform.etype.value =="e_T"){ edit_suffix = "T"; //alert('ÅØ½ºÆ®'); document.getElementById('tab_editor').style.display = 'none'; document.getElementById('tab_tag').style.display = 'none'; document.getElementById('tab_text').style.display = 'block'; } e_selected_mode = theform.etype.value; if (e_selected_mode == "e_H") { divDisplay("editorSource", 'none'); divDisplay("editorText", 'none'); divDisplay("editorHtml", 'block'); divDisplay("editorControls", 'block'); } else if (e_selected_mode == "e_S") { divDisplay("editorHtml", 'none'); divDisplay("editorControls", 'none'); divDisplay("editorText", 'none'); divDisplay("editorSource", 'block'); } else if (e_selected_mode == "e_T") { divDisplay("editorHtml", 'none'); divDisplay("editorControls", 'none'); divDisplay("editorSource", 'none'); divDisplay("editorText", 'block'); } } } var newyork_contextPath = "";