function Transform()
{
var whole = document.all.num.value;
//分离整数与小数
var num;
var dig;
if(whole.indexOf(".") == -1)
{
num = whole;
dig = "";
}
else
{
num = whole.substr(0,whole.indexOf("."));
dig = whole.substr( whole.indexOf(".")+1, whole.length);
}
//转换整数部分
var i=1;
var len = num.length;
var dw2 = new Array("","万","亿");//大单位
var dw1 = new Array("拾","佰","千");//小单位
var dw = new Array("","壹","贰","叁","肆","伍","陆","柒","捌","玖");//整数部分用
var dws = new Array("零","壹","贰","叁","肆","伍","陆","柒","捌","玖");//小数部分用
var k1=0;//计小单位
var k2=0;//计大单位
var str="";
for(i=1;i<=len;i++)
{
var n = num.charAt(len-i);
if(n=="0")
{
if(k1!=0)
str = str.substr( 1, str.length-1);
}