function owdCenteredWindow(theURL,winName,width,height) {
	window.open(theURL,winName,'toolbar=0,scrollbars=yes,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',left='+((screen.width - width) / 2)+',top='+((screen.height - height) / 2));
}

function parentThenClose(theURL) {
	if (window.opener) {
		window.opener.location.href = theURL;
		self.close();
	}
}

// White to yellow, then back.
function flash(el) {
	var b = 255;
	function f() {
		el.style.background = 'rgb(255,255,'+ (b-=4) +')';
		(b > 155) ? setTimeout(f, 80) : fadeIn(el);
	};
	f();
}

// Yellow to white.
function fadeIn(el) {
	var b = 155;
	function f() {
		el.style.background = 'rgb(255,255,'+ (b+=4) +')';
		if (b < 255) { setTimeout(f, 160); }
	};
	f();
}

// add effects for messages box
window.onload = function() {
	if (document.getElementById) {
		var el = document.getElementById('messages');
		if (el) {
			flash(el);
		}
	}
}

