        // DHTML crossbrowser layer functions.
        // writen directed and produced by camilo tapia [990614].
        // copyright camilo tapia 99
        // ctapia@zefer.com, icq: 3049939
        // feel free to use this code, as long as you indicate that it's mine

        var netscape = ( navigator.appName == 'Netscape' );
		
        var visibilityToUse = (netscape)? 'show' : 'visible';
        var lastLayer = null;
        var controller = null;

        function layerObject(layerName) {
                return (netscape)? document.layers[layerName] : document.all[layerName].style;
        }

        function layerObjectQuery(layerName) {
                return (netscape)? document.layers[layerName].document : document.all[layerName];
        }

        function setZ(layerName, z) {
                layerObject(layerName).zindex = z;
        }

        function getZ(layerName) {
                return layerObject(layerName).zindex;
        }

        function hideLayer(layerName) {
                layerObject(layerName).visibility = 'hidden';
        }

        function showLayer(layerName) {
                layerObject(layerName).visibility = visibilityToUse;
        }

        function layerHeight(layerName) {
                return (netscape)? layerObjectQuery(layerName).height : layerObjectQuery(layerName).offsetHeight;
        }

        function layerWidth(layerName) {
                return (netscape)? layerObjectQuery(layerName).width : layerObjectQuery(layerName).offsetWidth;
        }

        function layerTop(layerName) {
                return (netscape)? layerObject(layerName).top : layerObject(layerName).posTop;
        }

        function layerLeft(layerName) {
                return (netscape)? layerObject(layerName).left : layerObject(layerName).posLeft;
        }

        function putTo(layerName, x, y) {
                layerObject(layerName).left =  x;
                layerObject(layerName).top  = y;
        }

        function moveTo(layerName, start, stop, d, axis) {
                if (start != stop)
                {
                        layerObject(layerName)[axis] = start;
                        setTimeout("moveTo('" + layerName + "'," + (start += d) + "," + stop + "," + d + ",'" + axis + "');", 1);
                }
        }

        function moveToX(layerName, stop, d) {
                if (layerLeft(layerName) != stop)
                {
                        layerObject(layerName).left = layerLeft(layerName) + d;
                        setTimeout("moveToX('" + layerName + "'," + stop + "," + d + ");", 1);
                }
        }

        function moveToY(layerName, stop, d)
        {
                if (layerTop(layerName) != stop)
                {
                        layerObject(layerName).top = layerTop(layerName) + d;
                        setTimeout("moveToY('" + layerName + "'," + stop + "," + d + ");", 1);
                }
        }

        function moveToYDelay(layerName, stop) {
                if (layerTop(layerName) != stop) {
                        tempDelta = (stop - layerTop(layerName)) / 3;
                        if (Math.abs(tempDelta) < 1) {
                                if (tempDelta < 0) tempDelta = -1;
                                else tempDelta = 1;
                        }
                        layerObject(layerName).top = layerTop(layerName) + tempDelta;
                        setTimeout("moveToYDelay('" + layerName + "'," + stop + ");", 1);
                }
        }

        function moveToXDelay(layerName, stop) {
                if (layerLeft(layerName) != stop) {
                        tempDelta = (stop - layerLeft(layerName)) / 3;
                        if (Math.abs(tempDelta) < 1) {
                                if (tempDelta < 0) tempDelta = -1;
                                else tempDelta = 1;
                        }
                        layerObject(layerName).left = layerLeft(layerName) + tempDelta;
                        setTimeout("moveToXDelay('" + layerName + "'," + stop + ");", 100);
                }
        }

                function moveToXDelayf(layerName, stop) {
                if (layerLeft(layerName) != stop) {
                        tempDelta = (stop - layerLeft(layerName)) / 2;
                        if (Math.abs(tempDelta) < 1) {
                                if (tempDelta < 0) tempDelta = -1;
                                else tempDelta = 1;
                        }
                        layerObject(layerName).left = layerLeft(layerName) + tempDelta;
                        setTimeout("moveToXDelay('" + layerName + "'," + stop + ");", 10);
                }
        }




        function switchLayer(layerName) {
                if (layerObject(layerName).visibility == visibilityToUse)
                        hideLayer(layerName);
                else
                        showLayer(layerName);
        }

        function layerStatus(layerName) {
                if (layerObject(layerName).visibility == visibilityToUse)
                        return true;
                return false;
        }




