Before you start to test my codes, you should read Dean Edwards's post about the same topic since he started this first by creating a extra WINDOW obejct (IFRAME) to host different JavaScript objects.
Instead of using IFRAME, I use window.createPopup for IE to fix some issues which Dean Edwards talked about
var Array2 = function(){};
Array2.prototype = new Array;
Array2.prototype.bar = function(){
alert("this.bar() --> This.Length=" + this.length );
}
function test(){
alert('call Array2');
var a = new Array2();
a.push(1);
a.push(2);
a.bar();
alert('call Array');
var b = new Array();
b.push(1);
b.push(2);
b.bar();
}catch(err){
alert( err.message || err );
}
}