Array.prototype.clear=function(){
this.length=0;
}
Array.prototype.insertAt=function(index,obj){
this.splice(index,0,obj);
}
Array.prototype.removeAt=function(index){
this.splice(index,1);
}
Array.prototype.remove=function(obj){
var index=this.indexOf(obj);
if (index>=0){
this.removeAt(index);
}
}