Index: gignore
===================================================================
--- .hgignore	(revision 260)
+++ 	(revision )
@@ -1,9 +1,0 @@
-^build$
-^api$
-^cache$
-^misc$
-^ChangeLog$
-.*\.diff$
-^pf$
-^source/script$
-^source/pf\.zip$
Index: gtags
===================================================================
--- .hgtags	(revision 380)
+++ 	(revision )
@@ -1,13 +1,0 @@
-51e341aa46cd1602e7ef140d768491716e964b01 before_au
-89f0b2d9b6e22306e8f4563c51218659429a9b57 qx-1_3_1
-9b2e8fc7a20c02eafd5404e82e26289bd8883bb0 start
-822641d9288c0f8b623411e0419f1bc33b868a09 qx-1_2
-5045634f136c9761cd5d84ed0ec82bc926c4613c qx-1_0_2
-b9efbf5ce6d35d35b93f0da6ff4bce144d42ba0a qx-1_1_1
-b47c44506c830cd63d62d77300daa714fdf80fee hg_start
-e62158696bc29ddd771699760c58742568b25688 pf-0.9.1
-c038d471343d129210a47183df19fd5482254d96 pf-0.9.3
-6a5437ba9e4db5924d84f3e162e1b6ca8a17666c qx-1.5.1
-38122f4e5fa6733e2c6cad853e6a1aeedb908ef6 qx-2.0.1
-480826aa3555fc577333889a7e19d650f0c88884 qx-3.5
-12e0d7f4d04ea8d3569fb493c2b3f190424afd08 pf-1.2
Index: Makefile
===================================================================
--- Makefile	(revision 377)
+++ Makefile	(revision 0)
@@ -1,33 +1,70 @@
+################################################################################
+#
+#  qooxdoo - the new era of web development
+#
+#  http://qooxdoo.org
+#
+#  Copyright:
+#    2006-2007 1&1 Internet AG, Germany, http://www.1and1.org
+#
+#  License:
+#    LGPL: http://www.gnu.org/licenses/lgpl.html
+#    EPL: http://www.eclipse.org/org/documents/epl-v10.php
+#    See the LICENSE file in the project's top-level directory for details.
+#
+#  Authors:
+#    * Sebastian Werner (wpbasti)
+#    * Andreas Ecker (ecker)
+#    * Fabian Jakobs (fjakobs)
+#
+################################################################################
+
 ################################################################################
 # SETTINGS
 ################################################################################
 
-GENERATOR = ./generate.py
+#
+# Path to the folder of your qooxdoo distribution.
+# Can either be
+# a) a relative path to the location of this Makefile (preferred) or
+# b) an absolute path starting at the root of your file system
+# Example: If you put the skeleton folder next to the qooxdoo SDK folder,
+# you can use the following relative path:
+# QOOXDOO_PATH = ../../qooxdoo-0.7-sdk
+# Please note that Windows users should always use relative paths.
+# It should end with the last directory. Please omit a trailing slash.
+#
+QOOXDOO_PATH = ../qooxdoo-0.7-sdk
 
-PACK = source/pf.zip
+#
+# Namespace of your application 
+#
+APPLICATION_NAMESPACE = pf
 
-all:
-	$(GENERATOR) source
+#
+# Files that will be copied from the source directory into the build
+# directory (space separated list). The default list is empty.
+#
+APPLICATION_FILES = index.html
 
-pack:
-	$(GENERATOR) pf-build && rm -f $(PACK) && \
-	        zip -q -r -z $(PACK) pf < source/readme.txt
+#-------------------------------------------------------------------------------
+# For a full list and description of available application settings, please 
+# see the APPLICATION variables in file 
+# $(QOOXDOO_PATH)/frontend/framework/tool/make/application.mk
+# Add any of those variables for your custom configuration here:
+#-------------------------------------------------------------------------------
 
-api:
-	$(GENERATOR) api
 
-upload:
-	$(GENERATOR) pf-build && \
-	        rsync -av --rsh=ssh build/ plasma-gate:public_html/pf
 
-upload_pack: pack
-	rsync -av --rsh=ssh $(PACK) plasma-gate:public_html/pf/
 
-migration:
-	$(GENERATOR) migration
+################################################################################
+# INTERNALS (PLEASE DO NOT CHANGE)
+################################################################################
 
-clean:
-	$(GENERATOR) clean && rm -f $(PACK)
+ifneq ($(QOOXDOO_PATH),PLEASE_DEFINE_QOOXDOO_PATH)
+	include $(QOOXDOO_PATH)/frontend/framework/tool/make/targets.mk
+	include $(QOOXDOO_PATH)/frontend/framework/tool/make/application.mk
+endif
 
-distclean:
-	$(GENERATOR) distclean && rm -f $(PACK)
+error:
+	@echo "  * Please configure QOOXDOO_PATH"
Index: nifest.json
===================================================================
--- Manifest.json	(revision 195)
+++ 	(revision )
@@ -1,35 +1,0 @@
-{
-  "info" : 
-  {
-    "name"        : "pf",
-
-    "summary"     : "Plasma Formulary",
-    "description" : "Plasma Formulary Interactive.",
-    
-    "keywords"    : ["plasma", "atomic physics", "radiation"],
-    "homepage"    : "http://plasma-gate.weizmann.ac.il/pf/",
-
-    "license"     : "GPL",
-    "authors"     : 
-    [
-      {
-        "name"  : "Evgeny Stambulchik",
-        "email" : "Evgeny.Stambulchik@weizmann.ac.il"
-      }
-    ],
-
-    "version" : "trunk",
-    "qooxdoo-versions": ["trunk"]
-  },
-  
-  "provides" : 
-  {
-    "namespace"   : "pf",
-    "encoding"    : "utf-8",
-    "class"       : "source/class",
-    "resource"    : "source/resource",
-    "translation" : "source/translation",
-    "type"        : "application"
-  }
-}
-
Index: nfig.json
===================================================================
--- config.json	(revision 370)
+++ 	(revision )
@@ -1,64 +1,0 @@
-{
-  "name"    : "pf",
-
-  "include" :
-  [
-    {
-      "path" : "${QOOXDOO_PATH}/tool/data/config/application.json"
-    }
-  ],
-
-  "export" :
-  [
-    "api",
-    "build",
-    "clean",
-    "distclean",
-    "fix",
-    "info",
-    "lint",
-    "migration",
-    "pretty",
-    "profiling",
-    "source",
-    "source-all",
-    "test",
-    "test-source",
-    "translation",
-    "pf-build"
-  ],
-
-  "let" :
-  {
-    "APPLICATION"  : "pf",
-    "QOOXDOO_PATH" : "/usr/local/share/qooxdoo/5.0.2",
-    "QXTHEME"      : "pf.theme.Modern",
-    "API_EXCLUDE"  : ["qx.test.*", "${APPLICATION}.theme.*"],
-    "OPTIMIZE"     : ["basecalls", "privates", "whitespace", "comments"],
-    "LOCALES"      : [ "en" ],
-    "CACHE"        : "${TMPDIR}/cache",
-    "ROOT"         : "."
-  },
-
-  "jobs" :
-  {
-    "pf-build" :
-    {
-      "extend" : ["build"],
-
-      "copy-files" :
-      {
-        "files" : ["readme.txt",
-                   "pf.html",
-                   "wz_jsgraphics.js",
-                   "entities.js",
-                   "pf_icon.png"]
-      },
-      
-      "copy-resources" :
-      {
-        "resource-filter" : true
-      } 
-    }
-  }
-}
Index: nerate.py
===================================================================
--- generate.py	(revision 362)
+++ 	(revision )
@@ -1,149 +1,0 @@
-#!/usr/bin/env python2
-# -*- coding: utf-8 -*-
-################################################################################
-#
-#  qooxdoo - the new era of web development
-#
-#  http://qooxdoo.org
-#
-#  Copyright:
-#    2008 - 2012 1&1 Internet AG, Germany, http://www.1und1.de
-#
-#  License:
-#    LGPL: http://www.gnu.org/licenses/lgpl.html
-#    EPL: http://www.eclipse.org/org/documents/epl-v10.php
-#    See the LICENSE file in the project's top-level directory for details.
-#
-#  Authors:
-#    * Thomas Herchenroeder (thron7)
-#
-################################################################################
-
-##
-# This is a stub proxy for the real generator.py
-##
-
-import sys, os, re, subprocess, codecs, optparse
-
-CMD_PYTHON = sys.executable
-QOOXDOO_PATH = '..'
-QX_PYLIB = "tool/pylib"
-
-##
-# A derived OptionParser class that ignores unknown options (The parent
-# class raises in those cases, and stops further processing).
-# We need this, as we are only interested in -c/--config on this level, and
-# want to ignore pot. other options.
-#
-class IgnoringUnknownOptionParser(optparse.OptionParser):
-    ##
-    # <rargs> is the raw argument list. The original _process_args mutates
-    # rargs, processing options into <values> and copying interspersed args
-    # into <largs>. This overridden version ignores unknown or ambiguous
-    # options.
-    def _process_args(self, largs, rargs, values):
-        while rargs:
-            try:
-                optparse.OptionParser._process_args(self, largs, rargs, values)
-            except (optparse.BadOptionError, optparse.AmbiguousOptionError):
-                pass
-
-
-def parseArgs():
-    parser = IgnoringUnknownOptionParser(add_help_option=False)
-    parser.add_option(
-        "-c", "--config", dest="config", metavar="CFGFILE",
-        default="config.json", help="path to configuration file"
-    )
-    parser.add_option(
-        "-v", "--verbose", dest="verbose", action="store_true",
-        default=False, help="run in verbose mode"
-    )
-    (options, args) = parser.parse_args(sys.argv[1:])
-    return options, args
-
-ShellOptions, ShellArgs = parseArgs()
-
-
-# this is from misc.json, duplicated for decoupling
-_eolComment = re.compile(r'(?<![a-zA-Z]:)//.*$', re.M) # double $ for string.Template
-_mulComment = re.compile(r'/\*.*?\*/', re.S)
-def stripComments(s):
-    b = _eolComment.sub('',s)
-    b = _mulComment.sub('',b)
-    return b
-
-def getQxPath():
-    path = QOOXDOO_PATH
-    # OS env takes precedence
-    if os.environ.has_key("QOOXDOO_PATH"):
-        path = os.environ["QOOXDOO_PATH"]
-
-    # else use QOOXDOO_PATH from config.json
-    else:
-        config_file = ShellOptions.config
-        if os.path.exists(config_file):
-            # try json parsing with qx json
-            if not path.startswith('${'): # template macro has been resolved
-                sys.path.insert(0, os.path.join(path, QX_PYLIB))
-                try:
-                    from misc import json
-                    got_json = True
-                except:
-                    got_json = False
-
-            got_path = False
-            if got_json:
-                config_str = codecs.open(config_file, "r", "utf-8").read()
-                #config_str = stripComments(config_str)  # not necessary under demjson
-                config = json.loads(config_str)
-                p = config.get("let")
-                if p:
-                    p = p.get("QOOXDOO_PATH")
-                    if p:
-                        path = p
-                        got_path = True
-
-            # regex parsing - error prone
-            if not got_path:
-                qpathr=re.compile(r'"QOOXDOO_PATH"\s*:\s*"([^"]*)"\s*,?')
-                conffile = codecs.open(config_file, "r", "utf-8")
-                aconffile = conffile.readlines()
-                for line in aconffile:
-                    mo = qpathr.search(line)
-                    if mo:
-                        path = mo.group(1)
-                        break # assume first occurrence is ok
-
-    path = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), path))
-
-    return path
-
-os.chdir(os.path.dirname(os.path.abspath(sys.argv[0])))  # switch to skeleton dir
-qxpath = getQxPath()
-REAL_GENERATOR = os.path.join(qxpath, 'tool', 'bin', 'generator.py')
-
-if not os.path.exists(REAL_GENERATOR):
-    print "Cannot find real generator script under: \"%s\"; aborting" % REAL_GENERATOR
-    sys.exit(1)
-elif ShellOptions.verbose:
-    print "\nInvoking real generator under %s ..." % REAL_GENERATOR
-
-argList = []
-argList.append(CMD_PYTHON)
-argList.append(REAL_GENERATOR)
-argList.extend(sys.argv[1:])
-if sys.platform == "win32":
-    argList1=[]
-    for arg in argList:
-        if arg.find(' ')>-1:
-            argList1.append('"%s"' % arg)
-        else:
-            argList1.append(arg)
-    argList = argList1
-else:
-    argList = ['"%s"' % x for x in argList]  # quote argv elements
-
-cmd = " ".join(argList)
-retval = subprocess.call(cmd, shell=True)
-sys.exit(retval)
Index: urce/.cvsignore
===================================================================
--- source/.cvsignore	(revision 94)
+++ 	(revision )
@@ -1,1 +1,0 @@
-script
Index: source/class/pf/Application.js
===================================================================
--- source/class/pf/Application.js	(revision 379)
+++ source/class/pf/Application.js	(revision 0)
@@ -1,396 +1,17 @@
 /* ************************************************************************
 
-   Copyright: Weizmann Institute of Science
+   Copyright:
 
-   License: GPL
+   License:
 
-   Authors: Evgeny Stambulchik
+   Authors:
 
 ************************************************************************ */
 
