/*----------------------------------------------------------------- !¸µÅ©ÀÇ Æ÷Ä¿½º ¶óÀÎ Á¦°Å -----------------------------------------------------------------*/ function allblur() { var ln = 0; try { ln = document.links.length; } catch(e) { return; } for (i = 0; i < ln; i++) { document.links[i].onfocus = document.links[i].blur; } } document.onfocusin = allblur; /* document.onfocusin = function() { var tagName = event.srcElement.tagName; if(tagName == "A" || tagName == "IMG") document.body.focus(); } */ /*----------------------------------------------------------------- !ÆäÀÌÁö ½ºÅ©·Ñ ¾÷ -----------------------------------------------------------------*/ var scrollUpDelay = 1; var scrollUpSpeed = 70; function scrollUp() { //Çѹø¿¡ À̵¿ scroll(0,0); return; if(document.body.scrollTop<1) { return; } document.body.scrollTop=document.body.scrollTop-scrollUpSpeed; setTimeout('scrollUp()',scrollUpDelay); } /*----------------------------------------------------------------- !·Î±×ÀÎ ¿É¼Ç µð½ºÇ÷¹ÀÌ ÄÁÆ®·Ñ -----------------------------------------------------------------*/ function showLoginOption() { document.all["loginOptionLayer"].style.visibility='visible'; } function hideLoginOption() { document.all["loginOptionLayer"].style.visibility='hidden'; } /*----------------------------------------------------------------- !°Ë»ö ¿É¼Ç µð½ºÇ÷¹ÀÌ ÄÁÆ®·Ñ -----------------------------------------------------------------*/ function showSearchOption() { document.all["searchOptionLayer"].style.visibility='visible'; } function hideSearchOption() { document.all["searchOptionLayer"].style.visibility='hidden'; } /*----------------------------------------------------------------- !¼ýÀÚ¿¡ ,¸¦ ³Ö¾î ±Ý¾× ÇüÅ·Πº¯È¯ÇÔ :: PHP¿Í µ¿ÀÏ -----------------------------------------------------------------*/ function number_format(str) { str+=""; var objRegExp = new RegExp('(-?[0-9]+)([0-9]{3})'); while(objRegExp.test(str)) { str = str.replace(objRegExp, '$1,$2'); } return str; } /*----------------------------------------------------------------- !Á¤±Ô½Äüũ :: PHP¿Í µ¿ÀÏ -----------------------------------------------------------------*/ function ereg(exp,str) { exp = new RegExp(exp); exp = str.match(exp); return exp; } function eregi(exp,str) { exp = new RegExp(exp,"gi"); exp = str.match(exp); return exp; } /*----------------------------------------------------------------- ġȯ -----------------------------------------------------------------*/ function eregi_replace(ereg, dest, str) { ereg = eval("/"+ereg+"/gim"); return str.replace(ereg, dest); } /*----------------------------------------------------------------- !ÁÂ¿ì°ø¹éÁ¦°Å :: PHP¿Í µ¿ÀÏ -----------------------------------------------------------------*/ function trim(str) { var exp = new RegExp("^( )+"); str = str.replace(exp,""); exp = new RegExp("( )+$"); str = str.replace(exp,""); return str; } /*----------------------------------------------------------------- !¿ÀÅäÆ÷Ä¿½º :: ÆûÀÇ ³»¿ëÀÌ ÀÖÀ¸¸é select, ¾øÀ¸¸é focus È£Ãâ -----------------------------------------------------------------*/ function focusing(obj) { if(obj.value) { try { obj.select(); obj.focus(); } catch(e){} } else { try { obj.focus(); } catch(e){} } } /*----------------------------------------------------------------- !´ÙÀ̾ó·Î±× ¶ç¿ì±â -----------------------------------------------------------------*/ var mdWindow; function mdOpen(url,width,height,top,left) { if(mdWindow) { try { mdWindow.window.close(); } catch(e){} } var sFeatures = "dialogTop: "+top+"; dialogLeft: "+left+"; dialogWidth: "+width+"px; dialogHeight: "+height+"px; center: yes; help: no; resizable: no; status: no; scroll: no;"; mdWindow = window.showModelessDialog(url, "_blank", sFeatures); } /*----------------------------------------------------------------- !¼ýÀÚ¸¸ Çã¿ëÇϱâ -----------------------------------------------------------------*/ function setInt(obj) { var start = '0'; var newStr = ''; var str = obj.value; for(var i=0,j=0;inum) { alert(num+'°³ ±îÁö¸¸ ¼±Åà °¡´É ÇÕ´Ï´Ù'); return false; } } /*----------------------------------------------------------------- !¹®ÀÚ¸Þ¼¼Áöâ -----------------------------------------------------------------*/ function popupSMS() { ok_popup=window.open("/main/popup/sms/popup_smsSend.php","sms_popup","width=550,height=655,top=30,left=30,scrollbars=yes,resizable=no"); ok_popup.focus(); } function popupSMSlist() { ok_popup=window.open("/main/popup/sms/popup_smsList.php","sms_popup","width=550,height=635,top=30,left=30,scrollbars=yes,resizable=no"); ok_popup.focus(); } /*----------------------------------------------------------------- !Å뺸¸Þ¼¼Áöâ -----------------------------------------------------------------*/ function popupMsg() { ok_popup=window.open("/main/popup/msg/popup_msgList.php","msg_popup","width=519,height=635,top=30,left=30,scrollbars=yes,resizable=no"); if(ok_popup) { ok_popup.focus(); } } function popupMsgView(no) { ok_popup=window.open("/main/popup/msg/popup_msgList.php?id="+no,"msg_popup","width=519,height=635,top=30,left=30,scrollbars=yes,resizable=no"); ok_popup.focus(); } /*----------------------------------------------------------------- !¸Þ¸ðÀå -----------------------------------------------------------------*/ function popupNote() { ok_popup=window.open("/main/popup/note/popup_noteWrite.php","note_popup","width=519,height=635,top=30,left=30,scrollbars=yes,resizable=no"); ok_popup.focus(); } /*----------------------------------------------------------------- !µµ¿ò¸»¸ÞÀÎ -----------------------------------------------------------------*/ function popupHelp() { var url = "/main/popup/help/popup_helpsMain.php?mode=help"; ok_popup=window.open(url,"help_popup","width=600,height=635,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } /*----------------------------------------------------------------- !µµ¿ò¸»¸ñ·Ï -----------------------------------------------------------------*/ function popupHelpList(s) { var url = "/main/popup/help/popup_helpsList.php?mode=help"; if(s) { url += "&sw=" + s; // URL encode´Â ÇÏÁö ¾Ê´Â´Ù. } ok_popup=window.open(url,"help_popup","width=600,height=635,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } /*----------------------------------------------------------------- !µµ¿ò¸» Ä«Å×°í¸® ¸ñ·Ï -----------------------------------------------------------------*/ function popupHelpCat(c) { var url = "/main/popup/help/popup_helpsList.php?mode=help"; if(c) { url += "&cat=" + c; // URL encode´Â ÇÏÁö ¾Ê´Â´Ù. } ok_popup=window.open(url,"help_popup","width=600,height=635,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } /*----------------------------------------------------------------- !µµ¿ò¸»¸ÞÀÎ -----------------------------------------------------------------*/ function popupHelp2() { var url = "/main/popup/help/popup_helpsMain.php?mode=help&ad=1"; ok_popup=window.open(url,"help_popup","width=600,height=635,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } function popupHelpList2(s) { var url = "/main/popup/help/popup_helpsList.php?mode=help&ad=1"; if(s) { url += "?sw=" + s; // URL encode´Â ÇÏÁö ¾Ê´Â´Ù. } ok_popup=window.open(url,"help_popup","width=600,height=635,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } /*----------------------------------------------------------------- !µµ¿ò¸» ¹× FAQ¹Ù·Î°¡±â -----------------------------------------------------------------*/ function popupHelpView(no, templete, mode) { var url = "/main/popup/help/popup_helpsView.php?mode="+mode+"&no=" + no; if(templete) { url += "&templete=" + templete; } ok_popup=window.open(url,"help_popup","width=700,height=635,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } /*----------------------------------------------------------------- !FAQ¸ÞÀÎ -----------------------------------------------------------------*/ function popupFaq() { ok_popup=window.open("/main/popup/help/popup_helpsMain.php?mode=faq","help_popup","width=600,height=635,top=30,left=30,scrollbars=yes,resizable=no"); ok_popup.focus(); } /*----------------------------------------------------------------- À̹ÌÁöâ ¶ç¿ì±â -----------------------------------------------------------------*/ function popupImageView(url) { ok_popup=window.open("/main/popup/image/popup_imageView.php?url="+url+"&width="+screen.width+"&height="+screen.height,"image_popup","width=330,height=330,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } /*----------------------------------------------------------------- Ä«Å×°í¸® °Ë»ö ¶ç¿ì±â -----------------------------------------------------------------*/ function openKeywordRank(word) { ok_popup=window.open("/main/popup/keyword/popup_keywordRank.php?word="+word,"keyword_popup","width=740,height=450,top=30,left=30,scrollbars=no,resizable=no"); ok_popup.focus(); } /*----------------------------------------------------------------- Ä«Å×°í¸® °Ë»ö ¶ç¿ì±â -----------------------------------------------------------------*/ function findCategory(tar) { ok_popup=window.open("/main/popup/category/popup_findCategory.php?tar="+tar,"category_popup","width=740,height=450,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } /*----------------------------------------------------------------- Âü°¡È®Àμ­ Ãâ·Â -----------------------------------------------------------------*/ function popupSchJoin(no) { ok_popup=window.open("/main/myPage/schedule/my_schPrint.php?no="+no,"sch_popup","width=600,height=500,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } /*----------------------------------------------------------------- ¼¼±Ý°è»ê¼­ Ãâ·Â -----------------------------------------------------------------*/ function popupTax(no) { ok_popup=window.open("/main/myPage/tax/my_taxPrint.php?no="+no,"tax_popup","width=735,height=495,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } function popupTax2(no) { ok_popup=window.open("/main/myPage/tax/my_taxPrint2.php?no="+no,"tax_popup","width=735,height=495,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } function popupTax2m(wh, total) { ok_popup2=window.open('/main/myPage/tax/my_taxPrint2m.php?wh=' + wh + '&total=' + total, 'tax_popup_control', 'width=200, height=495, top=30, left=786, scrollbars=yes, resizable=yes, menubar, status'); ok_popup2.focus(); ok_popup=window.open("/main/myPage/tax/my_taxPrint2.php?wh="+wh,"tax_popup","width=735,height=495,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } function popupRTax(no) { ok_popup=window.open("/main/myPage/tax/my_taxPrint.php?req=1&no="+no,"tax_popup","width=735,height=495,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } function popupRTax2(no) { ok_popup=window.open("/main/myPage/tax/my_taxPrint2.php?req=1&no="+no,"tax_popup","width=735,height=495,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } function popupTaxDetail(no) { ok_popup=window.open("/main/myPage/tax/my_taxPrintDetail.php?no="+no,"tax_popup","width=700,height=495,top=30,left=30,scrollbars=yes,resizable=no,menubar,status"); ok_popup.focus(); } // BLUE function popupTaxFreebill(sn, sc) { ok_popup=window.open("http://playauto.manager.freebill.co.kr/?tpf=admin/form/view&sn=" + sn + "&sc=" + sc + "&confirm=Y","tax_popup","width=940,height=730,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } function popupTaxFreebill2(ai, sc) { ok_popup=window.open("http://naggama.freebill.co.kr/web/api/VIEW/" + ai + "/" + sc,"tax_popup","width=940,height=730,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } // RED function popupTaxFreebill3(ai) { ok_popup=window.open("http://playauto.manager.freebill.co.kr/?tpf=admin/form/view&form_type=tax&__q=pkc0uvuoaef8ghttrj9c9qvir2&code=" + ai,"tax_popup","width=940,height=730,top=30,left=30,scrollbars=yes,resizable=yes,menubar,status"); ok_popup.focus(); } /*----------------------------------------------------------------- !¸ñ·ÏÅë°ü Çʵ¶»çÇ× (ÇØ¿Ü¿ÀǸ¶ÄÏ) // ÇÑ»óÇö Ãß°¡ -----------------------------------------------------------------*/ function popupImportInfo() { ok_popup=window.open("/main/popup/seller/popup_importInfo.php","import_popup","width=630,height=450,top=30,left=30,scrollbars=yes,resizable=yes"); ok_popup.focus(); } /*----------------------------------------------------------------- !ÇѱÛÀ» Æ÷ÇÔÇÑ ¹®ÀÚ¿­±æÀÌ ±¸Çϱâ -----------------------------------------------------------------*/ function strlen(str) { var i, j=0; for(i=0; i 4) return 2; else return 1; } /*----------------------------------------------------------------- !¿£ÅÍŰ ÀÔ·Â ¹æÁö -----------------------------------------------------------------*/ function noEnter() { if(event.keyCode == 13) { event.returnValue=false; } } /*----------------------------------------------------------------- !±×´ÞÀÇ ³¯Â¥¸¦ selectBox¿¡ ÁöÁ¤Çϱâ :: obj´Â ÁöÁ¤µÉ selectBox -----------------------------------------------------------------*/ function setDaysOfMonth(year,month,obj,noUnit,gap) { if(!year) { year=2025; } if(!month) { month='1'; } if(ereg("^0",month)) { month = month.substr(1,1); } month = parseInt(month); if(!gap) gap = 0; lastDay = getLastDay(year,month); for(var i=obj.length-1; i>=gap; i--) { obj.options[i] = null; } for(var i=1,j=gap; i<=lastDay; i++,j++) { i = (i<10)?"0"+i:i; if(!noUnit) { obj.options[j]=new Option(i+"ÀÏ",i); } else { obj.options[j]=new Option(i,i); } } } /*----------------------------------------------------------------- !±×´ÞÀÇ ¸¶Áö¸· ³¯ÀÚ¸¦ ±¸Çϱâ -----------------------------------------------------------------*/ function getLastDay(year,month) { var lastDayArray = new Array(0,31,28,31,30,31,30,31,31,30,31,30,31); lastDay = lastDayArray[month]; if(month==2) { if(year%100 == 0) { if(year%400 == 0) { lastDay = 29; } } else if(year%4 == 0) { lastDay = 29; } } return lastDay; } /*----------------------------------------------------------------- !ÀÚµ¿ Æû paste :: obj->½ÃÀÛÆûÇʵå, maxStep->pasteµÉ Æû°¹¼ö -----------------------------------------------------------------*/ function catchPaste(obj, maxStep) { var step=0,add=0; var sText = clipboardData.getData('Text'); do { if(obj.type == 'text') { obj.value = sText.substr(0,obj.size); add = (sText.substr(obj.size,1).search(/[a-zA-Z0-9]/) != -1) ? 0 : 1; sText = sText.substr(obj.size+add); if(++step == maxStep) break; } } while(obj = obj.nextSibling) return false; } /*----------------------------------------------------------------- !¼­ºê¸Þ´º¸¦ Ç¥½ÃÇÔ :: id´Â ¼­ºê¸Þ´º°¡ Á¤ÀÇµÈ ·¹À̾î id -----------------------------------------------------------------*/ function showSubMenu(id) { try { subMenuArea.innerHTML=id.innerHTML; } catch(e) {} } /*----------------------------------------------------------------- !bodyŬ¸¯½Ã ±âº»½ÇÇà -----------------------------------------------------------------*/ function defaultBodyOnclick() { try { hide_popupLayer(); } catch(e) {} } /*----------------------------------------------------------------- !ȸ¿ø°ü¸®¸Þ´º¸¦ Ç¥½ÃÇÔ -----------------------------------------------------------------*/ var memberToolID; function showMemberTool(id) { if(memberToolID) { memberToolID.style.visibility='hidden'; } memberToolID = eval(id); memberToolID.style.visibility='visible'; } function hideMemberTool(id) { memberToolID.style.visibility='hidden'; } /*----------------------------------------------------------------- !¼ýÀÚ¸¦ Çѱ۷ΠÀбâ -----------------------------------------------------------------*/ var arrKor1 = new Array('','ÀÏ','ÀÌ','»ï','»ç','¿À','À°','Ä¥','ÆÈ','±¸'); var arrKor3 = new Array("","½Ê","¹é","õ"); var arrKor2 = new Array("","¸¸","¾ï","Á¶","°æ","ÇØ","½Ã","¾ç","±¸","°£","Á¤"); function numToKorean(num) { delimiter = ' '; bPos = 0; sPos = 0; digit = 0; szDigit = ''; is_start = false; appendFF = false; len = num.length; szHan = ''; for (i=len-1;i>=0;i--) { szDigit=num.substring(i,i+1); digit=parseInt(szDigit); if (digit!=0) { if (bPos!=0 && sPos==0) { if (is_start==true) szHan += delimiter; szHan += arrKor2[bPos]; appendFF=false; } if (bPos!=0 && appendFF==true) { if (is_start==true) szHan += delimiter; szHan += arrKor2[bPos]; appendFF=false; } if (sPos!=0) szHan += arrKor3[sPos]; szHan += arrKor1[digit]; is_start=true; } else if (sPos==0 && bPos!=0) appendFF=true; sPos++; if (sPos%4==0) { sPos=0; bPos++; if (bPos>=4) return "(¹üÀ§Ãʰú)"; } } if (is_start==false) szHan += "¿µ"; rslt = ''; for(i = szHan.length - 1; i >= 0; i--) { rslt += szHan.substring(i, i + 1); } return rslt; } /*----------------------------------------------------------------- !¼ø¼­¼³Á¤ -----------------------------------------------------------------*/ function gou(obj) { //ÆûÁöÁ¤ formSel = obj; //¼±ÅÃµÈ Ç׸ñÀÌ ¾øÀ¸¸é ¸®ÅÏ if(!formSel.value) { return; } //ÇöÀçÇ׸ñ thisIndex = formSel.selectedIndex; //ù¹øÂ° Ç׸ñÀº ¸®ÅÏ if(!thisIndex) { return; } //Æ÷Ä¿½ºÁ¦°Å formSel.value=null; //»óÀ§Ç׸ñ prevIndex=thisIndex-1; //»óÀ§Ç׸ñÀÇ ³»¿ëÀ» ÀúÀå tempText=formSel.options[prevIndex].text; tempValue=formSel.options[prevIndex].value; //»óÀ§Ç׸ñ¿¡ ¼±ÅÃµÈ Ç׸ñÀÇ ³»¿ëÀ» »ðÀÔ formSel.options[prevIndex] = new Option(formSel.options[thisIndex].text,formSel.options[thisIndex].value); //¼±ÅõÈÇ׸ñ¿¡ »óÀ§ Ç׸ñÀÇ ³»¿ëÀ» »ðÀÔ formSel.options[thisIndex] = new Option(tempText,tempValue); //Æ÷Ä¿½º¸¦ ´Ù½Ã ÁÜ formSel.options[prevIndex].selected=true; } function god(obj) { //ÆûÁöÁ¤ formSel = obj; //¼±ÅÃµÈ Ç׸ñÀÌ ¾øÀ¸¸é ¸®ÅÏ if(!formSel.value) { return; } //ÇöÀçÇ׸ñ thisIndex = formSel.selectedIndex; //¸¶Áö¸· Ç׸ñÀº ¸®ÅÏ if(thisIndex+1>=formSel.length) { return; } //Æ÷Ä¿½ºÁ¦°Å formSel.value=null; //ÇÏÀ§Ç׸ñ prevIndex=thisIndex+1; //ÇÏÀ§Ç׸ñÀÇ ³»¿ëÀ» ÀúÀå tempText=formSel.options[prevIndex].text; tempValue=formSel.options[prevIndex].value; //ÇÏÀ§Ç׸ñ¿¡ ¼±ÅÃµÈ Ç׸ñÀÇ ³»¿ëÀ» »ðÀÔ formSel.options[prevIndex] = new Option(formSel.options[thisIndex].text,formSel.options[thisIndex].value); //¼±ÅõÈÇ׸ñ¿¡ »óÀ§ Ç׸ñÀÇ ³»¿ëÀ» »ðÀÔ formSel.options[thisIndex] = new Option(tempText,tempValue); //Æ÷Ä¿½º¸¦ ´Ù½Ã ÁÜ formSel.options[prevIndex].selected=true; } function got(obj) { //ÆûÁöÁ¤ var bufferValue = new Array(); var bufferText = new Array(); var formSel = obj; //¼±ÅÃµÈ Ç׸ñÀÌ ¾øÀ¸¸é ¸®ÅÏ if(!formSel.value) { return; } //ÇöÀçÇ׸ñ var thisIndex = formSel.selectedIndex; bufferValue[0] = formSel.options[thisIndex].value; bufferText[0] = formSel.options[thisIndex].text; //ù¹øÂ° Ç׸ñÀº ¸®ÅÏ if(!thisIndex) { return; } //Æ÷Ä¿½ºÁ¦°Å formSel.value=null; //¸ðµç Ç׸ñ ·Îµå for(var i=0, j=1; i=0; i--) { formSel.options[i] = null; } //¸ðµç Ç׸ñ »ðÀÔ for(var i=0; i=0; i--) { formSel.options[i] = null; } //¸ðµç Ç׸ñ »ðÀÔ for(var i=0; i0) { thisObj.style.left=event.clientX+1 - thisObj.adjustX; } if(event.clientY - thisObj.adjustY>0) { thisObj.style.top=event.clientY+1 - thisObj.adjustY; } } } function fnUpdate() { iOffset=parseInt(oOffset.value); } /*----------------------------------------------------------------- ÄíŰ ÄÁÆ®·Ñ -----------------------------------------------------------------*/ function setCookie(name,value,day) { var exp = ''; if(day > 0) { var today= new Date(); today.setDate(today.getDate() + day); exp = " expires=" + today.toGMTString() + ";"; } document.cookie = name + "=" + escape(value) + "; path=/;" + exp + ";" } function getCookie(name) { var re = new RegExp("\\b"+name+"\\=([^;]*)","ig"); document.cookie.match(re) return unescape(RegExp.$1); } function setCookiePack(name, value) { var xmlHTTPReq; var url = '/main/common/object/cookiePack/cookie_proc.php'; var params = 'mode=set&name=' + name + '&value=' + value; if(window.XMLHttpRequest) { try { xmlHTTPReq = new XMLHttpRequest(); } catch(e) { xmlHTTPReq = false; } } else if(window.ActiveXObject) { try { xmlHTTPReq = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { try { xmlHTTPReq = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { xmlHTTPReq = false; } } } if(xmlHTTPReq) { xmlHTTPReq.open("POST", url, true); xmlHTTPReq.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHTTPReq.setRequestHeader("Content-length", params.length); xmlHTTPReq.setRequestHeader("Connection", "close"); xmlHTTPReq.send(params); xmlHTTPReq.onreadystatechange = function() { if (xmlHTTPReq.readyState == 4 && xmlHTTPReq.status == 200) { } } } } /*----------------------------------------------------------------- !intÇüÀ¸·Î º¯È¯ -----------------------------------------------------------------*/ function getInt(str) { str = str.toString(); str = eregi_replace("[^0-9]", "", str); str = parseInt(str, 10); if(isNaN(str)) { str = 0; } return str; } /*----------------------------------------------------------------- !floatÇüÀ¸·Î º¯È¯ -----------------------------------------------------------------*/ function getFloat(str) { str = str.toString(); // ¼ýÀÚ¿Í Á¡(.) ÀÌ¿ÜÀÇ ¹®ÀÚ¸¦ ¸ðµÎ Á¦°Å str = str.replace(/[^0-9.]/gi, ""); // ù ¹øÂ° Á¡ ÀÌÈÄ¿¡ ³ªÅ¸³ª´Â Á¡(.)Àº ¸ðµÎ Á¦°Å (Áï, ¼Ò¼öÁ¡Àº Çϳª¸¸ Çã¿ë) var dotIndex = str.indexOf('.'); if (dotIndex !== -1) { str = str.substring(0, dotIndex + 1) + str.substring(dotIndex + 1).replace(/\./g, ""); } str = parseFloat(str); if (isNaN(str)) { str = 0; } return str; } /*----------------------------------------------------------------- ŸÀÌ¸Ó discountTimer(ÀÏ, ½Ã, ºÐ, ÃÊ, °á°úÇ¥½ÃÀ§Ä¡, [Á¾·á¸Þ¼¼Áö]) -----------------------------------------------------------------*/ function discountTimer(dd, hh, mm, ss, dest, msgEnd) { if(!msgEnd) { msgEnd = '±â°£ÀÌ Á¾·áµÇ¾ú½À´Ï´Ù'; } ss = ss - 1; if(ss == -1) { ss = 59; mm = mm - 1; } if(mm == -1) { mm = 59; hh = hh - 1; } if(hh == -1) { hh = 23; dd = dd - 1; } if(ss == 0 && mm == 0 && hh == 0 && dd == 0) { document.getElementById(dest).innerHTML = msgEnd; return; } dd += ''; hh += ''; mm += ''; ss += ''; dd = (dd.length==1) ? '0'+dd : dd; hh = (hh.length==1) ? '0'+hh : hh; mm = (mm.length==1) ? '0'+mm : mm; ss = (ss.length==1) ? '0'+ss : ss; document.getElementById(dest).innerHTML = dd + 'ÀÏ ' + hh + '½Ã°£ ' + mm + 'ºÐ ' + ss + 'ÃÊ ³²À½'; window.setTimeout("discountTimer("+dd+","+hh+","+mm+","+ss+",'"+dest+"','"+msgEnd+"')",1000); } function discountTimerMinute(dd, hh, mm, ss, dest, msgEnd, head, foot) { if(!msgEnd) { msgEnd = '±â°£ÀÌ Á¾·áµÇ¾ú½À´Ï´Ù'; } ss = ss - 1; if(ss == -1) { ss = 59; mm = mm - 1; } if(mm == -1) { mm = 59; hh = hh - 1; } if(hh == -1) { hh = 23; dd = dd - 1; } if(ss == 0 && mm == 0 && hh == 0 && dd == 0) { document.getElementById(dest).innerHTML = msgEnd; return; } dd += ''; hh += ''; mm += ''; ss += ''; dd = (dd.length==1) ? '0'+dd : dd; hh = (hh.length==1) ? '0'+hh : hh; mm = (mm.length==1) ? '0'+mm : mm; ss = (ss.length==1) ? '0'+ss : ss; document.getElementById(dest).innerHTML = head + mm + 'ºÐ ' + ss + 'ÃÊ' + foot; window.setTimeout("discountTimerMinute("+dd+","+hh+","+mm+","+ss+",'"+dest+"','"+msgEnd+"','"+head+"','"+foot+"')",1000); } /*----------------------------------------------------------------- context menu¿­±â -----------------------------------------------------------------*/ function openContextMenu(url,width,height) { var ie=document.all; var ns6=document.getElementById && !document.all; if(typeof(e) == 'undefined') { var e = {}; ns6 = false; } if(document.compatMode!="BackCompat") { var curX=(ns6)?e.pageX : event.x+document.documentElement.scrollLeft; var curY=(ns6)?e.pageY : event.y+document.documentElement.scrollTop; } else { var curX=(ns6)?e.pageX : event.x+document.body.scrollLeft; var curY=(ns6)?e.pageY : event.y+document.body.scrollTop; } var contextMenuLayer = document.getElementById('contextMenu'); var contextMenuIframe = document.getElementById('contextMenuFrame'); contextMenuFrame.location.href = url; contextMenuLayer.style.width = width; contextMenuLayer.style.height = height; contextMenuIframe.style.width = width; contextMenuIframe.style.height = height; contextMenuLayer.style.top = curY + 15; contextMenuLayer.style.left = curX - Math.round(width/2); contextMenuLayer.style.visibility = 'visible'; } /*----------------------------------------------------------------- blink exception Ãß°¡ 2005.06.24 (±Ý) by ½Åµ¿±Ô -----------------------------------------------------------------*/ function doBlink() { try { var blink = document.all.tags("BLINK") } catch(e) { return; } for (var i=0; i < blink.length; i++) { blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : ""; } } function startBlink() { var blink_speed = 600; if (document.all) { setInterval("doBlink()", blink_speed); } } startBlink(); /*----------------------------------------------------------------- ¶óµð¿À ¹öưÀÇ ¼±ÅÃµÈ À妽º °ª ±¸Çϱâ -----------------------------------------------------------------*/ function getRadioSelectedIndex(obj) { var idx = ''; for(var i=0; i"; preloadQueue[j] = obj[i]; j++; continue; } } document.getElementById('preloadArea').innerHTML = buff; for(var i=0; i = \ °ø±Þ°¡ + \ ¼¼¾× \ \ '; obj.innerHTML = buf; obj.style.display = 'inline'; calcVatCalc(id); } function calcVatCalc(id) { var amt = document.getElementById(id + '_1').value; amt = getInt(amt); if(!amt) { try { document.getElementById(id + '_1').focus(); } catch(e) { } return; } else { var vat = Math.floor(amt / 11); var prs = amt - vat; try { document.getElementById(id + '_2').value = prs; document.getElementById(id + '_3').value = vat; } catch(e) { } } } /*----------------------------------------------------------------- ¹è¿­°Ë»ç -----------------------------------------------------------------*/ function in_array(needle, haystack) { for(key in haystack) { if(haystack[key] == needle) { return true; } } return false; } /*----------------------------------------------------------------- ¾Ö´Ï¸ÞÀÌ¼Ç ÁßÁö -----------------------------------------------------------------*/ function stopAnimation() { try { if (top.window.stop !== undefined) { top.window.stop(); } else if (window.stop !== undefined) { window.stop(); } else if (top.document.execCommand !== undefined) { top.document.execCommand("Stop", false); } else if (document.execCommand !== undefined) { document.execCommand("Stop", false); } } catch (ex) { } } function safetyStopAnimation() { try { if (document.readyState == 'undefined') return; if (top.document.readyState == 'complete' && document.readyState == 'complete') { setTimeout("stopAnimation()", 50); } else { setTimeout("safetyStopAnimation()", 50); } } catch (ex) { } } /*----------------------------------------------------------------- °ø»çÁß -----------------------------------------------------------------*/ function underconstruction() { alert('Á˼ÛÇÕ´Ï´Ù. °ð ¿ÀÇ¿¹Á¤ÀÎ ±â´ÉÀÔ´Ï´Ù'); } /*----------------------------------------------------------------- get scroll position -----------------------------------------------------------------*/ function get_scroll() { var x = 0, y = 0; if( typeof( window.pageYOffset ) == 'number' ) { //Netscape compliant y = window.pageYOffset; x = window.pageXOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { //DOM compliant y = document.body.scrollTop; x = document.body.scrollLeft; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { //IE6 standards compliant mode y = document.documentElement.scrollTop; x = document.documentElement.scrollLeft; } var obj = new Object(); obj.x = x; obj.y = y; return obj; }; function getClientSize() { var obj = new Object(); obj.w = window.innerWidth? window.innerWidth: document.documentElement.clientWidth; obj.h = window.innerHeight? window.innerHeight: document.documentElement.clientHeight; return obj; } /*----------------------------------------------------------------- ÁÖ¾îÁø IDÀÇ °´Ã¼ ÇÏÀ§¿¡ Æ÷ÇÔµÈ iframe °´Ã¼¸¦ ã¾Æ, ggook / domeggook ¿ÜÀÇ µµ¸ÞÀÎÀÎ °æ¿ì °´Ã¼¸¦ Á¦°Å -----------------------------------------------------------------*/ function iframeUrlCheck(id, domain, remove) { if(document.getElementById(id)) { // µÑ·¯½Î°í ÀÖ´Â °´Ã¼ var wrapElm = document.getElementById(id); // Çã¿ëµµ¸ÞÀÎ for(x in domain) { domain[x] = '(' + domain[x].replace('.', '\.') + ')'; } domain = domain.join('|'); // üũÇÒ Á¶°Ç var checkUrl = new RegExp('^(http([s]*):\/\/){0,1}(www.){0,1}(' + domain + ')', 'g'); var delNo = ''; // ÇÏÀ§¿¡ Á¸ÀçÇÏ´Â iframe var ifmArr = wrapElm.getElementsByTagName('iframe'); var ifmCnt = ifmArr.length; for(var i=0; i