﻿/*
** Author: linxi5167@hotmail.com
** 2009-6-16 write for www.90jy.com
** Version: 1.0.090616
*/


Array.prototype.objCount = function(c) { return c; }

String.prototype.format = function() {
    var args = arguments;
    return this.replace(/\{(\d+)\}/g, function(m, i) {
        return args[i];
    });
}


String.format = function() {
    if (arguments.length == 0)
        return null;

    var str = arguments[0];
    for (var i = 1; i < arguments.length; i++) {
        var re = new RegExp('\\{' + (i - 1) + '\\}', 'gm');
        str = str.replace(re, arguments[i]);
    }

    return str;
}

function $get() { return document.getElementById(arguments[0]); }

function pagerDelegate(obj, method, mode) {
    var delegate = function() {
        var args = [];
        args.push(mode);
        method.apply(obj, args);
    }

    return delegate;
}

function ReturnUrl() {
    $get("zgbn3").SetVariable("_rootUrl", "http://www.90jy.com/");
}

function msg(a) {   }