-/**
- *
- * @asset(pf/image/*.png)
- * @asset(pf/html/*.html)
- */
+/* ************************************************************************
 
-// global
-var plasma_entities;
+#resource(image:image)
 
-function changeN_e(ev)
-{
-    var e = ev.getTarget();
-    var N_e = e.getNumValue();
-    
-    if (isFinite(N_e) && this.plasma.e.setN(N_e)) {
-        this.updatePlasmaParameters();
-        this.updateGUI();
-    }
-}
-
-function changeT_e(ev)
-{
-    var e = ev.getTarget();
-    var T_e = e.getNumValue();
-    
-    if (isFinite(T_e)) {
-        this.plasma.e.setT(T_e);
-        if (!this.gui_locked) {
-            this.plasma.i.setT(T_e);
-            this.plasma.r.setT(T_e);
-            this.updateGUI();
-        }
-    }
-}
-
-function changeZ_i(ev)
-{
-    var e = ev.getTarget();
-    var Z_i = parseInt(e.getValue());
-    
-    if (isFinite(Z_i)) {
-        this.plasma.i.setQ(Z_i);
-        this.updatePlasmaParameters();
-        this.updateGUI();
-    }
-}
-
-function changeT_i(ev)
-{
-    var e = ev.getTarget();
-    var T_i = e.getNumValue();
-    
-    if (isFinite(T_i)) {
-        this.plasma.i.setT(T_i);
-        if (!this.gui_locked) {
-            this.plasma.r.setT(T_i);
-            this.updateGUI();
-        }
-    }
-}
-
-function changeZ_r(ev)
-{
-    var e = ev.getTarget();
-    var Z_r = parseInt(e.getValue());
-    
-    if (isFinite(Z_r)) {
-        this.plasma.r.setQ(Z_r);
-        this.updatePlasmaParameters();
-        this.updateGUI();
-    }
-}
-
-function changeP_r(ev)
-{
-    var e = ev.getTarget();
-    var P_r = parseFloat(e.getValue())/100.0;
-    
-    if (isFinite(P_r)) {
-        this.plasma.P_r = P_r;
-        this.updatePlasmaParameters();
-        this.updateGUI();
-    }
-}
-
-function changeT_r(ev)
-{
-    var e = ev.getTarget();
-    var T_r = e.getNumValue();
-    
-    if (isFinite(T_r)) {
-        this.plasma.r.setT(T_r);
-        this.updateGUI();
-    }
-}
-
-function changeM_i(ev)
-{
-    var e = ev.getTarget();
-    var M_i = e.getNumValue();
-    
-    if (isFinite(M_i)) {
-        this.plasma.i.setM(M_i);
-        this.updateGUI();
-    }
-}
-
-function changeM_r(ev)
-{
-    var e = ev.getTarget();
-    var M_r = e.getNumValue();
-    
-    if (isFinite(M_r)) {
-        this.plasma.r.setM(M_r);
-        this.updateGUI();
-    }
-}
-
-function changeN_u(ev)
-{
-    var e = ev.getTarget();
-    var n_u = parseInt(e.getValue());
-    
-    this.gui_n_l.setMaximum(n_u - 1);
-    
-    this.plasma.r.setN_u(n_u);
-    this.updateGUI();
-}
-
-function changeN_l(ev)
-{
-    var e = ev.getTarget();
-    var n_l = parseInt(e.getValue());
-    
-    this.gui_n_u.setMinimum(n_l + 1);
-    
-    this.plasma.r.setN_l(n_l);
-    this.updateGUI();
-}
-
-function changeB(ev)
-{
-    var e = ev.getTarget();
-    var v = e.getNumValue();
-    
-    if (isFinite(v)) {
-        this.plasma.B = v;
-        this.updateGUI();
-    }
-}
-
-function viewMenuCB(ev)
-{
-    var explorer_is_seen;
-    
-    if (this.entity_tree.isSeeable()) {
-        explorer_is_seen = true;
-    } else {
-        explorer_is_seen = false;
-    }
-    
-    this.showSectionsButton.setEnabled(explorer_is_seen);
-    this.showSpeciesButton.setEnabled(explorer_is_seen);
-    this.redrawButton.setEnabled(this.canvas.isSeeable());
-
-    if (this.prefs.autoLoadWiki) {
-        this.loadWikiButton.setEnabled(false);
-    } else {
-        var tree = this.entity_tree;
-        var leaf = getSingleTreeSelectedItem(tree);
-        if (leaf && leaf.classname == "qx.ui.tree.TreeFile" && explorer_is_seen) {
-            this.loadWikiButton.setEnabled(true);
-        } else {
-            this.loadWikiButton.setEnabled(false);
-        }
-    }
-}
-
-function editMenuCB(ev)
-{
-    var explorer_is_seen;
-    
-    if (this.entity_tree.isSeeable()) {
-        explorer_is_seen = true;
-    } else {
-        explorer_is_seen = false;
-    }
-
-    var tree = this.entity_tree;
-    var leaf = getSingleTreeSelectedItem(tree);
-
-    if (leaf && leaf.classname == "qx.ui.tree.TreeFile" && explorer_is_seen) {
-        if (this.isFavorite(leaf)) {
-            this.editMenuButtonAddToFav.setEnabled(false);
-            this.editMenuButtonRemFromFav.setEnabled(true);
-        } else {
-            this.editMenuButtonAddToFav.setEnabled(true);
-            this.editMenuButtonRemFromFav.setEnabled(false);
-        }
-    } else {
-        this.editMenuButtonAddToFav.setEnabled(false);
-        this.editMenuButtonRemFromFav.setEnabled(false);
-    }
-}
-
-function getSingleTreeSelectedItem(tree)
-{
-    var sels = tree.getSelection();
-    if (sels && sels.length == 1) {
-        return sels[0];
-    } else {
-        return null;
-    }
-}
-
-function treeMenuCB(ev)
-{
-    if (ev.getButton() == "right") {
-        var menu = this.treeMenu;
-
-        if (menu.isSeeable()) {
-            menu.hide();
-        } else {
-            var w = ev.getTarget();
-            var leaf = null;
-            if (w.classname == "qx.ui.tree.TreeFile") {
-                leaf = w;
-            } else
-            if (w.getLayoutParent().classname == "qx.ui.tree.TreeFile") {
-                leaf = w.getLayoutParent();
-            }
-            
-            if (leaf) {
-                if (this.isFavorite(leaf)) {
-                    this.treeMenuButtonAddToFav.setEnabled(false);
-                    this.treeMenuButtonRemFromFav.setEnabled(true);
-                } else {
-                    this.treeMenuButtonAddToFav.setEnabled(true);
-                    this.treeMenuButtonRemFromFav.setEnabled(false);
-                }
-            } else {
-                this.treeMenuButtonAddToFav.setEnabled(false);
-                this.treeMenuButtonRemFromFav.setEnabled(false);
-            }
-            
-            // position & show the menu
-            menu.placeToPointer(ev);
-            menu.show();
-        };
-
-        // ev.stopPropagation();
-    }
-}
-
-function showFundamentalCB(ev)
-{
-    this.showFundamental = !this.showFundamental;
-    this.rePopulateTree();
-}
-
-function showSpectroscopyCB(ev)
-{
-    this.showSpectroscopy = !this.showSpectroscopy;
-    this.rePopulateTree();
-}
-
-function showWavesCB(ev)
-{
-    this.showWaves = !this.showWaves;
-    this.rePopulateTree();
-}
-
-function showCollisionsCB(ev)
-{
-    this.showCollisions = !this.showCollisions;
-    this.rePopulateTree();
-}
-
-function showRadiationCB(ev)
-{
-    this.showRadiation = !this.showRadiation;
-    this.rePopulateTree();
-}
-
-function showElectronsCB(ev)
-{
-    this.showElectrons = !this.showElectrons;
-    this.rePopulateTree();
-}
-
-function showIonsCB(ev)
-{
-    this.showIons = !this.showIons;
-    this.rePopulateTree();
-}
-
-function showRadiatorsCB(ev)
-{
-    this.showRadiators = !this.showRadiators;
-    this.rePopulateTree();
-}
-
-function addToFavCB(ev)
-{
-    var tree = this.entity_tree;
-    var leaf = getSingleTreeSelectedItem(tree);
-
-    if (!leaf) {
-        return;
-    }
-
-    leaf.setTextColor(this.leafFavColor);
-
-    // Add to the list of favorites
-    var fav = new Object;
-    fav.entity = leaf.getUserData("entity");
-    fav.s1     = leaf.getUserData("s1");
-    fav.s2     = leaf.getUserData("s2");
-    fav.color  = this.nextColor();
-    this.favorites.push(fav);
-    
-    // Switch the dimension selector ...
-    this.gui_compare_dim.selectByValue(fav.entity.dimension);
-    // ... and update the list of favorites
-    this.updateFavoritesListView();
-    this.updateLegendListView();
-    
-    this.saveFavorites();
-}
-
-function removeFromFavCB(ev)
-{
-    var tree = this.entity_tree;
-    var leaf = getSingleTreeSelectedItem(tree);
-
-    if (!leaf) {
-        return;
-    }
-    leaf.setTextColor(this.leafColor);
-
-    var entity = leaf.getUserData("entity");
-    var s1     = leaf.getUserData("s1");
-    var s2     = leaf.getUserData("s2");
-
-    // Remove from the list of favorites
-    for (var k = 0; k < this.favorites.length; k++) {
-        var fav = this.favorites[k];
-        if (fav.entity  == entity && fav.s1 == s1 && fav.s2 == s2) {
-            this.favorites.splice(k, 1);
-            break;
-        }
-    }
-
-    // Switch the dimension selector ...
-    this.gui_compare_dim.selectByValue(entity.dimension);
-    // ... and update the list of favorites
-    this.updateFavoritesListView();
-    this.updateLegendListView();
-    
-    this.saveFavorites();
-}
-
-function clickTreeCB(ev)
-{
-    var tree = ev.getTarget();
-    var e = getSingleTreeSelectedItem(tree);
-    if (e) {
-        var entity = e.getUserData("entity");
-        
-        if (entity) {
-            this.gui_entity_units.update(entity.dimension,
-                this.prefs.units[entity.dimension]);
-        } else {
-            this.gui_entity_units.update(null, null);
-        }
-        
-        this.updateEntityValue();
-    }
-}
-
-function changeUnitsCB(ev)
-{
-    this.updateEntityValue();
-}
+************************************************************************ */
 
 /**
@@ -399,2726 +20,90 @@
 qx.Class.define("pf.Application",
 {
-    extend : qx.application.Standalone,
-
-    /*
-    *****************************************************************************
-       MEMBERS
-    *****************************************************************************
-    */
-
-    members :
-    {
-        showFundamental  : true,
-        showSpectroscopy : true,
-        showWaves        : true,
-        showCollisions   : true,
-        showRadiation    : true,
-
-        showElectrons  : true,
-        showIons       : true,
-        showRadiators  : true,
-        
-        leafColor      : "black",
-        leafFavColor   : "red",
-        
-        plasma : null,
-
-        updatePlasmaParameters : function()
-        {
-            return this.plasma.updateParameters();
-        },
-        
-        updateGUI : function()
-        {
-            if (this.gui_locked) {
-                return;
-            }
-            
-            this.gui_locked = true;
-            
-            // Make sure GUI does not remain locked forever...
-            try {
-                if (this.prefs.currentConfigName) {
-                    this.gui_configName.setLabel(this.prefs.currentConfigName);
-                }
-
-                this.gui_N_e.setNumValue(this.plasma.e.getN());
-                this.gui_T_e.setNumValue(this.plasma.e.getT());
-
-                this.gui_N_i.setNumValue(this.plasma.i.getN());
-                this.gui_T_i.setNumValue(this.plasma.i.getT());
-                this.gui_Z_i.setValue(this.plasma.i.getQ());
-                this.gui_M_i.setNumValue(this.plasma.i.getM());
-
-                this.gui_P_r.setValue(100*this.plasma.P_r);
-
-                this.gui_N_r.setNumValue(this.plasma.r.getN());
-                this.gui_T_r.setNumValue(this.plasma.r.getT());
-                this.gui_Z_r.setValue(this.plasma.r.getQ());
-                this.gui_Zcore.setValue((this.plasma.r.getQ() + 1) + '');
-                this.gui_M_r.setNumValue(this.plasma.r.getM());
-
-                this.gui_B.setNumValue(this.plasma.B);
-
-                // Make sure n_u > n_l holds during update
-                if (this.gui_n_l.getValue() >= this.plasma.r.getN_u()) {
-                    this.gui_n_l.setValue(this.plasma.r.getN_l());
-                    this.gui_n_u.setValue(this.plasma.r.getN_u());
-                } else {
-                    this.gui_n_u.setValue(this.plasma.r.getN_u());
-                    this.gui_n_l.setValue(this.plasma.r.getN_l());
-                }
-
-                // Update the currently selected entity
-                this.updateEntityValue();
-
-                // Update the list of favorites
-                this.updateFavoritesListView();
-                this.updateLegendListView();
-            } catch (err) {
-                this.error(err);
-            }
-            
-            this.gui_locked = false;
-        },
-        
-
-        getSpeciesName : function(species) {
-            var name;
-            
-            switch (species.id) {
-            case "e":
-                name = "electrons";
-                break;
-            case "i":
-                name = "ions";
-                break;
-            case "r":
-                name = "radiators";
-                break;
-            default:
-                name = null;
-                break;
-            }
-            
-            return name;
-        },
-        
-        getEntityFullName : function(entity, s1, s2)
-        {
-            var name = entity.name;
-            switch (entity.nspecies) { 
-            case 2:
-                name += " (" + this.getSpeciesName(s1) + "/" +
-                               this.getSpeciesName(s2) + ")";
-                break;
-            case 1:
-                var prepos = entity.prepos;
-                if (!prepos) {
-                    prepos = "of";
-                }
-                name += " " + prepos + " " + this.getSpeciesName(s1);
-                break;
-            default:
-                break;
-            }
-            
-            return name;
-        },
-        
-        evaluateEntityValue : function(entity, s1, s2)
-        {
-            var F = new Function("s1", "s2", entity.formula);
-
-            return F.call(this, s1, s2);
-        },
-        
-        updateEntityValue : function()
-        {
-            var tree = this.entity_tree;
-            var leaf = getSingleTreeSelectedItem(tree);
-            
-            if (!leaf) {
-                return;
-            }
-            
-            var entity = leaf.getUserData("entity");
-            var s1     = leaf.getUserData("s1");
-            var s2     = leaf.getUserData("s2");
-            
-            var name, section, value;
-            if (entity) {
-                var v     = this.evaluateEntityValue(entity, s1, s2);
-                var scale = this.gui_entity_units.getSelectedValue();
-                
-                name    = this.getEntityFullName(entity, s1, s2);
-                section = entity.section;
-                value   = v*scale
-            } else {
-                name    = null;
-                section = null;
-                value   = 0;
-            }
-            
-            this.gui_entity_name.setValue(name);
-
-            this.gui_entity_section.setValue(section);
-
-            if (isFinite(value)) {
-                this.gui_entity_value.setNumValue(value);
-            } else {
-                this.gui_entity_value.setValue("");
-            }
-            
-            if (this.prefs.autoLoadWiki) {
-                this.showWikiPage(entity);
-            } else {
-                this.showWikiPage(null);
-            }
-        },
-
-        isFavorite : function(leaf)
-        {
-            var entity = leaf.getUserData("entity");
-            var s1     = leaf.getUserData("s1");
-            var s2     = leaf.getUserData("s2");
-
-            for (var k = 0; k < this.favorites.length; k++) {
-                var fav = this.favorites[k];
-                if (fav.entity  == entity && fav.s1 == s1 && fav.s2 == s2) {
-                    return true;
-                    break;
-                }
-            }
-            
-            return false;
-        },
-        
-        addEntityLeaf : function(entity, s1, s2)
-        {
-            var icon;
-            
-            if (s1 && s2) {
-                icon = "pf/image/" + s1.id + s2.id + "_small.png";
-            } else
-            if (s1) {
-                icon = "pf/image/" + s1.id + "_small.png";
-            } else {
-                icon = "pf/image/all_small.png";
-            }
-            
-            var leaf = new qx.ui.tree.TreeFile(entity.name);
-            leaf.setIcon(icon);
-            leaf.addListener("contextmenu", treeMenuCB, this);
-
-            leaf.setUserData("entity", entity);
-            leaf.setUserData("s1", s1);
-            leaf.setUserData("s2", s2);
-
-            if (this.isFavorite(leaf)) {
-                leaf.setTextColor(this.leafFavColor);
-            } else {
-                leaf.setTextColor(this.leafColor);
-            }
-            
-            return leaf;
-        },
-
-        populateTree : function()
-        {
-            var n = plasma_entities.length;
-            var sa = new Array;
-            if (this.showElectrons) {
-                sa.push(this.plasma.e)
-            }
-            if (this.showIons) {
-                sa.push(this.plasma.i)
-            }
-            if (this.showRadiators) {
-                sa.push(this.plasma.r)
-            }
-            
-            for (var i = 0; i < n; i++) {
-                var entity = plasma_entities[i];
-                
-                if (entity.section == "fundamental" &&
-                    this.showFundamental != true) {
-                    continue;
-                }
-                if (entity.section == "spectroscopy" &&
-                    this.showSpectroscopy != true) {
-                    continue;
-                }
-                if (entity.section == "waves" &&
-                    this.showWaves != true) {
-                    continue;
-                }
-                if (entity.section == "collisions" &&
-                    this.showCollisions != true) {
-                    continue;
-                }
-                if (entity.section == "radiation" &&
-                    this.showRadiation != true) {
-                    continue;
-                }
-                
-                var folder;
-                switch (entity.dimension) {
-                case "frequency":
-                    folder = this.gui_folder_freq;
-                    break;
-                case "length":
-                    folder = this.gui_folder_length;
-                    break;
-                case "velocity":
-                    folder = this.gui_folder_vel;
-                    break;
-                case "energy":
-                    folder = this.gui_folder_energy;
-                    break;
-                case "mass_density":
-                    folder = this.gui_folder_mass_density;
-                    break;
-                case "pressure":
-                    folder = this.gui_folder_pressure;
-                    break;
-                case "area":
-                    folder = this.gui_folder_area;
-                    break;
-                case "power_density":
-                    folder = this.gui_folder_power_density;
-                    break;
-                case "spectral_power_density":
-                    folder = this.gui_folder_spectral_power_density;
-                    break;
-                case "efield":
-                    folder = this.gui_folder_efield;
-                    break;
-                case "none":
-                    folder = this.gui_folder_none;
-                    break;
-                default:
-                    continue;
-                    break;
-                }
-                
-                var leaf;
-                
-                switch (entity.nspecies) {
-                case 1:
-                    for (var j = 0; j < sa.length; j++) {
-                        var s = sa[j];
-                        leaf = this.addEntityLeaf(entity, s, null);
-                        folder.add(leaf);
-                    }
-                    break;
-                case 2:
-                    for (var j = 0; j < sa.length; j++) {
-                        var s1 = sa[j];
-                        for (var k = j; k < sa.length; k++) {
-                            var s2 = sa[k];
-                            leaf = this.addEntityLeaf(entity, s1, s2);
-                            folder.add(leaf);
-                        }
-                    }
-                    break;
-                default:
-                    leaf = this.addEntityLeaf(entity, null, null);
-                    folder.add(leaf);
-                    break;
-                }
-            }
-        }, 
-
-        cleanTree : function()
-        {
-            this.gui_folder_freq.removeAll();
-            
-            this.gui_folder_length.removeAll();
-            
-            this.gui_folder_vel.removeAll();
-            
-            this.gui_folder_none.removeAll();
-            
-            this.gui_folder_energy.removeAll();
-            
-            this.gui_folder_mass_density.removeAll();
-
-            this.gui_folder_pressure.removeAll();
-            
-            this.gui_folder_area.removeAll();
-            
-            this.gui_folder_power_density.removeAll();
-
-            this.gui_folder_spectral_power_density.removeAll();
-            
-            this.gui_folder_efield.removeAll();
-        },
-
-        rePopulateTree : function()
-        {
-            this.cleanTree();
-            
-            this.populateTree();
-        },
-
-
-        updateFavoritesListView : function()
-        {
-            var lv = this.favoritesListView;
-            var tm = lv.getTableModel();
-            
-            var dimension = this.gui_compare_dim.getSelectedValue();
-            
-            var scale = this.gui_compare_units.getSelectedValue();
-            
-            var rowData = new Array();
-            
-            for (var i = 0; i < this.favorites.length; i++) {
-                var fav = this.favorites[i];
-                var entity = fav.entity;
-                
-                if (entity.dimension != dimension) {
-                    continue;
-                }
-                
-                var s1 = fav.s1;
-                var s2 = fav.s2;
-
-                var icon;
-                if (s1 && s2) {
-                    icon = "pf/image/" + s1.id + s2.id + "_small.png";
-                } else
-                if (s1) {
-                    icon = "pf/image/" + s1.id + "_small.png";
-                } else {
-                    icon = "pf/image/all_small.png";
-                }
-                var name = this.getEntityFullName(entity, s1, s2);
-                var value = scale*this.evaluateEntityValue(entity, s1, s2);
-
-                rowData.push([icon, name, entity.section,
-                    pf.util.Format.numPrint(value)]);
-            }
-            
-            tm.setData(rowData, false);
-            var sidx = tm.getSortColumnIndex();
-            tm.sortByColumn(sidx, tm.isSortAscending());
-            
-            lv.updateContent();
-            // lv.updateSort();
-            // lv.update();
-        },
-
-        updateLegendListView : function()
-        {
-            var lv = this.legendListView;
-            var tm = lv.getTableModel();
-
-            var rowData = new Array();
-            
-            var dimension = this.gui_compare_dim.getSelectedValue();
-            
-            for (var i = 0; i < this.favorites.length; i++) {
-                var fav = this.favorites[i];
-                var entity = fav.entity;
-                
-                if (entity.dimension != dimension) {
-                    continue;
-                }
-                
-                var s1    = fav.s1;
-                var s2    = fav.s2;
-
-                var name  = this.getEntityFullName(entity, s1, s2);
-                var color = fav.color;
-
-                rowData.push({"color": color, "name": name, "favorite": fav});
-            }
-            
-            tm.setDataAsMapArray(rowData);
-            // lv.updateContent();
-        },
-
-
-        renderTabPage : function(label, icon, checked)
-        {
-            var page_id;
-            
-            page_id = new qx.ui.tabview.Page(label, icon);
-            this.tabview.add(page_id, {height: "100%"});
-
-            if (checked) {
-                this.tabview.setSelection(page_id);
-            }
-            
-            return page_id;
-        },
-
-        renderParametersTab : function()
-        {
-            var fr, gl, rc, rc1, rc2;
-            
-            var page_id = this.renderTabPage("Parameters",
-                "pf/image/tab-parameters.png", true);
-            page_id.setLayout(new qx.ui.layout.VBox(10));
-
-            fr = new qx.ui.groupbox.GroupBox("Configuration name",
-                "pf/image/info.png");
-            fr.setLayout(new qx.ui.layout.VBox());
-
-            this.gui_configName =
-                new qx.ui.basic.Atom(this.prefs.currentConfigName);
-            this.gui_configName.setRich(true)
-            fr.add(this.gui_configName);
-            page_id.add(fr);
-            
-
-            rc = new qx.ui.container.Composite(new qx.ui.layout.HBox(10));
-            page_id.add(rc);
-            
-            rc1 = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
-            rc.add(rc1, {flex : 1});
-            
-            rc2 = new qx.ui.container.Composite(new qx.ui.layout.VBox(27));
-            rc.add(rc2, {flex : 1});
-            
-            
-            fr = new qx.ui.groupbox.GroupBox("Electrons",
-                "pf/image/e_small.png");
-            fr.setLayout(new qx.ui.layout.VBox());
-
-            rc1.add(fr);
-
-            var layout = new qx.ui.layout.Grid(4, 6);
-            layout.setColumnWidth(0, 80);
-            layout.setColumnFlex(1, 1);
-            gl = new qx.ui.container.Composite(layout);
-
-            fr.add(gl);
-
-            var l, e, au_fn, au_fT;
-            
-            au_fn = pf.base.Bohr.n0;
-            au_fT = pf.base.Bohr.E0;
-
-            // N_e
-            l = new qx.ui.basic.Label("N<sub>e</sub> (cm<sup>-3</sup>):");
-            l.setRich(true);
-            gl.add(l, {row: 0, column: 0});
-            e = new pf.ui.TextField(this.plasma.e.getN(), au_fn);
-            gl.add(e, {row: 0, column: 1});
-            e.addListener("changeValue", changeN_e, this);
-            this.gui_N_e = e;
-
-            // T_e
-            l = new qx.ui.basic.Label("T<sub>e</sub> (eV):");
-            l.setRich(true);
-            gl.add(l, {row: 1, column: 0});
-            e = new pf.ui.TextField(this.plasma.e.getT(), au_fT);
-            gl.add(e, {row: 1, column: 1});
-            e.addListener("changeValue", changeT_e, this);
-            this.gui_T_e = e;
-            
-            fr = new qx.ui.groupbox.GroupBox("Ions",
-                "pf/image/i_small.png");
-            fr.setLayout(new qx.ui.layout.VBox());
-
-            rc1.add(fr);
-
-            layout = new qx.ui.layout.Grid(4, 6);
-            layout.setColumnWidth(0, 80);
-            layout.setColumnFlex(1, 1);
-            gl = new qx.ui.container.Composite(layout);
-
-            fr.add(gl);
-
-            // Z_i
-            l = new qx.ui.basic.Label("Z<sub>i</sub>:");
-            l.setRich(true);
-            gl.add(l, {row: 0, column: 0});
-            e = new qx.ui.form.Spinner(1, this.plasma.i.getQ(), 100);
-            gl.add(e, {row: 0, column: 1});
-            e.addListener("changeValue", changeZ_i, this);
-            this.gui_Z_i = e;
-            
-            // M_i
-            l = new qx.ui.basic.Label("M<sub>i</sub>:");
-            l.setRich(true);
-            gl.add(l, {row: 1, column: 0});
-            e = new pf.ui.TextField(this.plasma.i.getM(), 1/pf.base.Bohr.m_p);
-            gl.add(e, {row: 1, column: 1});
-            e.addListener("changeValue", changeM_i, this);
-            this.gui_M_i = e;
-            
-            // T_i
-            l = new qx.ui.basic.Label("T<sub>i</sub> (eV):");
-            l.setRich(true);
-            gl.add(l, {row: 2, column: 0});
-            e = new pf.ui.TextField(this.plasma.i.getT(), au_fT);
-            gl.add(e, {row: 2, column: 1});
-            e.addListener("changeValue", changeT_i, this);
-            this.gui_T_i = e;
-
-            // N_i
-            l = new qx.ui.basic.Label("N<sub>i</sub> (cm<sup>-3</sup>):");
-            l.setRich(true);
-            gl.add(l, {row: 3, column: 0});
-            e = new pf.ui.TextField(this.plasma.i.getN(), au_fn);
-            gl.add(e, {row: 3, column: 1});
-            e.setReadOnly(true);
-            this.gui_N_i = e;
-            
-            fr = new qx.ui.groupbox.GroupBox("Radiators",
-                "pf/image/r_small.png");
-            fr.setLayout(new qx.ui.layout.VBox());
-
-            rc2.add(fr);
-
-            layout = new qx.ui.layout.Grid(4, 6);
-            layout.setColumnWidth(0, 80);
-            layout.setColumnFlex(1, 1);
-            gl = new qx.ui.container.Composite(layout);
-
-            fr.add(gl);
-
-            // Z_r
-            l = new qx.ui.basic.Label("Z<sub>r</sub>:");
-            l.setRich(true);
-            gl.add(l, {row: 0, column: 0});
-            e = new qx.ui.form.Spinner(0, this.plasma.r.getQ(), 100);
-            gl.add(e, {row: 0, column: 1});
-            e.addListener("changeValue", changeZ_r, this);
-            this.gui_Z_r = e;
-
-            // M_r
-            l = new qx.ui.basic.Label("M<sub>r</sub>:");
-            l.setRich(true);
-            gl.add(l, {row: 1, column: 0});
-            e = new pf.ui.TextField(this.plasma.r.getM(), 1/pf.base.Bohr.m_p);
-            gl.add(e, {row: 1, column: 1});
-            e.addListener("changeValue", changeM_r, this);
-            this.gui_M_r = e;
-
-            // T_r
-            l = new qx.ui.basic.Label("T<sub>r</sub> (eV):");
-            l.setRich(true);
-            gl.add(l, {row: 2, column: 0});
-            e = new pf.ui.TextField(this.plasma.r.getT(), au_fT);
-            gl.add(e, {row: 2, column: 1});
-            e.addListener("changeValue", changeT_r, this);
-            this.gui_T_r = e;
-
-            // P_r
-            l = new qx.ui.basic.Label("P<sub>r</sub> (%):");
-            l.setRich(true);
-            gl.add(l, {row: 3, column: 0});
-            e = new qx.ui.form.Spinner(0, 100*this.plasma.P_r, 100);
-            var nf = new qx.util.format.NumberFormat();
-            nf.setMaximumFractionDigits(3);
-            e.setNumberFormat(nf);
-            gl.add(e, {row: 3, column: 1});
-            e.addListener("changeValue", changeP_r, this);
-            this.gui_P_r = e;
-
-            // N_r
-            l = new qx.ui.basic.Label("N<sub>r</sub> (cm<sup>-3</sup>):");
-            l.setRich(true);
-            gl.add(l, {row: 4, column: 0});
-            e = new pf.ui.TextField(this.plasma.r.getN(), au_fn);
-            e.setReadOnly(true);
-            gl.add(e, {row: 4, column: 1});
-            this.gui_N_r = e;
-
-
-            fr = new qx.ui.groupbox.GroupBox("Fields",
-                "pf/image/field_small.png");
-            fr.setLayout(new qx.ui.layout.VBox());
-
-            rc1.add(fr);
-
-            layout = new qx.ui.layout.Grid(4, 6);
-            layout.setColumnWidth(0, 80);
-            layout.setColumnFlex(1, 1);
-            gl = new qx.ui.container.Composite(layout);
-
-            fr.add(gl);
-
-
-            l = new qx.ui.basic.Label("B (T):");
-            l.setRich(true);
-            gl.add(l, {row: 0, column: 0});
-            e = new pf.ui.TextField(this.plasma.B, pf.base.Bohr.B0);
-            gl.add(e, {row: 0, column: 1});
-            e.addListener("changeValue", changeB, this);
-            this.gui_B = e;
-
-            // Atomic system frame
-            fr = new qx.ui.groupbox.GroupBox("Atomic system",
-                "pf/image/all_small.png");
-            fr.setLayout(new qx.ui.layout.VBox());
-
-            rc2.add(fr);
-
-            layout = new qx.ui.layout.Grid(4, 6);
-            layout.setColumnWidth(0, 80);
-            layout.setColumnFlex(1, 1);
-            gl = new qx.ui.container.Composite(layout);
-
-            fr.add(gl);
-
-            l = new qx.ui.basic.Label("Z<sub>core</sub>:");
-            l.setRich(true);
-            gl.add(l, {row: 0, column: 0});
-            e = new qx.ui.form.TextField((this.plasma.r.getQ() + 1) + '');
-            e.setReadOnly(true);
-            gl.add(e, {row: 0, column: 1});
-            this.gui_Zcore = e;
-
-            l = new qx.ui.basic.Label("n<sub>u</sub>:");
-            l.setRich(true);
-            gl.add(l, {row: 1, column: 0});
-            e = new qx.ui.form.Spinner(this.plasma.r.getN_l() + 1,
-                this.plasma.r.getN_u(), 1000);
-            gl.add(e, {row: 1, column: 1});
-            e.addListener("changeValue", changeN_u, this);
-            this.gui_n_u = e;
-
-            l = new qx.ui.basic.Label("n<sub>l</sub>:");
-            l.setRich(true);
-            gl.add(l, {row: 2, column: 0});
-            e = new qx.ui.form.Spinner(1, this.plasma.r.getN_l(),
-                this.plasma.r.getN_u() - 1);
-            gl.add(e, {row: 2, column: 1});
-            e.addListener("changeValue", changeN_l, this);
-            this.gui_n_l = e;
-        },
-
-        renderExplorerTab : function()
-        {
-            var page_id = this.renderTabPage("Explorer",
-                "pf/image/tab-explorer.png", false);
-            page_id.setLayout(new qx.ui.layout.VBox);
-
-            var sp = new qx.ui.splitpane.Pane("horizontal");
-            sp.setDecorator("main");
-            page_id.add(sp, {height: "100%"});
-            
-            // Create container with fixed dimensions for the left:
-            var left_pane = new qx.ui.container.Composite(new qx.ui.layout.Grow).set({
-              width: 250
-            });
-
-            // Create container for the right:
-            var right_pane = new qx.ui.container.Composite(new qx.ui.layout.VBox(4)).set({
-              padding : 4
-            });
-
-            sp.add(left_pane,  0, {flex: 1});
-            sp.add(right_pane, 1, {flex: 2});
-
-            
-            var tree = new qx.ui.tree.Tree("Browser");
-            tree.setDecorator(null);
-            left_pane.add(tree);
-            
-            this.entity_tree = tree;
-            
-            var folder;
-            
-            var root = new qx.ui.tree.TreeFolder("Root");
-            root.setOpen(true);
-            tree.setRoot(root);
-            tree.setHideRoot(true);
-            tree.setRootOpenClose(true);
-            tree.setOpenMode("dbltap");
-
-            tree.addListener("changeSelection", clickTreeCB, this);
-            
-            folder = new qx.ui.tree.TreeFolder("Dimensionless");
-            root.add(folder);
-            this.gui_folder_none = folder;
-
-            folder = new qx.ui.tree.TreeFolder("Length");
-            root.add(folder);
-            this.gui_folder_length = folder;
-            
-            folder = new qx.ui.tree.TreeFolder("Frequency");
-            root.add(folder);
-            this.gui_folder_freq = folder;
-
-            folder = new qx.ui.tree.TreeFolder("Velocity");
-            root.add(folder);
-            this.gui_folder_vel = folder;
-            
-            folder = new qx.ui.tree.TreeFolder("Area");
-            root.add(folder);
-            this.gui_folder_area = folder;
-
-            folder = new qx.ui.tree.TreeFolder("Mass density");
-            root.add(folder);
-            this.gui_folder_mass_density = folder;
-
-            folder = new qx.ui.tree.TreeFolder("Energy");
-            root.add(folder);
-            this.gui_folder_energy = folder;
-
-            folder = new qx.ui.tree.TreeFolder("Pressure");
-            root.add(folder);
-            this.gui_folder_pressure = folder;
-
-            folder = new qx.ui.tree.TreeFolder("Power density");
-            root.add(folder);
-            this.gui_folder_power_density = folder;
-
-            folder = new qx.ui.tree.TreeFolder("Power spectral density");
-            root.add(folder);
-            this.gui_folder_spectral_power_density = folder;
-
-            folder = new qx.ui.tree.TreeFolder("Electric field");
-            root.add(folder);
-            this.gui_folder_efield = folder;
-
-            
-
-            this.populateTree();
-
-            // Build context-sensitive popup menu
-            this.treeMenu = new qx.ui.menu.Menu;
-            var button;
-            
-            button = new qx.ui.menu.Button("Add to Favorites",
-                "pf/image/favorite-add.png");
-            button.addListener("execute", addToFavCB, this);
-            this.treeMenu.add(button);
-            this.treeMenuButtonAddToFav = button;
-            button = new qx.ui.menu.Button("Remove from Favorites",
-                "pf/image/favorite-delete.png");
-            button.addListener("execute", removeFromFavCB, this);
-            this.treeMenu.add(button);
-            this.treeMenuButtonRemFromFav = button;
-            
-            this.doc.add(this.treeMenu);
-
-
-            var layout = new qx.ui.layout.Grid(4, 6);
-            layout.setColumnFlex(0, 3);
-            layout.setColumnFlex(1, 12);
-            layout.setColumnFlex(2, 4);
-            layout.setColumnMinWidth(0,  50);
-            layout.setColumnMaxWidth(2, 150);
-            var gl = new qx.ui.container.Composite(layout);
-            
-            var l, e;
-            
-
-            l = new qx.ui.basic.Label("Name:");
-            gl.add(l, {row: 0, column: 0});
-            e = new qx.ui.form.TextField();
-            e.setReadOnly(true);
-            this.gui_entity_name = e;
-            gl.add(e, {row: 0, column: 1, colSpan: 2});
-
-            l = new qx.ui.basic.Label("Value:");
-            gl.add(l, {row: 1, column: 0});
-            e = new pf.ui.TextField("");
-            e.setReadOnly(true);
-            gl.add(e, {row: 1, column: 1});
-            this.gui_entity_value = e;
-
-            e = new pf.UnitSelector();
-            e.addListener("changeSelection", changeUnitsCB, this);
-            gl.add(e, {row: 1, column: 2});
-            this.gui_entity_units = e;
-
-            l = new qx.ui.basic.Label("Section:");
-            gl.add(l, {row: 2, column: 0});
-            e = new qx.ui.form.TextField();
-            e.setReadOnly(true);
-            this.gui_entity_section = e;
-            gl.add(e, {row: 2, column: 1, colSpan: 2});
-
-            right_pane.add(gl);
-
-            var fr = new qx.ui.groupbox.GroupBox("Wikipedia article",
-                "pf/image/wikipedia.png");
-            fr.setLayout(new qx.ui.layout.Grow());
-            
-            var iframe = new qx.ui.embed.Iframe();
-            iframe.addListener("load", function(ev) {
-                    this.setCursor("default");
-                });
-            
-            fr.add(iframe);
-            right_pane.add(fr, {flex: 1});
-            
-            this.gui_wiki = iframe;
-        },
-        
-        renderCompareTab : function()
-        {
-            var page_id = this.renderTabPage("Compare",
-                "pf/image/tab-compare.png");
-            page_id.setLayout(new qx.ui.layout.VBox(1));
-            
-            var bl = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
-            page_id.add(bl, {height: "100%"});
-            
-            var rc = new qx.ui.container.Composite(new qx.ui.layout.HBox(10));
-            bl.add(rc);
-
-            var l, e;
-            l = new qx.ui.basic.Label("Dimension:");
-            rc.add(l);
-            e = new pf.ui.SelectBox;
-            e.addItem("None", "none");
-            e.addItem("Length", "length");
-            e.addItem("Frequency", "frequency");
-            e.addItem("Velocity", "velocity");
-            e.addItem("Area", "area");
-            e.addItem("Energy", "energy");
-            e.addItem("Mass density", "mass_density");
-            e.addItem("Pressure", "pressure");
-            e.addItem("Power density", "power_density");
-            e.addItem("Power spectral density", "spectral_power_density");
-            e.addItem("Electric field", "efield");
-            e.addListener("changeSelection", function(ev) {
-                    var dimension = this.gui_compare_dim.getSelectedValue();
-                    this.gui_compare_units.update(dimension,
-                        this.prefs.units[dimension]);
-                    this.updateFavoritesListView();
-                    this.updateLegendListView();
-                }, this);
-            rc.add(e);
-            this.gui_compare_dim = e;
-            
-            l = new qx.ui.basic.Label("Units:");
-            rc.add(l);
-            e = new pf.UnitSelector();
-            e.update("none");
-            e.addListener("changeSelection", function(ev) {
-                    this.updateFavoritesListView();
-                }, this);
-            rc.add(e);
-            this.gui_compare_units = e;
-
-            // table model
-            var tm = new qx.ui.table.model.Simple();
-            tm.setColumns([ "", "Name", "Section", "Value" ]);
-            
-            tm.setColumnEditable(0, false);
-            tm.setColumnEditable(1, false);
-            tm.setColumnEditable(2, false);
-            tm.setColumnEditable(3, false);
-            
-            tm.setColumnSortable(0, false);
-            
-            tm.setSortMethods(3, function(row1, row2) {
-                var obj1 = parseFloat(row1[arguments.callee.columnIndex]);
-                var obj2 = parseFloat(row2[arguments.callee.columnIndex]);
-                return (obj1 > obj2) ? 1 : ((obj1 == obj2) ? 0 : -1);
-            });
-            
-            // table list
-            var lv = new qx.ui.table.Table(tm);
-
-            lv.setStatusBarVisible(false);
-            lv.setShowCellFocusIndicator(false);
-            lv.setColumnVisibilityButtonVisible(false);
-            
-            lv.setColumnWidth(0,  24);
-            lv.setColumnWidth(1, 300);
-            lv.setColumnWidth(2, 120);
-            
-            var renderer = new qx.ui.table.cellrenderer.Image(16, 16);
-            lv.getTableColumnModel().setDataCellRenderer(0, renderer);
-
-            bl.add(lv, {flex: 1});
-            
-            this.favoritesListView = lv;
-        },
-        
-        drawAll : function(ev)
-        {
-            var canvas = this.canvas;
-            
-            canvas.setPrintable(true);
-            
-            var pname = this.guiParameter.getSelectedValue();
-            var vmin = this.guiMinParam.getNumValue();
-            var vmax = this.guiMaxParam.getNumValue();
-            var npoints = this.guiParamPoints.getValue();
-            
-            if (npoints < 2 || !pname) {
-                return;
-            }
-
-            var dimension = this.gui_compare_dim.getSelectedValue();
-            var scale = this.gui_compare_units.getSelectedValue();
-
-            var par0, au_f;
-            var xlabel, ylabel;
-            if (dimension == "none") {
-                ylabel = "";
-            } else {
-                ylabel = this.gui_compare_dim.getSelectedLabel() + " (" +
-                         this.gui_compare_units.getSelectedLabel() + ")";
-            }
-            switch (pname) {
-            case "N_e":
-                par0 = this.plasma.e.getN();
-                au_f = pf.base.Bohr.n0;
-                xlabel = "N<sub>e</sub> (cm<sup>-3</sup>)"
-                break;
-            case "T":
-                par0 = this.plasma.e.getT();
-                if (par0 != this.plasma.i.getT()) {
-                    this.msgWindow.error("Cannot vary T since T<sub>e</sub> &ne; T<sub>i</sub>");
-                    return;
-                }
-                if (par0 != this.plasma.r.getT()) {
-                    this.msgWindow.error("Cannot vary T since T<sub>e</sub> &ne; T<sub>r</sub>");
-                    return;
-                }
-                au_f = pf.base.Bohr.E0;
-                xlabel = "T (eV)"
-                break;
-            case "T_e":
-                par0 = this.plasma.e.getT();
-                au_f = pf.base.Bohr.E0;
-                xlabel = "T<sub>e</sub> (eV)"
-                break;
-            case "T_i":
-                par0 = this.plasma.i.getT();
-                au_f = pf.base.Bohr.E0;
-                xlabel = "T<sub>i</sub> (eV)"
-                break;
-            case "T_r":
-                par0 = this.plasma.r.getT();
-                au_f = pf.base.Bohr.E0;
-                xlabel = "T<sub>r</sub> (eV)"
-                break;
-            case "T_i,r":
-                par0 = this.plasma.i.getT();
-                if (par0 != this.plasma.r.getT()) {
-                    this.msgWindow.error("Cannot vary T<sub>i,r</sub> since T<sub>i</sub> &ne; T<sub>r</sub>");
-                    return;
-                }
-                au_f = pf.base.Bohr.E0;
-                xlabel = "T<sub>i,r</sub> (eV)"
-                break;
-            case "P_r":
-                par0 = this.plasma.P_r;
-                au_f = 100;
-                xlabel = "P<sub>r</sub> (%)"
-                break;
-            case "B":
-                par0 = this.plasma.B;
-                au_f = pf.base.Bohr.B0;
-                xlabel = "B (T)"
-                break;
-            default:
-                return;
-            }
-            
-            if (par0 == 0) {
-                this.msgWindow.error("Cannot vary a null parameter</sub>");
-                return;
-            }
-            if (vmin >= vmax) {
-                this.msgWindow.error("Min. scale must be less than max. one");
-                return;
-            }
-            if (vmin <= 0) {
-                this.msgWindow.error("Non-positive scale values are not allowed");
-                return;
-            }
-            
-            var x_au  = new Array;
-            var xdata = new Array;
-            for (var j = 0; j < npoints; j++) {
-                var x = par0*(vmin + (vmax - vmin)*j/(npoints - 1));
-                x_au.push(x);
-                xdata.push(au_f*x);
-            }
-                        
-            var wxmin = xdata[0];
-            var wxmax = xdata[xdata.length - 1];
-
-            var wymin = 0;
-            var wymax = 0;
-
-            this.sets = new Array;
-            var first = true;
-            for (var i = 0; i < this.favorites.length; i++) {
-                var fav = this.favorites[i];
-                var entity = fav.entity;
-                
-                if (entity.dimension != dimension) {
-                    continue;
-                }
-                
-                var s1    = fav.s1;
-                var s2    = fav.s2;
-                var vname = this.getEntityFullName(entity, s1, s2);
-
-                var set   = new Object;
-                var ydata = new Array;
-                for (var j = 0; j < npoints; j++) {
-                    var par = x_au[j];
-
-                    switch (pname) {
-                    case "N_e":
-                        this.plasma.e.setN(par);
-                        this.updatePlasmaParameters();
-                        break;
-                    case "T_e":
-                        this.plasma.e.setT(par);
-                        break;
-                    case "T_i":
-                        this.plasma.i.setT(par);
-                        break;
-                    case "T_r":
-                        this.plasma.r.setT(par);
-                        break;
-                    case "T_i,r":
-                        this.plasma.i.setT(par);
-                        this.plasma.r.setT(par);
-                        break;
-                    case "T":
-                        this.plasma.e.setT(par);
-                        this.plasma.i.setT(par);
-                        this.plasma.r.setT(par);
-                        break;
-                    case "P_r":
-                        this.plasma.P_r = par;
-                        this.updatePlasmaParameters();
-                        break;
-                    case "B":
-                        this.plasma.B = par;
-                        break;
-                    }
-                    
-                    var value = scale*this.evaluateEntityValue(entity, s1, s2);
-                    
-                    if (first) {
-                        wymin = value;
-                        wymax = value;
-                        first = false;
-                    } else {
-                        if (value < wymin) {
-                            wymin = value;
-                        }
-                        if (value > wymax) {
-                            wymax = value;
-                        }
-                    }
-                    
-                    ydata.push(value);
-                }
-                set.x = xdata;
-                set.y = ydata;
-                set.legend = vname;
-                set.color = fav.color;
-                this.sets.push(set);
-            }
-            
-            // Restore parameter
-            switch (pname) {
-            case "N_e":
-                this.plasma.e.setN(par0);
-                this.updatePlasmaParameters();
-                break;
-            case "T_e":
-                this.plasma.e.setT(par0);
-                break;
-            case "T_i":
-                this.plasma.i.setT(par0);
-                break;
-            case "T_r":
-                this.plasma.r.setT(par0);
-                break;
-            case "T_i,r":
-                this.plasma.i.setT(par0);
-                this.plasma.r.setT(par0);
-                break;
-            case "T":
-                this.plasma.e.setT(par0);
-                this.plasma.i.setT(par0);
-                this.plasma.r.setT(par0);
-                break;
-            case "P_r":
-                this.plasma.P_r = par0;
-                this.updatePlasmaParameters();
-                break;
-            case "B":
-                this.plasma.B = par0;
-                break;
-            }
-            
-            canvas.clear();
-            
-            canvas.setViewportCoordinates(0.15, 0.1, 0.9, 0.9);
-            var dwx = Math.abs(wxmax - wxmin);
-            if (dwx == 0) {
-                dwx = wxmax;
-            }
-            var dwy = Math.abs(wymax - wymin);
-            if (dwy == 0) {
-                wymin = 0.0;
-                if (wymax == 0) {
-                    wymax = 1.0;
-                } else {
-                    wymax *= 2;
-                }
-            }
-            
-            // If Y max & min of the same sign and differ significantly, set
-            // the smallest (by abs value) limit to 0
-            var wymin_r, wymax_r;
-            if (wymin > 0 && wymax/wymin > 3) {
-                wymin_r = 0;
-                wymax_r = wymax + 0.05*dwy;
-            } else
-            if (wymax < 0 && wymin/wymax > 3) {
-                wymin_r = wymin - 0.05*dwy
-                wymax_r = 0;
-            } else {
-                wymin_r = wymin < 0 ?
-                    (wymin - 0.05*dwy) : Math.max(0, wymin - 0.05*dwy);
-                wymax_r = wymax + 0.05*dwy;
-            }
-            
-            var wxmin_r =
-                wxmin < 0 ? (wxmin - 0.05*dwx) : Math.max(0, wxmin - 0.05*dwx);
-            canvas.setWorldCoordinates(wxmin_r, wymin_r,
-                wxmax + 0.05*dwx, wymax_r);
-            
-            // Draw frame
-            canvas.setStroke(1);
-            canvas.drawFrame("black");
-
-            // Mark initial value of the varied parameter
-            canvas.setColor("#c0c0c0");
-            canvas.setStroke(-1);
-            canvas.drawPolyLineW([par0*au_f, par0*au_f], [wymin_r, wymax_r]);
-            
-            // Draw title
-            canvas.drawTitle(this.prefs.currentConfigName, "black");
-            
-            // Draw axis ticks
-            canvas.setStroke(1);
-            canvas.drawTicks("x", "blue");
-            canvas.drawTicks("y", "blue");
-
-            // Draw axis labels
-            canvas.drawLabel("x", xlabel, "black");
-            canvas.drawLabel("y", ylabel, "black");
-            
-            // Draw sets
-            canvas.setStroke(2);
-            for (var i = 0; i < this.sets.length; i++) {
-                var set = this.sets[i];
-                canvas.setColor(set.color);
-                canvas.drawPolyLineW(set.x, set.y);
-            }
-            
-            canvas.paint();
-        },
-
-        showWikiPage : function(entity)
-        {
-            var url = "about:blank";
-            if (entity && entity.wikiLink) {
-                url = "https://en.m.wikipedia.org/wiki/" + entity.wikiLink;
-            }
-            
-            this.gui_wiki.setCursor("wait");
-            this.gui_wiki.setSource(url);
-        },
-        
-        loadWikiCB : function(ev)
-        {
-            var tree = this.entity_tree;
-            var leaf = getSingleTreeSelectedItem(tree);
-            
-            if (!leaf) {
-                return;
-            }
-            
-            var entity = leaf.getUserData("entity");
-            
-            this.showWikiPage(entity);
-        },
-        
-        drawCB : function(ev)
-        {
-            this.drawAll();
-        },
-        
-        exportSet : function(set)
-        {
-            var str = "";
-            
-            str += "# legend: " + set.legend + "\n";
-            str += "# color: "  + set.color + "\n";
-
-            var xdata = set.x;
-            var ydata = set.y;
-            var slen  = xdata.length;
-
-            for (var j = 0; j < slen; j++) {
-                str += pf.util.Format.sprintf("%.6e\t%.6e\n",
-                    xdata[j], ydata[j]);
-            }
-            
-            return str;
-        },
-
-        exportDataCB : function(ev)
-        {
-            if (!this.sets || !this.sets.length) {
-                return false;
-            }
-            
-            var str = "";
-            for (var i = 0; i < this.sets.length; i++) {
-                str += this.exportSet(this.sets[i]);
-                
-                if (i < this.sets.length - 1) {
-                    str += "\n";
-                }
-            }
-            
-            var w = this.dataExportWindow;
-
-            var text_area = w.textArea;
-            
-            text_area.setValue(str);
-
-            w.open();
-        },
-        
-        renderPlotTab : function()
-        {
-            var page_id = this.renderTabPage("Plot",
-                "pf/image/tab-plot.png");
-            page_id.setLayout(new qx.ui.layout.VBox);
-
-            var sp = new qx.ui.splitpane.Pane("horizontal");
-            sp.setDecorator("main");
-            page_id.add(sp, {height: "100%"});
-                        
-            var left_pane = new qx.ui.container.Composite(new qx.ui.layout.Grow);
-            var right_pane = new qx.ui.container.Composite(new qx.ui.layout.VBox(4)).set({
-              padding : 4
-            });
-
-            sp.add(left_pane,  2);
-            sp.add(right_pane, 1);
-            
-            var canvas = new pf.ui.canvas.Plotter();
-            left_pane.add(canvas);
-            this.canvas = canvas;
-
-            var layout = new qx.ui.layout.Grid(4, 6);
-            layout.setColumnFlex(0, 1);
-            layout.setColumnFlex(1, 1);
-            var gl = new qx.ui.container.Composite(layout);
-
-            var l, e;
-
-            var btn = new qx.ui.form.Button("Redraw", "pf/image/tab-plot.png");
-            btn.addListener("execute", this.drawCB, this);
-            gl.add(btn, {row: 0, column: 0});
-
-            var btn = new qx.ui.form.Button("Export Data",
-                "pf/image/export.png");
-            btn.addListener("execute", this.exportDataCB, this);
-            gl.add(btn, {row: 0, column: 1});
-
-            l = new qx.ui.basic.Label("Parameter to vary:");
-            e = new pf.ui.SelectBox;
-            e.addItem("N<sub>e</sub>",   "N_e", true);
-            e.addItem("T",               "T");
-            e.addItem("T<sub>e</sub>",   "T_e", true);
-            e.addItem("T<sub>i</sub>",   "T_i", true);
-            e.addItem("T<sub>r</sub>",   "T_r", true);
-            e.addItem("T<sub>i,r</sub>", "T_i,r", true);
-            e.addItem("P<sub>r</sub>",   "P_r", true);
-            e.addItem("B",               "B");
-            e.selectByValue("N_e");
-            this.guiParameter = e;
-            gl.add(l, {row: 1, column: 0});
-            gl.add(e, {row: 1, column: 1});
-
-            l = new qx.ui.basic.Label("Minimum scale:");
-            e = new pf.ui.TextField(0.5);
-            this.guiMinParam = e;
-            gl.add(l, {row: 2, column: 0});
-            gl.add(e, {row: 2, column: 1});
-
-            l = new qx.ui.basic.Label("Maximum scale:");
-            e = new pf.ui.TextField(2.0);
-            this.guiMaxParam = e;
-            gl.add(l, {row: 3, column: 0});
-            gl.add(e, {row: 3, column: 1});
-
-            l = new qx.ui.basic.Label("Number of points:");
-            e = new qx.ui.form.Spinner(2, 20, 100);
-            this.guiParamPoints = e;
-            gl.add(l, {row: 4, column: 0});
-            gl.add(e, {row: 4, column: 1});
-
-            right_pane.add(gl);
+  extend : qx.application.Gui,
 
 
 
-            var tm = new qx.ui.table.model.Simple();
-            tm.setColumns(["", "Name", "Favorite"],
-                          ["color", "name", "favorite"]);
-            
-            tm.setColumnEditable(0, false);
-            tm.setColumnEditable(1, false);
-            
-            tm.setColumnSortable(0, false);
-            
-            // table list
-            var lv = new qx.ui.table.Table(tm);
 
-            var cm = lv.getTableColumnModel();
-            cm.setColumnVisible(2, false);
-            
-            lv.setStatusBarVisible(false);
-            lv.setShowCellFocusIndicator(false);
-            lv.setColumnVisibilityButtonVisible(false);
-            
-            lv.setColumnWidth(0,  22);
-            lv.setColumnWidth(1, 220);
-            
-            var renderer = new pf.ui.table.cellrenderer.BgColor();
-            lv.getTableColumnModel().setDataCellRenderer(0, renderer);
+  /*
+  *****************************************************************************
+     MEMBERS
+  *****************************************************************************
+  */
 
-            right_pane.add(lv, {flex: 1});
-            this.legendListView = lv;
-            
-            var sm = lv.getSelectionModel();
-            
-            lv.addListener("dbltap", function(ev) {
-                    ev.stopPropagation();
+  members :
+  {
+    /**
+     * TODOC
+     *
+     * @type member
+     * @param e {Event} TODOC
+     * @return {void}
+     */
+    main : function(e)
+    {
+      this.base(arguments);
 
-                    if (sm.isSelectionEmpty()) {
-                        return;
-                    }
-                    
-                    var index = sm.getLeadSelectionIndex();
-                    var item = tm.getRowDataAsMap(index);
+      // Define alias for custom resource path
+      qx.io.Alias.getInstance().add("pf", qx.core.Setting.get("pf.resourceUri"));
 
-                    var favorite = item.favorite;
-                    if (!favorite) {
-                        return;
-                    }
-                    cpop.setUserData("favorite", null); // avoid loop call
-                    cpop.setValue(favorite.color);
-                    cpop.setUserData("favorite", favorite);
-                    
-                    cpop.placeToPointer(ev);
-                    cpop.open();
-                });
+      // Create button
+      var button1 = new qx.ui.form.Button("First Button", "pf/image/test.png");
 
-            var cpop = new pf.ui.ColorPopup(this.colorMap);
-            cpop.exclude();
+      // Set button location
+      button1.setTop(50);
+      button1.setLeft(50);
 
-            this.doc.add(cpop);
+      // Add button to document
+      button1.addToDocument();
 
-            cpop.addListener("changeValue", function(ev) {
-                    var color = ev.getData();
-                    var cpop = ev.getTarget();
-                    var favorite = cpop.getUserData("favorite");
-                    if (!favorite || !color) {
-                        return;
-                    }
-                    favorite.color = color;
-                    this.updateLegendListView();
-                    this.drawAll();
-                    this.saveFavorites();
-                }, this);
-        
-            // drawAll is an expensive operation, so call it only when
-            // this tab is selected
-            this.tabview.addListener("changeSelection", function(ev) {
-                    if (ev.getData()[0] == page_id) {
-                        this.drawAll();
-                    }
-                }, this);
-        },
+      // Attach a tooltip
+      button1.setToolTip(new qx.ui.popup.ToolTip("A nice tooltip", "icon/32/status/dialog-information.png"));
+
+      // Add an event listener
+      button1.addEventListener("execute", function(e) {
+        alert("Hello World!");
+      });
+    },
 
 
-        aboutCB : function(ev)
-        {
-            this.aboutWindow.open();
-        },
-        
-        prefsCB : function(ev)
-        {
-            this.prefsWindow.open();
-        },
-        
-        updateSaveLoadList : function()
-        {
-            var lv = this.saveLoadConfigList;
-            var tm = lv.getTableModel();
-            
-            var configPtrs = this.prefs.configPtrs;
-            
-            var rowData = new Array();
+    /**
+     * TODOC
+     *
+     * @type member
+     * @param e {Event} TODOC
+     * @return {void}
+     */
+    close : function(e)
+    {
+      this.base(arguments);
 
-            var i;
-            var d = new Date();
-            var df = new qx.util.format.DateFormat("yyyy-MM-dd HH:mm:ss");
-            
-            for (i = 0; i < configPtrs.length; i++) {
-                var configPtr = configPtrs[i];
-
-                d.setTime(configPtr.time);
-
-                rowData.push([configPtr.name, df.format(d)]);
-            }
-            
-            tm.setData(rowData, false);
-            var sidx = tm.getSortColumnIndex();
-            tm.sortByColumn(sidx, tm.isSortAscending());
-            
-            lv.updateContent();
-        },
-        
-        saveAsCB : function(ev)
-        {
-            var w = this.saveLoadWindow;
-            
-            this.updateSaveLoadList();
-            this.saveLoadTextField.setValue(null);
-            this.saveLoadTextField.setReadOnly(false);
-            
-            w.setCaption("Save configuration")
-            w.setIcon("pf/image/save.png");
-            w.setUserData("type", "save");
-            
-            w.open();
-        },
-        
-        saveConfigCB : function(ev)
-        {
-            if (this.prefs.currentConfigName &&
-                this.prefs.currentConfigName != "Untitled") {
-                if (this.saveConfig(this.prefs.currentConfigName) != true) {
-                    this.msgWindow.error("Save failed!");
-                }
-            } else {
-                this.saveAsCB(ev);
-            }
-        },
-        
-        openCB : function(ev)
-        {
-            var w = this.saveLoadWindow;
-            
-            this.updateSaveLoadList();
-            this.saveLoadTextField.setValue(null);
-            this.saveLoadTextField.setReadOnly(true);
-            
-            w.setCaption("Open configuration")
-            w.setIcon("pf/image/open.png");
-            w.setUserData("type", "open");
-            
-            w.open();
-        },
-        
-        restart : function(force)
-        {
-            if (force || this.intendedExit || !this.prefs.warnOnExit) {
-                location.reload(true);
-            } else {
-                this.confirmDialog.confirm("Restart Plasma Formulary?",
-                    function(yesno) {
-                            if (yesno) {
-                                this.intendedExit = true;
-                                this.restart(true);
-                            }
-                        }, this);
-            }
-        },
-        
-        quit : function(force)
-        {
-            if (force || this.intendedExit || !this.prefs.warnOnExit) {
-                window.close(true);
-            } else {
-                this.confirmDialog.confirm("Quit Plasma Formulary?",
-                    function(yesno) {
-                            if (yesno) {
-                                this.intendedExit = true;
-                                this.quit(true);
-                            }
-                        }, this);
-            }
-        },
-        
-        buildMenu : function()
-        {
-            var menubar = this.menubar;
-            
-            var submenu, btn, qc;
-
-            submenu = new qx.ui.menu.Menu;
-            this.doc.add(submenu);
-            qc = new qx.ui.command.Command("Ctrl+O");
-            qc.addListener("execute", this.openCB, this);
-            btn = new qx.ui.menu.Button("Open...", "pf/image/open.png", qc);
-            submenu.add(btn);
-            qc = new qx.ui.command.Command("Ctrl+S");
-            qc.addListener("execute", this.saveConfigCB, this);
-            btn = new qx.ui.menu.Button("Save", "pf/image/save.png", qc);
-            submenu.add(btn);
-            btn = new qx.ui.menu.Button("Save as...", "pf/image/save.png");
-            btn.addListener("execute", this.saveAsCB, this);
-            submenu.add(btn);
-            submenu.add(new qx.ui.menu.Separator);
-            qc = new qx.ui.command.Command("Ctrl+P");
-            qc.addListener("execute", function(ev) {
-                window.print();
-            });
-            btn = new qx.ui.menu.Button("Print...", "pf/image/print.png", qc);
-            submenu.add(btn);
-            submenu.add(new qx.ui.menu.Separator);
-            qc = new qx.ui.command.Command("Ctrl+R");
-            qc.addListener("execute", function(ev) {
-                    this.restart(false);
-                }, this);
-            btn = new qx.ui.menu.Button("Restart", "pf/image/reset.png", qc);
-            submenu.add(btn);
-            submenu.add(new qx.ui.menu.Separator);
-            qc = new qx.ui.command.Command("Ctrl+Q");
-            qc.addListener("execute", function(ev) {
-                    this.quit(false);
-                }, this);
-            btn = new qx.ui.menu.Button("Quit", "pf/image/exit.png", qc);
-            submenu.add(btn);
-                
-            btn = new qx.ui.menubar.Button("File", null, submenu);
-            menubar.add(btn);
+      // Prompt user
+      // return "qooxdoo application: Do you really want to close the application?";
+    },
 
 
-            submenu = new qx.ui.menu.Menu;
-            submenu.addListener("appear", editMenuCB, this);
-            this.doc.add(submenu);
-            btn = new qx.ui.menu.Button("Add to Favorites",
-                "pf/image/favorite-add.png");
-            btn.addListener("execute", addToFavCB, this);
-            this.editMenuButtonAddToFav = btn;
-            submenu.add(btn);
-            btn = new qx.ui.menu.Button("Remove from Favorites",
-                "pf/image/favorite-delete.png");
-            btn.addListener("execute", removeFromFavCB, this);
-            this.editMenuButtonRemFromFav = btn;
-            submenu.add(btn);
-            submenu.add(new qx.ui.menu.Separator);
-            btn = new qx.ui.menu.Button("Preferences",
-                "pf/image/preferences.png");
-            btn.addListener("execute", this.prefsCB, this);
-            submenu.add(btn);
-
-            btn = new qx.ui.menubar.Button("Edit", null, submenu);
-            menubar.add(btn);
+    /**
+     * TODOC
+     *
+     * @type member
+     * @param e {Event} TODOC
+     * @return {void}
+     */
+    terminate : function(e) {
+      this.base(arguments);
+    }
+  },
 
 
-            submenu = new qx.ui.menu.Menu;
-            submenu.addListener("appear", viewMenuCB, this);
-
-            var subMenu1 = new qx.ui.menu.Menu;
-            btn = new qx.ui.menu.CheckBox("Fundamental");
-            btn.setValue(this.showFundamental);
-            btn.addListener("execute", showFundamentalCB, this);
-            subMenu1.add(btn);
-            btn = new qx.ui.menu.CheckBox("Spectroscopy");
-            btn.setValue(this.showSpectroscopy);
-            btn.addListener("execute", showSpectroscopyCB, this);
-            subMenu1.add(btn);
-            btn = new qx.ui.menu.CheckBox("Waves");
-            btn.setValue(this.showWaves);
-            btn.addListener("execute", showWavesCB, this);
-            subMenu1.add(btn);
-            btn = new qx.ui.menu.CheckBox("Collisions");
-            btn.setValue(this.showCollisions);
-            btn.addListener("execute", showCollisionsCB, this);
-            subMenu1.add(btn);
-            btn = new qx.ui.menu.CheckBox("Radiation");
-            btn.setValue(this.showRadiation);
-            btn.addListener("execute", showRadiationCB, this);
-            subMenu1.add(btn);
-            this.showSectionsButton = new qx.ui.menu.Button("Show Sections",
-                null, null, subMenu1);
-            submenu.add(this.showSectionsButton);
-            
-            submenu.add(new qx.ui.menu.Separator);
-
-            var subMenu2 = new qx.ui.menu.Menu;
-            btn = new qx.ui.menu.CheckBox("Electrons");
-            btn.setValue(this.showElectrons);
-            btn.addListener("execute", showElectronsCB, this);
-            subMenu2.add(btn);
-            btn = new qx.ui.menu.CheckBox("Ions");
-            btn.setValue(this.showIons);
-            btn.addListener("execute", showIonsCB, this);
-            subMenu2.add(btn);
-            btn = new qx.ui.menu.CheckBox("Radiators");
-            btn.setValue(this.showRadiators);
-            btn.addListener("execute", showRadiatorsCB, this);
-            subMenu2.add(btn);
-            this.showSpeciesButton = new qx.ui.menu.Button("Show Species",
-                null, null, subMenu2);
-            submenu.add(this.showSpeciesButton);
-            
-            submenu.add(new qx.ui.menu.Separator);
-            qc = new qx.ui.command.Command("Alt+W");
-            qc.addListener("execute", this.loadWikiCB, this);
-            btn = new qx.ui.menu.Button("Load Wikipedia Article",
-                "pf/image/wikipedia.png", qc);
-            submenu.add(btn);
-            this.loadWikiButton = btn;
-            this.doc.add(submenu);
-            this.doc.add(subMenu1);
-            this.doc.add(subMenu2);
-
-            submenu.add(new qx.ui.menu.Separator);
-            qc = new qx.ui.command.Command("Ctrl+L");
-            qc.addListener("execute", this.drawCB, this);
-            btn = new qx.ui.menu.Button("Redraw Plot",
-                "pf/image/tab-plot.png", qc);
-            submenu.add(btn);
-            this.redrawButton = btn;
-            
-            
-            btn = new qx.ui.menubar.Button("View", null, submenu);
-            menubar.add(btn);
 
 
-            var nvOptions = {
-                scrollbars : true,
-                resizable : true,
-                menubar : false,
-                status : false
-            };
-            submenu = new qx.ui.menu.Menu;
-            this.doc.add(submenu);
-            qc = new qx.ui.command.Command("F1");
-            qc.addListener("execute", function(ev) {
-                    var url = "resource/pf/html/ug.html";
-                    var w = qx.bom.Window.open(url, null, nvOptions);
-                }, this);
-            btn = new qx.ui.menu.Button("Help Contents",
-                "pf/image/help.png", qc);
-            submenu.add(btn);
-            btn = new qx.ui.menu.Button("Reference Paper",
-                "pf/image/jinst.png");
-            btn.addListener("execute", function (ev) {
-                    var url = "https://dx.doi.org/10.1088/1748-0221/6/10/P10009";
-                    var w = qx.bom.Window.open(url, null, nvOptions);
-                }, this);
-            submenu.add(btn);
-            submenu.add(new qx.ui.menu.Separator);
-            btn = new qx.ui.menu.Button("NRL Plasma Formulary",
-                "pf/image/nrl.png");
-            btn.addListener("execute", function (ev) {
-                    var url = "https://www.nrl.navy.mil/News-Media/Publications/NRL-Plasma-Formulary/";
-                    var w = qx.bom.Window.open(url, null, nvOptions);
-                }, this);
-            submenu.add(btn);
-            btn = new qx.ui.menu.Button("Plasma at Wikipedia",
-                "pf/image/wikipedia.png");
-            btn.addListener("execute", function (ev) {
-                    var url = "https://en.wikipedia.org/wiki/Plasma_%28physics%29";
-                    var w = qx.bom.Window.open(url, null, nvOptions);
-                }, this);
-            submenu.add(btn);
-            submenu.add(new qx.ui.menu.Separator);
-            btn = new qx.ui.menu.Button("License Terms",
-                "pf/image/gnu.png");
-            btn.addListener("execute", function (ev) {
-                    var url = "resource/pf/html/GPL.html";
-                    var w = qx.bom.Window.open(url, null, nvOptions);
-                }, this);
-            submenu.add(btn);
-            btn = new qx.ui.menu.Button("About...",
-                "pf/image/about.png");
-            btn.addListener("execute", this.aboutCB, this);
-            submenu.add(btn);
+  /*
+  *****************************************************************************
+     SETTINGS
+  *****************************************************************************
+  */
 
-            btn = new qx.ui.menubar.Button("Help", null, submenu);
-            menubar.add(btn);
-        },
-        
-        getEntityById : function(id)
-        {
-            var len = plasma_entities.length;
-            
-            for (var i = 0; i < len; i++) {
-                var entity = plasma_entities[i];
-                if (entity.id == id) {
-                    return entity;
-                }
-            }
-            
-            return null;
-        },
-        
-        getSpeciesById : function(id)
-        {
-            switch (id) {
-            case "e":
-                return this.plasma.e;
-                break;
-            case "i":
-                return this.plasma.i;
-                break;
-            case "r":
-                return this.plasma.r;
-                break;
-            default:
-                return null;
-                break;
-            }
-        },
-        
-        nextColor : function()
-        {
-            var color = this.colorMap[this.ncolor];
-            this.ncolor++;
-            if (this.ncolor == this.colorMap.length) {
-                this.ncolor = 0;
-            }
-            
-            return color;
-        },
-
-        exportFavorites : function()
-        {
-            var sfavs = new Array;
-            var len = this.favorites.length;
-            
-            for (var k = 0; k < len; k++) {
-                var fav  = this.favorites[k];
-                var sfav = new Object;
-                sfav.entity_id  = fav.entity.id;
-                if (fav.s1) {
-                    sfav.s1_id = fav.s1.id;
-                } else {
-                    sfav.s1_id = null;
-                }
-                if (fav.s2) {
-                    sfav.s2_id = fav.s2.id;
-                } else {
-                    sfav.s2_id = null;
-                }
-                sfav.color     = fav.color;
-                sfavs.push(sfav);
-            }
-            
-            return sfavs;
-        },
-
-        importFavorites : function(sfavs)
-        {
-            if (!sfavs) {
-                return false;
-            }
-
-            this.favorites = new Array;
-            
-            var len = sfavs.length;
-            for (var k = 0; k < len; k++) {
-                var sfav = sfavs[k];
-                var fav  = new Object;
-                fav.entity = this.getEntityById(sfav.entity_id);
-                // old format
-                if (sfav.species_id) {
-                    fav.s1 = this.getSpeciesById(sfav.species_id);
-                } else
-                if (sfav.s1_id) {
-                    fav.s1 = this.getSpeciesById(sfav.s1_id);
-                }
-
-                if (sfav.s2_id) {
-                    fav.s2 = this.getSpeciesById(sfav.s2_id);
-                }
-                fav.color = sfav.color;
-
-                if (fav.entity && fav.color) {
-                    this.favorites.push(fav);
-                }
-            }
-            
-            return true;
-        },
-
-        getConfig : function(name)
-        {
-            if (!name) {
-                return null;
-            }
-
-            var configPtrs = this.prefs.configPtrs;
-            
-            var i, configPtr = null;
-            for (i = 0; i < configPtrs.length; i++) {
-                if (configPtrs[i].name == name) {
-                    configPtr = configPtrs[i];
-                    return configPtr;
-                    break;
-                }
-            }
-            
-            return null;
-        },
-        
-        savePreferences : function()
-        {
-            if (this.prefs) {
-                var storage = qx.bom.storage.Web.getLocal();
-                storage.setItem("pf_prefs", this.prefs);
-            }
-        },
-        
-        loadPreferences : function()
-        {
-            var storage = qx.bom.storage.Web.getLocal();
-            this.prefs = storage.getItem("pf_prefs");
-
-            if (!this.prefs) {
-                this.prefs = new Object;
-            }
- 
-            if (undefined === this.prefs.saveFavsWithConfig) {
-                this.prefs.saveFavsWithConfig = true;
-            }
-            
-            if (undefined === this.prefs.rememberWindowSize) {
-                this.prefs.rememberWindowSize = false;
-            }
-
-            if (undefined === this.prefs.autoLoadWiki) {
-                this.prefs.autoLoadWiki = true;
-            }
-            
-            if (undefined === this.prefs.warnOnExit) {
-                this.prefs.warnOnExit = true;
-            }
-            
-            if (!this.prefs.units) {
-                this.prefs.units = new Object;
-            }
-            
-            if (!this.prefs.currentConfigName) {
-                this.prefs.currentConfigName = "Untitled";
-            }
-            
-            if (!this.prefs.configPtrs) {
-                this.prefs.configPtrs = new Array;
-            }
-        },
-        
-        saveFavorites : function()
-        {
-            var sfavs = this.exportFavorites();
-
-            var storage = qx.bom.storage.Web.getLocal();
-            storage.setItem("pf_favs", sfavs);
-        },
-        
-        loadFavorites : function()
-        {
-            this.favorites = new Array;
-
-            var storage = qx.bom.storage.Web.getLocal();
-            var sfavs = storage.getItem("pf_favs");
-            
-            if (sfavs) {
-                this.importFavorites(sfavs);
-            }
-        },
-        
-        saveConfig : function(name)
-        {
-            if (!name) {
-                return false;
-            }
-
-            var configPtr = this.getConfig(name);
-            
-            var d = new Date();
-            var time = d.getTime();
-            
-            if (!configPtr) {
-                configPtr = new Object;
-                configPtr.name = name;
-                configPtr.hash = time;
-                this.prefs.configPtrs.push(configPtr);
-            }
-            
-            configPtr.time = time;
-            
-            var item_name = "pf_config_" + configPtr.hash;
-            
-            var config = new Object;
-            
-            // version of config format
-            config.format_v = 1;
-            
-            config.N_e = this.plasma.e.getN();
-
-            config.T_e = this.plasma.e.getT();
-            config.T_i = this.plasma.i.getT();
-            config.T_r = this.plasma.r.getT();
-
-            config.M_i = this.plasma.i.getM();
-            config.M_r = this.plasma.r.getM();
-            
-            config.Q_i = this.plasma.i.getQ();
-            config.Q_r = this.plasma.r.getQ();
-
-            config.P_r = this.plasma.P_r;
-
-            config.B   = this.plasma.B  ;
-
-            config.n_u = this.plasma.r.getN_u();
-            config.n_l = this.plasma.r.getN_l();
-            
-            if (this.prefs.saveFavsWithConfig) {
-                config.favorites = this.exportFavorites();
-            }
-
-            var storage = qx.bom.storage.Web.getLocal();
-            storage.setItem(item_name, config);
-            
-            this.prefs.currentConfigName = name;
-            this.savePreferences();
-            
-            return true;
-        },
-        
-        loadConfig : function(name)
-        {
-            var configPtr = this.getConfig(name);
-            if (!configPtr) {
-                return false;
-            }
-
-            var item_name = "pf_config_" + configPtr.hash;
-
-            var storage = qx.bom.storage.Web.getLocal();
-            var config = storage.getItem(item_name);
-
-            if (!config) {
-                // Data deleted???
-                qx.lang.Array.remove(this.prefs.configPtrs, configPtr);
-                return false;
-            } else {
-                var au_fn, au_fT, au_fM, au_fB;
-                if (!config.format_v) {
-                    // old format, rescale data
-                    au_fn = pf.base.Bohr.n0;
-                    au_fT = pf.base.Bohr.E0;
-                    au_fM = 1/pf.base.Bohr.m_p;
-                    au_fB = pf.base.Bohr.B0;
-                } else {
-                    au_fn = 1;
-                    au_fT = 1;
-                    au_fM = 1;
-                    au_fB = 1;
-                }
-                
-                this.plasma.e.setN(config.N_e/au_fn);
-
-                this.plasma.e.setT(config.T_e/au_fT);
-                this.plasma.i.setT(config.T_i/au_fT);
-                this.plasma.r.setT(config.T_r/au_fT);
-
-                this.plasma.i.setM(config.M_i/au_fM);
-                this.plasma.r.setM(config.M_r/au_fM);
-
-                this.plasma.i.setQ(config.Q_i);
-                this.plasma.r.setQ(config.Q_r);
-
-                this.plasma.P_r = config.P_r;
-
-                this.plasma.B   = config.B/au_fB;
-
-                this.plasma.r.setN_u(config.n_u);
-                this.plasma.r.setN_l(config.n_l);
-                
-                if (this.prefs.saveFavsWithConfig && config.favorites) {
-                    this.importFavorites(config.favorites);
-                }
-
-                this.prefs.currentConfigName = name;
-                
-                this.savePreferences();
-
-                return true;
-            }
-        },
-        
-        removeConfig : function(name)
-        {
-            var configPtr = this.getConfig(name);
-            if (configPtr) {
-
-                var storage = qx.bom.storage.Web.getLocal();
-
-                qx.lang.Array.remove(this.prefs.configPtrs, configPtr);
-                var item_name = "pf_config_" + configPtr.hash;
-                storage.removeItem(item_name);
-                this.savePreferences();
-            }
-        },
-        
-        renameConfig : function(oldname, newname)
-        {
-            var configPtr = this.getConfig(oldname);
-            if (configPtr) {
-                configPtr.name = newname;
-                this.savePreferences();
-            }
-        },
-        
-        createSaveLoadDialog : function()
-        {
-            var w, layout, rc1, e, btn;
-            // "Save as..." dialog
-            w = new pf.ui.DialogWindow();
-            w.setLayout(new qx.ui.layout.VBox(0));
-            w.setContentPadding(0);
-                
-            this.doc.add(w);
-            this.saveLoadWindow = w;
-
-            var tb = new qx.ui.toolbar.ToolBar();
-            var tbpart = new qx.ui.toolbar.Part();
-            var btn_delete = new qx.ui.toolbar.Button("Delete",
-                "pf/image/delete.png");
-            var btn_rename = new qx.ui.toolbar.Button("Rename",
-                "pf/image/rename.png");
-            var btn_export = new qx.ui.toolbar.Button("Export",
-                "pf/image/export.png");
-            var btn_import = new qx.ui.toolbar.Button("Import",
-                "pf/image/import.png");
-            btn_delete.setEnabled(false);
-            btn_rename.setEnabled(false);
-            btn_export.setEnabled(false);
-            tbpart.add(btn_delete);
-            tbpart.add(btn_rename);
-            tbpart.add(new qx.ui.toolbar.Separator());
-            tbpart.add(btn_export);
-            tbpart.add(btn_import);
-            tb.add(tbpart);
-            w.add(tb);
-
-            // table model
-            var tm = new qx.ui.table.model.Simple();
-            tm.setColumns([ "Configuration", "Last Modified" ]);
-            
-            tm.setColumnEditable(0, false);
-            tm.setColumnEditable(1, false);
-            
-            // table list
-            var lv = new qx.ui.table.Table(tm);
-            lv.set({
-                height: 250
-            });
-
-            lv.setStatusBarVisible(false);
-            lv.setShowCellFocusIndicator(false);
-            lv.setColumnVisibilityButtonVisible(false);
-            
-            lv.setColumnWidth(0, 250);
-            lv.setColumnWidth(1, 150);
-            
-            var renderer = new qx.ui.table.cellrenderer.Html();
-            lv.getTableColumnModel().setDataCellRenderer(0, renderer);
-            
-            this.saveLoadConfigList = lv;
-            w.add(lv);
-
-            var sm = lv.getSelectionModel();
-            sm.setSelectionMode(qx.ui.table.selection.Model.SINGLE_SELECTION);
-            
-            // Export/import window
-            var eiw = new pf.ui.DialogWindow();
-            eiw.set({
-                width:  350,
-                height: 400
-            });
-            eiw.setResizable(true);
-            eiw.setLayout(new qx.ui.layout.VBox(0));
-            eiw.setContentPadding(0);
-            
-            var note = new qx.ui.basic.Label("Label", {height: 20});
-            eiw.add(note);
-                
-            var text_area = new qx.ui.form.TextArea();
-            text_area.setWrap(true);
-            eiw.add(text_area, {flex: 1});
-
-
-            layout = new qx.ui.layout.HBox(10, "right");
-            rc1 = new qx.ui.container.Composite(layout);
-            rc1.setMargin(10, 10, 10, 10);
-            eiw.add(rc1);
-
-            btn = new qx.ui.form.Button("Cancel", "pf/image/cancel.png");
-            btn.addListener("execute", function(ev) {
-                    eiw.close();
-                }, this);
-            rc1.add(btn);
-
-            btn = new qx.ui.form.Button("OK", "pf/image/ok.png");
-            btn.addListener("execute", function(ev) {
-                    var type = eiw.getUserData("type");
-                    if (type == "import") {
-                        var configstr = text_area.getValue();
-                        
-                        var config;
-                        try {
-                            config = qx.lang.Json.parse(configstr);
-                        } catch (err) {
-                            this.error(err);
-                        }
-
-                        if (config) {
-                            var name = config.name;
-                            
-                            var d = new Date();
-                            var time = d.getTime();
-            
-                            var configPtr = new Object;
-                            configPtr.name = name;
-                            configPtr.hash = time;
-                            configPtr.time = time;
-                            
-                            this.prefs.configPtrs.push(configPtr);
-                            
-                            var item_name = "pf_config_" + configPtr.hash;
-
-                            var storage = qx.bom.storage.Web.getLocal();
-                            storage.setItem(item_name, config);
-                            
-                            this.savePreferences();
-                            this.updateSaveLoadList();
-                            
-                            eiw.close();
-                        } else {
-                            this.msgWindow.error("Cannot parse the configuration!");
-                        }
-                    } else {
-                        eiw.close();
-                    }
-                }, this);
-            rc1.add(btn);
-            
-            this.doc.add(eiw);
-
-            btn_delete.addListener("execute", function(ev) {
-                    if (!sm.isSelectionEmpty()) {
-                        var index = sm.getLeadSelectionIndex();
-                        var rowData = tm.getRowData(index);
-                        var name = rowData[0];
-                        if (name == this.prefs.currentConfigName) {
-                            this.msgWindow.error("Cannot delete current configuration!");
-                        } else {
-                            this.confirmDialog.confirm("Delete \"" + name + "\"?",
-                                function(yesno) {
-                                        if (yesno) {
-                                            this.removeConfig(name);
-                                            this.updateSaveLoadList();
-                                        }
-                                    }, this);
-                        }
-                    }
-                }, this);
-
-            btn_rename.addListener("execute", function(ev) {
-                    if (!sm.isSelectionEmpty()) {
-                        var index = sm.getLeadSelectionIndex();
-                        var rowData = tm.getRowData(index);
-                        var name = rowData[0];
-                        
-                        this.promptDialog.prompt("Rename \"" + name + "\" to",
-                            name, function(newname) {
-                                    if (newname  && newname != name) {
-                                        this.renameConfig(name, newname);
-                                        this.updateSaveLoadList();
-                                        if (name == this.prefs.currentConfigName) {
-                                            this.prefs.currentConfigName = newname;
-                                            this.gui_configName.setLabel(newname);
-                                        }
-                                        this.saveLoadTextField.setValue(newname);
-                                    }
-                                }, this);
-                    }
-                }, this);
-
-            btn_export.addListener("execute", function(ev) {
-                    if (!sm.isSelectionEmpty()) {
-                        var index = sm.getLeadSelectionIndex();
-                        var rowData = tm.getRowData(index);
-                        var name = rowData[0];
-                        
-                        var configPtr = this.getConfig(name);
-                        if (!configPtr) {
-                            return false;
-                        }
-
-                        var item_name = "pf_config_" + configPtr.hash;
-
-                        var storage = qx.bom.storage.Web.getLocal();
-                        var config = storage.getItem(item_name);
-
-                        if (!config) {
-                            return false;
-                        }
-
-                        config.name = name;
-
-                        text_area.setValue(
-                            qx.lang.Json.stringify(config, undefined, 4));
-                        
-                        eiw.setCaption("Export configuration")
-                        eiw.setIcon("pf/image/export.png");
-                        eiw.setUserData("type", "export");
-                        
-                        text_area.setReadOnly(true);
-                        
-                        var nstr =
-                            "Copy the contents below to a text editor and save";
-                        note.setValue(nstr);
-                        
-                        eiw.open();
-                    }
-                }, this);
-
-            btn_import.addListener("execute", function(ev) {
-                    eiw.setCaption("Import configuration")
-                    eiw.setIcon("pf/image/import.png");
-                    eiw.setUserData("type", "import");
-
-                    text_area.setReadOnly(false);
-                    text_area.setValue("");
-
-                    var nstr =
-                        "Copy a previously saved config to the space below";
-                    note.setValue(nstr);
-
-                    eiw.open();
-                }, this);
-
-            e = new qx.ui.form.TextField();
-            e.setMarginTop(1);
-            w.add(e);
-            this.saveLoadTextField = e;
-            
-            sm.addListener("changeSelection", function(ev) {
-                    if (sm.isSelectionEmpty()) {
-                        e.setValue(null);
-                        btn_delete.setEnabled(false);
-                        btn_rename.setEnabled(false);
-                        btn_export.setEnabled(false);
-                    } else {
-                        var index = sm.getLeadSelectionIndex();
-                        var rowData = tm.getRowData(index);
-                        e.setValue(rowData[0]);
-                        btn_rename.setEnabled(true);
-                        btn_delete.setEnabled(true);
-                        btn_export.setEnabled(true);
-                    }
-                });
-            
-            layout = new qx.ui.layout.HBox(10, "right");
-            rc1 = new qx.ui.container.Composite(layout);
-            rc1.setMargin(10, 10, 10, 10);
-            w.add(rc1);
-
-            btn = new qx.ui.form.Button("Cancel",
-                "pf/image/cancel.png");
-            btn.addListener("execute", function(ev) {
-                    this.saveLoadWindow.close();
-                }, this);
-            rc1.add(btn);
-
-            btn = new qx.ui.form.Button("OK",
-                "pf/image/ok.png");
-            btn.setEnabled(false);
-            btn.addListener("execute", function(ev) {
-                    var cfgname = this.saveLoadTextField.getValue(); 
-                    if (!cfgname) {
-                        this.msgWindow.error("Please enter a name!");
-                    } else {
-                        var type = w.getUserData("type");
-                        if (type == "save") {
-                            if (this.saveConfig(cfgname) == true) {
-                                this.saveLoadWindow.close();
-                                if (this.prefs.currentConfigName) {
-                                    this.gui_configName.setLabel(this.prefs.currentConfigName);
-                                }
-                            } else {
-                                this.msgWindow.error("Save failed!");
-                            }
-                        } else {
-                            if (this.loadConfig(cfgname) == true) {
-                                this.updatePlasmaParameters();
-                                this.updateGUI();
-                                if (this.prefs.saveFavsWithConfig) {
-                                    this.rePopulateTree();
-                                }
-                                this.drawAll();
-                                this.saveLoadWindow.close();
-                            } else {
-                                this.msgWindow.error("Load failed!");
-                            }
-                        }
-                    }
-                }, this);
-            rc1.add(btn);
-
-            e.setLiveUpdate(true);
-            e.addListener("changeValue", function(ev) {
-                    var name = this.getValue();
-                    btn.setEnabled(null != name && name.length != 0);
-                });
-        },
-
-        createPrefsDialog : function()
-        {
-            // "Preferences..." dialog
-            var w = new pf.ui.DialogWindow("Preferences",
-                "pf/image/preferences.png");
-            w.setLayout(new qx.ui.layout.VBox(10));
-
-            this.doc.add(w);
-            this.prefsWindow = w;
-            
-            var fr, l, e;
-
-            fr = new qx.ui.groupbox.GroupBox("General");
-            fr.setLayout(new qx.ui.layout.VBox(10));
-            w.add(fr);
-
-            e = new qx.ui.form.CheckBox("Save favorites with configurations");
-            e.setValue(this.prefs.saveFavsWithConfig);
-            e.addListener("changeValue", function(ev) {
-                this.prefs.saveFavsWithConfig = ev.getTarget().getValue();
-                this.savePreferences();
-            }, this);
-            fr.add(e);
-            
-            fr = new qx.ui.groupbox.GroupBox("Default units");
-            fr.setLayout(new qx.ui.layout.HBox(10));
-            w.add(fr);
-            
-            var unit_cb_enabled = false;
-            
-            l = new qx.ui.basic.Label("Dimension:");
-            e = new pf.ui.SelectBox;
-            e.addItem("Length", "length");
-            e.addItem("Frequency", "frequency");
-            e.addItem("Velocity", "velocity");
-            e.addItem("Energy", "energy");
-            e.addItem("Mass density", "mass_density");
-            e.addItem("Pressure", "pressure");
-            e.addItem("Area", "area");
-            e.addItem("Power density", "power_density");
-            e.addItem("Power spectral density", "spectral_power_density");
-            e.addItem("Electric field", "efield");
-            e.addListener("changeSelection", function(ev) {
-                    var dimension = ev.getTarget().getSelectedValue();
-                    unit_cb_enabled = false;
-                    this.gui_prefs_units.update(dimension,
-                        this.prefs.units[dimension]);
-                    unit_cb_enabled = true;
-                }, this);
-            fr.add(l);
-            fr.add(e);
-            this.gui_prefs_dim = e;
-
-            l = new qx.ui.basic.Label("Units:");
-            e = new pf.UnitSelector();
-            e.addListener("changeSelection", function(ev) {
-                    if (unit_cb_enabled) {
-                        var dimension = this.gui_prefs_dim.getSelectedValue();
-                        var units = ev.getTarget().getSelectedValue();
-                        this.prefs.units[dimension] = units;
-                        this.savePreferences();
-                    }
-                }, this);
-            fr.add(l);
-            fr.add(e);
-            e.update("length", this.prefs.units["length"]);
-            this.gui_prefs_units = e;
-            
-            unit_cb_enabled = true;
-
-            fr = new qx.ui.groupbox.GroupBox("Interface");
-            fr.setLayout(new qx.ui.layout.VBox(10));
-            w.add(fr);
-
-            e = new qx.ui.form.CheckBox("Load Wikipedia articles automatically");
-            e.setValue(this.prefs.autoLoadWiki);
-            e.addListener("changeValue", function(ev) {
-                this.prefs.autoLoadWiki = ev.getTarget().getValue();
-                this.savePreferences();
-            }, this);
-            fr.add(e);
-
-            e = new qx.ui.form.CheckBox("Remember window dimensions on exit");
-            e.setValue(this.prefs.rememberWindowSize);
-            e.addListener("changeValue", function(ev) {
-                this.prefs.rememberWindowSize = ev.getTarget().getValue();
-                this.savePreferences();
-            }, this);
-            fr.add(e);
-
-            e = new qx.ui.form.CheckBox("Warn on exit or restart");
-            e.setValue(this.prefs.warnOnExit);
-            e.addListener("changeValue", function(ev) {
-                this.prefs.warnOnExit = ev.getTarget().getValue();
-                this.savePreferences();
-            }, this);
-            fr.add(e);
-
-            fr = new qx.ui.groupbox.GroupBox("Theme");
-            fr.setLayout(new qx.ui.layout.VBox(10));
-            w.add(fr);
-            
-            var btn1 = new qx.ui.form.RadioButton("Modern");
-            btn1.setModel("modern");
-            var btn2 = new qx.ui.form.RadioButton("Classic");
-            btn2.setModel("classic");
-            var btn3 = new qx.ui.form.RadioButton("Simple");
-            btn3.setModel("simple");
-            var btn4 = new qx.ui.form.RadioButton("Indigo");
-            btn4.setModel("indigo");
-            
-            fr.add(btn1);
-            fr.add(btn2);
-            fr.add(btn3);
-            fr.add(btn4);
-            
-            var rm = new qx.ui.form.RadioGroup(btn1, btn2, btn3, btn4);
-            var sels;
-            switch (this.prefs.themeName) {
-            case "classic":
-                sels = new Array(btn2);
-                break;
-            case "simple":
-                sels = new Array(btn3);
-                break;
-            case "indigo":
-                sels = new Array(btn4);
-                break;
-            default:
-                sels = new Array(btn1);
-                break;
-            }
-            rm.setSelection(sels);
-            rm.addListener("changeSelection", function(ev) {
-                    var btn = ev.getData()[0];
-                    this.prefs.themeName = btn.getModel();
-                    this.savePreferences();
-                    
-                    this.applyTheme();
-                }, this);
-
-        },
-
-        createDataExportDialog : function()
-        {
-            // Data export window
-            var w = new pf.ui.DialogWindow();
-            w.set({
-                width:  350,
-                height: 400
-            });
-            w.setResizable(true);
-            w.setLayout(new qx.ui.layout.VBox(0));
-            w.setContentPadding(0);
-            
-            var nstr = "Copy the contents below to a text editor and save";
-            var note = new qx.ui.basic.Label(nstr, {height: 20});
-            w.add(note);
-                
-            var text_area = new qx.ui.form.TextArea();
-            text_area.setWrap(true);
-            text_area.setReadOnly(true);
-            
-            w.add(text_area, {flex: 1});
-
-            w.setCaption("Export plot data")
-            w.setIcon("pf/image/export.png");
-            
-            w.textArea = text_area;
-            
-            this.dataExportWindow = w;
-        },            
-
-        applyTheme : function()
-        {
-            var theme;
-            switch (this.prefs.themeName) {
-            case "classic":
-                theme = pf.theme.Classic;
-                break;
-            case "simple":
-                theme = qx.theme.Simple;
-                break;
-            case "indigo":
-                theme = qx.theme.Indigo;
-                break;
-            default:
-                theme = pf.theme.Modern;
-                break;
-            }
-            var thm = qx.theme.manager.Meta.getInstance();
-            thm.setTheme(theme);
-        },
-
-        main : function(e)
-        {
-            this.base(arguments);
-
-            // Enable logging in debug variant
-            if (qx.core.Environment.get("qx.debug")) {
-                // support native logging capabilities, e.g. Firebug
-                qx.log.appender.Native;
-                // support additional cross-browser console. (Press F7)
-                qx.log.appender.Console;
-            }
-            
-            this.doc = this.getRoot();
-            
-            // Load prefs
-            this.loadPreferences();
-            
-            // Apply theme
-            this.applyTheme();
-            
-            if (this.prefs.rememberWindowSize && this.prefs.dims) {
-                self.resizeTo(this.prefs.dims.width, this.prefs.dims.height);
-            }
-
-            this.plasma = new pf.Plasma();
-            
-            // Load config from the previous session
-            if (this.prefs.currentConfigName) {
-                this.loadConfig(this.prefs.currentConfigName);
-            }
-            
-            if (this.updatePlasmaParameters() != true) {
-                this.error("Error updating plasma parameters!");
-            }
-            
-            // Favorites
-            this.loadFavorites();
-            
-            this.colorMap = new Array("red", "blue", "green", "orange",
-                "brown", "olive", "teal", "magenta", "gray", "black");
-            this.ncolor = 0;
-
-            // Top-level container
-            var layout = new qx.ui.layout.VBox;
-            this.bl_top = new qx.ui.container.Composite(layout);
-
-            this.doc.add(this.bl_top, {width :"100%", height: "100%"});
-
-            // The menubar
-            this.menubar = new qx.ui.menubar.MenuBar;
-            this.bl_top.add(this.menubar);
-            
-            // The menu items
-            this.buildMenu();
-            
-            this.tabview = new qx.ui.tabview.TabView;
-            this.tabview.setContentPadding(6);
-            
-            this.bl_top.add(this.tabview, {flex: 1});
-            // The "Parameters" tab
-            this.renderParametersTab();
-            
-            // The "Explorer" tab
-            this.renderExplorerTab();
-            
-            // The "Compare" tab
-            this.renderCompareTab();
-            this.updateFavoritesListView();
-            
-            // The "Plot" tab
-            this.renderPlotTab();
-            this.updateLegendListView();
-            
-            // "Preferences" dialog
-            this.createPrefsDialog();
-
-            // "Save as" dialog
-            this.createSaveLoadDialog();
-
-            // Export data dialog
-            this.createDataExportDialog();
-
-            // "About..." dialog
-            var w = new pf.ui.DialogWindow("About Plasma Formulary",
-                "pf/image/about.png");
-            w.setLayout(new qx.ui.layout.VBox(10));
-
-            var pf_version = qx.core.Environment.get("pf.version");
-            var qx_version = qx.core.Environment.get("qx.version");
-            var str = 'Plasma Formulary Interactive '            +
-                      pf_version + '.<br/>'                      +
-                      '<p>Created by Evgeny Stambulchik.</p>'    +
-                      'GUI built with the qooxdoo-' + qx_version +
-                      ' toolkit.<br/>'                           + 
-                      'Using Walter Zorn jsGraphics for drawing.';
-
-            var a = new qx.ui.basic.Atom(str);
-            a.setRich(true);
-            w.add(a);
-
-            this.doc.add(w);
-            this.aboutWindow = w;
-            
-            this.msgWindow = new pf.ui.MessageWindow();
-            this.doc.add(this.msgWindow);
-            this.confirmDialog = new pf.ui.ConfirmDialog();
-            this.doc.add(this.confirmDialog);
-            this.promptDialog = new pf.ui.PromptDialog();
-            this.doc.add(this.promptDialog);
-            
-            // Handle resize events
-            this.doc.addListener("resize", function(e) {
-                if (this.prefs.rememberWindowSize) {
-                    this.prefs.dims = this.doc.getInnerSize();
-                    this.savePreferences();
-                }
-                this.drawAll();
-            }, this);
-        },
-    
-
-        close : function(e)
-        {
-            this.base(arguments);
-            
-            // Prompt user
-            if (this.prefs.warnOnExit && !this.intendedExit) {
-                return "This will end your Plasma Formulary session.";
-            }
-        }
-    }
+  settings : {
+    "pf.resourceUri" : "./resource"
+  }
 });
