// Set global variables for browser detection and reference building
	var isNav, isIE
	var coll = ""
	var styleObj = ""
	if (parseInt(navigator.appVersion) >=4) {
		if (navigator.appName =="Netscape") {
			isNav = true
		} else {
			isIE = true
			coll = "all."
			styleObj = ".style"
		}
	}

// Utility function returns the available content width space in browser window
	function getInsideWindowWidth() {
		if (isNav) {
			return window.innerWidth
		} else {
			return document.body.clientWidth
		}
	}

// Utility function returns the available content height space in browser window
	function getInsideWindowHeight() {
		if (document.layers) {
			return window.innerHeight
		} else {
			return document.body.clientHeight
		}
	}
	
// Find center of current window/frame
	function middleX() {
		return Math.round((getInsideWindowWidth()/2)) 
	}	

	function middleY() {
		return Math.round((getInsideWindowHeight()/2)) 
	}		

// Stop centering object if it's wider / taller than current window/frame
//	function mX2() {
//		if myX() <= getInsideWindowWidth() {
//			return middleX() - (myX()/2)
//		} else {
//			return 	0
//		}	
//	}

	// Center an element named header in current window/frame
	function mX2()
	{
		if (getInsideWindowWidth() <= myX) // object width plus side margins returned below
			{
			return 0 // side margin
			} else {
			return Math.round((getInsideWindowWidth()/2)-(myX/2)) // half of object width above
			}
	}

	function mY2()
	{
		if (getInsideWindowHeight() <= myY) // object width plus side margins returned below
			{
			return 0 // side margin
			} else {
			return Math.round((getInsideWindowHeight()/2)-(myY/2)) // half of object width above
			}
	}
	// Special handling for CSS-P redraw bug in Navigator 4
	function handleResize() {
			//causes extra redraw, but fuck netscape
			location.reload()
	}
