/*¸ðµç onclick¿¡ this.blur()*/ /* function bluring(){ if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG"||event.srcElement.tagName=="INPUT") document.body.focus(); } document.onfocusin=bluring; */ /*°áÁ¦ÇϱâÀÇ Åä±Û*/ var old_menu = ''; function menuclick( submenu) { if( old_menu != submenu ) { if( old_menu !='' ) { old_menu.style.display = 'none'; } submenu.style.display = 'block'; old_menu = submenu; } else { submenu.style.display = 'none'; old_menu = ''; } } /*¼­ºñ½º »ç¿ë·® ¸ð´ÏÅ͸µ*/ function Show(name) { document.all[name].style.display = 'block'; } function go_submit() { var f = document.frm; var ul; //if(f.service.value == ''){ // alert('¼­ºñ½º¸¦ ¼±ÅÃÇØ ÁֽʽÿÀ'); //} //else //{ ul = "/front/php/payment/payment.php?service_type=add_option&email="+f.email.value+"&product_name="+f.product_name.value+"&product_code="+f.product_code.value+"&total_price="+f.total_price.value+"&service_kind="+f.service_kind.value+"&service="+f.service.value; option = 'status:false; dialogWidth: 500px; dialogHeight: 450px; help:no; dialogLeft:120px; dialogTop:150; status:no;scroll:no;' var oWin = showModalDialog( ul, window, option ); //} } // end of go_submit() /*file ¹öư À̹ÌÁö·Î*/ function file_browse() { document.form.file.click(); document.form.text1.value=document.form.file.value; } /*°Ô½ÃÆÇ °ü¸® À¯Çüº° ·¹ÀÌ¾î º¸À̱â*/ function showDiv1(name1) { document.getElementById("show"+name1).style.display = "block"; document.getElementById("hidden"+name1).style.display = "none"; document.getElementById("show"+name1).style.position = "static"; document.getElementById("hidden"+name1).style.position = "absolute"; } function hiddenDiv1(name1) { document.getElementById("hidden"+name1).style.display = "block"; document.getElementById("show"+name1).style.display = "none"; document.getElementById("hidden"+name1).style.position = "static"; document.getElementById("show"+name1).style.position = "absolute"; } /*°Ô½ÃÆÇ °ü¸® À̵¿Ã¢*/ function form_check() { if ( document.frm.is_std[1].checked == true ) { if ( input_format_check ( "frm", "category_name", "Ä«Å×°í¸® ¸íĪ" ,"E" ,1, 40) == false ) return false ; } if ( document.frm.access_type[2].checked == true ) { if ( frm.access_group_list.length == "0" ) { alert("Á¢±Ù ȸ¿ø±×·ìÀ» ¼³Á¤ÇØÁֽʽÿÀ" ) ; return false ; } for ( i=0 ; i < frm.access_group_list.length ; i++ ) { frm.current_category_access_group.value += frm.access_group_list[i].value ; if ( i != frm.access_group_list.length-1 ) frm.current_category_access_group.value += ":" ; } } document.frm.action = 'category_create.php' ; document.frm.submit(); } function add_group() { if ( frm.total_group_list.length == 0 ) { alert("µî·ÏÇÒ ±×·ìÀÌ ¾ø½À´Ï´Ù.\n±×·ì µî·ÏÀ» ¸ÕÀú ÇØÁÖ¼¼¿ä") ; return false ; } if ( frm.total_group_list.selectedIndex == '-1' ) { alert("µî·ÏÇÒ ±×·ìÀ» ¸ÕÀú ¼±ÅÃÇØÁÖ¼¼¿ä"); return false ; } var selected_idx = frm.total_group_list.selectedIndex ; var t = frm.access_group_list.length++; frm.access_group_list[t].value = frm.total_group_list[selected_idx].value; frm.access_group_list[t].text = frm.total_group_list[selected_idx].text; frm.access_group_list[t].selected = true; j = 0 ; for( i=0 ; i < frm.total_group_list.length ; i++ ) { if ( i != selected_idx ) { frm.total_group_list[j].value = frm.total_group_list[i].value ; frm.total_group_list[j].text = frm.total_group_list[i].text ; j++ ; } } frm.total_group_list.length--; } function del_group() { if ( frm.access_group_list.length == 0 ) { alert("Á¦°ÅÇÒ ±×·ìÀÌ ¾ø½À´Ï´Ù.\n±×·ì µî·ÏÀ» ¸ÕÀú ÇØÁÖ¼¼¿ä") ; return false ; } if ( frm.access_group_list.selectedIndex == '-1' ) { alert("Á¦°ÅÇÒ ±×·ìÀ» ¸ÕÀú ¼±ÅÃÇØÁÖ¼¼¿ä"); return false ; } var selected_idx = frm.access_group_list.selectedIndex ; var t = frm.total_group_list.length++; frm.total_group_list[t].value = frm.access_group_list[selected_idx].value; frm.total_group_list[t].text = frm.access_group_list[selected_idx].text; frm.total_group_list[t].selected = true; j = 0 ; for( i=0 ; i < frm.access_group_list.length ; i++ ) { if ( i != selected_idx ) { frm.access_group_list[j].value = frm.access_group_list[i].value ; frm.access_group_list[j].text = frm.access_group_list[i].text ; j++ ; } } frm.access_group_list.length--; } /*Ä÷¯¼±ÅÃ*/ function colorTb(frm, view_frm) { window.open('/admin/component/colortable.php?frm=' + frm + '&view_frm=' + view_frm,'ctable','resizable=false,width=320,height=190,scrollbars=no'); } function colorView(frm, view_frm) { var val = frm.value; val = val.replace(/#/g,''); if(val && !(isHexStr(val))) { if(val.length < 6) { var blank = ''; for(i=1; i<=(6 - val.length); i++) blank += '0'; val = '#' + val + blank; view_frm.style.backgroundColor = val; } else if(val.length == 6) view_frm.style.backgroundColor = val; } } // ÀԷ°ª Çü½Ä üũ function check_value(obj, type) { var val = obj.value; if(type == "int") { if(val.length > 0 && isValidInt(val)) { re_txt = removeValidInt(val); alert('¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.'); if(re_txt) obj.value = re_txt; obj.focus(); } } else if(type == "alphanum") { if(val.length > 0 && isMixedNumStr(val)) { alert('¿µ¹®ÀÚ¿Í ¼ýÀÚ¸¸ ÀÔ·ÂÀÌ °¡´ÉÇÕ´Ï´Ù.'); obj.focus(); } } } // Ç׸ñ°ü¸®ÀÇ ¼¿·ºÆ®¹Ú½º/üũ¹Ú½º/¶óµð¿À¹öưÇ׸ñ¿¡ "," »ç¿ëºÒ°¡ function check_titlevalue(obj) { var obj_val = obj.value; var result = true; var re_val = ""; for(i=0; i function add_list(o_list, n_list) { var o_list_len = o_list.length; var n_list_len = n_list.length; var exists = false; for(i=0,n=0,c=0; i= idx) rewrite_arr(1, j+1, o_list.options[j].text, o_list.options[j].value); } } if(!idx) idx = o_list_len - 1; o_list.options[idx].text = n_list.options[i].text; o_list.options[idx].value = n_list.options[i].value; rewrite_arr(1, idx, o_list.options[idx].text, o_list.options[idx].value); c++; } else { rewrite_arr(2, n, n_list.options[i].text, n_list.options[i].value); n++; } } new_arr.length = new_arr.length - c; view_list(2, n_list); view_list(1, o_list); } // ->,<- ÀÇ ÀÛ¾÷¿¡ µû¶ó org_arr, new_arr º¯¼ö¸¦ Àç¼³Á¤ÇÑ´Ù. function rewrite_arr(type, idx, text, value) { if(type == 1) { org_arr[idx] = new Array(); org_arr[idx]['text'] = text; org_arr[idx]['value'] = value; } else if(type == 2) { new_arr[idx] = new Array(); new_arr[idx]['text'] = text; new_arr[idx]['value'] = value; } } // ¸®½ºÆ®ÀÇ ¼ø¼­º¯°æ function move_seq(type, n_list, num) { var n_list_len = n_list.length; var new_idx = n_list.selectedIndex; var tmp = new Array(); if(new_idx < 0) { alert('Ç׸ñÀ» ¼±ÅÃÇϼ¼¿ä.'); return; } switch(type) { // ¸ÇÀ§·Î À̵¿ case 1 : tmp['newtext'] = n_list.options[new_idx].text; tmp['newvalue'] = n_list.options[new_idx].value; for(i=new_idx; i>0; i--) { n_list.options[i].text = n_list.options[i-1].text; n_list.options[i].value = n_list.options[i-1].value; } n_list.options[0].text = tmp['newtext']; n_list.options[0].value = tmp['newvalue']; n_list.options[0].selected = true; break; // ÇÑÄ­ À§·Î À̵¿ case 2 : if(new_idx == 0) break; tmp['newtext'] = n_list.options[new_idx].text; tmp['newvalue'] = n_list.options[new_idx].value; n_list.options[new_idx].text = n_list.options[new_idx-1].text; n_list.options[new_idx].value = n_list.options[new_idx-1].value; n_list.options[new_idx-1].text = tmp['newtext']; n_list.options[new_idx-1].value = tmp['newvalue']; n_list.options[new_idx-1].selected = true; break; // ÇÑÄ­ ¾Æ·¡·Î À̵¿ case 3 : if(new_idx == (n_list_len-1)) break; tmp['newtext'] = n_list.options[new_idx].text; tmp['newvalue'] = n_list.options[new_idx].value; n_list.options[new_idx].text = n_list.options[new_idx+1].text; n_list.options[new_idx].value = n_list.options[new_idx+1].value; n_list.options[new_idx+1].text = tmp['newtext']; n_list.options[new_idx+1].value = tmp['newvalue']; n_list.selectedIndex = new_idx+1; n_list.options[new_idx+1].selected = true; break; // ¸Ç¾Æ·¡·Î À̵¿ case 4 : tmp['newtext'] = n_list.options[new_idx].text; tmp['newvalue'] = n_list.options[new_idx].value; for(i=new_idx; i<(n_list_len-1); i++) { n_list.options[i].text = n_list.options[i+1].text; n_list.options[i].value = n_list.options[i+1].value; } n_list.options[n_list_len-1].text = tmp['newtext']; n_list.options[n_list_len-1].value = tmp['newvalue']; n_list.options[n_list_len-1].selected = true; break; // ¿øÇÏ´Â À§Ä¡·Î À̵¿ case 5 : for(i=0; i<=num.length; i++) { if(!(num.charAt(i) >= 0 && num.charAt(i) <= 9)) { alert('À̵¿ÇÒ À§Ä¡´Â ¼ýÀÚ¸¸ ÁöÁ¤ÇØ ÁÖ¼¼¿ä.'); break; } } if(num < 1 || num > n_list_len) { alert('À̵¿ÇÒ À§Ä¡°¡ À߸ø ÁöÁ¤µÇ¾ú½À´Ï´Ù.'); break; } tmp['newtext'] = n_list.options[new_idx].text; tmp['newvalue'] = n_list.options[new_idx].value; if(num > new_idx) { for(i=new_idx; i<(num-1); i++) { n_list.options[i].text = n_list.options[i+1].text; n_list.options[i].value = n_list.options[i+1].value; } } else { for(i=new_idx; i>=num; i--) { n_list.options[i].text = n_list.options[i-1].text; n_list.options[i].value = n_list.options[i-1].value; } } n_list.options[num-1].text = tmp['newtext']; n_list.options[num-1].value = tmp['newvalue']; n_list.options[num-1].selected = true; break; } } //°Ô½ÃÆÇ ½ºÅ²°ü¸® â 2008-11-26 Ãß°¡ function move_skin() { window.open('menu.php?component=board&file=bbs_skin_admin', 'skin_admin', 'toolbar=no,scrollbars=auto,top=200,left=300,width=990,height=750'); } /**********************************************************************************************************/