﻿//////////////////////////////////////////////////////////////////////////////////////
//global function call
//http://community.hdri.net/blogs/ray_blog/archive/2006/02/27/5.aspx
String.prototype.format = function()
{
    var str = this;
    for(var i=0;i<arguments.length;i++)
    {
        var re = new RegExp('\\{' + (i) + '\\}','gm');
        str = str.replace(re, arguments[i]);
    }
    return str;
}