Index: urce/class/pf/Plasma.js
===================================================================
--- source/class/pf/Plasma.js	(revision 381)
+++ 	(revision )
@@ -1,456 +1,0 @@
-qx.Class.define("pf.Plasma",
-{
-    extend: qx.core.Object,
-    
-    members:
-    {
-        R0: 0.5, // 0.3/0.7/1 ?
-        
-        e: null,
-        i: null,
-        r: null,
-        P_r: 0,
-        B  : 0,
-        
-        getMicrofieldFrequency: function(s)
-        {
-            var r = s.getTypicalDistance();
-            var v_r = this.r.getThermalVelocity();
-            var v_s = s.getThermalVelocity();
-            var v = Math.sqrt(v_r*v_r + v_s*v_s);
-            
-            return v/r;
-        },
-        
-        getFullDebyeLength: function(s)
-        {
-            var tmp = 0;
-            var m = s.getM();
-            
-            var sa = new Array(this.e, this.i, this.r);
-            for (var i = 0; i < 3; i++) {
-                var os = sa[i];
-                if (os.getM() <= m) {
-                    var ld = os.getDebyeLength();
-                    if (ld) {
-                        tmp += 1/(ld*ld);
-                    }
-                }
-                
-            }
-            
-            return 1/Math.sqrt(tmp);
-        },
-        
-        getPpiFactor: function(s)
-        {
-            var dl = this.getFullDebyeLength(s);
-            var r1 = s.getTypicalDistance();
-            var r;
-            if (isFinite(dl) && isFinite(r1)) {
-                r = r1/dl;
-            } else {
-                r = 0;
-            }
-            
-            return (1 + r)*Math.exp(-r);
-            // return 1 - 0.6*r
-        },
-        
-        getRpiFactor: function(s)
-        {
-            var r1 = s.getTypicalDistance();
-            var q_r = this.r.getQ();
-            var q_s = s.getQ();
-            if (q_r == 0 || q_s == 0) {
-                return 1;
-            }
-             
-            var r_m = s.getMinApproachDistance()*q_r/q_s;
-            return Math.exp(-r_m/r1);
-        },
-        
-        getDelta0: function(s)
-        {
-            var n_u = this.r.getN_u();
-            var n_l = this.r.getN_l();
-            var Z_core = this.r.getZcore();
-            var ef = s.getHoltsmarkField();
-            
-            return 3/2*(n_u*n_u - n_l*n_l)/Z_core*ef;
-        },
-        
-        getQsHwhm: function(s)
-        {
-            var ppi = this.getPpiFactor(s);
-            var rpi = this.getRpiFactor(s);
-            
-            // 1.4385 is S_1 HWHM
-            var hwhm = 1.4385*this.getDelta0(s)*ppi*rpi;
-            
-            return hwhm;
-        },
-        
-        getDynHwhm: function(s)
-        {
-            // neglect dynamic PP effects
-            var ppi = 1.0;
-            // assume dynamic RP effect == static one
-            var rpi = this.getRpiFactor(s);
-
-            var fwhm = this.getMicrofieldFrequency(s)*ppi*rpi;
-            
-            return fwhm/2;
-        },
-        
-        getStarkRatio: function(s)
-        {
-            var R;
-            var w_qs = this.getQsHwhm(s);
-            if (w_qs == 0) {
-                R = 0;
-            } else {
-                var w_dyn = this.getDynHwhm(s);
-                R = w_qs/w_dyn;
-            }
-            
-            return R;
-        },
-        
-        getStarkQuasistaticity: function(s)
-        {
-            var R = this.getStarkRatio(s);
-            return R/(R + this.R0);
-        },
-        
-        getStarkHwhm: function(s)
-        {
-            var n_u = this.r.getN_u();
-            var n_l = this.r.getN_l();
-
-            var w_qs = this.getQsHwhm(s);
-            
-            // "rotational" model for delta-n = 1 and QC for anything else
-            if (n_u - n_l == 1) {
-                var R = this.getStarkRatio(s);
-                if (R != 0) {
-                    return w_qs/(2.0/R + R/1.2);
-                } else {
-                    return 0;
-                }
-            } else {
-                var f = this.getStarkQuasistaticity(s);
-
-                return f*w_qs;
-            }
-            
-        },
-        
-        getTotalStarkHwhm: function()
-        {
-            var n_u = this.r.getN_u();
-            var n_l = this.r.getN_l();
-
-            var w = 0;
-            
-            var sa = new Array(this.e, this.i, this.r);
-            for (var i = 0; i < 3; i++) {
-                var s = sa[i];
-                var w_s = this.getStarkHwhm(s);
-
-                if (n_u - n_l == 1) {
-                    w += w_s;
-                } else {
-                    w += Math.pow(w_s, 3/2);
-                }
-            }
-            
-            if (n_u - n_l == 1) {
-                return w;
-            } else {
-                return Math.pow(w, 2/3);
-            }
-        },
-        
-        getZeemanSplitting: function()
-        {
-            return pf.base.Bohr.mu_B*this.B;
-        },
-
-        getTotalFwhm: function()
-        {
-            var s_hwhm = this.getTotalStarkHwhm();
-            var z_hwhm = this.getZeemanSplitting();
-            var d_hwhm = this.r.getDopplerHwhm();
-            return 2*Math.sqrt(s_hwhm*s_hwhm + z_hwhm*z_hwhm + d_hwhm*d_hwhm);
-        },
-
-        getPPS: function()
-        {
-            var n_u = this.r.getN_u();
-            var n_l = this.r.getN_l();
-            var Z_core = this.r.getZcore();
-            var ld = this.e.getDebyeLength();
-            return -(Z_core - 1)/(2*Z_core)*(n_u*n_u - n_l*n_l)/(ld*ld);
-        },
-
-        getBremsstrahlungLosses: function()
-        {
-            var z_i = this.i.getQ();
-            var z_r = this.r.getQ();
-            var v_e = this.e.getThermalVelocity();
-            
-            return 8*Math.PI*pf.base.Bohr.alpha3/3*v_e*this.e.getN()*
-                (this.i.getN()*z_i*z_i + this.r.getN()*z_r*z_r);
-        },
-        
-        getBremsstrahlungSpectralDensity: function()
-        {
-            var photon_en = this.r.getTransitionEnergy();
-            return this.getBremsstrahlungLosses()/this.e.getT()*
-                Math.exp(-photon_en/this.e.getT());
-        },
-        
-        getFreeBoundLosses: function()
-        {
-            var T_e = this.e.getT();
-            var v_e = this.e.getThermalVelocity();
-            var N_e = this.e.getN();
-
-            var sum = 0;
-            
-            var sa = [this.i, this.r];
-            for (var i = 0; i < sa.length; i++) {
-                var s = sa[i];
-                var N_s = s.getN();
-                if (!N_s) {
-                    continue;
-                }
-                
-                var z_s = s.getQ();
-                var m_s = s.getM();
-                
-                var Eb = -pf.base.Bohr.bindingEnergy(z_s, m_s, 1);
-                
-                sum += N_s*z_s*z_s*(Eb/T_e);
-            }
-            
-            return 8*Math.PI*pf.base.Bohr.alpha3/3*N_e*v_e*sum;
-        },
-        
-        getFreeBoundSpectralDensity: function()
-        {
-            var photon_en = this.r.getTransitionEnergy();
-            var T_e = this.e.getT();
-            var v_e = this.e.getThermalVelocity();
-            var N_e = this.e.getN();
-            
-            var sum = 0;
-            
-            var sa = [this.i, this.r];
-            for (var i = 0; i < sa.length; i++) {
-                var s = sa[i];
-                var N_s = s.getN();
-                if (!N_s) {
-                    continue;
-                }
-                
-                var z_s = s.getQ();
-                var m_s = s.getM();
-                
-                var Eb = -pf.base.Bohr.bindingEnergy(z_s, m_s, 1);
-                
-                if (photon_en < Eb) {
-                    continue;
-                }
-                
-                sum += N_s*z_s*z_s*(Eb/T_e)*Math.exp(-(photon_en - Eb)/T_e);
-            }
-
-            return 8*Math.PI*pf.base.Bohr.alpha3/3*N_e/v_e*sum;
-        },
-        
-        getPressure: function()
-        {
-            return this.e.getPressure() +
-                   this.i.getPressure() +
-                   this.r.getPressure();
-        },
-        
-        getMagneticFieldPressure: function()
-        {
-            return this.B*this.B/(8*Math.PI);
-        },
-        
-        getBeta: function()
-        {
-            return this.getPressure()/this.getMagneticFieldPressure();
-        },
-        
-        getFermiEnergy: function()
-        {
-            return pf.base.Thermo.fermiEnergy(this.e.getN());
-        },
-        
-        getFermiVelocity: function()
-        {
-            return Math.sqrt(2*this.getFermiEnergy());
-        },
-        
-        getFermiLength: function()
-        {
-            var n_e = this.e.getN();
-            var E_F = this.getFermiEnergy();
-            return Math.sqrt(E_F/(6*Math.PI*n_e));
-        },
-        
-        getAlfvenVelocity: function()
-        {
-            var v_m1;
-            
-            v_m1 = 1/this.e.getAlfvenVelocity(this.B) +
-                   1/this.i.getAlfvenVelocity(this.B);
-        
-            if (this.r.getQ() != 0) {
-                v_m1 += 1/this.r.getAlfvenVelocity(this.B);
-            }
-            
-            return 1/v_m1;
-        },
-        
-        getSoundVelocity: function()
-        {
-            var gamma = 5.0/3;
-            
-            return Math.sqrt(gamma*this.getPressure()/this.getMassDensity());
-        },
-
-        getCoulombLog: function(s1, s2)
-        {
-            var lambda;
-            
-            var m1 = s1.getM();
-            var m2 = s2.getM();
-            var v1 = s1.getThermalVelocity();
-            var v2 = s2.getThermalVelocity();
-            var q1 = s1.getQ();
-            var q2 = s2.getQ();
-            
-            // kinetic energy in the CoM frame
-            var Kp = 3*m1*m2/(2*(m1 + m2))*(v1 + v2)*(v1 + v2);
-            
-            var b_min = Math.abs(q1*q1/Kp);
-            var b_max = this.getFullDebyeLength(s1) +
-                        this.getFullDebyeLength(s2);
-            
-            lambda = Math.log(b_max/b_min);
-            if (lambda < 1.0) {
-                lambda = 1.0;
-            }
-            
-            return lambda;
-        },
-
-        getRelaxationRate: function(s1, s2)
-        {
-            var m1 = s1.getM();
-            var m2 = s2.getM();
-            var v1 = s1.getThermalVelocity();
-            var v2 = s2.getThermalVelocity();
-            var q1 = s1.getQ();
-            var q2 = s2.getQ();
-            
-            var n2 = s2.getN();
-            
-            var lambda = this.getCoulombLog(s1, s2);
-            
-            // LL X (42,5) with the missing factor of 3
-            return Math.sqrt(128*Math.PI)/3*q1*q1*q2*q2*n2*lambda/
-                   (Math.pow(v1*v1 + v2*v2, 3/2)*m1*m2);
-        },
-
-        getDreicerField: function()
-        {
-            var n_e = this.e.getN();
-            var T_e = this.e.getT();
-            var lambda = this.getCoulombLog(this.e, this.e);
-            
-            return 4*Math.PI*lambda*n_e/T_e;
-        },
-        
-        getMassDensity: function()
-        {
-            return this.e.getMassDensity() +
-                   this.i.getMassDensity() +
-                   this.r.getMassDensity();
-        },
-        
-        // griem:1997a, Eq (7.75)
-        getLteNe: function()
-        {
-            var Z_core = this.r.getZcore();
-            var E12 = 3.0/8.0*Z_core*Z_core;
-            return 5/Math.sqrt(Math.PI)*pf.base.Bohr.alpha3*
-                Math.pow(E12, 3)*Math.sqrt(2*this.e.getT());
-        },
-        
-        dE2dWl: function(dE)
-        {
-            var E = this.r.getTransitionEnergy();
-            return (2*Math.PI)*pf.base.Bohr.c*dE/(E*E);
-        },
-
-        checkParameters: function()
-        {
-            if ((this.P_r < 0.0 || this.P_r > 1.0) ||
-                this.i.getQ() < 1 ||
-                this.P_r == 1.0 && this.r.getQ() == 0) {
-                return false;
-            } else {
-                return true;
-            }
-        },
-
-        updateParameters: function()
-        {
-            // Safety measures
-            if (this.checkParameters() != true) {
-                return false;
-            }
-            
-            var N_e = this.e.getN();
-            var N_i, N_r;
-            
-            if (this.P_r < 1.0) {
-                N_i = N_e*(1.0 - this.P_r)/
-                    (this.i.getQ()*(1.0 - this.P_r) + this.r.getQ()*this.P_r);
-                
-                N_r = N_i*this.P_r/(1.0 - this.P_r);
-            } else {
-                N_i = 0.0;
-                N_r = N_e/this.r.getQ();
-            }
-            
-            this.i.setN(N_i);
-            this.r.setN(N_r);
-            
-            return true;
-        }
-    },
-    
-    construct: function()
-    {
-        var m_p = pf.base.Bohr.m_p;
-        var V0  = pf.base.Bohr.V0;
-        var E0  = pf.base.Bohr.E0;
-        
-        // Defaults: 1e16 1/cc, 1 eV
-        this.e = new pf.base.Species ("e", 1.0, -1, 1e16*V0, 1.0/E0);
-        this.i = new pf.base.Species ("i", m_p, +1, 1e16*V0, 1.0/E0);
-        this.r = new pf.base.Radiator("r", m_p,  0,       0, 1.0/E0);
-
-        this.P_r = 0;
-
-        this.B   = 0;
-    }
-});
Index: urce/class/pf/UnitSelector.js
===================================================================
--- source/class/pf/UnitSelector.js	(revision 358)
+++ 	(revision )
@@ -1,120 +1,0 @@
-qx.Class.define("pf.UnitSelector",
-{
-    extend: pf.ui.SelectBox,
-    
-    members:
-    {
-        _dimension : null,
-        
-        update: function(dimension, def_units)
-        {
-            if (dimension == this._dimension) {
-                return;
-            }
-            
-            this._dimension = dimension;
-            
-            var list = this.getChildControl("list");
-            
-            // clear everything
-            list.removeAll();
-
-            var selected;
-            var au_f;
-
-            switch (dimension) {
-            case "frequency":
-                au_f = pf.base.Bohr.f0;
-                           this.addNumItem("a.u.",  1.0);
-                           this.addNumItem("Rad/s", 2*Math.PI*au_f);
-                selected = this.addNumItem("Hz",    1.0*au_f);
-                break;
-            case "length":
-                au_f = pf.base.Bohr.a0;
-                           this.addNumItem("a.u.",    1.0);
-                           this.addNumItem("&Aring;", 1.0e8*au_f, true);
-                           this.addNumItem("nm",      1.0e7*au_f);
-                           this.addNumItem("&mu;m",   1.0e4*au_f, true);
-                selected = this.addNumItem("cm",      1.0*au_f);
-                           this.addNumItem("m",       1.0e-2*au_f);
-                break;
-            case "area":
-                au_f = Math.pow(pf.base.Bohr.a0, 2);
-                           this.addNumItem("a.u.",           1.0);
-                           this.addNumItem("Barn",           1.0e24*au_f);
-                selected = this.addNumItem("cm<sup>2</sup>", 1.0*au_f, true);
-                           this.addNumItem("m<sup>2</sup>",  1.0e-4*au_f, true);
-                break;
-            case "velocity":
-                au_f = pf.base.Bohr.v0;
-                           this.addNumItem("a.u.",     1.0);
-                selected = this.addNumItem("cm/s",     1.0*au_f);
-                           this.addNumItem("m/s",      1.0e-2*au_f);
-                           this.addNumItem("cm/&mu;s", 1.0e-6*au_f, true);
-                           this.addNumItem("v/c",      1.0/3e10*au_f);
-                break;
-            case "mass_density":
-                au_f = pf.base.Bohr.m0*pf.base.Bohr.n0;
-                           this.addNumItem("a.u.",             1.0);
-                           this.addNumItem("kg/m<sup>3</sup>", 1.0e3*au_f, true);
-                selected = this.addNumItem("g/cm<sup>3</sup>", 1.0*au_f, true);
-                break;
-            case "energy":
-                au_f = pf.base.Bohr.E0;
-                           this.addNumItem("a.u.",            1.0);
-                           this.addNumItem("cm<sup>-1</sup>", 8065.5*au_f, true);
-                selected = this.addNumItem("eV",              1.0*au_f);
-                           this.addNumItem("erg",             1.6022e-12*au_f);
-                           this.addNumItem("J",               1.6022e-19*au_f);
-                break;
-            case "pressure":
-                au_f = pf.base.Bohr.P0;
-                           this.addNumItem("a.u.",               1.0);
-                selected = this.addNumItem("Dyn/cm<sup>2</sup>", 1.0*au_f, true);
-                           this.addNumItem("Pa",                 0.1*au_f);
-                           this.addNumItem("Torr",               7.5006e-4*au_f);
-                           this.addNumItem("bar",                1.0e-6*au_f);
-                           this.addNumItem("atm",                9.8692e-7*au_f);
-                break;
-            case "power_density":
-                au_f = pf.base.Bohr.E0/pf.base.Bohr.V0/pf.base.Bohr.t0;
-                           this.addNumItem("a.u.",                 1.0);
-                           this.addNumItem("erg/cm<sup>3</sup>/s", 1.6022e-12*au_f, true);
-                           this.addNumItem("W/m<sup>3</sup>",      1.6022e-13*au_f, true);
-                selected = this.addNumItem("W/cm<sup>3</sup>",     1.6022e-19*au_f, true);
-                break;
-            case "spectral_power_density":
-                au_f = 1.0/pf.base.Bohr.V0/pf.base.Bohr.t0;
-                           this.addNumItem("a.u.",                    1.0);
-                           this.addNumItem("erg/s/cm<sup>3</sup>/eV", 1.6022e-12*au_f, true);
-                           this.addNumItem("W/m<sup>3</sup>/eV",      1.6022e-13*au_f, true);
-                selected = this.addNumItem("W/cm<sup>3</sup>/eV",     1.6022e-19*au_f, true);
-                           this.addNumItem("1/s/cm<sup>3</sup>",      1.0*au_f, true);
-                break;
-            case "efield":
-                au_f = pf.base.Bohr.F0;
-                           this.addNumItem("a.u.",     1.0);
-                           this.addNumItem("V/m",      1.0e2*au_f);
-                selected = this.addNumItem("V/cm",     1.0*au_f);
-                           this.addNumItem("StatV/cm", 1.0/300*au_f);
-                           this.addNumItem("MV/cm",    1.0e-6*au_f);
-                break;
-            case "none":
-                selected = this.addNumItem("---", 1.0);
-                break;
-            default:
-                selected = this.addNumItem("???", 1.0);
-                break;
-            }
-
-            if (def_units) {
-                var models = new Array(def_units);
-                list.setModelSelection(models);
-            } else
-            if (selected) {
-                var sels = Array(selected);
-                list.setSelection(sels);
-            }
-        }
-    }
-});
Index: urce/class/pf/base/Bohr.js
===================================================================
--- source/class/pf/base/Bohr.js	(revision 300)
+++ 	(revision )
@@ -1,129 +1,0 @@
-qx.Class.define("pf.base.Bohr",
-{
-    statics :
-    {
-        // Fine-structure constant
-        alpha  : 7.297352570e-3,
-        
-        // alpha^2
-        alpha2 : 5.325135e-05,
-        
-        // alpha^3
-        alpha3 : 3.885939e-07,
-        
-        // Speed of light (1/alpha)
-        c      : 137.036,
-        
-        // Bohr magneton (alpha/2), must be in sync with B0!
-        mu_B   : 3.64867635e-3,
-        
-        // Proton mass
-        m_p    : 1836.2,
-        
-        // Electron mass (g)
-        m0 : 9.1094e-28,
-        // Hartree (eV)
-        E0 : 27.2113845,
-        // Bohr radius (cm)
-        a0 : 5.291772108e-9,
-        // Atomic unit time (s)
-        t0 : 2.418884327e-17,
-        // Atomic unit velocity (cm/s)
-        v0 : 2.1876912633e8,
-        // Electric field unit (V/cm)
-        F0 : 5.14220632e9,
-        // Magnetic field unit (T), must be in sync with mu_B!
-        B0 : 1.7152553e3,
-        // Volume unit (a0^3)
-        V0 : 1.481847e-25,
-        // Particle density unit (1/V0)
-        n0 : 6.748334e+24,
-        // Frequency unit (Hz)
-        f0 : 4.1341373e16,
-        // Pressure unit (dyne/cm^2)
-        P0 : 2.9421912e14,
-        
-        bindingEnergy : function(Z_core, m_core, n)
-        {
-            return -Z_core*Z_core/(n*n)/2/(1 + 1/m_core);
-        },
-
-        transitionEnergy : function(Z_core, m_core, n_u, n_l)
-        {
-            return this.bindingEnergy(Z_core, m_core, n_u) -
-                   this.bindingEnergy(Z_core, m_core, n_l);
-        },
-        
-        fineStructureCorrection : function(Z_core, n, j)
-        {
-            return -Math.pow(Z_core, 4)*(this.alpha*this.alpha)/
-                (n*n*n)*(1.0/(j + 0.5) - 3.0/(4*n))/2;
-        },
-        
-        fineStructureSplitting : function(Z_core, n)
-        {
-            return this.fineStructureCorrection(Z_core, n, n - 0.5) -
-                   this.fineStructureCorrection(Z_core, n, 0.5);
-        },
-        
-        transitionFineStructure : function(Z_core, n_u, n_l)
-        {
-            return this.fineStructureSplitting(Z_core, n_u) +
-                   this.fineStructureSplitting(Z_core, n_l);
-        },
-
-        /* Quasi-classical absorption oscillator strength */
-        KramersF: function(n_u, n_l)
-        {
-            return 32/(3*Math.PI*Math.sqrt(3))*
-                n_u*n_u*n_u*n_l/Math.pow(n_u*n_u - n_l*n_l, 3);
-        },
-
-        fGauntFactor : function(n_u, n_l)
-        {
-            var g = 1;
-            
-            if (n_u == 2 && n_l == 1) {
-                g = 0.717;
-            } else
-            if (n_u == 3 && n_l == 1) {
-                g = 0.765;
-            } else {
-                var r2 = (n_l/n_u)*(n_l/n_u);
-                var t = Math.pow((1 - r2)*n_l, 2/3);
-                g = 1 - 0.1728*(1 + r2)/t;
-                     // - 0.0496*(1 + 484/15*r2 + r2*r2)/(t*t);
-            }
-            
-            return g;
-        },
-
-        oscillatorStrength : function(n_u, n_l)
-        {
-            if (n_l >= n_u || n_l < 1) {
-                return 0;
-            } else
-            if (n_l == 1) {
-                return 256/3*Math.pow((n_u - 1)/(n_u + 1), 2*n_u)/
-                       Math.pow(1 - 1/(n_u*n_u), 4)/Math.pow(n_u, 3);
-            } else {
-                var g = this.fGauntFactor(n_u, n_l);
-
-                return g*this.KramersF(n_u, n_l);
-            }
-        },
-        
-        EinsteinA : function(Z_core, m_core, n_u, n_l)
-        {
-            var f  = this.oscillatorStrength(n_u, n_l);
-            var dE = this.transitionEnergy(Z_core, m_core, n_u, n_l);
-            
-            return 2*this.alpha3*dE*dE*f*(n_l/n_u)*(n_l/n_u);
-        },
-        
-        classicalIonizationField : function(Z_core, n)
-        {
-            return Math.pow(Z_core, 3)/(16*Math.pow(n, 4));
-        }
-    }
-});
Index: urce/class/pf/base/Radiator.js
===================================================================
--- source/class/pf/base/Radiator.js	(revision 300)
+++ 	(revision )
@@ -1,120 +1,0 @@
-qx.Class.define("pf.base.Radiator",
-{
-    extend: pf.base.Species,
-    
-    members: {
-        _n_l: 1,
-        _n_u: 2,
-        
-        getZcore: function()
-        {
-            return this._q + 1;
-        },
-        
-        getN_u: function()
-        {
-            return this._n_u;
-        },
-        
-        getN_l: function()
-        {
-            return this._n_l;
-        },
-        
-        setN_u: function(n_u)
-        {
-            if (n_u < 2) {
-                return false;
-            } else {
-                this._n_u = n_u;
-                
-                if (this._n_l >= this._n_u) {
-                    this._n_l = this._n_u - 1;
-                }
-            }
-        },
-        
-        setN_l: function(n_l)
-        {
-            if (n_l < 1) {
-                return false;
-            } else {
-                this._n_l = n_l;
-                
-                if (this._n_l >= this._n_u) {
-                    this._n_u = this._n_l + 1;
-                }
-            }
-        },
-
-        getTransitionEnergy: function()
-        {
-            var Z_core = this.getZcore();
-            
-            return pf.base.Bohr.transitionEnergy(Z_core,
-                this._m, this._n_u, this._n_l);
-        },
-        
-        getFineStructure: function()
-        {
-            var Z_core = this.getZcore();
-            
-            return pf.base.Bohr.transitionFineStructure(Z_core,
-                this._n_u, this._n_l);
-        },
-        
-        getMinEnergyDistance: function()
-        {
-            var n = this._n_u;
-            var Z_core = this.getZcore();
-            
-            return pf.base.Bohr.transitionEnergy(Z_core, this._m, n + 1, n);
-        },
-
-        getNaturalWidth: function()
-        {
-            var Z_core = this.getZcore();
-            
-            return pf.base.Bohr.EinsteinA(Z_core, this._m, this._n_u, 1) +
-                   pf.base.Bohr.EinsteinA(Z_core, this._m, this._n_l, 1);
-        },
-        
-        getOscillatorStrength: function()
-        {
-            return pf.base.Bohr.oscillatorStrength(this._n_u, this._n_l);
-        },
-        
-        getEinsteinA: function()
-        {
-            var Z_core = this.getZcore();
-            
-            return pf.base.Bohr.EinsteinA(Z_core,
-                this._m, this._n_u, this._n_l);
-        },
-        
-        getDopplerHwhm: function()
-        {
-            var v   = this.getThermalVelocity();
-            var nu  = this.getTransitionEnergy();
-            
-            return Math.sqrt(2*Math.log(2))*nu*v/pf.base.Bohr.c;
-        },
-
-        getClassicalIonizationField: function()
-        {
-            var Z_core = this.getZcore();
-            
-            return pf.base.Bohr.classicalIonizationField(Z_core, this._n_u);
-        },
-        
-        getInglisTellerField: function()
-        {
-            var Z_core = this.getZcore();
-            var n = this._n_u;
-            
-            return Math.pow(Z_core, 3)*
-                (2*n + 1)/(6*Math.pow(n, 4)*(n + 1)*(n + 1));
-        }
-        
-    }
-});
Index: urce/class/pf/base/Species.js
===================================================================
--- source/class/pf/base/Species.js	(revision 341)
+++ 	(revision )
@@ -1,216 +1,0 @@
-qx.Class.define("pf.base.Species",
-{
-    extend : qx.core.Object,
-    
-    members: {
-        id : "",
-        _m : 0.0,
-        _q : 0,
-        _n : 0.0,
-        _t : 0.0,
-        
-        _update: function()
-        {
-        },
-        
-        setM: function(m)
-        {
-            m = parseFloat(m);
-            if (m > 0.0) {
-                this._m = m;
-                this._update();
-                return true;
-            } else {
-                return false;
-            }
-        },
-        
-        setQ: function(Q)
-        {
-            this._q = parseInt(Q);
-            this._update();
-        },
-        
-        setN: function(n)
-        {
-            n = parseFloat(n);
-            if (n >= 0.0) {
-                this._n = n;
-                this._update();
-                return true;
-            } else {
-                return false;
-            }
-        },
-        
-        setT: function(t)
-        {
-            t = parseFloat(t);
-            if (t > 0.0) {
-                this._t = t;
-                this._update();
-                return true;
-            } else {
-                return false;
-            }
-        },
-
-        getN: function()
-        {
-            return this._n;
-        },
-        
-        getQ: function()
-        {
-            return this._q;
-        },
-        
-        getT: function()
-        {
-            return this._t;
-        },
-        
-        getM: function()
-        {
-            return this._m;
-        },
-        
-        getMassDensity: function()
-        {
-            return this._m*this._n;
-        },
-        
-        getDebyeLength: function()
-        {
-            return Math.sqrt(this._t/(4*Math.PI*this._n))/Math.abs(this._q);
-        },
-
-        getPlasmaFrequencyW: function()
-        {
-            return Math.abs(this._q)*Math.sqrt(4*Math.PI*this._n/this._m);
-        },
-        getPlasmaFrequency: function()
-        {
-            return this.getPlasmaFrequencyW()/(2*Math.PI);
-        },
-
-        getInertialLength: function()
-        {
-            return pf.base.Bohr.c/this.getPlasmaFrequencyW();
-        },
-
-        getThermalVelocity: function()
-        {
-            return Math.sqrt(this._t/this._m);
-        },
-        
-        getDeBroglieLength: function()
-        {
-            return pf.base.Thermo.thermalDeBroglieLength(this._m, this._t)/
-                Math.sqrt(2*Math.PI);
-        },
-        
-        getMinApproachDistance: function()
-        {
-            return this._q*this._q/this._t;
-        },
-        
-        getTypicalDistance: function()
-        {
-            return Math.pow(4*Math.PI/3*this._n, -1/3);
-        },
-        
-        getGyroFrequencyW: function(B)
-        {
-            return Math.abs(this._q)*B/this._m/pf.base.Bohr.c;
-        },
-        getGyroFrequency: function(B)
-        {
-            return this.getGyroFrequencyW(B)/(2*Math.PI);
-        },
-        
-        getAlfvenVelocity: function(B)
-        {
-            if (B == 0) {
-                return 0;
-            } else {
-                return B/Math.sqrt(4*Math.PI*this._m*this._n);
-            }
-        },
-        
-        getGyroRadius: function(B)
-        {
-            return this.getThermalVelocity()/this.getGyroFrequencyW(B);
-        },
-        
-        getCoupling: function()
-        {
-            if (this._q == 0 || this._n == 0) {
-                return 0;
-            } else {
-                var r = this.getTypicalDistance()/this.getDebyeLength();
-                return 1/3*r*r;
-            }
-        },
-        
-        getHoltsmarkField: function()
-        {
-            return 2*Math.PI*Math.abs(this._q)*Math.pow(this._n*4/15, 2.0/3.0);
-        },
-        
-        getClassicalRadius: function()
-        {
-            return pf.base.Bohr.alpha2*this._q*this._q/this._m;
-        },
-        
-        getThomsonXsDiff: function()
-        {
-            var r0 = this.getClassicalRadius();
-            return r0*r0;
-        },
-        
-        getThomsonXsTotal: function()
-        {
-            return 8*Math.PI/3*this.getThomsonXsDiff();
-        },
-        
-        getCyclotronLosses: function(B)
-        {
-            var w_c = this.getGyroFrequencyW(B);
-            
-            return 4/3*this._q*this._q*w_c*w_c*
-                this._t/(this._m*Math.pow(pf.base.Bohr.c, 3))*this._n;
-        },
-        
-        getPressure: function()
-        {
-            return this._n*this._t;
-        },
-        
-        getChemicalPotential : function()
-        {
-            if (this.id == "e") {
-                return pf.base.Thermo.muFD(this._n, this._t);
-            } else {
-                return pf.base.Thermo.muMB(this._m, this._n, this._t);
-            }
-        }
-    },
-        
-    
-    construct: function(id, m, Q, n, t)
-    {
-        if (m <= 0.0 || n < 0.0 || t <= 0.0) {
-            return null;
-        }
-         
-        this.id = id;
-        this._m  = m;
-        this._q  = Q;
-        this._n  = n;
-        this._t  = t;
-        
-        this._update();
-    }
-    
-});
Index: urce/class/pf/base/Thermo.js
===================================================================
--- source/class/pf/base/Thermo.js	(revision 220)
+++ 	(revision )
@@ -1,71 +1,0 @@
-qx.Class.define("pf.base.Thermo",
-{
-    statics :
-    {
-        thermalDeBroglieLength: function(m, T)
-        {
-            return Math.sqrt(2*Math.PI/(m*T));
-        },
-
-        // Chemical potential of ideal classical gas
-        muMB : function(m, n, T)
-        {
-            if (!n) {
-                return 0;
-            } else {
-                var Lambda = this.thermalDeBroglieLength(m, T);
-                return T*Math.log(n*Math.pow(Lambda, 3));
-            }
-        },
-        
-        // Fermi energy of ideal electron gas
-        fermiEnergy : function(n_e)
-        {
-            return 0.5*Math.pow(3*Math.PI*Math.PI*n_e, 2.0/3.0);
-        },
-        
-        // Reduced chemical potential for fermion gas
-        reducedMuFD : function(T_bar)
-        {
-            var tmp, t3_2, t3, t9_2, t6;
-
-            if (T_bar <= 0.0) {
-                return 1.0;
-            } else
-            if (T_bar < 0.3) {
-                tmp = Math.PI*T_bar;
-                tmp = tmp*tmp;
-                return 1.0 - tmp/12 - tmp*tmp/80;
-            } else {
-
-                t3_2 = Math.pow(T_bar, 1.5);
-                t3   = t3_2*t3_2;
-                t9_2 = t3*t3_2;
-                t6   = t3*t3;
-
-                tmp = Math.log(4.0/(3*Math.sqrt(Math.PI)*t3_2)) +
-                      Math.sqrt(2)/(3*Math.sqrt(Math.PI))/t3_2 +
-                      1.0/(3*Math.PI)*(1.0 - 16.0/(9*Math.sqrt(3)))/t3 +
-                      8.0/27/Math.pow(Math.PI, 1.5)*(1.0 - 8.0/3*Math.sqrt(2.0/3) +
-                                                5.0/3/Math.sqrt(2))/t9_2 +
-                      1585.0/2187/Math.PI/Math.PI*(1 + 432.0/317/Math.sqrt(2) -
-                           864.0/317/Math.sqrt(3) -
-                           6912.0/7925/Math.sqrt(5))/t6;
-
-                return T_bar*tmp;
-            }
-        },
-        
-        // Fermi-Dirac chemical potential of ideal electron gas
-        muFD : function(n_e, T)
-        {
-            var E_F = this.fermiEnergy(n_e);
-
-            if (E_F > 0.0) {
-                return E_F*this.reducedMuFD(T/E_F);
-            } else {
-                return 0.0;
-            }
-        }
-    }
-});
Index: urce/class/pf/theme/Classic.js
===================================================================
--- source/class/pf/theme/Classic.js	(revision 170)
+++ 	(revision )
@@ -1,11 +1,0 @@
-qx.Theme.define("pf.theme.Classic",
-{
-  meta :
-  {
-    color      : pf.theme.classic.Color,
-    decoration : pf.theme.classic.Decoration,
-    font       : qx.theme.classic.Font,
-    icon       : qx.theme.icon.Oxygen,
-    appearance : pf.theme.classic.Appearance
-  }
-});
Index: urce/class/pf/theme/Modern.js
===================================================================
--- source/class/pf/theme/Modern.js	(revision 170)
+++ 	(revision )
@@ -1,11 +1,0 @@
-qx.Theme.define("pf.theme.Modern",
-{
-  meta :
-  {
-    color      : qx.theme.modern.Color,
-    decoration : qx.theme.modern.Decoration,
-    font       : qx.theme.modern.Font,
-    icon       : qx.theme.icon.Tango,
-    appearance : pf.theme.modern.Appearance
-  }
-});
Index: urce/class/pf/theme/classic/Appearance.js
===================================================================
--- source/class/pf/theme/classic/Appearance.js	(revision 170)
+++ 	(revision )
@@ -1,103 +1,0 @@
-qx.Theme.define("pf.theme.classic.Appearance",
-{
-  extend : qx.theme.classic.Appearance,
-
-  appearances :
-  {
-    "tabview/pane" :
-    {
-      style : function(states)
-      {
-        return {
-          backgroundColor : "white",
-          decorator : "outset",
-          padding : 10
-        };
-      }
-    },
-
-    "tabview-page/button" :
-    {
-      style : function(states)
-      {
-        var decorator;
-        var marginTop=0, marginRight=0, marginBottom=0, marginLeft=0;
-
-        if (states.barTop || states.barBottom) {
-          var paddingTop=2, paddingBottom=2, paddingLeft=6, paddingRight=6;
-        } else {
-          var paddingTop=6, paddingBottom=6, paddingLeft=6, paddingRight=6;
-        }
-
-        if (states.checked) {
-          decorator = "tabview-page-button-selected";
-        } else {
-          decorator = "tabview-page-button";
-        }
-
-        if (states.checked)
-        {
-          if (states.barTop || states.barBottom)
-          {
-            paddingLeft += 2;
-            paddingRight += 2;
-          }
-          else
-          {
-            paddingTop += 2;
-            paddingBottom += 2;
-          }
-        }
-        else
-        {
-          if (states.barTop || states.barBottom)
-          {
-            marginBottom += 2;
-            marginTop += 2;
-          }
-          else if (states.barLeft || states.barRight)
-          {
-            marginRight += 2;
-            marginLeft += 2;
-          }
-        }
-
-        if (states.checked)
-        {
-          if (!states.firstTab)
-          {
-            if (states.barTop || states.barBottom) {
-              marginLeft = -4;
-            } else {
-              marginTop = -4;
-            }
-          }
-
-          if (!states.lastTab)
-          {
-            if (states.barTop || states.barBottom) {
-              marginRight = -4;
-            } else {
-              marginBottom = -4;
-            }
-          }
-        }
-
-        var backgroundColor;
-        if (states.checked) {
-            backgroundColor = "white";
-        } else {
-            backgroundColor = states.hovered ? "white" : "#e1eeff";
-        }
-
-        return {
-          zIndex : states.checked ? 10 : 5,
-          decorator : decorator,
-          backgroundColor : backgroundColor,
-          padding : [ paddingTop, paddingRight, paddingBottom, paddingLeft ],
-          margin : [ marginTop, marginRight, marginBottom, marginLeft ]
-        };
-      }
-    }
-  }
-});
Index: urce/class/pf/theme/classic/Color.js
===================================================================
--- source/class/pf/theme/classic/Color.js	(revision 170)
+++ 	(revision )
@@ -1,10 +1,0 @@
-qx.Theme.define("pf.theme.classic.Color",
-{
-  extend : qx.theme.classic.Color,
-  
-  colors :
-  {
-    "table-header-border" : [ 220, 220, 220 ],
-    "table-header-cell" : [ 242, 242, 242 ]
-  }
-});
Index: urce/class/pf/theme/classic/Decoration.js
===================================================================
--- source/class/pf/theme/classic/Decoration.js	(revision 350)
+++ 	(revision )
@@ -1,35 +1,0 @@
-qx.Theme.define("pf.theme.classic.Decoration",
-{
-  extend : qx.theme.classic.Decoration,
-  
-  decorations :
-  {
-    "tabview-page-button" :
-    {
-      decorator : qx.ui.decoration.Decorator,
-
-      style :
-      {
-        widthRight : 2,
-        colorRight : "table-header-border",
-        styleRight : "solid"
-      }
-    },
-
-    "tabview-page-button-selected" :
-    {
-      decorator : qx.ui.decoration.Decorator,
-
-      style :
-      {
-        widthRight : 0,
-        colorRight : "table-header-border",
-        styleRight : "solid",
-
-        widthTop : 2,
-        colorTop : "effect",
-        styleTop : "solid"
-      }
-    }
-  }
-});
Index: urce/class/pf/theme/modern/Appearance.js
===================================================================
--- source/class/pf/theme/modern/Appearance.js	(revision 345)
+++ 	(revision )
@@ -1,33 +1,0 @@
-qx.Theme.define("pf.theme.modern.Appearance",
-{
-  extend : qx.theme.modern.Appearance,
-
-  appearances :
-  {
-    "colorpopup/colorselector-okbutton":
-    {
-      alias : "button",
-      include : "button",
-
-      style : function(states)
-      {
-        return {
-          icon : "pf/image/ok.png"
-        };
-      }
-    },
-
-    "colorpopup/colorselector-cancelbutton":
-    {
-      alias : "button",
-      include : "button",
-
-      style : function(states)
-      {
-        return {
-          icon : "pf/image/cancel.png"
-        };
-      }
-    }
-  }
-});
Index: urce/class/pf/ui/ColorPopup.js
===================================================================
--- source/class/pf/ui/ColorPopup.js	(revision 146)
+++ 	(revision )
@@ -1,33 +1,0 @@
-qx.Class.define("pf.ui.ColorPopup",
-{
-    extend: qx.ui.control.ColorPopup,
-    
-    construct: function(colors) {
-        this.base(arguments);
-        this.setFocusable(true);
-        this._remove(this.getChildControl("auto-button"));
-
-        if (colors) {
-            var clength = colors.length;
-            for (var i = 0; i < this.__fieldNumber && i < clength; i++) {
-                var field = this.getChildControl("field#" + i);
-                field.setBackgroundColor(colors[i]);
-            }
-        }
-
-        this.addListener("keypress", function(ev) {
-                if (ev.getKeyIdentifier() == "Escape") {
-                    this.hide()
-                }
-            });
-    },
-    
-    members:
-    {
-        open: function()
-        {
-            this.show();
-            this.focus();
-        }
-    }
-});
Index: urce/class/pf/ui/ConfirmDialog.js
===================================================================
--- source/class/pf/ui/ConfirmDialog.js	(revision 175)
+++ 	(revision )
@@ -1,51 +1,0 @@
-qx.Class.define("pf.ui.ConfirmDialog",
-{
-    extend: pf.ui.DialogWindow,
-
-    construct: function() {
-        this.base(arguments);
-        
-        this.setCaption("Confirmation");
-        this.setIcon("pf/image/warning.png");
-
-        this.setLayout(new qx.ui.layout.VBox(10));
-
-        this._message = new qx.ui.basic.Atom();
-        this._message.setRich(true);
-        this._message.setIcon("pf/image/dialog-warning.png");
-        this.add(this._message);
-
-        var layout = new qx.ui.layout.HBox(10, "right");
-        var rc = new qx.ui.container.Composite(layout);
-        this.add(rc);
-
-        var btn = new qx.ui.form.Button("Cancel", "pf/image/cancel.png");
-        btn.addListener("execute", function(ev) {
-                this._cb.call(this._cbclosure, false);
-                this.close();
-            }, this);
-        rc.add(btn);
-        var btn = new qx.ui.form.Button("OK", "pf/image/ok.png");
-        btn.addListener("execute", function(ev) {
-                this._cb.call(this._cbclosure, true);
-                this.close();
-            }, this);
-        rc.add(btn);
-    },
-
-    members:
-    {
-        confirm: function(txt, cb, self) {
-            this._message.setLabel(txt);
-            
-            this._cb = cb;
-            if (self) {
-                this._cbclosure = self;
-            } else {
-                this._cbclosure = this;
-            }
-            
-            this.open();
-        }
-    }
-});  
Index: urce/class/pf/ui/DialogWindow.js
===================================================================
--- source/class/pf/ui/DialogWindow.js	(revision 346)
+++ 	(revision )
@@ -1,38 +1,0 @@
-qx.Class.define("pf.ui.DialogWindow",
-{
-    extend: qx.ui.window.Window,
-
-    construct: function(caption, icon) {
-        this.base(arguments, caption, icon);
-        
-        this.setModal(true);
-        this.setShowMinimize(false);
-        this.setShowMaximize(false);
-        this.setResizable(false);
-
-        this.addListener("keypress", function(ev) {
-                if (ev.getKeyIdentifier() == "Escape") {
-                    this.close()
-                }
-            });
-
-        this.addListener("appear", function(e) {
-                this.center();
-            });
-    },
-    
-    members:
-    {
-        center: function()
-        {
-            var parent = this.getLayoutParent();
-            var pel = parent.getContentElement().getDomElement();
-            var el = this.getContentElement().getDomElement();
-            var left = parseInt((qx.bom.element.Dimension.getWidth(pel) -
-                       qx.bom.element.Dimension.getWidth(el))/2);
-            var top  = parseInt((qx.bom.element.Dimension.getHeight(pel) -
-                       qx.bom.element.Dimension.getHeight(el))/3);
-            this.moveTo(left, top);
-        }
-    }
-});  
Index: urce/class/pf/ui/MessageWindow.js
===================================================================
--- source/class/pf/ui/MessageWindow.js	(revision 174)
+++ 	(revision )
@@ -1,67 +1,0 @@
-qx.Class.define("pf.ui.MessageWindow",
-{
-    extend: pf.ui.DialogWindow,
-
-    construct: function() {
-        this.base(arguments);
-        
-        this.setLayout(new qx.ui.layout.VBox(10));
-
-        this._message = new qx.ui.basic.Atom();
-        this._message.setRich(true);
-        this.add(this._message);
-
-        var layout = new qx.ui.layout.HBox(0, "right");
-        var rc = new qx.ui.container.Composite(layout);
-        this.add(rc);
-
-        var btn = new qx.ui.form.Button("OK", "pf/image/ok.png");
-        btn.addListener("execute", function(ev) {
-                this.close();
-            }, this);
-        rc.add(btn);
-    },
-
-    members:
-    {
-        invoke: function(txt, type) {
-            var caption, icon;
-            
-            switch (type) {
-            case "error":
-                caption = "Error";
-                icon = "error.png";
-                break;
-            case "warning":
-                caption = "Warning";
-                icon = "warning.png";
-                break;
-            case "info":
-            default:
-                caption = "Information";
-                icon = "info.png";
-                break;
-            }
-            
-            this.setCaption(caption);
-            this.setIcon("pf/image/" + icon);
-            
-            this._message.setLabel(txt);
-            this._message.setIcon("pf/image/dialog-" + icon);
-            
-            this.open();
-        },
-        
-        error: function(txt) {
-            this.invoke(txt, "error");
-        },
-        
-        warn: function(txt) {
-            this.invoke(txt, "warning");
-        },
-        
-        info: function(txt) {
-            this.invoke(txt, "info");
-        }
-    }
-});  
Index: urce/class/pf/ui/PromptDialog.js
===================================================================
--- source/class/pf/ui/PromptDialog.js	(revision 175)
+++ 	(revision )
@@ -1,55 +1,0 @@
-qx.Class.define("pf.ui.PromptDialog",
-{
-    extend: pf.ui.DialogWindow,
-
-    construct: function() {
-        this.base(arguments);
-        
-        this.setCaption("Prompt");
-        this.setIcon("pf/image/prompt.png");
-
-        this.setLayout(new qx.ui.layout.VBox(10));
-
-        this._message = new qx.ui.basic.Atom();
-        this._message.setRich(true);
-        this._message.setIcon("pf/image/dialog-prompt.png");
-        this.add(this._message);
-
-        this._value = new qx.ui.form.TextField();
-        this.add(this._value);
-
-        var layout = new qx.ui.layout.HBox(10, "right");
-        var rc = new qx.ui.container.Composite(layout);
-        this.add(rc);
-
-        var btn = new qx.ui.form.Button("Cancel", "pf/image/cancel.png");
-        btn.addListener("execute", function(ev) {
-                this._cb.call(this._cbclosure, null);
-                this.close();
-            }, this);
-        rc.add(btn);
-        var btn = new qx.ui.form.Button("OK", "pf/image/ok.png");
-        btn.addListener("execute", function(ev) {
-                var value = this._value.getValue();
-                this._cb.call(this._cbclosure, value);
-                this.close();
-            }, this);
-        rc.add(btn);
-    },
-
-    members:
-    {
-        prompt: function(txt, value, cb, self) {
-            this._message.setLabel(txt);
-            this._value.setValue(value);
-            
-            this._cb = cb;
-            if (self) {
-                this._cbclosure = self;
-            } else {
-                this._cbclosure = this;
-            }
-            this.open();
-        }
-    }
-});  
Index: urce/class/pf/ui/SelectBox.js
===================================================================
--- source/class/pf/ui/SelectBox.js	(revision 205)
+++ 	(revision )
@@ -1,56 +1,0 @@
-qx.Class.define("pf.ui.SelectBox",
-{
-    extend: qx.ui.form.SelectBox,
-    
-    members:
-    {
-        addItem: function(vText, vValue, vRich)
-        {
-            var item = new qx.ui.form.ListItem(vText, null, vValue);
-            if (vRich) {
-                item.setRich(true);
-            }
-            this.add(item);
-            
-            return item;
-        },
-        
-        addNumItem: function(vText, vValue, vRich)
-        {
-            var item = new qx.ui.form.ListItem(vText, null, vValue.toString());
-            if (vRich) {
-                item.setRich(true);
-            }
-            this.add(item);
-            
-            return item;
-        },
-        
-        getSelectedValue: function()
-        {
-            var items = this.getChildControl("list").getSelection();
-            if (items && items.length == 1) {
-                return items[0].getModel();
-            } else {
-                return null;
-            }
-        },
-
-        getSelectedLabel: function()
-        {
-            var items = this.getChildControl("list").getSelection();
-            if (items && items.length == 1) {
-                return items[0].getLabel();
-            } else {
-                return null;
-            }
-        },
-
-        selectByValue: function(value)
-        {
-            var list = this.getChildControl("list");
-            var models = new Array(value);
-            list.setModelSelection(models);
-        }
-    }
-});
Index: urce/class/pf/ui/TextField.js
===================================================================
--- source/class/pf/ui/TextField.js	(revision 196)
+++ 	(revision )
@@ -1,38 +1,0 @@
-
-qx.Class.define("pf.ui.TextField",
-{
-    extend: qx.ui.form.TextField,
-    
-    construct: function(v, f) {
-        if (typeof f != "undefined" && (f = parseFloat(f)) != 0.0) {
-            this._f = f;
-        }
-
-        this.base(arguments, pf.util.Format.numPrint(this._f*v));
-    },
-    
-    members:
-    {
-        _f : 1.0,
-    
-        setNumConvFactor: function(f)
-        {
-            this._f = parseFloat(f);
-        },
-        
-        setNumValue: function(v)
-        {
-            if (typeof v != "undefined") {
-                this.setValue(pf.util.Format.numPrint(this._f*v));
-            } else {
-                this.setValue("");
-            }
-        },
-
-        getNumValue: function()
-        {
-            return parseFloat(this.getValue())/this._f;
-        }
-    }
-        
-});
Index: urce/class/pf/ui/canvas/Canvas.js
===================================================================
--- source/class/pf/ui/canvas/Canvas.js	(revision 348)
+++ 	(revision )
@@ -1,109 +1,0 @@
-// global
-var jsGraphics;
-
-qx.Class.define("pf.ui.canvas.Canvas",
-{
-    extend: qx.ui.core.Widget,
-    
-    construct: function() {
-        this.base(arguments);
-
-        var layout = new qx.ui.layout.Grow();
-        this._setLayout(layout);
-        
-        var canvas = new qx.ui.core.Widget();
-        canvas.setWidth(1000);
-        canvas.setHeight(1000);
-        this._add(canvas);
-        
-        this.addListener("appear", function(e) {
-                if (!this.jg) {
-                    var element = canvas.getContentElement().getDomElement();
-                    this.jg = new jsGraphics(element);
-                    // FIXME: get from qx
-                    this.jg.ftSz = 12;
-                }
-            }, this);
-    },
-
-    members:
-    {
-        getJg: function()
-        {
-            return this.jg;
-        },
-
-        clear: function()
-        {
-            if (this.jg) {
-                this.jg.clear();
-            }
-        },
-        
-        setColor: function(color)
-        {
-            if (this.jg && color) {
-                this.jg.setColor(color);
-            }
-        },
-        
-        setStroke: function(stroke)
-        {
-            if (this.jg && stroke) {
-                this.jg.setStroke(stroke);
-            }
-        },
-        
-        paint: function()
-        {
-            if (this.jg) {
-                this.jg.paint();
-            }
-        },
-        
-        setPrintable: function(onoff)
-        {
-            if (this.jg) {
-                this.jg.setPrintable(onoff);
-            }
-        },
-
-        drawString: function(x, y, str, halign, valign, angle)
-        {
-            var jg = this.jg;
-            if (!jg) {
-                return 0;
-            }
-            
-            var width  = Math.ceil(0.75*jg.ftSz*str.length);
-            var height = jg.ftSz;
-            
-            switch (halign) {
-            case "right":
-                x -= width;
-                break;
-            case "left":
-                // no adjustment
-                break;
-            default:
-                x -= (width/2 - 1);
-                break;
-            }
-            
-            switch (valign) {
-            case "top":
-                // no adjustment
-                break;
-            case "bottom":
-                y -= height;
-                break;
-            default:
-                y -= (height/2 + 1);
-                break;
-            }
-            jg.drawStringRect(str, x, y, width, halign, angle);
-            
-            return width;
-        }
-    }
-});
Index: urce/class/pf/ui/canvas/Plotter.js
===================================================================
--- source/class/pf/ui/canvas/Plotter.js	(revision 347)
+++ 	(revision )
@@ -1,415 +1,0 @@
-function aPoint(x, y)
-{
-    var p = new Array;
-    p.x = x; p.y = y;
-    
-    return p;
-}
-
-function nicenum(x)
-{
-    var xsign, f, y, fexp, rx, sx;
-    
-    if (x == 0.0) {
-        return(0.0);
-    }
-
-    xsign = x/Math.abs(x);
-    x = Math.abs(x);
-
-    fexp = Math.floor(Math.log(x)/Math.log(10));
-    sx = x/Math.pow(10.0, fexp)/10.0;       // scaled x
-    rx = Math.floor(sx);                    // rounded x
-    f = 10*(sx - rx);                       // fraction between 0 and 10
-
-    if (f < 1.5) {
-        y = 1;
-    } else
-    if (f < 3.0) {
-        y = 2;
-    } else
-    if (f < 7.0) {
-        y = 5;
-    } else {
-        y = 10;
-    }
-    
-    sx = rx + y/10.0;
-    
-    return (xsign*sx*10.0*Math.pow(10.0, fexp));
-}
-
-qx.Class.define("pf.ui.canvas.Plotter",
-{
-    extend: pf.ui.canvas.Canvas,
-    
-    construct: function() {
-        this.base(arguments);
-
-        this._setLayout(new qx.ui.layout.Basic());
-
-        this.setCursor("crosshair");
-
-        var v = new Array;
-        v.xmin = 0.1;
-        v.xmax = 0.9;
-        v.ymin = 0.1;
-        v.ymax = 0.9;
-        var w = new Array;
-        w.xmin = 0.0;
-        w.xmax = 1.0;
-        w.ymin = 0.0;
-        w.ymax = 1.0;
-        
-        this.v = v;
-        this.w = w;
-
-        var tracker = new qx.ui.basic.Label("X:<br>Y:");
-        tracker.setRich(true);
-        var decorator = new qx.ui.decoration.Decorator();
-        decorator.setWidth(1);
-        decorator.setColor("black");
-        tracker.setDecorator(decorator);
-        tracker.hide();
-        tracker.dp = aPoint();
-        tracker.vp = aPoint();
-        tracker.wp = aPoint();
-        
-        this._add(tracker, {left: 20, top: 20});
-        this.tracker = tracker;
-        
-        this.addListener("mousemove", function(ev) {
-                var tracker = this.tracker;
-                var el = this.getContentElement().getDomElement();
-                tracker.dp.x = ev.getViewportLeft() -
-                    qx.bom.element.Location.getLeft(el);
-                tracker.dp.y = ev.getViewportTop() -
-                    qx.bom.element.Location.getTop(el);
-                this.dPoint2vPoint(tracker.dp, tracker.vp);
-                if (this.isInsideViewport(tracker.vp)) {
-                    this.vPoint2wPoint(tracker.vp, tracker.wp);
-
-                    tracker.show();
-                    
-                    tracker.setValue(
-                            "X: " + pf.util.Format.numPrint(tracker.wp.x) +
-                        "<br>Y: " + pf.util.Format.numPrint(tracker.wp.y));
-
-                    tracker.setDomPosition(tracker.dp.x + 12,
-                                           tracker.dp.y + 12);
-                } else {
-                    tracker.hide();
-                }
-            }, this);
-        
-        this.addListener("mouseout", function(ev) {
-                tracker.hide();
-            });
-    },
-    
-    members:
-    {
-        vPoint2dPoint: function(vp, p)
-        {
-            var dims   = this.getInnerSize();
-            var width  = dims.width;
-            var height = dims.height;
-            
-            p.x = Math.round(width*vp.x);
-            p.y = Math.round(height*(1.0 - vp.y));
-        },
-        
-        dPoint2vPoint: function(dp, vp)
-        {
-            var dims   = this.getInnerSize();
-            var width  = dims.width;
-            var height = dims.height;
-            
-            vp.x = dp.x/width;
-            vp.y = 1.0 - dp.y/height;
-        },
-        
-        wPoint2vPoint: function(wp, vp)
-        {
-            var v = this.v;
-            var w = this.w;
-            
-            vp.x = v.xmin + (wp.x - w.xmin)/(w.xmax - w.xmin)*(v.xmax - v.xmin);
-            vp.y = v.ymin + (wp.y - w.ymin)/(w.ymax - w.ymin)*(v.ymax - v.ymin);
-        },
-        
-        vPoint2wPoint: function(vp, wp)
-        {
-            var v = this.v;
-            var w = this.w;
-            
-            wp.x = w.xmin + (vp.x - v.xmin)/(v.xmax - v.xmin)*(w.xmax - w.xmin);
-            wp.y = w.ymin + (vp.y - v.ymin)/(v.ymax - v.ymin)*(w.ymax - w.ymin);
-        },
-        
-        drawLineV: function(vp1, vp2)
-        {
-            var jg = this.jg;
-            if (!jg) {
-                return;
-            }
-            
-            var p1 = aPoint();
-            var p2 = aPoint();
-            
-            this.vPoint2dPoint(vp1, p1);
-            this.vPoint2dPoint(vp2, p2);
-            
-            jg.drawLine(p1.x, p1.y, p2.x, p2.y);
-        },
-        
-        drawRectV: function(vp1, vp2)
-        {
-            var jg = this.jg;
-            if (!jg) {
-                return;
-            }
-            
-            var p1 = aPoint();
-            var p2 = aPoint();
-            
-            this.vPoint2dPoint(vp1, p1);
-            this.vPoint2dPoint(vp2, p2);
-            
-            var x, y, width, height;
-            if (p1.x < p2.x) {
-                x = p1.x;
-                width = p2.x - p1.x;
-            } else {
-                x = p2.x;
-                width = p1.x - p2.x;
-            }
-            if (p1.y < p2.y) {
-                y = p1.y;
-                height = p2.y - p1.y;
-            } else {
-                y = p2.y;
-                height = p1.y - p2.y;
-            }
-            
-            jg.drawRect(x, y, width, height);
-        },
-        
-        drawStringV: function(vp, str, halign, valign, angle)
-        {
-            var jg = this.jg;
-            if (!jg) {
-                return 0;
-            }
-            
-            var p = aPoint();
-            
-            this.vPoint2dPoint(vp, p);
-            
-            return this.drawString(p.x, p.y, str, halign, valign, angle);
-        },
-        
-        setViewportCoordinates: function(vxmin, vymin, vxmax, vymax)
-        {
-            this.v.xmin = vxmin;
-            this.v.ymin = vymin;
-            this.v.xmax = vxmax;
-            this.v.ymax = vymax;
-        },
-        
-        setWorldCoordinates: function(wxmin, wymin, wxmax, wymax)
-        {
-            this.w.xmin = Math.min(wxmin, wxmax);
-            this.w.ymin = Math.min(wymin, wymax);
-            this.w.xmax = Math.max(wxmin, wxmax);
-            this.w.ymax = Math.max(wymin, wymax);
-        },
-        
-        isInsideViewport: function(vp) {
-            var v = this.v;
-            if (vp.x >= v.xmin && vp.x <= v.xmax &&
-                vp.y >= v.ymin && vp.y <= v.ymax) {
-                return true;
-            } else {
-                return false;
-            }
-        },
-        
-        drawPolyLineW: function(x, y)
-        {
-            var jg = this.jg;
-            if (!jg) {
-                return;
-            }
-            
-            var  p = aPoint();
-            var vp = aPoint();
-            var wp = aPoint();
-
-            var dx = new Array;
-            var dy = new Array;
-            for (var i = 0; i < x.length; i++) {
-                wp.x = x[i];
-                wp.y = y[i];
-                this.wPoint2vPoint(wp, vp);
-                this.vPoint2dPoint(vp, p);
-                dx.push(p.x);
-                dy.push(p.y);
-            }
-            
-            jg.drawPolyLine(dx, dy);
-        },
-        
-        drawFrame: function(color)
-        {
-            var v = this.v;
-
-            this.setColor(color);
-            
-            var vp1 = aPoint(v.xmin, v.ymin);
-            var vp2 = aPoint(v.xmax, v.ymax);
-
-            this.drawRectV(vp1, vp2);
-        },
-
-        drawLabel: function(axis, label, color)
-        {
-            var v = this.v;
-
-            this.setColor(color);
-            
-            var vp;
-            var offset;
-            var halign, valign, angle;
-            if (axis == "x") {
-                offset = 0.04;
-                vp = aPoint((v.xmin + v.xmax)/2, v.ymin - offset);
-                
-                halign = "center";
-                valign = "top";
-                angle = 0;
-            } else {
-                offset = this.twmax + 0.02;
-                vp = aPoint(v.xmin - offset, (v.ymin + v.ymax)/2);
-                
-                halign = "center";
-                valign = "bottom";
-                angle = 270;
-            }
-            
-            this.drawStringV(vp, label, halign, valign, angle);
-        },
-        
-        drawTicks: function(axis, color)
-        {
-            var v = this.v;
-            var w = this.w;
-            
-            // Number for autoticking
-            var naticks = 6;
-
-            this.setColor(color);
-            
-            var wp = aPoint();
-            var vp1 = aPoint();
-            var vp2 = aPoint();
-            
-            
-            var halign, valign;
-            var wmin, wmax;
-            if (axis == "x") {
-                wmin  = w.xmin;
-                wmax  = w.xmax;
-                
-                halign = "center";
-                valign = "top";
-            } else {
-                wmin  = w.ymin;
-                wmax  = w.ymax;
-                
-                halign = "right";
-                valign = "middle";
-            }
-            var range = wmax - wmin;
-            
-            var wval;
-            var tmajor = nicenum(range/(naticks - 1));
-            
-            var prec = Math.round(Math.log(Math.max(Math.abs(wmax),
-                Math.abs(wmin))/tmajor)/Math.log(10));
-            
-            var nmajor = Math.ceil(range/tmajor + 1);
-            var nticks = (nmajor - 1)*2 + 1;
-            
-            var wstart = Math.floor(wmin/tmajor)*tmajor;
-            
-            var twmax = 0;
-            for (var i = 0; i < nticks; i++) {
-                wval = wstart + i*tmajor/2;
-                if (axis == "x") {
-                    wp.x = wval;
-                    wp.y = w.ymin;
-                } else {
-                    wp.x = w.xmin;
-                    wp.y = wval;
-                }
-                
-                if (wval < wmin || wval > wmax) {
-                    continue;
-                }
-                
-                this.wPoint2vPoint(wp, vp1);
-                
-                var major_tick;
-                var tick_length;
-                if (i % 2) {
-                    major_tick = false;
-                    tick_length = 0.01;
-                } else {
-                    major_tick = true;
-                    tick_length = 0.02;
-                }
-                
-                if (axis == "x") {
-                    vp2.x = vp1.x;
-                    vp2.y = vp1.y + tick_length;
-                } else {
-                    vp2.x = vp1.x + tick_length;
-                    vp2.y = vp1.y;
-                }
-                this.drawLineV(vp1, vp2);
-                
-                // Tick label offset
-                if (axis == "x") {
-                    vp1.y -= 0.01;
-                } else {
-                    vp1.x -= 0.01;
-                }
-                
-                if (major_tick) {
-                    var tlabel = pf.util.Format.numPrint(wval, prec);
-                    var tw = this.drawStringV(vp1, tlabel, halign, valign);
-                    if (tw > twmax) {
-                        twmax = tw;
-                    }
-                }
-            }
-            
-            var dims   = this.getInnerSize();
-            this.twmax = twmax/dims.width;
-        },
-        
-        drawTitle: function(title, color)
-        {
-            var v = this.v;
-
-            this.setColor(color);
-            
-            var offset = 0.03;
-            
-            var vp = aPoint((v.xmin + v.xmax)/2, v.ymax + offset);
-            
-            this.drawStringV(vp, title, "center", "bottom");
-        }
-    }
-});
Index: urce/class/pf/ui/table/cellrenderer/BgColor.js
===================================================================
--- source/class/pf/ui/table/cellrenderer/BgColor.js	(revision 153)
+++ 	(revision )
@@ -1,21 +1,0 @@
-qx.Class.define("pf.ui.table.cellrenderer.BgColor",
-{
-    extend : qx.ui.table.cellrenderer.Abstract,
-
-    members :
-    {
-        // overridden
-        _getCellStyle : function(cellInfo)
-        {
-            var style = "background-color:" + cellInfo.value + ";";
-            return style;
-        },
-
-        // overridden
-        _getContentHtml : function(cellInfo)
-        {
-            var html = "&nbsp";
-            return html;
-        }
-    }
-});
Index: urce/class/pf/util/Format.js
===================================================================
--- source/class/pf/util/Format.js	(revision 80)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * Based on sprintf() for JS v.0.4 by Alexandru Marasteanu
- * <http://alexei.417.ro/>
- */
-
-qx.Class.define("pf.util.Format",
-{
-    statics :
-    {
-        _strRepeat : function(i, m)
-        {
-            for (var o = []; m > 0; o[--m] = i);
-            return(o.join(''));
-        },
-        
-        sprintf : function()
-        {
-            var i = 0, a, f = arguments[i++], o = [], m, p, c, x;
-            while (f) {
-              if (m = /^[^\x25]+/.exec(f)) o.push(m[0]);
-              else if (m = /^\x25{2}/.exec(f)) o.push('%');
-              else if (m = /^\x25(?:(\d+)\$)?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(f)) {
-                if (((a = arguments[m[1] || i++]) == null) || (a == undefined)) throw("Too few arguments.");
-                if (/[^s]/.test(m[7]) && (typeof(a) != 'number'))
-                  throw("Expecting number but found " + typeof(a));
-                switch (m[7]) {
-                  case 'b': a = a.toString(2); break;
-                  case 'c': a = String.fromCharCode(a); break;
-                  case 'd': a = parseInt(a); break;
-                  case 'e': a = m[6] ? a.toExponential(m[6]) : a.toExponential(); break;
-                  case 'f': a = m[6] ? parseFloat(a).toFixed(m[6]) : parseFloat(a); break;
-                  case 'o': a = a.toString(8); break;
-                  case 's': a = ((a = String(a)) && m[6] ? a.substring(0, m[6]) : a); break;
-                  case 'u': a = Math.abs(a); break;
-                  case 'x': a = a.toString(16); break;
-                  case 'X': a = a.toString(16).toUpperCase(); break;
-                }
-                a = (/[def]/.test(m[7]) && m[2] && a > 0 ? '+' + a : a);
-                c = m[3] ? m[3] == '0' ? '0' : m[3].charAt(1) : ' ';
-                x = m[5] - String(a).length;
-                p = m[5] ? this._strRepeat(c, x) : '';
-                o.push(m[4] ? a + p : p + a);
-              }
-              else throw ("Huh ?!");
-              f = f.substring(m[0].length);
-            }
-            return o.join('');
-        },
-        
-        numPrint : function(v, prec)
-        {
-            var s;
-
-            if (prec == null) {
-                prec = 3;
-            }
-
-            if (v == 0.0) {
-                s = "0";
-            } else
-            if (!isFinite(v)) {
-                s = v;
-            } else
-            if (Math.abs(v) < 1.e6 && Math.abs(v) >= 0.1) {
-                s = this.sprintf("%." + prec.toString() + "f", v);
-            } else {
-                s = this.sprintf("%." + prec.toString() + "e", v);
-            }
-
-            return s;
-        }
-    }
-});
Index: urce/entities.js
===================================================================
--- source/entities.js	(revision 381)
+++ 	(revision )
@@ -1,589 +1,0 @@
-var plasma_entities = new Array(
-    {
-        id        : "plasma_frequency",
-        name      : "Plasma frequency",
-        dimension : "frequency",
-        nspecies  : 1,
-        section   : "waves",
-        formula   : "return s1.getPlasmaFrequency()",
-        wikiLink  : "Plasma_oscillation"
-    },
-    {
-        id        : "gyrofrequency",
-        name      : "Gyrofrequency",
-        dimension : "frequency",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getGyroFrequency(this.plasma.B)",
-        wikiLink  : "Cyclotron_resonance"
-    },
-
-    {
-        id        : "wigner_seitz_radius",
-        name      : "Typical inter-particle distance",
-        dimension : "length",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getTypicalDistance()",
-        wikiLink  : "Wigner-Seitz_radius"
-    },
-    {
-        id        : "debye_length",
-        name      : "Debye length",
-        dimension : "length",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getDebyeLength()",
-        wikiLink  : "Debye_length"
-    },
-    {
-        id        : "full_debye_length",
-        name      : "Full Debye length",
-        dimension : "length",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return this.plasma.getFullDebyeLength(s1)",
-        wikiLink  : "Debye_length"
-    },
-    {
-        id        : "gyroradius",
-        name      : "Gyroradius",
-        dimension : "length",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getGyroRadius(this.plasma.B)",
-        wikiLink  : "Gyroradius"
-    },
-    {
-        id        : "distance_of_minimal_approach",
-        name      : "Distance of minimal approach",
-        dimension : "length",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getMinApproachDistance()",
-        wikiLink  : "Coulomb_collision"
-    },
-    {
-        id        : "inertial_length",
-        name      : "Inertial length",
-        dimension : "length",
-        nspecies  : 1,
-        section   : "waves",
-        formula   : "return s1.getInertialLength()",
-        wikiLink  : "Inertial_length"
-    },
-    {
-        id        : "de_broglie_wavelength",
-        name      : "De Broglie wavelength",
-        dimension : "length",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getDeBroglieLength()",
-        wikiLink  : "Matter_wave"
-    },
-
-    {
-        id        : "thermal_velocity",
-        name      : "Thermal velocity",
-        dimension : "velocity",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getThermalVelocity()",
-        wikiLink  : "Thermal_velocity"
-    },
-    {
-        id        : "alfven_velocity",
-        name      : "Alfven velocity",
-        dimension : "velocity",
-        nspecies  : 0,
-        section   : "waves",
-        formula   : "return this.plasma.getAlfvenVelocity(this.plasma.B)",
-        wikiLink  : "Alfven_velocity"
-    },
-    {
-        id        : "sound_velocity",
-        name      : "Sound velocity",
-        dimension : "velocity",
-        nspecies  : 0,
-        section   : "waves",
-        formula   : "return this.plasma.getSoundVelocity()",
-        wikiLink  : "Speed_of_sound"
-    },
-
-    {
-        id        : "coupling_parameter",
-        name      : "Coupling parameter",
-        dimension : "none",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getCoupling()",
-        wikiLink  : "Plasma_parameter"
-    },
-    {
-        id        : "typical_debye_screening",
-        name      : "Typical Debye screening",
-        dimension : "none",
-        nspecies  : 1,
-        section   : "spectroscopy",
-        formula   : "var r = s1.getTypicalDistance()/s1.getDebyeLength(); \
-                     return (1 + r)*Math.exp(-r)",
-        wikiLink  : "Debye_length"
-    },
-
-    {
-        id        : "transition_energy",
-        name      : "Transition energy",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getTransitionEnergy()",
-        wikiLink  : "Discrete_spectrum"
-    },
-    {
-        id        : "natural_linewidth",
-        name      : "Natural linewidth",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getNaturalWidth()",
-        wikiLink  : "Spontaneous_emission"
-    },
-    {
-        id        : "natural_linewidth_wl",
-        name      : "Natural linewidth (wl)",
-        dimension : "length",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.dE2dWl(this.plasma.r.getNaturalWidth())",
-        wikiLink  : "Spontaneous_emission"
-    },
-    {
-        id        : "Fine_structure",
-        name      : "Fine structure",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getFineStructure()",
-        wikiLink  : "Fine_structure"
-    },
-    {
-        id        : "Fine_structure_wl",
-        name      : "Fine structure (wl)",
-        dimension : "length",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.dE2dWl(this.plasma.r.getFineStructure())",
-        wikiLink  : "Fine_structure"
-    },
-    {
-        id        : "doppler_fwhm",
-        name      : "Doppler FWHM",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return 2*this.plasma.r.getDopplerHwhm()",
-        wikiLink  : "Doppler_broadening"
-    },
-    {
-        id        : "doppler_fwhm_wl",
-        name      : "Doppler FWHM (wl)",
-        dimension : "length",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.dE2dWl(2*this.plasma.r.getDopplerHwhm())",
-        wikiLink  : "Doppler_broadening"
-    },
-    {
-        id        : "zeeman_splitting",
-        name      : "Zeeman splitting",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return 2*this.plasma.getZeemanSplitting()",
-        wikiLink  : "Zeeman_effect"
-    },
-    {
-        id        : "zeeman_splitting_wl",
-        name      : "Zeeman splitting (wl)",
-        dimension : "length",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.dE2dWl(2*this.plasma.getZeemanSplitting())",
-        wikiLink  : "Zeeman_effect"
-    },
-    {
-        id        : "total_stark_fwhm",
-        name      : "Total Stark FWHM",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return 2*this.plasma.getTotalStarkHwhm()",
-        wikiLink  : "Stark_effect"
-    },
-    {
-        id        : "total_stark_fwhm_wl",
-        name      : "Total Stark FWHM (wl)",
-        dimension : "length",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.dE2dWl(2*this.plasma.getTotalStarkHwhm())",
-        wikiLink  : "Stark_effect"
-    },
-    {
-        id        : "stark_fwhm",
-        name      : "Stark FWHM",
-        dimension : "energy",
-        nspecies  : 1,
-        prepos    : "due to",
-        section   : "spectroscopy",
-        formula   : "return 2*this.plasma.getStarkHwhm(s1)",
-        wikiLink  : "Stark_effect"
-    },
-
-    {
-        id        : "qs_stark_fwhm",
-        name      : "QS Stark FWHM",
-        dimension : "energy",
-        nspecies  : 1,
-        prepos    : "due to",
-        section   : "spectroscopy",
-        formula   : "return 2*this.plasma.getQsHwhm(s1)"
-    },
-    {
-        id        : "qs_stark_fwhm0",
-        name      : "QS Stark FWHM0",
-        dimension : "energy",
-        nspecies  : 1,
-        prepos    : "due to",
-        section   : "spectroscopy",
-        formula   : "return 2*1.4385*this.plasma.getDelta0(s1)"
-    },
-
-    {
-        id        : "dynamic_stark_range",
-        name      : "Dynamic Stark range",
-        dimension : "energy",
-        nspecies  : 1,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.getMicrofieldFrequency(s1)"
-    },
-
-    {
-        id        : "minimal_energy_distance",
-        name      : "Minimal energy distance",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getMinEnergyDistance()"
-    },
-
-    {
-        id        : "plasma_polarization_shift",
-        name      : "Plasma polarization shift",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.getPPS()"
-    },
-    {
-        id        : "plasma_polarization_shift_wl",
-        name      : "Plasma polarization shift (wl)",
-        dimension : "length",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return -this.plasma.dE2dWl(this.plasma.getPPS())"
-    },
-
-    {
-        id        : "plasmon_energy",
-        name      : "Plasmon energy",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.e.getPlasmaFrequencyW()",
-        wikiLink  : "Plasmon"
-    },
-    {
-        id        : "fermi_energy",
-        name      : "Fermi energy",
-        dimension : "energy",
-        nspecies  : 0,
-        section   : "fundamental",
-        formula   : "return this.plasma.getFermiEnergy()",
-        wikiLink  : "Fermi_energy"
-    },
-    {
-        id        : "fermi_velocity",
-        name      : "Fermi velocity",
-        dimension : "velocity",
-        nspecies  : 0,
-        section   : "fundamental",
-        formula   : "return this.plasma.getFermiVelocity()",
-        wikiLink  : "Fermi_energy"
-    },
-    {
-        id        : "fermi_length",
-        name      : "Fermi screening length",
-        dimension : "length",
-        nspecies  : 0,
-        section   : "fundamental",
-        formula   : "return this.plasma.getFermiLength()",
-        wikiLink  : "Electric-field_screening"
-    },
-    {
-        id        : "chemical_potential",
-        name      : "Chemical potential",
-        dimension : "energy",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getChemicalPotential()",
-        wikiLink  : "Chemical_potential"
-    },
-
-    {
-        id        : "mass_density",
-        name      : "Mass density",
-        dimension : "mass_density",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getMassDensity()",
-        wikiLink  : "Density"
-    },
-    {
-        id        : "mass_density",
-        name      : "Total mass density",
-        dimension : "mass_density",
-        nspecies  : 0,
-        section   : "fundamental",
-        formula   : "return this.plasma.getMassDensity()",
-        wikiLink  : "Density"
-    },
-
-    {
-        id        : "beta",
-        name      : "Beta",
-        dimension : "none",
-        nspecies  : 0,
-        section   : "fundamental",
-        formula   : "return this.plasma.getBeta()",
-        wikiLink  : "Beta_(plasma_physics)"
-    },
-    
-    {
-        id        : "transition_wavelength",
-        name      : "Transition wavelength",
-        dimension : "length",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return pf.base.Bohr.c/this.plasma.r.getTransitionEnergy()*(2*Math.PI)",
-        wikiLink  : "Discrete_spectrum"
-    },
-    {
-        id        : "transition_frequency",
-        name      : "Transition frequency",
-        dimension : "frequency",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getTransitionEnergy()/(2*Math.PI)",
-        wikiLink  : "Discrete_spectrum"
-    },
-
-    {
-        id        : "f_abs",
-        name      : "Oscillator strength",
-        dimension : "none",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getOscillatorStrength()",
-        wikiLink  : "Oscillator_strength"
-    },
-    {
-        id        : "A",
-        name      : "Einstein coefficient",
-        dimension : "frequency",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getEinsteinA()",
-        wikiLink  : "Einstein_coefficients"
-    },
-
-    {
-        id        : "LTE_parameter",
-        name      : "LTE parameter",
-        dimension : "none",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.e.getN()/this.plasma.getLteNe()",
-        wikiLink  : "Local_thermodynamic_equilibrium"
-    },
-    
-    {
-        id        : "stark_quasistaticity",
-        name      : "Stark quasistaticity",
-        dimension : "none",
-        nspecies  : 1,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.getStarkQuasistaticity(s1)"
-    },
-    {
-        id        : "static_to_dynamic_stark_ratio",
-        name      : "Static/dynamic Stark ratio",
-        dimension : "none",
-        nspecies  : 1,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.getStarkRatio(s1)"
-    },
-
-    {
-        id        : "holtsmark_field",
-        name      : "Holtsmark field",
-        dimension : "efield",
-        nspecies  : 1,
-        section   : "spectroscopy",
-        formula   : "return s1.getHoltsmarkField()"
-    },
-
-    {
-        id        : "microfield_frequency",
-        name      : "Microfield frequency",
-        dimension : "frequency",
-        nspecies  : 1,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.getMicrofieldFrequency(s1)"
-    },
-    
-    {
-        id        : "cyclotron_losses",
-        name      : "Cyclotron losses",
-        dimension : "power_density",
-        nspecies  : 1,
-        section   : "radiation",
-        formula   : "return s1.getCyclotronLosses(this.plasma.B)",
-        wikiLink  : "Cyclotron_radiation"
-    },
-    
-    {
-        id        : "free-free_losses",
-        name      : "Free-free losses",
-        dimension : "power_density",
-        nspecies  : 0,
-        section   : "radiation",
-        formula   : "return this.plasma.getBremsstrahlungLosses()",
-        wikiLink  : "Bremsstrahlung"
-    },
-    
-    {
-        id        : "dree-free_spectral_density",
-        name      : "Free-free spectral density",
-        dimension : "spectral_power_density",
-        nspecies  : 0,
-        section   : "radiation",
-        formula   : "return this.plasma.getBremsstrahlungSpectralDensity()",
-        wikiLink  : "Bremsstrahlung"
-    },
-    
-    {
-        id        : "free-bound_losses",
-        name      : "Free-bound losses",
-        dimension : "power_density",
-        nspecies  : 0,
-        section   : "radiation",
-        formula   : "return this.plasma.getFreeBoundLosses()"
-    },
-    
-    {
-        id        : "free-bound_spectral_density",
-        name      : "Free-bound spectral density",
-        dimension : "spectral_power_density",
-        nspecies  : 0,
-        section   : "radiation",
-        formula   : "return this.plasma.getFreeBoundSpectralDensity()"
-    },
-    
-    {
-        id        : "ideal_gas_pressure",
-        name      : "Ideal gas pressure",
-        dimension : "pressure",
-        nspecies  : 1,
-        section   : "fundamental",
-        formula   : "return s1.getPressure()",
-        wikiLink  : "Ideal_gas"
-    },
-    
-    {
-        id        : "total_pressure",
-        name      : "Total gas pressure",
-        dimension : "pressure",
-        nspecies  : 0,
-        section   : "fundamental",
-        formula   : "return this.plasma.getPressure()",
-        wikiLink  : "Ideal_gas"
-    },
-    
-    {
-        id        : "magnetic_field_pressure",
-        name      : "Magnetic field pressure",
-        dimension : "pressure",
-        nspecies  : 0,
-        section   : "fundamental",
-        formula   : "return this.plasma.getMagneticFieldPressure()",
-        wikiLink  : "Magnetic_pressure"
-    },
-    
-    {
-        id        : "coulomb_logarithm",
-        name      : "Coulomb logarithm",
-        dimension : "none",
-        nspecies  : 2,
-        section   : "collisions",
-        formula   : "return this.plasma.getCoulombLog(s1, s2)",
-        wikiLink  : "Coulomb_collision"
-    },
-
-    {
-        id        : "relaxation_rate",
-        name      : "Relaxation rate",
-        dimension : "frequency",
-        nspecies  : 2,
-        section   : "collisions",
-        formula   : "return this.plasma.getRelaxationRate(s1, s2)",
-        wikiLink  : "Coulomb_collision"
-    },
-
-    {
-        id        : "thomson_cross-section",
-        name      : "Thomson cross-section",
-        dimension : "area",
-        nspecies  : 1,
-        section   : "collisions",
-        formula   : "return s1.getThomsonXsTotal()",
-        wikiLink  : "Thomson_scattering"
-    },
-
-    {
-        id        : "classical_ionization_field",
-        name      : "Classical ionization field",
-        dimension : "efield",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getClassicalIonizationField()"
-    },
-    {
-        id        : "inglis_teller_field",
-        name      : "Inglis-Teller field",
-        dimension : "efield",
-        nspecies  : 0,
-        section   : "spectroscopy",
-        formula   : "return this.plasma.r.getInglisTellerField()",
-        wikiLink  : "Inglis-Teller_equation"
-    },
-    {
-        id        : "dreicer_field",
-        name      : "Dreicer field",
-        dimension : "efield",
-        nspecies  : 0,
-        section   : "collisions",
-        formula   : "return this.plasma.getDreicerField()",
-        wikiLink  : "Dreicer_field"
-    }
-);
Index: source/index.html
===================================================================
--- source/index.html	(revision 322)
+++ source/index.html	(revision 0)
@@ -1,147 +1,7 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<html>
   <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>Plasma Formulary Interactive</title>
