/**
 * Opens a new window with the specified parameters.
 *
 * @param {String} href		The url to load in the new window.
 * @param {Integer} width	The width of the new window.
 * @param {Integer} height	The height of the new window.
 * @param {String} opts		The window options as a string.
 * @return {Object} win		The new window object.
 */
function newWin( href, width, height, opts ) {
	if( !width ) {
		width = 800;
	}
	if( !height ) {
		height = 600;
	}
	if( opts ) {
		var winOpts = opts + ', width=' + width + ', height=' + height;
	} else {
		var winOpts = 'toolbar=yes, location=yes, menubar=yes, scrollbars=yes, resizable=yes, width=' + width + ', height=' + height;
	}
	var win = window.open(href, null, winOpts);
	return win;
}