function testBrowserJS() {
	alert("Looks like browswerJS is accessible");
}

function getObjectById(id) {
	if (document.getElementById) {
		return document.getElementById(id);
	} else if (document.all) {
		return document.all[id];
	} else if (document.layers) {
		return document.layers[id]; // I don't think we need to support this but just in case
	} else {
		return null; // unsupported
	}
}

function getParentObjectById(id) {
	if (parent) {
		if (document.getElementById) {
			return parent.document.getElementById(id);
		} else if (document.all) {
			return parent.document.all[id];
		} else if (document.layers) {
			return parent.document.layers[id]; // I don't think we need to support this but just in case
		} else {
			return null; // unsupported
		}
	} else {
		return null;	// shouldn't have been called!
	}
}

function getCurrentStyle(o) {
	if (typeof o == "string") {
		o = getObjectById(o);
	}
	if (o.currentStyle) {
		return o.currentStyle;
	} else if (document.defaultView && document.defaultView.getComputedStyle) {
		return document.defaultView.getComputedStyle(o,null);
	} else {
		return o.style; // unsupported?
	}
}



function getCurrentStyleProperty(o,prop) {
	if (typeof o == "string") {
		o = getObjectById(o);
	}
	if (o.currentStyle) {
		return eval('o.currentStyle.'+prop);
	} else if (document.defaultView && document.defaultView.getComputedStyle) {
		return document.defaultView.getComputedStyle(o,null).getPropertyValue(prop);	// BE AWARE THAT IE AND NETSCAPE USE DIFFERENT NAMES FOR STYLES WITH DASHES!!!!
	} else {
		return o.style; // unsupported?
	}
}

function toggleVisible(o) {
	if (typeof o == "string") {
		o = getObjectById(o);
	}
	var vis = getCurrentStyleProperty(o,"visibility");
	if (vis == 'hidden') {
		o.style.visibility = 'visible';
	} else {
		o.style.visibility = 'hidden';
	}
}

function getEventTarget(e) {
	if (e) {
		if(e.srcElement) {
			return e.srcElement;
		} else if (e.currentTarget) {
			return e.currentTarget;
		} else if (e.target) {
			return e.target;
		} else {
			window.defaultStatus="unsupported event type";
			return null; // unsupported
		}
	} else {
		window.defaultStatus="no event";
	}
}

function getInnerText(o) {
	if (typeof o == "string") {
		o = getObjectById(o);
	}
	if (o.innerText) {
		return o.innerText;
	} else {
		return o.firstChild.nodeValue;
	}
}

function isEmpty(s) {
	if ( (s == null) || (s == '') || (s == '&nbsp;') || (s == ' ') || (escape(s) == '%20') || (escape(s) == '%A0') ) {
		return true;
	} else {
		return false;
	}
}

function setWidth(o,w) {
	if (document.all) {
		//alert("o.currentStyle.borderLeftWidth: "+o.currentStyle.borderLeftWidth);
		var borderLeft = parseInt(o.currentStyle.borderLeftWidth);
		//alert("borderLeft: "+borderLeft);
		var borderRight = parseInt(o.currentStyle.borderRightWidth);
		//alert("borderRight: "+borderRight);
		w = w - (borderLeft+borderRight);
		//alert("adjustedWidth: "+w);
	}
	//alert("Setting Width of: "+o.id+" to "+w);
	xWidth(o,w);
}

function getWidth(o) {
	return xWidth(o);
}

function getHeight(o) {
	return xHeight(o);
}

function setHeight(o,h) {
	if (document.all) {
		//alert("o.currentStyle.borderTopWidth: "+o.currentStyle.borderTopWidth);
		var borderTop = parseInt(o.currentStyle.borderTopWidth);
		//alert("borderTop: "+borderTop);
		var borderBottom = parseInt(o.currentStyle.borderBottomWidth);
		//alert("borderBottom: "+borderBottom);
		h = h - (borderTop+borderBottom);
		//alert("adjustedHeight: "+h);
	}
	//alert("Setting height of: "+o.id+" to "+h);
	xHeight(o,h);
}

function getClientWidth(o) {
	return o.clientWidth;
}

function getClientHeight(o) {
	return o.clientHeight;
}

function getCleanYear(theDate)
{
	x = theDate.getYear();
	var y = x % 100;
	y += (y < 38) ? 2000 : 1900;
	return y;
}