-    <link rel="icon" type="image/png" href="pf_icon.png" />
-
-    <style type="text/css">
-      body {
-        font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
-        font-size:   12pt;
-      }
-      
-      span.interactive:hover {
-        font-style: oblique;
-      }
-      
-      table {
-        width:        800px;
-        padding:      6px;
-        margin-left:  auto;
-        margin-right: auto;
-        margin-top:   20px;
-        border:       2px solid #808080;
-        background:   #ffffe7;
-      }
-      td.button {
-        width: 25%;
-      }
-      
-      p.text {
-        text-align:  justify;
-        text-indent: 20pt;
-      }
-      
-      input {
-        width:       150px;
-        border:      1px solid #808080;
-        margin:      2px;
-        background:  #e0e0f0;
-        font-size:   12pt;
-        font-weight: bold;
-      }
-      input:hover {
-        border:     2px solid blue;
-        margin:     1px;
-        background: #b0e0ff;
-      }
-      
-      img {
-        border: 0px;
-      }
-    </style>
-
+    <title>Custom Application</title>
+    <script type="text/javascript" src="script/pf.js"></script>
   </head>
-  <body>
-
-    <noscript>
-      <p>
-        JavaScript is <span style="color:red;">disabled</span>! Please enable it
-        in order to use <i>Plasma Formulary</i>.
-      </p>
-    </noscript>
-
-    <table>
-      <tr align="center">
-        <td colspan="4">
-          <h1>Plasma Formulary <span class="interactive">Interactive</span></h1>
-        </td>
-      </tr>
-      <tr><td colspan="4">
-        <p class="text">
-          <i>Plasma Formulary</i> is an interactive, Web-based application that
-          provides a comfortable access to evaluating, comparing, and plotting
-          of a multitude of different plasma and atomic physics parameters,
-          grouped by the unit dimensions. A special attention is devoted to the
-          Stark broadening which is calculated with a good accuracy for
-          transitions between degenerate atomic levels. The list of the entities
-          calculated encompasses over one hundred entries and is easily
-          expandable.
-        </p>
-        <p class="text">
-          The application is built using open-source components and is
-          compatible with a majority of modern browsers.
-        </p>
-      </td></tr>
-      <tr align="center">
-        <td class="button">
-          <input type="button" value="User's Guide" 
-            onclick="window.open('resource/pf/html/ug.html',
-                                 'ug', 'width=850,scrollbars=1')"/>
-        </td>
-        <td class="button">
-          <input type="button" value="Reference" 
-            onclick="window.open('http://dx.doi.org/10.1088/1748-0221/6/10/P10009',
-                                 'gpl', 'width=850,scrollbars=1')"/>
-        </td>
-        <td class="button">
-          <input type="button" value="License Terms" 
-            onclick="window.open('resource/pf/html/GPL.html',
-                                 'gpl', 'width=850,scrollbars=1')"/>
-        </td>
-        <td class="button">
-          <input type="button" value="Development" 
-            onclick="window.location='http://plasma-gate.weizmann.ac.il/pf/trac'"/>
-        </td>
-      </tr>
-      <tr align="center">
-        <td class="button" colspan="2">
-          <input type="button" value="Download" 
-            onclick="window.location='pf.zip'"/>
-        </td>
-
-        <td class="button" colspan="2">
-        <p>
-          <input type="button" value="Launch Now!" 
-            onclick="window.open('pf.html','pf','width=800,height=550')"/>
-        </p>
-        </td>
-      </tr>
-      <tr>
-        <td align="left">
-          <a href="http://www.opensource.org/" target="_blank">
-            <img src="resource/pf/image/opensource.png"
-                 alt="Open Source Initiative"
-                 style="width:64px;height:64px;vertical-align:middle" /></a>
-          <a href="http://www.qooxdoo.org/" target="_blank">
-            <img src="resource/pf/image/qx_powered.png"
-                 alt="Qooxdoo"
-                 style="width:91px;height:43px;vertical-align:middle" /></a>
-        </td>
-        <td colspan="2"/>
-        <td align="right">
-          <a href="http://jigsaw.w3.org/css-validator/check/referer" target="_blank">
-            <img src="resource/pf/image/valid-css3.png"
-                 alt="Valid CSS"
-                 style="width:88px;height:31px;vertical-align:middle" /></a>
-          <a href="http://validator.w3.org/check?uri=referer" target="_blank">
-            <img src="resource/pf/image/valid-xhtml10.png"
-                 alt="Valid XHTML 1.0 Strict"
-                 style="width:88px;height:31px;vertical-align:middle" /></a>
-        </td>
-      </tr>
-    </table>
-  </body>
 </html>
