<%

dim n_unit
n_unit="ÇÇ±Ò"

function symbol_number(sn_var,sn_len)
  dim symbol_char,si
  symbol_char="0123456789"
  symbol_number=false
  if var_null(sn_var)="" or len(sn_var)>sn_len then
    exit function
  end if
  for si=1 to len(sn_var)
    if instr(symbol_char,mid(sn_var,si,1))=0 then exit function
  next
  symbol_number=true
end function

function symbol_var(sn_var,sn_len)
  dim symbol_char,si
  symbol_char="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  symbol_var=false
  if var_null(sn_var)="" or len(sn_var)>sn_len then
    exit function
  end if
  for si=1 to len(sn_var)
    if instr(symbol_char,mid(sn_var,si,1))=0 then exit function
  next
  symbol_var=true
end function

function fm_price(pvar,pt)
  if not isnumeric(pvar) then
    fm_price=0
    exit function
  end if
  dim nvar,ni
  nvar=formatnumber(pvar)
  nvar=replace(nvar,",","")
  if left(nvar,1)="." then
    nvar="0"&nvar
  end if
  if pt=1 then
    fm_price=nvar
    exit function
  end if
  for ni=0 to 1
    if cstr(right(nvar,1))="0" then
      nvar=left(nvar,len(nvar)-1)
    else
      ni=1
    end if
  next
  if cstr(right(nvar,1))="." then
    nvar=left(nvar,len(nvar)-1)
  end if
  if not isnumeric(nvar) then nvar=0
  fm_price=csng(nvar)
end function

function pay_encrypt(pvar)
  pay_encrypt=jk_md5(pvar,"long")
end function

function sort_name(ts)
  dim temp1
  select case ts
  case "emoney"
    temp1=n_unit
  case "shop"
    temp1="ÉÌ³Ç"
  case else
    temp1=ts
  end select
  sort_name=temp1
end function

function sort_type(ts)
  dim temp1
  ts=replace(ts,"'","")
  ts=replace(ts,"""","")
  ts=replace(ts,"*","")
  ts=replace(ts,"#","")
  ts=replace(ts,"$","")
  ts=replace(ts,"%","")
  ts=replace(ts," ","")
  select case ts
  case "emoney"
    temp1=ts
  case "shop"
    temp1=ts
  case else
    temp1=ts
  end select
  sort_type=temp1
end function
%>