Array.prototype.uniq = function() {
var temp = {}, len = this.length;
for(var i=0; i<len; i++) {
if(typeof temp[this[i]] == "undefined") {
temp[this[i]] = 1;
}
}
this.length = 0;
len = 0;
for(var i in temp) {
this[len++] = i;
}
return this;
}