if(!Array.prototype.indexOf){ Array.prototype.indexOf=function(elt /*, from*/) { var len = this.length >>> 0; var from = Number(arguments[1]) || 0;  from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) { from += len; } for (; from < len; from++) { if (from in this && this[from] === elt) { return from; } }  return -1; };}if(!Array.prototype.push){ Array.prototype.push=function() { var n=this.length>>>0;  for(var i=0; i<arguments.length; i++) { this[n]=arguments[i]; n=n+1>>>0; } this.length=n; return n; };}if(!Array.prototype.pop){ Array.prototype.pop=function() { var n=this.length>>>0, value;  if(n) { value=this[--n];  delete this[n]; } this.length=n; return value; };}if(!Array.prototype.shift){ Array.prototype.shift=function() { for(var i=0, b=this[0], l=this.length-1; i<l; i++) { this[i]=this[i+1]; }  this.length--; return b; };}if(!Array.prototype.map){ Array.prototype.map=function(func /*, thisp*/) { var len=this.length;  var res=new Array(len); var thisp=arguments[1]; for(var i=0; i < len; i++) { if (i in this) { res[i]=func.call(thisp, this[i], i, this); } } return res; };}Array.clone=function(array){ return Array.apply(null, array);}