
function numericSort(x,y) {
    var a = new Number(x) ;
    var b = new Number(y) ;
    return (a - b) ;
}

    function List(x) {                          // Construct a list.
	this.count     = new Number()      ;
        if ((x == undefined) || (x == null)) {
           x = ""                          ;
	}
	this.assign(x)                     ;
    }
    
    List.prototype.assign = function(x) {       // Assign the data to a list.
        var str = new String(x)            ;
	this.listArray = str.split(",")    ;
        this.count = 0                     ;
    }


    List.prototype.reset = function () {        // Reset the sequential list retrieval.
        this.count = 0                     ;
    }

    List.prototype.iterate = function () {      // Select a items from a list sequentially.
        return (this.listArray[this.count++])   ;
    }

    List.prototype.item    = function (i) {     // Select a particular item from a list.
        return (this.listArray[i])         ;
    }

    List.prototype.length  = function() {      // return length of array
        return ((this.listArray).length) ;
    }
   
    List.prototype.eof     = function()   {     // Determine if more characters exist in list.
        return (isNaN(this.listArray[this.count])) ;
    }

    List.prototype.sort    = function(x)  {
        this.listArray.sort(x)             ;
    }

    List.prototype.current = function() {
        return (this.listArray[this.count]) ;
    }
  

