function elcBrowserDetect(){
	this.win=(navigator.platform=="Win32");
	this.mac=(navigator.platform=="MacPPC");
	this.ver=navigator.appVersion;
	this.dom=document.getElementById;
	this.ie5=(this.ver.indexOf("MSIE")!=-1 && this.dom);
	this.ie4=(document.all && !this.dom);
	this.ns6=(this.dom && parseInt(this.ver)>=5);
	this.ns4=(document.layers && !this.dom);
	this.ie=(this.ie5 || this.ie4);
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns6);
	
	// examples of specific version detection -- probably not needed
	this.ns408=(this.ns4 &&	this.ver.substring(0,4) == "4.08");
	this.ns404=(this.ns4 &&	this.ver.substring(0,4) == "4.04");
	this.macIE50=(this.mac && navigator.userAgent.indexOf("MSIE 5.0")!=-1);
	if (this.ns4) {
		lastWidth = window.innerWidth;
		lastHeight = window.innerHeight;
	}
	this.osid = this.mac?'mac':'win';
	this.bwid = this.ns4?'ns4':this.ns6?'ns6':this.ie4?'ie4':this.macIE50?'macIE50':'ie5';
}
var bw = new elcBrowserDetect();

var allowJsErrors = true;
function suppressErrors(){
	allowJsErrors=false;
}

function allowErrors(){
	allowJsErrors=true;
}

function onErrorHandler(){
    return (allowJsErrors) ? false : true;
}
window.onerror=onErrorHandler;

function resetStatus(){
	status="";
	return false;
}

function onResizeHandler() {
	if (bw.ns4) {
		var winWidth = window.innerWidth;
		var winHeight = window.innerHeight
		if (!(lastWidth == winWidth) && (lastHeight == winHeight)){
			lastWidth = winWidth;
			lastHeight = winHeight;
			window.history.go(0);
		} else {
			return true;
		}
	}
	return true;
}
window.onresize=onResizeHandler;
