﻿function _StringFormatInline() {
    var txt = this;
    for (var i = 0; i < arguments.length; i++) {
        var exp = new RegExp('\\{' + (i) + '\\}', 'gm');
        txt = txt.replace(exp, arguments[i]);
    }
    return txt;
}

function _StringFormatStatic() {
    for (var i = 1; i < arguments.length; i++) {
        var exp = new RegExp('\\{' + (i - 1) + '\\}', 'gm');
        arguments[0] = arguments[0].replace(exp, arguments[i]);
    }
    return arguments[0];
}

if (!String.prototype.format) {
    String.prototype.format = _StringFormatInline;
}

if (!String.format) {
    String.format = _StringFormatStatic;
}


function addfavorite() {
    if (document.all) {
        window.external.addFavorite('http://www.antpp.com', '蚂蚁爬爬导购-淘宝皇冠店铺大全 淘宝热卖排行');
    }
    else if (window.sidebar) {
        window.sidebar.addPanel('蚂蚁爬爬-淘宝皇冠店铺大全 淘宝热卖排行', 'http://www.antpp.com', "");
    }
}

function ds() {
    $("#desc").slideDown();
}
