Array.prototype.fill = function ( o, n ) {
	while( this.length ) this.pop();
	for( ; n > 0; n-- )
		this.push( o );
};

Array.prototype.isTwoDimensional = function () {
	if( this.length ) {
		var m = 0;
		// cycle through elements to find max length of an element
		for( var i = 0; i < this.length; i++ )
			// this this element is an array
			if( this[i] && ( typeof( this[i] ) == 'object' && this[i].constructor == Array ) )
				if( this[i].length ) return true;
		return false;
	} else {
		throw "Array.isTwoDimensional(): Array has no length.";
	}
};
