public void pageUpdate(PageEvent e) {
		switch (e.getType()) {
		case PageEvent.PAGE_READ_END:
		case PageEvent.LOAD_ERROR:
			if (!login) {
				login();
				login = true;
			}
			break;
		case PageEvent.OPEN_NEW_WINDOW:
			final String str = e.getDescription();
			final Modeler m = getModeler(str);
			if (m != null) {
				EventQueue.invokeLater(new Runnable() {
					public void run() {
						m.toFront();
					}
				});
			}
			else {
				final Object o = e.getProperties();
				EventQueue.invokeLater(new Runnable() {
					public void run() {
						boolean resizable = true;
						boolean hasToolbar = true;
						boolean hasMenubar = true;
						boolean hasStatusbar = true;
						boolean fullscreen = false;
						Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
						int w = Initializer.sharedInstance().getPreferences().getInt("Width", screenSize.width - 200);
						int h = Initializer.sharedInstance().getPreferences().getInt("Height", screenSize.height - 300);
						xOffset += offset;
						yOffset += offset;
						int x = getLocation().x + xOffset;
						int y = getLocation().y + yOffset;
						if (o instanceof HyperlinkParameter) {
							HyperlinkParameter p = (HyperlinkParameter) o;
							resizable = p.getResizable();
							hasToolbar = p.getToolbar();
							hasMenubar = p.getMenubar();
							hasStatusbar = p.getStatusbar();
							fullscreen = p.getFullscreen();
							int x1 = p.getLeft();
							int y1 = p.getTop();
							int w1 = p.getWidth();
							int h1 = p.getHeight();
							if (w1 > 0)
								w = w1;
							if (h1 > 0)
								h = h1;
							if (x1 >= 0)
								x = x1;
							if (y1 >= 0)
								y = y1;
						}
						Modeler m = openNewWindow(false, editor.getPage().getAddress(), x, y, w, h, resizable, hasToolbar, hasMenubar, hasStatusbar, fullscreen);
						m.editor.getPage().openHyperlink(str);
					}
				});
			}
			break;
		case PageEvent.CLOSE_CURRENT_WINDOW:
			EventQueue.invokeLater(new Runnable() {
				public void run() {
					Modeler.this.dispatchEvent(new WindowEvent(Modeler.this, WindowEvent.WINDOW_CLOSING));
				}
			});
			break;
		}
	}