home *** CD-ROM | disk | FTP | other *** search
- use( "thing.point" );
- /********************************************************************************
-
- Screen Information
-
- Point Thing.screenSize() -- returns a the width and height of the browser window
- Point Thing.scrollSize() -- returns a the horiz and vert scroll
- Point Thing.fullScreenSize() -- returns the full size of the computer monitor minus the chrome.
-
- Point Point.wrtPage() -- converts screen coordinates to page coordinates
-
- ********************************************************************************/
- if( is.ns4 || is.ns6 ){
- Thing.screenSize = function(){
- return new Point( window.innerWidth, window.innerHeight );
- }
- Thing.scrollSize = function(){
- return new Point( window.pageXOffset, window.pageYOffset );
- }
-
- }
- else{
- Thing.screenSize = function(){
- return new Point( document.body.clientWidth, document.body.clientHeight );
- }
- Thing.scrollSize = function(){
- return new Point( document.body.scrollLeft, document.body.scrollTop );
- }
- }
-
- Thing.fullScreenSize = function(){
- return new Point( screen.availWidth, screen.availHeight );
- }
- Point.prototype.wrtPage = function(){
- return this.add( Thing.scrollSize() );
- }
-