Index: urce/pf.html
===================================================================
--- source/pf.html	(revision 377)
+++ 	(revision )
@@ -1,27 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>Plasma Formulary Interactive</title>
-    <link rel="icon" type="image/png" href="pf_icon.png" />
-    <script type="text/javascript">
-      window.qx = {
-        $$environment : {
-          "pf.version" : "1.2"
-        }
-      }
-    </script>
-    <script type="text/javascript" src="script/pf.js"></script>
-    <script type="text/javascript" src="wz_jsgraphics.js"></script>
-    <script type="text/javascript" src="entities.js"></script>
-  </head>
-  <body>
-    <noscript>
-      <p>
-        JavaScript is <span style="color:red;">disabled</span>! Please enable it
-        in order to use <i>Plasma Formulary</i>.
-      </p>
-    </noscript>
-  </body>
-</html>
Index: urce/readme.txt
===================================================================
--- source/readme.txt	(revision 265)
+++ 	(revision )
@@ -1,9 +1,0 @@
-
- +----------------------------------------------------------+
- | Un-zip the contents of this archive to any place on your |
- | disk. This will result in directory "pf" created, with a |
- | file  named  "index.html"  inside.  Open it  in your Web |
- | browser of choice  (double-clicking on the file  will do |
- | it usually).                                             |
- +----------------------------------------------------------+
- 
Index: urce/resource/pf/html/GPL.html
===================================================================
--- source/resource/pf/html/GPL.html	(revision 125)
+++ 	(revision )
@@ -1,709 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
-<head>
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<link rel="icon" type="image/png" href="/graphics/gnu-head-mini.png" />
-<meta name="DC.title" content="gnu.org" />
-
-<title>The GNU General Public License - GNU Project - Free Software Foundation (FSF)</title>
-
-</head>
-
-<body>
-
-<hr style="clear: both;" />
-
-<!-- The license text is in English and appears broken in RTL as
-     Arabic, Farsi, etc.  Explicitly set the direction to override the
-     one defined in the translation. -->
-<div dir="ltr">
-<h1 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h1>
-<p style="text-align: center;">Version 3, 29 June 2007</p>
-
-<p>Copyright &copy; 2007 Free Software Foundation, Inc. &lt;http://fsf.org/&gt;</p><p>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.</p>
-
-<h1><a name="preamble"></a>Preamble</h1>
-
-<p>The GNU General Public License is a free, copyleft license for
-software and other kinds of works.</p>
-
-<p>The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.</p>
-
-<p>When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.</p>
-
-<p>To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.</p>
-
-<p>For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.</p>
-
-<p>Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.</p>
-
-<p>For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.</p>
-
-<p>Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.</p>
-
-<p>Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.</p>
-
-<p>The precise terms and conditions for copying, distribution and
-modification follow.</p>
-
-<h1><a name="terms"></a>TERMS AND CONDITIONS</h1>
-
-<h2><a name="section0"></a>0. Definitions.</h2>
-
-<p>&ldquo;This License&rdquo; refers to version 3 of the GNU General Public License.</p>
-
-<p>&ldquo;Copyright&rdquo; also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.</p>
- 
-<p>&ldquo;The Program&rdquo; refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as &ldquo;you&rdquo;.  &ldquo;Licensees&rdquo; and
-&ldquo;recipients&rdquo; may be individuals or organizations.</p>
-
-<p>To &ldquo;modify&rdquo; a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a &ldquo;modified version&rdquo; of the
-earlier work or a work &ldquo;based on&rdquo; the earlier work.</p>
-
-<p>A &ldquo;covered work&rdquo; means either the unmodified Program or a work based
-on the Program.</p>
-
-<p>To &ldquo;propagate&rdquo; a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.</p>
-
-<p>To &ldquo;convey&rdquo; a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.</p>
-
-<p>An interactive user interface displays &ldquo;Appropriate Legal Notices&rdquo;
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.</p>
-
-<h2><a name="section1"></a>1. Source Code.</h2>
-
-<p>The &ldquo;source code&rdquo; for a work means the preferred form of the work
-for making modifications to it.  &ldquo;Object code&rdquo; means any non-source
-form of a work.</p>
-
-<p>A &ldquo;Standard Interface&rdquo; means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.</p>
-
-<p>The &ldquo;System Libraries&rdquo; of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-&ldquo;Major Component&rdquo;, in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.</p>
-
-<p>The &ldquo;Corresponding Source&rdquo; for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.</p>
-
-<p>The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.</p>
-
-<p>The Corresponding Source for a work in source code form is that
-same work.</p>
-
-<h2><a name="section2"></a>2. Basic Permissions.</h2>
-
-<p>All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.</p>
-
-<p>You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.</p>
-
-<p>Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.</p>
-
-<h2><a name="section3"></a>3. Protecting Users' Legal Rights From Anti-Circumvention Law.</h2>
-
-<p>No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.</p>
-
-<p>When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.</p>
-
-<h2><a name="section4"></a>4. Conveying Verbatim Copies.</h2>
-
-<p>You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.</p>
-
-<p>You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.</p>
-
-<h2><a name="section5"></a>5. Conveying Modified Source Versions.</h2>
-
-<p>You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:</p>
-
-<ul>
-<li>a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.</li>
-
-<li>b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    &ldquo;keep intact all notices&rdquo;.</li>
-
-<li>c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.</li>
-
-<li>d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.</li>
-</ul>
-
-<p>A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-&ldquo;aggregate&rdquo; if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.</p>
-
-<h2><a name="section6"></a>6. Conveying Non-Source Forms.</h2>
-
-<p>You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:</p>
-
-<ul>
-<li>a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.</li>
-
-<li>b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.</li>
-
-<li>c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.</li>
-
-<li>d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.</li>
-
-<li>e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.</li>
-</ul>
-
-<p>A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.</p>
-
-<p>A &ldquo;User Product&rdquo; is either (1) a &ldquo;consumer product&rdquo;, which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, &ldquo;normally used&rdquo; refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.</p>
-
-<p>&ldquo;Installation Information&rdquo; for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.</p>
-
-<p>If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).</p>
-
-<p>The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.</p>
-
-<p>Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.</p>
-
-<h2><a name="section7"></a>7. Additional Terms.</h2>
-
-<p>&ldquo;Additional permissions&rdquo; are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.</p>
-
-<p>When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.</p>
-
-<p>Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:</p>
-
-<ul>
-<li>a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or</li>
-
-<li>b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or</li>
-
-<li>c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or</li>
-
-<li>d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or</li>
-
-<li>e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or</li>
-
-<li>f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.</li>
-</ul>
-
-<p>All other non-permissive additional terms are considered &ldquo;further
-restrictions&rdquo; within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.</p>
-
-<p>If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.</p>
-
-<p>Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.</p>
-
-<h2><a name="section8"></a>8. Termination.</h2>
-
-<p>You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).</p>
-
-<p>However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.</p>
-
-<p>Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.</p>
-
-<p>Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.</p>
-
-<h2><a name="section9"></a>9. Acceptance Not Required for Having Copies.</h2>
-
-<p>You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.</p>
-
-<h2><a name="section10"></a>10. Automatic Licensing of Downstream Recipients.</h2>
-
-<p>Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.</p>
-
-<p>An &ldquo;entity transaction&rdquo; is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.</p>
-
-<p>You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.</p>
-
-<h2><a name="section11"></a>11. Patents.</h2>
-
-<p>A &ldquo;contributor&rdquo; is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's &ldquo;contributor version&rdquo;.</p>
-
-<p>A contributor's &ldquo;essential patent claims&rdquo; are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, &ldquo;control&rdquo; includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.</p>
-
-<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.</p>
-
-<p>In the following three paragraphs, a &ldquo;patent license&rdquo; is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To &ldquo;grant&rdquo; such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.</p>
-
-<p>If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  &ldquo;Knowingly relying&rdquo; means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.</p>
-  
-<p>If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.</p>
-
-<p>A patent license is &ldquo;discriminatory&rdquo; if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.</p>
-
-<p>Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.</p>
-
-<h2><a name="section12"></a>12. No Surrender of Others' Freedom.</h2>
-
-<p>If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.</p>
-
-<h2><a name="section13"></a>13. Use with the GNU Affero General Public License.</h2>
-
-<p>Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.</p>
-
-<h2><a name="section14"></a>14. Revised Versions of this License.</h2>
-
-<p>The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.</p>
-
-<p>Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License &ldquo;or any later version&rdquo; applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.</p>
-
-<p>If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.</p>
-
-<p>Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.</p>
-
-<h2><a name="section15"></a>15. Disclaimer of Warranty.</h2>
-
-<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM &ldquo;AS IS&rdquo; WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
-
-<h2><a name="section16"></a>16. Limitation of Liability.</h2>
-
-<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.</p>
-
-<h2><a name="section17"></a>17. Interpretation of Sections 15 and 16.</h2>
-
-<p>If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.</p>
-
-<p>END OF TERMS AND CONDITIONS</p>
-
-<h1><a name="howto"></a>How to Apply These Terms to Your New Programs</h1>
-
-<p>If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.</p>
-
-<p>To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the &ldquo;copyright&rdquo; line and a pointer to where the full notice is found.</p>
-
-<pre>    &lt;one line to give the program's name and a brief idea of what it does.&gt;
-    Copyright (C) &lt;year&gt;  &lt;name of author&gt;
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.
-</pre>
-
-<p>Also add information on how to contact you by electronic and paper mail.</p>
-
-<p>If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:</p>
-
-<pre>    &lt;program&gt;  Copyright (C) &lt;year&gt;  &lt;name of author&gt;
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-</pre>
-
-<p>The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an &ldquo;about box&rdquo;.</p>
-
-<p>You should also get your employer (if you work as a programmer) or school,
-if any, to sign a &ldquo;copyright disclaimer&rdquo; for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-&lt;http://www.gnu.org/licenses/&gt;.</p>
-
-<p>The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-&lt;http://www.gnu.org/philosophy/why-not-lgpl.html&gt;.</p>
-
-
-</div>
-
-</body>
-</html>
Index: urce/resource/pf/html/ug.html
===================================================================
--- source/resource/pf/html/ug.html	(revision 376)
+++ 	(revision )
@@ -1,103 +1,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-  <head>
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-    <title>Plasma Formulary Interactive</title>
-  </head>
-  <body>
-
-    <h1>Plasma Formulary <i>Interactive</i> - User's guide</h1>
-
-    <p>
-      The main GUI consists of four tabbed panels. The first,
-      &ldquo;Parameters&rdquo; panel allows for defining the parameters of the
-      plasma model: <i>N</i><sub>e</sub>, <i>T</i><sub>e</sub>,
-      <i>Z</i><sub>i</sub>, <i>M</i><sub>i</sub>, <i>T</i><sub>i</sub>,
-      <i>Z</i><sub>r</sub>, <i>M</i><sub>r</sub>, <i>T</i><sub>r</sub>,
-      <i>P</i><sub>r</sub>, <i>B</i>, and those of the atomic system of the
-      radiator: <i>n<sub>u</sub></i> and <i>n<sub>l</sub></i>.
-      <i>N</i><sub>i</sub> and <i>N</i><sub>r</sub>, are automatically updated
-      assuming plasma quasi-neutrality.
-    </p>
-
-    <p style="text-align:center">
-      <img src="../image/ug/parameters.png" alt="Parameters panel" />
-    </p>
-
-    <p>
-      Since usually one is interested in fully thermalized plasmas
-      (<i>T</i><sub>e</sub> = <i>T</i><sub>i</sub> = <i>T</i><sub>r</sub>), for
-      convenience, changing <i>T</i><sub>e</sub> automatically updates
-      <i>T</i><sub>i</sub> and <i>T</i><sub>r</sub>, while changing
-      <i>T</i><sub>i</sub> automatically updates <i>T</i><sub>r</sub>.
-      Therefore, if <i>T</i><sub>e</sub> &ne; <i>T</i><sub>i</sub>  &ne;
-      <i>T</i><sub>r</sub> is required, one should first enter
-      <i>T</i><sub>e</sub>, followed by <i>T</i><sub>i</sub> and further
-      followed by setting <i>T</i><sub>r</sub>. A complete set of plasma
-      parameters can be saved using &ldquo;File&rarr;Save&rdquo; or
-      &ldquo;File&rarr;Save&nbsp;As&rdquo; menu entries under a desired name for
-      further loading.
-    </p>
-
-    <p>
-      The next,  &ldquo;Explorer&rdquo; panel, allows for browsing plasma
-      entities arranged in a tree structure according to the dimension units.
-    </p>
-    <p style="text-align:center">
-      <img src="../image/ug/explorer.png" alt="Explorer panel" />
-    </p>
-
-    <p>
-      If desired, the displayed entities can be filtered either according to the
-      species they refer to (Electrons/Ions/Radiators), or by section they
-      belong to (Fundamental/Waves/Collisions/Spectroscopy/Radiation) using the
-      &ldquo;View&rarr;Show&nbsp;Species&rdquo; and 
-      &ldquo;View&rarr;Show&nbsp;Sections&rdquo; menu entries, respectively.
-    </p>
-
-    <p>
-      Selecting an entity from the list results in its value being calculated
-      (for the plasma parameters selected) and displayed, and the corresponding
-      Wikipedia article (if exists) optionally shown. The calculated value can
-      be shown in a.u., SI, CGS, and some more widely used units, e.g., &Aring;
-      for entities having dimension of length. While selected, the enitity can
-      be added to, or removed from, the list of  &ldquo;favourites&rdquo; using
-      either the context-sensitive or menubar  &ldquo;Edit&rdquo; pull-down
-      menu. The  &ldquo;favourite&rdquo; enitities are used for further
-      comparison or plotting (see below).
-    </p>
-
-    <p>
-      The third,  &ldquo;Compare&rdquo; panel serves for comparison of
-      previously selected  &ldquo;favourite&rdquo; entities, where these are
-      listed in a table by groups having the same dimension.
-    </p>
-
-    <p style="text-align:center">
-      <img src="../image/ug/compare.png" alt="Compare panel" />
-    </p>
-
-    <p>
-      Finally, the  &ldquo;Plot&rdquo; panel, allows for graphing the previously
-      selected &ldquo;favourites&rdquo; (again, by groups having the same
-      dimension) as a function of one of the parameters of the plasma model:
-      <i>N</i><sub>e</sub>, <i>T</i><sub>e</sub>, <i>T</i><sub>i</sub>,
-      <i>T</i><sub>r</sub>, <i>P</i><sub>r</sub>, and <i>B</i>.
-    </p>
-      
-    <p style="text-align:center">
-      <img src="../image/ug/plot.png" alt="Plot panel" />
-    </p>
-
-    <p>
-      It is also possible to change
-      <i>T</i><sub>i</sub> and <i>T</i><sub>r</sub> or all three
-      <i>T</i><sub>e</sub>, <i>T</i><sub>i</sub>, and <i>T</i><sub>r</sub>
-      simultaneously. The range of the parameter being varied, line colors, and
-      number of points are adjustable.
-      The data sets can be exported in a simple ASCII format.
-    </p>
-
-  </body>
-</html>
Index: urce/translation/readme.txt
===================================================================
--- source/translation/readme.txt	(revision 142)
+++ 	(revision )
@@ -1,3 +1,0 @@
-This directory will contain translation (.po) files once you run the
-'translation' job in your project.
-
Index: urce/wz_jsgraphics.js
===================================================================
--- source/wz_jsgraphics.js	(revision 284)
+++ 	(revision )
@@ -1,1122 +1,0 @@
-/* This notice must be untouched at all times.
-
-wz_jsgraphics.js    v. 3.05
-The latest version is available at
-http://www.walterzorn.com
-or http://www.devira.com
-or http://www.walterzorn.de
-
-Copyright (c) 2002-2009 Walter Zorn. All rights reserved.
-Created 3. 11. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
-Last modified: 2. 2. 2009
-
-Performance optimizations for Internet Explorer
-by Thomas Frank and John Holdsworth.
-fillPolygon method implemented by Matthieu Haller.
-
-High Performance JavaScript Graphics Library.
-Provides methods
-- to draw lines, rectangles, ellipses, polygons
-	with specifiable line thickness,
-- to fill rectangles, polygons, ellipses and arcs
-- to draw text.
-NOTE: Operations, functions and branching have rather been optimized
-to efficiency and speed than to shortness of source code.
-
-LICENSE: LGPL
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License (LGPL) as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA,
-or see http://www.gnu.org/copyleft/lesser.html
-*/
-
-
-var jg_ok, jg_ie, jg_fast, jg_dom, jg_moz;
-
-
-function _chkDHTM(wnd, x, i)
-// Under XUL, owner of 'document' must be specified explicitly
-{
-	x = wnd.document.body || null;
-	jg_ie = x && typeof x.insertAdjacentHTML != "undefined" && wnd.document.createElement;
-	jg_dom = (x && !jg_ie &&
-		typeof x.appendChild != "undefined" &&
-		typeof wnd.document.createRange != "undefined" &&
-		typeof (i = wnd.document.createRange()).setStartBefore != "undefined" &&
-		typeof i.createContextualFragment != "undefined");
-	jg_fast = jg_ie && wnd.document.all && !wnd.opera;
-	jg_moz = jg_dom && typeof x.style.MozOpacity != "undefined";
-	jg_ok = !!(jg_ie || jg_dom);
-}
-
-function _pntCnvDom()
-{
-	var x = this.wnd.document.createRange();
-	x.setStartBefore(this.cnv);
-	x = x.createContextualFragment(jg_fast? this._htmRpc() : this.htm);
-	if(this.cnv) this.cnv.appendChild(x);
-	this.htm = "";
-}
-
-function _pntCnvIe()
-{
-	if(this.cnv) this.cnv.insertAdjacentHTML("BeforeEnd", jg_fast? this._htmRpc() : this.htm);
-	this.htm = "";
-}
-
-function _pntDoc()
-{
-	this.wnd.document.write(jg_fast? this._htmRpc() : this.htm);
-	this.htm = '';
-}
-
-function _pntN()
-{
-	;
-}
-
-function _mkDiv(x, y, w, h)
-{
-	this.htm += '<div style="position:absolute;'+
-		'left:' + x + 'px;'+
-		'top:' + y + 'px;'+
-		'width:' + w + 'px;'+
-		'height:' + h + 'px;'+
-		'clip:rect(0,'+w+'px,'+h+'px,0);'+
-		'background-color:' + this.color +
-		(!jg_moz? ';overflow:hidden' : '')+
-		';"><\/div>';
-}
-
-function _mkDivIe(x, y, w, h)
-{
-	this.htm += '%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';
-}
-
-function _mkDivPrt(x, y, w, h)
-{
-	this.htm += '<div style="position:absolute;'+
-		'border-left:' + w + 'px solid ' + this.color + ';'+
-		'left:' + x + 'px;'+
-		'top:' + y + 'px;'+
-		'width:0px;'+
-		'height:' + h + 'px;'+
-		'clip:rect(0,'+w+'px,'+h+'px,0);'+
-		'background-color:' + this.color +
-		(!jg_moz? ';overflow:hidden' : '')+
-		';"><\/div>';
-}
-
-var _regex =  /%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;
-function _htmRpc()
-{
-	return this.htm.replace(
-		_regex,
-		'<div style="overflow:hidden;position:absolute;background-color:'+
-		'$1;left:$2px;top:$3px;width:$4px;height:$5px"></div>\n');
-}
-
-function _htmPrtRpc()
-{
-	return this.htm.replace(
-		_regex,
-		'<div style="overflow:hidden;position:absolute;background-color:'+
-		'$1;left:$2px;top:$3px;width:$4px;height:$5px;border-left:$4px solid $1"></div>\n');
-}
-
-function _mkLin(x1, y1, x2, y2)
-{
-	if(x1 > x2)
-	{
-		var _x2 = x2;
-		var _y2 = y2;
-		x2 = x1;
-		y2 = y1;
-		x1 = _x2;
-		y1 = _y2;
-	}
-	var dx = x2-x1, dy = Math.abs(y2-y1),
-	x = x1, y = y1,
-	yIncr = (y1 > y2)? -1 : 1;
-
-	if(dx >= dy)
-	{
-		var pr = dy<<1,
-		pru = pr - (dx<<1),
-		p = pr-dx,
-		ox = x;
-		while(dx > 0)
-		{--dx;
-			++x;
-			if(p > 0)
-			{
-				this._mkDiv(ox, y, x-ox, 1);
-				y += yIncr;
-				p += pru;
-				ox = x;
-			}
-			else p += pr;
-		}
-		this._mkDiv(ox, y, x2-ox+1, 1);
-	}
-
-	else
-	{
-		var pr = dx<<1,
-		pru = pr - (dy<<1),
-		p = pr-dy,
-		oy = y;
-		if(y2 <= y1)
-		{
-			while(dy > 0)
-			{--dy;
-				if(p > 0)
-				{
-					this._mkDiv(x++, y, 1, oy-y+1);
-					y += yIncr;
-					p += pru;
-					oy = y;
-				}
-				else
-				{
-					y += yIncr;
-					p += pr;
-				}
-			}
-			this._mkDiv(x2, y2, 1, oy-y2+1);
-		}
-		else
-		{
-			while(dy > 0)
-			{--dy;
-				y += yIncr;
-				if(p > 0)
-				{
-					this._mkDiv(x++, oy, 1, y-oy);
-					p += pru;
-					oy = y;
-				}
-				else p += pr;
-			}
-			this._mkDiv(x2, oy, 1, y2-oy+1);
-		}
-	}
-}
-
-function _mkLin2D(x1, y1, x2, y2)
-{
-	if(x1 > x2)
-	{
-		var _x2 = x2;
-		var _y2 = y2;
-		x2 = x1;
-		y2 = y1;
-		x1 = _x2;
-		y1 = _y2;
-	}
-	var dx = x2-x1, dy = Math.abs(y2-y1),
-	x = x1, y = y1,
-	yIncr = (y1 > y2)? -1 : 1;
-
-	var s = this.stroke;
-	if(dx >= dy)
-	{
-		if(dx > 0 && s-3 > 0)
-		{
-			var _s = (s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy) / dx;
-			_s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
-		}
-		else var _s = s;
-		var ad = Math.ceil(s/2);
-
-		var pr = dy<<1,
-		pru = pr - (dx<<1),
-		p = pr-dx,
-		ox = x;
-		while(dx > 0)
-		{--dx;
-			++x;
-			if(p > 0)
-			{
-				this._mkDiv(ox, y, x-ox+ad, _s);
-				y += yIncr;
-				p += pru;
-				ox = x;
-			}
-			else p += pr;
-		}
-		this._mkDiv(ox, y, x2-ox+ad+1, _s);
-	}
-
-	else
-	{
-		if(s-3 > 0)
-		{
-			var _s = (s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy) / dy;
-			_s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
-		}
-		else var _s = s;
-		var ad = Math.round(s/2);
-
-		var pr = dx<<1,
-		pru = pr - (dy<<1),
-		p = pr-dy,
-		oy = y;
-		if(y2 <= y1)
-		{
-			++ad;
-			while(dy > 0)
-			{--dy;
-				if(p > 0)
-				{
-					this._mkDiv(x++, y, _s, oy-y+ad);
-					y += yIncr;
-					p += pru;
-					oy = y;
-				}
-				else
-				{
-					y += yIncr;
-					p += pr;
-				}
-			}
-			this._mkDiv(x2, y2, _s, oy-y2+ad);
-		}
-		else
-		{
-			while(dy > 0)
-			{--dy;
-				y += yIncr;
-				if(p > 0)
-				{
-					this._mkDiv(x++, oy, _s, y-oy+ad);
-					p += pru;
-					oy = y;
-				}
-				else p += pr;
-			}
-			this._mkDiv(x2, oy, _s, y2-oy+ad+1);
-		}
-	}
-}
-
-function _mkLinDott(x1, y1, x2, y2)
-{
-	if(x1 > x2)
-	{
-		var _x2 = x2;
-		var _y2 = y2;
-		x2 = x1;
-		y2 = y1;
-		x1 = _x2;
-		y1 = _y2;
-	}
-	var dx = x2-x1, dy = Math.abs(y2-y1),
-	x = x1, y = y1,
-	yIncr = (y1 > y2)? -1 : 1,
-	drw = true;
-	if(dx >= dy)
-	{
-		var pr = dy<<1,
-		pru = pr - (dx<<1),
-		p = pr-dx;
-		while(dx > 0)
-		{--dx;
-			if(drw) this._mkDiv(x, y, 1, 1);
-			drw = !drw;
-			if(p > 0)
-			{
-				y += yIncr;
-				p += pru;
-			}
-			else p += pr;
-			++x;
-		}
-	}
-	else
-	{
-		var pr = dx<<1,
-		pru = pr - (dy<<1),
-		p = pr-dy;
-		while(dy > 0)
-		{--dy;
-			if(drw) this._mkDiv(x, y, 1, 1);
-			drw = !drw;
-			y += yIncr;
-			if(p > 0)
-			{
-				++x;
-				p += pru;
-			}
-			else p += pr;
-		}
-	}
-	if(drw) this._mkDiv(x, y, 1, 1);
-}
-
-function _mkOv(left, top, width, height)
-{
-	var a = (++width)>>1, b = (++height)>>1,
-	wod = width&1, hod = height&1,
-	cx = left+a, cy = top+b,
-	x = 0, y = b,
-	ox = 0, oy = b,
-	aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
-	st = (aa2>>1)*(1-(b<<1)) + bb2,
-	tt = (bb2>>1) - aa2*((b<<1)-1),
-	w, h;
-	while(y > 0)
-	{
-		if(st < 0)
-		{
-			st += bb2*((x<<1)+3);
-			tt += bb4*(++x);
-		}
-		else if(tt < 0)
-		{
-			st += bb2*((x<<1)+3) - aa4*(y-1);
-			tt += bb4*(++x) - aa2*(((y--)<<1)-3);
-			w = x-ox;
-			h = oy-y;
-			if((w&2) && (h&2))
-			{
-				this._mkOvQds(cx, cy, x-2, y+2, 1, 1, wod, hod);
-				this._mkOvQds(cx, cy, x-1, y+1, 1, 1, wod, hod);
-			}
-			else this._mkOvQds(cx, cy, x-1, oy, w, h, wod, hod);
-			ox = x;
-			oy = y;
-		}
-		else
-		{
-			tt -= aa2*((y<<1)-3);
-			st -= aa4*(--y);
-		}
-	}
-	w = a-ox+1;
-	h = (oy<<1)+hod;
-	y = cy-oy;
-	this._mkDiv(cx-a, y, w, h);
-	this._mkDiv(cx+ox+wod-1, y, w, h);
-}
-
-function _mkOv2D(left, top, width, height)
-{
-	var s = this.stroke;
-	width += s+1;
-	height += s+1;
-	var a = width>>1, b = height>>1,
-	wod = width&1, hod = height&1,
-	cx = left+a, cy = top+b,
-	x = 0, y = b,
-	aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
-	st = (aa2>>1)*(1-(b<<1)) + bb2,
-	tt = (bb2>>1) - aa2*((b<<1)-1);
-
-	if(s-4 < 0 && (!(s-2) || width-51 > 0 && height-51 > 0))
-	{
-		var ox = 0, oy = b,
-		w, h,
-		pxw;
-		while(y > 0)
-		{
-			if(st < 0)
-			{
-				st += bb2*((x<<1)+3);
-				tt += bb4*(++x);
-			}
-			else if(tt < 0)
-			{
-				st += bb2*((x<<1)+3) - aa4*(y-1);
-				tt += bb4*(++x) - aa2*(((y--)<<1)-3);
-				w = x-ox;
-				h = oy-y;
-
-				if(w-1)
-				{
-					pxw = w+1+(s&1);
-					h = s;
-				}
-				else if(h-1)
-				{
-					pxw = s;
-					h += 1+(s&1);
-				}
-				else pxw = h = s;
-				this._mkOvQds(cx, cy, x-1, oy, pxw, h, wod, hod);
-				ox = x;
-				oy = y;
-			}
-			else
-			{
-				tt -= aa2*((y<<1)-3);
-				st -= aa4*(--y);
-			}
-		}
-		this._mkDiv(cx-a, cy-oy, s, (oy<<1)+hod);
-		this._mkDiv(cx+a+wod-s, cy-oy, s, (oy<<1)+hod);
-	}
-
-	else
-	{
-		var _a = (width-(s<<1))>>1,
-		_b = (height-(s<<1))>>1,
-		_x = 0, _y = _b,
-		_aa2 = (_a*_a)<<1, _aa4 = _aa2<<1, _bb2 = (_b*_b)<<1, _bb4 = _bb2<<1,
-		_st = (_aa2>>1)*(1-(_b<<1)) + _bb2,
-		_tt = (_bb2>>1) - _aa2*((_b<<1)-1),
-
-		pxl = new Array(),
-		pxt = new Array(),
-		_pxb = new Array();
-		pxl[0] = 0;
-		pxt[0] = b;
-		_pxb[0] = _b-1;
-		while(y > 0)
-		{
-			if(st < 0)
-			{
-				pxl[pxl.length] = x;
-				pxt[pxt.length] = y;
-				st += bb2*((x<<1)+3);
-				tt += bb4*(++x);
-			}
-			else if(tt < 0)
-			{
-				pxl[pxl.length] = x;
-				st += bb2*((x<<1)+3) - aa4*(y-1);
-				tt += bb4*(++x) - aa2*(((y--)<<1)-3);
-				pxt[pxt.length] = y;
-			}
-			else
-			{
-				tt -= aa2*((y<<1)-3);
-				st -= aa4*(--y);
-			}
-
-			if(_y > 0)
-			{
-				if(_st < 0)
-				{
-					_st += _bb2*((_x<<1)+3);
-					_tt += _bb4*(++_x);
-					_pxb[_pxb.length] = _y-1;
-				}
-				else if(_tt < 0)
-				{
-					_st += _bb2*((_x<<1)+3) - _aa4*(_y-1);
-					_tt += _bb4*(++_x) - _aa2*(((_y--)<<1)-3);
-					_pxb[_pxb.length] = _y-1;
-				}
-				else
-				{
-					_tt -= _aa2*((_y<<1)-3);
-					_st -= _aa4*(--_y);
-					_pxb[_pxb.length-1]--;
-				}
-			}
-		}
-
-		var ox = -wod, oy = b,
-		_oy = _pxb[0],
-		l = pxl.length,
-		w, h;
-		for(var i = 0; i < l; i++)
-		{
-			if(typeof _pxb[i] != "undefined")
-			{
-				if(_pxb[i] < _oy || pxt[i] < oy)
-				{
-					x = pxl[i];
-					this._mkOvQds(cx, cy, x, oy, x-ox, oy-_oy, wod, hod);
-					ox = x;
-					oy = pxt[i];
-					_oy = _pxb[i];
-				}
-			}
-			else
-			{
-				x = pxl[i];
-				this._mkDiv(cx-x, cy-oy, 1, (oy<<1)+hod);
-				this._mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
-				ox = x;
-				oy = pxt[i];
-			}
-		}
-		this._mkDiv(cx-a, cy-oy, 1, (oy<<1)+hod);
-		this._mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
-	}
-}
-
-function _mkOvDott(left, top, width, height)
-{
-	var a = (++width)>>1, b = (++height)>>1,
-	wod = width&1, hod = height&1, hodu = hod^1,
-	cx = left+a, cy = top+b,
-	x = 0, y = b,
-	aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
-	st = (aa2>>1)*(1-(b<<1)) + bb2,
-	tt = (bb2>>1) - aa2*((b<<1)-1),
-	drw = true;
-	while(y > 0)
-	{
-		if(st < 0)
-		{
-			st += bb2*((x<<1)+3);
-			tt += bb4*(++x);
-		}
-		else if(tt < 0)
-		{
-			st += bb2*((x<<1)+3) - aa4*(y-1);
-			tt += bb4*(++x) - aa2*(((y--)<<1)-3);
-		}
-		else
-		{
-			tt -= aa2*((y<<1)-3);
-			st -= aa4*(--y);
-		}
-		if(drw && y >= hodu) this._mkOvQds(cx, cy, x, y, 1, 1, wod, hod);
-		drw = !drw;
-	}
-}
-
-function _mkRect(x, y, w, h)
-{
-	var s = this.stroke;
-	this._mkDiv(x, y, w, s);
-	this._mkDiv(x+w, y, s, h);
-	this._mkDiv(x, y+h, w+s, s);
-	this._mkDiv(x, y+s, s, h-s);
-}
-
-function _mkRectDott(x, y, w, h)
-{
-	this.drawLine(x, y, x+w, y);
-	this.drawLine(x+w, y, x+w, y+h);
-	this.drawLine(x, y+h, x+w, y+h);
-	this.drawLine(x, y, x, y+h);
-}
-
-function jsgFont()
-{
-	this.PLAIN = 'font-weight:normal;';
-	this.BOLD = 'font-weight:bold;';
-	this.ITALIC = 'font-style:italic;';
-	this.ITALIC_BOLD = this.ITALIC + this.BOLD;
-	this.BOLD_ITALIC = this.ITALIC_BOLD;
-}
-var Font = new jsgFont();
-
-function jsgStroke()
-{
-	this.DOTTED = -1;
-}
-var Stroke = new jsgStroke();
-
-function jsGraphics(cnv, wnd)
-{
-	this.setColor = function(x)
-	{
-		this.color = x.toLowerCase();
-	};
-
-	this.setStroke = function(x)
-	{
-		this.stroke = x;
-		if(!(x+1))
-		{
-			this.drawLine = _mkLinDott;
-			this._mkOv = _mkOvDott;
-			this.drawRect = _mkRectDott;
-		}
-		else if(x-1 > 0)
-		{
-			this.drawLine = _mkLin2D;
-			this._mkOv = _mkOv2D;
-			this.drawRect = _mkRect;
-		}
-		else
-		{
-			this.drawLine = _mkLin;
-			this._mkOv = _mkOv;
-			this.drawRect = _mkRect;
-		}
-	};
-
-	this.setPrintable = function(arg)
-	{
-		this.printable = arg;
-		if(jg_fast)
-		{
-			this._mkDiv = _mkDivIe;
-			this._htmRpc = arg? _htmPrtRpc : _htmRpc;
-		}
-		else this._mkDiv = arg? _mkDivPrt : _mkDiv;
-	};
-
-	this.setFont = function(fam, sz, sty)
-	{
-		this.ftFam = fam;
-		this.ftSz = sz;
-		this.ftSty = sty || Font.PLAIN;
-	};
-
-	this.drawPolyline = this.drawPolyLine = function(x, y)
-	{
-		for (var i=x.length - 1; i;)
-		{--i;
-			this.drawLine(x[i], y[i], x[i+1], y[i+1]);
-		}
-	};
-
-	this.fillRect = function(x, y, w, h)
-	{
-		this._mkDiv(x, y, w, h);
-	};
-
-	this.drawPolygon = function(x, y)
-	{
-		this.drawPolyline(x, y);
-		this.drawLine(x[x.length-1], y[x.length-1], x[0], y[0]);
-	};
-
-	this.drawEllipse = this.drawOval = function(x, y, w, h)
-	{
-		this._mkOv(x, y, w, h);
-	};
-
-	this.fillEllipse = this.fillOval = function(left, top, w, h)
-	{
-		var a = w>>1, b = h>>1,
-		wod = w&1, hod = h&1,
-		cx = left+a, cy = top+b,
-		x = 0, y = b, oy = b,
-		aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
-		st = (aa2>>1)*(1-(b<<1)) + bb2,
-		tt = (bb2>>1) - aa2*((b<<1)-1),
-		xl, dw, dh;
-		if(w) while(y > 0)
-		{
-			if(st < 0)
-			{
-				st += bb2*((x<<1)+3);
-				tt += bb4*(++x);
-			}
-			else if(tt < 0)
-			{
-				st += bb2*((x<<1)+3) - aa4*(y-1);
-				xl = cx-x;
-				dw = (x<<1)+wod;
-				tt += bb4*(++x) - aa2*(((y--)<<1)-3);
-				dh = oy-y;
-				this._mkDiv(xl, cy-oy, dw, dh);
-				this._mkDiv(xl, cy+y+hod, dw, dh);
-				oy = y;
-			}
-			else
-			{
-				tt -= aa2*((y<<1)-3);
-				st -= aa4*(--y);
-			}
-		}
-		this._mkDiv(cx-a, cy-oy, w, (oy<<1)+hod);
-	};
-
-	this.fillArc = function(iL, iT, iW, iH, fAngA, fAngZ)
-	{
-		var a = iW>>1, b = iH>>1,
-		iOdds = (iW&1) | ((iH&1) << 16),
-		cx = iL+a, cy = iT+b,
-		x = 0, y = b, ox = x, oy = y,
-		aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
-		st = (aa2>>1)*(1-(b<<1)) + bb2,
-		tt = (bb2>>1) - aa2*((b<<1)-1),
-		// Vars for radial boundary lines
-		xEndA, yEndA, xEndZ, yEndZ,
-		iSects = (1 << (Math.floor((fAngA %= 360.0)/180.0) << 3))
-				| (2 << (Math.floor((fAngZ %= 360.0)/180.0) << 3))
-				| ((fAngA >= fAngZ) << 16),
-		aBndA = new Array(b+1), aBndZ = new Array(b+1);
-		
-		// Set up radial boundary lines
-		fAngA *= Math.PI/180.0;
-		fAngZ *= Math.PI/180.0;
-		xEndA = cx+Math.round(a*Math.cos(fAngA));
-		yEndA = cy+Math.round(-b*Math.sin(fAngA));
-		_mkLinVirt(aBndA, cx, cy, xEndA, yEndA);
-		xEndZ = cx+Math.round(a*Math.cos(fAngZ));
-		yEndZ = cy+Math.round(-b*Math.sin(fAngZ));
-		_mkLinVirt(aBndZ, cx, cy, xEndZ, yEndZ);
-
-		while(y > 0)
-		{
-			if(st < 0) // Advance x
-			{
-				st += bb2*((x<<1)+3);
-				tt += bb4*(++x);
-			}
-			else if(tt < 0) // Advance x and y
-			{
-				st += bb2*((x<<1)+3) - aa4*(y-1);
-				ox = x;
-				tt += bb4*(++x) - aa2*(((y--)<<1)-3);
-				this._mkArcDiv(ox, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
-				oy = y;
-			}
-			else // Advance y
-			{
-				tt -= aa2*((y<<1)-3);
-				st -= aa4*(--y);
-				if(y && (aBndA[y] != aBndA[y-1] || aBndZ[y] != aBndZ[y-1]))
-				{
-					this._mkArcDiv(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
-					ox = x;
-					oy = y;
-				}
-			}
-		}
-		this._mkArcDiv(x, 0, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
-		if(iOdds >> 16) // Odd height
-		{
-			if(iSects >> 16) // Start-angle > end-angle
-			{
-				var xl = (yEndA <= cy || yEndZ > cy)? (cx - x) : cx;
-				this._mkDiv(xl, cy, x + cx - xl + (iOdds & 0xffff), 1);
-			}
-			else if((iSects & 0x01) && yEndZ > cy)
-				this._mkDiv(cx - x, cy, x, 1);
-		}
-	};
-
-/* fillPolygon method, implemented by Matthieu Haller.
-This javascript function is an adaptation of the gdImageFilledPolygon for Walter Zorn lib.
-C source of GD 1.8.4 found at http://www.boutell.com/gd/
-
-THANKS to Kirsten Schulz for the polygon fixes!
-
-The intersection finding technique of this code could be improved
-by remembering the previous intertersection, and by using the slope.
-That could help to adjust intersections to produce a nice
-interior_extrema. */
-	this.fillPolygon = function(array_x, array_y)
-	{
-		var i;
-		var y;
-		var miny, maxy;
-		var x1, y1;
-		var x2, y2;
-		var ind1, ind2;
-		var ints;
-
-		var n = array_x.length;
-		if(!n) return;
-
-		miny = array_y[0];
-		maxy = array_y[0];
-		for(i = 1; i < n; i++)
-		{
-			if(array_y[i] < miny)
-				miny = array_y[i];
-
-			if(array_y[i] > maxy)
-				maxy = array_y[i];
-		}
-		for(y = miny; y <= maxy; y++)
-		{
-			var polyInts = new Array();
-			ints = 0;
-			for(i = 0; i < n; i++)
-			{
-				if(!i)
-				{
-					ind1 = n-1;
-					ind2 = 0;
-				}
-				else
-				{
-					ind1 = i-1;
-					ind2 = i;
-				}
-				y1 = array_y[ind1];
-				y2 = array_y[ind2];
-				if(y1 < y2)
-				{
-					x1 = array_x[ind1];
-					x2 = array_x[ind2];
-				}
-				else if(y1 > y2)
-				{
-					y2 = array_y[ind1];
-					y1 = array_y[ind2];
-					x2 = array_x[ind1];
-					x1 = array_x[ind2];
-				}
-				else continue;
-
-				 //  Modified 11. 2. 2004 Walter Zorn
-				if((y >= y1) && (y < y2))
-					polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
-
-				else if((y == maxy) && (y > y1) && (y <= y2))
-					polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
-			}
-			polyInts.sort(_CompInt);
-			for(i = 0; i < ints; i+=2)
-				this._mkDiv(polyInts[i], y, polyInts[i+1]-polyInts[i]+1, 1);
-		}
-	};
-
-	this.drawString = function(txt, x, y)
-	{
-		this.htm += '<div style="position:absolute;white-space:nowrap;'+
-			'left:' + x + 'px;'+
-			'top:' + y + 'px;'+
-			'font-family:' +  this.ftFam + ';'+
-			'font-size:' + this.ftSz + 'px;'+
-			'color:' + this.color + ';' + this.ftSty + '">'+
-			txt +
-			'<\/div>';
-	};
-
-/* drawStringRect() added by Rick Blommers.
-Allows to specify the size of the text rectangle and to align the
-text both horizontally (e.g. right) and vertically within that rectangle */
-/* ES: added rotation, using
-http://stackoverflow.com/questions/272799/vertical-rotated-text-in-html-table */
-	this.drawStringRect = function(txt, x, y, width, halign, angle)
-	{
-		var angleSty = '';
-                if (angle) {
-                    angle = parseInt(angle);
-                    var rot = angle/90;
-                    angleSty = 
-                        '-moz-transform: rotate(' + angle + 'deg);'                                    +    /* FF3.5+          */ 
-                        '-o-transform: rotate(' + angle + 'deg);'                                      +    /* Opera 10.5      */
-                        '-webkit-transform: rotate(' + angle + 'deg);'                                 +    /* Saf3.1+, Chrome */
-                        'filter:  progid:DXImageTransform.Microsoft.BasicImage(rotation=' + rot + ');' +    /* IE6,IE7         */       
-                        '-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=' + rot + ');'; /* IE8             */           
-                }
-                
-		this.htm += '<div style="position:absolute;overflow:hidden;'+
-			'left:' + x + 'px;'+
-			'top:' + y + 'px;'+
-			'width:'+width +'px;'+
-			'text-align:'+halign+';'+
-			'font-family:' +  this.ftFam + ';'+
-			'font-size:' + this.ftSz + 'px;'+
-			'color:' + this.color + ';' + this.ftSty + angleSty + '">'+
-			txt +
-			'<\/div>';
-	};
-
-	this.drawImage = function(imgSrc, x, y, w, h, a)
-	{
-		this.htm += '<div style="position:absolute;'+
-			'left:' + x + 'px;'+
-			'top:' + y + 'px;'+
-			// w (width) and h (height) arguments are now optional.
-			// Added by Mahmut Keygubatli, 14.1.2008
-			(w? ('width:' +  w + 'px;') : '') +
-			(h? ('height:' + h + 'px;'):'')+'">'+
-			'<img src="' + imgSrc +'"'+ (w ? (' width="' + w + '"'):'')+ (h ? (' height="' + h + '"'):'') + (a? (' '+a) : '') + '>'+
-			'<\/div>';
-	};
-
-	this.clear = function()
-	{
-		this.htm = "";
-		if(this.cnv) this.cnv.innerHTML = "";
-	};
-
-	this._mkOvQds = function(cx, cy, x, y, w, h, wod, hod)
-	{
-		var xl = cx - x, xr = cx + x + wod - w, yt = cy - y, yb = cy + y + hod - h;
-		if(xr > xl+w)
-		{
-			this._mkDiv(xr, yt, w, h);
-			this._mkDiv(xr, yb, w, h);
-		}
-		else
-			w = xr - xl + w;
-		this._mkDiv(xl, yt, w, h);
-		this._mkDiv(xl, yb, w, h);
-	};
-	
-	this._mkArcDiv = function(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects)
-	{
-		var xrDef = cx + x + (iOdds & 0xffff), y2, h = oy - y, xl, xr, w;
-
-		if(!h) h = 1;
-		x = cx - x;
-
-		if(iSects & 0xff0000) // Start-angle > end-angle
-		{
-			y2 = cy - y - h;
-			if(iSects & 0x00ff)
-			{
-				if(iSects & 0x02)
-				{
-					xl = Math.max(x, aBndZ[y]);
-					w = xrDef - xl;
-					if(w > 0) this._mkDiv(xl, y2, w, h);
-				}
-				if(iSects & 0x01)
-				{
-					xr = Math.min(xrDef, aBndA[y]);
-					w = xr - x;
-					if(w > 0) this._mkDiv(x, y2, w, h);
-				}
-			}
-			else
-				this._mkDiv(x, y2, xrDef - x, h);
-			y2 = cy + y + (iOdds >> 16);
-			if(iSects & 0xff00)
-			{
-				if(iSects & 0x0100)
-				{
-					xl = Math.max(x, aBndA[y]);
-					w = xrDef - xl;
-					if(w > 0) this._mkDiv(xl, y2, w, h);
-				}
-				if(iSects & 0x0200)
-				{
-					xr = Math.min(xrDef, aBndZ[y]);
-					w = xr - x;
-					if(w > 0) this._mkDiv(x, y2, w, h);
-				}
-			}
-			else
-				this._mkDiv(x, y2, xrDef - x, h);
-		}
-		else
-		{
-			if(iSects & 0x00ff)
-			{
-				if(iSects & 0x02)
-					xl = Math.max(x, aBndZ[y]);
-				else
-					xl = x;
-				if(iSects & 0x01)
-					xr = Math.min(xrDef, aBndA[y]);
-				else
-					xr = xrDef;
-				y2 = cy - y - h;
-				w = xr - xl;
-				if(w > 0) this._mkDiv(xl, y2, w, h);
-			}
-			if(iSects & 0xff00)
-			{
-				if(iSects & 0x0100)
-					xl = Math.max(x, aBndA[y]);
-				else
-					xl = x;
-				if(iSects & 0x0200)
-					xr = Math.min(xrDef, aBndZ[y]);
-				else
-					xr = xrDef;
-				y2 = cy + y + (iOdds >> 16);
-				w = xr - xl;
-				if(w > 0) this._mkDiv(xl, y2, w, h);
-			}
-		}
-	};
-
-	this.setStroke(1);
-	this.setFont("verdana,geneva,helvetica,sans-serif", "12px", Font.PLAIN);
-	this.color = "#000000";
-	this.htm = "";
-	this.wnd = wnd || window;
-
-	if(!jg_ok) _chkDHTM(this.wnd);
-	if(jg_ok)
-	{
-		if(cnv)
-		{
-			if(typeof(cnv) == "string")
-				this.cont = document.all? (this.wnd.document.all[cnv] || null)
-					: document.getElementById? (this.wnd.document.getElementById(cnv) || null)
-					: null;
-			else if(cnv == window.document)
-				this.cont = document.getElementsByTagName("body")[0];
-			// If cnv is a direct reference to a canvas DOM node
-			// (option suggested by Andreas Luleich)
-			else this.cont = cnv;
-			// Create new canvas inside container DIV. Thus the drawing and clearing
-			// methods won't interfere with the container's inner html.
-			// Solution suggested by Vladimir.
-			this.cnv = this.wnd.document.createElement("div");
-			this.cnv.style.fontSize=0;
-			this.cont.appendChild(this.cnv);
-			this.paint = jg_dom? _pntCnvDom : _pntCnvIe;
-		}
-		else
-			this.paint = _pntDoc;
-	}
-	else
-		this.paint = _pntN;
-
-	this.setPrintable(false);
-}
-
-function _mkLinVirt(aLin, x1, y1, x2, y2)
-{
-	var dx = Math.abs(x2-x1), dy = Math.abs(y2-y1),
-	x = x1, y = y1,
-	xIncr = (x1 > x2)? -1 : 1,
-	yIncr = (y1 > y2)? -1 : 1,
-	p,
-	i = 0;
-	if(dx >= dy)
-	{
-		var pr = dy<<1,
-		pru = pr - (dx<<1);
-		p = pr-dx;
-		while(dx > 0)
-		{--dx;
-			if(p > 0)    //  Increment y
-			{
-				aLin[i++] = x;
-				y += yIncr;
-				p += pru;
-			}
-			else p += pr;
-			x += xIncr;
-		}
-	}
-	else
-	{
-		var pr = dx<<1,
-		pru = pr - (dy<<1);
-		p = pr-dy;
-		while(dy > 0)
-		{--dy;
-			y += yIncr;
-			aLin[i++] = x;
-			if(p > 0)    //  Increment x
-			{
-				x += xIncr;
-				p += pru;
-			}
-			else p += pr;
-		}
-	}
-	for(var len = aLin.length, i = len-i; i;)
-		aLin[len-(i--)] = x;
-};
-
-function _CompInt(x, y)
-{
-	return(x - y);
-}
-
