private void PageRedirect(String itemID, String itemType, String query, boolean DisplayGO, boolean organismdependentquery) {

        if (applet == null || configuration == null)
            return;


        String wholeredirectionString = getRedirectionString(itemID, itemType, query, DisplayGO, organismdependentquery);
        Boolean rightClickQueryingEnabled = (Boolean) configuration.get("rightClickQueryingEnabled");

        try {
            final URL redirectURL = new URL(wholeredirectionString);

            // if (checkAppletContext()) {
            if (rightClickQueryingEnabled) {

                pool.submit(new Thread() {
                    public void run() {

                        while (true) {
                            System.out.println("Trying to redirect to: " + redirectURL);

                            if (applet != null && applet.getAppletContext() != null) {
                                applet.getAppletContext().showDocument(redirectURL);
                                System.out.println("Redirection is done");
                                break;
                            }

                            try {
                                Thread.sleep(2000);
                            } catch (InterruptedException e) {
                                //e.printStackTrace();
                            }
                        }

                    }
                });
                //JSObject win = JSObject.getWindow(redirectorApplet);
                //win.setMember("location", redirectURL);
            } else {
                applet.getAppletContext().showDocument(redirectURL, "_blank");
            }
            //}

        }
        catch (MalformedURLException murle) {
            System.out.println("Could not recognise redirect URL");
        }
    }