var m_won = "원"; //document.oncontextmenu = new Function('return false'); //document.ondragstart = new Function('return false'); //document.onselectstart = new Function('return false'); function func_numimg(strNum) { var strHTML = ""; for (var i = 0; i < strNum.length; i++) { var str = strNum.substring(i, i+1); if (str == ",") strHTML += ""; else strHTML += ""; } $("#charge_m").html( strHTML ); $("#charge_m").attr("rel", strNum); } function createForm(nm,mt,at,tg) { var f=document.createElement("form"); f.setAttribute("name", nm); f.setAttribute("method", mt); f.setAttribute("action", at); f.setAttribute("target", tg); return f; } function addHidden(f,n,v) { var i=document.createElement("input"); i.setAttribute("type","hidden"); i.setAttribute("name",n); i.setAttribute("value",v); f.insertBefore(i,null); return f; } function setCookie( name, value, expiredays ){ var todayDate = new Date(); todayDate.setDate( todayDate.getDate() + expiredays ); document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";" } 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 formatNumber(num) { var str = String(num); var re = /(-?[0-9]+)([0-9]{3})/; while (re.test(str)) { str = str.replace(re,"$1,$2"); } return str; } //item sort plugin jQuery.fn.sort = function() { return this.pushStack([].sort.apply(this, arguments), []); }; //sortAscending function sortAscending(a, b) { return a.AC > b.AC ? 1 : -1; }; //sortDescending function sortDescending(a, b) { return sortAscending(a,b) * -1; }; //Best Item $(function(){ getMixItem("ITEM_ALL", ""); $("#Search_item").click( function() { var search_str = $("#S_item").val(); if (search_str == '') { message_m( 5 ); $("#S_item").focus(); }else{ if (search_str.length <= 1) { message_m( 6 ); $("#S_item").focus(); }else{ //item Search getMixItem("IM",search_str) } } }); $(this).ajaxStart( function(){ $("div.Scontents").block({ message: "", overlayCSS: { backgroundColor: '#fff' }, css: { border: 'none',opacity: .5, color: '#fff' } }); }); $(this).ajaxStop(function(){ setTimeout($("div.Scontents").unblock(), 1000); }); }); //item generator function gan_item(item, value){ var html = '
'+l_m.NM+'
'; html= html + ''+formatNumber(l_m.AC)+ m_won + '
'; html= html + ''; html= html + '