public void startgame() {
	if(running)
	    return;
	h = new HavenPanel(800, 600);
	add(h);
	h.init();
	try {
	    p = new haven.error.ErrorHandler(new ErrorPanel(), new URL("http", getCodeBase().getHost(), 80, "/java/error"));
	} catch(java.net.MalformedURLException e) {
	    p = new ThreadGroup("Haven client");
	}
	synchronized(applets) {
	    applets.put(p, this);
	}
	Thread main = new HackThread(p, new Runnable() {
		public void run() {
		    Thread ui = new HackThread(h, "Haven UI thread");
		    ui.start();
		    try {
			while(true) {
			    Bootstrap bill = new Bootstrap();
			    if((getParameter("username") != null) && (getParameter("authcookie") != null))
				bill.setinitcookie(getParameter("username"), Utils.hex2byte(getParameter("authcookie")));
			    bill.setaddr(getCodeBase().getHost());
			    Session sess = bill.run(h);
			    RemoteUI rui = new RemoteUI(sess);
			    rui.run(h.newui(sess));
			}
		    } catch(InterruptedException e) {
		    } finally {
			ui.interrupt();
		    }
		}
	    }, "Haven main thread");
	main.start();
	running = true;
    }