try{var _FrameHidden = top.hiddenFrame;}catch(e){} var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]); if (navigator.userAgent.indexOf('Mac') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; } if (navigator.userAgent.indexOf('Opera') >= 0) { win_ie_ver = 0; } var bidBg = null; var flash_bidBg = new Array(); // 색상 깜빡이용 var flash_no = new Array(); // 색상 깜빡이용 // 색상 깜빡깜빡 function flashit_(obj){ if (!document.all) return; if(!flash_no['bidBg']) flash_no['bidBg'] = 0; if ($(obj).style.backgroundColor==""){ $(obj).style.color = '#FFFFFF'; $(obj).style.backgroundColor = '#FF791D'; }else{ $(obj).style.color = '#FF791D'; $(obj).style.backgroundColor = ''; } flash_no['bidBg']++; if(flash_no['bidBg']>1){ clearInterval(bidBg); flash_no['bidBg'] = 0; $(obj).style.color = '#FF791D'; $(obj).style.backgroundColor = ''; } } // 색상 깜빡깜빡 function flashit(nm){ var obj = document.getElementById(nm); obj.style.color = '#FFFFFF'; obj.style.backgroundColor = '#FF791D'; setTimeout ("flashit2('"+nm+"')", 500); } // 색상 깜빡깜빡 function flashit2(nm){ var obj = document.getElementById(nm); obj.style.color = '#FF791D'; obj.style.backgroundColor = ''; } // 로그인 function top_login_send(){ var f = document.top_login; if(f.user_id.value == ''){ alert('아이디를 입력해 주세요.'); f.user_id.focus(); return; } if(f.user_pw.value == ''){ alert('비밀번호를 입력해 주세요.'); f.user_pw.focus(); return; } f.action = '/inc/user_check.html'; //f.target = 'hiddenFrame'; if (f.id_Chk.checked){ setCookie("UID", f.user_id.value, 365);}else{setCookie("UID", "", 365);} f.submit(); } function top_loginEnterCheck(th) { var f = document.top_login; if(event.keyCode ==13) { if(event.keyCode==13)event.keyCode=""; if(th.name=='user_id') f.user_pw.focus(); if(th.name=='user_pw') top_login_send(); } } // 로그인 function login_send(){ var f = document.login; if(f.user_id.value == ''){ alert('아이디를 입력해 주세요.'); f.user_id.focus(); return; } if(f.user_pw.value == ''){ alert('비밀번호를 입력해 주세요.'); f.user_pw.focus(); return; } f.action = '/inc/user_check.html'; //f.target = 'hiddenFrame'; if (f.id_Chk.checked){ setCookie("UID", f.user_id.value, 365);}else{setCookie("UID", "", 365);} f.submit(); } function loginEnterCheck(th) { var f = document.login; if(event.keyCode ==13) { if(event.keyCode==13)event.keyCode=""; if(th.name=='user_id') f.user_pw.focus(); if(th.name=='user_pw') login_send(); } } // 로그아웃 function logout(){ top.location.href = '/inc/user_logout.html'; } // 데이타 호출 //json_data => {"type":"auction_item_list","str":"Y|1|10|"} function DataSend(func,mode,idx,json_data) { var url = '/ajax_data.html'; var pars = 'mode='+mode+'&idx='+idx; if(json_data && json_data['type']=='auction_item_list') pars += '&str='+json_data['str']; var myAjax = new Ajax.Request( url, { method: 'POST', parameters: pars, onComplete: function (req) { DataResponse(req,func,mode,idx,json_data); }, onException: function(req,exception) { //alert("error!! [" + exception['number'] + ']\n\n' + exception['message']); } } ); } // 데이타 불러오기 DataResponse = function(xhr,func,mode,idx,json_data) { if (xhr.readyState== 4) { if(xhr.status== 200) { var jData = xhr.responseText; //var row = eval('(' + jData + ')'); if(json_data) eval(func+'('+jData+',json_data)'); else eval(func+'('+jData+')'); } else { //alert("Error: "+xhr.status); } } } // 페이지이동 function page_go(page){ top.location.href = page; } // 페이지이동 function page_move(page){ top.location.href = '/?page='+page; } // 몰 페이지이동 function page_mall_move(page){ top.location.href = '/mall/?page='+page; } // 관리자모드 페이지이동 function adm_page_move(page){ top.location.href = '/admin/?page='+page; } //공백문자를 제거하는 함수 function trim(s) { return s.replace(/^\s+|\s+$/g, ''); } // 주민번호 체크 000000-0000000 function check_juminno(resno) { // 주민번호의 형태와 7번째 자리(성별) 유효성 검사 fmt = /^\d{6}-[1234]\d{6}$/; if (!fmt.test(resno)) { //alert("잘못된 주민등록번호입니다."); return false; } // 날짜 유효성 검사 birthYear = (resno.charAt(7) <= "2") ? "19" : "20"; birthYear += resno.substr(0, 2); birthMonth = resno.substr(2, 2) - 1; birthDate = resno.substr(4, 2); birth = new Date(birthYear, birthMonth, birthDate); if ( birth.getYear() % 100 != resno.substr(0, 2) || birth.getMonth() != birthMonth || birth.getDate() != birthDate) { //alert("잘못된 주민등록번호입니다."); return false; } // Check Sum 코드의 유효성 검사 buf = new Array(13); for (i = 0; i < 6; i++) buf[i] = parseInt(resno.charAt(i)); for (i = 6; i < 13; i++) buf[i] = parseInt(resno.charAt(i + 1)); multipliers = [2,3,4,5,6,7,8,9,2,3,4,5]; for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]); if ((11 - (sum % 11)) % 10 != buf[12]) { //alert("잘못된 주민등록번호입니다."); return false; } //alert("정상적인 주민등록번호입니다."); return true; } // 이메일 체크 function CheckMail(strMail) { // @가 2개이상일 경우 // .이 붙어서 나오는 경우 // @.나 .@이 존재하는 경우 // 맨처음이.인 경우 // @이전에 하나이상의 문자가 있어야 함 // @가 하나있어야 함 // Domain명에 .이 하나 이상 있어야 함 // Domain명의 마지막 문자는 영문자 2~4개이어야 함 var check1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; var check2 = /^[a-zA-Z0-9\-\.\_]+\@[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4})$/; if ( !check1.test(strMail) && check2.test(strMail) ) { return true; } else { return false; } } // 윈도우 오픈창 열기 (url:경로,w:가로크기,h:세로크기,x:X위치,y:Y위치,res:창크기조정Y,tg:윈도우명) function winopen(url,w,h,x,y,res,tg,scroll) { var b_ver = browserVersion(); var undefined; if(x == undefined) x = ''; if(y == undefined) y = ''; if(tg == undefined) tg = ''; var resizable = (res == 'Y')?'yes':'no'; if(scroll == undefined) scroll = 'no'; var scroll = (scroll == 'Y')?'yes':'no'; if(win_ie_ver >= 8) { // IE8이상 w2 = w + 10; h2 = h + 79; }else if(win_ie_ver >= 7 || (win_ie_ver == 6 && b_ver==true)) { // IE7이상 또는 IE6 SP2 w2 = w + 10; h2 = h + 49; }else { w2 = w + 12; h2 = h + 30; } if(x == '') x=((screen.availWidth - w2) / 2); if(y == '') y=((screen.availHeight - h2) / 2); popupWin = window.open(url,tg,'scrollbars='+scroll+',toolbar=no,location=no,status=yes,width='+(w)+'px,height='+(h)+'px,resizable='+resizable+',menubar=no,top='+y+'px,left='+x+'px'); popupWin.focus(); document.onmousedown = focus_newwin; document.ondblclick = focus_newwin; } // 오픈창 항상 위에 있게 function focus_newwin() { if(popupWin != null && popupWin.closed == false) popupWin.focus(); } function browserVersion(){ tmp_MSIE = window.navigator.userAgent.indexOf("MSIE"); if(tmp_MSIE && window.navigator.userAgent.indexOf("SV1") > tmp_MSIE){ // XP SP2 브라우저임.. return true; } else { //XP SP2 브라우저가 아님. return false; } } // 우편번호 function post(frm,zip1,zip2,addr1,addr2) { winopen('/etc/postcode.html?frm='+frm+'&zip1='+zip1+'&zip2='+zip2+'&addr1='+addr1+'&addr2='+addr2,450,500); } // 라디오버턴 체크값가져오기 function RadioVal(obj) { if(!obj) return new Array('',''); var val = ''; var key = ''; var len = obj.length; if(len){ for (var i=0; i w2) x2 = w2 - w; if(y2+h > h2) y2 = h2 - h; }else{ x2 = Event.pointerX(event) + x; y2 = Event.pointerY(event) + y; } $('DIV_Calendar').style.left = x2 + 'px'; $('DIV_Calendar').style.top = y2 + 'px'; var f = th.form; if(arrayNo == undefined) arrayNo=''; if(dType == undefined) dType=''; if(arrayNo == ''){var day = f[name1].value;} else{var day = f[name1][arrayNo].value} var day2 = day.split('-'); var YY = ''; if(day2[0]) YY = day2[0]; var MM = ''; if(day2[1]) MM = day2[1]; var DD = ''; if(day2[2]) DD = day2[2]; var url = '/etc/calendar.html?'; url += 'CldType=view'; url += '&form='+f.name; url += '&name1='+name1; url += '&name2='+name2; url += '&year='+YY; url += '&month='+MM; url += '&agoDay='+DD; if(arrayNo)url += '&arrayNo='+arrayNo; if(dType)url += '&dType='+dType; $('DIV_Calendar').style.visibility = 'visible'; DIV_Calendar.innerHTML = ""; } function CalendarClose() { // 달력 닫기 $('DIV_Calendar').style.visibility = 'hidden'; } // 입력값이 날짜형식으로 변경 및 체크 // onblur='uf_ChkDate(this)' function uf_ChkDate(th,dType) { if(dType == undefined) dType=''; var str = th.value.replace(/-/g,''); str = str.replace(/:/g,''); switch(dType){ case "YYYY-MM": str2 = str.substr(0,6) + '010101'; break; case "HH:II": str2 = '00000000' + str.substr(0,4); break; default: str2 = str.substr(0,8) + '0101' ; break; } var sDate; if(str){ var now=new Date(str2.substr(0,4),str2.substr(4,2)-1,str2.substr(6,2),str2.substr(8,2),str2.substr(10,2)); var yy = now.getFullYear(); var mm = now.getMonth()+1; if(mm.toString().length==1) mm = '0' + mm; var dd = now.getDate(); if(dd.toString().length==1) dd = '0' + dd; var hh = now.getHours(); if(hh.toString().length==1) hh = '0' + hh; var ii = now.getMinutes(); if(ii.toString().length==1) ii = '0' + ii; var yy = yy.toString(); if(yy.length == 1) yy = "190" + yy; if(yy.length == 2) yy = "19" + yy; sDate = yy+'-'+mm+'-'+dd+' '+hh+':'+ii; if(!yy || !mm || !dd || !hh || !ii) sDate = ''; }else{ sDate = ''; } if(sDate){ switch(dType){ case "YYYY-MM": val = sDate.substr(0,7); break; case "HH:II": val = sDate.substr(11,5); break; default: val = sDate.substr(0,10); break; } th.value = val; }else{ th.value = ''; } return } // 방향키 사용시 날자 증감처리 function keyDown_Date(th,dType) { //alert(event.keyCode); if(dType == undefined) dType=''; var str = th.value.replace(/-/g,''); str = str.replace(/:/g,''); switch(dType){ case "YYYY-MM": str2 = str.substr(0,6) + '010101'; y = 0; m = 1; d = 0; h = 0; i = 0; break; case "HH:II": str2 = '00000000' + str.substr(0,4); y = 0; m = 0; d = 0; h = 0; i = 1; break; default: str2 = str.substr(0,8) + '0101' ; y = 0; m = 0; d = 1; h = 0; i = 0; break; } var y,m,d,h,i; switch(event.keyCode){ case 38: // ↑ y = parseInt(str2.substr(0,4)*1) + y; m = parseInt(str2.substr(4,2)*1) + m; d = parseInt(str2.substr(6,2)*1) + d; h = parseInt(str2.substr(8,2)*1) + h; i = parseInt(str2.substr(10,2)*1) + i; break; case 40: // ↓ y = parseInt(str2.substr(0,4)*1) - y; m = parseInt(str2.substr(4,2)*1) - m; d = parseInt(str2.substr(6,2)*1) - d; h = parseInt(str2.substr(8,2)*1) - h; i = parseInt(str2.substr(10,2)*1) - i; break; case 112: // F1 document.onhelp = helpEnd; var now=new Date(); break; default: return; break; } if(!now) var now=new Date(y,m-1,d,h,i); var yy = now.getFullYear(); var mm = now.getMonth()+1; if(mm.toString().length==1) mm = '0' + mm; var dd = now.getDate(); if(dd.toString().length==1) dd = '0' + dd; var hh = now.getHours(); if(hh.toString().length==1) hh = '0' + hh; var ii = now.getMinutes(); if(ii.toString().length==1) ii = '0' + ii; var yy = yy.toString(); if(yy.length == 1) yy = "190" + yy; if(yy.length == 2) yy = "19" + yy; sDate = yy+'-'+mm+'-'+dd+' '+hh+':'+ii; if(!yy || !mm || !dd || !hh || !ii) sDate = ''; switch(dType){ case "YYYY-MM": val = sDate.substr(0,7); break; case "HH:II": val = sDate.substr(11,5); break; default: val = sDate.substr(0,10); break; } th.value = val; } // 날자형식 입력 (숫자,-,:) 입력 // function DateChk(dType) { if(dType == undefined) dType=''; var key = event.keyCode; //alert(event.keyCode);return switch(dType){ case "YYYY-MM": if((key<48||key>57) && key!=45){event.returnValue=false;} break; case "HH:II": if((key<48||key>57) && key!=58){event.returnValue=false;} break; default: if((key<48||key>57) && key!=45){event.returnValue=false;} break; } } // 숫자와 점(.) 대쉬 (-) 입력 // function NumberChk() { //alert(event.keyCode); if((event.keyCode<48||event.keyCode>57)&&event.keyCode!==46 && event.keyCode !== 45){ event.returnValue=false; } } //---체크박스에 모두 체크/해제---// // // // frm:폼명, check:체크유무, name:체크될 checkbox명 function All_Chk(th,name){ var f = th.form; var check = th.checked; if (!f[name]) return; var tot = f[name].length; var obj = f[name]; if (tot) { for(var i = 0; i < tot; i++) { obj[i].checked = check; } }else { obj.checked = check; } return; } // 숫자 세 자리마다 콤마 찍기 function NumberFormat(str) { var str = str.replace(/,/g,'').toString(); var arr = str.split('.'); var n = arr[0]; var n2 = arr[1]; var reg = /(^[+-]?\d+)(\d{3})/; // 정규식 n += ''; // 숫자를 문자열로 변환 while (reg.test(n)) n = n.replace(reg, '$1' + ',' + '$2'); if(n2) n = n + '.' + n2; return n; } // 숫자에 , 를 출력 // onkeyup="NumberFormat2(this)" function NumberFormat2(th) { var val = th.value.replace(/,/g,'').toString(); var val1 = val.substring(0,1); var val2 = val.substring(1,val.length); var str = (val1 == '-')?val2:val; var arr = str.split('.'); if(!val1 || (val1=='-' && !val2))return; if(event.keyCode==190 && arr.length<3)return; if(event.keyCode==13)return; var str1 = parseInt(arr[0]); var str2 = parseInt(arr[1]); if(isNaN(str1)){th.value=0;return;} if(str2 && isNaN(str2)){th.value=0;return;} str1 = str1.toString(); var retValue = ""; retValue = NumberFormat(str1); if(val1 == '-') retValue = '-' + retValue; if(str2) retValue = retValue + '.' + str2; th.value = retValue; return; } // 입력박스 입력문제 체크 // // InputBoxChk = function (str){ var chk = false; arr = Array(str); if(typeof(str)=='object') arr = str; var len = arr.length; for(var i=0;i=48 && event.keyCode<=57) chk = true; break; // 숫자 case ":": if(event.keyCode==58) chk = true; break; case ";": if(event.keyCode==59) chk = true; break; case "<": if(event.keyCode==60) chk = true; break; case "=": if(event.keyCode==61) chk = true; break; case ">": if(event.keyCode==62) chk = true; break; case "?": if(event.keyCode==63) chk = true; break; case "@": if(event.keyCode==64) chk = true; break; case "A~Z": if(event.keyCode>=65 && event.keyCode<=90) chk = true; break; // 영문 case "[": if(event.keyCode==91) chk = true; break; case "\\": if(event.keyCode==92) chk = true; break; case "]": if(event.keyCode==93) chk = true; break; case "^": if(event.keyCode==94) chk = true; break; case "_": if(event.keyCode==95) chk = true; break; case "`": if(event.keyCode==96) chk = true; break; case "a~z": if(event.keyCode>=97 && event.keyCode<=122) chk = true; break; // 영문 case "{": if(event.keyCode==123) chk = true; break; case "|": if(event.keyCode==124) chk = true; break; case "}": if(event.keyCode==125) chk = true; break; case "~": if(event.keyCode==126) chk = true; break; } if(event.keyCode==46 || event.keyCode==8) chk = true; // ←,Delete if(chk==true)break; } event.returnValue = chk; } // 배열내 값 검색 function Array_search(arr,str) { var len = arr.length; if(len){ for (var i=0; i (0/250 byte) */ function check_length(th,MaxLen) { // 메시지 글자수 체크 var tmpStr, nStrLen, reserve, frm; msglen = th.name + '_Label'; sInputStr = th.value; nStrLen = calculate_byte(sInputStr); if ( nStrLen > MaxLen ) { tmpStr = Cut_Str(sInputStr,MaxLen); reserve = nStrLen - MaxLen; alert("글자수가 초과되었습니다.(최대 "+MaxLen+"Bytes)"); // byte에 맞게 입력내용 수정 th.value = tmpStr; nStrLen = calculate_byte(tmpStr); window[msglen].innerText = nStrLen; } else { window[msglen].innerText = nStrLen; } return; } function calculate_byte( sTargetStr ) { var sTmpStr, sTmpChar; var nOriginLen = 0; var nStrLength = 0; sTmpStr = new String(sTargetStr); nOriginLen = sTmpStr.length; for ( var i=0 ; i < nOriginLen ; i++ ) { sTmpChar = sTmpStr.charAt(i); if (escape(sTmpChar).length > 4) { nStrLength += 2; } else if (sTmpChar!='\r') { nStrLength ++; } } return nStrLength; } function Cut_Str( sTargetStr , nMaxLen ) { var sTmpStr, sTmpChar, sDestStr; var nOriginLen = 0; var nStrLength = 0; var sDestStr = ""; sTmpStr = new String(sTargetStr); nOriginLen = sTmpStr.length; for ( var i=0 ; i < nOriginLen ; i++ ) { sTmpChar = sTmpStr.charAt(i); if (escape(sTmpChar).length > 4) { nStrLength = nStrLength + 2; } else if (sTmpChar!='\r') { nStrLength ++; } if (nStrLength <= nMaxLen) { sDestStr = sDestStr + sTmpChar; } else { break; } } return sDestStr; } /***********************************************************/ // 이미지 레이어로 보기 // onMouseover="img_Over('/aaa.jpg',100,100)" onMouseout='img_Out()' function img_Over(imageUrl,w3,h3){ if(!$('DIV_IMG')){ var aElement=document.createElement("DIV"); aElement.id = "DIV_IMG"; aElement.style.position = "absolute"; aElement.style.zIndex = "9999"; aElement.style.visibility = 'hidden'; document.body.insertBefore(aElement); var html = ""; html += ""; html += "
"; DIV_IMG.innerHTML = html; } w = (w3>300)?w3:300; h = (h3>400)?h3:400; w2 = document.body.clientWidth; h2 = document.body.offsetHeight; h2 += document.documentElement.scrollTop; x2 = Event.pointerX(event) - w - 50; y2 = Event.pointerY(event) - 50; if(x2+w > w2) x2 = w2 - w; if(y2+h > h2) y2 = h2 - h; $('DIV_IMG').style.left = x2 + 'px'; $('DIV_IMG').style.top = y2 + 'px'; var imgNm = document.images['middleImage']; imgNm.src = imageUrl; imgNm.width = w3; imgNm.height = h3; var Menu = eval("document.getElementById('DIV_IMG').style"); Menu.visibility = 'visible'; } // 이미지 레이어 닫기 function img_Out(){ var Menu = eval("document.getElementById('DIV_IMG').style"); Menu.visibility = 'hidden'; } // 일반,휴대 전화 체크 function chk_phone( num ){ var valid_reg = /^[0-9]{1,}\-[0-9]{1,}\-[0-9]{1,}$/; if ( !valid_reg.test( num ) ){ return false; } return true; } // 휴대전화 체크 function chk_hp( num ){ var valid_reg = /^\d{3}-\d{3,4}-\d{4}$/; if ( !valid_reg.test( num ) ){ return false; } return true; } // 일반전화 체크 function chk_tel( num ){ var valid_reg = /^\d{2,3}-\d{3,4}-\d{4}$/; if ( !valid_reg.test( num ) ){ return false; } return true; } // 즐겨찾기 추가 function bookmarksite(title,url) { if (window.sidebar) // firefox window.sidebar.addPanel(title, url, ""); else if(window.opera && window.print) { // opera var elem = document.createElement('a'); elem.setAttribute('href',url); elem.setAttribute('title',title); elem.setAttribute('rel','sidebar'); elem.click(); } else if(document.all) // ie window.external.AddFavorite(url, title); } // 파일다운 function file_down(code) { top.hiddenFrame.location.href='/etc/down.html?filecode='+code; } // 오픈창 사이즈 조절 // // w : 가로사이즈 // h : 세로사이즈 // type : 위치 (L:좌측,C:중앙,R:우측) function AutoWinSize(w,h,type){ var b_ver = browserVersion(); if(win_ie_ver >= 8) { // IE8이상 w = w + 10; h = h + 79; }else if(win_ie_ver >= 7 || (win_ie_ver == 6 && b_ver==true)) { // IE7이상 또는 IE6 SP2 w = w + 10; h = h + 49; }else { w = w + 12; h = h + 30; } var x; switch(type){ case "L": x=0; break; case "C": x=((screen.availWidth - w) / 2); break; case "R": //x=screen.availWidth - w; x=screen.width - w; break; } var y=((screen.availHeight - h) / 2); self.resizeTo(w,h); if(type)self.moveTo(x, y); } // Left 빈자리 만큼 padStr 을 붙인다. function lpad(src, len, padStr){ var retStr = ""; var padCnt = Number(len) - String(src).length; for(var i=0;i 0) { pos = obj.getTop() + obj.initTop; } else { pos = obj.getTop() + obj.getHeight() + obj.initTop; //pos = obj.getTop() + obj.getHeight() / 2 - 15; } if (pos > obj.bottomLimit) pos = obj.bottomLimit; if (pos < obj.topLimit) pos = obj.topLimit; interval = obj.top - pos; obj.top = obj.top - interval / 3; obj.style.top = obj.top + "px"; }, 30) } // 색상판 열기 //th:this,nm:입력박스명 function ColorOpen(th,nm) { if(!$('DIV_Color')){ var aElement=document.createElement("DIV"); aElement.id = "DIV_Color"; aElement.style.position = "absolute"; aElement.style.zIndex = "9999"; document.body.insertBefore(aElement); } w = 198; h = 222; w2 = document.body.clientWidth; h2 = document.body.offsetHeight; h2 += document.documentElement.scrollTop; x2 = Event.pointerX(event) - w - 10; //y2 = Event.pointerY(event) - 10; y2 = Event.pointerY(event) + 10; if(x2+w > w2) x2 = w2 - w; if(y2+h > h2) y2 = h2 - h; $('DIV_Color').style.left = x2 + 'px'; $('DIV_Color').style.top = y2 + 'px'; $('DIV_Color').style.display = 'block'; var f = th.form; var url = '/etc/color.html?'; url += '&form='+f.name; url += '&nm='+nm; $('DIV_Color').innerHTML = ""; } // 색상판 닫기 function ColorClose() { if($('DIV_Color')){ $('DIV_Color').innerHTML = ""; $('DIV_Color').style.display = 'none'; } } //엔터 쳐서 서브밋..... onKeyDown 이벤트 사용 function enterToSubmit(evt) { if(event.keyCode==13){ eval(evt); } } // Top Menu function initNavigation(seq) { nav = document.getElementById("topmenu"); nav.menu = new Array(); nav.current = null; nav.menuseq = 0; navLen = nav.childNodes.length; allA = nav.getElementsByTagName("a") for(k = 0; k < allA.length; k++) { allA.item(k).onmouseover = allA.item(k).onfocus = function () { nav.isOver = true; } allA.item(k).onmouseout = allA.item(k).onblur = function () { nav.isOver = false; setTimeout(function () { if (nav.isOver == false) { if (nav.menu[seq]) nav.menu[seq].onmouseover(); else if(nav.current) { menuImg = nav.current.childNodes.item(0); menuImg.src = menuImg.src.replace("_on.png", ".png"); if (nav.current.submenu) nav.current.submenu.style.display = "none"; nav.current = null; } } }, 700); } } for (i = 0; i < navLen; i++) { navItem = nav.childNodes.item(i); if (navItem.tagName != "LI") continue; navAnchor = navItem.getElementsByTagName("a").item(0); navAnchor.submenu = navItem.getElementsByTagName("ul").item(0); navAnchor.onmouseover = navAnchor.onfocus = function () { if (nav.current) { menuImg = nav.current.childNodes.item(0); menuImg.src = menuImg.src.replace("_on.png", ".png"); if (nav.current.submenu) nav.current.submenu.style.display = "none"; nav.current = null; } if (nav.current != this) { menuImg = this.childNodes.item(0); menuImg.src = menuImg.src.replace(".png", "_on.png"); if (this.submenu) this.submenu.style.display = "block"; nav.current = this; } nav.isOver = true; } nav.menuseq++; nav.menu[nav.menuseq] = navAnchor; } if (nav.menu[seq]) nav.menu[seq].onmouseover(); } // 소셜네트워크에 공유 function send_SNS(nm) { var soc_title = '[' + $('prod_nm').innerText + ']::팡옥션 현재가 : '+$('END_AMT_Label').innerText+'원'; var url; switch(nm){ case "Twitter": url = "http://twitter.com/home?status=" + encodeURIComponent(soc_title) + " " + encodeURIComponent(NOW_PAGE); break; case "FaceBook": url = "http://www.facebook.com/sharer.php?t=" + encodeURIComponent(soc_title) + "&u=" + encodeURIComponent(NOW_PAGE); break; case "Me2Day": url = "http://me2day.net/posts/new?new_post[body]=" + encodeURIComponent(soc_title) + "&new_post[tags]=" + encodeURIComponent(NOW_PAGE); break; case "Yozm": url = "http://yozm.daum.net/api/popup/prePost?link=" + encodeURIComponent(NOW_PAGE) + "&prefix=" + encodeURIComponent(soc_title); break; } var wp = window.open(url, 'SocialNetwork', ''); if(wp) wp.focus(); } // 이이프레임 문서 크기에 맞게 사이즈 조정 function iFrameResize() { var iframeElement = parent.document.getElementById(window.name); iframeElement.height = document.body.scrollHeight; } // 수량증감 function qty_up_down(obj,ty){ var qty = obj.value; var qty2 = parseInt(qty.replace(/,/g,'')); switch(ty){ case "up": qty2++; break; case "down": qty2--; break; default: return; break; } if(qty2 < 1) return; obj.value = NumberFormat(qty2.toString()); } // 정렬순서 변경 function sortSend(th) { var f = document.sear; f.psort.value = th.value; f.submit(); } // 정렬순서 변경 function sortSend2(val) { var f = document.sear; f.psort.value = val; f.submit(); } function print_r(arr,level) { var dumped_text = ""; if(!level) level = 0;//The padding given at the beginning of the line. var level_padding = ""; for(var j=0;j \"" + value + "\"\n"; } } } else { //Stings/Chars/Numbers etc. dumped_text = "===>"+arr+"<===("+typeof(arr)+")"; } return dumped_text; } // 셀렉트박스 값생성 obj:오브젝트명,data:{CODE,NAME} function AddSelect(obj,data){ var totalCnt = data.length; // 데이타 전체 수 $(obj).length = totalCnt + 1; $(obj).value = ''; $(obj).options[0].value = ''; $(obj).options[0].text = ''; for(var y=0;y