﻿/**********************************************************
 *              常用函数
 *
 *作者：心云意水
 *时间：2007.2.28
 *Email:xinyunyishui@eyou.com
 **********************************************************/
//简化document.getElementById的调用
function $(t)
  {return document.getElementById(t);
  }

//简化document.getElementsByName的调用
function $$(n)
  {return document.getElementsByName(n);
  }

//为ie5.0的Number对象扩展toFixed方法
if(!Number.prototype.toFixed)
  {Number.prototype.toFixed= function(num)
    {with(Math)return round(this.valueOf()*pow(10,num))/pow(10,num);
    }
  }

//为String对象扩展trim方法
String.prototype.trim=function(){return this.valueOf().replace(/(^\s*)|(\s*$)/g,"");}

//简化编码url参数encodeURIComponent()的调用
var _=encodeURIComponent;
