http://www.pseliger.de/jsExtendedApi/jsApi.Array.normalize.js
    http://www.pseliger.de/jsExtendedApi/jsApi.Array.normalize.dev.js


    source code:

//  -----   feel free to use this stuff   ---   play with it   ---   copy as You  like   -----
//  -----   but leave this authors 2 lines untouched:  pseliger@gmx.net [january 2004]   -----
//
//  extended javascript-api-methods       :
//  * jsApi-extension-name / file-name    : "jsApi.Array.normalize.dev.js"
//  * original download-location          : "http://www.pseliger.de/jsExtendedApi/jsApi.Array.normalize.dev.js"
//
//  first review        : january 31-2004 - code review and new method "Array.getNormalized" that will return a normalized copy of the still unchanged remaining operand array;
//  first public release:    july 05-2003 - normalizes array entries, that is every entered object thats type and values already exist as properties of an object before within the processed array gets deleted or in other words, after normalizing no redundant informations can be found within the processed array;
//

  Array.prototype.normalize = function() { 
    var arr = this, i = 0, k = 0;
    while (i<arr.length) {
      k = i+1;
      while (k<arr.length) {
        if (arr[i] === arr[k]) {
          arr = arr.slice(0,k).concat(arr.slice(k+1,arr.length));
          k--;
        }
        k++;
      }
      i++;
    }
  //return arr;                     // bis hier verhaelt sich die methode wie "getNormalized" aber nicht wie "normalize"; // till here the method rather is a "getNormalized" than a real "normalize" one;

    for (i=0; i<arr.length; i++) {  // schreibt die werte zurueck in den eigentlichen operanden; // writes values back into the realy ment operand array;
      this[i] = arr[i];
    }
    this.length = arr.length;
  };

//this functions design doesn't change the array object itself but only creates a copy of it and returns the normalized version of that copy;
//
  Array.prototype.getNormalized = function() { 
    var arr = this, i = 0, k = 0;
    while (i<arr.length) {
      k = i+1;
      while (k<arr.length) {
        if (arr[i] === arr[k]) {
          arr = arr.slice(0,k).concat(arr.slice(k+1,arr.length));
          k--;
        }
        k++;
      }
      i++;
    }
    return arr;
  };
//
//Array.prototype.getNormalized=function(){var arr=this,i=0,k=0;while(i<arr.length){k=i+1;while(k<arr.length){if(arr[i]===arr[k]){arr=arr.slice(0,k).concat(arr.slice(k+1,arr.length));k--;}k++;}i++;}return arr;};
//var x = ["a",3,6,8,12,3,"a",9,12,7,"a",5,3,3,6,"b","b","c","b"];
//x.getNormalized(); alert(x.toSource()); // returns the original array "x";
//alert(x.getNormalized().toSource());    // returns the normalized version of "x" though "x" remains unchanged;
//
//
//Array.prototype.getNormalized=function(){var arr=this,i=0,k=0;while(i<arr.length){k=i+1;while(k<arr.length){if(arr[i]===arr[k]){arr=arr.slice(0,k).concat(arr.slice(k+1,arr.length));k--;}k++;}i++;}return arr;};var x = ["a",3,6,8,12,3,"a",9,12,7,"a",5,3,3,6,"b","b","c","b"];x.getNormalized();alert(x.toSource());alert(x.getNormalized().toSource());alert(x.toSource());
//
//Array.prototype.normalize=function(){var arr=this,i=0,k=0;while(i<arr.length){k=i+1;while(k<arr.length){if(arr[i]===arr[k]){arr=arr.slice(0,k).concat(arr.slice(k+1,arr.length));k--;}k++;}i++;}for(i=0;i<arr.length;i++){this[i]=arr[i];}this.length=arr.length;};var x = ["a",3,6,8,12,3,"a",9,12,7,"a",5,3,3,6,"b","b","c","b"];x.normalize();alert(x.toSource());alert(x.normalize().toSource());alert(x.toSource());
//
//