if(typeof Array.prototype.push == 'undefined') { // Prototyp na Array.push() 
	Array.prototype.push = function() {
		for( var i = 0, b = this.length, a = arguments, l = a.length; i<l; i++ ) {
			this[b+i] = a[i];
		}
		return this.length;
	}
}

if(typeof Array.prototype.splice == 'undefined') {
	Array.prototype.splice = function(a, c) {
		var i = 0;
		var e = arguments;
		var d = this.copy();
		var f = a;
		var l = this.length;
		
		if(!c) {c = l - a;}
		for(i; i < e.length - 2; i++) {
			this[a + i] = e[i + 2];
		}
		
		for(a; a < l - c; a++) {
			this[a + e.length - 2] = d[a - c];
		}
		
		this.length -= c - e.length + 2;
		return d.slice( f, f + c );
	}
}

if(typeof Array.prototype.pop == 'undefined') {
	Array.prototype.pop = function() {
		var b = this[this.length - 1];
		this.length--;
		return b;
	}
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

if(typeof myRound == 'undefined') {
	myRound = function(x, y)	{
		x = parseFloat(x);
		var z = Math.pow(10, parseInt(y, 10));
		return Math.round(x * z) / z;
	}
}