Calculate Opacity Value on Size
===

I am trying to calculate opacity inversely based on the size of an object. Basically the bigger it is, the more transparent it will be.

The object size is calculated like so:

    var baseSize = 60;
    var sVariance = 4;
    var outputA = [];

    function blah() {
        for (i = 0; i < 5; i++) {
            this.newSize = Math.ceil(baseSize - (Math.random() * sVariance));
            outputA[i] = this.newSize;
        }
        document.writeln("Size = "+outputA);
    }

    blah();​

...I would like to be able to calculate the opacity strength between the range of sizes. For example, if the 5 sizes generated were:  60,59,58,57,59  I would like the corresponding opacity values to be as such: .25,.5,.75,1,.5

I apologize if something like this has already been covered, but any help would be greatly appreciated.

