<script type="text/javascript">
Array.prototype.to2x = function () {
var temp = [];
for ( var i = 0; i < this.length; i += 3 ) {
temp.push(this.slice(i, i + 3));
}
return temp;
};
var t = [ 0,1,2,3,4,5,6,7,8 ].to2x();
alert( t[0] + '; ' + t[1] + '; ' + t[2] );
</script>