﻿// JScript File

        var IE = document.all?true:false; //Test to see if IE
        if (!IE) document.captureEvents(Event.MOUSEMOVE); //If not IE
        document.onmousemove = getMouseLoc;
        
        function Point(x,y) {  this.x = x; this.y = y; }
        mouseLocation = new Point(0,0);

        //Get the mouse position
        function getMouseLoc(e) 
            {
                
                if (IE) { 
                    if (document.documentElement && !document.documentElement.scrollTop){
                        // IE6 +4.01 but no scrolling going on
                        mouseLocation.x = event.clientX + document.documentElement.scrollLeft;
                        mouseLocation.y = event.clientY + document.documentElement.scrollTop;
                        }
                    else if (document.documentElement && document.documentElement.scrollTop){
                        // IE6 +4.01 and user has scrolled
                        mouseLocation.x = event.clientX + document.documentElement.scrollLeft;
                        mouseLocation.y = event.clientY + document.documentElement.scrollTop;                    
                        }
                    else if (document.body && document.body.scrollTop){
                        // IE5 or DTD 3.2
                        mouseLocation.x = event.clientX + document.body.scrollLeft;
                        mouseLocation.y = event.clientY + document.body.scrollTop;
                        }
                } else {  // grab the x-y pos.s if browser is NS
                    mouseLocation.x = e.pageX;
                    mouseLocation.y = e.pageY;
                }  
                // catch possible negative values 
                if (mouseLocation.x < 0){mouseLocation.x = 0}
                if (mouseLocation.y < 0){mouseLocation.y = 0}  
                return true;
            }

        function positionDiv()
        {  
            //Set the position of the hidden div
            //alert("Positions Y:" + mouseLocation.y + " X: " + mouseLocation.x );         
            document.getElementById('UpdateProgress1').style.top = (mouseLocation.y) + "px";
            document.getElementById('UpdateProgress1').style.left = (mouseLocation.x + 30) +"px";
            document.getElementById('UpdateProgress1').style.position = "absolute";  
        }