function getCookie( name ){ var nameOfCookie = name + "="; var x = 0; while ( x <= document.cookie.length ) { var y = (x+nameOfCookie.length); if ( document.cookie.substring( x, y ) == nameOfCookie ) { if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 ) endOfCookie = document.cookie.length; return unescape( document.cookie.substring( y, endOfCookie ) ); } x = document.cookie.indexOf( " ", x ) + 1; if ( x == 0 ) break; } return ""; } function doBlink() { var blink = document.all.tags("BLINK"); for (var i=0; i 1024) { top.document.all['main_iframe'].style.width = document.body.scrollWidth; } } function Get_WindowHeight(width,height) { resizeTo(width,document.body.scrollHeight + height); } function OpenZipcode(pwd,fname,z1,z2,ad,ad1) { var gpwd = (pwd) ? pwd : '.'; var url = gpwd+'/pack/zipsearch/zipcode.php?form='+fname+'&zip1='+z1+'&zip2='+z2+'&address='+ad+'&address1='+ad1; window.open(url,'zip_win','width=460,height=550,statusbar=no,scrollbars=yes,toolbar=no'); } function commaSplit(srcNumber) { var txtNumber = '' + srcNumber; var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])'); var arrNumber = txtNumber.split('.'); arrNumber[0] += '.'; do { arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2'); } while (rxSplit.test(arrNumber[0])); if (arrNumber.length > 1) { return arrNumber.join(''); } else { return arrNumber[0].split('.')[0]; } } function commaInsert(field) { field.value = commaSplit(filterNum(field.value)); } function filterNum(str) { re = /^\$|,/g; return str.replace(re, ""); } function TypeCheck (s, spc) { var i; for(i=0; i< s.length; i++) { if (spc.indexOf(s.substring(i, i+1)) < 0) { return false; } } return true; } function clearField(field) { if (field.value == field.defaultValue) { field.value = ""; } } function checkField(field) { if (!field.value) { field.value = field.defaultValue; } } function getSort(f,new_sort,new_orderby) { f.sort.value = new_sort; f.orderby.value = new_orderby; f.submit(); } function getPageGo(f,new_p) { f.p.value = new_p; f.submit(); } function is_number(){ if ((event.keyCode<48)||(event.keyCode>57)){ alert("\n¼ýÀÚ¸¸ ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù. \n"); event.returnValue=false; } } function view_pic(uid,skin,type) { var url = "./instance/picviewer/" + skin + "/viewer.php?type=" + type + "&uid=" + uid; window.open(url,'pic_win','scrollbars=no,width=750,height=550'); } function view_movie(url) { window.open(url,'movie_win', 'width=600,height=400,scrollbars=no'); return false; } function OpenZipcode(pwd,fname,z1,z2,ad,ad1) { var gpwd = (pwd) ? pwd : '.'; var url = gpwd+'/pack/zipsearch/zipcode.php?form='+fname+'&zip1='+z1+'&zip2='+z2+'&address='+ad+'&address1='+ad1; window.open(url,'zip_win','width=460,height=550,statusbar=no,scrollbars=yes,toolbar=no'); } function getJeolsa(money , num , alt) { var money = ''+parseInt(money)+''; var jeolsa = money.substr(money.length - num , num); var rmoney = money - jeolsa; if (alt && jeolsa != '0') { alert(jeolsa + '¿øÀÌ Àý»çµÇ¾ú½À´Ï´Ù. '); } return rmoney; } function menulog_check() { var f = document.menulog_form; if (!f.MB_ID.value) { alert('¾ÆÀ̵𸦠ÀÔ·ÂÇØ ÁÖ¼¼¿ä '); f.MB_ID.focus(); return false; } if (!f.MB_PW.value) { alert('ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä '); f.MB_PW.focus(); return false; } } function mb_check(ths) { if (ths.checked == true) { if (!confirm('\n\nÆÐ½º¿öµåÁ¤º¸¸¦ ÀúÀåÇÒ °æ¿ì ´ÙÀ½Á¢¼Ó½Ã \n\nÆÐ½º¿öµå¸¦ ÀÔ·ÂÇÏÁö ¾ÊÀ¸¼Åµµ µË´Ï´Ù.\n\n±×·¯³ª, °³ÀÎPC°¡ ¾Æ´Ò °æ¿ì ŸÀÎÀÌ ·Î±×ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù. \n\nPC¸¦ ¿©·¯»ç¶÷ÀÌ »ç¿ëÇÏ´Â °ø°øÀå¼Ò¿¡¼­´Â üũÇÏÁö ¸¶¼¼¿ä.\n\nÁ¤¸»·Î ÆÐ½º¿öµå¸¦ ±â¾ï½ÃŰ°Ú½À´Ï±î?\n\n')) { ths.checked = false; } } } function mypage_view(n) { var l = document.all.kims_mypage_lay; if (n) { var x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX; var y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY; l.style.top = y; l.style.left = x + 20; l.style.visibility = "visible"; } else { l.style.top = 0; l.style.left = -500; l.style.visibility = "hidden"; } } function mouse_over(t) { t.style.backgroundColor='#21558C'; t.style.color='FFFFFF'; } function mouse_out(t) { t.style.backgroundColor='FFFFFF'; t.style.color='000000'; } function idpass_search() { window.open('./include/lib/idpass_search.php', 'passsearch','width=450,height=262,statusbar=no,scrollbars=no,toolbar=no'); } /********************************************************************* ¼­ºê¸Þ´º ·¹À̾î */ function sub_MenuShow(cat) { eval("document.all.sub_menu_" + cat).style.visibility = "visible"; } function sub_MenuHide(cat) { eval("document.all.sub_menu_" + cat).style.visibility = "hidden"; } /********************************************************************* ¼­ºê¸Þ´º Åä±Û */ function submenu_togle_on(num,sj) { var gnum = parseInt(num) + 1; for (var j = 1; j < gnum; j++ ){ eval("document.all.sub_menu_" + j).style.display = "none"; } eval("document.all.sub_menu_" + sj).style.display = "block"; } function emotion_change(i) { var j; for(j = 1; j < 19; j++) { if (i != j) { eval("document.all.emotion_img_" + j).style.filter = "gray()"; eval("document.all.emotion_lay_" + j).style.filter = "gray()"; eval("document.all.emotion_tbl_" + j).style.background = ""; eval("document.all.emotion_tbl_" + j).style.border = "1 solid efefef"; } else { eval("document.all.emotion_img_" + j).style.filter = ""; eval("document.all.emotion_lay_" + j).style.filter = ""; eval("document.all.emotion_tbl_" + j).style.background = "ffffff"; eval("document.all.emotion_tbl_" + j).style.border = "1 solid c0c0c0"; } } document.WriteForm.BB_EMOTION.value = i; } function sorry_comment() { alert('\nȸ¿øÀ¸·Î ·Î±×ÀÎÇÏ¼Å¾ß µî·ÏÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. \n'); return false; } function sorry_qna() { alert('\nȸ¿øÀ¸·Î ·Î±×ÀÎÇÏ¼Å¾ß µî·ÏÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. \n'); return false; } function comment_submit_check() { var f = document.WriteForm; if (!f.member_id.value) { if (!f.VT_NAME.value) { alert('\nÀ̸§À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä. \n'); f.VT_NAME.focus(); return false; } } if (!f.VT_VOTE.value) { alert('\nÆò°¡Á¡¼ö¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä. \n'); f.VT_VOTE.focus(); return false; } if (!f.VT_CONTENT.value) { alert('\nÆò°¡³»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä. \n'); f.VT_CONTENT.focus(); return false; } } function comment_del(vid) { var f = document.WriteForm; if (!confirm('\nÁ¤¸»·Î Æò°¡±ÛÀ» »èÁ¦ÇϽðڽÀ´Ï±î? \n')) { return false; } f.action.value = "comment_delete"; f.vid.value = vid; f.submit(); } function comment_del_1(vid,p) { if (!confirm('\nÁ¤¸»·Î Æò°¡±ÛÀ» »èÁ¦ÇϽðڽÀ´Ï±î? \n')) { return false; } location.href = "./mall.php?action=comment_delete&where=mypage&vid=" + vid + "&p=" + p; } function comment_write(type,no,enable,id) { if (enable == "checked" && id == '') { alert('\nȸ¿øÀ¸·Î ·Î±×ÀÎÇÏ¼Å¾ß µî·ÏÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. \n'); return false; } document.all.mall_comment_lay.style.display = "block"; } function qna_write(type,no,enable,id) { if (enable == "checked" && id == '') { alert('\nȸ¿øÀ¸·Î ·Î±×ÀÎÇÏ¼Å¾ß µî·ÏÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. \n'); return false; } document.all.mall_qna_lay.style.display = "block"; } function qna_all(type,no) { window.open(''); } function qna_submit_check() { var f = document.QnaForm; if (!f.QA_SUBJECT.value) { alert('\n¹®ÀÇÁ¦¸ñÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä. \n'); f.QA_SUBJECT.focus(); return false; } if (!f.member_id.value) { if (!f.QA_NAME.value) { alert('\nÀ̸§À» ÀÔ·ÂÇØ ÁÖ¼¼¿ä. \n'); f.QA_NAME.focus(); return false; } } if (!f.QA_CONTENT.value) { alert('\n¹®Àdz»¿ëÀ» ÀÔ·ÂÇØ ÁÖ¼¼¿ä. \n'); f.QA_CONTENT.focus(); return false; } } function gQnaView(cat,no,qa_uid,qa_reply,type) { location.href = "./"+type+".php?cat=" + cat + "&query=view&no=" + no + "&qa_uid=" + qa_uid + "&qa_reply=" + qa_reply + "#opq"; } function gQnaView_1(qa_uid,qa_reply,p) { location.href = "./mypage.php?query=myqna&p=" + p + "&qa_uid=" + qa_uid + "&qa_reply=" + qa_reply + "#opq"; } function goods_cmp() { var f = document.goods_list; var i; var chk = 0; var gg_que = ""; for (i = 0; i < f.length; i++) { if (f[i].name.substring(0,6) == "multi_" && f[i].checked == true) { chk++; gg_que += "&" + f[i].name + "=" + f[i].value; } } if (!chk) { alert('\nºñ±³ÇÒ »óǰÀ» ¼±ÅÃÇØ ÁÖ¼¼¿ä. \n'); return false; } if (chk < 2) { alert('\n»óǰºñ±³´Â Àû¾îµµ 2°³ ÀÌ»óÀ̾î¾ß ÇÕ´Ï´Ù. \n'); return false; } if (chk > 5) { alert('\n»óǰºñ±³´Â 5°³À̳»·Î ¼±ÅÃÇØ ÁÖ¼¼¿ä. \n'); return false; } location.href = "./search.php?query=multi" + gg_que; } function n_order_view() { var f = document.order_form; var oid = f.oid.value; var name = f.name.value; var type = f.type.value; if (!oid || !name) { alert('\nÁÖ¹®¹øÈ£È­ ÁÖ¹®ÀÚÀ̸§À» Á¤È®È÷ ÀÔ·ÂÇØ ÁÖ¼Å¾ß \n\nÁÖ¹®,¹è¼Û»óÅ Á¶È¸°¡ °¡´ÉÇÕ´Ï´Ù \n'); return false; } window.open('./include/lib/order_'+type+'.php?oid=' + oid + '&name=' + name,'order_win','scrollbars=yes,width=700,height=650'); } function sub_category_open() { var ly = document.all.sub_category_list.style.display; document.all.sub_category_list.style.display = (ly == 'none') ? 'block' : 'none'; } function num_plus(ths , danwee , f) { var f = (!f) ? document.view_form : f; var jaego = parseInt(filterNum(f.jaego.value)); var ipgo = parseInt(f.ipgo.value); var fnum = parseInt(ths.value); ths.value = fnum + parseInt(danwee); ths.focus(); if (ipgo != 0) { if (fnum > jaego-1) { alert('\nÀç°í¼ö·®À» ÃʰúÇÏ¿´½À´Ï´Ù. \n'); ths.value = fnum; return false; } } } function num_minus(ths , danwee , f) { var f = (!f) ? document.view_form : f; var jaego = parseInt(filterNum(f.jaego.value)); var ipgo = parseInt(f.ipgo.value); var fnum = parseInt(ths.value); ths.value = (fnum > parseInt(danwee)) ? fnum - parseInt(danwee) : parseInt(danwee); ths.focus(); } function jaego_check(ths , danwee, f) { var f = (!f) ? document.view_form : f; var jaego = parseInt(filterNum(f.jaego.value)); var ipgo = parseInt(f.ipgo.value); var fnum = parseInt(ths.value); var i; if (ipgo != 0) { if (ths.value % parseInt(danwee)) { alert('\nº» Á¦Ç°Àº '+danwee+'ÀÇ ¹è¼ö·Î¸¸ ÁÖ¹®ÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. \n'); ths.value = danwee; return false; } if (fnum > jaego+1) { alert('\nÀç°í¼ö·®À» ÃʰúÇÏ¿´½À´Ï´Ù. \n'); ths.value = parseInt(jaego/parseInt(danwee))*parseInt(danwee); return false; } } } function chadung_insert(ths,f) { if (!ths.value) { return false; } var f = (!f) ? document.view_form : f; var cha = ths.value.split('|'); var j; var y = 0; if (cha[3] != '0' && parseInt(cha[3]) - (parseInt(cha[4]) + parseInt(cha[5])) < 1) { alert('\nÁ˼ÛÇÕ´Ï´Ù. ¼±ÅÃÇϽŠÁ¦Ç°Àº ǰÀý»óÅÂÀÔ´Ï´Ù. \n'); for(j = 0; j < ths.options.length; j++) { var scha = ths.options[j].value.split('|'); if (!ths.options[j].value || scha[3] == '0' || parseInt(scha[3]) - (parseInt(scha[4]) + parseInt(scha[5])) > 0) { y++; if (y == 1) { ths.options[j].selected = true; } } } } var jx = f.js.value; view_page_setup(f,jx); } function option_insert(ths,f) { if (!ths.value) { return false; } var f = (!f) ? document.view_form : f; var cha = ths.value.split('|'); var j; var y = 0; if (cha[4] != '0' && parseInt(cha[4]) - (parseInt(cha[5]) + parseInt(cha[6])) < 1) { alert('\nÁ˼ÛÇÕ´Ï´Ù. ¼±ÅÃÇϽŠ¿É¼ÇÀº ǰÀý»óÅÂÀÔ´Ï´Ù. \n'); if(ths.type == 'radio') { ths.checked = false; } if(ths.type == 'select-one') { for(j = 0; j < ths.options.length; j++) { var scha = ths.options[j].value.split('|'); if (!ths.options[j].value || scha[4] == '0' || parseInt(scha[4]) - (parseInt(scha[5]) + parseInt(scha[6])) > 0) { y++; if (y == 1) { ths.options[j].selected = true; } } } } } var jx = f.js.value; view_page_setup(f,jx); var jaego_tmp = parseInt(cha[4]) - (parseInt(cha[5]) + parseInt(cha[6])); f.jaego_option.value = jaego_tmp; f.ipgo_option.value = cha[4]; } function view_page_setup(f,js) { var f = (!f) ? document.view_form : f; var js = (!js) ? f.js.value : js; var i,j; var y = 0; var z = 0; var g_original = 0; var g_price = 0; var g_point = 0; var g_jaego = (f.price_type.value != "2") ? parseInt(filterNum(f.jaego.value)) : 0; var g_ipgo = (f.price_type.value != "2") ? parseInt(filterNum(f.ipgo.value)) : 0; if (f.price_type.value == "3") { f.price.value = "º°µµÇùÀÇ"; f.point.value = "¹ÌÁ¤"; if (g_ipgo) { eval("document.all.jaego_span"+js).style.visibility = "visible"; f.jaego.size = commaSplit(g_jaego).length; f.jaego.value = commaSplit(g_jaego); } else { eval("document.all.jaego_span"+js).style.visibility = "hidden"; } if (g_ipgo) { var jaego = parseInt(filterNum(f.jaego.value)); var fnum = parseInt(f.buy_num.value); if (fnum > jaego) { alert('\nÁÖ¹®¼ö·®ÀÌ Àç°í¼ö·®º¸´Ù ¸¹¾Æ ÁÖ¹®¼ö·®À» \n\nÇöÀç Àç°í¼ö·®À¸·Î º¯°æÇÏ¿´½À´Ï´Ù. \n'); f.buy_num.value = jaego; return false; } } return false; } for(i = 0; i < f.length; i++) { if(f[i].name.substr(0,9) == 'tmp_price' && f[i].value) { var cha = f[i].value.split('|'); g_original += parseInt(cha[1]); g_price += parseInt(cha[1]); g_point += parseInt(cha[2]); g_ipgo += parseInt(cha[3]); g_jaego += parseInt(cha[3]) - (parseInt(cha[4])+parseInt(cha[5])); f.ipgo.value = cha[3]; } if(f[i].name.substr(0,9) == 'tmp_optio' && f[i].value) { if (f[i].type == 'radio') { var opt = f[i].value.split('|'); if (opt[4] != '0' && parseInt(opt[4]) - (parseInt(opt[5]) + parseInt(opt[6])) < 1) { f[i].checked = false; } if(f[i].checked == true) { g_price += parseInt(opt[2]); g_point += parseInt(opt[3]); } } else { var opt = f[i].value.split('|'); if (opt[4] != '0' && parseInt(opt[4]) - (parseInt(opt[5]) + parseInt(opt[6])) < 1) { for(j = 0; j < f[i].options.length; j++) { var scha = f[i].options[j].value.split('|'); if (scha[4] == '0' || parseInt(scha[4]) - (parseInt(scha[5]) + parseInt(scha[6])) > 0) { y++; if (y == 1) { f[i].options[j].selected = true; g_price += parseInt(scha[2]); g_point += parseInt(scha[3]); } } } } else { g_price += parseInt(opt[2]); g_point += parseInt(opt[3]); } } } } if (f.price_type.value == "1") { g_original += parseInt(f.price_original.value); g_price += parseInt(f.price_original.value); g_point += parseInt(f.point_original.value); } if (parseInt(f.halin_event_tmp.value)) { var event_halin_price = parseInt(g_original * (parseInt(f.halin_event_tmp.value)/100)); f.original_price.value = commaSplit(g_original) + "¿ø"; f.halin_event.value = commaSplit(event_halin_price) + "¿ø ("+f.halin_event_tmp.value+"%)"; g_price -= event_halin_price; } if (parseInt(f.halin_member_tmp.value)) { var event_halin_price1 = parseInt(g_original * (parseInt(f.halin_member_tmp.value)/100)); f.halin_member.value = commaSplit(event_halin_price1) + "¿ø ("+f.halin_member_tmp.value+"%)"; g_price -= event_halin_price1; } f.price.value = commaSplit(g_price) + "¿ø"; f.point.value = commaSplit(g_point) + "¿ø"; if (g_ipgo) { eval("document.all.jaego_span"+js).style.visibility = "visible"; f.jaego.size = commaSplit(g_jaego).length; f.jaego.value = commaSplit(g_jaego); } else { eval("document.all.jaego_span"+js).style.visibility = "hidden"; } if (g_ipgo) { var jaego = parseInt(filterNum(f.jaego.value)); var fnum = parseInt(f.buy_num.value); if (fnum > jaego) { alert('\nÁÖ¹®¼ö·®ÀÌ Àç°í¼ö·®º¸´Ù ¸¹¾Æ ÁÖ¹®¼ö·®À» \n\nÇöÀç Àç°í¼ö·®À¸·Î º¯°æÇÏ¿´½À´Ï´Ù. \n'); f.buy_num.value = jaego; return false; } } } function goods_buy(uid,type,skin,f) { var f = (!f) ? document.view_form : f; var jx = f.js.value; view_page_setup(f,jx); if ( type == 'buy') { if (!confirm('Á¤¸»·Î ¹Ù·Î ±¸¸ÅÇϽðڽÀ´Ï±î? ')) { return false; } f.action.value = type; f.submit(); } if ( type == 'cart') { if (!confirm('Á¤¸»·Î Àå¹Ù±¸´Ï¿¡ ´ãÀ¸½Ã°Ú½À´Ï±î? ')) { return false; } f.action.value = type; f.submit(); } if ( type == 'hyup') { if (!confirm('Á¤¸»·Î Á¦Ç°±¸ÀÔÀ» ÀÇ·ÚÇϽðڽÀ´Ï±î? ')) { return false; } f.action.value = type; f.submit(); } if ( type == 'wish') { if (!f.member_id.value) { if (!confirm('\n\nȸ¿øÀ¸·Î ·Î±×ÀÎÇÏ¼Å¾ß ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. \n\nÁö±Ý ·Î±×ÀÎÇϽðڽÀ´Ï±î?')) { return false; } else { location.href = "./login.php?pwd="+location.href; return false; } } if (!confirm('Á¤¸»·Î À§½Ã¸®½ºÆ®¿¡ ´ãÀ¸½Ã°Ú½À´Ï±î? ')) { return false; } var url = "cart.php?action=wish&type=mall&uid=" + uid; window.open(url , 'wishwin' , 'top=3000,left=0,width=100,height=100'); } if ( type == 'mail') { var uid_exp = uid.split(':'); var url = "./instance/mailer/"+skin+"/mailer.php?type=mall&uid="+uid_exp[0]+"&cat="+uid_exp[1]; window.open(url,'mail_win', 'width=500,height=500,scrollbars=no'); } } function wish_save(uid,f) { if (!f.member_id.value) { if (!confirm('\n\nȸ¿øÀ¸·Î ·Î±×ÀÎÇÏ¼Å¾ß ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù. \n\nÁö±Ý ·Î±×ÀÎÇϽðڽÀ´Ï±î?')) { return false; } else { location.href = "./login.php?pwd="+location.href; return false; } } if (!confirm('Á¤¸»·Î À§½Ã¸®½ºÆ®¿¡ ´ãÀ¸½Ã°Ú½À´Ï±î? ')) { return false; } var url = "cart.php?action=wish&type=mall&uid=" + uid; window.open(url , 'wishwin' , 'top=3000,left=0,width=100,height=100'); } function search_win(skin) { window.open('./template/search/'+skin+'/search.php','search_win','width=457,height=360,scrollbars=no'); } var optLay = new Object(); optLay.count = 1; function selectLayer(obj,val,func){ obj.style.display='none'; optLay[optLay.count] = obj; objOpt = optLay[optLay.count].options; str = new Array(); total = objOpt.length; tHeight = (16*total); out = "
" +"" +"
"+objOpt[0].text+" " +"
" +"