Array.prototype.remove = function(rem) {
// Simple prototype to
// remove an element from
// a normal or multidimension Array
for(var i=0; i<this.length; i++) {
if(this[i]==rem) {
this.splice(i,1);
}
else if(this[i].length > 0) {
this[i].remove(rem);
}
}
return this;
}