public MenuDialog(JFrame owner, Point pos) {
			super(owner);
			parent = owner;
			this.setLayout(new BorderLayout());

			ePane = new JEditorPane();
			//ePane.getEditorKit().
			ePane.setPreferredSize(new Dimension(250, 400));
	    ePane.setEditable(false);
	    JScrollPane scroller = new JScrollPane(); 
	    JViewport vp = scroller.getViewport(); 
	    vp.add(ePane); 
	    this.add(scroller, BorderLayout.CENTER); 

			try {
				// create the URL for the menu (ensure that the url still points to a Sinalgo page
				String s = (currentURL == null ? defaultMenuURL : currentURL.toString());
				URL myURL = null;
				int offset = s.indexOf(".html");
				if(offset > 0) { // .html is in the string
					if(s.indexOf("dcg.ethz.ch/projects/sinalgo/") < 0) { // went to a different site
						myURL = new URL(defaultMenuURL);	
					} else { // add the ?menu option
						s = s.substring(0, offset + 5);
						s += "?menu";
						myURL = new URL(s);
					}
				} else {
					myURL = new URL(defaultMenuURL);
				}
				ePane.setPage(myURL); // load the page
		    ePane.addHyperlinkListener(getLinkListener());
			} catch (MalformedURLException e1) {
				ePane.setText("Cannot display the page.\n" + e1.getMessage());
			} catch (IOException e1) {
				ePane.setText("Cannot display the page.\n" + e1.getMessage());
			}	

			JPanel menuPanel = new JPanel();
			menuPanel.setLayout(new BoxLayout(menuPanel, BoxLayout.X_AXIS));
			this.add(menuPanel, BorderLayout.NORTH);
			closeButton.addActionListener(this);
			menuPanel.add(closeButton);
			resetButton.addActionListener(this);
			menuPanel.add(resetButton);
			
			this.setLocation(pos);
			this.pack();
			this.setVisible(true);
		}