// Collect essential client properties and conditionally load style sheet
// This version does not detect for Netscape 4 -- treating it as "other"

domData = new domDetect();

// domdetect() makes domData object
function domDetect() {

	// Capture essential client properties
	this.wvlong = parseFloat(navigator.appVersion);
	this.wvshort = parseInt(navigator.appVersion);
	this.wagent = navigator.userAgent;
	this.wplatform = navigator.platform;
	this.wbrowser = navigator.appName;
	
	// Set Browser and Platform Tests
	this.isMac = (this.wplatform.indexOf("Mac") != -1);
	this.isWin = (this.wplatform.indexOf("Win") != -1);
	this.isNN = (this.wbrowser == "Netscape");
	this.isIE = (this.wbrowser.indexOf("Microsoft") != -1);

	// Set Browser Version Tests
	this.isNN4 = (this.wvshort == 4) && (this.isNN);  
	this.isNN6up = (this.wvshort >= 5) && (this.isNN);
	this.isIE4up = (this.wvshort >= 4) && (this.isIE);
	this.isIE5Mac = (this.isIE4up) && (this.wagent.indexOf("5.0") != -1) && (this.isMac);
	this.isIE6 = (this.wagent.indexOf("MSIE 6.0") != -1);
	this.isOther = (!this.isNN4) && (!this.isIE4up) && (!this.isNN6up);
	this.isClippable = (this.isIE4up) || (this.isNN6up);
	
	// Set Browser Events
	this.scrollX = getScrollX; // method to get X offset
	this.scrollY = getScrollY; // method to get Y offset

} // end function domDetect()


// BEGIN Assign scroll_x method to this to get current X offset of page
function getScrollX() {
	if (this.isNN4) { return self.pageXOffset; 
	} else if (this.isIE6) { return document.all.canvas.scrollLeft; 
	} else if (this.isIE4up) { return document.body.scrollLeft; 
	} else if (this.isNN6up) { return window.pageXOffset; }
} // END getScrollX


// BEGIN Assign scroll_y method to this to get current Y offset of page
function getScrollY() {
	if (this.isNN4) { return self.pageYOffset; 
	} else if (this.isIE6) { return document.all.canvas.scrollTop; 
	} else if (this.isIE4up) { return document.body.scrollTop; 
	} else if (this.isNN6up) { return window.pageYOffset; }
} // END getScrollY

