// arrays with all the content
                tq_objects = new Array();

                // array with available scrollers
                avail_scrollers = new Array();
                avail_scrollers[0] = "dummy"; //dummy
                myobjects = new Array();
                myobjects[0] = "dummy";

                // the words and their definitions


                // the scrollbar object
                function tq_scroller(width, height, xpos, ypos, root, number)
                {
                        this.width = width;
                        this.height = height;
                        this.xpos = xpos;
                        this.ypos = ypos;
                        this.root = tq_getlayer(root);
                        this.number = number;
                        // functions
                        this.build = tq_build;
                        this.setcontent = tq_setcontent;
                        this.update = tq_update;
                        this.addword = tq_addword;
                        this.showword = tq_show_object_word;
                        this.wordarray = new Array();
                        this.defarray = new Array();
                }
                function tq_build()
                {
                        // image tops
                        if(settings[this.number]['grouped'])
                                this.uptop = this.height - 2*barwidth;
                        else
                                this.uptop = 0;
                        this.bottomtop = this.height - barwidth;
                        this.contentlyrwidth = this.width - barwidth - 1;
                        this.scrolllyrleft = this.xpos + this.width - barwidth-1;
                        if(ns6)
                           this.scrolllyrleft = this.scrolllyrleft + 2;
                        extra = (!ns6)? 2 : 0;
                        // only executed once at startup object
                        if(ie || ns6)
                        {
                                if(ns6)
                                {
                                   this.clipheight = this.height +2;
                                   this.clipwidth = this.contentlyrwidth+2;
                                }
                                else
                                {
                                   this.clipheight = this.height;
                                   this.clipwidth = this.contentlyrwidth;
                                }

                                // the content (two layers, one nested)
                                // Content Base
                                this.contentlyr = "<div id=\"cb_" + this.name + "\" style=\"position:absolute;width:"
                                + this.contentlyrwidth
                                + ";height:" + this.height
                                + ";top:" + this.ypos
                                + ";left:" + this.xpos
                                + ";border: 1px solid #FF9900;"
                                + ";clip: rect(0 " + this.clipwidth + " " + this.clipheight + " 0)"
                                + ";overflow: hidden"
                                + ";\">"

                                // Content Layer
                                + "<div id=\"cl_" + this.number + "\" style=\"position:absolute;\">"
                                + "&nbsp;loading"
                                + "</div>"


                                + "</div>";

                                // the scroller
                                // Scroll Base
                                this.scrolllyr = "<div id=\"sb_" + this.number + "\" style=\"position:absolute;width:"
                                + (barwidth + extra)
                                + ";height:" + this.height
                                + ";top:" + this.ypos
                                + ";left:" + (this.scrolllyrleft-1)
                                + ";border: 1px solid #FF9900;"
                                + ";\">"

                                // the images in special layers
                                // Scroll Up
                                + "<div id=\"su_" + this.number + "\" style=\"position:absolute;width:"
                                + this.scrollwidth
                                + ";height:" + barwidth
                                + ";width:" + barwidth
                                + ";top:" + this.uptop
                                + ";left:0\""
                                + ">"
                                + "<a href=\"#\" onmouseover=\"tq_scrollup(" + this.number + ")\" onmouseout=\"tq_stopscroll()\">"
                                + upimg
                                + "</a>"
                                + "</div>"
                                // Scroll Down
                                + "<div id=\"sd_" + this.number + "\" style=\"position:absolute;width:"
                                + this.scrollwidth
                                + ";height:" + barwidth
                                + ";width:" + barwidth
                                + ";top:" + (this.bottomtop - 2)
                                + ";left:0\""
                                + ">"
                                + "<a href=\"#\" onmouseover=\"tq_scrolldown(" + this.number + ")\" onmouseout=\"tq_stopscroll()\">"
                                + downimg
                                + "</a>"
                                + "</div>"


                                + "</div>";

                                // contentlayer
                                tempname = "cl_" + this.number;
                                tq_objects[this.number]['cl'] = tempname;
                                tempname = "sb_" + this.number;
                                tq_objects[this.number]['sb'] = tempname;

                                // set the html
                                this.root.innerHTML += this.contentlyr + this.scrolllyr;



                        }
                        if(ns)
                        {
                                // spacer table for netscape
                                this.spacetbl = "<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\"><tr><td bgcolor=\"#FF9900\" align=\"center\" valign=\"center\">"
                                + "<table width=\"400\" height=\"250\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"
                                + "<tr><td bgcolor=\"#ffffff\" width=\"400\" height=\"250\">&nbsp;</td></tr>"
                                + "</table></td></tr></table>";
                                // a background layer to create the background border
                                this.backlayer = "<layer name=\"bl_" + this.number + "\" "
                                + "position=\"absolute\" "
                                + "width=\"" + this.contentlyrwidth + "\" "
                                + "height=\"" + this.height + "\" "
                                + "top=\"" + this.ypos + "\" "
                                + "left=\"" + this.xpos + "\" "
                                + "z-index=\"10\" "
                                + ">"
                                // border table
                                + "<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\"><tr><td bgcolor=\"#FF9900\" align=\"center\" valign=\"center\">"
                                + "<table width=\"" + this.contentlyrwidth + "\" height=\"" + this.height + "\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"
                                + "<tr><td bgcolor=\"#ffffff\" width=\"" + (this.contentlyrwidth-2) + "\" height=\"" + this.height + "\">&nbsp;</td></tr>"
                                + "</table></td></tr></table>"
                                // end back layer
                                + "</layer>";

                                // the content base and content layer
                                this.contentlyr = "<layer name=\"cb_" + this.number + "\" "
                                + "position=\"absolute\" "
                                + "width=\"" + (this.contentlyrwidth-2) + "\" "
                                + "height=\"" + (this.height-2) + "\" "
                                + "top=\"" + (this.ypos+1) + "\" "
                                + "left=\"" + (this.xpos+1) + "\" "
                                + "clip=\"0 0 " + (this.contentlyrwidth-2) + " " + (this.height-2) + "\" "
                                + "z-index=\"20\" "
                                + ">"
                                // the content layer
                                + "<layer name=\"cl_" + this.number + "\" "
                                + "position=\"absolute\" "
                                //+ "width=\"" + (this.contentlyrwidth-2) + "\" "
                                //+ "height=\"" + (this.height-2) + "\" "
                                //+ "top=\"0\" "
                                //+ "left=\"0\" "
                                + "z-index=\"21\""
                                + ">"
                                // layer content
                                + "&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>"
                                + "&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>"
                                + "&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>"
                                // end layers
                                + "</layer></layer>";
                                //this.contentlyr = "<layer name=\"cb_" + this.number + "\" left=\"10\" top=\"10\">testing</layer>";

                                // scrollyr back table
                                this.scrollyrback = "<layer name=\"bl2_" + this.number + "\" "
                                + "width=\"" + (barwidth+2) + "\" "
                                + "height=\"" + this.height + "\" "
                                + "top=\"" + this.ypos + "\" "
                                + "left=\"" + this.scrolllyrleft + "\" "
                                + ">"
                                // border table
                                + "<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\"><tr><td bgcolor=\"#FF9900\" align=\"center\" valign=\"center\">"
                                + "<table width=\"" + barwidth + "\" height=\"" + this.height + "\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"
                                + "<tr><td bgcolor=\"#ffffff\" width=\"" + (barwidth-2) + "\" height=\"" + this.height + "\">&nbsp;</td></tr>"
                                + "</table></td></tr></table>"
                                // end layer
                                + "</layer>";

                                // scrollyr
                                this.scrollyr = "<layer name=\"sb_" + this.number + "\" "
                                + "width=\"" + (barwidth) + "\" "
                                + "height=\"" + this.height + "\" "
                                + "top=\"" + this.ypos + "\" "
                                + "left=\"" + (this.scrolllyrleft+1) + "\" "
                                + ">"
                                // upimg
                                + "<layer name=\"su_" + this.number + "\" "
                                + "width=\"" + (barwidth) + "\" "
                                + "height=\"" + (barwidth) + "\" "
                                + "top=\"" + (this.uptop+1) + "\" "
                                + "left=\"0\" "
                                + ">"
                                + "<a href=\"#\" onmouseover=\"tq_scrollup(" + this.number + ")\" onmouseout=\"tq_stopscroll()\">"
                                + upimg
                                + "</a>"
                                + "</layer>"
                                // downimg
                                + "<layer name=\"sd_" + this.number + "\" "
                                + "width=\"" + (barwidth) + "\" "
                                + "height=\"" + (barwidth) + "\" "
                                + "top=\"" + (this.bottomtop+1) + "\" "
                                + "left=\"0\" "
                                + ">"
                                + "<a href=\"#\" onmouseover=\"tq_scrolldown(" + this.number + ")\" onmouseout=\"tq_stopscroll()\">"
                                + downimg
                                + "</a>"
                                + "</layer>"
                                + "</layer>";


                                tempname = "bl2_" + this.number;
                                tq_objects[this.number]['bl'] = tempname;
                                tempname = "cl_" + this.number;
                                tq_objects[this.number]['cl'] = tempname;
                                tempname = "cb_" + this.number
                                tq_objects[this.number]['cb'] = tempname;
                                tempname = "sb_" + this.number;
                                tq_objects[this.number]['sb'] = tempname;

                                this.root.document.open();
                                this.root.document.write(totalcontent + this.spacetbl + this.backlayer + this.contentlyr + this.scrollyrback + this.scrollyr);
                                this.root.document.close();

                                totalcontent += this.backlayer;
                                totalcontent += this.contentlyr;
                                totalcontent += this.scrollyrback;
                                totalcontent += this.scrollyr;
                        }
                }
                function tq_setcontent(content, number)
                {
                        tempname = tq_objects[this.number]['cl'];
                        mylayer = tq_getlayer(tempname);
                        if(ie || ns6)
                        {
                                mylayer.innerHTML = content;
                                this.update(mylayer);
                        }
                        if(ns)
                        {
                                tempname = tq_objects[this.number]['cb'];
                                temproot = tq_getlayer(tempname, this.root);
                                tempname = tq_objects[this.number]['cl'];
                                mylayer = tq_getlayer(tempname, temproot);
                                mylayer.document.open();
                                mylayer.document.write(content);
                                mylayer.document.close();
                                this.update(mylayer);
                        }
                }
                function tq_addword(word, definition)
                {
                        this.wordarray[this.wordarray.length] = word;
                        this.defarray[this.defarray.length] = definition
                }
                function tq_show_object_word(word)
                {
                        for(i=0; i<this.wordarray.length; i++)
                        {

                            if(this.wordarray[i] == word)
                            {

                               this.setcontent(this.defarray[i],0);
                               currscrolly = tq_scrolly();
                               tq_moveto('glossaryroot', 100 , 100 + currscrolly);
                               tq_show('glossaryroot');
                               break;
                            }
                        }
                }
                function tq_showword(word)
                {
                       tq_objects[0]['definitionwin'].showword(word);
                }
                function tq_update(mylayer)
                {

                        if(ie || ns6) tq_objects[this.number]['scrollheight'] = mylayer.clientHeight;
                        if(ns) tq_objects[this.number]['scrollheight'] = mylayer.document.height;
                        toscroll = tq_objects[this.number]['scrollheight'];
                        if(this.height >= toscroll || ns6)
                        {
                                tq_objects[this.number]['scrollbar'] = false;
                                if(settings[this.number]['barhide'])
                                {
                                        if(ie || ns6)
                                        {

                                                scrollbase = tq_getlayer(tq_objects[this.number]['sb']);
                                                scrollbase.style.visibility = "hidden";
                                        }
                                        if(ns)
                                        {
                                                tempname = tq_objects[this.number]['bl'];
                                                scrollback = tq_getlayer(tempname, this.root);
                                                scrollback.visibility = 'hide';
                                                tempname = tq_objects[this.number]['sb'];
                                                scrollbase = tq_getlayer(tempname, this.root);
                                                scrollbase.visibility = 'hide';
                                        }

                                }
                        }
                        else
                                tq_objects[this.number]['scrollbar'] = true;
                }
                function tq_initscroller(uniquename)
                {
                        interval = false;
                        templength = tq_objects.length;
                        tq_objects[templength] = new Array();
                        tq_objects[templength]['name'] = uniquename;
                        tq_objects[templength][uniquename] = new tq_scroller(settings[templength]['w'], settings[templength]['h'], settings[templength]['l'], settings[templength]['t'], 'glossaryroot', templength);
                        tq_objects[templength]['scrollbar'] = false;

                        // images for the scroller
                        upimg = "<img src=\"/~lla067/images/upimg.gif\" width=\"" + barwidth + "\" height=\"" + barwidth + "\" border=\"0\">";
                        downimg = "<img src=\"/~lla067/images/downimg.gif\" width=\"" + barwidth + "\" height=\"" + barwidth + "\" border=\"0\">";

                        tq_objects[templength][uniquename].build();

                        //tq_objects[templength][uniquename].setcontent('&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>&nbsp;test<br>', templength);
                }
                function checkpos(lyr,nr)
                {
                        if(ie || ns6) currtop = lyr.style.pixelTop;
                        if(ns) currtop = lyr.top;
                        if(currtop > 0)
                        {
                                if(ie || ns6)lyr.style.pixelTop = 0;
                                if(ns)lyr.top = 0;
                                clearInterval(domove);
                        }
                        else if(currtop < (settings[nr]['h'] - tq_objects[nr]['scrollheight']))
                        {
                                if(ie || ns6) lyr.style.pixelTop = (settings[nr]['h'] - tq_objects[nr]['scrollheight']);
                                if(ns) lyr.top = (settings[nr]['h'] - tq_objects[nr]['scrollheight']);
                                clearInterval(domove);
                        }
                }
                function tq_scroll(px, mylyr, nr)
                {
                        if(ie || ns6) mylyr.style.pixelTop += px;
                        if(ns) mylyr.top += px;
                        checkpos(mylyr, nr);
                }
                function tq_scrollup(number)
                {
                        if(tq_objects[number]['scrollbar'])
                        {
                                interval = true;
                                move = amounttoscroll;
                                if(ie || ns6)
                                {
                                        mylayer = tq_getlayer(tq_objects[number]['cl']);
                                }
                                if(ns)
                                {
                                        the_root = document.layers['glossaryroot'];
                                        the_root = tq_getlayer(tq_objects[number]['cb'], the_root);
                                        mylayer = tq_getlayer(tq_objects[number]['cl'], the_root);
                                }
                                getal = number;
                                domove = setInterval("tq_scroll(move, mylayer, getal)", 25);
                        }
                }
                function tq_scrolldown(number)
                {

                        if(tq_objects[number]['scrollbar'])
                        {
                                interval = true;
                                move = 0- amounttoscroll;
                                if(ie || ns6)
                                        mylayer = tq_getlayer(tq_objects[number]['cl']);
                                if(ns)
                                {
                                        the_root = document.layers['glossaryroot'];
                                        the_root = tq_getlayer(tq_objects[number]['cb'], the_root);
                                        mylayer = tq_getlayer(tq_objects[number]['cl'], the_root);
                                }
                                getal = number;
                                domove = setInterval("tq_scroll(move, mylayer, getal)", 25);
                        }
                }
                function tq_stopscroll()
                {
                        if(interval)
                        {
                                clearInterval(domove);
                                interval = false;
                        }
                }


                // vars for each scroller
                barwidth = 15;
                amounttoscroll = 7;
                settings = new Array();
                settings[0] = new Array();
                settings[0]['w'] = 390;
                settings[0]['h'] = 125;
                settings[0]['l'] = 5;
                settings[0]['t'] = 5;
                settings[0]['barhide'] = false;
                settings[0]['grouped'] = false;
                settings[1] = new Array();
                settings[1]['w'] = 406;
                settings[1]['h'] = 22;
                settings[1]['l'] = 5;
                settings[1]['t'] = 135;
                settings[1]['barhide'] = true;
                settings[1]['grouped'] = false;
