// wCLASSInit.js

// This gets executed in the first pass
var wCLASS  = new Object();

// This function gets called by window.onLoad
function init(d)
{ 
    var parmArray = new Array();
    var parmString, widget;
    for(widget in wCLASS)
    {
        var tagArray = d.all.tags(wCLASS[widget].tag);
        for(var i=0; i < tagArray.length; i++)
        {
            if(tagArray[i].wCLASS == widget)
             { 
           
                // build a parm string for the constructor
                for(var p in tagArray[i])
                {
                    if(p.substring(0,4) == 'PARM')
                        parmArray[parseInt(p.substring(4,5))-1] = 
                                           "'"+tagArray[i][p]+"'";
                }
                parmString = parmArray.join(',');

                // build the name of the base object
                baseObject = tagArray[i].form.name +"."+ tagArray[i].name;
                eval( "new "+ widget +"("+baseObject+", "+parmString+")" );       
            }
        }
    }
}
\