// $Id: jscript-extra.js 1336 2010-03-14 11:48:01Z sdalu $

/* Javascript < 1.6
 */
if (!Array.prototype.map) {
    Array.prototype.map = function(fun /*, thisp */) {
	var len = this.length;
	if (typeof fun != "function")
	    throw new TypeError();

	var res = new Array(len);
	var thisp = arguments[1];
	for (var i = 0; i < len; i++) {
	    if (i in this)
		res[i] = fun.call(thisp, this[i], i, this);
	}
	return res;
    };
}


String.prototype.multiply = function(count) {
    var str = '';
    for (var i = 0 ; i < count ; i++)
	str += this;
    return str;
};
