function resizeWin() {
	try {
    	setBodyClass();
    	if (getElement("image")) {
    		sizeMe();
    	}
	} catch(e) { processError(e,"resizeWin()"); }
	return (true);
}

var debug = false; // prevents processError() from outputing error mesages

function wxInit() {
	try {
		thisURL = window.location.toString();
		if (thisURL.search(/tweener|peg/i) >= 0) debug = true;
	} catch (e) { processError(e, "wxInit() - debug"); }
	try {
		setBodyClass();
		window.onresize = resizeWin;
		setTimeout(function() { getElement("weatherbug-logo").src = imageRoot + "/common/hdr.jpg"; }, 100);
		if(debug) {
			var debugInfo = new Array(0);
			debugInfo.push("body class: " + getElement("body").className);
			debugInfo.push("resolution: " + winWidth() + " by " + winHeight());
			debugInfo.push("userAgent: " + navigator.userAgent);
			getElement("debug").innerHTML = debugInfo.join(" <br> ");
		} else {
			window.onerror = function(){ return true; } // if not debugging, do not show any runtime errors
		}
    } catch(e) { processError(e,"wxInit()"); }
}