function winopen(urls, nme, w, h, scr) { var Sw = screen.availWidth - 10; var Sh = screen.availHeight - 50; if (Sw < w) { var w_left = 0; w = Sw; } else { var w_left = (Sw - w) / 2; } if (Sh < h) { var w_top = 0; h = Sh; } else { var w_top = (Sh - h) / 2; } if (scr!='yes') scr = 'no'; var w = window.open(urls, nme, 'width='+w+',height='+h+',left='+w_left+',top='+w_top+',scrollbars='+scr+',toolbar=no'); w.focus(); } //숫자를 금액표시 형태로 변화(예 : 10000 ==> 10,000) function formatCurrency(in_nbr) { var out_str = ""; var nbr = in_nbr + ""; while(nbr.length > 0){ if (nbr.length%3 > 0){ if (nbr.length > 3){ out_str = nbr.substring(0,nbr.length%3) + ","; nbr = nbr.substring(nbr.length%3,nbr.length); }else{ out_str = nbr.substring(0,nbr.length%3); nbr = nbr.substring(nbr.length%3,nbr.length); } }else{ if (nbr.length > 3){ out_str = out_str + nbr.substring(0,3) + "," ; nbr = nbr.substring(3,nbr.length); }else{ out_str = out_str = out_str + nbr.substring(0,3); nbr = nbr.substring(3,nbr.length); } } } return out_str; } //금액표시를 숫자로 변화(예 : 10,000 ==> 10000) function formatNumber(in_str) { var out_nbr = in_str + ""; while(out_nbr.indexOf(",") > 0){ out_nbr = out_nbr.substring(0,out_nbr.indexOf(",")) + out_nbr.substring(out_nbr.indexOf(",") + 1,out_nbr.length) } return eval(out_nbr); } function clipboard_copy(str, alrt) { clipboardData.setData("Text", str); if (alrt) alert(alrt); window.status = "클립보드에 복사된 내용 : " + str; } //ajax를 호출할 때는 를 꼭 같이 넣어주세요. //ajax 로 cart_for_barcode 에 저장 2006-12-21 주요섭 function ajax_cart_for_barcode(oj) { // 응답을 취득 var xmlDoc = oj.responseXML; // 리스트 태그를 배열로 잡는다. var result = xmlDoc.getElementsByTagName("result")[0]; //응답받은 XML에서 리스트내용을 전달 var return_result = result.getAttribute("return_result"); if(return_result) alert(return_result); } function action_cart_for_barcode2(jcode, q) { q = prompt('출력할 바코드개수를 입력하세요', q); if( q ) action_cart_for_barcode(jcode, q, '1'); } function action_cart_for_barcode_sendteam(jcode, q) { q = prompt('출력할 바코드개수를 입력하세요', q); if( q ) action_cart_for_barcode(jcode, q, '1', '1'); } function ajax_modify_for_barcode(oj) { var resultHTML = oj.responseText; if( resultHTML ) { if( resultHTML=='OK' ) alert('수정했습니다.'); } } function printAXInstalled() { if (typeof(document.all("IEPageSetupX"))!="undefined" && document.all("IEPageSetupX")!=null) return true; else return false; } function ops_goods_modify(no,gcode,wdb,stat) { var x = window.open('/ops2/?FL=goods*goods_info_form&HD=no&no='+no+'&WDB='+wdb+'&STAT='+stat+'&gcode='+gcode,'a','width=990,height=720,scrollbars=yes') x.focus(); //document.location.href='/ops2/?FL=goods*goods_modify_form&gcode='+gcode; } function ops_goods_modify2(no,gcode,wdb,stat) { var x = window.open('/ops2/?FL=goods*goods_info_form&HD=no&no='+no+'&WDB='+wdb+'&STAT='+stat+'&gcode='+gcode,'a','width=990,height=720,scrollbars=yes') x.focus(); //document.location.href='/ops2/?FL=goods*goods_modify_form&gcode='+gcode; } function ops_call_pj( gcode ) { if( confirm('품절 요청하시겠습니까?') ) { var link = '/ops2/?FL=goods*goods_call_pj&EGO=true'; var flag = null; var param = { 'gcode' : gcode }; new Ajax.Request( link, { method : "POST", parameters: param, onComplete: function( htmlHttp ) { alert( htmlHttp.responseText); //$(cf).value='컨펌 요청됨' //$(cf).disable(); } } ); } }