/*
  Calculate screen size
   By Stephen Miller at 3LA Pty Ltd (www.3la.com.au)
   - Uses Mozilla's 'Ultimate JavaScript Client Sniffer'
   - May also use code derived from public domain sources 
 */      
 function Pg(){
    
  this.width  = window.screen.width;
  this.height = window.screen.height;   
  
  if (is.ie6||is.ie6up){ 
   this.top    = document.body.scrollTop;
   this.left   = document.body.scrollLeft;
   this.width  = document.documentElement.clientWidth; 
   this.height = document.documentElement.clientHeight;
   if (this.width==0||this.height==0){
    this.width  = document.documentElement.scrollWidth; 
    this.height = document.documentElement.scrollHeight;
   } 
   // Dit werkt niet correct voor IE6 browsers die fullscreen zijn geconfigureerd
   // if (this.left==0||this.top==0){
   if (false) {
    // If document declares a !DOCTYPE for 4.01 (Transitional or Strict) 
    // or 4.0 (Strict) then the properties of document.body are reassigned 
    // to document.documentElement 
    this.top    = document.documentElement.scrollTop;
    this.left   = document.documentElement.scrollLeft;
   } 
  } 
  else if (is.gecko) { 
   this.top    = window.pageYOffset;    
   this.left   = window.pageXOffset;    
   this.width  = window.innerWidth;
   this.height = window.innerHeight;
  } 
  else if (is.ie5||is.ie5_5||is.ie5up||is.ie5_5up){ 
   this.top    = document.body.scrollTop;   
   this.left   = document.body.scrollLeft;
   this.width  = document.documentElement.scrollWidth; 
   this.height = document.documentElement.scrollHeight;
  } 
  else if (is.ie) {
   this.top    = document.body.scrollTop;   
   this.left   = document.body.scrollLeft;
   this.width  = document.body.scrollWidth; 
   this.height = document.body.scrollHeight;
  } 
  else if (is.ns4||is.ns4up){
   this.top    = window.pageYOffset;    
   this.left   = window.pageXOffset;    
   this.width  = document.Page.document.width;
   this.height = document.Page.document.height;
  } 
  this.bottom = this.top + this.height
  this.xMiddle = Math.round(this.width/2) + this.left;
  this.yMiddle = Math.round(this.height/2) + this.top;
 }     
