/*-jsfct-
 * function 格式化日期
 * parameter 格式(yyyy-MM-dd hh:mm:ss)
 * example [var today = new Date(); var format = today.Format("yyyy-MM-dd");]
 */
Date.prototype.Format = function (fmt) { //author: meizz
  var o = {
    "M+": this.getMonth() + 1, /*月份*/
    "d+": this.getDate(), /*日*/
    "h+": this.getHours(), /*小时*/
    "m+": this.getMinutes(), /*分*/
    "s+": this.getSeconds(), /*秒*/
    "q+": Math.floor((this.getMonth() + 3) / 3), /*季度*/
    "S": this.getMilliseconds() /*毫秒*/
  };
  if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  for (var k in o)
    if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  return fmt;
}

/*-jsfct-
 * function 长度计数
 * parameter 
 * example [var str = "中文+English"; var length = str.CountLength();]
 */
String.prototype.CountLength = function () {
  var str = this;
  if (str && str.length > 0) { 
    // remove line breaks
    var noBreaksText = str.replace(/(\r\n|\n|\r)/gm, "");
    return noBreaksText.length;
  }
  return 0;
}
@@ -783,16 +783,521 @@
 fmt;%0A%7D%0A%0A
+/*-jsfct-%0A * function IndexOf%E7%9A%84IE7%E5%85%BC%E5%AE%B9%E7%89%88%0A * parameter %E5%85%83%E7%B4%A0(obj)%0A * example %5Bvar array = %5B%221%22,%222%22,%223%22%5D; var index = array.indexOf(%222%22);%5D%0A */%0Aif (!Array.prototype.indexOf)%7B%0A  Array.prototype.indexOf = function(elt /*, from*/)%7B%0A    var len = this.length %3E%3E%3E 0;%0A    var from = Number(arguments%5B1%5D) %7C%7C 0;%0A    from = (from %3C 0) ? Math.ceil(from) : Math.floor(from);%0A    if (from %3C 0) from += len;%0A    for (; from %3C len; from++)%7B%0A      if (from in this && this%5Bfrom%5D === elt) return from;%0A    %7D%0A    return -1;%0A  %7D;%0A%7D%0A%0A
 /*-jsfct
@@ -1630,8 +1630,9 @@
 urn 0;%0A%7D
+%0A

Update utils.js