<%
function GetExpFilename(str)     '得到文件的扩展名
	for i = len(str) to 1 step -1
		if mid(str, i, 1) = chr(asc(".")) then
			str = right(str, len(str)-i)
			exit for
		end if
	next
	GetExpFilename = str
end function

function bin2str(binstr)                 '将bin2str二进数转化为字符串
	dim varlen, clow, ccc, skipflag
	skipflag = 0
	ccc = ""
	varlen = lenb(binstr)
	for i = 1 to varlen
		if skipflag = 0 then
			clow = midb(binstr, i, 1)
			if ascb(clow) > 127 then
				ccc = ccc & chr(ascw(midb(binstr, i + 1, 1) & clow))
				skipflag = 1
			else
				ccc = ccc & chr(ascb(clow))
			end if
		else
			skipflag = 0
		end if
	next
	bin2str = ccc
end function

function str2bin(str)             '将字符串转化为二进制数
	for i = 1 to len(str)
		str2bin = str2bin & chrb(asc(mid(str, i, 1)))
	next
end function

%>