[Fusionforge-commits] FusionForge branch master updated. 00a55c5b206fedc434a241ffc873548aff0a4761

Marc-Etienne VARGENAU vargenau at fusionforge.org
Wed Mar 4 18:37:32 CET 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  00a55c5b206fedc434a241ffc873548aff0a4761 (commit)
      from  193919b0c54150a447e1e1da92f54e5cc60dc6f9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 00a55c5b206fedc434a241ffc873548aff0a4761
Author: Marc-Etienne Vargenau <Marc-Etienne.Vargenau at alcatel-lucent.com>
Date:   Wed Mar 4 18:37:12 2015 +0100

    Update PhpWiki to release 1.5.3

diff --git a/src/plugins/wiki/www/Makefile b/src/plugins/wiki/www/Makefile
new file mode 100644
index 0000000..8a49b3a
--- /dev/null
+++ b/src/plugins/wiki/www/Makefile
@@ -0,0 +1,16 @@
+VERSION=1.5.3
+RPMBUILD=rpmbuild
+
+clean:
+	rm -fr /tmp/phpwiki-$(VERSION) /tmp/phpwiki-$(VERSION).tar.gz
+
+/tmp/phpwiki-$(VERSION).tar.gz:
+	rm -fr /tmp/phpwiki-$(VERSION)
+	cp -a . /tmp/phpwiki-$(VERSION)
+	cd /tmp; tar zcf /tmp/phpwiki-$(VERSION).tar.gz phpwiki-$(VERSION)
+	rm -fr /tmp/phpwiki-$(VERSION)
+
+rpm: /tmp/phpwiki-$(VERSION).tar.gz
+	mkdir -p ~/rpmbuild/SOURCES/
+	cp /tmp/phpwiki-$(VERSION).tar.gz ~/rpmbuild/SOURCES/
+	$(RPMBUILD) -bb config/phpwiki.spec
diff --git a/src/plugins/wiki/www/config/phpwiki.spec b/src/plugins/wiki/www/config/phpwiki.spec
new file mode 100755
index 0000000..21bba37
--- /dev/null
+++ b/src/plugins/wiki/www/config/phpwiki.spec
@@ -0,0 +1,132 @@
+#
+# RPM spec file for FusionForge
+#
+# Initial work by Jesse Becker <jbecker at northwestern.edu>
+# Reworked for 1.5.x by Alain Peyrat <aljeux at free.fr>
+#
+# Copyright (C) 2014 Alain Peyrat
+#
+
+# Global Definitions
+%define WIKI_NAME       PhpWiki
+%define ADMIN_USER      admin
+%define ADMIN_PASSWD    myadmin
+
+%define DB_NAME         phpwiki
+%define DB_USER         phpwiki
+%define DB_PASSWD       phpwikipw
+
+%define httpduser       apache
+%define httpdgroup      apache
+
+%define ACCESS_LOG      %{_var}/log/%{name}/%{name}_access.log
+%define DATABASE_TYPE	SQL
+%define DATABASE_DSN	mysql://%{admin_user}:%{admin_passwd}
+%define DEBUG		0
+%define USER_AUTH_ORDER	"PersonalPage"
+%define LDAP_AUTH_USER	""
+%define LDAP_AUTH_PASSWORD	""
+%define LDAP_SEARCH_FIELD	""
+%define IMAP_AUTH_HOST	""
+%define POP3_AUTH_HOST	""
+%define AUTH_USER_FILE	""
+%define AUTH_SESS_USER	""
+%define AUTH_SESS_LEVEL	""
+%define AUTH_GROUP_FILE	""
+
+# Disable debug binary detection & generation to speed up process.
+%global debug_package %{nil}
+
+# RPM spec preamble
+Summary: PHP-based Wiki webapplication
+Name: phpwiki
+Version: 1.5.3
+Release: 1
+BuildArch: noarch
+License: GPL
+Group: Applications/Internet
+Source: http://easynews.dl.sourceforge.net/sourceforge/phpwiki/%{name}-%{version}.tar.gz
+URL: http://sourceforge.net/projects/phpwiki/
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+Packager: Alain Peyrat <aljeux at free.fr>
+
+#Relocation!
+Prefix: /var/www
+
+Requires: httpd, php, php-pear, php-mysql
+
+Autoreq: 0
+
+%define dest %{buildroot}/%{prefix}/%{name}
+
+%description
+PhpWiki is a WikiWikiWeb clone in PHP. A WikiWikiWeb is a site where
+anyone can edit the pages through an HTML form. Multiple storage
+backends, dynamic hyperlinking, themeable, scriptable by plugins, full
+authentication, ACL's.
+
+%prep
+%setup
+
+%install
+%{__rm} -rf %{buildroot}
+
+%{__install} -m 755 -d %{buildroot}%{_var}/log/phpwiki
+
+%{__mkdir} -p %{dest}
+%{__cp} -r config lib locale pgsrc themes schemas uploads %{dest}
+%{__cp} favicon.ico *.php wiki %{dest}
+
+cd %{dest}/config
+perl -p	\
+	-e 's,^(WIKI_NAME)\s*=.*,$1 = %{WIKI_NAME},;'	\
+	-e 's,^[;\s]*(ADMIN_USER)\s*=.*,$1 = %{ADMIN_USER},;'	\
+	-e 's,^[;\s]*(ADMIN_PASSWD)\s*=.*,$1 = %{ADMIN_PASSWD},;'	\
+	-e 's,^[;\s]*(ACCESS_LOG)\s*=.*,$1 = %{ACCESS_LOG},;'	\
+	-e 's,^[;\s]*(DATABASE_TYPE)\s*=.*,$1 = %{DATABASE_TYPE},;'	\
+	-e 's,^[;\s]*(DATABASE_DSN)\s*=.*,$1 = mysql://%{DB_USER}:%{DB_PASSWD}\@localhost/%{DB_NAME},;'	\
+	-e 's,^[;\s]*(DEBUG)\s*=.*,$1 = %{DEBUG},;'	\
+	-e 's,^[;\s]*(USER_AUTH_ORDER)\s*=.*,$1 = %{USER_AUTH_ORDER},;'	\
+	-e 's,^[;\s]*(USER_AUTH_ORDER)\s*=.*,$1 = %{USER_AUTH_ORDER},;'	\
+	-e 's,^[;\s]*(LDAP_AUTH_USER)\s*=.*,$1 = %{LDAP_AUTH_USER},;'	\
+	-e 's,^[;\s]*(LDAP_AUTH_PASSWORD)\s*=.*,$1 = %{LDAP_AUTH_PASSWORD},;'	\
+	-e 's,^[;\s]*(LDAP_SEARCH_FIELD)\s*=.*,$1 = %{LDAP_SEARCH_FIELD},;'	\
+	-e 's,^[;\s]*(IMAP_AUTH_HOST)\s*=.*,$1 = %{IMAP_AUTH_HOST},;'	\
+	-e 's,^[;\s]*(POP3_AUTH_HOST)\s*=.*,$1 = %{POP3_AUTH_HOST},;'	\
+	-e 's,^[;\s]*(AUTH_USER_FILE)\s*=.*,$1 = %{AUTH_USER_FILE},;'	\
+	-e 's,^[;\s]*(AUTH_SESS_USER)\s*=.*,$1 = %{AUTH_SESS_USER},;'	\
+	-e 's,^[;\s]*(AUTH_SESS_LEVEL)\s*=.*,$1 = %{AUTH_SESS_LEVEL},;'	\
+	-e 's,^[;\s]*(AUTH_GROUP_FILE)\s*=.*,$1 = %{AUTH_GROUP_FILE},;'	\
+	config-dist.ini > config.ini
+
+
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%post
+
+cd %{prefix}/%{name}
+mysqladmin create %{DB_NAME}
+
+echo 'GRANT select, insert, update, delete, lock tables 
+ON %{DB_NAME}.* 
+TO %{DB_USER}@localhost 
+IDENTIFIED BY "%{DB_PASSWD}"' | mysql
+
+mysqladmin reload
+
+cat schemas/mysql-initialize.sql | mysql %{DB_NAME}
+
+%files
+%defattr(-, root, root)
+%doc README UPGRADING LICENSE INSTALL doc Makefile
+%attr(0775, %{httpduser}, %{httpdgroup}) %dir %{_var}/log/%{name}
+%{prefix}/%{name}
+
+%changelog
+* Fri Sep 19 2014 - Alain Peyrat <aljeux at free.fr> - 1.5.0-1
+- Reworked for 1.5.0
+
+* Tue May 19 2005 Jesse Becker <jbecker at northwestern.edu>
+- Initial build
diff --git a/src/plugins/wiki/www/doc/README.fpdf b/src/plugins/wiki/www/doc/README.fpdf
deleted file mode 100644
index b109ceb..0000000
--- a/src/plugins/wiki/www/doc/README.fpdf
+++ /dev/null
@@ -1,4 +0,0 @@
-The official site for fdpf is http://www.fpdf.org/
-
-fpdf.php and the fonts were taken from the phpMyAdmin distribution, 
-which took some files from the fpdf 1.51 distribution.
diff --git a/src/plugins/wiki/www/lib/AccessLog.php b/src/plugins/wiki/www/lib/AccessLog.php
deleted file mode 100644
index 9cab0d8..0000000
--- a/src/plugins/wiki/www/lib/AccessLog.php
+++ /dev/null
@@ -1,766 +0,0 @@
-<?php
-
-/*
- * Copyright 2005, 2007 Reini Urban
- *
- * This file is part of PhpWiki.
- *
- * PhpWiki 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 2 of the License, or
- * (at your option) any later version.
- *
- * PhpWiki 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 PhpWiki; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/**
- * Read and write file and SQL accesslog. Write sequentially.
- *
- * Read from file per pagename: Hits
- *
- */
-
-/**
- * Create NCSA "combined" log entry for current request.
- * Also needed for advanced spam prevention.
- * global object holding global state (sql or file, entries, to dump)
- */
-class Request_AccessLog
-{
-    /**
-     * @param string $logfile Log file name.
-     * @param bool $do_sql
-     */
-    function Request_AccessLog($logfile, $do_sql = false)
-    {
-        //global $request; // request not yet initialized!
-
-        $this->logfile = $logfile;
-        if ($logfile and !is_writeable($logfile)) {
-            trigger_error
-            (sprintf(_("%s is not writable."), _("The PhpWiki access log file"))
-                    . "\n"
-                    . sprintf(_("Please ensure that %s is writable, or redefine %s in config/config.ini."),
-                        sprintf(_("the file “%s”"), ACCESS_LOG),
-                        'ACCESS_LOG')
-                , E_USER_NOTICE);
-        }
-        //$request->_accesslog =& $this;
-        //if (empty($request->_accesslog->entries))
-        register_shutdown_function("Request_AccessLogEntry_shutdown_function");
-
-        if ($do_sql) {
-            if (!$request->_dbi->isSQL()) {
-                trigger_error("Unsupported database backend for ACCESS_LOG_SQL. Need DATABASE_TYPE=SQL or ADODB or PDO.");
-            } else {
-                global $DBParams;
-                //$this->_dbi =& $request->_dbi;
-                $this->logtable = (!empty($DBParams['prefix']) ? $DBParams['prefix'] : '') . "accesslog";
-            }
-        }
-        $this->entries = array();
-        $this->entries[] = new Request_AccessLogEntry($this);
-    }
-
-    function _do($cmd, &$arg)
-    {
-        if ($this->entries)
-            for ($i = 0; $i < count($this->entries); $i++)
-                $this->entries[$i]->$cmd($arg);
-    }
-
-    function push(&$request)
-    {
-        $this->_do('push', $request);
-    }
-
-    function setSize($arg)
-    {
-        $this->_do('setSize', $arg);
-    }
-
-    function setStatus($arg)
-    {
-        $this->_do('setStatus', $arg);
-    }
-
-    function setDuration($arg)
-    {
-        $this->_do('setDuration', $arg);
-    }
-
-    /**
-     * Read sequentially all previous entries from the beginning.
-     * while ($logentry = Request_AccessLogEntry::read()) ;
-     * For internal log analyzers: RecentReferrers, WikiAccessRestrictions
-     */
-    function read()
-    {
-        return $this->logtable ? $this->read_sql() : $this->read_file();
-    }
-
-    /**
-     * Return iterator of referer items reverse sorted (latest first).
-     */
-    function get_referer($limit = 15, $external_only = false)
-    {
-        if ($external_only) { // see stdlin.php:isExternalReferrer()
-            $base = SERVER_URL;
-            $blen = strlen($base);
-        }
-        if (!empty($this->_dbi)) {
-            // check same hosts in referer and request and remove them
-            $ext_where = " AND LEFT(referer,$blen) <> " . $this->_dbi->quote($base)
-                . " AND LEFT(referer,$blen) <> LEFT(CONCAT(" . $this->_dbi->quote(SERVER_URL) . ",request_uri),$blen)";
-            return $this->_read_sql_query("(referer <>'' AND NOT(ISNULL(referer)))"
-                . ($external_only ? $ext_where : '')
-                . " ORDER BY time_stamp DESC"
-                . ($limit ? " LIMIT $limit" : ""));
-        } else {
-            $iter = new WikiDB_Array_generic_iter(0);
-            $logs =& $iter->_array;
-            while ($logentry = $this->read_file()) {
-                if (!empty($logentry->referer)
-                    and (!$external_only or (substr($logentry->referer, 0, $blen) != $base))
-                ) {
-                    $iter->_array[] = $logentry;
-                    if ($limit and count($logs) > $limit)
-                        array_shift($logs);
-                }
-            }
-            $logs = array_reverse($logs);
-            $logs = array_slice($logs, 0, min($limit, count($logs)));
-            return $iter;
-        }
-    }
-
-    /**
-     * Read sequentially backwards all previous entries from log file.
-     * FIXME!
-     */
-    function read_file()
-    {
-        global $request;
-        if ($this->logfile) $this->logfile = ACCESS_LOG; // support Request_AccessLog::read
-
-        if (empty($this->reader)) // start at the beginning
-            $this->reader = fopen($this->logfile, "r");
-        if ($s = fgets($this->reader)) {
-            $entry = new Request_AccessLogEntry($this);
-            $re = '/^(\S+)\s(\S+)\s(\S+)\s\[(.+?)\] "([^"]+)" (\d+) (\d+) "([^"]*)" "([^"]*)"$/';
-            if (preg_match($re, $s, $m)) {
-                list(, $entry->host, $entry->ident, $entry->user, $entry->time,
-                    $entry->request, $entry->status, $entry->size,
-                    $entry->referer, $entry->user_agent) = $m;
-            }
-            return $entry;
-        } else { // until the end
-            fclose($this->reader);
-            return false;
-        }
-    }
-
-    function read_sql($where = '')
-    {
-        if (empty($this->sqliter))
-            $this->sqliter = $this->_read_sql_query($where);
-        return $this->sqliter->next();
-    }
-
-    function _read_sql_query($where = '')
-    {
-        global $request;
-        $dbh =& $request->_dbi;
-        $log_tbl =& $this->logtable;
-        return $dbh->genericSqlIter("SELECT *,request_uri as request,request_time as time,remote_user as user,"
-            . "remote_host as host,agent as user_agent"
-            . " FROM $log_tbl"
-            . ($where ? " WHERE $where" : ""));
-    }
-
-    /* done in request->finish() before the db is closed */
-    function write_sql()
-    {
-        global $request;
-        $dbh =& $request->_dbi;
-        if (isset($this->entries) and $dbh and $dbh->isOpen())
-            foreach ($this->entries as $entry) {
-                $entry->write_sql();
-            }
-    }
-
-    /* done in the shutdown callback */
-    function write_file()
-    {
-        if (isset($this->entries) and $this->logfile)
-            foreach ($this->entries as $entry) {
-                $entry->write_file();
-            }
-        unset($this->entries);
-    }
-
-    /* in an ideal world... */
-    function write()
-    {
-        if ($this->logfile) $this->write_file();
-        if ($this->logtable) $this->write_sql();
-        unset($this->entries);
-    }
-}
-
-class Request_AccessLogEntry
-{
-    /**
-     * The log entry will be automatically appended to the log file or
-     * SQL table when the current request terminates.
-     *
-     * If you want to modify a Request_AccessLogEntry before it gets
-     * written (e.g. via the setStatus and setSize methods) you should
-     * use an '&' on the constructor, so that you're working with the
-     * original (rather than a copy) object.
-     *
-     * <pre>
-     *    $log_entry = & new Request_AccessLogEntry("/tmp/wiki_access_log");
-     *    $log_entry->setStatus(401);
-     *    $log_entry->push($request);
-     * </pre>
-     *
-     */
-    function __construct(&$accesslog)
-    {
-        $this->_accesslog = $accesslog;
-        $this->logfile = $accesslog->logfile;
-        $this->time = time();
-        $this->status = 200; // see setStatus()
-        $this->size = 0; // see setSize()
-    }
-
-    /**
-     * @param $request object  Request object for current request.
-     */
-    function push(&$request)
-    {
-        $this->host = $request->get('REMOTE_HOST');
-        $this->ident = $request->get('REMOTE_IDENT');
-        if (!$this->ident)
-            $this->ident = '-';
-        $user = $request->getUser();
-        if ($user->isAuthenticated())
-            $this->user = $user->UserName();
-        else
-            $this->user = '-';
-        $this->request = join(' ', array($request->get('REQUEST_METHOD'),
-            $request->get('REQUEST_URI'),
-            $request->get('SERVER_PROTOCOL')));
-        $this->referer = (string)$request->get('HTTP_REFERER');
-        $this->user_agent = (string)$request->get('HTTP_USER_AGENT');
-    }
-
-    /**
-     * Set result status code.
-     *
-     * @param $status integer  HTTP status code.
-     */
-    function setStatus($status)
-    {
-        $this->status = $status;
-    }
-
-    /**
-     * Set response size.
-     *
-     * @param $size integer
-     */
-    function setSize($size = 0)
-    {
-        $this->size = (int)$size;
-    }
-
-    function setDuration($seconds)
-    {
-        // Pear DB does not correctly quote , in floats using ?. e.g. in european locales.
-        // Workaround:
-        $this->duration = str_replace(",", ".", sprintf("%f", $seconds));
-    }
-
-    /**
-     * Get time zone offset.
-     *
-     * This is a static member function.
-     *
-     * @param int|bool $time Unix timestamp (defaults to current time).
-     * @return string Zone offset, e.g. "-0800" for PST.
-     */
-    function _zone_offset($time = false)
-    {
-        if (!$time)
-            $time = time();
-        $offset = date("Z", $time);
-        $negoffset = "";
-        if ($offset < 0) {
-            $negoffset = "-";
-            $offset = -$offset;
-        }
-        $offhours = floor($offset / 3600);
-        $offmins = $offset / 60 - $offhours * 60;
-        return sprintf("%s%02d%02d", $negoffset, $offhours, $offmins);
-    }
-
-    /**
-     * Format time in NCSA format.
-     *
-     * This is a static member function.
-     *
-     * @param int|bool $time Unix timestamp (defaults to current time).
-     * @return string Formatted date & time.
-     */
-    function _ncsa_time($time = false)
-    {
-        if (!$time)
-            $time = time();
-        return date("d/M/Y:H:i:s", $time) .
-            " " . $this->_zone_offset();
-    }
-
-    function write()
-    {
-        if ($this->_accesslog->logfile) $this->write_file();
-        if ($this->_accesslog->logtable) $this->write_sql();
-    }
-
-    /**
-     * Write entry to log file.
-     */
-    function write_file()
-    {
-        $entry = sprintf('%s %s %s [%s] "%s" %d %d "%s" "%s"',
-            $this->host, $this->ident, $this->user,
-            $this->_ncsa_time($this->time),
-            $this->request, $this->status, $this->size,
-            $this->referer, $this->user_agent);
-        if (!empty($this->_accesslog->reader)) {
-            fclose($this->_accesslog->reader);
-            unset($this->_accesslog->reader);
-        }
-        //Error log doesn't provide locking.
-        //error_log("$entry\n", 3, $this->logfile);
-        // Alternate method
-        if (($fp = fopen($this->logfile, "a"))) {
-            flock($fp, LOCK_EX);
-            fputs($fp, "$entry\n");
-            fclose($fp);
-        }
-    }
-
-    /* This is better been done by apache mod_log_sql */
-    /* If ACCESS_LOG_SQL & 2 we do write it by our own */
-    function write_sql()
-    {
-        global $request;
-
-        $dbh =& $request->_dbi;
-        if ($dbh and $dbh->isOpen() and $this->_accesslog->logtable) {
-            //$log_tbl =& $this->_accesslog->logtable;
-            if ($request->get('REQUEST_METHOD') == "POST") {
-                // strangely HTTP_POST_VARS doesn't contain all posted vars.
-                $args = $_POST; // copy not ref. clone not needed on hashes
-                // garble passwords
-                if (!empty($args['auth']['passwd'])) $args['auth']['passwd'] = '<not displayed>';
-                if (!empty($args['dbadmin']['passwd'])) $args['dbadmin']['passwd'] = '<not displayed>';
-                if (!empty($args['pref']['passwd'])) $args['pref']['passwd'] = '<not displayed>';
-                if (!empty($args['pref']['passwd2'])) $args['pref']['passwd2'] = '<not displayed>';
-                $this->request_args = substr(serialize($args), 0, 254); // if VARCHAR(255) is used.
-            } else {
-                $this->request_args = $request->get('QUERY_STRING');
-            }
-            $this->request_method = $request->get('REQUEST_METHOD');
-            $this->request_uri = $request->get('REQUEST_URI');
-            // duration problem: sprintf "%f" might use comma e.g. "100,201" in european locales
-            $dbh->_backend->write_accesslog($this);
-        }
-    }
-}
-
-/**
- * Shutdown callback. Ensures that the file is written.
- *
- * @access private
- * @see Request_AccessLogEntry
- */
-function Request_AccessLogEntry_shutdown_function()
-{
-    global $request;
-
-    if (isset($request->_accesslog->entries) and $request->_accesslog->logfile)
-        foreach ($request->_accesslog->entries as $entry) {
-            $entry->write_file();
-        }
-    unset($request->_accesslog->entries);
-}
-
-// TODO: SQL access methods....
-// (c) 2005 Charles Corrigan (the mysql parts)
-// (c) 2006 Rein Urban (the postgresql parts)
-// from AnalyseAccessLogSql.php
-class Request_AccessLog_SQL
-{
-
-    /**
-     * Build the query string
-     *
-     * FIXME: some or all of these queries may be MySQL specific / non-portable
-     * FIXME: properly quote the string args
-     *
-     * The column names displayed are generated from the actual query column
-     * names, so make sure that each column in the query is given a user
-     * friendly name. Note that the column names are passed to _() and so may be
-     * translated.
-     *
-     * If there are query specific where conditions, then the construction
-     * "    if ($where_conditions<>'')
-     *          $where_conditions = 'WHERE '.$where_conditions.' ';"
-     * should be changed to
-     * "    if ($where_conditions<>'')
-     *          $where_conditions = 'AND '.$where_conditions.' ';"
-     * and in the assignment to query have something like
-     * "    $query= "SELECT "
-     *          ."referer "
-     *          ."FROM $accesslog "
-     *          ."WHERE referer IS NOT NULL "
-     *          .$where_conditions
-     */
-    function _getQueryString(&$args)
-    {
-        // extract any parametrised conditions from the arguments,
-        // in particular, how much history to select
-        $where_conditions = $this->_getWhereConditions($args);
-
-        // get the correct name for the table
-        //FIXME is there a more correct way to do this?
-        global $DBParams, $request;
-        $accesslog = (!empty($DBParams['prefix']) ? $DBParams['prefix'] : '') . "accesslog";
-
-        $query = '';
-        $backend_type = $request->_dbi->_backend->backendType();
-        switch ($backend_type) {
-            case 'mysql':
-                $Referring_URL = "left(referer,length(referer)-instr(reverse(referer),'?'))";
-                break;
-            case 'pgsql':
-            case 'postgres7':
-                $Referring_URL = "substr(referer,0,position('?' in referer))";
-                break;
-            default:
-                $Referring_URL = "referer";
-        }
-        switch ($args['mode']) {
-            case 'referring_urls':
-                if ($where_conditions <> '')
-                    $where_conditions = 'WHERE ' . $where_conditions . ' ';
-                $query = "SELECT "
-                    . "$Referring_URL AS Referring_URL, "
-                    . "count(*) AS Referral_Count "
-                    . "FROM $accesslog "
-                    . $where_conditions
-                    . "GROUP BY Referring_URL";
-                break;
-            case 'external_referers':
-                $args['local_referrers'] = 'false';
-                $where_conditions = $this->_getWhereConditions($args);
-                if ($where_conditions <> '')
-                    $where_conditions = 'WHERE ' . $where_conditions . ' ';
-                $query = "SELECT "
-                    . "$Referring_URL AS Referring_URL, "
-                    . "count(*) AS Referral_Count "
-                    . "FROM $accesslog "
-                    . $where_conditions
-                    . "GROUP BY Referring_URL";
-                break;
-            case 'referring_domains':
-                if ($where_conditions <> '')
-                    $where_conditions = 'WHERE ' . $where_conditions . ' ';
-                switch ($backend_type) {
-                    case 'mysql':
-                        $Referring_Domain = "left(referer, if(locate('/', referer, 8) > 0,locate('/', referer, 8) -1, length(referer)))";
-                        break;
-                    case 'pgsql':
-                    case 'postgres7':
-                        $Referring_Domain = "substr(referer,0,8) || regexp_replace(substr(referer,8), '/.*', '')";
-                        break;
-                    default:
-                        $Referring_Domain = "referer";
-                        break;
-                }
-                $query = "SELECT "
-                    . "$Referring_Domain AS Referring_Domain, "
-                    . "count(*) AS Referral_Count "
-                    . "FROM $accesslog "
-                    . $where_conditions
-                    . "GROUP BY Referring_Domain";
-                break;
-            case 'remote_hosts':
-                if ($where_conditions <> '')
-                    $where_conditions = 'WHERE ' . $where_conditions . ' ';
-                $query = "SELECT "
-                    . "remote_host AS Remote_Host, "
-                    . "count(*) AS Access_Count "
-                    . "FROM $accesslog "
-                    . $where_conditions
-                    . "GROUP BY Remote_Host";
-                break;
-            case 'users':
-                if ($where_conditions <> '')
-                    $where_conditions = 'WHERE ' . $where_conditions . ' ';
-                $query = "SELECT "
-                    . "remote_user AS User, "
-                    . "count(*) AS Access_Count "
-                    . "FROM $accesslog "
-                    . $where_conditions
-                    . "GROUP BY remote_user";
-                break;
-            case 'host_users':
-                if ($where_conditions <> '')
-                    $where_conditions = 'WHERE ' . $where_conditions . ' ';
-                $query = "SELECT "
-                    . "remote_host AS Remote_Host, "
-                    . "remote_user AS User, "
-                    . "count(*) AS Access_Count "
-                    . "FROM $accesslog "
-                    . $where_conditions
-                    . "GROUP BY remote_host, remote_user";
-                break;
-            case "search_bots":
-                // This queries for all entries in the SQL access log table that
-                // have a dns name that I know to be a web search engine crawler and
-                // categorises the results into time buckets as per the list below
-                // 0 - 1 minute - 60
-                // 1 - 1 hour   - 3600     = 60 * 60
-                // 2 - 1 day    - 86400    = 60 * 60 * 24
-                // 3 - 1 week   - 604800   = 60 * 60 * 24 * 7
-                // 4 - 1 month  - 2629800  = 60 * 60 * 24 * 365.25 / 12
-                // 5 - 1 year   - 31557600 = 60 * 60 * 24 * 365.25
-                $now = time();
-                $query = "SELECT "
-                    . "CASE WHEN $now-time_stamp<60 THEN '" . _("0 - last minute") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<3600 THEN '" . _("1 - 1 minute to 1 hour") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<86400 THEN '" . _("2 - 1 hour to 1 day") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<604800 THEN '" . _("3 - 1 day to 1 week") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<2629800 THEN '" . _("4 - 1 week to 1 month") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<31557600 THEN '" . _("5 - 1 month to 1 year") . "' ELSE "
-                    . "'" . _("6 - more than 1 year") . "' END END END END END END AS Time_Scale, "
-                    . "remote_host AS Remote_Host, "
-                    . "count(*) AS Access_Count "
-                    . "FROM $accesslog "
-                    . "WHERE (remote_host LIKE '%googlebot.com' "
-                    . "OR remote_host LIKE '%alexa.com' "
-                    . "OR remote_host LIKE '%inktomisearch.com' "
-                    . "OR remote_host LIKE '%msnbot.msn.com') "
-                    . ($where_conditions ? 'AND ' . $where_conditions : '')
-                    . "GROUP BY Time_Scale, remote_host";
-                break;
-            case "search_bots_hits":
-                // This queries for all entries in the SQL access log table that
-                // have a dns name that I know to be a web search engine crawler and
-                // displays the URI that was hit.
-                // If PHPSESSID appears in the URI, just display the URI to the left of this
-                $sessname = session_name();
-                switch ($backend_type) {
-                    case 'mysql':
-                        $Request_URI = "IF(instr(request_uri, '$sessname')=0, request_uri,left(request_uri, instr(request_uri, '$sessname')-2))";
-                        break;
-                    case 'pgsql':
-                    case 'postgres7':
-                        $Request_URI = "regexp_replace(request_uri, '$sessname.*', '')";
-                        break;
-                    default:
-                        $Request_URI = 'request_uri';
-                        break;
-                }
-                $now = time();
-                $query = "SELECT "
-                    . "CASE WHEN $now-time_stamp<60 THEN '" . _("0 - last minute") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<3600 THEN '" . _("1 - 1 minute to 1 hour") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<86400 THEN '" . _("2 - 1 hour to 1 day") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<604800 THEN '" . _("3 - 1 day to 1 week") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<2629800 THEN '" . _("4 - 1 week to 1 month") . "' ELSE "
-                    . "CASE WHEN $now-time_stamp<31557600 THEN '" . _("5 - 1 month to 1 year") . "' ELSE "
-                    . "'" . _("6 - more than 1 year") . "' END END END END END END AS Time_Scale, "
-                    . "remote_host AS Remote_Host, "
-                    . "$Request_URI AS Request_URI "
-                    . "FROM $accesslog "
-                    . "WHERE (remote_host LIKE '%googlebot.com' "
-                    . "OR remote_host LIKE '%alexa.com' "
-                    . "OR remote_host LIKE '%inktomisearch.com' "
-                    . "OR remote_host LIKE '%msnbot.msn.com') "
-                    . ($where_conditions ? 'AND ' . $where_conditions : '')
-                    . "ORDER BY time_stamp";
-        }
-        return $query;
-    }
-
-    /** Honeypot for xgettext. Those strings are translated dynamically.
-     */
-    function _locale_dummy()
-    {
-        $dummy = array(
-            // mode caption
-            _("referring_urls"),
-            _("external_referers"),
-            _("referring_domains"),
-            _("remote_hosts"),
-            _("users"),
-            _("host_users"),
-            _("search_bots"),
-            _("search_bots_hits"),
-            // period header
-            _("minutes"),
-            _("hours"),
-            _("days"),
-            _("weeks"),
-        );
-    }
-
-    function getDefaultArguments()
-    {
-        return array(
-            'mode' => 'referring_domains',
-            // referring_domains, referring_urls, remote_hosts, users, host_users, search_bots, search_bots_hits
-            'caption' => '',
-            // blank means use the mode as the caption/title for the output
-            'local_referrers' => 'true', // only show external referring sites
-            'period' => '', // the type of period to report:
-            // may be weeks, days, hours, minutes, or blank for all
-            'count' => '0' // the number of periods to report
-        );
-    }
-
-    function table_output()
-    {
-        $query = $this->_getQueryString($args);
-
-        if ($query == '')
-            return HTML::p(sprintf(_("Unrecognised parameter 'mode=%s'"),
-                $args['mode']));
-
-        // get the data back.
-        // Note that this must be done before the final generation ofthe table,
-        // otherwise the headers will not be ready
-        $tbody = $this->_getQueryResults($query, $dbi);
-
-        return HTML::table(array('border' => 1),
-            HTML::caption($this->_getCaption($args)),
-            HTML::thead($this->_theadrow),
-            $tbody);
-    }
-
-    function _getQueryResults($query, &$dbi)
-    {
-        $queryResult = $dbi->genericSqlIter($query);
-        if (!$queryResult) {
-            $tbody = HTML::tbody(HTML::tr(HTML::td(_("<empty>"))));
-        } else {
-            $tbody = HTML::tbody();
-            while ($row = $queryResult->next()) {
-                $this->_setHeaders($row);
-                $tr = HTML::tr();
-                foreach ($row as $value) {
-                    // output a '-' for empty values, otherwise the table looks strange
-                    $tr->pushContent(HTML::td(empty($value) ? '-' : $value));
-                }
-                $tbody->pushContent($tr);
-            }
-        }
-        $queryResult->free();
-        return $tbody;
-    }
-
-    function _setHeaders($row)
-    {
-        if (!$this->_headerSet) {
-            foreach ($row as $key => $value) {
-                $this->_theadrow->pushContent(HTML::th(_($key)));
-            }
-            $this->_headerSet = true;
-        }
-    }
-
-    function _getWhereConditions(&$args)
-    {
-        $where_conditions = '';
-
-        if ($args['period'] <> '') {
-            $since = 0;
-            if ($args['period'] == 'minutes') {
-                $since = 60;
-            } elseif ($args['period'] == 'hours') {
-                $since = 60 * 60;
-            } elseif ($args['period'] == 'days') {
-                $since = 60 * 60 * 24;
-            } elseif ($args['period'] == 'weeks') {
-                $since = 60 * 60 * 24 * 7;
-            }
-            $since = $since * $args['count'];
-            if ($since > 0) {
-                if ($where_conditions <> '')
-                    $where_conditions = $where_conditions . ' AND ';
-                $since = time() - $since;
-                $where_conditions = $where_conditions . "time_stamp > $since";
-            }
-        }
-
-        if ($args['local_referrers'] <> 'true') {
-            global $request;
-            if ($where_conditions <> '')
-                $where_conditions = $where_conditions . ' AND ';
-            $localhost = SERVER_URL;
-            $len = strlen($localhost);
-            $backend_type = $request->_dbi->_backend->backendType();
-            switch ($backend_type) {
-                case 'mysql':
-                    $ref_localhost = "left(referer,$len)<>'$localhost'";
-                    break;
-                case 'pgsql':
-                case 'postgres7':
-                    $ref_localhost = "substr(referer,0,$len)<>'$localhost'";
-                    break;
-                default:
-                    $ref_localhost = "";
-            }
-            $where_conditions = $where_conditions . $ref_localhost;
-        }
-
-        // The assumed contract is that there is a space at the end of the
-        // conditions string, so that following SQL clauses (such as GROUP BY)
-        // will not cause a syntax error
-        if ($where_conditions <> '')
-            $where_conditions = $where_conditions . ' ';
-
-        return $where_conditions;
-    }
-
-    function _getCaption(&$args)
-    {
-        $caption = $args['caption'];
-        if ($caption == '')
-            $caption = gettext($args['mode']);
-        if ($args['period'] <> '' && $args['count'])
-            $caption = $caption . " - " . $args['count'] . " " . gettext($args['period']);
-        return $caption;
-    }
-
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
diff --git a/src/plugins/wiki/www/lib/WikiDB/backend/cvs.php b/src/plugins/wiki/www/lib/WikiDB/backend/cvs.php
deleted file mode 100644
index 448d728..0000000
--- a/src/plugins/wiki/www/lib/WikiDB/backend/cvs.php
+++ /dev/null
@@ -1,1028 +0,0 @@
-<?php
-
-/**
- * Backend for handling CVS repository.
- *
- * ASSUMES: that the shell commands 'cvs', 'grep', 'rm', are all located
- * ASSUMES: in the path of the server calling this script.
- *
- * Author: Gerrit Riessen, gerrit.riessen at open-source-consultants.de
- */
-
-require_once 'lib/WikiDB/backend.php';
-require_once 'lib/ErrorManager.php';
-
-/**
- * Constants used by the CVS backend
- **/
-// these are the parameters defined in db_params
-define('CVS_DOC_DIR', 'doc_dir');
-define('CVS_REPOSITORY', 'repository');
-define('CVS_CHECK_FOR_REPOSITORY', 'check_for_repository');
-define('CVS_DEBUG_FILE', 'debug_file');
-define('CVS_PAGE_SOURCE', 'pgsrc');
-define('CVS_MODULE_NAME', 'module_name');
-
-// these are the things that are defined in the page hash
-// CMD == Cvs Meta Data
-define('CMD_LAST_MODIFIED', 'lastmodified');
-define('CMD_CONTENT', '%content');
-define('CMD_CREATED', 'created');
-define('CMD_VERSION', 'version');
-define('CMD_AUTHOR', 'author');
-define('CMD_LINK_ATT', '_links_');
-
-// file names used to store specific information
-define('CVS_MP_FILE', '.most_popular');
-define('CVS_MR_FILE', '.most_recent');
-
-class WikiDB_backend_cvs
-    extends WikiDB_backend
-{
-    public $_docDir;
-    public $_repository;
-    public $_module_name;
-    public $_debug_file;
-
-    /**
-     * In the following parameters should be defined in dbparam:
-     *   . wiki ==> directory where the pages should be stored
-     *              this is not the CVS repository location
-     *   . repository ==> local directory where the repository should be
-     *                    created. This can also be a :pserver: but then
-     *                    set check_for_repository to false and checkout
-     *                    the documents beforehand. (This is basically CVSROOT)
-     *   . check_for_repository ==> boolean flag to indicate whether the
-     *                              repository should be created, this only
-     *                              applies to local directories, for pserver
-     *                              set this to false and check out the
-     *                              document base beforehand
-     *   . debug_file ==> file name where debug information should be sent.
-     *                    If file doesn't exist then it's created, if this
-     *                    is empty, then debugging is turned off.
-     *   . pgsrc ==> directory name where the default wiki pages are stored.
-     *               This is only required if the backend is to create a
-     *               new CVS repository.
-     *
-     * The class also adds a parameter 'module_name' to indicate the name
-     * of the cvs module that is being used to version the documents. The
-     * module_name is assumed to be the base name of directory given in
-     * wiki, e.g. if wiki == '/some/path/to/documents' then module_name
-     * becomes 'documents' and this module will be created in the CVS
-     * repository or assumed to exist. If on the other hand the parameter
-     * already exists, then it is not overwritten.
-     */
-    function __construct($dbparam)
-    {
-        // setup all the instance values.
-        $this->_docDir = $dbparam{CVS_DOC_DIR};
-        $this->_repository = $dbparam{CVS_REPOSITORY};
-        if (!$dbparam{CVS_MODULE_NAME}) {
-            $this->_module_name = basename($this->_docDir);
-            $dbparam{CVS_MODULE_NAME} = $this->_module_name;
-        } else {
-            $this->_module_name = $dbparam{CVS_MODULE_NAME};
-        }
-        $this->_debug_file = $dbparam{CVS_DEBUG_FILE};
-
-        if ($dbparam{CVS_CHECK_FOR_REPOSITORY}
-            && !(is_dir($this->_repository)
-                && is_dir($this->_repository . "/CVSROOT")
-                && is_dir($this->_repository . "/" . $this->_module_name))
-        ) {
-
-            $this->_cvsDebug(sprintf("Creating new repository [%s]", $this->_repository));
-
-            // doesn't exist, need to create it and the replace the wiki
-            // document directory.
-            $this->_mkdir($this->_repository, 0775);
-
-            // assume that the repository is a local directory, prefix :local:
-            if (!ereg("^:local:", $this->_repository)) {
-                $this->_repository = ":local:" . $this->_repository;
-            }
-
-            $cmdLine = sprintf("cvs -d \"%s\" init", $this->_repository);
-            $this->_execCommand($cmdLine, $cmdOutput, true);
-
-            $this->_mkdir($this->_docDir, 0775);
-            $cmdLine = sprintf("cd %s; cvs -d \"%s\" import -m no_message "
-                    . "%s V R", $this->_docDir, $this->_repository,
-                $this->_module_name);
-            $this->_execCommand($cmdLine, $cmdOutput, true);
-
-            // remove the wiki directory and check it out from the
-            // CVS repository
-            $cmdLine = sprintf("rm -fr %s; cd %s; cvs -d \"%s\" co %s",
-                $this->_docDir, dirname($this->_docDir),
-                $this->_repository, $this->_module_name);
-            $this->_execCommand($cmdLine, $cmdOutput, true);
-
-            // add the default pages using the update_pagedata
-            $metaData = array();
-            $metaData[$AUTHOR] = "PhpWiki -- CVS Backend";
-
-            if (is_dir($dbparam[CVS_PAGE_SOURCE])) {
-                $d = opendir($dbparam[CVS_PAGE_SOURCE]);
-                while ($entry = readdir($d)) {
-                    $filename = $dbparam[CVS_PAGE_SOURCE] . "/" . $entry;
-                    $this->_cvsDebug(sprintf("Found [%s] in [%s]", $entry, $dbparam[CVS_PAGE_SOURCE]));
-
-                    if (is_file($filename)) {
-                        $metaData[CMD_CONTENT] = join('', file($filename));
-                        $this->update_pagedata($entry, $metaData);
-                    }
-                }
-                closedir($d);
-            }
-
-            // ensure that the results of the is_dir are cleared
-            clearstatcache();
-        }
-    }
-
-    /**
-     * Return: metadata about page
-     */
-    function get_pagedata($pagename)
-    {
-        // the metadata information about a page is stored in the
-        // CVS directory of the document root in serialized form. The
-        // file always has the name, i.e. '_$pagename'.
-        $metaFile = $this->_docDir . "/CVS/_" . $pagename;
-
-        if (file_exists($metaFile)) {
-
-            $megaHash =
-                unserialize(join('', $this->_readFileWithPath($metaFile)));
-
-            $filename = $this->_docDir . "/" . $pagename;
-            if (file_exists($filename)) {
-                $megaHash[CMD_CONTENT] = $this->_readFileWithPath($filename);
-            } else {
-                $megaHash[CMD_CONTENT] = "";
-            }
-
-            $this->_updateMostRecent($pagename);
-            $this->_updateMostPopular($pagename);
-
-            return $megaHash;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * This will create a new page if page being requested does not
-     * exist.
-     */
-    function update_pagedata($pagename, $newdata = array())
-    {
-        // check argument
-        if (!is_array($newdata)) {
-            trigger_error("update_pagedata: Argument 'newdata' was not array",
-                E_USER_WARNING);
-        }
-
-        // retrieve the meta data
-        $metaData = $this->get_pagedata($pagename);
-
-        if (!$metaData) {
-            $this->_cvsDebug("update_pagedata: no meta data found");
-            // this means that the page does not exist, we need to create
-            // it.
-            $metaData = array();
-
-            $metaData[CMD_CREATED] = time();
-            $metaData[CMD_VERSION] = "1";
-
-            if (!isset($newdata[CMD_CONTENT])) {
-                $metaData[CMD_CONTENT] = "";
-            } else {
-                $metaData[CMD_CONTENT] = $newdata[CMD_CONTENT];
-            }
-
-            // create an empty page ...
-            $this->_writePage($pagename, $metaData[CMD_CONTENT]);
-            $this->_addPage($pagename);
-
-            // make sure that the page is written and committed a second time
-            unset($newdata[CMD_CONTENT]);
-            unset($metaData[CMD_CONTENT]);
-        }
-
-        // change any meta data information
-        foreach ($newdata as $key => $value) {
-            if ($value == false || empty($value)) {
-                unset($metaData[$key]);
-            } else {
-                $metaData[$key] = $value;
-            }
-        }
-
-        // update the page data, if required. Use newdata because it could
-        // be empty and thus unset($metaData[CMD_CONTENT]).
-        if (isset($newdata[CMD_CONTENT])) {
-            $this->_writePage($pagename, $newdata[CMD_CONTENT]);
-        }
-
-        // remove any content from the meta data before storing it
-        unset($metaData[CMD_CONTENT]);
-        $metaData[CMD_LAST_MODIFIED] = time();
-
-        $metaData[CMD_VERSION] = $this->_commitPage($pagename, $metaData);
-        $this->_writeMetaInfo($pagename, $metaData);
-    }
-
-    function get_latest_version($pagename)
-    {
-        $metaData = $this->get_pagedata($pagename);
-        if ($metaData) {
-            // the version number is everything after the '1.'
-            return $metaData[CMD_VERSION];
-        } else {
-            $this->_cvsDebug(sprintf("get_latest_versioned FAILED for [%s]", $pagename));
-            return 0;
-        }
-    }
-
-    function get_previous_version($pagename, $version)
-    {
-        // cvs increments the version numbers, so this is real easy ;-)
-        return ($version > 0 ? $version - 1 : 0);
-    }
-
-    /**
-     * the version parameter is assumed to be everything after the '1.'
-     * in the CVS versioning system.
-     */
-    function get_versiondata($pagename, $version, $want_content = false)
-    {
-        $this->_cvsDebug("get_versiondata: [$pagename] [$version] [$want_content]");
-
-        $filedata = "";
-        if ($want_content) {
-            // retrieve the version from the repository
-            $cmdLine = sprintf("cvs -d \"%s\" co -p -r 1.%d %s/%s 2>&1",
-                $this->_repository, $version,
-                $this->_module_name, $pagename);
-            $this->_execCommand($cmdLine, $filedata, true);
-
-            // TODO: DEBUG: 5 is a magic number here, depending on the
-            // TODO: DEBUG: version of cvs used here, 5 might have to
-            // TODO: DEBUG: change. Basically find a more reliable way of
-            // TODO: DEBUG: doing this.
-            // the first 5 lines contain various bits of
-            // administrative information that can be ignored.
-            for ($i = 0; $i < 5; $i++) {
-                array_shift($filedata);
-            }
-        }
-
-        /**
-         * Now obtain the rest of the pagehash information, this is contained
-         * in the log message for the revision in serialized form.
-         */
-        $cmdLine = sprintf("cd %s; cvs log -r1.%d %s", $this->_docDir,
-            $version, $pagename);
-        $this->_execCommand($cmdLine, $logdata, true);
-
-        // shift log data until we get to the 'revision X.X' line
-        // FIXME: ensure that we don't enter an endless loop here
-        while (!ereg("^revision 1.([0-9]+)$", $logdata[0], $revInfo)) {
-            array_shift($logdata);
-        }
-
-        // serialized hash information now stored in position 2
-        $rVal = unserialize(_unescape($logdata[2]));
-
-        // version information is incorrect
-        $rVal[CMD_VERSION] = $revInfo[1];
-        $rVal[CMD_CONTENT] = $filedata;
-
-        foreach ($rVal as $key => $value) {
-            $this->_cvsDebug("$key == [$value]");
-        }
-
-        return $rVal;
-    }
-
-    /**
-     * See ADODB for a better delete_page(), which can be undone and is seen in RecentChanges.
-     * See backend.php
-     */
-    //function delete_page($pagename) { $this->purge_page($pagename); }
-
-    /**
-     * This returns false if page was not deleted or could not be deleted
-     * else return true.
-     */
-    function purge_page($pagename)
-    {
-        $this->_cvsDebug("delete_page [$pagename]");
-        $filename = $this->_docDir . "/" . $pagename;
-        $metaFile = $this->_docDir . "/CVS/_" . $pagename;
-
-        // obtain a write block before deleting the file
-        if ($this->_deleteFile($filename) == false) {
-            return false;
-        }
-
-        $this->_deleteFile($metaFile);
-
-        $this->_removePage($pagename);
-
-        return true;
-    }
-
-    /**
-     * For now delete and create a new one.
-     *
-     * This returns false if page was not renamed,
-     * else return true.
-     */
-    function rename_page($pagename, $to)
-    {
-        $this->_cvsDebug("rename_page [$pagename,$to]");
-        $data = get_pagedata($pagename);
-        if (isset($data['pagename']))
-            $data['pagename'] = $to;
-        //$version = $this->get_latest_version($pagename);
-        //$vdata = get_versiondata($pagename, $version, 1);
-        //$data[CMD_CONTENT] = $vdata[CMD_CONTENT];
-        $this->delete_page($pagename);
-        $this->update_pagedata($to, $data);
-        return true;
-    }
-
-    function delete_versiondata($pagename, $version)
-    {
-        // TODO: Not Implemented.
-        // TODO: This is, for CVS, difficult because it implies removing a
-        // TODO: revision somewhere in the middle of a revision tree, and
-        // TODO: this is basically not possible!
-        trigger_error("delete_versiondata: Not Implemented", E_USER_WARNING);
-    }
-
-    function set_versiondata($pagename, $version, $data)
-    {
-        // TODO: Not Implemented.
-        // TODO: requires changing the log(commit) message for a particular
-        // TODO: version and this can't be done??? (You can edit the repository
-        // TODO: file directly but i don't know of a way of doing it via
-        // TODO: the cvs tools).
-        trigger_error("set_versiondata: Not Implemented", E_USER_WARNING);
-    }
-
-    function update_versiondata($pagename, $version, $newdata)
-    {
-        // TODO: same problem as set_versiondata
-        trigger_error("set_versiondata: Not Implemented", E_USER_WARNING);
-    }
-
-    function set_links($pagename, $links)
-    {
-        // TODO: needs to be tested ....
-        $megaHash = get_pagedata($pagename);
-        $megaHash[CMD_LINK_ATT] = $links;
-        $this->_writeMetaInfo($pagename, $megaHash);
-    }
-
-    function get_links($pagename, $reversed = true, $include_empty = false,
-                       $sortby = '', $limit = '', $exclude = '')
-    {
-        // TODO: ignores the $reversed argument and returns
-        // TODO: the value of _links_ attribute of the meta information
-        // TODO: to implement a reversed version, i guess, we going to
-        // TODO: need to do a grep on all files for the pagename in
-        // TODO: in question and return all those page names that contained
-        // TODO: the required pagename!
-        $megaHash = get_pagedata($pagename);
-        return $megaHash[CMD_LINK_ATT];
-    }
-
-    /* function get_all_revisions($pagename) {
-        // TODO: should replace this with something more efficient
-        include_once 'lib/WikiDB/backend/dumb/AllRevisionsIter.php';
-        return new WikiDB_backend_dumb_AllRevisionsIter($this, $pagename);
-    } */
-
-    function get_all_pages($include_empty = false, $sortby = '', $limit = '')
-    {
-        // FIXME: this ignores the parameters.
-        return new Cvs_Backend_Array_Iterator(
-            $this->_getAllFileNamesInDir($this->_docDir));
-    }
-
-    function text_search($search, $fullsearch = false, $orderby = false, $limit = '', $exclude = '')
-    {
-        if ($fullsearch) {
-            $iter = new Cvs_Backend_Full_Search_Iterator(
-                $this->_getAllFileNamesInDir($this->_docDir),
-                $search,
-                $this->_docDir);
-            $iter->stoplisted =& $search->stoplisted;
-            return $iter;
-        } else {
-            return new Cvs_Backend_Title_Search_Iterator(
-                $this->_getAllFileNamesInDir($this->_docDir),
-                $search);
-        }
-    }
-
-    function most_popular($limit, $sortby = '')
-    {
-        // TODO: needs to be tested ...
-        $mp = $this->_getMostPopular();
-        if ($limit < 0) {
-            asort($mp, SORT_NUMERIC);
-            $limit = -$limit;
-        } else {
-            arsort($mp, SORT_NUMERIC);
-        }
-        $returnVal = array();
-
-        while ((list($key, $val) = each($a)) && $limit > 0) {
-            $returnVal[] = $key;
-            $limit--;
-        }
-        return $returnVal;
-    }
-
-    /**
-     * This only accepts the 'since' and 'limit' attributes, everything
-     * else is ignored.
-     */
-    function most_recent($params)
-    {
-        // TODO: needs to be tested ...
-        // most recent are those pages with the highest time value ...
-        $mr = $this->_getMostRecent();
-        $rev = false;
-        $returnVal = array();
-        if (isset($params['limit'])) {
-            $limit = $params['limit'];
-            $rev = $limit < 0;
-        }
-        if ($rev) {
-            arsort($mr, SORT_NUMERIC);
-        } else {
-            asort($mr, SORT_NUMERIC);
-        }
-        if (isset($limit)) {
-            while ((list($key, $val) = each($a)) && $limit > 0) {
-                $returnVal[] = $key;
-                $limit--;
-            }
-        } elseif (isset($params['since'])) {
-            while ((list($key, $val) = each($a))) {
-
-                if ($val > $params['since']) {
-                    $returnVal[] = $key;
-                }
-            }
-        }
-
-        return new Cvs_Backend_Array_Iterator($returnVal);
-    }
-
-    function lock($write_lock = true)
-    {
-        // TODO: to be implemented
-        trigger_error("lock: Not Implemented", E_USER_WARNING);
-    }
-
-    function unlock($force = false)
-    {
-        // TODO: to be implemented
-        trigger_error("unlock: Not Implemented", E_USER_WARNING);
-    }
-
-    function close()
-    {
-    }
-
-    function sync()
-    {
-    }
-
-    function optimize()
-    {
-    }
-
-    /**
-     * What we do here is take a listing of the documents directory and
-     * check that each page has metadata file. If not, then a metadata
-     * file is created for the page.
-     *
-     * This can happen if rebuild() was called and someone has added
-     * files to the CVS repository not via PhpWiki. These files are
-     * added to the document directory but without any metadata files.
-     */
-    function check()
-    {
-        // TODO:
-        // TODO: test this .... i.e. add test to unit test file.
-        // TODO:
-        $page_names = $this->_getAllFileNamesInDir($this->_docDir);
-        $meta_names = $this->_getAllFileNamesInDir($this->_docDir . "/CVS");
-
-        array_walk($meta_names, '_strip_leading_underscore');
-        reset($meta_names);
-        $no_meta_files = array_diff($page_names, $meta_names);
-
-        array_walk($no_meta_files, '_create_meta_file', $this);
-
-        return true;
-    }
-
-    /**
-     * Do an update of the CVS repository
-     */
-    function rebuild()
-    {
-        // TODO:
-        // TODO: test this .... i.e. add test to unit test file.
-        // TODO:
-        $cmdLine = sprintf("cd %s; cvs update -d 2>&1", $this->_docDir);
-        $this->_execCommand($cmdLine, $cmdOutput, true);
-        return true;
-    }
-
-    //
-    // ..-.-..-.-..-.-.. .--..-......-.--. --.-....----.....
-    // The rest are all internal methods, not to be used
-    // directly.
-    // ..-.-..-.-..-.-.. .--..-......-.--. --.-....----.....
-    //
-    function _create_meta_file($page_name, $key, &$backend)
-    {
-        // this is used as part of an array walk and therefore takes
-        // the backend argument
-        $backend->_cvsDebug(sprintf("Creating meta file for [%s]", $page_name));
-        $backend->update_pagedata($page_name, array());
-    }
-
-    function _strip_leading_underscore(&$item)
-    {
-        $item = ereg_replace("^_", "", $item);
-    }
-
-    /**
-     * update the most popular information by incrementing the count
-     * for the following page. If the page was not defined, it is entered
-     * with a value of 1.
-     */
-    function _updateMostPopular($pagename)
-    {
-        $mp = $this->_getMostPopular();
-        if (isset($mp[$pagename])) {
-            $mp[$pagename]++;
-        } else {
-            $mp[$pagename] = 1;
-        }
-        $this->_writeFileWithPath($this->_docDir . "/CVS/" . CVS_MP_FILE,
-            serialize($mp));
-    }
-
-    /**
-     * Returns an array containing the most popular information. This
-     * creates the most popular file if it does not exist.
-     */
-    function _getMostPopular()
-    {
-        $mostPopular = $this->_docDir . "/CVS/" . CVS_MP_FILE;
-        if (!file_exists($mostPopular)) {
-            $this->_writeFileWithPath($mostPopular, serialize(array()));
-        }
-        return unserialize(join('', $this->_readFileWithPath($mostPopular)));
-    }
-
-    function _getMostRecent()
-    {
-        $mostRecent = $this->_docDir . "/CVS/" . CVS_MR_FILE;
-        if (!file_exists($mostRecent)) {
-            $this->_writeFileWithPath($mostRecent, serialize(array()));
-        }
-        return unserialize(join('', $this->_readFileWithPath($mostRecent)));
-    }
-
-    function _updateMostRecent($pagename)
-    {
-        $mr = $this->_getMostRecent();
-        $mr[$pagename] = time();
-        $this->_writeFileWithPath($this->_docDir . "/CVS/" . CVS_MR_FILE,
-            serialize($mr));
-    }
-
-    function _writeMetaInfo($pagename, $hashInfo)
-    {
-        $this->_writeFileWithPath($this->_docDir . "/CVS/_" . $pagename,
-            serialize($hashInfo));
-    }
-
-    function _writePage($pagename, $content)
-    {
-        $this->_writeFileWithPath($this->_docDir . "/" . $pagename, $content);
-    }
-
-    function _removePage($pagename)
-    {
-        $cmdLine = sprintf("cd %s; cvs remove %s 2>&1; cvs commit -m '%s' "
-                . "%s 2>&1", $this->_docDir, $pagename,
-            "remove page", $pagename);
-
-        $this->_execCommand($cmdLine, $cmdRemoveOutput, true);
-    }
-
-    /**
-     * this returns the new version number of the file.
-     */
-    function _commitPage($pagename, &$meta_data)
-    {
-        $cmdLine = sprintf("cd %s; cvs commit -m \"%s\" %s 2>&1",
-            $this->_docDir,
-            escapeshellcmd(serialize($meta_data)),
-            $pagename);
-        $this->_execCommand($cmdLine, $cmdOutput, true);
-
-        $cmdOutput = implode("\n", $cmdOutput);
-        $revInfo = array();
-        ereg("\nnew revision: 1[.]([0-9]+); previous revision: ", $cmdOutput,
-            $revInfo);
-
-        $this->_cvsDebug("CP: revInfo 0: $revInfo[0]");
-        $this->_cvsDebug("CP: $cmdOutput");
-        if (isset($revInfo[1])) {
-            $this->_cvsDebug("CP: got revision information");
-            return $revInfo[1];
-        } else {
-            ereg("\ninitial revision: 1[.]([0-9]+)", $cmdOutput, $revInfo);
-            if (isset($revInfo[1])) {
-                $this->_cvsDebug("CP: is initial release");
-                return 1;
-            }
-            $this->_cvsDebug("CP: returning old version");
-            return $meta_data[CMD_VERSION];
-        }
-    }
-
-    function _addPage($pagename)
-    {
-        // TODO: need to add a check for the mimetype so that binary
-        // TODO: files are added as binary files
-        $cmdLine = sprintf("cd %s; cvs add %s 2>&1", $this->_docDir,
-            $pagename);
-        $this->_execCommand($cmdLine, $cmdAddOutput, true);
-    }
-
-    /**
-     * Returns an array containing all the names of files contained
-     * in a particular directory. The list is sorted according the
-     * string representation of the filenames.
-     */
-    function _getAllFileNamesInDir($dirName)
-    {
-        $namelist = array();
-        $d = opendir($dirName);
-        while ($entry = readdir($d)) {
-            $namelist[] = $entry;
-        }
-        closedir($d);
-        sort($namelist, SORT_STRING);
-        return $namelist;
-    }
-
-    /**
-     * Recursively create all directories.
-     */
-    function _mkdir($path, $mode)
-    {
-        $directoryName = dirname($path);
-        if ($directoryName != "/" && $directoryName != "\\"
-            && !is_dir($directoryName) && $directoryName != ""
-        ) {
-            $rVal = $this->_mkdir($directoryName, $mode);
-        } else {
-            $rVal = true;
-        }
-
-        return ($rVal && @mkdir($path, $mode));
-    }
-
-    /**
-     * Recursively create all directories and then the file.
-     */
-    function _createFile($path, $mode)
-    {
-        $this->_mkdir(dirname($path), $mode);
-        touch($path);
-        chmod($path, $mode);
-    }
-
-    /**
-     * The lord giveth, and the lord taketh.
-     */
-    function _deleteFile($filename)
-    {
-        if ($fd = fopen($filename, 'a')) {
-
-            $locked = flock($fd, 2); // Exclusive blocking lock
-
-            if (!$locked) {
-                $this->_cvsError("Unable to delete file, lock was not obtained.",
-                    __LINE__, $filename, EM_NOTICE_ERRORS);
-            }
-
-            if (($rVal = unlink($filename)) != 0) {
-                $this->_cvsDebug("[$filename] --> Unlink returned [$rVal]");
-            }
-
-            return $rVal;
-        } else {
-            $this->_cvsError("deleteFile: Unable to open file",
-                __LINE__, $filename, EM_NOTICE_ERRORS);
-            return false;
-        }
-    }
-
-    /**
-     * Called when something happened that causes the CVS backend to
-     * fail.
-     */
-    function _cvsError($msg = "no message",
-                       $errline = 0,
-                       $errfile = "lib/WikiDB/backend/cvs.php",
-                       $errno = EM_FATAL_ERRORS)
-    {
-        $err = new PhpError($errno, "[CVS(be)]: " . $msg, $errfile, $errline);
-        // send error to the debug routine
-        $this->_cvsDebug($err->asXML());
-        // send the error to the error manager
-        $GLOBALS['ErrorManager']->handleError($err);
-    }
-
-    /**
-     * Debug function specifically for the CVS database functions.
-     * Can be deactived by setting the WikiDB['debug_file'] to ""
-     */
-    function _cvsDebug($msg)
-    {
-        if ($this->_debug_file == "") {
-            return;
-        }
-
-        if (!file_exists($this->_debug_file)) {
-            $this->_createFile($this->_debug_file, 0755);
-        }
-
-        if ($fdlock = @fopen($this->_debug_file, 'a')) {
-            $locked = flock($fdlock, 2);
-            if (!$locked) {
-                fclose($fdlock);
-                return;
-            }
-
-            $fdappend = @fopen($this->_debug_file, 'a');
-            fwrite($fdappend, ($msg . "\n"));
-            fclose($fdappend);
-            fclose($fdlock);
-        } else {
-            // TODO: this should be replaced ...
-            printf("unable to locate/open [%s], turning debug off\n", $filename);
-            $this->_debug_file = "";
-        }
-    }
-
-    /**
-     * Execute a command and potentially exit if the flag exitOnNonZero is
-     * set to true and the return value was nonZero
-     */
-    function _execCommand($cmdLine, &$cmdOutput, $exitOnNonZero)
-    {
-        $this->_cvsDebug(sprintf("Preparing to execute [%s]", $cmdLine));
-        exec($cmdLine, $cmdOutput, $cmdReturnVal);
-        if ($exitOnNonZero && ($cmdReturnVal != 0)) {
-            $this->_cvsDebug(sprintf("Command failed [%s], Output: ", $cmdLine) . "[" .
-                join("\n", $cmdOutput) . "]");
-            $this->_cvsError(sprintf("Command failed [%s], Return value: %s", $cmdLine, $cmdReturnVal),
-                __LINE__);
-        }
-        $this->_cvsDebug("Done execution [" . join("\n", $cmdOutput) . "]");
-
-        return $cmdReturnVal;
-    }
-
-    /**
-     * Read locks a file, reads it, and returns it contents
-     */
-    function _readFileWithPath($filename)
-    {
-        if ($fd = @fopen($filename, "r")) {
-            $locked = flock($fd, 1); // read lock
-            if (!$locked) {
-                fclose($fd);
-                $this->_cvsError("Unable to obtain read lock.", __LINE__);
-            }
-
-            $content = file($filename);
-            fclose($fd);
-            return $content;
-        } else {
-            $this->_cvsError(sprintf("Unable to open file '%s' for reading", $filename),
-                __LINE__);
-            return false;
-        }
-    }
-
-    /**
-     * Either replace the contents of an existing file or create a
-     * new file in the particular store using the page name as the
-     * file name.
-     *
-     * Nothing is returned, might be useful to return something ;-)
-     */
-    function _writeFileWithPath($filename, $contents)
-    {
-        // TODO: $contents should probably be a reference parameter ...
-        if ($fd = fopen($filename, 'a')) {
-            $locked = flock($fd, 2); // Exclusive blocking lock
-            if (!$locked) {
-                $this->_cvsError("Timeout while obtaining lock.", __LINE__);
-            }
-
-            // Second filehandle -- we use this to write the contents
-            $fdsafe = fopen($filename, 'w');
-            fwrite($fdsafe, $contents);
-            fclose($fdsafe);
-            fclose($fd);
-        } else {
-            $this->_cvsError(sprintf("Could not open file '%s' for writing", $filename),
-                __LINE__);
-        }
-    }
-
-    /**
-     * Copy the contents of the source directory to the destination directory.
-     */
-    function _copyFilesFromDirectory($src, $dest)
-    {
-        $this->_cvsDebug(sprintf("Copying from [%s] to [%s]", $src, $dest));
-
-        if (is_dir($src) && is_dir($dest)) {
-            $this->_cvsDebug("Copying ");
-            $d = opendir($src);
-            while ($entry = readdir($d)) {
-                if (is_file($src . "/" . $entry)
-                    && copy($src . "/" . $entry, $dest . "/" . $entry)
-                ) {
-                    $this->_cvsDebug(sprintf("Copied to [%s]", "$dest/$entry"));
-                } else {
-                    $this->_cvsDebug(sprintf("Failed to copy [%s]", "$src/$entry"));
-                }
-            }
-            closedir($d);
-            return true;
-        } else {
-            $this->_cvsDebug("Not copying");
-            return false;
-        }
-    }
-
-    /**
-     * Unescape a string value. Normally this comes from doing an
-     * escapeshellcmd. This converts the following:
-     *    \{ --> {
-     *    \} --> }
-     *    \; --> ;
-     *    \" --> "
-     */
-    function _unescape($val)
-    {
-        $val = str_replace("\\{", "{", $val);
-        $val = str_replace("\\}", "}", $val);
-        $val = str_replace("\\;", ";", $val);
-        $val = str_replace("\\\"", "\"", $val);
-
-        return $val;
-    }
-
-    /**
-     * Function for removing the newlines from the ends of the
-     * file data returned from file(..). This is used in retrievePage
-     */
-    function _strip_newlines(&$item, $key)
-    {
-        $item = ereg_replace("\n$", "", $item);
-    }
-
-} /* End of WikiDB_backend_cvs class */
-
-/**
- * Generic iterator for stepping through an array of values.
- */
-class Cvs_Backend_Array_Iterator
-    extends WikiDB_backend_iterator
-{
-    public $_array;
-
-    function Cvs_Backend_Iterator($arrayValue = Array())
-    {
-        $this->_array = $arrayValue;
-    }
-
-    function next()
-    {
-        while (($rVal = array_pop($this->_array)) != NULL) {
-            return $rVal;
-        }
-        return false;
-    }
-
-    function count()
-    {
-        return count($this->_array);
-    }
-
-    function free()
-    {
-        unset($this->_array);
-    }
-}
-
-class Cvs_Backend_Full_Search_Iterator
-    extends Cvs_Backend_Array_Iterator
-{
-    public $_searchString = '';
-    public $_docDir = "";
-
-    function __construct($arrayValue = array(),
-                         $searchString = "",
-                         $documentDir = ".")
-    {
-        $this->Cvs_Backend_Array_Iterator($arrayValue);
-        $_searchString = $searchString;
-        $_docDir = $documentDir;
-    }
-
-    function next()
-    {
-        do {
-            $pageName = Cvs_Backend_Array_Iterator::next();
-        } while (!$this->_searchFile($_searchString,
-            $_docDir . "/" . $pageName));
-
-        return $pageName;
-    }
-
-    /**
-     * Does nothing more than a grep and search the entire contents
-     * of the given file. Returns TRUE of the searchstring was found,
-     * false if the search string wasn't find or the file was a directory
-     * or could not be read.
-     */
-    function _searchFile($searchString, $fileName)
-    {
-        // TODO: using grep here, it might make more sense to use
-        // TODO: some sort of inbuilt/language specific method for
-        // TODO: searching files.
-        $cmdLine = sprintf("grep -E -i '%s' %s > /dev/null 2>&1",
-            $searchString, $fileName);
-
-        return (WikiDB_backend_cvs::_execCommand($cmdLine, $cmdOutput,
-            false) == 0);
-    }
-}
-
-/**
- * Iterator used for doing a title search.
- */
-class Cvs_Backend_Title_Search_Iterator
-    extends Cvs_Backend_Array_Iterator
-{
-    public $_searchString = '';
-
-    function __construct($arrayValue = array(),
-                         $searchString = "")
-    {
-        parent::__construct($arrayValue);
-        $_searchString = $searchString;
-    }
-
-    function next()
-    {
-        do {
-            $pageName = Cvs_Backend_Array_Iterator::next();
-        } while (!eregi($this->_searchString, $pageName));
-
-        return $pageName;
-    }
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
diff --git a/src/plugins/wiki/www/lib/WikiDB/cvs.php b/src/plugins/wiki/www/lib/WikiDB/cvs.php
deleted file mode 100644
index 789481e..0000000
--- a/src/plugins/wiki/www/lib/WikiDB/cvs.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-require_once 'lib/WikiDB.php';
-require_once 'lib/WikiDB/backend/cvs.php';
-
-/**
- * Wrapper class for the cvs backend.
- *
- * @Author: Gerrit Riessen, gerrit.riessen at open-source-consultants.de
- *
- * Use the new cvsclient PECL extension, if available
- * http://pecl.php.net/package/cvsclient
- *
- */
-class WikiDB_cvs
-    extends WikiDB
-{
-    public $_backend;
-
-    function __construct($dbparams)
-    {
-        if (loadPhpExtension('cvsclient'))
-            $this->_backend = new WikiDB_backend_cvsclient($dbparams);
-        else
-            $this->_backend = new WikiDB_backend_cvs($dbparams);
-    }
-}
diff --git a/src/plugins/wiki/www/lib/WikiUser/EMailConfirm.php b/src/plugins/wiki/www/lib/WikiUser/EMailConfirm.php
deleted file mode 100644
index 4485fde..0000000
--- a/src/plugins/wiki/www/lib/WikiUser/EMailConfirm.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-/*
- * Copyright (C) 2006 ReiniUrban
- *
- * This file is part of PhpWiki.
- *
- * PhpWiki 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 2 of the License, or
- * (at your option) any later version.
- *
- * PhpWiki 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 PhpWiki; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-class _EMailConfirmPassUser
-    extends _PassUser
-    /**
-     * Unconfirmed users have ANON access,
-     * confirmed users are equal to passusers WIKIAUTH_USER.
-     *
-     * Users give their email at registration, phpwiki sends a link per email,
-     * user clicks on url link to verify, user is confirmed.
-     *
-     * Preferences are handled in _PassUser
-     */
-{
-    // This can only be called from _PassUser, because the parent class
-    // sets the pref methods, before this class is initialized.
-    function _EMailConfirmPassUser($UserName = '', $prefs = false, $file = '')
-    {
-        if (!$this->_prefs and isa($this, "_EMailPassUser")) {
-            if ($prefs) $this->_prefs = $prefs;
-            if (!isset($this->_prefs->_method))
-                _PassUser::_PassUser($UserName);
-        }
-        $this->_userid = $UserName;
-        return $this;
-    }
-
-    function userExists()
-    {
-        if (!$this->isValidName($this->_userid)) {
-            return $this->_tryNextUser();
-        }
-        $this->_authmethod = 'EMailConfirm';
-        // check the prefs for emailVerified
-        if ($this->_prefs->get('emailVerified'))
-            return true;
-        return $this->_tryNextUser();
-    }
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
diff --git a/src/plugins/wiki/www/lib/WikiUserNew.php b/src/plugins/wiki/www/lib/WikiUserNew.php
deleted file mode 100644
index bb9741f..0000000
--- a/src/plugins/wiki/www/lib/WikiUserNew.php
+++ /dev/null
@@ -1,2291 +0,0 @@
-<?php
-/* Copyright (C) 2004,2005,2006,2007,2009,2010 $ThePhpWikiProgrammingTeam
- * Copyright (C) 2009-2010 Marc-Etienne Vargenau, Alcatel-Lucent
- * Copyright (C) 2009-2010 Roger Guignard, Alcatel-Lucent
- *
- * This file is part of PhpWiki.
- *
- * PhpWiki 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 2 of the License, or
- * (at your option) any later version.
- *
- * PhpWiki 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 PhpWiki; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/**
- * This is a complete OOP rewrite of the old WikiUser code with various
- * configurable external authentication methods.
- *
- * There's only one entry point, the function WikiUser which returns
- * a WikiUser object, which contains the name, authlevel and user's preferences.
- * This object might get upgraded during the login step and later also.
- * There exist three preferences storage methods: cookie, homepage and db,
- * and multiple password checking methods.
- * See index.php for $USER_AUTH_ORDER[] and USER_AUTH_POLICY if
- * ALLOW_USER_PASSWORDS is defined.
- *
- * Each user object must define the two preferences methods
- *  getPreferences(), setPreferences(),
- * and the following 1-4 auth methods
- *  checkPass()  must be defined by all classes,
- *  userExists() only if USER_AUTH_POLICY'=='strict'
- *  mayChangePass()  only if the password is storable.
- *  storePass()  only if the password is storable.
- *
- * WikiUser() given no name, returns an _AnonUser (anonymous user)
- * object, who may or may not have a cookie.
- * However, if the there's a cookie with the userid or a session,
- * the user is upgraded to the matching user object.
- * Given a user name, returns a _BogoUser object, who may or may not
- * have a cookie and/or PersonalPage, one of the various _PassUser objects
- * or an _AdminUser object.
- * BTW: A BogoUser is a userid (loginname) as valid WikiWord, who might
- * have stored a password or not. If so, his account is secure, if not
- * anybody can use it, because the username is visible e.g. in RecentChanges.
- *
- * Takes care of passwords, all preference loading/storing in the
- * user's page and any cookies. lib/main.php will query the user object to
- * verify the password as appropriate.
- *
- * @author: Reini Urban (the tricky parts),
- *          Carsten Klapp (started rolling the ball)
- *
- * Random architectural notes, sorted by date:
- * 2004-01-25 rurban
- * Test it by defining ENABLE_USER_NEW in config/config.ini
- * 1) Now a ForbiddenUser is returned instead of false.
- * 2) Previously ALLOW_ANON_USER = false meant that anon users cannot edit,
- *    but may browse. Now with ALLOW_ANON_USER = false he may not browse,
- *    which is needed to disable browse PagePermissions.
- *    I added now ALLOW_ANON_EDIT = true to makes things clear.
- *    (which replaces REQUIRE_SIGNIN_BEFORE_EDIT)
- * 2004-02-27 rurban:
- * 3) Removed pear prepare. Performance hog, and using integers as
- *    handler doesn't help. Do simple sprintf as with adodb. And a prepare
- *    in the object init is no advantage, because in the init loop a lot of
- *    objects are tried, but not used.
- * 4) Already gotten prefs are passed to the next object to avoid
- *    duplicate getPreferences() calls.
- * 2004-03-18 rurban
- * 5) Major php-5 problem: $this re-assignment is disallowed by the parser
- *    So we cannot just discrimate with
- *      if (!check_php_version(5))
- *          $this = $user;
- *    A /php5-patch.php is provided, which patches the src automatically
- *    for php4 and php5. Default is php4.
- *    Update: not needed anymore. we use eval to fool the load-time syntax checker.
- * 2004-03-24 rurban
- * 6) enforced new cookie policy: prefs don't get stored in cookies
- *    anymore, only in homepage and/or database, but always in the
- *    current session. old pref cookies will get deleted.
- * 2004-04-04 rurban
- * 7) Certain themes should be able to extend the predefined list
- *    of preferences. Display/editing is done in the theme specific userprefs.tmpl,
- *    but storage must be extended to the Get/SetPreferences methods.
- *    <theme>/themeinfo.php must provide CustomUserPreferences:
- *      A list of name => _UserPreference class pairs.
- * 2010-06-07 rurban
- *    Fixed a nasty recursion bug (i.e. php crash), when user = new class
- *    which returned false, did not return false on php-4.4.7. Check for
- *    a object member now.
- */
-
-define('WIKIAUTH_FORBIDDEN', -1); // Completely not allowed.
-define('WIKIAUTH_ANON', 0); // Not signed in.
-define('WIKIAUTH_BOGO', 1); // Any valid WikiWord is enough.
-define('WIKIAUTH_USER', 2); // Bogo user with a password.
-define('WIKIAUTH_ADMIN', 10); // UserName == ADMIN_USER.
-define('WIKIAUTH_UNOBTAINABLE', 100); // Permissions that no user can achieve
-
-//if (!defined('COOKIE_EXPIRATION_DAYS')) define('COOKIE_EXPIRATION_DAYS', 365);
-//if (!defined('COOKIE_DOMAIN'))          define('COOKIE_DOMAIN', '/');
-if (!defined('EDITWIDTH_MIN_COLS')) define('EDITWIDTH_MIN_COLS', 30);
-if (!defined('EDITWIDTH_MAX_COLS')) define('EDITWIDTH_MAX_COLS', 150);
-if (!defined('EDITWIDTH_DEFAULT_COLS')) define('EDITWIDTH_DEFAULT_COLS', 80);
-
-if (!defined('EDITHEIGHT_MIN_ROWS')) define('EDITHEIGHT_MIN_ROWS', 5);
-if (!defined('EDITHEIGHT_MAX_ROWS')) define('EDITHEIGHT_MAX_ROWS', 80);
-if (!defined('EDITHEIGHT_DEFAULT_ROWS')) define('EDITHEIGHT_DEFAULT_ROWS', 22);
-
-define('TIMEOFFSET_MIN_HOURS', -26);
-define('TIMEOFFSET_MAX_HOURS', 26);
-if (!defined('TIMEOFFSET_DEFAULT_HOURS')) define('TIMEOFFSET_DEFAULT_HOURS', 0);
-
-/* EMAIL VERIFICATION
- * On certain nets or hosts the email domain cannot be determined automatically from the DNS.
- * Provide some overrides here.
- *    ( username @ ) domain => mail-domain
- */
-$EMailHosts = array('avl.com' => 'mail.avl.com');
-
-/**
- * There are be the following constants in config/config.ini to
- * establish login parameters:
- *
- * ALLOW_ANON_USER         default true
- * ALLOW_ANON_EDIT         default true
- * ALLOW_BOGO_LOGIN        default true
- * ALLOW_USER_PASSWORDS    default true
- * PASSWORD_LENGTH_MINIMUM default 0
- *
- * To require user passwords for editing:
- * ALLOW_ANON_USER  = true
- * ALLOW_ANON_EDIT  = false   (before named REQUIRE_SIGNIN_BEFORE_EDIT)
- * ALLOW_BOGO_LOGIN = false
- * ALLOW_USER_PASSWORDS = true
- *
- * To establish a COMPLETELY private wiki, such as an internal
- * corporate one:
- * ALLOW_ANON_USER = false
- * (and probably require user passwords as described above). In this
- * case the user will be prompted to login immediately upon accessing
- * any page.
- *
- * There are other possible combinations, but the typical wiki (such
- * as http://PhpWiki.sf.net/phpwiki) would usually just leave all four
- * enabled.
- *
- */
-
-// The last object in the row is the bad guy...
-if (!is_array($USER_AUTH_ORDER))
-    $USER_AUTH_ORDER = array("Forbidden");
-else
-    $USER_AUTH_ORDER[] = "Forbidden";
-
-// Local convenience functions.
-function _isAnonUserAllowed()
-{
-    return (defined('ALLOW_ANON_USER') && ALLOW_ANON_USER);
-}
-
-function _isBogoUserAllowed()
-{
-    return (defined('ALLOW_BOGO_LOGIN') && ALLOW_BOGO_LOGIN);
-}
-
-function _isUserPasswordsAllowed()
-{
-    return (defined('ALLOW_USER_PASSWORDS') && ALLOW_USER_PASSWORDS);
-}
-
-// Possibly upgrade userobject functions.
-function _determineAdminUserOrOtherUser($UserName)
-{
-    // Sanity check. User name is a condition of the definition of the
-    // _AdminUser, _BogoUser and _passuser.
-    if (!$UserName)
-        return $GLOBALS['ForbiddenUser'];
-
-    //FIXME: check admin membership later at checkPass. Now we cannot raise the level.
-    //$group = &WikiGroup::getGroup($GLOBALS['request']);
-    if ($UserName == ADMIN_USER)
-        return new _AdminUser($UserName);
-    /* elseif ($group->isMember(GROUP_ADMIN)) { // unneeded code
-        return _determineBogoUserOrPassUser($UserName);
-    }
-    */
-    else
-        return _determineBogoUserOrPassUser($UserName);
-}
-
-function _determineBogoUserOrPassUser($UserName)
-{
-    global $ForbiddenUser;
-
-    // Sanity check. User name is a condition of the definition of
-    // _BogoUser and _PassUser.
-    if (!$UserName)
-        return $ForbiddenUser;
-
-    // Check for password and possibly upgrade user object.
-    // $_BogoUser = new _BogoUser($UserName);
-    if (_isBogoUserAllowed() and isWikiWord($UserName)) {
-        include_once 'lib/WikiUser/BogoLogin.php';
-        $_BogoUser = new _BogoLoginPassUser($UserName);
-        if ($_BogoUser->userExists() or $GLOBALS['request']->getArg('auth'))
-            return $_BogoUser;
-    }
-    if (_isUserPasswordsAllowed()) {
-        // PassUsers override BogoUsers if a password is stored
-        if (isset($_BogoUser) and isset($_BogoUser->_prefs)
-            and $_BogoUser->_prefs->get('passwd')
-        )
-            return new _PassUser($UserName, $_BogoUser->_prefs);
-        else {
-            $_PassUser = new _PassUser($UserName,
-                isset($_BogoUser) ? $_BogoUser->_prefs : false);
-            if ($_PassUser->userExists() or $GLOBALS['request']->getArg('auth')) {
-                if (isset($GLOBALS['request']->_user_class))
-                    $class = $GLOBALS['request']->_user_class;
-                elseif (strtolower(get_class($_PassUser)) == "_passuser")
-                    $class = $_PassUser->nextClass(); else
-                    $class = get_class($_PassUser);
-                if ($user = new $class($UserName, $_PassUser->_prefs)
-                    and $user->_userid
-                ) {
-                    return $user;
-                } else {
-                    return $_PassUser;
-                }
-            }
-        }
-    }
-    // No Bogo- or PassUser exists, or
-    // passwords are not allowed, and bogo is disallowed too.
-    // (Only the admin can sign in).
-    return $ForbiddenUser;
-}
-
-/**
- * Primary WikiUser function, called by lib/main.php.
- *
- * This determines the user's type and returns an appropriate user
- * object. lib/main.php then querys the resultant object for password
- * validity as necessary.
- *
- * If an _AnonUser object is returned, the user may only browse pages
- * (and save prefs in a cookie).
- *
- * To disable access but provide prefs the global $ForbiddenUser class
- * is returned. (was previously false)
- *
- */
-function WikiUser($UserName = '')
-{
-    global $ForbiddenUser, $HTTP_SESSION_VARS;
-
-    //Maybe: Check sessionvar for username & save username into
-    //sessionvar (may be more appropriate to do this in lib/main.php).
-    if ($UserName) {
-        $ForbiddenUser = new _ForbiddenUser($UserName);
-        // Found a user name.
-        return _determineAdminUserOrOtherUser($UserName);
-    } elseif (!empty($HTTP_SESSION_VARS['userid'])) {
-        // Found a user name.
-        $ForbiddenUser = new _ForbiddenUser($_SESSION['userid']);
-        return _determineAdminUserOrOtherUser($_SESSION['userid']);
-    } else {
-        // Check for autologin pref in cookie and possibly upgrade
-        // user object to another type.
-        $_AnonUser = new _AnonUser();
-        if ($UserName = $_AnonUser->_userid && $_AnonUser->_prefs->get('autologin')) {
-            // Found a user name.
-            $ForbiddenUser = new _ForbiddenUser($UserName);
-            return _determineAdminUserOrOtherUser($UserName);
-        } else {
-            $ForbiddenUser = new _ForbiddenUser();
-            if (_isAnonUserAllowed())
-                return $_AnonUser;
-            return $ForbiddenUser; // User must sign in to browse pages.
-        }
-    }
-}
-
-/**
- * WikiUser.php use the name 'WikiUser'
- */
-function WikiUserClassname()
-{
-    return '_WikiUser';
-}
-
-/**
- * Upgrade olduser by copying properties from user to olduser.
- * We are not sure yet, for which php's a simple $this = $user works reliably,
- * (on php4 it works ok, on php5 it's currently disallowed on the parser level)
- * that's why try it the hard way.
- */
-function UpgradeUser($user, $newuser)
-{
-    if (isa($user, '_WikiUser') and isa($newuser, '_WikiUser')) {
-        // populate the upgraded class $newuser with the values from the current user object
-        //only _auth_level, _current_method, _current_index,
-        if (!empty($user->_level) and
-            $user->_level > $newuser->_level
-        )
-            $newuser->_level = $user->_level;
-        if (!empty($user->_current_index) and
-            $user->_current_index > $newuser->_current_index
-        ) {
-            $newuser->_current_index = $user->_current_index;
-            $newuser->_current_method = $user->_current_method;
-        }
-        if (!empty($user->_authmethod))
-            $newuser->_authmethod = $user->_authmethod;
-        $GLOBALS['request']->_user_class = get_class($newuser);
-        /*
-        foreach (get_object_vars($user) as $k => $v) {
-            if (!empty($v)) $olduser->$k = $v;
-        }
-        */
-        $newuser->hasHomePage(); // revive db handle, because these don't survive sessions
-        //$GLOBALS['request']->_user = $olduser;
-        return $newuser;
-    } else {
-        return false;
-    }
-}
-
-/**
- * Probably not needed, since we use the various user objects methods so far.
- * Anyway, here it is, looping through all available objects.
- */
-function UserExists($UserName)
-{
-    global $request;
-    if (!($user = $request->getUser()))
-        $user = WikiUser($UserName);
-    if (!$user)
-        return false;
-    if ($user->userExists($UserName)) {
-        $request->_user = $user;
-        return true;
-    }
-    if (isa($user, '_BogoUser'))
-        $user = new _PassUser($UserName, $user->_prefs);
-    $class = $user->nextClass();
-    if ($user = new $class($UserName, $user->_prefs)) {
-        return $user->userExists($UserName);
-    }
-    $request->_user = $GLOBALS['ForbiddenUser'];
-    return false;
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/**
- * Base WikiUser class.
- */
-class _WikiUser
-{
-    public $_userid = '';
-    public $_level = WIKIAUTH_ANON;
-    public $_prefs = false;
-    public $_HomePagehandle = false;
-
-    // constructor
-    function _WikiUser($UserName = '', $prefs = false)
-    {
-
-        $this->_userid = $UserName;
-        $this->_HomePagehandle = false;
-        if ($UserName) {
-            $this->hasHomePage();
-        }
-        if (empty($this->_prefs)) {
-            if ($prefs) $this->_prefs = $prefs;
-            else $this->getPreferences();
-        }
-    }
-
-    function UserName()
-    {
-        if (!empty($this->_userid)) {
-            return $this->_userid;
-        } else {
-            return '';
-        }
-    }
-
-    function getPreferences()
-    {
-        trigger_error("DEBUG: Note: undefined _WikiUser class trying to load prefs." . " "
-            . "New subclasses of _WikiUser must override this function.");
-        return false;
-    }
-
-    function setPreferences($prefs, $id_only)
-    {
-        trigger_error("DEBUG: Note: undefined _WikiUser class trying to save prefs."
-            . " "
-            . "New subclasses of _WikiUser must override this function.");
-        return false;
-    }
-
-    function userExists()
-    {
-        return $this->hasHomePage();
-    }
-
-    function checkPass($submitted_password)
-    {
-        // By definition, an undefined user class cannot sign in.
-        trigger_error("DEBUG: Warning: undefined _WikiUser class trying to sign in."
-            . " "
-            . "New subclasses of _WikiUser must override this function.");
-        return false;
-    }
-
-    // returns page_handle to user's home page or false if none
-    function hasHomePage()
-    {
-        if ($this->_userid) {
-            if (!empty($this->_HomePagehandle) and is_object($this->_HomePagehandle)) {
-                return $this->_HomePagehandle->exists();
-            } else {
-                // check db again (maybe someone else created it since
-                // we logged in.)
-                global $request;
-                $this->_HomePagehandle = $request->getPage($this->_userid);
-                return $this->_HomePagehandle->exists();
-            }
-        }
-        // nope
-        return false;
-    }
-
-    function createHomePage()
-    {
-        global $request;
-        $versiondata = array('author' => ADMIN_USER);
-        $request->_dbi->save(_("Automatically created user homepage to be able to store UserPreferences.") .
-                "\n{{Template/UserPage}}",
-            1, $versiondata);
-        $request->_dbi->touch();
-        $this->_HomePagehandle = $request->getPage($this->_userid);
-    }
-
-    // innocent helper: case-insensitive position in _auth_methods
-    function array_position($string, $array)
-    {
-        $string = strtolower($string);
-        for ($found = 0; $found < count($array); $found++) {
-            if (strtolower($array[$found]) == $string)
-                return $found;
-        }
-        return false;
-    }
-
-    function nextAuthMethodIndex()
-    {
-        if (empty($this->_auth_methods))
-            $this->_auth_methods = $GLOBALS['USER_AUTH_ORDER'];
-        if (empty($this->_current_index)) {
-            if (strtolower(get_class($this)) != '_passuser') {
-                $this->_current_method = substr(get_class($this), 1, -8);
-                $this->_current_index = $this->array_position($this->_current_method,
-                    $this->_auth_methods);
-            } else {
-                $this->_current_index = -1;
-            }
-        }
-        $this->_current_index++;
-        if ($this->_current_index >= count($this->_auth_methods))
-            return false;
-        $this->_current_method = $this->_auth_methods[$this->_current_index];
-        return $this->_current_index;
-    }
-
-    function AuthMethod($index = false)
-    {
-        return $this->_auth_methods[$index === false
-            ? count($this->_auth_methods) - 1
-            : $index];
-    }
-
-    // upgrade the user object
-    function nextClass()
-    {
-        $method = $this->AuthMethod($this->nextAuthMethodIndex());
-        include_once("lib/WikiUser/$method.php");
-        return "_" . $method . "PassUser";
-    }
-
-    //Fixme: for _HttpAuthPassUser
-    function PrintLoginForm(&$request, $args, $fail_message = false,
-                            $separate_page = false)
-    {
-        include_once 'lib/Template.php';
-        // Call update_locale in case the system's default language is not 'en'.
-        // (We have no user pref for lang at this point yet, no one is logged in.)
-        if ($GLOBALS['LANG'] != DEFAULT_LANGUAGE)
-            update_locale(DEFAULT_LANGUAGE);
-        $userid = $this->_userid;
-        $require_level = 0;
-        extract($args); // fixme
-
-        $require_level = max(0, min(WIKIAUTH_ADMIN, (int)$require_level));
-
-        $pagename = $request->getArg('pagename');
-        $nocache = 1;
-        $login = Template('login',
-            compact('pagename', 'userid', 'require_level',
-                'fail_message', 'pass_required', 'nocache'));
-        // check if the html template was already processed
-        $separate_page = $separate_page ? true : !alreadyTemplateProcessed('html');
-        if ($separate_page) {
-            $page = $request->getPage($pagename);
-            $revision = $page->getCurrentRevision();
-            return GeneratePage($login, _("Sign In"), $revision);
-        } else {
-            return $login->printExpansion();
-        }
-    }
-
-    /** Signed in but not password checked or empty password.
-     */
-    function isSignedIn()
-    {
-        return (isa($this, '_BogoUser') or isa($this, '_PassUser'));
-    }
-
-    /** This is password checked for sure.
-     */
-    function isAuthenticated()
-    {
-        //return isa($this,'_PassUser');
-        //return isa($this,'_BogoUser') || isa($this,'_PassUser');
-        return $this->_level >= WIKIAUTH_BOGO;
-    }
-
-    function isAdmin()
-    {
-        static $group;
-        if ($this->_level == WIKIAUTH_ADMIN) return true;
-        if (!$this->isSignedIn()) return false;
-        if (!$this->isAuthenticated()) return false;
-
-        if (!$group) $group = &$GLOBALS['request']->getGroup();
-        return ($this->_level > WIKIAUTH_BOGO and $group->isMember(GROUP_ADMIN));
-    }
-
-    /** Name or IP for a signed user. UserName could come from a cookie e.g.
-     */
-    function getId()
-    {
-        return ($this->UserName()
-            ? $this->UserName()
-            : $GLOBALS['request']->get('REMOTE_ADDR'));
-    }
-
-    /** Name for an authenticated user. No IP here.
-     */
-    function getAuthenticatedId()
-    {
-        return ($this->isAuthenticated()
-            ? $this->_userid
-            : ''); //$GLOBALS['request']->get('REMOTE_ADDR') );
-    }
-
-    function hasAuthority($require_level)
-    {
-        return $this->_level >= $require_level;
-    }
-
-    /* This is quite restrictive and not according the login description online.
-       Any word char (A-Za-z0-9_), " ", ".", "@" and "-"
-       The backends may loosen or tighten this.
-    */
-    function isValidName($userid = false)
-    {
-        if (!$userid) $userid = $this->_userid;
-        if (!$userid) return false;
-        if (defined('FUSIONFORGE') and FUSIONFORGE) {
-            return true;
-        }
-        return preg_match("/^[\-\w\.@ ]+$/U", $userid) and strlen($userid) < 32;
-    }
-
-    /**
-     * Called on an auth_args POST request, such as login, logout or signin.
-     * TODO: Check BogoLogin users with empty password. (self-signed users)
-     */
-    function AuthCheck($postargs)
-    {
-        // Normalize args, and extract.
-        $keys = array('userid', 'passwd', 'require_level', 'login', 'logout',
-            'cancel');
-        foreach ($keys as $key)
-            $args[$key] = isset($postargs[$key]) ? $postargs[$key] : false;
-        extract($args);
-        $require_level = max(0, min(WIKIAUTH_ADMIN, (int)$require_level));
-
-        if ($logout) { // Log out
-            if (LOGIN_LOG and is_writeable(LOGIN_LOG)) {
-                global $request;
-                $zone_offset = Request_AccessLogEntry::_zone_offset();
-                $ncsa_time = date("d/M/Y:H:i:s", time());
-                $entry = sprintf('%s - %s - [%s %s] "%s" %s - "%s" "%s"',
-                    (string)$request->get('REMOTE_HOST'),
-                    (string)$request->_user->_userid,
-                    $ncsa_time, $zone_offset,
-                    "logout " . get_class($request->_user),
-                    "401",
-                    (string)$request->get('HTTP_REFERER'),
-                    (string)$request->get('HTTP_USER_AGENT')
-                );
-                if (($fp = fopen(LOGIN_LOG, "a"))) {
-                    flock($fp, LOCK_EX);
-                    fputs($fp, "$entry\n");
-                    fclose($fp);
-                }
-                //error_log("$entry\n", 3, LOGIN_LOG);
-            }
-            if (method_exists($GLOBALS['request']->_user, "logout")) { //_HttpAuthPassUser
-                $GLOBALS['request']->_user->logout();
-            }
-            $user = new _AnonUser();
-            $user->_userid = '';
-            $user->_level = WIKIAUTH_ANON;
-            return $user;
-        } elseif ($cancel)
-            return false; // User hit cancel button.
-        elseif (!$login && !$userid)
-            return false; // Nothing to do?
-
-        if (!$this->isValidName($userid))
-            return _("Invalid username.");
-        ;
-
-        $authlevel = $this->checkPass($passwd === false ? '' : $passwd);
-
-        if (LOGIN_LOG and is_writeable(LOGIN_LOG)) {
-            global $request;
-            $zone_offset = Request_AccessLogEntry::_zone_offset();
-            $ncsa_time = date("d/M/Y:H:i:s", time());
-            $manglepasswd = $passwd;
-            for ($i = 0; $i < strlen($manglepasswd); $i++) {
-                $c = substr($manglepasswd, $i, 1);
-                if (ord($c) < 32) $manglepasswd[$i] = "<";
-                elseif ($c == '*') $manglepasswd[$i] = "*"; elseif ($c == '?') $manglepasswd[$i] = "?"; elseif ($c == '(') $manglepasswd[$i] = "("; elseif ($c == ')') $manglepasswd[$i] = ")"; elseif ($c == "\\") $manglepasswd[$i] = "\\"; elseif (ord($c) < 127) $manglepasswd[$i] = "x"; elseif (ord($c) >= 127) $manglepasswd[$i] = ">";
-            }
-            if ((DEBUG & _DEBUG_LOGIN) and $authlevel <= 0) $manglepasswd = $passwd;
-            $entry = sprintf('%s - %s - [%s %s] "%s" %s - "%s" "%s"',
-                $request->get('REMOTE_HOST'),
-                (string)$request->_user->_userid,
-                $ncsa_time, $zone_offset,
-                "login $userid/$manglepasswd => $authlevel " . get_class($request->_user),
-                $authlevel > 0 ? "200" : "403",
-                (string)$request->get('HTTP_REFERER'),
-                (string)$request->get('HTTP_USER_AGENT')
-            );
-            if (($fp = fopen(LOGIN_LOG, "a"))) {
-                flock($fp, LOCK_EX);
-                fputs($fp, "$entry\n");
-                fclose($fp);
-            }
-            //error_log("$entry\n", 3, LOGIN_LOG);
-        }
-
-        if ($authlevel <= 0) { // anon or forbidden
-            if ($passwd)
-                return _("Invalid password.");
-            else
-                return _("Invalid password or userid.");
-        } elseif ($authlevel < $require_level) { // auth ok, but not enough
-            if (!empty($this->_current_method) and strtolower(get_class($this)) == '_passuser') {
-                // upgrade class
-                $class = "_" . $this->_current_method . "PassUser";
-                include_once 'lib/WikiUser/' . $this->_current_method . '.php';
-                $user = new $class($userid, $this->_prefs);
-                $this->_level = $authlevel;
-                return $user;
-            }
-            $this->_userid = $userid;
-            $this->_level = $authlevel;
-            return _("Insufficient permissions.");
-        }
-
-        // Successful login.
-        //$user = $GLOBALS['request']->_user;
-        if (!empty($this->_current_method) and
-            strtolower(get_class($this)) == '_passuser'
-        ) {
-            // upgrade class
-            $class = "_" . $this->_current_method . "PassUser";
-            include_once 'lib/WikiUser/' . $this->_current_method . '.php';
-            $user = new $class($userid, $this->_prefs);
-            $user->_level = $authlevel;
-            return $user;
-        }
-        $this->_userid = $userid;
-        $this->_level = $authlevel;
-        return $this;
-    }
-
-}
-
-/**
- * Not authenticated in user, but he may be signed in. Basicly with view access only.
- * prefs are stored in cookies, but only the userid.
- */
-class _AnonUser
-    extends _WikiUser
-{
-    public $_level = WIKIAUTH_ANON;
-
-    /** Anon only gets to load and save prefs in a cookie, that's it.
-     */
-    function getPreferences()
-    {
-        global $request;
-
-        if (empty($this->_prefs))
-            $this->_prefs = new UserPreferences;
-        $UserName = $this->UserName();
-
-        // Try to read deprecated 1.3.x style cookies
-        if ($cookie = $request->cookies->get_old(WIKI_NAME)) {
-            if (!$unboxedcookie = $this->_prefs->retrieve($cookie)) {
-                trigger_error(_("Empty Preferences or format of UserPreferences cookie not recognised.")
-                        . "\n"
-                        . sprintf("%s='%s'", WIKI_NAME, $cookie)
-                        . "\n"
-                        . _("Default preferences will be used."),
-                    E_USER_NOTICE);
-            }
-            /**
-             * Only set if it matches the UserName who is
-             * signing in or if this really is an Anon login (no
-             * username). (Remember, _BogoUser and higher inherit this
-             * function too!).
-             */
-            if (!$UserName || $UserName == @$unboxedcookie['userid']) {
-                $this->_prefs->updatePrefs($unboxedcookie);
-                $UserName = @$unboxedcookie['userid'];
-                if (is_string($UserName) and (substr($UserName, 0, 2) != 's:'))
-                    $this->_userid = $UserName;
-                else
-                    $UserName = false;
-            }
-            // v1.3.8 policy: don't set PhpWiki cookies, only plaintext WIKI_ID cookies
-            if (!headers_sent())
-                $request->deleteCookieVar(WIKI_NAME);
-        }
-        // Try to read deprecated 1.3.4 style cookies
-        if (!$UserName and ($cookie = $request->cookies->get_old("WIKI_PREF2"))) {
-            if (!$unboxedcookie = $this->_prefs->retrieve($cookie)) {
-                if (!$UserName || $UserName == $unboxedcookie['userid']) {
-                    $this->_prefs->updatePrefs($unboxedcookie);
-                    $UserName = $unboxedcookie['userid'];
-                    if (is_string($UserName) and (substr($UserName, 0, 2) != 's:'))
-                        $this->_userid = $UserName;
-                    else
-                        $UserName = false;
-                }
-                if (!headers_sent())
-                    $request->deleteCookieVar("WIKI_PREF2");
-            }
-        }
-        if (!$UserName) {
-            // Try reading userid from old PhpWiki cookie formats:
-            if ($cookie = $request->cookies->get_old(getCookieName())) {
-                if (is_string($cookie) and (substr($cookie, 0, 2) != 's:'))
-                    $UserName = $cookie;
-                elseif (is_array($cookie) and !empty($cookie['userid']))
-                    $UserName = $cookie['userid'];
-            }
-            if (!$UserName and !headers_sent())
-                $request->deleteCookieVar(getCookieName());
-            else
-                $this->_userid = $UserName;
-        }
-
-        // initializeTheme() needs at least an empty object
-        /*
-         if (empty($this->_prefs))
-            $this->_prefs = new UserPreferences;
-        */
-        return $this->_prefs;
-    }
-
-    /** _AnonUser::setPreferences(): Save prefs in a cookie and session and update all global vars
-     *
-     * Allow for multiple wikis in same domain. Encode only the
-     * _prefs array of the UserPreference object. Ideally the
-     * prefs array should just be imploded into a single string or
-     * something so it is completely human readable by the end
-     * user. In that case stricter error checking will be needed
-     * when loading the cookie.
-     */
-    function setPreferences($prefs, $id_only = false)
-    {
-        if (!is_object($prefs)) {
-            if (is_object($this->_prefs)) {
-                $updated = $this->_prefs->updatePrefs($prefs);
-                $prefs =& $this->_prefs;
-            } else {
-                // update the prefs values from scratch. This could lead to unnecessary
-                // side-effects: duplicate emailVerified, ...
-                $this->_prefs = new UserPreferences($prefs);
-                $updated = true;
-            }
-        } else {
-            if (!isset($this->_prefs))
-                $this->_prefs =& $prefs;
-            else
-                $updated = $this->_prefs->isChanged($prefs);
-        }
-        if ($updated) {
-            if ($id_only and !headers_sent()) {
-                global $request;
-                // new 1.3.8 policy: no array cookies, only plain userid string as in
-                // the pre 1.3.x versions.
-                // prefs should be stored besides the session in the homepagehandle or in a db.
-                $request->setCookieVar(getCookieName(), $this->_userid,
-                    COOKIE_EXPIRATION_DAYS, COOKIE_DOMAIN);
-                //$request->setCookieVar(WIKI_NAME, array('userid' => $prefs->get('userid')),
-                //                       COOKIE_EXPIRATION_DAYS, COOKIE_DOMAIN);
-            }
-        }
-        if (is_object($prefs)) {
-            $packed = $prefs->store();
-            $unpacked = $prefs->unpack($packed);
-            if (count($unpacked)) {
-                foreach (array('_method', '_select', '_update', '_insert') as $param) {
-                    if (!empty($this->_prefs->{$param}))
-                        $prefs->{$param} = $this->_prefs->{$param};
-                }
-                $this->_prefs = $prefs;
-            }
-        }
-        return $updated;
-    }
-
-    function userExists()
-    {
-        return true;
-    }
-
-    function checkPass($submitted_password)
-    {
-        return false;
-    }
-
-}
-
-/**
- * Helper class to finish the PassUser auth loop.
- * This is added automatically to USER_AUTH_ORDER.
- */
-class _ForbiddenUser
-    extends _AnonUser
-{
-    public $_level = WIKIAUTH_FORBIDDEN;
-
-    function checkPass($submitted_password)
-    {
-        return WIKIAUTH_FORBIDDEN;
-    }
-
-    function userExists()
-    {
-        if ($this->_HomePagehandle) return true;
-        return false;
-    }
-}
-
-/**
- * Do NOT extend _BogoUser to other classes, for checkPass()
- * security. (In case of defects in code logic of the new class!)
- * The intermediate step between anon and passuser.
- * We also have the _BogoLoginPassUser class with stricter
- * password checking, which fits into the auth loop.
- * Note: This class is not called anymore by WikiUser()
- */
-class _BogoUser
-    extends _AnonUser
-{
-    function userExists()
-    {
-        if (isWikiWord($this->_userid)) {
-            $this->_level = WIKIAUTH_BOGO;
-            return true;
-        } else {
-            $this->_level = WIKIAUTH_ANON;
-            return false;
-        }
-    }
-
-    function checkPass($submitted_password)
-    {
-        // By definition, BogoUser has an empty password.
-        $this->userExists();
-        return $this->_level;
-    }
-}
-
-class _PassUser
-    extends _AnonUser
-    /**
-     * Called if ALLOW_USER_PASSWORDS and Anon and Bogo failed.
-     *
-     * The classes for all subsequent auth methods extend from this class.
-     * This handles the auth method type dispatcher according $USER_AUTH_ORDER,
-     * the three auth method policies first-only, strict and stacked
-     * and the two methods for prefs: homepage or database,
-     * if $DBAuthParams['pref_select'] is defined.
-     *
-     * Default is PersonalPage auth and prefs.
-     *
-     * @author: Reini Urban
-     * @tables: pref
-     */
-{
-    public $_auth_dbi, $_prefs;
-    public $_current_method, $_current_index;
-
-    // check and prepare the auth and pref methods only once
-    function _PassUser($UserName = '', $prefs = false)
-    {
-        //global $DBAuthParams, $DBParams;
-        if ($UserName) {
-            /*if (!$this->isValidName($UserName))
-                return false;*/
-            $this->_userid = $UserName;
-            if ($this->hasHomePage())
-                $this->_HomePagehandle = $GLOBALS['request']->getPage($this->_userid);
-        }
-        $this->_authmethod = substr(get_class($this), 1, -8);
-        if ($this->_authmethod == 'a') $this->_authmethod = 'admin';
-
-        // Check the configured Prefs methods
-        $dbi = $this->getAuthDbh();
-        $dbh = $GLOBALS['request']->getDbh();
-        if ($dbi
-            and !$dbh->readonly
-                and !isset($this->_prefs->_select)
-                    and $dbh->getAuthParam('pref_select')
-        ) {
-            if (!$this->_prefs) {
-                $this->_prefs = new UserPreferences();
-                $need_pref = true;
-            }
-            $this->_prefs->_method = $dbh->getParam('dbtype');
-            $this->_prefs->_select = $this->prepare($dbh->getAuthParam('pref_select'), "userid");
-            // read-only prefs?
-            if (!isset($this->_prefs->_update) and $dbh->getAuthParam('pref_update')) {
-                $this->_prefs->_update = $this->prepare($dbh->getAuthParam('pref_update'),
-                    array("userid", "pref_blob"));
-            }
-        } else {
-            if (!$this->_prefs) {
-                $this->_prefs = new UserPreferences();
-                $need_pref = true;
-            }
-            $this->_prefs->_method = 'HomePage';
-        }
-
-        if (!$this->_prefs or isset($need_pref)) {
-            if ($prefs) $this->_prefs = $prefs;
-            else $this->getPreferences();
-        }
-
-        // Upgrade to the next parent _PassUser class. Avoid recursion.
-        if (strtolower(get_class($this)) === '_passuser') {
-            //auth policy: Check the order of the configured auth methods
-            // 1. first-only: Upgrade the class here in the constructor
-            // 2. old:       ignore USER_AUTH_ORDER and try to use all available methods as
-            ///              in the previous PhpWiki releases (slow)
-            // 3. strict:    upgrade the class after checking the user existance in userExists()
-            // 4. stacked:   upgrade the class after the password verification in checkPass()
-            // Methods: PersonalPage, HttpAuth, DB, Ldap, Imap, File
-            //if (!defined('USER_AUTH_POLICY')) define('USER_AUTH_POLICY','old');
-            if (defined('USER_AUTH_POLICY')) {
-                // policy 1: only pre-define one method for all users
-                if (USER_AUTH_POLICY === 'first-only') {
-                    $class = $this->nextClass();
-                    return new $class($UserName, $this->_prefs);
-                } // Use the default behaviour from the previous versions:
-                elseif (USER_AUTH_POLICY === 'old') {
-                    // Default: try to be smart
-                    // On php5 we can directly return and upgrade the Object,
-                    // before we have to upgrade it manually.
-                    if (!empty($GLOBALS['PHP_AUTH_USER']) or !empty($_SERVER['REMOTE_USER'])) {
-                        include_once 'lib/WikiUser/HttpAuth.php';
-                        return new _HttpAuthPassUser($UserName, $this->_prefs);
-                    } elseif (in_array('Db', $dbh->getAuthParam('USER_AUTH_ORDER')) and
-                        $dbh->getAuthParam('auth_check') and
-                            ($dbh->getAuthParam('auth_dsn') or $dbh->getParam('dsn'))
-                    ) {
-                        return new _DbPassUser($UserName, $this->_prefs);
-                    } elseif (in_array('LDAP', $dbh->getAuthParam('USER_AUTH_ORDER')) and
-                        defined('LDAP_AUTH_HOST') and defined('LDAP_BASE_DN') and
-                            function_exists('ldap_connect')
-                    ) {
-                        include_once 'lib/WikiUser/LDAP.php';
-                        return new _LDAPPassUser($UserName, $this->_prefs);
-                    } elseif (in_array('IMAP', $dbh->getAuthParam('USER_AUTH_ORDER')) and
-                        defined('IMAP_AUTH_HOST') and function_exists('imap_open')
-                    ) {
-                        include_once 'lib/WikiUser/IMAP.php';
-                            return new _IMAPPassUser($UserName, $this->_prefs);
-                    } elseif (in_array('File', $dbh->getAuthParam('USER_AUTH_ORDER')) and
-                        defined('AUTH_USER_FILE') and file_exists(AUTH_USER_FILE)
-                    ) {
-                        include_once 'lib/WikiUser/File.php';
-                        return new _FilePassUser($UserName, $this->_prefs);
-                    } else {
-                        include_once 'lib/WikiUser/PersonalPage.php';
-                        return new _PersonalPagePassUser($UserName, $this->_prefs);
-                    }
-                } else
-                    // else use the page methods defined in _PassUser.
-                    return $this;
-            }
-        }
-    }
-
-    function getAuthDbh()
-    {
-        global $request; //, $DBParams, $DBAuthParams;
-
-        $dbh = $request->getDbh();
-        // session restauration doesn't re-connect to the database automatically,
-        // so dirty it here, to force a reconnect.
-        if (isset($this->_auth_dbi)) {
-            if (($dbh->getParam('dbtype') == 'SQL') and empty($this->_auth_dbi->connection))
-                unset($this->_auth_dbi);
-            if (($dbh->getParam('dbtype') == 'ADODB') and empty($this->_auth_dbi->_connectionID))
-                unset($this->_auth_dbi);
-        }
-        if (empty($this->_auth_dbi)) {
-            if ($dbh->getParam('dbtype') != 'SQL'
-                and $dbh->getParam('dbtype') != 'ADODB'
-                    and $dbh->getParam('dbtype') != 'PDO'
-            )
-                return false;
-            if (empty($GLOBALS['DBAuthParams']))
-                return false;
-            if (!$dbh->getAuthParam('auth_dsn')) {
-                $dbh = $request->getDbh(); // use phpwiki database
-            } elseif ($dbh->getAuthParam('auth_dsn') == $dbh->getParam('dsn')) {
-                $dbh = $request->getDbh(); // same phpwiki database
-            } else { // use another external database handle. needs PHP >= 4.1
-                $local_params = array_merge($GLOBALS['DBParams'], $GLOBALS['DBAuthParams']);
-                $local_params['dsn'] = $local_params['auth_dsn'];
-                $dbh = WikiDB::open($local_params);
-            }
-            $this->_auth_dbi =& $dbh->_backend->_dbh;
-        }
-        return $this->_auth_dbi;
-    }
-
-    function _normalize_stmt_var($var, $oldstyle = false)
-    {
-        static $valid_variables = array('userid', 'password', 'pref_blob', 'groupname');
-        // old-style: "'$userid'"
-        // new-style: '"\$userid"' or just "userid"
-        $new = str_replace(array("'", '"', '\$', '$'), '', $var);
-        if (!in_array($new, $valid_variables)) {
-            trigger_error("Unknown DBAuthParam statement variable: " . $new, E_USER_ERROR);
-            return false;
-        }
-        return !$oldstyle ? "'$" . $new . "'" : '\$' . $new;
-    }
-
-    // TODO: use it again for the auth and member tables
-    // sprintfstyle vs prepare style: %s or ?
-    //   multiple vars should be executed via prepare(?,?)+execute,
-    //   single vars with execute(sprintf(quote(var)))
-    // help with position independency
-    function prepare($stmt, $variables, $oldstyle = false, $sprintfstyle = true)
-    {
-        global $request;
-        $dbi = $request->getDbh();
-        $this->getAuthDbh();
-        // "'\$userid"' => %s
-        // variables can be old-style: '"\$userid"' or new-style: "'$userid'" or just "userid"
-        // old-style strings don't survive pear/Config/IniConfig treatment, that's why we changed it.
-        $new = array();
-        if (is_array($variables)) {
-            //$sprintfstyle = false;
-            for ($i = 0; $i < count($variables); $i++) {
-                $var = $this->_normalize_stmt_var($variables[$i], $oldstyle);
-                if (!$var)
-                    trigger_error(sprintf("DbAuthParams: Undefined or empty statement variable %s in %s",
-                        $variables[$i], $stmt), E_USER_WARNING);
-                $variables[$i] = $var;
-                if (!$var) $new[] = '';
-                else {
-                    $s = "%" . ($i + 1) . "s";
-                    $new[] = $sprintfstyle ? $s : "?";
-                }
-            }
-        } else {
-            $var = $this->_normalize_stmt_var($variables, $oldstyle);
-            if (!$var)
-                trigger_error(sprintf("DbAuthParams: Undefined or empty statement variable %s in %s",
-                    $variables, $stmt), E_USER_WARNING);
-            $variables = $var;
-            if (!$var) $new = '';
-            else $new = $sprintfstyle ? '%s' : "?";
-        }
-        $prefix = $dbi->getParam('prefix');
-        // probably prefix table names if in same database
-        if ($prefix and isset($this->_auth_dbi) and isset($dbi->_backend->_dbh) and
-            ($dbi->getAuthParam('auth_dsn') and $dbi->getParam('dsn') == $dbi->getAuthParam('auth_dsn'))
-        ) {
-            if (!stristr($stmt, $prefix)) {
-                $oldstmt = $stmt;
-                $stmt = str_replace(array(" user ", " pref ", " member "),
-                    array(" " . $prefix . "user ",
-                        " " . $prefix . "pref ",
-                        " " . $prefix . "member "), $stmt);
-                //Do it automatically for the lazy admin? Esp. on sf.net it's nice to have
-                trigger_error("Need to prefix the DBAUTH tablename in config/config.ini:\n  $oldstmt \n=> $stmt",
-                    E_USER_WARNING);
-            }
-        }
-        // Preparate the SELECT statement, for ADODB and PearDB (MDB not).
-        // Simple sprintf-style.
-        $new_stmt = str_replace($variables, $new, $stmt);
-        if ($new_stmt == $stmt) {
-            if ($oldstyle) {
-                trigger_error(sprintf("DbAuthParams: Invalid statement in %s",
-                    $stmt), E_USER_WARNING);
-            } else {
-                trigger_error(sprintf("DbAuthParams: Old statement quoting style in %s",
-                    $stmt), E_USER_WARNING);
-                $new_stmt = $this->prepare($stmt, $variables, 'oldstyle');
-            }
-        }
-        return $new_stmt;
-    }
-
-    function getPreferences()
-    {
-        if (!empty($this->_prefs->_method)) {
-            if ($this->_prefs->_method == 'ADODB') {
-                // FIXME: strange why this should be needed...
-                include_once 'lib/WikiUser/Db.php';
-                include_once 'lib/WikiUser/AdoDb.php';
-                return _AdoDbPassUser::getPreferences();
-            } elseif ($this->_prefs->_method == 'SQL') {
-                include_once 'lib/WikiUser/Db.php';
-                include_once 'lib/WikiUser/PearDb.php';
-                return _PearDbPassUser::getPreferences();
-            } elseif ($this->_prefs->_method == 'PDO') {
-                include_once 'lib/WikiUser/Db.php';
-                include_once 'lib/WikiUser/PdoDb.php';
-                return _PdoDbPassUser::getPreferences();
-            }
-        }
-
-        // We don't necessarily have to read the cookie first. Since
-        // the user has a password, the prefs stored in the homepage
-        // cannot be arbitrarily altered by other Bogo users.
-        _AnonUser::getPreferences();
-        // User may have deleted cookie, retrieve from his
-        // PersonalPage if there is one.
-        if (!empty($this->_HomePagehandle)) {
-            if ($restored_from_page = $this->_prefs->retrieve
-            ($this->_HomePagehandle->get('pref'))
-            ) {
-                $this->_prefs->updatePrefs($restored_from_page, 'init');
-                return $this->_prefs;
-            }
-        }
-        return $this->_prefs;
-    }
-
-    function setPreferences($prefs, $id_only = false)
-    {
-        if (!empty($this->_prefs->_method)) {
-            if ($this->_prefs->_method == 'ADODB') {
-                // FIXME: strange why this should be needed...
-                include_once 'lib/WikiUser/Db.php';
-                include_once 'lib/WikiUser/AdoDb.php';
-                return _AdoDbPassUser::setPreferences($prefs, $id_only);
-            } elseif ($this->_prefs->_method == 'SQL') {
-                include_once 'lib/WikiUser/Db.php';
-                include_once 'lib/WikiUser/PearDb.php';
-                return _PearDbPassUser::setPreferences($prefs, $id_only);
-            } elseif ($this->_prefs->_method == 'PDO') {
-                include_once 'lib/WikiUser/Db.php';
-                include_once 'lib/WikiUser/PdoDb.php';
-                return _PdoDbPassUser::setPreferences($prefs, $id_only);
-            }
-        }
-        if ($updated = _AnonUser::setPreferences($prefs, $id_only)) {
-            // Encode only the _prefs array of the UserPreference object
-            // If no DB method exists to store the prefs we must store it in the page, not in the cookies.
-            if (empty($this->_HomePagehandle)) {
-                $this->_HomePagehandle = $GLOBALS['request']->getPage($this->_userid);
-            }
-            if (!$this->_HomePagehandle->exists()) {
-                $this->createHomePage();
-            }
-            if (!empty($this->_HomePagehandle) and !$id_only) {
-                $this->_HomePagehandle->set('pref', $this->_prefs->store());
-            }
-        }
-        return $updated;
-    }
-
-    function mayChangePass()
-    {
-        return true;
-    }
-
-    //The default method is getting the password from prefs.
-    // child methods obtain $stored_password from external auth.
-    function userExists()
-    {
-        //if ($this->_HomePagehandle) return true;
-        if (strtolower(get_class($this)) == "_passuser") {
-            $class = $this->nextClass();
-            $user = new $class($this->_userid, $this->_prefs);
-        } else {
-            $user = $this;
-        }
-        /* new user => false does not return false, but the _userid is empty then */
-        while ($user and $user->_userid) {
-            $user = UpgradeUser($this, $user);
-            if ($user->userExists()) {
-                $user = UpgradeUser($this, $user);
-                return true;
-            }
-            // prevent endless loop. does this work on all PHP's?
-            // it just has to set the classname, what it correctly does.
-            $class = $user->nextClass();
-            if ($class == "_ForbiddenPassUser")
-                return false;
-        }
-        return false;
-    }
-
-    //The default method is getting the password from prefs.
-    // child methods obtain $stored_password from external auth.
-    function checkPass($submitted_password)
-    {
-        $stored_password = $this->_prefs->get('passwd');
-        if ($this->_checkPass($submitted_password, $stored_password)) {
-            $this->_level = WIKIAUTH_USER;
-            return $this->_level;
-        } else {
-            if ((USER_AUTH_POLICY === 'strict') and $this->userExists()) {
-                $this->_level = WIKIAUTH_FORBIDDEN;
-                return $this->_level;
-            }
-            return $this->_tryNextPass($submitted_password);
-        }
-    }
-
-    function _checkPassLength($submitted_password)
-    {
-        if (strlen($submitted_password) < PASSWORD_LENGTH_MINIMUM) {
-            trigger_error(_("The length of the password is shorter than the system policy allows."));
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * The basic password checker for all PassUser objects.
-     * Uses global ENCRYPTED_PASSWD and PASSWORD_LENGTH_MINIMUM.
-     * Empty passwords are always false!
-     * PASSWORD_LENGTH_MINIMUM is enforced here and in the preference set method.
-     * @see UserPreferences::set
-     *
-     * DBPassUser password's have their own crypt definition.
-     * That's why DBPassUser::checkPass() doesn't call this method, if
-     * the db password method is 'plain', which means that the DB SQL
-     * statement just returns 1 or 0. To use CRYPT() or PASSWORD() and
-     * don't store plain passwords in the DB.
-     *
-     * TODO: remove crypt() function check from config.php:396 ??
-     */
-    function _checkPass($submitted_password, $stored_password)
-    {
-        if (!empty($submitted_password)) {
-            // This works only on plaintext passwords.
-            if (!ENCRYPTED_PASSWD and (strlen($stored_password) < PASSWORD_LENGTH_MINIMUM)) {
-                // With the EditMetaData plugin
-                trigger_error(_("The length of the stored password is shorter than the system policy allows. Sorry, you cannot login.\n You have to ask the System Administrator to reset your password."));
-                return false;
-            }
-            if (!$this->_checkPassLength($submitted_password)) {
-                return false;
-            }
-            if (ENCRYPTED_PASSWD) {
-                // Verify against encrypted password.
-                if (function_exists('crypt')) {
-                    if (crypt($submitted_password, $stored_password) == $stored_password)
-                        return true; // matches encrypted password
-                    else
-                        return false;
-                } else {
-                    trigger_error(_("The crypt function is not available in this version of PHP.") . " "
-                            . _("Please set ENCRYPTED_PASSWD to false in config/config.ini and probably change ADMIN_PASSWD."),
-                        E_USER_WARNING);
-                    return false;
-                }
-            } else {
-                // Verify against cleartext password.
-                if ($submitted_password == $stored_password)
-                    return true;
-                else {
-                    // Check whether we forgot to enable ENCRYPTED_PASSWD
-                    if (function_exists('crypt')) {
-                        if (crypt($submitted_password, $stored_password) == $stored_password) {
-                            trigger_error(_("Please set ENCRYPTED_PASSWD to true in config/config.ini."),
-                                E_USER_WARNING);
-                            return true;
-                        }
-                    }
-                }
-            }
-        }
-        return false;
-    }
-
-    /** The default method is storing the password in prefs.
-     *  Child methods (DB, File) may store in external auth also, but this
-     *  must be explicitly enabled.
-     *  This may be called by plugin/UserPreferences or by ->SetPreferences()
-     */
-    function changePass($submitted_password)
-    {
-        $stored_password = $this->_prefs->get('passwd');
-        // check if authenticated
-        if (!$this->isAuthenticated()) return false;
-        if (ENCRYPTED_PASSWD) {
-            $submitted_password = crypt($submitted_password);
-        }
-        // check other restrictions, with side-effects only.
-        $result = $this->_checkPass($submitted_password, $stored_password);
-        if ($stored_password != $submitted_password) {
-            $this->_prefs->set('passwd', $submitted_password);
-            //update the storage (session, homepage, ...)
-            $this->SetPreferences($this->_prefs);
-            return true;
-        }
-        //Todo: return an error msg to the caller what failed?
-        // same password or no privilege
-        return ENCRYPTED_PASSWD ? true : false;
-    }
-
-    function _tryNextPass($submitted_password)
-    {
-        if (DEBUG & _DEBUG_LOGIN) {
-            $class = strtolower(get_class($this));
-            if (substr($class, -10) == "dbpassuser") $class = "_dbpassuser";
-            $GLOBALS['USER_AUTH_ERROR'][$class] = 'wrongpass';
-        }
-        if (USER_AUTH_POLICY === 'strict') {
-            $class = $this->nextClass();
-            if ($user = new $class($this->_userid, $this->_prefs)) {
-                if ($user->userExists()) {
-                    return $user->checkPass($submitted_password);
-                }
-            }
-        }
-        if (USER_AUTH_POLICY === 'stacked' or USER_AUTH_POLICY === 'old') {
-            $class = $this->nextClass();
-            if ($user = new $class($this->_userid, $this->_prefs))
-                return $user->checkPass($submitted_password);
-        }
-        return $this->_level;
-    }
-
-    function _tryNextUser()
-    {
-        if (DEBUG & _DEBUG_LOGIN) {
-            $class = strtolower(get_class($this));
-            if (substr($class, -10) == "dbpassuser") $class = "_dbpassuser";
-            $GLOBALS['USER_AUTH_ERROR'][$class] = 'nosuchuser';
-        }
-        if (USER_AUTH_POLICY === 'strict'
-            or USER_AUTH_POLICY === 'stacked'
-        ) {
-            $class = $this->nextClass();
-            while ($user = new $class($this->_userid, $this->_prefs)) {
-                $user = UpgradeUser($this, $user);
-                if ($user->userExists()) {
-                    $user = UpgradeUser($this, $user);
-                    return true;
-                }
-                if ($class == "_ForbiddenPassUser") return false;
-                $class = $this->nextClass();
-            }
-        }
-        return false;
-    }
-
-}
-
-/**
- * Insert more auth classes here...
- * For example a customized db class for another db connection
- * or a socket-based auth server.
- *
- */
-
-/**
- * For security, this class should not be extended. Instead, extend
- * from _PassUser (think of this as unix "root").
- *
- * FIXME: This should be a singleton class. Only ADMIN_USER may be of class AdminUser!
- * Other members of the Administrators group must raise their level otherwise somehow.
- * Currently every member is a AdminUser, which will not work for the various
- * storage methods.
- */
-class _AdminUser
-    extends _PassUser
-{
-    function mayChangePass()
-    {
-        return false;
-    }
-
-    function checkPass($submitted_password)
-    {
-        if ($this->_userid == ADMIN_USER)
-            $stored_password = ADMIN_PASSWD;
-        else {
-            // Should not happen! Only ADMIN_USER should use this class.
-            // return $this->_tryNextPass($submitted_password); // ???
-            // TODO: safety check if really member of the ADMIN group?
-            $stored_password = $this->_pref->get('passwd');
-        }
-        if ($this->_checkPass($submitted_password, $stored_password)) {
-            $this->_level = WIKIAUTH_ADMIN;
-            if (!empty($GLOBALS['HTTP_SERVER_VARS']['PHP_AUTH_USER']) and class_exists("_HttpAuthPassUser")) {
-                // fake http auth
-                _HttpAuthPassUser::_fake_auth($this->_userid, $submitted_password);
-            }
-            return $this->_level;
-        } else {
-            return $this->_tryNextPass($submitted_password);
-            //$this->_level = WIKIAUTH_ANON;
-            //return $this->_level;
-        }
-    }
-
-    function storePass($submitted_password)
-    {
-        if ($this->_userid == ADMIN_USER)
-            return false;
-        else {
-            // should not happen! only ADMIN_USER should use this class.
-            return parent::storePass($submitted_password);
-        }
-    }
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/**
- * Various data classes for the preference types,
- * to support get, set, sanify (range checking, ...)
- * update() will do the neccessary side-effects if a
- * setting gets changed (theme, language, ...)
- */
-
-class _UserPreference
-{
-    public $default_value;
-
-    function _UserPreference($default_value)
-    {
-        $this->default_value = $default_value;
-    }
-
-    function sanify($value)
-    {
-        return (string)$value;
-    }
-
-    function get($name)
-    {
-        if (isset($this->{$name}))
-            return $this->{$name};
-        else
-            return $this->default_value;
-    }
-
-    function getraw($name)
-    {
-        if (!empty($this->{$name})) {
-            return $this->{$name};
-        } else {
-            return '';
-        }
-    }
-
-    // stores the value as $this->$name, and not as $this->value (clever?)
-    function set($name, $value)
-    {
-        $return = 0;
-        $value = $this->sanify($value);
-        if ($this->get($name) != $value) {
-            $this->update($value);
-            $return = 1;
-        }
-        if ($value != $this->default_value) {
-            $this->{$name} = $value;
-        } else {
-            unset($this->{$name});
-        }
-        return $return;
-    }
-
-    // default: no side-effects
-    function update($value)
-    {
-        ;
-    }
-}
-
-class _UserPreference_numeric
-    extends _UserPreference
-{
-    function _UserPreference_numeric($default, $minval = false,
-                                     $maxval = false)
-    {
-        $this->_UserPreference((double)$default);
-        $this->_minval = (double)$minval;
-        $this->_maxval = (double)$maxval;
-    }
-
-    function sanify($value)
-    {
-        $value = (double)$value;
-        if ($this->_minval !== false && $value < $this->_minval)
-            $value = $this->_minval;
-        if ($this->_maxval !== false && $value > $this->_maxval)
-            $value = $this->_maxval;
-        return $value;
-    }
-}
-
-class _UserPreference_int
-    extends _UserPreference_numeric
-{
-    function _UserPreference_int($default, $minval = false, $maxval = false)
-    {
-        $this->_UserPreference_numeric((int)$default, (int)$minval, (int)$maxval);
-    }
-
-    function sanify($value)
-    {
-        return (int)parent::sanify((int)$value);
-    }
-}
-
-class _UserPreference_bool
-    extends _UserPreference
-{
-    function _UserPreference_bool($default = false)
-    {
-        $this->_UserPreference((bool)$default);
-    }
-
-    function sanify($value)
-    {
-        if (is_array($value)) {
-            /* This allows for constructs like:
-             *
-             *   <input type="hidden" name="pref[boolPref][]" value="0" />
-             *   <input type="checkbox" name="pref[boolPref][]" value="1" />
-             *
-             * (If the checkbox is not checked, only the hidden input
-             * gets sent. If the checkbox is sent, both inputs get
-             * sent.)
-             */
-            foreach ($value as $val) {
-                if ($val)
-                    return true;
-            }
-            return false;
-        }
-        return (bool)$value;
-    }
-}
-
-class _UserPreference_language
-    extends _UserPreference
-{
-    function _UserPreference_language($default = DEFAULT_LANGUAGE)
-    {
-        $this->_UserPreference($default);
-    }
-
-    // FIXME: check for valid locale
-    function sanify($value)
-    {
-        // Revert to DEFAULT_LANGUAGE if user does not specify
-        // language in UserPreferences or chooses <system language>.
-        if ($value == '' or empty($value))
-            $value = DEFAULT_LANGUAGE;
-
-        return (string)$value;
-    }
-
-    function update($newvalue)
-    {
-        if (!$this->_init) {
-            // invalidate etag to force fresh output
-            $GLOBALS['request']->setValidators(array('%mtime' => false));
-            update_locale($newvalue ? $newvalue : $GLOBALS['LANG']);
-        }
-    }
-}
-
-class _UserPreference_theme
-    extends _UserPreference
-{
-    function _UserPreference_theme($default = THEME)
-    {
-        $this->_UserPreference($default);
-    }
-
-    function sanify($value)
-    {
-        if (!empty($value) and FindFile($this->_themefile($value)))
-            return $value;
-        return $this->default_value;
-    }
-
-    function update($newvalue)
-    {
-        global $WikiTheme;
-        // invalidate etag to force fresh output
-        if (!$this->_init)
-            $GLOBALS['request']->setValidators(array('%mtime' => false));
-        if ($newvalue)
-            include_once($this->_themefile($newvalue));
-        if (empty($WikiTheme))
-            include_once($this->_themefile(THEME));
-    }
-
-    function _themefile($theme)
-    {
-        return "themes/$theme/themeinfo.php";
-    }
-}
-
-class _UserPreference_notify
-    extends _UserPreference
-{
-    function sanify($value)
-    {
-        if (!empty($value))
-            return $value;
-        else
-            return $this->default_value;
-    }
-
-    /** update to global user prefs: side-effect on set notify changes
-     * use a global_data notify hash:
-     * notify = array('pagematch' => array(userid => ('email' => mail,
-     *                                                'verified' => 0|1),
-     *                                     ...),
-     *                ...);
-     */
-    function update($value)
-    {
-        if (!empty($this->_init)) return;
-        $dbh = $GLOBALS['request']->getDbh();
-        $notify = $dbh->get('notify');
-        if (empty($notify))
-            $data = array();
-        else
-            $data =& $notify;
-        // expand to existing pages only or store matches?
-        // for now we store (glob-style) matches which is easier for the user
-        $pages = $this->_page_split($value);
-        // Limitation: only current user.
-        $user = $GLOBALS['request']->getUser();
-        if (!$user or !method_exists($user, 'UserName')) return;
-        // This fails with php5 and a WIKI_ID cookie:
-        $userid = $user->UserName();
-        $email = $user->_prefs->get('email');
-        $verified = $user->_prefs->_prefs['email']->getraw('emailVerified');
-        // check existing notify hash and possibly delete pages for email
-        if (!empty($data)) {
-            foreach ($data as $page => $users) {
-                if (isset($data[$page][$userid]) and !in_array($page, $pages)) {
-                    unset($data[$page][$userid]);
-                }
-                if (count($data[$page]) == 0)
-                    unset($data[$page]);
-            }
-        }
-        // add the new pages
-        if (!empty($pages)) {
-            foreach ($pages as $page) {
-                if (!isset($data[$page]))
-                    $data[$page] = array();
-                if (!isset($data[$page][$userid])) {
-                    // should we really store the verification notice here or
-                    // check it dynamically at every page->save?
-                    if ($verified) {
-                        $data[$page][$userid] = array('email' => $email,
-                            'verified' => $verified);
-                    } else {
-                        $data[$page][$userid] = array('email' => $email);
-                    }
-                }
-            }
-        }
-        // store users changes
-        $dbh->set('notify', $data);
-    }
-
-    /** split the user-given comma or whitespace delimited pagenames
-     *  to array
-     */
-    function _page_split($value)
-    {
-        return preg_split('/[\s,]+/', $value, -1, PREG_SPLIT_NO_EMPTY);
-    }
-}
-
-class _UserPreference_email
-    extends _UserPreference
-{
-    function get($name)
-    {
-        // get e-mail address from FusionForge
-        if ((defined('FUSIONFORGE') and FUSIONFORGE) && session_loggedin()) {
-            $user = session_get_user();
-            return $user->getEmail();
-        } else {
-            parent::get($name);
-        }
-    }
-
-    function sanify($value)
-    {
-        // e-mail address is already checked by FusionForge
-        if (defined('FUSIONFORGE') and FUSIONFORGE) {
-            return $value;
-        }
-        // check for valid email address
-        if ($this->get('email') == $value and $this->getraw('emailVerified')) {
-            return $value;
-        }
-        // hack!
-        if ($value == 1 or $value === true) {
-            return $value;
-        }
-        list($ok, $msg) = ValidateMail($value, 'noconnect');
-        if ($ok) {
-            return $value;
-        } else {
-            trigger_error("E-mail Validation Error: " . $msg, E_USER_WARNING);
-            return $this->default_value;
-        }
-    }
-
-    /** Side-effect on email changes:
-     * Send a verification mail or for now just a notification email.
-     * For true verification (value = 2), we'd need a mailserver hook.
-     */
-    function update($value)
-    {
-        // e-mail address is already checked by FusionForge
-        if (defined('FUSIONFORGE') and FUSIONFORGE) {
-            return;
-        }
-        if (!empty($this->_init)) {
-            return;
-        }
-        $verified = $this->getraw('emailVerified');
-        // hack!
-        if (($value == 1 or $value === true) and $verified) {
-            return;
-        }
-        if (!empty($value) and !$verified) {
-            list($ok, $msg) = ValidateMail($value);
-            if ($ok and mail($value, "[" . WIKI_NAME . "] " . _("E-mail address confirmation"),
-                sprintf(_("Welcome to %s!\nYour e-mail account is verified and\nwill be used to send page change notifications.\nSee %s"),
-                    WIKI_NAME, WikiURL($GLOBALS['request']->getArg('pagename'), '', true)))
-            ) {
-                $this->set('emailVerified', 1);
-            } else {
-                trigger_error($msg, E_USER_WARNING);
-            }
-        }
-    }
-}
-
-/** Check for valid email address
-fixed version from http://www.zend.com/zend/spotlight/ev12apr.php
-Note: too strict, Bug #1053681
- */
-function ValidateMail($email, $noconnect = false)
-{
-    global $EMailHosts;
-    $HTTP_HOST = $GLOBALS['request']->get('HTTP_HOST');
-
-    // if this check is too strict (like invalid mail addresses in a local network only)
-    // uncomment the following line:
-    //return array(true,"not validated");
-    // see http://sourceforge.net/tracker/index.php?func=detail&aid=1053681&group_id=6121&atid=106121
-
-    $result = array();
-
-    // This is Paul Warren's (pdw at ex-parrot.com) monster regex for RFC822
-    // addresses, from the Perl module Mail::RFC822::Address, reduced to
-    // accept single RFC822 addresses without comments only. (The original
-    // accepts groups and properly commented addresses also.)
-    $lwsp = "(?:(?:\\r\\n)?[ \\t])";
-
-    $specials = '()<>@,;:\\\\".\\[\\]';
-    $controls = '\\000-\\031';
-
-    $dtext = "[^\\[\\]\\r\\\\]";
-    $domain_literal = "\\[(?:$dtext|\\\\.)*\\]$lwsp*";
-
-    $quoted_string = "\"(?:[^\\\"\\r\\\\]|\\\\.|$lwsp)*\"$lwsp*";
-
-    $atom = "[^$specials $controls]+(?:$lwsp+|\\Z|(?=[\\[\"$specials]))";
-    $word = "(?:$atom|$quoted_string)";
-    $localpart = "$word(?:\\.$lwsp*$word)*";
-
-    $sub_domain = "(?:$atom|$domain_literal)";
-    $domain = "$sub_domain(?:\\.$lwsp*$sub_domain)*";
-
-    $addr_spec = "$localpart\@$lwsp*$domain";
-
-    $phrase = "$word*";
-    $route = "(?:\@$domain(?:,\@$lwsp*$domain)*:$lwsp*)";
-    $route_addr = "\\<$lwsp*$route?$addr_spec\\>$lwsp*";
-    $mailbox = "(?:$addr_spec|$phrase$route_addr)";
-
-    $rfc822re = "/$lwsp*$mailbox/";
-    unset($domain, $route_addr, $route, $phrase, $addr_spec, $sub_domain, $localpart,
-    $atom, $word, $quoted_string);
-    unset($dtext, $controls, $specials, $lwsp, $domain_literal);
-
-    if (!preg_match($rfc822re, $email)) {
-        $result[0] = false;
-        $result[1] = sprintf(_("E-mail address “%s” is not properly formatted"), $email);
-        return $result;
-    }
-    if ($noconnect)
-        return array(true, sprintf(_("E-mail address “%s” is properly formatted"), $email));
-
-    list ($Username, $Domain) = explode("@", $email);
-    //Todo: getmxrr workaround on Windows or manual input field to verify it manually
-    if (!isWindows() and getmxrr($Domain, $MXHost)) { // avoid warning on Windows.
-        $ConnectAddress = $MXHost[0];
-    } else {
-        $ConnectAddress = $Domain;
-        if (isset($EMailHosts[$Domain])) {
-            $ConnectAddress = $EMailHosts[$Domain];
-        }
-    }
-    $Connect = @fsockopen($ConnectAddress, 25);
-    if ($Connect) {
-        if (ereg("^220", $Out = fgets($Connect, 1024))) {
-            fputs($Connect, "HELO $HTTP_HOST\r\n");
-            $Out = fgets($Connect, 1024);
-            fputs($Connect, "MAIL FROM: <" . $email . ">\r\n");
-            $From = fgets($Connect, 1024);
-            fputs($Connect, "RCPT TO: <" . $email . ">\r\n");
-            $To = fgets($Connect, 1024);
-            fputs($Connect, "QUIT\r\n");
-            fclose($Connect);
-            if (!ereg("^250", $From)) {
-                $result[0] = false;
-                $result[1] = "Server rejected address: " . $From;
-                return $result;
-            }
-            if (!ereg("^250", $To)) {
-                $result[0] = false;
-                $result[1] = "Server rejected address: " . $To;
-                return $result;
-            }
-        } else {
-            $result[0] = false;
-            $result[1] = "No response from server";
-            return $result;
-        }
-    } else {
-        $result[0] = false;
-        $result[1] = "Cannot connect e-mail server.";
-        return $result;
-    }
-    $result[0] = true;
-    $result[1] = "E-mail address '$email' appears to be valid.";
-    return $result;
-} // end of function
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/**
- * UserPreferences
- *
- * This object holds the $request->_prefs subobjects.
- * A simple packed array of non-default values get's stored as cookie,
- * homepage, or database, which are converted to the array of
- * ->_prefs objects.
- * We don't store the objects, because otherwise we will
- * not be able to upgrade any subobject. And it's a waste of space also.
- *
- */
-class UserPreferences
-{
-    public $notifyPagesAll;
-
-    function UserPreferences($saved_prefs = false)
-    {
-        // userid stored too, to ensure the prefs are being loaded for
-        // the correct (currently signing in) userid if stored in a
-        // cookie.
-        // Update: for db prefs we disallow passwd.
-        // userid is needed for pref reflexion. current pref must know its username,
-        // if some app needs prefs from different users, different from current user.
-        $this->_prefs
-            = array(
-            'userid' => new _UserPreference(''),
-            'passwd' => new _UserPreference(''),
-            'autologin' => new _UserPreference_bool(),
-            //'emailVerified' => new _UserPreference_emailVerified(),
-            //fixed: store emailVerified as email parameter, 1.3.8
-            'email' => new _UserPreference_email(''),
-            'notifyPages' => new _UserPreference_notify(''), // 1.3.8
-            'theme' => new _UserPreference_theme(THEME),
-            'lang' => new _UserPreference_language(DEFAULT_LANGUAGE),
-            'editWidth' => new _UserPreference_int(EDITWIDTH_DEFAULT_COLS,
-                EDITWIDTH_MIN_COLS,
-                EDITWIDTH_MAX_COLS),
-            'noLinkIcons' => new _UserPreference_bool(), // 1.3.8
-            'editHeight' => new _UserPreference_int(EDITHEIGHT_DEFAULT_ROWS,
-                EDITHEIGHT_MIN_ROWS,
-                EDITHEIGHT_MAX_ROWS),
-            'timeOffset' => new _UserPreference_numeric(TIMEOFFSET_DEFAULT_HOURS,
-                TIMEOFFSET_MIN_HOURS,
-                TIMEOFFSET_MAX_HOURS),
-            'ownModifications' => new _UserPreference_bool(),
-            'majorModificationsOnly' => new _UserPreference_bool(),
-            'relativeDates' => new _UserPreference_bool(),
-            'googleLink' => new _UserPreference_bool(), // 1.3.10
-            'doubleClickEdit' => new _UserPreference_bool(), // 1.3.11
-        );
-
-        // This should be probably be done with $customUserPreferenceColumns
-        // For now, we use FUSIONFORGE define
-        if (defined('FUSIONFORGE') and FUSIONFORGE) {
-            $fusionforgeprefs = array(
-                'pageTrail' => new _UserPreference_bool(),
-                'diffMenuItem' => new _UserPreference_bool(),
-                'pageInfoMenuItem' => new _UserPreference_bool(),
-                'pdfMenuItem' => new _UserPreference_bool(),
-                'lockMenuItem' => new _UserPreference_bool(),
-                'chownMenuItem' => new _UserPreference_bool(),
-                'setaclMenuItem' => new _UserPreference_bool(),
-                'removeMenuItem' => new _UserPreference_bool(),
-                'renameMenuItem' => new _UserPreference_bool(),
-                'revertMenuItem' => new _UserPreference_bool(),
-                'backLinksMenuItem' => new _UserPreference_bool(),
-                'watchPageMenuItem' => new _UserPreference_bool(),
-                'recentChangesMenuItem' => new _UserPreference_bool(),
-                'randomPageMenuItem' => new _UserPreference_bool(),
-                'likePagesMenuItem' => new _UserPreference_bool(),
-                'specialPagesMenuItem' => new _UserPreference_bool(),
-            );
-            $this->_prefs = array_merge($this->_prefs, $fusionforgeprefs);
-        }
-
-        // add custom theme-specific pref types:
-        // FIXME: on theme changes the wiki_user session pref object will fail.
-        // We will silently ignore this.
-        if (!empty($customUserPreferenceColumns))
-            $this->_prefs = array_merge($this->_prefs, $customUserPreferenceColumns);
-        /*
-                if (isset($this->_method) and $this->_method == 'SQL') {
-                    //unset($this->_prefs['userid']);
-                    unset($this->_prefs['passwd']);
-                }
-        */
-        if (is_array($saved_prefs)) {
-            foreach ($saved_prefs as $name => $value)
-                $this->set($name, $value);
-        }
-    }
-
-    function __clone()
-    {
-        foreach ($this as $key => $val) {
-            if (is_object($val) || (is_array($val))) {
-                $this->{$key} = unserialize(serialize($val));
-            }
-        }
-    }
-
-    function _getPref($name)
-    {
-        if ($name == 'emailVerified')
-            $name = 'email';
-        if (!isset($this->_prefs[$name])) {
-            if ($name == 'passwd2') return false;
-            if ($name == 'passwd') return false;
-            trigger_error("$name: unknown preference", E_USER_NOTICE);
-            return false;
-        }
-        return $this->_prefs[$name];
-    }
-
-    // get the value or default_value of the subobject
-    function get($name)
-    {
-        if ($_pref = $this->_getPref($name))
-            if ($name == 'emailVerified')
-                return $_pref->getraw($name);
-            else
-                return $_pref->get($name);
-        else
-            return false;
-    }
-
-    // check and set the new value in the subobject
-    function set($name, $value)
-    {
-        $pref = $this->_getPref($name);
-        if ($pref === false)
-            return false;
-
-        /* do it here or outside? */
-        if ($name == 'passwd' and
-            defined('PASSWORD_LENGTH_MINIMUM') and
-                strlen($value) <= PASSWORD_LENGTH_MINIMUM
-        ) {
-            //TODO: How to notify the user?
-            return false;
-        }
-        /*
-        if ($name == 'theme' and $value == '')
-           return true;
-        */
-        // Fix Fatal error for undefined value. Thanks to Jim Ford and Joel Schaubert
-        if ((!$value and $pref->default_value)
-            or ($value and !isset($pref->{$name})) // bug #1355533
-            or ($value and ($pref->{$name} != $pref->default_value))
-        ) {
-            if ($name == 'emailVerified') $newvalue = $value;
-            else $newvalue = $pref->sanify($value);
-            $pref->set($name, $newvalue);
-        }
-        $this->_prefs[$name] =& $pref;
-        return true;
-    }
-
-    /**
-     * use init to avoid update on set
-     */
-    function updatePrefs($prefs, $init = false)
-    {
-        $count = 0;
-        if ($init) $this->_init = $init;
-        if (is_object($prefs)) {
-            $type = 'emailVerified';
-            $obj =& $this->_prefs['email'];
-            $obj->_init = $init;
-            if ($obj->get($type) !== $prefs->get($type)) {
-                if ($obj->set($type, $prefs->get($type)))
-                    $count++;
-            }
-            foreach (array_keys($this->_prefs) as $type) {
-                $obj =& $this->_prefs[$type];
-                $obj->_init = $init;
-                if ($prefs->get($type) !== $obj->get($type)) {
-                    // special systemdefault prefs: (probably not needed)
-                    if ($type == 'theme' and $prefs->get($type) == '' and
-                        $obj->get($type) == THEME
-                    ) continue;
-                    if ($type == 'lang' and $prefs->get($type) == '' and
-                        $obj->get($type) == DEFAULT_LANGUAGE
-                    ) continue;
-                    if ($this->_prefs[$type]->set($type, $prefs->get($type)))
-                        $count++;
-                }
-            }
-        } elseif (is_array($prefs)) {
-            //unset($this->_prefs['userid']);
-            /*
-        if (isset($this->_method) and
-             ($this->_method == 'SQL' or $this->_method == 'ADODB')) {
-                unset($this->_prefs['passwd']);
-        }
-        */
-            // emailVerified at first, the rest later
-            $type = 'emailVerified';
-            $obj =& $this->_prefs['email'];
-            $obj->_init = $init;
-            if (isset($prefs[$type]) and $obj->get($type) !== $prefs[$type]) {
-                if ($obj->set($type, $prefs[$type]))
-                    $count++;
-            }
-            foreach (array_keys($this->_prefs) as $type) {
-                $obj =& $this->_prefs[$type];
-                $obj->_init = $init;
-                if (!isset($prefs[$type]) and isa($obj, "_UserPreference_bool"))
-                    $prefs[$type] = false;
-                if (isset($prefs[$type]) and isa($obj, "_UserPreference_int"))
-                    $prefs[$type] = (int)$prefs[$type];
-                if (isset($prefs[$type]) and $obj->get($type) != $prefs[$type]) {
-                    // special systemdefault prefs:
-                    if ($type == 'theme' and $prefs[$type] == '' and
-                        $obj->get($type) == THEME
-                    ) continue;
-                    if ($type == 'lang' and $prefs[$type] == '' and
-                        $obj->get($type) == DEFAULT_LANGUAGE
-                    ) continue;
-                    if ($obj->set($type, $prefs[$type]))
-                        $count++;
-                }
-            }
-        }
-        return $count;
-    }
-
-    // For now convert just array of objects => array of values
-    // Todo: the specialized subobjects must override this.
-    function store()
-    {
-        $prefs = array();
-        foreach ($this->_prefs as $name => $object) {
-            if ($value = $object->getraw($name))
-                $prefs[$name] = $value;
-            if ($name == 'email' and ($value = $object->getraw('emailVerified')))
-                $prefs['emailVerified'] = $value;
-            if ($name == 'passwd' and $value and ENCRYPTED_PASSWD) {
-                if (strlen($value) != strlen(crypt('test')))
-                    $prefs['passwd'] = crypt($value);
-                else // already crypted
-                    $prefs['passwd'] = $value;
-            }
-        }
-
-        if (defined('FUSIONFORGE') and FUSIONFORGE) {
-            // Merge current notifyPages with notifyPagesAll
-            // notifyPages are pages to notify in the current project
-            // while $notifyPagesAll is used to store all the monitored pages.
-            if (isset($prefs['notifyPages'])) {
-                $this->notifyPagesAll[PAGE_PREFIX] = $prefs['notifyPages'];
-                $prefs['notifyPages'] = @serialize($this->notifyPagesAll);
-            }
-        }
-
-        return $this->pack($prefs);
-    }
-
-    // packed string or array of values => array of values
-    // Todo: the specialized subobjects must override this.
-    function retrieve($packed)
-    {
-        if (is_string($packed) and (substr($packed, 0, 2) == "a:"))
-            $packed = unserialize($packed);
-        if (!is_array($packed)) return false;
-        $prefs = array();
-        foreach ($packed as $name => $packed_pref) {
-            if (is_string($packed_pref)
-                and isSerialized($packed_pref)
-                    and substr($packed_pref, 0, 2) == "O:"
-            ) {
-                //legacy: check if it's an old array of objects
-                // Looks like a serialized object.
-                // This might fail if the object definition does not exist anymore.
-                // object with ->$name and ->default_value vars.
-                $pref = @unserialize($packed_pref);
-                if (is_object($pref))
-                    $prefs[$name] = $pref->get($name);
-                // fix old-style prefs
-            } elseif (is_numeric($name) and is_array($packed_pref)) {
-                if (count($packed_pref) == 1) {
-                    list($name, $value) = each($packed_pref);
-                    $prefs[$name] = $value;
-                }
-            } else {
-                if (isSerialized($packed_pref))
-                    $prefs[$name] = @unserialize($packed_pref);
-                if (empty($prefs[$name]) and isSerialized(base64_decode($packed_pref)))
-                    $prefs[$name] = @unserialize(base64_decode($packed_pref));
-                // patched by frederik at pandora.be
-                if (empty($prefs[$name]))
-                    $prefs[$name] = $packed_pref;
-            }
-        }
-
-        if (defined('FUSIONFORGE') and FUSIONFORGE) {
-            // Restore notifyPages from notifyPagesAll
-            // notifyPages are pages to notify in the current project
-            // while $notifyPagesAll is used to store all the monitored pages.
-            if (isset($prefs['notifyPages'])) {
-                $this->notifyPagesAll = $prefs['notifyPages'];
-                if (isset($this->notifyPagesAll[PAGE_PREFIX])) {
-                    $prefs['notifyPages'] = $this->notifyPagesAll[PAGE_PREFIX];
-                } else {
-                    $prefs['notifyPages'] = '';
-                }
-            }
-        }
-
-        return $prefs;
-    }
-
-    /**
-     * Check if the given prefs object is different from the current prefs object
-     */
-    function isChanged($other)
-    {
-        foreach ($this->_prefs as $type => $obj) {
-            if ($obj->get($type) !== $other->get($type))
-                return true;
-        }
-        return false;
-    }
-
-    function defaultPreferences()
-    {
-        $prefs = array();
-        foreach ($this->_prefs as $key => $obj) {
-            $prefs[$key] = $obj->default_value;
-        }
-        return $prefs;
-    }
-
-    // array of objects
-    function getAll()
-    {
-        return $this->_prefs;
-    }
-
-    function pack($nonpacked)
-    {
-        return serialize($nonpacked);
-    }
-
-    function unpack($packed)
-    {
-        if (!$packed)
-            return false;
-        //$packed = base64_decode($packed);
-        if (substr($packed, 0, 2) == "O:") {
-            // Looks like a serialized object
-            return unserialize($packed);
-        }
-        if (substr($packed, 0, 2) == "a:") {
-            return unserialize($packed);
-        }
-        //trigger_error("DEBUG: Can't unpack bad UserPreferences",
-        //E_USER_WARNING);
-        return false;
-    }
-
-    function hash()
-    {
-        return wikihash($this->_prefs);
-    }
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
diff --git a/src/plugins/wiki/www/lib/WysiwygEdit/FCKeditor.php b/src/plugins/wiki/www/lib/WysiwygEdit/CKeditor.php
similarity index 100%
rename from src/plugins/wiki/www/lib/WysiwygEdit/FCKeditor.php
rename to src/plugins/wiki/www/lib/WysiwygEdit/CKeditor.php
diff --git a/src/plugins/wiki/www/lib/font/chinese.php b/src/plugins/wiki/www/lib/font/chinese.php
deleted file mode 100644
index 846c282..0000000
--- a/src/plugins/wiki/www/lib/font/chinese.php
+++ /dev/null
@@ -1,464 +0,0 @@
-<?php // -*-php-*-
-// $Id: chinese.php 7956 2011-03-03 17:08:31Z vargenau $
-
-// PDF functions taken from FPDF http://www.fpdf.org
-
-require('lib/pdf.php');
-
-$Big5_widths=array(' '=>250,'!'=>250,'"'=>408,'#'=>668,'$'=>490,'%'=>875,'&'=>698,'\''=>250,
-    '('=>240,')'=>240,'*'=>417,'+'=>667,','=>250,'-'=>313,'.'=>250,'/'=>520,'0'=>500,'1'=>500,
-    '2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>250,';'=>250,
-    '<'=>667,'='=>667,'>'=>667,'?'=>396,'@'=>921,'A'=>677,'B'=>615,'C'=>719,'D'=>760,'E'=>625,
-    'F'=>552,'G'=>771,'H'=>802,'I'=>354,'J'=>354,'K'=>781,'L'=>604,'M'=>927,'N'=>750,'O'=>823,
-    'P'=>563,'Q'=>823,'R'=>729,'S'=>542,'T'=>698,'U'=>771,'V'=>729,'W'=>948,'X'=>771,'Y'=>677,
-    'Z'=>635,'['=>344,'\\'=>520,']'=>344,'^'=>469,'_'=>500,'`'=>250,'a'=>469,'b'=>521,'c'=>427,
-    'd'=>521,'e'=>438,'f'=>271,'g'=>469,'h'=>531,'i'=>250,'j'=>250,'k'=>458,'l'=>240,'m'=>802,
-    'n'=>531,'o'=>500,'p'=>521,'q'=>521,'r'=>365,'s'=>333,'t'=>292,'u'=>521,'v'=>458,'w'=>677,
-    'x'=>479,'y'=>458,'z'=>427,'{'=>480,'|'=>496,'}'=>480,'~'=>667);
-
-$GB_widths=array(' '=>207,'!'=>270,'"'=>342,'#'=>467,'$'=>462,'%'=>797,'&'=>710,'\''=>239,
-    '('=>374,')'=>374,'*'=>423,'+'=>605,','=>238,'-'=>375,'.'=>238,'/'=>334,'0'=>462,'1'=>462,
-    '2'=>462,'3'=>462,'4'=>462,'5'=>462,'6'=>462,'7'=>462,'8'=>462,'9'=>462,':'=>238,';'=>238,
-    '<'=>605,'='=>605,'>'=>605,'?'=>344,'@'=>748,'A'=>684,'B'=>560,'C'=>695,'D'=>739,'E'=>563,
-    'F'=>511,'G'=>729,'H'=>793,'I'=>318,'J'=>312,'K'=>666,'L'=>526,'M'=>896,'N'=>758,'O'=>772,
-    'P'=>544,'Q'=>772,'R'=>628,'S'=>465,'T'=>607,'U'=>753,'V'=>711,'W'=>972,'X'=>647,'Y'=>620,
-    'Z'=>607,'['=>374,'\\'=>333,']'=>374,'^'=>606,'_'=>500,'`'=>239,'a'=>417,'b'=>503,'c'=>427,
-    'd'=>529,'e'=>415,'f'=>264,'g'=>444,'h'=>518,'i'=>241,'j'=>230,'k'=>495,'l'=>228,'m'=>793,
-    'n'=>527,'o'=>524,'p'=>524,'q'=>504,'r'=>338,'s'=>336,'t'=>277,'u'=>517,'v'=>450,'w'=>652,
-    'x'=>466,'y'=>452,'z'=>407,'{'=>370,'|'=>258,'}'=>370,'~'=>605);
-
-class PDF_Chinese extends PDF
-{
-    function AddCIDFont($family,$style,$name,$cw,$CMap,$registry)
-    {
-    $fontkey=strtolower($family).strtoupper($style);
-    if(isset($this->fonts[$fontkey]))
-        $this->Error("Font already added: $family $style");
-    $i=count($this->fonts)+1;
-    $name=str_replace(' ','',$name);
-    $this->fonts[$fontkey]=array('i'=>$i,'type'=>'Type0','name'=>$name,'up'=>-130,'ut'=>40,'cw'=>$cw,'CMap'=>$CMap,'registry'=>$registry);
-    }
-
-    function AddCIDFonts($family,$name,$cw,$CMap,$registry)
-    {
-    $this->AddCIDFont($family,'',$name,$cw,$CMap,$registry);
-    $this->AddCIDFont($family,'B',$name.',Bold',$cw,$CMap,$registry);
-    $this->AddCIDFont($family,'I',$name.',Italic',$cw,$CMap,$registry);
-    $this->AddCIDFont($family,'BI',$name.',BoldItalic',$cw,$CMap,$registry);
-    }
-
-    function AddBig5Font($family='Big5',$name='MSungStd-Light-Acro')
-    {
-    //Add Big5 font with proportional Latin
-    $cw=$GLOBALS['Big5_widths'];
-    $CMap='ETenms-B5-H';
-    $registry=array('ordering'=>'CNS1','supplement'=>0);
-    $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
-    }
-
-    function AddBig5hwFont($family='Big5-hw',$name='MSungStd-Light-Acro')
-    {
-    //Add Big5 font with half-witdh Latin
-    for($i=32;$i<=126;$i++)
-        $cw[chr($i)]=500;
-    $CMap='ETen-B5-H';
-    $registry=array('ordering'=>'CNS1','supplement'=>0);
-    $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
-    }
-
-    function AddGBFont($family='GB',$name='STSongStd-Light-Acro')
-    {
-    //Add GB font with proportional Latin
-    $cw=$GLOBALS['GB_widths'];
-    $CMap='GBKp-EUC-H';
-    $registry=array('ordering'=>'GB1','supplement'=>2);
-    $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
-    }
-
-    function AddGBhwFont($family='GB-hw',$name='STSongStd-Light-Acro')
-    {
-    //Add GB font with half-width Latin
-    for($i=32;$i<=126;$i++)
-        $cw[chr($i)]=500;
-    $CMap='GBK-EUC-H';
-    $registry=array('ordering'=>'GB1','supplement'=>2);
-    $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
-    }
-
-    function GetStringWidth($s)
-    {
-    if ($this->CurrentFont['type']=='Type0')
-        return $this->GetMBStringWidth($s);
-    else
-        return parent::GetStringWidth($s);
-    }
-
-    function GetMBStringWidth($s)
-    {
-    //Multi-byte version of GetStringWidth()
-    $l=0;
-    $cw=&$this->CurrentFont['cw'];
-    $nb=strlen($s);
-    $i=0;
-    while($i<$nb)
-    {
-        $c=$s[$i];
-        if(ord($c)<128)
-        {
-            $l+=$cw[$c];
-            $i++;
-        }
-        else
-        {
-            $l+=1000;
-            $i+=2;
-        }
-    }
-    return $l*$this->FontSize/1000;
-    }
-
-    function MultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
-    {
-    if($this->CurrentFont['type']=='Type0')
-        $this->MBMultiCell($w,$h,$txt,$border,$align,$fill);
-    else
-        parent::MultiCell($w,$h,$txt,$border,$align,$fill);
-    }
-
-    function MBMultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
-    {
-    //Multi-byte version of MultiCell()
-    $cw=&$this->CurrentFont['cw'];
-    if($w==0)
-        $w=$this->w-$this->rMargin-$this->x;
-    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-    $s=str_replace("\r",'',$txt);
-    $nb=strlen($s);
-    if($nb>0 and $s[$nb-1]=="\n")
-        $nb--;
-    $b=0;
-    if($border)
-    {
-        if($border==1)
-        {
-            $border='LTRB';
-            $b='LRT';
-            $b2='LR';
-        }
-        else
-        {
-            $b2='';
-            if(is_int(strpos($border,'L')))
-                $b2.='L';
-            if(is_int(strpos($border,'R')))
-                $b2.='R';
-            $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2;
-        }
-    }
-    $sep=-1;
-    $i=0;
-    $j=0;
-    $l=0;
-    $nl=1;
-    while($i<$nb)
-    {
-        //Get next character
-        $c=$s[$i];
-        //Check if ASCII or MB
-        $ascii=(ord($c)<128);
-        if($c=="\n")
-        {
-            //Explicit line break
-            $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-            $i++;
-            $sep=-1;
-            $j=$i;
-            $l=0;
-            $nl++;
-            if($border and $nl==2)
-                $b=$b2;
-            continue;
-        }
-        if(!$ascii)
-        {
-            $sep=$i;
-            $ls=$l;
-        }
-        elseif($c==' ')
-        {
-            $sep=$i;
-            $ls=$l;
-        }
-        $l+=$ascii ? $cw[$c] : 1000;
-        if($l>$wmax)
-        {
-            //Automatic line break
-            if($sep==-1 or $i==$j)
-            {
-                if($i==$j)
-                    $i+=$ascii ? 1 : 2;
-                $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-            }
-            else
-            {
-                $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);
-                $i=($s[$sep]==' ') ? $sep+1 : $sep;
-            }
-            $sep=-1;
-            $j=$i;
-            $l=0;
-            $nl++;
-            if($border and $nl==2)
-                $b=$b2;
-        }
-        else
-            $i+=$ascii ? 1 : 2;
-    }
-    //Last chunk
-    if($border and is_int(strpos($border,'B')))
-        $b.='B';
-    $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-    $this->x=$this->lMargin;
-    }
-
-    function Write($h,$txt,$link='')
-    {
-    if($this->CurrentFont['type']=='Type0')
-        $this->MBWrite($h,$txt,$link);
-    else
-        parent::Write($h,$txt,$link);
-    }
-
-    function MBWrite($h,$txt,$link)
-    {
-    //Multi-byte version of Write()
-    $cw=&$this->CurrentFont['cw'];
-    $w=$this->w-$this->rMargin-$this->x;
-    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-    $s=str_replace("\r",'',$txt);
-    $nb=strlen($s);
-    $sep=-1;
-    $i=0;
-    $j=0;
-    $l=0;
-    $nl=1;
-    while($i<$nb)
-    {
-        //Get next character
-        $c=$s[$i];
-        //Check if ASCII or MB
-        $ascii=(ord($c)<128);
-        if($c=="\n")
-        {
-            //Explicit line break
-            $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-            $i++;
-            $sep=-1;
-            $j=$i;
-            $l=0;
-            if($nl==1)
-            {
-                $this->x=$this->lMargin;
-                $w=$this->w-$this->rMargin-$this->x;
-                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-            }
-            $nl++;
-            continue;
-        }
-        if(!$ascii or $c==' ')
-            $sep=$i;
-        $l+=$ascii ? $cw[$c] : 1000;
-        if($l>$wmax)
-        {
-            //Automatic line break
-            if($sep==-1 or $i==$j)
-            {
-                if($this->x>$this->lMargin)
-                {
-                    //Move to next line
-                    $this->x=$this->lMargin;
-                    $this->y+=$h;
-                    $w=$this->w-$this->rMargin-$this->x;
-                    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-                    $i++;
-                    $nl++;
-                    continue;
-                }
-                if($i==$j)
-                    $i+=$ascii ? 1 : 2;
-                $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-            }
-            else
-            {
-                $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link);
-                $i=($s[$sep]==' ') ? $sep+1 : $sep;
-            }
-            $sep=-1;
-            $j=$i;
-            $l=0;
-            if($nl==1)
-            {
-                $this->x=$this->lMargin;
-                $w=$this->w-$this->rMargin-$this->x;
-                $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-            }
-            $nl++;
-        }
-        else
-            $i+=$ascii ? 1 : 2;
-    }
-    //Last chunk
-    if($i!=$j)
-        $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j,$i-$j),0,0,'',0,$link);
-    }
-
-    function _putfonts()
-    {
-    $nf=$this->n;
-    foreach($this->diffs as $diff)
-    {
-        //Encodings
-        $this->_newobj();
-        $this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');
-        $this->_out('endobj');
-    }
-
-    if (!check_php_version(5,3)) {
-        $mqr=get_magic_quotes_runtime();
-        set_magic_quotes_runtime(0);
-    }
-    foreach($this->FontFiles as $file=>$info)
-    {
-        //Font file embedding
-        $this->_newobj();
-        $this->FontFiles[$file]['n']=$this->n;
-        if(defined('FPDF_FONTPATH'))
-            $file=FPDF_FONTPATH.$file;
-        $size=filesize($file);
-        if(!$size)
-            $this->Error('Font file not found');
-        $this->_out('<</Length '.$size);
-        if(substr($file,-2)=='.z')
-            $this->_out('/Filter /FlateDecode');
-        $this->_out('/Length1 '.$info['length1']);
-        if(isset($info['length2']))
-            $this->_out('/Length2 '.$info['length2'].' /Length3 0');
-        $this->_out('>>');
-        $f=fopen($file,'rb');
-        $this->_putstream(fread($f,$size));
-        fclose($f);
-        $this->_out('endobj');
-    }
-    if (!check_php_version(5,3)) {
-        set_magic_quotes_runtime($mqr);
-    }
-    foreach($this->fonts as $k=>$font)
-    {
-        //Font objects
-        $this->_newobj();
-        $this->fonts[$k]['n']=$this->n;
-        $this->_out('<</Type /Font');
-        if($font['type']=='Type0')
-            $this->_putType0($font);
-        else
-        {
-            $name=$font['name'];
-            $this->_out('/BaseFont /'.$name);
-            if($font['type']=='core')
-            {
-                //Standard font
-                $this->_out('/Subtype /Type1');
-                if($name!='Symbol' and $name!='ZapfDingbats')
-                    $this->_out('/Encoding /WinAnsiEncoding');
-            }
-            else
-            {
-                //Additional font
-                $this->_out('/Subtype /'.$font['type']);
-                $this->_out('/FirstChar 32');
-                $this->_out('/LastChar 255');
-                $this->_out('/Widths '.($this->n+1).' 0 R');
-                $this->_out('/FontDescriptor '.($this->n+2).' 0 R');
-                if($font['enc'])
-                {
-                    if(isset($font['diff']))
-                        $this->_out('/Encoding '.($nf+$font['diff']).' 0 R');
-                    else
-                        $this->_out('/Encoding /WinAnsiEncoding');
-                }
-            }
-            $this->_out('>>');
-            $this->_out('endobj');
-            if($font['type']!='core')
-            {
-                //Widths
-                $this->_newobj();
-                $cw=&$font['cw'];
-                $s='[';
-                for($i=32;$i<=255;$i++)
-                    $s.=$cw[chr($i)].' ';
-                $this->_out($s.']');
-                $this->_out('endobj');
-                //Descriptor
-                $this->_newobj();
-                $s='<</Type /FontDescriptor /FontName /'.$name;
-                foreach($font['desc'] as $k=>$v)
-                    $s.=' /'.$k.' '.$v;
-                $file=$font['file'];
-                if($file)
-                    $s.=' /FontFile'.($font['type']=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
-                $this->_out($s.'>>');
-                $this->_out('endobj');
-            }
-        }
-    }
-    }
-
-    function _putType0($font)
-    {
-    //Type0
-    $this->_out('/Subtype /Type0');
-    $this->_out('/BaseFont /'.$font['name'].'-'.$font['CMap']);
-    $this->_out('/Encoding /'.$font['CMap']);
-    $this->_out('/DescendantFonts ['.($this->n+1).' 0 R]');
-    $this->_out('>>');
-    $this->_out('endobj');
-    //CIDFont
-    $this->_newobj();
-    $this->_out('<</Type /Font');
-    $this->_out('/Subtype /CIDFontType0');
-    $this->_out('/BaseFont /'.$font['name']);
-    $this->_out('/CIDSystemInfo <</Registry '.$this->_textstring('Adobe').' /Ordering '.$this->_textstring($font['registry']['ordering']).' /Supplement '.$font['registry']['supplement'].'>>');
-    $this->_out('/FontDescriptor '.($this->n+1).' 0 R');
-    if($font['CMap']=='ETen-B5-H')
-        $W='13648 13742 500';
-    elseif($font['CMap']=='GBK-EUC-H')
-        $W='814 907 500 7716 [500]';
-    else
-        $W='1 ['.implode(' ',$font['cw']).']';
-    $this->_out('/W ['.$W.']>>');
-    $this->_out('endobj');
-    //Font descriptor
-    $this->_newobj();
-    $this->_out('<</Type /FontDescriptor');
-    $this->_out('/FontName /'.$font['name']);
-    $this->_out('/Flags 6');
-    $this->_out('/FontBBox [0 -200 1000 900]');
-    $this->_out('/ItalicAngle 0');
-    $this->_out('/Ascent 800');
-    $this->_out('/Descent -200');
-    $this->_out('/CapHeight 800');
-    $this->_out('/StemV 50');
-    $this->_out('>>');
-    $this->_out('endobj');
-    }
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
-?>
diff --git a/src/plugins/wiki/www/lib/font/courier.php b/src/plugins/wiki/www/lib/font/courier.php
deleted file mode 100644
index 02525f5..0000000
--- a/src/plugins/wiki/www/lib/font/courier.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Courier';
-$up = -100;
-$ut = 50;
-for($i=0;$i<=255;$i++)
-	$cw[chr($i)] = 600;
-?>
diff --git a/src/plugins/wiki/www/lib/font/courierb.php b/src/plugins/wiki/www/lib/font/courierb.php
deleted file mode 100644
index f472063..0000000
--- a/src/plugins/wiki/www/lib/font/courierb.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Courier-Bold';
-$up = -100;
-$ut = 50;
-for($i=0;$i<=255;$i++)
-	$cw[chr($i)] = 600;
-?>
diff --git a/src/plugins/wiki/www/lib/font/courierbi.php b/src/plugins/wiki/www/lib/font/courierbi.php
deleted file mode 100644
index 6ce8501..0000000
--- a/src/plugins/wiki/www/lib/font/courierbi.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Courier-BoldOblique';
-$up = -100;
-$ut = 50;
-for($i=0;$i<=255;$i++)
-	$cw[chr($i)] = 600;
-?>
diff --git a/src/plugins/wiki/www/lib/font/courieri.php b/src/plugins/wiki/www/lib/font/courieri.php
deleted file mode 100644
index 320150a..0000000
--- a/src/plugins/wiki/www/lib/font/courieri.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Courier-Oblique';
-$up = -100;
-$ut = 50;
-for($i=0;$i<=255;$i++)
-	$cw[chr($i)] = 600;
-?>
diff --git a/src/plugins/wiki/www/lib/font/helvetica.php b/src/plugins/wiki/www/lib/font/helvetica.php
deleted file mode 100644
index 891ea25..0000000
--- a/src/plugins/wiki/www/lib/font/helvetica.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Helvetica';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-?>
diff --git a/src/plugins/wiki/www/lib/font/helveticab.php b/src/plugins/wiki/www/lib/font/helveticab.php
deleted file mode 100644
index 6c9b972..0000000
--- a/src/plugins/wiki/www/lib/font/helveticab.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Helvetica-Bold';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
-?>
diff --git a/src/plugins/wiki/www/lib/font/helveticabi.php b/src/plugins/wiki/www/lib/font/helveticabi.php
deleted file mode 100644
index 4720311..0000000
--- a/src/plugins/wiki/www/lib/font/helveticabi.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Helvetica-BoldOblique';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722,
-	'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889,
-	'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611,
-	chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556);
-?>
diff --git a/src/plugins/wiki/www/lib/font/helveticai.php b/src/plugins/wiki/www/lib/font/helveticai.php
deleted file mode 100644
index 25fb794..0000000
--- a/src/plugins/wiki/www/lib/font/helveticai.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Helvetica-Oblique';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278,
-	chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584,
-	','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944,
-	'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833,
-	'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556,
-	chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333,
-	chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556,
-	chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-?>
diff --git a/src/plugins/wiki/www/lib/font/japanese.php b/src/plugins/wiki/www/lib/font/japanese.php
deleted file mode 100644
index b3219e2..0000000
--- a/src/plugins/wiki/www/lib/font/japanese.php
+++ /dev/null
@@ -1,433 +0,0 @@
-<?php // -*-php-*-
-// $Id: japanese.php 7956 2011-03-03 17:08:31Z vargenau $
-
-// PDF functions taken from FPDF http://www.fpdf.org
-
-require_once('lib/pdf.php');
-
-class PDF_Japanese extends PDF {
-    var $B;
-    var $I;
-    var $U;
-    var $HREF;
-    var $SJIS_widths = array(' '=>278,'!'=>299,'"'=>353,'#'=>614,'$'=>614,'%'=>721,'&'=>735,'\''=>216,
-                             '('=>323,')'=>323,'*'=>449,'+'=>529,','=>219,'-'=>306,'.'=>219,'/'=>453,'0'=>614,'1'=>614,
-                             '2'=>614,'3'=>614,'4'=>614,'5'=>614,'6'=>614,'7'=>614,'8'=>614,'9'=>614,':'=>219,';'=>219,
-                             '<'=>529,'='=>529,'>'=>529,'?'=>486,'@'=>744,'A'=>646,'B'=>604,'C'=>617,'D'=>681,'E'=>567,
-                             'F'=>537,'G'=>647,'H'=>738,'I'=>320,'J'=>433,'K'=>637,'L'=>566,'M'=>904,'N'=>710,'O'=>716,
-                             'P'=>605,'Q'=>716,'R'=>623,'S'=>517,'T'=>601,'U'=>690,'V'=>668,'W'=>990,'X'=>681,'Y'=>634,
-                             'Z'=>578,'['=>316,'\\'=>614,']'=>316,'^'=>529,'_'=>500,'`'=>387,'a'=>509,'b'=>566,'c'=>478,
-                             'd'=>565,'e'=>503,'f'=>337,'g'=>549,'h'=>580,'i'=>275,'j'=>266,'k'=>544,'l'=>276,'m'=>854,
-                             'n'=>579,'o'=>550,'p'=>578,'q'=>566,'r'=>410,'s'=>444,'t'=>340,'u'=>575,'v'=>512,'w'=>760,
-                             'x'=>503,'y'=>529,'z'=>453,'{'=>326,'|'=>380,'}'=>326,'~'=>387);
-
-    function AddCIDFont($family,$style,$name,$cw,$CMap,$registry)
-    {
-        $fontkey=strtolower($family).strtoupper($style);
-        if(isset($this->fonts[$fontkey]))
-            $this->Error("CID font already added: $family $style");
-        $i=count($this->fonts)+1;
-        $this->fonts[$fontkey]=array('i'=>$i,'type'=>'Type0','name'=>$name,'up'=>-120,'ut'=>40,'cw'=>$cw,'CMap'=>$CMap,'registry'=>$registry);
-    }
-
-    function AddCIDFonts($family,$name,$cw,$CMap,$registry)
-    {
-        $this->AddCIDFont($family,'',$name,$cw,$CMap,$registry);
-        $this->AddCIDFont($family,'B',$name.',Bold',$cw,$CMap,$registry);
-        $this->AddCIDFont($family,'I',$name.',Italic',$cw,$CMap,$registry);
-        $this->AddCIDFont($family,'BI',$name.',BoldItalic',$cw,$CMap,$registry);
-    }
-
-    function AddSJISFont($family='SJIS')
-    {
-        //Add SJIS font with proportional Latin
-        $name='KozMinPro-Regular-Acro';
-        $cw=$this->SJIS_widths;
-        $CMap='90msp-RKSJ-H';
-        $registry=array('ordering'=>'Japan1','supplement'=>2);
-        $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
-    }
-
-    function AddSJIShwFont($family='SJIS-hw')
-    {
-        //Add SJIS font with half-width Latin
-        $name='KozMinPro-Regular-Acro';
-        for($i=32;$i<=126;$i++)
-            $cw[chr($i)]=500;
-        $CMap='90ms-RKSJ-H';
-        $registry=array('ordering'=>'Japan1','supplement'=>2);
-        $this->AddCIDFonts($family,$name,$cw,$CMap,$registry);
-    }
-
-    function GetStringWidth($s)
-    {
-        if($this->CurrentFont['type']=='Type0')
-            return $this->GetSJISStringWidth($s);
-        else
-            return parent::GetStringWidth($s);
-    }
-
-    function GetSJISStringWidth($s)
-    {
-        //SJIS version of GetStringWidth()
-        $l=0;
-        $cw=&$this->CurrentFont['cw'];
-        $nb=strlen($s);
-        $i=0;
-        while($i<$nb) {
-            $o=ord($s{$i});
-            if($o<128) {
-                //ASCII
-                $l+=$cw[$s{$i}];
-                $i++;
-            }
-            elseif($o>=161 and $o<=223) {
-                //Half-width katakana
-                $l+=500;
-                $i++;
-            } else {
-                //Full-width character
-                $l+=1000;
-                $i+=2;
-            }
-        }
-        return $l*$this->FontSize/1000;
-    }
-
-    function MultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
-    {
-        if($this->CurrentFont['type']=='Type0')
-            $this->SJISMultiCell($w,$h,$txt,$border,$align,$fill);
-        else
-            parent::MultiCell($w,$h,$txt,$border,$align,$fill);
-    }
-
-    function SJISMultiCell($w,$h,$txt,$border=0,$align='L',$fill=0)
-    {
-        //Output text with automatic or explicit line breaks
-        $cw=&$this->CurrentFont['cw'];
-        if($w==0)
-            $w=$this->w-$this->rMargin-$this->x;
-        $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-        $s=str_replace("\r",'',$txt);
-        $nb=strlen($s);
-        if($nb>0 and $s{$nb-1}=="\n")
-            $nb--;
-        $b=0;
-        if($border) {
-            if($border==1) {
-                $border='LTRB';
-                $b='LRT';
-                $b2='LR';
-            } else {
-                $b2='';
-                if(is_int(strpos($border,'L')))
-                    $b2.='L';
-                if(is_int(strpos($border,'R')))
-                    $b2.='R';
-                $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2;
-            }
-        }
-        $sep=-1;
-        $i=0;
-        $j=0;
-        $l=0;
-        $nl=1;
-        while($i<$nb) {
-            //Get next character
-            $c=$s{$i};
-            $o=ord($c);
-            if($o==10) {
-                //Explicit line break
-                $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-                $i++;
-                $sep=-1;
-                $j=$i;
-                $l=0;
-                $nl++;
-                if($border and $nl==2)
-                    $b=$b2;
-                continue;
-            }
-            if($o<128) {
-                //ASCII
-                $l+=$cw[$c];
-                $n=1;
-                if($o==32)
-                    $sep=$i;
-            } elseif($o>=161 and $o<=223) {
-                //Half-width katakana
-                $l+=500;
-                $n=1;
-                $sep=$i;
-            } else {
-                //Full-width character
-                $l+=1000;
-                $n=2;
-                $sep=$i;
-            }
-            if($l>$wmax) {
-                //Automatic line break
-                if($sep==-1 or $i==$j) {
-                    if($i==$j)
-                        $i+=$n;
-                    $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-                } else {
-                    $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);
-                    $i=($s[$sep]==' ') ? $sep+1 : $sep;
-                }
-                $sep=-1;
-                $j=$i;
-                $l=0;
-                $nl++;
-                if($border and $nl==2)
-                    $b=$b2;
-            } else {
-                $i+=$n;
-                if($o>=128)
-                    $sep=$i;
-            }
-        }
-    //Last chunk
-    if($border and is_int(strpos($border,'B')))
-            $b.='B';
-    $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-    $this->x=$this->lMargin;
-    }
-
-    function Write($h,$txt,$link='')
-    {
-    if($this->CurrentFont['type']=='Type0')
-            $this->SJISWrite($h,$txt,$link);
-    else
-            parent::Write($h,$txt,$link);
-    }
-
-    function SJISWrite($h,$txt,$link)
-    {
-    //SJIS version of Write()
-    $cw=&$this->CurrentFont['cw'];
-    $w=$this->w-$this->rMargin-$this->x;
-    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-    $s=str_replace("\r",'',$txt);
-    $nb=strlen($s);
-    $sep=-1;
-    $i=0;
-    $j=0;
-    $l=0;
-    $nl=1;
-    while($i<$nb) {
-            //Get next character
-            $c=$s{$i};
-            $o=ord($c);
-            if($o==10) {
-                //Explicit line break
-                $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-                $i++;
-                $sep=-1;
-                $j=$i;
-                $l=0;
-                if($nl==1) {
-                    //Go to left margin
-                    $this->x=$this->lMargin;
-                    $w=$this->w-$this->rMargin-$this->x;
-                    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-                }
-                $nl++;
-                continue;
-            }
-            if($o<128) {
-                //ASCII
-                $l+=$cw[$c];
-                $n=1;
-                if($o==32)
-                    $sep=$i;
-            } elseif($o>=161 and $o<=223) {
-                //Half-width katakana
-                $l+=500;
-                $n=1;
-                $sep=$i;
-            } else {
-                //Full-width character
-                $l+=1000;
-                $n=2;
-                $sep=$i;
-            }
-            if($l>$wmax) {
-                //Automatic line break
-                if($sep==-1 or $i==$j) {
-                    if($this->x>$this->lMargin) {
-                        //Move to next line
-                        $this->x=$this->lMargin;
-                        $this->y+=$h;
-                        $w=$this->w-$this->rMargin-$this->x;
-                        $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-                        $i+=$n;
-                        $nl++;
-                        continue;
-                    }
-                    if($i==$j)
-                        $i+=$n;
-                    $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-                } else {
-                    $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link);
-                    $i=($s[$sep]==' ') ? $sep+1 : $sep;
-                }
-                $sep=-1;
-                $j=$i;
-                $l=0;
-                if($nl==1) {
-                    $this->x=$this->lMargin;
-                    $w=$this->w-$this->rMargin-$this->x;
-                    $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
-                }
-                $nl++;
-            } else {
-                $i+=$n;
-                if($o>=128)
-                    $sep=$i;
-            }
-        }
-    //Last chunk
-    if($i!=$j)
-            $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j,$i-$j),0,0,'',0,$link);
-    }
-
-    function _putfonts()
-    {
-    $nf=$this->n;
-    foreach($this->diffs as $diff) {
-            //Encodings
-            $this->_newobj();
-            $this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');
-            $this->_out('endobj');
-        }
-    if (!check_php_version(5,3)) {
-        $mqr=get_magic_quotes_runtime();
-        set_magic_quotes_runtime(0);
-    }
-    foreach($this->FontFiles as $file=>$info) {
-            //Font file embedding
-            $this->_newobj();
-            $this->FontFiles[$file]['n']=$this->n;
-            if(defined('FPDF_FONTPATH'))
-                $file=FPDF_FONTPATH.$file;
-            $size=filesize($file);
-            if(!$size)
-                $this->Error('Font file not found');
-            $this->_out('<</Length '.$size);
-            if(substr($file,-2)=='.z')
-                $this->_out('/Filter /FlateDecode');
-            $this->_out('/Length1 '.$info['length1']);
-            if(isset($info['length2']))
-                $this->_out('/Length2 '.$info['length2'].' /Length3 0');
-            $this->_out('>>');
-            $f=fopen($file,'rb');
-            $this->_putstream(fread($f,$size));
-            fclose($f);
-            $this->_out('endobj');
-        }
-    if (!check_php_version(5,3)) {
-        set_magic_quotes_runtime($mqr);
-    }
-    foreach($this->fonts as $k=>$font) {
-            //Font objects
-            $this->_newobj();
-            $this->fonts[$k]['n']=$this->n;
-            $this->_out('<</Type /Font');
-            if($font['type']=='Type0')
-                $this->_putType0($font);
-            else {
-                $name=$font['name'];
-                $this->_out('/BaseFont /'.$name);
-                if($font['type']=='core') {
-                    //Standard font
-                    $this->_out('/Subtype /Type1');
-                    if($name!='Symbol' and $name!='ZapfDingbats')
-                        $this->_out('/Encoding /WinAnsiEncoding');
-                } else {
-                    //Additional font
-                    $this->_out('/Subtype /'.$font['type']);
-                    $this->_out('/FirstChar 32');
-                    $this->_out('/LastChar 255');
-                    $this->_out('/Widths '.($this->n+1).' 0 R');
-                    $this->_out('/FontDescriptor '.($this->n+2).' 0 R');
-                    if($font['enc']) {
-                        if(isset($font['diff']))
-                            $this->_out('/Encoding '.($nf+$font['diff']).' 0 R');
-                        else
-                            $this->_out('/Encoding /WinAnsiEncoding');
-                    }
-                }
-                $this->_out('>>');
-                $this->_out('endobj');
-                if($font['type']!='core') {
-                    //Widths
-                    $this->_newobj();
-                    $cw=&$font['cw'];
-                    $s='[';
-                    for($i=32;$i<=255;$i++)
-                        $s.=$cw[chr($i)].' ';
-                    $this->_out($s.']');
-                    $this->_out('endobj');
-                    //Descriptor
-                    $this->_newobj();
-                    $s='<</Type /FontDescriptor /FontName /'.$name;
-                    foreach($font['desc'] as $k=>$v)
-                        $s.=' /'.$k.' '.$v;
-                    $file=$font['file'];
-                    if($file)
-                        $s.=' /FontFile'.($font['type']=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
-                    $this->_out($s.'>>');
-                    $this->_out('endobj');
-                }
-            }
-        }
-    }
-
-    function _putType0($font)
-    {
-    //Type0
-    $this->_out('/Subtype /Type0');
-    $this->_out('/BaseFont /'.$font['name'].'-'.$font['CMap']);
-    $this->_out('/Encoding /'.$font['CMap']);
-    $this->_out('/DescendantFonts ['.($this->n+1).' 0 R]');
-    $this->_out('>>');
-    $this->_out('endobj');
-    //CIDFont
-    $this->_newobj();
-    $this->_out('<</Type /Font');
-    $this->_out('/Subtype /CIDFontType0');
-    $this->_out('/BaseFont /'.$font['name']);
-    $this->_out('/CIDSystemInfo <</Registry (Adobe) /Ordering ('.$font['registry']['ordering'].') /Supplement '.$font['registry']['supplement'].'>>');
-    $this->_out('/FontDescriptor '.($this->n+1).' 0 R');
-    $W='/W [1 [';
-    foreach($font['cw'] as $w)
-            $W.=$w.' ';
-    $this->_out($W.'] 231 325 500 631 [500] 326 389 500]');
-    $this->_out('>>');
-    $this->_out('endobj');
-    //Font descriptor
-    $this->_newobj();
-    $this->_out('<</Type /FontDescriptor');
-    $this->_out('/FontName /'.$font['name']);
-    $this->_out('/Flags 6');
-    $this->_out('/FontBBox [0 -200 1000 900]');
-    $this->_out('/ItalicAngle 0');
-    $this->_out('/Ascent 800');
-    $this->_out('/Descent -200');
-    $this->_out('/CapHeight 800');
-    $this->_out('/StemV 60');
-    $this->_out('>>');
-    $this->_out('endobj');
-    }
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
-?>
diff --git a/src/plugins/wiki/www/lib/font/symbol.php b/src/plugins/wiki/www/lib/font/symbol.php
deleted file mode 100644
index a89f295..0000000
--- a/src/plugins/wiki/www/lib/font/symbol.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Symbol';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549,
-	','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768,
-	'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576,
-	'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0,
-	chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
-	chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603,
-	chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768,
-	chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042,
-	chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329,
-	chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0);
-?>
diff --git a/src/plugins/wiki/www/lib/font/times.php b/src/plugins/wiki/www/lib/font/times.php
deleted file mode 100644
index 57b9bce..0000000
--- a/src/plugins/wiki/www/lib/font/times.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Times-Roman';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944,
-	'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
-	chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500);
-?>
diff --git a/src/plugins/wiki/www/lib/font/timesb.php b/src/plugins/wiki/www/lib/font/timesb.php
deleted file mode 100644
index 6946b9e..0000000
--- a/src/plugins/wiki/www/lib/font/timesb.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Times-Bold';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722,
-	'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000,
-	'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833,
-	'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722,
-	chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500);
-?>
diff --git a/src/plugins/wiki/www/lib/font/timesbi.php b/src/plugins/wiki/www/lib/font/timesbi.php
deleted file mode 100644
index cd5e5f1..0000000
--- a/src/plugins/wiki/www/lib/font/timesbi.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Times-BoldItalic';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667,
-	'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889,
-	'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778,
-	'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
-	chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000,
-	chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333,
-	chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667,
-	chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444);
-?>
diff --git a/src/plugins/wiki/www/lib/font/timesi.php b/src/plugins/wiki/www/lib/font/timesi.php
deleted file mode 100644
index d6da2a9..0000000
--- a/src/plugins/wiki/www/lib/font/timesi.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'Times-Italic';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250,
-	chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675,
-	','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611,
-	'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833,
-	'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722,
-	'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500,
-	chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980,
-	chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333,
-	chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611,
-	chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722,
-	chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500,
-	chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444);
-?>
diff --git a/src/plugins/wiki/www/lib/font/zapfdingbats.php b/src/plugins/wiki/www/lib/font/zapfdingbats.php
deleted file mode 100644
index 8f7d490..0000000
--- a/src/plugins/wiki/www/lib/font/zapfdingbats.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-$type = 'Core';
-$name = 'ZapfDingbats';
-$up = -100;
-$ut = 50;
-$cw = array(
-	chr(0)=>0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0,
-	chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939,
-	','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692,
-	'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776,
-	'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873,
-	'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317,
-	chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0,
-	chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788,
-	chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788,
-	chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918,
-	chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874,
-	chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0);
-?>
diff --git a/src/plugins/wiki/www/lib/fpdf.php b/src/plugins/wiki/www/lib/fpdf.php
deleted file mode 100644
index 308406b..0000000
--- a/src/plugins/wiki/www/lib/fpdf.php
+++ /dev/null
@@ -1,1804 +0,0 @@
-<?php
-/*******************************************************************************
-* FPDF                                                                         *
-*                                                                              *
-* Version: 1.7                                                                 *
-* Date:    2011-06-18                                                          *
-* Author:  Olivier PLATHEY                                                     *
-*******************************************************************************/
-
-define('FPDF_VERSION','1.7');
-
-class FPDF
-{
-var $page;               // current page number
-var $n;                  // current object number
-var $offsets;            // array of object offsets
-var $buffer;             // buffer holding in-memory PDF
-var $pages;              // array containing pages
-var $state;              // current document state
-var $compress;           // compression flag
-var $k;                  // scale factor (number of points in user unit)
-var $DefOrientation;     // default orientation
-var $CurOrientation;     // current orientation
-var $StdPageSizes;       // standard page sizes
-var $DefPageSize;        // default page size
-var $CurPageSize;        // current page size
-var $PageSizes;          // used for pages with non default sizes or orientations
-var $wPt, $hPt;          // dimensions of current page in points
-var $w, $h;              // dimensions of current page in user unit
-var $lMargin;            // left margin
-var $tMargin;            // top margin
-var $rMargin;            // right margin
-var $bMargin;            // page break margin
-var $cMargin;            // cell margin
-var $x, $y;              // current position in user unit
-var $lasth;              // height of last printed cell
-var $LineWidth;          // line width in user unit
-var $fontpath;           // path containing fonts
-var $CoreFonts;          // array of core font names
-var $fonts;              // array of used fonts
-var $FontFiles;          // array of font files
-var $diffs;              // array of encoding differences
-var $FontFamily;         // current font family
-var $FontStyle;          // current font style
-var $underline;          // underlining flag
-var $CurrentFont;        // current font info
-var $FontSizePt;         // current font size in points
-var $FontSize;           // current font size in user unit
-var $DrawColor;          // commands for drawing color
-var $FillColor;          // commands for filling color
-var $TextColor;          // commands for text color
-var $ColorFlag;          // indicates whether fill and text colors are different
-var $ws;                 // word spacing
-var $images;             // array of used images
-var $PageLinks;          // array of links in pages
-var $links;              // array of internal links
-var $AutoPageBreak;      // automatic page breaking
-var $PageBreakTrigger;   // threshold used to trigger page breaks
-var $InHeader;           // flag set when processing header
-var $InFooter;           // flag set when processing footer
-var $ZoomMode;           // zoom display mode
-var $LayoutMode;         // layout display mode
-var $title;              // title
-var $subject;            // subject
-var $author;             // author
-var $keywords;           // keywords
-var $creator;            // creator
-var $AliasNbPages;       // alias for total number of pages
-var $PDFVersion;         // PDF version number
-
-/*******************************************************************************
-*                                                                              *
-*                               Public methods                                 *
-*                                                                              *
-*******************************************************************************/
-function FPDF($orientation='P', $unit='mm', $size='A4')
-{
-	// Some checks
-	$this->_dochecks();
-	// Initialization of properties
-	$this->page = 0;
-	$this->n = 2;
-	$this->buffer = '';
-	$this->pages = array();
-	$this->PageSizes = array();
-	$this->state = 0;
-	$this->fonts = array();
-	$this->FontFiles = array();
-	$this->diffs = array();
-	$this->images = array();
-	$this->links = array();
-	$this->InHeader = false;
-	$this->InFooter = false;
-	$this->lasth = 0;
-	$this->FontFamily = '';
-	$this->FontStyle = '';
-	$this->FontSizePt = 12;
-	$this->underline = false;
-	$this->DrawColor = '0 G';
-	$this->FillColor = '0 g';
-	$this->TextColor = '0 g';
-	$this->ColorFlag = false;
-	$this->ws = 0;
-	// Font path
-	if(defined('FPDF_FONTPATH'))
-	{
-		$this->fontpath = FPDF_FONTPATH;
-		if(substr($this->fontpath,-1)!='/' && substr($this->fontpath,-1)!='\\')
-			$this->fontpath .= '/';
-	}
-	elseif(is_dir(dirname(__FILE__).'/font'))
-		$this->fontpath = dirname(__FILE__).'/font/';
-	else
-		$this->fontpath = '';
-	// Core fonts
-	$this->CoreFonts = array('courier', 'helvetica', 'times', 'symbol', 'zapfdingbats');
-	// Scale factor
-	if($unit=='pt')
-		$this->k = 1;
-	elseif($unit=='mm')
-		$this->k = 72/25.4;
-	elseif($unit=='cm')
-		$this->k = 72/2.54;
-	elseif($unit=='in')
-		$this->k = 72;
-	else
-		$this->Error('Incorrect unit: '.$unit);
-	// Page sizes
-	$this->StdPageSizes = array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28),
-		'letter'=>array(612,792), 'legal'=>array(612,1008));
-	$size = $this->_getpagesize($size);
-	$this->DefPageSize = $size;
-	$this->CurPageSize = $size;
-	// Page orientation
-	$orientation = strtolower($orientation);
-	if($orientation=='p' || $orientation=='portrait')
-	{
-		$this->DefOrientation = 'P';
-		$this->w = $size[0];
-		$this->h = $size[1];
-	}
-	elseif($orientation=='l' || $orientation=='landscape')
-	{
-		$this->DefOrientation = 'L';
-		$this->w = $size[1];
-		$this->h = $size[0];
-	}
-	else
-		$this->Error('Incorrect orientation: '.$orientation);
-	$this->CurOrientation = $this->DefOrientation;
-	$this->wPt = $this->w*$this->k;
-	$this->hPt = $this->h*$this->k;
-	// Page margins (1 cm)
-	$margin = 28.35/$this->k;
-	$this->SetMargins($margin,$margin);
-	// Interior cell margin (1 mm)
-	$this->cMargin = $margin/10;
-	// Line width (0.2 mm)
-	$this->LineWidth = .567/$this->k;
-	// Automatic page break
-	$this->SetAutoPageBreak(true,2*$margin);
-	// Default display mode
-	$this->SetDisplayMode('default');
-	// Enable compression
-	$this->SetCompression(true);
-	// Set default PDF version number
-	$this->PDFVersion = '1.3';
-}
-
-function SetMargins($left, $top, $right=null)
-{
-	// Set left, top and right margins
-	$this->lMargin = $left;
-	$this->tMargin = $top;
-	if($right===null)
-		$right = $left;
-	$this->rMargin = $right;
-}
-
-function SetLeftMargin($margin)
-{
-	// Set left margin
-	$this->lMargin = $margin;
-	if($this->page>0 && $this->x<$margin)
-		$this->x = $margin;
-}
-
-function SetTopMargin($margin)
-{
-	// Set top margin
-	$this->tMargin = $margin;
-}
-
-function SetRightMargin($margin)
-{
-	// Set right margin
-	$this->rMargin = $margin;
-}
-
-function SetAutoPageBreak($auto, $margin=0)
-{
-	// Set auto page break mode and triggering margin
-	$this->AutoPageBreak = $auto;
-	$this->bMargin = $margin;
-	$this->PageBreakTrigger = $this->h-$margin;
-}
-
-function SetDisplayMode($zoom, $layout='default')
-{
-	// Set display mode in viewer
-	if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom))
-		$this->ZoomMode = $zoom;
-	else
-		$this->Error('Incorrect zoom display mode: '.$zoom);
-	if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default')
-		$this->LayoutMode = $layout;
-	else
-		$this->Error('Incorrect layout display mode: '.$layout);
-}
-
-function SetCompression($compress)
-{
-	// Set page compression
-	if(function_exists('gzcompress'))
-		$this->compress = $compress;
-	else
-		$this->compress = false;
-}
-
-function SetTitle($title, $isUTF8=false)
-{
-	// Title of document
-	if($isUTF8)
-		$title = $this->_UTF8toUTF16($title);
-	$this->title = $title;
-}
-
-function SetSubject($subject, $isUTF8=false)
-{
-	// Subject of document
-	if($isUTF8)
-		$subject = $this->_UTF8toUTF16($subject);
-	$this->subject = $subject;
-}
-
-function SetAuthor($author, $isUTF8=false)
-{
-	// Author of document
-	if($isUTF8)
-		$author = $this->_UTF8toUTF16($author);
-	$this->author = $author;
-}
-
-function SetKeywords($keywords, $isUTF8=false)
-{
-	// Keywords of document
-	if($isUTF8)
-		$keywords = $this->_UTF8toUTF16($keywords);
-	$this->keywords = $keywords;
-}
-
-function SetCreator($creator, $isUTF8=false)
-{
-	// Creator of document
-	if($isUTF8)
-		$creator = $this->_UTF8toUTF16($creator);
-	$this->creator = $creator;
-}
-
-function AliasNbPages($alias='{nb}')
-{
-	// Define an alias for total number of pages
-	$this->AliasNbPages = $alias;
-}
-
-function Error($msg)
-{
-	// Fatal error
-	die('<b>FPDF error:</b> '.$msg);
-}
-
-function Open()
-{
-	// Begin document
-	$this->state = 1;
-}
-
-function Close()
-{
-	// Terminate document
-	if($this->state==3)
-		return;
-	if($this->page==0)
-		$this->AddPage();
-	// Page footer
-	$this->InFooter = true;
-	$this->Footer();
-	$this->InFooter = false;
-	// Close page
-	$this->_endpage();
-	// Close document
-	$this->_enddoc();
-}
-
-function AddPage($orientation='', $size='')
-{
-	// Start a new page
-	if($this->state==0)
-		$this->Open();
-	$family = $this->FontFamily;
-	$style = $this->FontStyle.($this->underline ? 'U' : '');
-	$fontsize = $this->FontSizePt;
-	$lw = $this->LineWidth;
-	$dc = $this->DrawColor;
-	$fc = $this->FillColor;
-	$tc = $this->TextColor;
-	$cf = $this->ColorFlag;
-	if($this->page>0)
-	{
-		// Page footer
-		$this->InFooter = true;
-		$this->Footer();
-		$this->InFooter = false;
-		// Close page
-		$this->_endpage();
-	}
-	// Start new page
-	$this->_beginpage($orientation,$size);
-	// Set line cap style to square
-	$this->_out('2 J');
-	// Set line width
-	$this->LineWidth = $lw;
-	$this->_out(sprintf('%.2F w',$lw*$this->k));
-	// Set font
-	if($family)
-		$this->SetFont($family,$style,$fontsize);
-	// Set colors
-	$this->DrawColor = $dc;
-	if($dc!='0 G')
-		$this->_out($dc);
-	$this->FillColor = $fc;
-	if($fc!='0 g')
-		$this->_out($fc);
-	$this->TextColor = $tc;
-	$this->ColorFlag = $cf;
-	// Page header
-	$this->InHeader = true;
-	$this->Header();
-	$this->InHeader = false;
-	// Restore line width
-	if($this->LineWidth!=$lw)
-	{
-		$this->LineWidth = $lw;
-		$this->_out(sprintf('%.2F w',$lw*$this->k));
-	}
-	// Restore font
-	if($family)
-		$this->SetFont($family,$style,$fontsize);
-	// Restore colors
-	if($this->DrawColor!=$dc)
-	{
-		$this->DrawColor = $dc;
-		$this->_out($dc);
-	}
-	if($this->FillColor!=$fc)
-	{
-		$this->FillColor = $fc;
-		$this->_out($fc);
-	}
-	$this->TextColor = $tc;
-	$this->ColorFlag = $cf;
-}
-
-function Header()
-{
-	// To be implemented in your own inherited class
-}
-
-function Footer()
-{
-	// To be implemented in your own inherited class
-}
-
-function PageNo()
-{
-	// Get current page number
-	return $this->page;
-}
-
-function SetDrawColor($r, $g=null, $b=null)
-{
-	// Set color for all stroking operations
-	if(($r==0 && $g==0 && $b==0) || $g===null)
-		$this->DrawColor = sprintf('%.3F G',$r/255);
-	else
-		$this->DrawColor = sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255);
-	if($this->page>0)
-		$this->_out($this->DrawColor);
-}
-
-function SetFillColor($r, $g=null, $b=null)
-{
-	// Set color for all filling operations
-	if(($r==0 && $g==0 && $b==0) || $g===null)
-		$this->FillColor = sprintf('%.3F g',$r/255);
-	else
-		$this->FillColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
-	$this->ColorFlag = ($this->FillColor!=$this->TextColor);
-	if($this->page>0)
-		$this->_out($this->FillColor);
-}
-
-function SetTextColor($r, $g=null, $b=null)
-{
-	// Set color for text
-	if(($r==0 && $g==0 && $b==0) || $g===null)
-		$this->TextColor = sprintf('%.3F g',$r/255);
-	else
-		$this->TextColor = sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255);
-	$this->ColorFlag = ($this->FillColor!=$this->TextColor);
-}
-
-function GetStringWidth($s)
-{
-	// Get width of a string in the current font
-	$s = (string)$s;
-	$cw = &$this->CurrentFont['cw'];
-	$w = 0;
-	$l = strlen($s);
-	for($i=0;$i<$l;$i++)
-		$w += $cw[$s[$i]];
-	return $w*$this->FontSize/1000;
-}
-
-function SetLineWidth($width)
-{
-	// Set line width
-	$this->LineWidth = $width;
-	if($this->page>0)
-		$this->_out(sprintf('%.2F w',$width*$this->k));
-}
-
-function Line($x1, $y1, $x2, $y2)
-{
-	// Draw a line
-	$this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k));
-}
-
-function Rect($x, $y, $w, $h, $style='')
-{
-	// Draw a rectangle
-	if($style=='F')
-		$op = 'f';
-	elseif($style=='FD' || $style=='DF')
-		$op = 'B';
-	else
-		$op = 'S';
-	$this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op));
-}
-
-function AddFont($family, $style='', $file='')
-{
-	// Add a TrueType, OpenType or Type1 font
-	$family = strtolower($family);
-	if($file=='')
-		$file = str_replace(' ','',$family).strtolower($style).'.php';
-	$style = strtoupper($style);
-	if($style=='IB')
-		$style = 'BI';
-	$fontkey = $family.$style;
-	if(isset($this->fonts[$fontkey]))
-		return;
-	$info = $this->_loadfont($file);
-	$info['i'] = count($this->fonts)+1;
-	if(!empty($info['diff']))
-	{
-		// Search existing encodings
-		$n = array_search($info['diff'],$this->diffs);
-		if(!$n)
-		{
-			$n = count($this->diffs)+1;
-			$this->diffs[$n] = $info['diff'];
-		}
-		$info['diffn'] = $n;
-	}
-	if(!empty($info['file']))
-	{
-		// Embedded font
-		if($info['type']=='TrueType')
-			$this->FontFiles[$info['file']] = array('length1'=>$info['originalsize']);
-		else
-			$this->FontFiles[$info['file']] = array('length1'=>$info['size1'], 'length2'=>$info['size2']);
-	}
-	$this->fonts[$fontkey] = $info;
-}
-
-function SetFont($family, $style='', $size=0)
-{
-	// Select a font; size given in points
-	if($family=='')
-		$family = $this->FontFamily;
-	else
-		$family = strtolower($family);
-	$style = strtoupper($style);
-	if(strpos($style,'U')!==false)
-	{
-		$this->underline = true;
-		$style = str_replace('U','',$style);
-	}
-	else
-		$this->underline = false;
-	if($style=='IB')
-		$style = 'BI';
-	if($size==0)
-		$size = $this->FontSizePt;
-	// Test if font is already selected
-	if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size)
-		return;
-	// Test if font is already loaded
-	$fontkey = $family.$style;
-	if(!isset($this->fonts[$fontkey]))
-	{
-		// Test if one of the core fonts
-		if($family=='arial')
-			$family = 'helvetica';
-		if(in_array($family,$this->CoreFonts))
-		{
-			if($family=='symbol' || $family=='zapfdingbats')
-				$style = '';
-			$fontkey = $family.$style;
-			if(!isset($this->fonts[$fontkey]))
-				$this->AddFont($family,$style);
-		}
-		else
-			$this->Error('Undefined font: '.$family.' '.$style);
-	}
-	// Select it
-	$this->FontFamily = $family;
-	$this->FontStyle = $style;
-	$this->FontSizePt = $size;
-	$this->FontSize = $size/$this->k;
-	$this->CurrentFont = &$this->fonts[$fontkey];
-	if($this->page>0)
-		$this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
-}
-
-function SetFontSize($size)
-{
-	// Set font size in points
-	if($this->FontSizePt==$size)
-		return;
-	$this->FontSizePt = $size;
-	$this->FontSize = $size/$this->k;
-	if($this->page>0)
-		$this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
-}
-
-function AddLink()
-{
-	// Create a new internal link
-	$n = count($this->links)+1;
-	$this->links[$n] = array(0, 0);
-	return $n;
-}
-
-function SetLink($link, $y=0, $page=-1)
-{
-	// Set destination of internal link
-	if($y==-1)
-		$y = $this->y;
-	if($page==-1)
-		$page = $this->page;
-	$this->links[$link] = array($page, $y);
-}
-
-function Link($x, $y, $w, $h, $link)
-{
-	// Put a link on the page
-	$this->PageLinks[$this->page][] = array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link);
-}
-
-function Text($x, $y, $txt)
-{
-	// Output a string
-	$s = sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
-	if($this->underline && $txt!='')
-		$s .= ' '.$this->_dounderline($x,$y,$txt);
-	if($this->ColorFlag)
-		$s = 'q '.$this->TextColor.' '.$s.' Q';
-	$this->_out($s);
-}
-
-function AcceptPageBreak()
-{
-	// Accept automatic page break or not
-	return $this->AutoPageBreak;
-}
-
-function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
-{
-	// Output a cell
-	$k = $this->k;
-	if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
-	{
-		// Automatic page break
-		$x = $this->x;
-		$ws = $this->ws;
-		if($ws>0)
-		{
-			$this->ws = 0;
-			$this->_out('0 Tw');
-		}
-		$this->AddPage($this->CurOrientation,$this->CurPageSize);
-		$this->x = $x;
-		if($ws>0)
-		{
-			$this->ws = $ws;
-			$this->_out(sprintf('%.3F Tw',$ws*$k));
-		}
-	}
-	if($w==0)
-		$w = $this->w-$this->rMargin-$this->x;
-	$s = '';
-	if($fill || $border==1)
-	{
-		if($fill)
-			$op = ($border==1) ? 'B' : 'f';
-		else
-			$op = 'S';
-		$s = sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op);
-	}
-	if(is_string($border))
-	{
-		$x = $this->x;
-		$y = $this->y;
-		if(strpos($border,'L')!==false)
-			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k);
-		if(strpos($border,'T')!==false)
-			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k);
-		if(strpos($border,'R')!==false)
-			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
-		if(strpos($border,'B')!==false)
-			$s .= sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
-	}
-	if($txt!=='')
-	{
-		if($align=='R')
-			$dx = $w-$this->cMargin-$this->GetStringWidth($txt);
-		elseif($align=='C')
-			$dx = ($w-$this->GetStringWidth($txt))/2;
-		else
-			$dx = $this->cMargin;
-		if($this->ColorFlag)
-			$s .= 'q '.$this->TextColor.' ';
-		$txt2 = str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt)));
-		$s .= sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2);
-		if($this->underline)
-			$s .= ' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt);
-		if($this->ColorFlag)
-			$s .= ' Q';
-		if($link)
-			$this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link);
-	}
-	if($s)
-		$this->_out($s);
-	$this->lasth = $h;
-	if($ln>0)
-	{
-		// Go to next line
-		$this->y += $h;
-		if($ln==1)
-			$this->x = $this->lMargin;
-	}
-	else
-		$this->x += $w;
-}
-
-function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false)
-{
-	// Output text with automatic or explicit line breaks
-	$cw = &$this->CurrentFont['cw'];
-	if($w==0)
-		$w = $this->w-$this->rMargin-$this->x;
-	$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
-	$s = str_replace("\r",'',$txt);
-	$nb = strlen($s);
-	if($nb>0 && $s[$nb-1]=="\n")
-		$nb--;
-	$b = 0;
-	if($border)
-	{
-		if($border==1)
-		{
-			$border = 'LTRB';
-			$b = 'LRT';
-			$b2 = 'LR';
-		}
-		else
-		{
-			$b2 = '';
-			if(strpos($border,'L')!==false)
-				$b2 .= 'L';
-			if(strpos($border,'R')!==false)
-				$b2 .= 'R';
-			$b = (strpos($border,'T')!==false) ? $b2.'T' : $b2;
-		}
-	}
-	$sep = -1;
-	$i = 0;
-	$j = 0;
-	$l = 0;
-	$ns = 0;
-	$nl = 1;
-	while($i<$nb)
-	{
-		// Get next character
-		$c = $s[$i];
-		if($c=="\n")
-		{
-			// Explicit line break
-			if($this->ws>0)
-			{
-				$this->ws = 0;
-				$this->_out('0 Tw');
-			}
-			$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-			$i++;
-			$sep = -1;
-			$j = $i;
-			$l = 0;
-			$ns = 0;
-			$nl++;
-			if($border && $nl==2)
-				$b = $b2;
-			continue;
-		}
-		if($c==' ')
-		{
-			$sep = $i;
-			$ls = $l;
-			$ns++;
-		}
-		$l += $cw[$c];
-		if($l>$wmax)
-		{
-			// Automatic line break
-			if($sep==-1)
-			{
-				if($i==$j)
-					$i++;
-				if($this->ws>0)
-				{
-					$this->ws = 0;
-					$this->_out('0 Tw');
-				}
-				$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-			}
-			else
-			{
-				if($align=='J')
-				{
-					$this->ws = ($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;
-					$this->_out(sprintf('%.3F Tw',$this->ws*$this->k));
-				}
-				$this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);
-				$i = $sep+1;
-			}
-			$sep = -1;
-			$j = $i;
-			$l = 0;
-			$ns = 0;
-			$nl++;
-			if($border && $nl==2)
-				$b = $b2;
-		}
-		else
-			$i++;
-	}
-	// Last chunk
-	if($this->ws>0)
-	{
-		$this->ws = 0;
-		$this->_out('0 Tw');
-	}
-	if($border && strpos($border,'B')!==false)
-		$b .= 'B';
-	$this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
-	$this->x = $this->lMargin;
-}
-
-function Write($h, $txt, $link='')
-{
-	// Output text in flowing mode
-	$cw = &$this->CurrentFont['cw'];
-	$w = $this->w-$this->rMargin-$this->x;
-	$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
-	$s = str_replace("\r",'',$txt);
-	$nb = strlen($s);
-	$sep = -1;
-	$i = 0;
-	$j = 0;
-	$l = 0;
-	$nl = 1;
-	while($i<$nb)
-	{
-		// Get next character
-		$c = $s[$i];
-		if($c=="\n")
-		{
-			// Explicit line break
-			$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-			$i++;
-			$sep = -1;
-			$j = $i;
-			$l = 0;
-			if($nl==1)
-			{
-				$this->x = $this->lMargin;
-				$w = $this->w-$this->rMargin-$this->x;
-				$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
-			}
-			$nl++;
-			continue;
-		}
-		if($c==' ')
-			$sep = $i;
-		$l += $cw[$c];
-		if($l>$wmax)
-		{
-			// Automatic line break
-			if($sep==-1)
-			{
-				if($this->x>$this->lMargin)
-				{
-					// Move to next line
-					$this->x = $this->lMargin;
-					$this->y += $h;
-					$w = $this->w-$this->rMargin-$this->x;
-					$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
-					$i++;
-					$nl++;
-					continue;
-				}
-				if($i==$j)
-					$i++;
-				$this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
-			}
-			else
-			{
-				$this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link);
-				$i = $sep+1;
-			}
-			$sep = -1;
-			$j = $i;
-			$l = 0;
-			if($nl==1)
-			{
-				$this->x = $this->lMargin;
-				$w = $this->w-$this->rMargin-$this->x;
-				$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
-			}
-			$nl++;
-		}
-		else
-			$i++;
-	}
-	// Last chunk
-	if($i!=$j)
-		$this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link);
-}
-
-function Ln($h=null)
-{
-	// Line feed; default value is last cell height
-	$this->x = $this->lMargin;
-	if($h===null)
-		$this->y += $this->lasth;
-	else
-		$this->y += $h;
-}
-
-function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='')
-{
-	// Put an image on the page
-	if(!isset($this->images[$file]))
-	{
-		// First use of this image, get info
-		if($type=='')
-		{
-			$pos = strrpos($file,'.');
-			if(!$pos)
-				$this->Error('Image file has no extension and no type was specified: '.$file);
-			$type = substr($file,$pos+1);
-		}
-		$type = strtolower($type);
-		if($type=='jpeg')
-			$type = 'jpg';
-		$mtd = '_parse'.$type;
-		if(!method_exists($this,$mtd))
-			$this->Error('Unsupported image type: '.$type);
-		$info = $this->$mtd($file);
-		$info['i'] = count($this->images)+1;
-		$this->images[$file] = $info;
-	}
-	else
-		$info = $this->images[$file];
-
-	// Automatic width and height calculation if needed
-	if($w==0 && $h==0)
-	{
-		// Put image at 96 dpi
-		$w = -96;
-		$h = -96;
-	}
-	if($w<0)
-		$w = -$info['w']*72/$w/$this->k;
-	if($h<0)
-		$h = -$info['h']*72/$h/$this->k;
-	if($w==0)
-		$w = $h*$info['w']/$info['h'];
-	if($h==0)
-		$h = $w*$info['h']/$info['w'];
-
-	// Flowing mode
-	if($y===null)
-	{
-		if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak())
-		{
-			// Automatic page break
-			$x2 = $this->x;
-			$this->AddPage($this->CurOrientation,$this->CurPageSize);
-			$this->x = $x2;
-		}
-		$y = $this->y;
-		$this->y += $h;
-	}
-
-	if($x===null)
-		$x = $this->x;
-	$this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
-	if($link)
-		$this->Link($x,$y,$w,$h,$link);
-}
-
-function GetX()
-{
-	// Get x position
-	return $this->x;
-}
-
-function SetX($x)
-{
-	// Set x position
-	if($x>=0)
-		$this->x = $x;
-	else
-		$this->x = $this->w+$x;
-}
-
-function GetY()
-{
-	// Get y position
-	return $this->y;
-}
-
-function SetY($y)
-{
-	// Set y position and reset x
-	$this->x = $this->lMargin;
-	if($y>=0)
-		$this->y = $y;
-	else
-		$this->y = $this->h+$y;
-}
-
-function SetXY($x, $y)
-{
-	// Set x and y positions
-	$this->SetY($y);
-	$this->SetX($x);
-}
-
-function Output($name='', $dest='')
-{
-	// Output PDF to some destination
-	if($this->state<3)
-		$this->Close();
-	$dest = strtoupper($dest);
-	if($dest=='')
-	{
-		if($name=='')
-		{
-			$name = 'doc.pdf';
-			$dest = 'I';
-		}
-		else
-			$dest = 'F';
-	}
-	switch($dest)
-	{
-		case 'I':
-			// Send to standard output
-			$this->_checkoutput();
-			if(PHP_SAPI!='cli')
-			{
-				// We send to a browser
-				header('Content-Type: application/pdf');
-				header('Content-Disposition: inline; filename="'.$name.'"');
-				header('Cache-Control: private, max-age=0, must-revalidate');
-				header('Pragma: public');
-			}
-			echo $this->buffer;
-			break;
-		case 'D':
-			// Download file
-			$this->_checkoutput();
-			header('Content-Type: application/x-download');
-			header('Content-Disposition: attachment; filename="'.$name.'"');
-			header('Cache-Control: private, max-age=0, must-revalidate');
-			header('Pragma: public');
-			echo $this->buffer;
-			break;
-		case 'F':
-			// Save to local file
-			$f = fopen($name,'wb');
-			if(!$f)
-				$this->Error('Unable to create output file: '.$name);
-			fwrite($f,$this->buffer,strlen($this->buffer));
-			fclose($f);
-			break;
-		case 'S':
-			// Return as a string
-			return $this->buffer;
-		default:
-			$this->Error('Incorrect output destination: '.$dest);
-	}
-	return '';
-}
-
-/*******************************************************************************
-*                                                                              *
-*                              Protected methods                               *
-*                                                                              *
-*******************************************************************************/
-function _dochecks()
-{
-	// Check availability of %F
-	if(sprintf('%.1F',1.0)!='1.0')
-		$this->Error('This version of PHP is not supported');
-	// Check mbstring overloading
-	if(ini_get('mbstring.func_overload') & 2)
-		$this->Error('mbstring overloading must be disabled');
-	// Ensure runtime magic quotes are disabled
-	if(get_magic_quotes_runtime())
-		@set_magic_quotes_runtime(0);
-}
-
-function _checkoutput()
-{
-	if(PHP_SAPI!='cli')
-	{
-		if(headers_sent($file,$line))
-			$this->Error("Some data has already been output, can't send PDF file (output started at $file:$line)");
-	}
-	if(ob_get_length())
-	{
-		// The output buffer is not empty
-		if(preg_match('/^(\xEF\xBB\xBF)?\s*$/',ob_get_contents()))
-		{
-			// It contains only a UTF-8 BOM and/or whitespace, let's clean it
-			ob_clean();
-		}
-		else
-			$this->Error("Some data has already been output, can't send PDF file");
-	}
-}
-
-function _getpagesize($size)
-{
-	if(is_string($size))
-	{
-		$size = strtolower($size);
-		if(!isset($this->StdPageSizes[$size]))
-			$this->Error('Unknown page size: '.$size);
-		$a = $this->StdPageSizes[$size];
-		return array($a[0]/$this->k, $a[1]/$this->k);
-	}
-	else
-	{
-		if($size[0]>$size[1])
-			return array($size[1], $size[0]);
-		else
-			return $size;
-	}
-}
-
-function _beginpage($orientation, $size)
-{
-	$this->page++;
-	$this->pages[$this->page] = '';
-	$this->state = 2;
-	$this->x = $this->lMargin;
-	$this->y = $this->tMargin;
-	$this->FontFamily = '';
-	// Check page size and orientation
-	if($orientation=='')
-		$orientation = $this->DefOrientation;
-	else
-		$orientation = strtoupper($orientation[0]);
-	if($size=='')
-		$size = $this->DefPageSize;
-	else
-		$size = $this->_getpagesize($size);
-	if($orientation!=$this->CurOrientation || $size[0]!=$this->CurPageSize[0] || $size[1]!=$this->CurPageSize[1])
-	{
-		// New size or orientation
-		if($orientation=='P')
-		{
-			$this->w = $size[0];
-			$this->h = $size[1];
-		}
-		else
-		{
-			$this->w = $size[1];
-			$this->h = $size[0];
-		}
-		$this->wPt = $this->w*$this->k;
-		$this->hPt = $this->h*$this->k;
-		$this->PageBreakTrigger = $this->h-$this->bMargin;
-		$this->CurOrientation = $orientation;
-		$this->CurPageSize = $size;
-	}
-	if($orientation!=$this->DefOrientation || $size[0]!=$this->DefPageSize[0] || $size[1]!=$this->DefPageSize[1])
-		$this->PageSizes[$this->page] = array($this->wPt, $this->hPt);
-}
-
-function _endpage()
-{
-	$this->state = 1;
-}
-
-function _loadfont($font)
-{
-	// Load a font definition file from the font directory
-	include($this->fontpath.$font);
-	$a = get_defined_vars();
-	if(!isset($a['name']))
-		$this->Error('Could not include font definition file');
-	return $a;
-}
-
-function _escape($s)
-{
-	// Escape special characters in strings
-	$s = str_replace('\\','\\\\',$s);
-	$s = str_replace('(','\\(',$s);
-	$s = str_replace(')','\\)',$s);
-	$s = str_replace("\r",'\\r',$s);
-	return $s;
-}
-
-function _textstring($s)
-{
-	// Format a text string
-	return '('.$this->_escape($s).')';
-}
-
-function _UTF8toUTF16($s)
-{
-	// Convert UTF-8 to UTF-16BE with BOM
-	$res = "\xFE\xFF";
-	$nb = strlen($s);
-	$i = 0;
-	while($i<$nb)
-	{
-		$c1 = ord($s[$i++]);
-		if($c1>=224)
-		{
-			// 3-byte character
-			$c2 = ord($s[$i++]);
-			$c3 = ord($s[$i++]);
-			$res .= chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2));
-			$res .= chr((($c2 & 0x03)<<6) + ($c3 & 0x3F));
-		}
-		elseif($c1>=192)
-		{
-			// 2-byte character
-			$c2 = ord($s[$i++]);
-			$res .= chr(($c1 & 0x1C)>>2);
-			$res .= chr((($c1 & 0x03)<<6) + ($c2 & 0x3F));
-		}
-		else
-		{
-			// Single-byte character
-			$res .= "\0".chr($c1);
-		}
-	}
-	return $res;
-}
-
-function _dounderline($x, $y, $txt)
-{
-	// Underline text
-	$up = $this->CurrentFont['up'];
-	$ut = $this->CurrentFont['ut'];
-	$w = $this->GetStringWidth($txt)+$this->ws*substr_count($txt,' ');
-	return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt);
-}
-
-function _parsejpg($file)
-{
-	// Extract info from a JPEG file
-	$a = getimagesize($file);
-	if(!$a)
-		$this->Error('Missing or incorrect image file: '.$file);
-	if($a[2]!=2)
-		$this->Error('Not a JPEG file: '.$file);
-	if(!isset($a['channels']) || $a['channels']==3)
-		$colspace = 'DeviceRGB';
-	elseif($a['channels']==4)
-		$colspace = 'DeviceCMYK';
-	else
-		$colspace = 'DeviceGray';
-	$bpc = isset($a['bits']) ? $a['bits'] : 8;
-	$data = file_get_contents($file);
-	return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data);
-}
-
-function _parsepng($file)
-{
-	// Extract info from a PNG file
-	$f = fopen($file,'rb');
-	if(!$f)
-		$this->Error('Can\'t open image file: '.$file);
-	$info = $this->_parsepngstream($f,$file);
-	fclose($f);
-	return $info;
-}
-
-function _parsepngstream($f, $file)
-{
-	// Check signature
-	if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10))
-		$this->Error('Not a PNG file: '.$file);
-
-	// Read header chunk
-	$this->_readstream($f,4);
-	if($this->_readstream($f,4)!='IHDR')
-		$this->Error('Incorrect PNG file: '.$file);
-	$w = $this->_readint($f);
-	$h = $this->_readint($f);
-	$bpc = ord($this->_readstream($f,1));
-	if($bpc>8)
-		$this->Error('16-bit depth not supported: '.$file);
-	$ct = ord($this->_readstream($f,1));
-	if($ct==0 || $ct==4)
-		$colspace = 'DeviceGray';
-	elseif($ct==2 || $ct==6)
-		$colspace = 'DeviceRGB';
-	elseif($ct==3)
-		$colspace = 'Indexed';
-	else
-		$this->Error('Unknown color type: '.$file);
-	if(ord($this->_readstream($f,1))!=0)
-		$this->Error('Unknown compression method: '.$file);
-	if(ord($this->_readstream($f,1))!=0)
-		$this->Error('Unknown filter method: '.$file);
-	if(ord($this->_readstream($f,1))!=0)
-		$this->Error('Interlacing not supported: '.$file);
-	$this->_readstream($f,4);
-	$dp = '/Predictor 15 /Colors '.($colspace=='DeviceRGB' ? 3 : 1).' /BitsPerComponent '.$bpc.' /Columns '.$w;
-
-	// Scan chunks looking for palette, transparency and image data
-	$pal = '';
-	$trns = '';
-	$data = '';
-	do
-	{
-		$n = $this->_readint($f);
-		$type = $this->_readstream($f,4);
-		if($type=='PLTE')
-		{
-			// Read palette
-			$pal = $this->_readstream($f,$n);
-			$this->_readstream($f,4);
-		}
-		elseif($type=='tRNS')
-		{
-			// Read transparency info
-			$t = $this->_readstream($f,$n);
-			if($ct==0)
-				$trns = array(ord(substr($t,1,1)));
-			elseif($ct==2)
-				$trns = array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1)));
-			else
-			{
-				$pos = strpos($t,chr(0));
-				if($pos!==false)
-					$trns = array($pos);
-			}
-			$this->_readstream($f,4);
-		}
-		elseif($type=='IDAT')
-		{
-			// Read image data block
-			$data .= $this->_readstream($f,$n);
-			$this->_readstream($f,4);
-		}
-		elseif($type=='IEND')
-			break;
-		else
-			$this->_readstream($f,$n+4);
-	}
-	while($n);
-
-	if($colspace=='Indexed' && empty($pal))
-		$this->Error('Missing palette in '.$file);
-	$info = array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'dp'=>$dp, 'pal'=>$pal, 'trns'=>$trns);
-	if($ct>=4)
-	{
-		// Extract alpha channel
-		if(!function_exists('gzuncompress'))
-			$this->Error('Zlib not available, can\'t handle alpha channel: '.$file);
-		$data = gzuncompress($data);
-		$color = '';
-		$alpha = '';
-		if($ct==4)
-		{
-			// Gray image
-			$len = 2*$w;
-			for($i=0;$i<$h;$i++)
-			{
-				$pos = (1+$len)*$i;
-				$color .= $data[$pos];
-				$alpha .= $data[$pos];
-				$line = substr($data,$pos+1,$len);
-				$color .= preg_replace('/(.)./s','$1',$line);
-				$alpha .= preg_replace('/.(.)/s','$1',$line);
-			}
-		}
-		else
-		{
-			// RGB image
-			$len = 4*$w;
-			for($i=0;$i<$h;$i++)
-			{
-				$pos = (1+$len)*$i;
-				$color .= $data[$pos];
-				$alpha .= $data[$pos];
-				$line = substr($data,$pos+1,$len);
-				$color .= preg_replace('/(.{3})./s','$1',$line);
-				$alpha .= preg_replace('/.{3}(.)/s','$1',$line);
-			}
-		}
-		unset($data);
-		$data = gzcompress($color);
-		$info['smask'] = gzcompress($alpha);
-		if($this->PDFVersion<'1.4')
-			$this->PDFVersion = '1.4';
-	}
-	$info['data'] = $data;
-	return $info;
-}
-
-function _readstream($f, $n)
-{
-	// Read n bytes from stream
-	$res = '';
-	while($n>0 && !feof($f))
-	{
-		$s = fread($f,$n);
-		if($s===false)
-			$this->Error('Error while reading stream');
-		$n -= strlen($s);
-		$res .= $s;
-	}
-	if($n>0)
-		$this->Error('Unexpected end of stream');
-	return $res;
-}
-
-function _readint($f)
-{
-	// Read a 4-byte integer from stream
-	$a = unpack('Ni',$this->_readstream($f,4));
-	return $a['i'];
-}
-
-function _parsegif($file)
-{
-	// Extract info from a GIF file (via PNG conversion)
-	if(!function_exists('imagepng'))
-		$this->Error('GD extension is required for GIF support');
-	if(!function_exists('imagecreatefromgif'))
-		$this->Error('GD has no GIF read support');
-	$im = imagecreatefromgif($file);
-	if(!$im)
-		$this->Error('Missing or incorrect image file: '.$file);
-	imageinterlace($im,0);
-	$f = @fopen('php://temp','rb+');
-	if($f)
-	{
-		// Perform conversion in memory
-		ob_start();
-		imagepng($im);
-		$data = ob_get_clean();
-		imagedestroy($im);
-		fwrite($f,$data);
-		rewind($f);
-		$info = $this->_parsepngstream($f,$file);
-		fclose($f);
-	}
-	else
-	{
-		// Use temporary file
-		$tmp = tempnam('.','gif');
-		if(!$tmp)
-			$this->Error('Unable to create a temporary file');
-		if(!imagepng($im,$tmp))
-			$this->Error('Error while saving to temporary file');
-		imagedestroy($im);
-		$info = $this->_parsepng($tmp);
-		unlink($tmp);
-	}
-	return $info;
-}
-
-function _newobj()
-{
-	// Begin a new object
-	$this->n++;
-	$this->offsets[$this->n] = strlen($this->buffer);
-	$this->_out($this->n.' 0 obj');
-}
-
-function _putstream($s)
-{
-	$this->_out('stream');
-	$this->_out($s);
-	$this->_out('endstream');
-}
-
-function _out($s)
-{
-	// Add a line to the document
-	if($this->state==2)
-		$this->pages[$this->page] .= $s."\n";
-	else
-		$this->buffer .= $s."\n";
-}
-
-function _putpages()
-{
-	$nb = $this->page;
-	if(!empty($this->AliasNbPages))
-	{
-		// Replace number of pages
-		for($n=1;$n<=$nb;$n++)
-			$this->pages[$n] = str_replace($this->AliasNbPages,$nb,$this->pages[$n]);
-	}
-	if($this->DefOrientation=='P')
-	{
-		$wPt = $this->DefPageSize[0]*$this->k;
-		$hPt = $this->DefPageSize[1]*$this->k;
-	}
-	else
-	{
-		$wPt = $this->DefPageSize[1]*$this->k;
-		$hPt = $this->DefPageSize[0]*$this->k;
-	}
-	$filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
-	for($n=1;$n<=$nb;$n++)
-	{
-		// Page
-		$this->_newobj();
-		$this->_out('<</Type /Page');
-		$this->_out('/Parent 1 0 R');
-		if(isset($this->PageSizes[$n]))
-			$this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1]));
-		$this->_out('/Resources 2 0 R');
-		if(isset($this->PageLinks[$n]))
-		{
-			// Links
-			$annots = '/Annots [';
-			foreach($this->PageLinks[$n] as $pl)
-			{
-				$rect = sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]);
-				$annots .= '<</Type /Annot /Subtype /Link /Rect ['.$rect.'] /Border [0 0 0] ';
-				if(is_string($pl[4]))
-					$annots .= '/A <</S /URI /URI '.$this->_textstring($pl[4]).'>>>>';
-				else
-				{
-					$l = $this->links[$pl[4]];
-					$h = isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt;
-					$annots .= sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k);
-				}
-			}
-			$this->_out($annots.']');
-		}
-		if($this->PDFVersion>'1.3')
-			$this->_out('/Group <</Type /Group /S /Transparency /CS /DeviceRGB>>');
-		$this->_out('/Contents '.($this->n+1).' 0 R>>');
-		$this->_out('endobj');
-		// Page content
-		$p = ($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n];
-		$this->_newobj();
-		$this->_out('<<'.$filter.'/Length '.strlen($p).'>>');
-		$this->_putstream($p);
-		$this->_out('endobj');
-	}
-	// Pages root
-	$this->offsets[1] = strlen($this->buffer);
-	$this->_out('1 0 obj');
-	$this->_out('<</Type /Pages');
-	$kids = '/Kids [';
-	for($i=0;$i<$nb;$i++)
-		$kids .= (3+2*$i).' 0 R ';
-	$this->_out($kids.']');
-	$this->_out('/Count '.$nb);
-	$this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt));
-	$this->_out('>>');
-	$this->_out('endobj');
-}
-
-function _putfonts()
-{
-	$nf = $this->n;
-	foreach($this->diffs as $diff)
-	{
-		// Encodings
-		$this->_newobj();
-		$this->_out('<</Type /Encoding /BaseEncoding /WinAnsiEncoding /Differences ['.$diff.']>>');
-		$this->_out('endobj');
-	}
-	foreach($this->FontFiles as $file=>$info)
-	{
-		// Font file embedding
-		$this->_newobj();
-		$this->FontFiles[$file]['n'] = $this->n;
-		$font = file_get_contents($this->fontpath.$file,true);
-		if(!$font)
-			$this->Error('Font file not found: '.$file);
-		$compressed = (substr($file,-2)=='.z');
-		if(!$compressed && isset($info['length2']))
-			$font = substr($font,6,$info['length1']).substr($font,6+$info['length1']+6,$info['length2']);
-		$this->_out('<</Length '.strlen($font));
-		if($compressed)
-			$this->_out('/Filter /FlateDecode');
-		$this->_out('/Length1 '.$info['length1']);
-		if(isset($info['length2']))
-			$this->_out('/Length2 '.$info['length2'].' /Length3 0');
-		$this->_out('>>');
-		$this->_putstream($font);
-		$this->_out('endobj');
-	}
-	foreach($this->fonts as $k=>$font)
-	{
-		// Font objects
-		$this->fonts[$k]['n'] = $this->n+1;
-		$type = $font['type'];
-		$name = $font['name'];
-		if($type=='Core')
-		{
-			// Core font
-			$this->_newobj();
-			$this->_out('<</Type /Font');
-			$this->_out('/BaseFont /'.$name);
-			$this->_out('/Subtype /Type1');
-			if($name!='Symbol' && $name!='ZapfDingbats')
-				$this->_out('/Encoding /WinAnsiEncoding');
-			$this->_out('>>');
-			$this->_out('endobj');
-		}
-		elseif($type=='Type1' || $type=='TrueType')
-		{
-			// Additional Type1 or TrueType/OpenType font
-			$this->_newobj();
-			$this->_out('<</Type /Font');
-			$this->_out('/BaseFont /'.$name);
-			$this->_out('/Subtype /'.$type);
-			$this->_out('/FirstChar 32 /LastChar 255');
-			$this->_out('/Widths '.($this->n+1).' 0 R');
-			$this->_out('/FontDescriptor '.($this->n+2).' 0 R');
-			if(isset($font['diffn']))
-				$this->_out('/Encoding '.($nf+$font['diffn']).' 0 R');
-			else
-				$this->_out('/Encoding /WinAnsiEncoding');
-			$this->_out('>>');
-			$this->_out('endobj');
-			// Widths
-			$this->_newobj();
-			$cw = &$font['cw'];
-			$s = '[';
-			for($i=32;$i<=255;$i++)
-				$s .= $cw[chr($i)].' ';
-			$this->_out($s.']');
-			$this->_out('endobj');
-			// Descriptor
-			$this->_newobj();
-			$s = '<</Type /FontDescriptor /FontName /'.$name;
-			foreach($font['desc'] as $k=>$v)
-				$s .= ' /'.$k.' '.$v;
-			if(!empty($font['file']))
-				$s .= ' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$font['file']]['n'].' 0 R';
-			$this->_out($s.'>>');
-			$this->_out('endobj');
-		}
-		else
-		{
-			// Allow for additional types
-			$mtd = '_put'.strtolower($type);
-			if(!method_exists($this,$mtd))
-				$this->Error('Unsupported font type: '.$type);
-			$this->$mtd($font);
-		}
-	}
-}
-
-function _putimages()
-{
-	foreach(array_keys($this->images) as $file)
-	{
-		$this->_putimage($this->images[$file]);
-		unset($this->images[$file]['data']);
-		unset($this->images[$file]['smask']);
-	}
-}
-
-function _putimage(&$info)
-{
-	$this->_newobj();
-	$info['n'] = $this->n;
-	$this->_out('<</Type /XObject');
-	$this->_out('/Subtype /Image');
-	$this->_out('/Width '.$info['w']);
-	$this->_out('/Height '.$info['h']);
-	if($info['cs']=='Indexed')
-		$this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]');
-	else
-	{
-		$this->_out('/ColorSpace /'.$info['cs']);
-		if($info['cs']=='DeviceCMYK')
-			$this->_out('/Decode [1 0 1 0 1 0 1 0]');
-	}
-	$this->_out('/BitsPerComponent '.$info['bpc']);
-	if(isset($info['f']))
-		$this->_out('/Filter /'.$info['f']);
-	if(isset($info['dp']))
-		$this->_out('/DecodeParms <<'.$info['dp'].'>>');
-	if(isset($info['trns']) && is_array($info['trns']))
-	{
-		$trns = '';
-		for($i=0;$i<count($info['trns']);$i++)
-			$trns .= $info['trns'][$i].' '.$info['trns'][$i].' ';
-		$this->_out('/Mask ['.$trns.']');
-	}
-	if(isset($info['smask']))
-		$this->_out('/SMask '.($this->n+1).' 0 R');
-	$this->_out('/Length '.strlen($info['data']).'>>');
-	$this->_putstream($info['data']);
-	$this->_out('endobj');
-	// Soft mask
-	if(isset($info['smask']))
-	{
-		$dp = '/Predictor 15 /Colors 1 /BitsPerComponent 8 /Columns '.$info['w'];
-		$smask = array('w'=>$info['w'], 'h'=>$info['h'], 'cs'=>'DeviceGray', 'bpc'=>8, 'f'=>$info['f'], 'dp'=>$dp, 'data'=>$info['smask']);
-		$this->_putimage($smask);
-	}
-	// Palette
-	if($info['cs']=='Indexed')
-	{
-		$filter = ($this->compress) ? '/Filter /FlateDecode ' : '';
-		$pal = ($this->compress) ? gzcompress($info['pal']) : $info['pal'];
-		$this->_newobj();
-		$this->_out('<<'.$filter.'/Length '.strlen($pal).'>>');
-		$this->_putstream($pal);
-		$this->_out('endobj');
-	}
-}
-
-function _putxobjectdict()
-{
-	foreach($this->images as $image)
-		$this->_out('/I'.$image['i'].' '.$image['n'].' 0 R');
-}
-
-function _putresourcedict()
-{
-	$this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]');
-	$this->_out('/Font <<');
-	foreach($this->fonts as $font)
-		$this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');
-	$this->_out('>>');
-	$this->_out('/XObject <<');
-	$this->_putxobjectdict();
-	$this->_out('>>');
-}
-
-function _putresources()
-{
-	$this->_putfonts();
-	$this->_putimages();
-	// Resource dictionary
-	$this->offsets[2] = strlen($this->buffer);
-	$this->_out('2 0 obj');
-	$this->_out('<<');
-	$this->_putresourcedict();
-	$this->_out('>>');
-	$this->_out('endobj');
-}
-
-function _putinfo()
-{
-	$this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION));
-	if(!empty($this->title))
-		$this->_out('/Title '.$this->_textstring($this->title));
-	if(!empty($this->subject))
-		$this->_out('/Subject '.$this->_textstring($this->subject));
-	if(!empty($this->author))
-		$this->_out('/Author '.$this->_textstring($this->author));
-	if(!empty($this->keywords))
-		$this->_out('/Keywords '.$this->_textstring($this->keywords));
-	if(!empty($this->creator))
-		$this->_out('/Creator '.$this->_textstring($this->creator));
-	$this->_out('/CreationDate '.$this->_textstring('D:'. at date('YmdHis')));
-}
-
-function _putcatalog()
-{
-	$this->_out('/Type /Catalog');
-	$this->_out('/Pages 1 0 R');
-	if($this->ZoomMode=='fullpage')
-		$this->_out('/OpenAction [3 0 R /Fit]');
-	elseif($this->ZoomMode=='fullwidth')
-		$this->_out('/OpenAction [3 0 R /FitH null]');
-	elseif($this->ZoomMode=='real')
-		$this->_out('/OpenAction [3 0 R /XYZ null null 1]');
-	elseif(!is_string($this->ZoomMode))
-		$this->_out('/OpenAction [3 0 R /XYZ null null '.sprintf('%.2F',$this->ZoomMode/100).']');
-	if($this->LayoutMode=='single')
-		$this->_out('/PageLayout /SinglePage');
-	elseif($this->LayoutMode=='continuous')
-		$this->_out('/PageLayout /OneColumn');
-	elseif($this->LayoutMode=='two')
-		$this->_out('/PageLayout /TwoColumnLeft');
-}
-
-function _putheader()
-{
-	$this->_out('%PDF-'.$this->PDFVersion);
-}
-
-function _puttrailer()
-{
-	$this->_out('/Size '.($this->n+1));
-	$this->_out('/Root '.$this->n.' 0 R');
-	$this->_out('/Info '.($this->n-1).' 0 R');
-}
-
-function _enddoc()
-{
-	$this->_putheader();
-	$this->_putpages();
-	$this->_putresources();
-	// Info
-	$this->_newobj();
-	$this->_out('<<');
-	$this->_putinfo();
-	$this->_out('>>');
-	$this->_out('endobj');
-	// Catalog
-	$this->_newobj();
-	$this->_out('<<');
-	$this->_putcatalog();
-	$this->_out('>>');
-	$this->_out('endobj');
-	// Cross-ref
-	$o = strlen($this->buffer);
-	$this->_out('xref');
-	$this->_out('0 '.($this->n+1));
-	$this->_out('0000000000 65535 f ');
-	for($i=1;$i<=$this->n;$i++)
-		$this->_out(sprintf('%010d 00000 n ',$this->offsets[$i]));
-	// Trailer
-	$this->_out('trailer');
-	$this->_out('<<');
-	$this->_puttrailer();
-	$this->_out('>>');
-	$this->_out('startxref');
-	$this->_out($o);
-	$this->_out('%%EOF');
-	$this->state = 3;
-}
-// End of class
-}
-
-// Handle special IE contype request
-if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype')
-{
-	header('Content-Type: application/pdf');
-	exit;
-}
-
-?>
diff --git a/src/plugins/wiki/www/lib/gif.php b/src/plugins/wiki/www/lib/gif.php
deleted file mode 100644
index b248859..0000000
--- a/src/plugins/wiki/www/lib/gif.php
+++ /dev/null
@@ -1,987 +0,0 @@
-<?php
-
-// GIF Util - (C) 2003 Yamasoft (S/C)
-// http://www.yamasoft.com
-// All Rights Reserved
-// This file can be freely copied, distributed, modified, updated by anyone under the only
-// condition to leave the original address (Yamasoft, http://www.yamasoft.com) and this header.
-
-// <gif>  = gif_loadFile(filename, [index])
-// <bool> = gif_getSize(<gif> or filename, &width, &height)
-// <bool> = gif_outputAsPng(<gif>, filename, [bgColor])
-// <bool> = gif_outputAsBmp(<gif>, filename, [bgcolor])
-// <bool> = gif_outputAsJpeg(<gif>, filename, [bgcolor]) - Requires cjpeg
-
-function gif_loadFile($lpszFileName, $iIndex = 0)
-{
-    $gif = new CGIF();
-
-    if (!$gif->loadFile($lpszFileName, $iIndex)) {
-        return false;
-    }
-
-    return $gif;
-}
-
-function gif_outputAsBmp($gif, $lpszFileName, $bgColor = -1)
-{
-    if (!isSet($gif) || (@get_class($gif) <> "cgif") || !$gif->loaded() || ($lpszFileName == "")) {
-        return false;
-    }
-
-    $fd = $gif->getBmp($bgColor);
-    if (strlen($fd) <= 0) {
-        return false;
-    }
-
-    if (!($fh = @fOpen($lpszFileName, "wb"))) {
-        return false;
-    }
-    @fWrite($fh, $fd, strlen($fd));
-    @fFlush($fh);
-    @fClose($fh);
-    return true;
-}
-
-function gif_outputAsPng($gif, $lpszFileName, $bgColor = -1)
-{
-    if (!isSet($gif) || (@get_class($gif) <> "cgif") || !$gif->loaded() || ($lpszFileName == "")) {
-        return false;
-    }
-
-    $fd = $gif->getPng($bgColor);
-    if (strlen($fd) <= 0) {
-        return false;
-    }
-
-    if (!($fh = @fOpen($lpszFileName, "wb"))) {
-        return false;
-    }
-    @fWrite($fh, $fd, strlen($fd));
-    @fFlush($fh);
-    @fClose($fh);
-    return true;
-}
-
-function gif_outputAsJpeg($gif, $lpszFileName, $bgColor = -1)
-{
-    if (gif_outputAsBmp($gif, "$lpszFileName.bmp", $gbColor)) {
-        exec("cjpeg $lpszFileName.bmp >$lpszFileName 2>/dev/null");
-        @unLink("$lpszFileName.bmp");
-
-        if (@file_exists($lpszFileName)) {
-            if (@fileSize($lpszFileName) > 0) {
-                return true;
-            }
-
-            @unLink($lpszFileName);
-        }
-    }
-
-    return false;
-}
-
-function gif_getSize($gif, &$width, &$height)
-{
-    if (isSet($gif) && (@get_class($gif) == "cgif") && $gif->loaded()) {
-        $width = $gif->width();
-        $height = $gif->height();
-    } elseif (@file_exists($gif)) {
-        $myGIF = new CGIF();
-        if (!$myGIF->getSize($gif, $width, $height)) {
-            return false;
-        }
-    } else {
-        return false;
-    }
-
-    return true;
-}
-
-class CGIFLZW
-{
-    var $MAX_LZW_BITS;
-    var $Fresh, $CodeSize, $SetCodeSize, $MaxCode, $MaxCodeSize, $FirstCode, $OldCode;
-    var $ClearCode, $EndCode, $Next, $Vals, $Stack, $sp, $Buf, $CurBit, $LastBit, $Done, $LastByte;
-
-    // CONSTRUCTOR
-    function CGIFLZW()
-    {
-        $this->MAX_LZW_BITS = 12;
-        unSet($this->Next);
-        unSet($this->Vals);
-        unSet($this->Stack);
-        unSet($this->Buf);
-
-        $this->Next = range(0, (1 << $this->MAX_LZW_BITS) - 1);
-        $this->Vals = range(0, (1 << $this->MAX_LZW_BITS) - 1);
-        $this->Stack = range(0, (1 << ($this->MAX_LZW_BITS + 1)) - 1);
-        $this->Buf = range(0, 279);
-    }
-
-    function deCompress($data, &$datLen)
-    {
-        $stLen = strlen($data);
-        $datLen = 0;
-        $ret = "";
-
-        // INITIALIZATION
-        $this->LZWCommand($data, true);
-
-        while (($iIndex = $this->LZWCommand($data, false)) >= 0) {
-            $ret .= chr($iIndex);
-        }
-
-        $datLen = $stLen - strlen($data);
-
-        if ($iIndex != -2) {
-            return false;
-        }
-
-        return $ret;
-    }
-
-    function LZWCommand(&$data, $bInit)
-    {
-        if ($bInit) {
-            $this->SetCodeSize = ord($data{0});
-            $data = substr($data, 1);
-
-            $this->CodeSize = $this->SetCodeSize + 1;
-            $this->ClearCode = 1 << $this->SetCodeSize;
-            $this->EndCode = $this->ClearCode + 1;
-            $this->MaxCode = $this->ClearCode + 2;
-            $this->MaxCodeSize = $this->ClearCode << 1;
-
-            $this->GetCode($data, $bInit);
-
-            $this->Fresh = 1;
-            for ($i = 0; $i < $this->ClearCode; $i++) {
-                $this->Next[$i] = 0;
-                $this->Vals[$i] = $i;
-            }
-
-            for (; $i < (1 << $this->MAX_LZW_BITS); $i++) {
-                $this->Next[$i] = 0;
-                $this->Vals[$i] = 0;
-            }
-
-            $this->sp = 0;
-            return 1;
-        }
-
-        if ($this->Fresh) {
-            $this->Fresh = 0;
-            do {
-                $this->FirstCode = $this->GetCode($data, $bInit);
-                $this->OldCode = $this->FirstCode;
-            } while ($this->FirstCode == $this->ClearCode);
-
-            return $this->FirstCode;
-        }
-
-        if ($this->sp > 0) {
-            $this->sp--;
-            return $this->Stack[$this->sp];
-        }
-
-        while (($Code = $this->GetCode($data, $bInit)) >= 0) {
-            if ($Code == $this->ClearCode) {
-                for ($i = 0; $i < $this->ClearCode; $i++) {
-                    $this->Next[$i] = 0;
-                    $this->Vals[$i] = $i;
-                }
-
-                for (; $i < (1 << $this->MAX_LZW_BITS); $i++) {
-                    $this->Next[$i] = 0;
-                    $this->Vals[$i] = 0;
-                }
-
-                $this->CodeSize = $this->SetCodeSize + 1;
-                $this->MaxCodeSize = $this->ClearCode << 1;
-                $this->MaxCode = $this->ClearCode + 2;
-                $this->sp = 0;
-                $this->FirstCode = $this->GetCode($data, $bInit);
-                $this->OldCode = $this->FirstCode;
-
-                return $this->FirstCode;
-            }
-
-            if ($Code == $this->EndCode) {
-                return -2;
-            }
-
-            $InCode = $Code;
-            if ($Code >= $this->MaxCode) {
-                $this->Stack[$this->sp] = $this->FirstCode;
-                $this->sp++;
-                $Code = $this->OldCode;
-            }
-
-            while ($Code >= $this->ClearCode) {
-                $this->Stack[$this->sp] = $this->Vals[$Code];
-                $this->sp++;
-
-                if ($Code == $this->Next[$Code]) // Circular table entry, big GIF Error!
-                    return -1;
-
-                $Code = $this->Next[$Code];
-            }
-
-            $this->FirstCode = $this->Vals[$Code];
-            $this->Stack[$this->sp] = $this->FirstCode;
-            $this->sp++;
-
-            if (($Code = $this->MaxCode) < (1 << $this->MAX_LZW_BITS)) {
-                $this->Next[$Code] = $this->OldCode;
-                $this->Vals[$Code] = $this->FirstCode;
-                $this->MaxCode++;
-
-                if (($this->MaxCode >= $this->MaxCodeSize) && ($this->MaxCodeSize < (1 << $this->MAX_LZW_BITS))) {
-                    $this->MaxCodeSize *= 2;
-                    $this->CodeSize++;
-                }
-            }
-
-            $this->OldCode = $InCode;
-            if ($this->sp > 0) {
-                $this->sp--;
-                return $this->Stack[$this->sp];
-            }
-        }
-
-        return $Code;
-    }
-
-    function GetCode(&$data, $bInit)
-    {
-        if ($bInit) {
-            $this->CurBit = 0;
-            $this->LastBit = 0;
-            $this->Done = 0;
-            $this->LastByte = 2;
-            return 1;
-        }
-
-        if (($this->CurBit + $this->CodeSize) >= $this->LastBit) {
-            if ($this->Done) {
-                if ($this->CurBit >= $this->LastBit) {
-                    // Ran off the end of my bits
-                    return 0;
-                }
-                return -1;
-            }
-
-            $this->Buf[0] = $this->Buf[$this->LastByte - 2];
-            $this->Buf[1] = $this->Buf[$this->LastByte - 1];
-
-            $Count = ord($data{0});
-            $data = substr($data, 1);
-
-            if ($Count) {
-                for ($i = 0; $i < $Count; $i++) {
-                    $this->Buf[2 + $i] = ord($data{$i});
-                }
-                $data = substr($data, $Count);
-            } else {
-                $this->Done = 1;
-            }
-
-            $this->LastByte = 2 + $Count;
-            $this->CurBit = ($this->CurBit - $this->LastBit) + 16;
-            $this->LastBit = (2 + $Count) << 3;
-        }
-
-        $iRet = 0;
-        for ($i = $this->CurBit, $j = 0; $j < $this->CodeSize; $i++, $j++) {
-            $iRet |= (($this->Buf[intval($i / 8)] & (1 << ($i % 8))) != 0) << $j;
-        }
-
-        $this->CurBit += $this->CodeSize;
-        return $iRet;
-    }
-}
-
-class CGIFCOLORTABLE
-{
-    var $m_nColors;
-    var $m_arColors;
-
-    // CONSTRUCTOR
-    function CGIFCOLORTABLE()
-    {
-        unSet($this->m_nColors);
-        unSet($this->m_arColors);
-    }
-
-    function load($lpData, $num)
-    {
-        $this->m_nColors = 0;
-        $this->m_arColors = array();
-
-        for ($i = 0; $i < $num; $i++) {
-            $rgb = substr($lpData, $i * 3, 3);
-            if (strlen($rgb) < 3) {
-                return false;
-            }
-
-            $this->m_arColors[] = (ord($rgb{2}) << 16) + (ord($rgb{1}) << 8) + ord($rgb{0});
-            $this->m_nColors++;
-        }
-
-        return true;
-    }
-
-    function toString()
-    {
-        $ret = "";
-
-        for ($i = 0; $i < $this->m_nColors; $i++) {
-            $ret .=
-                chr(($this->m_arColors[$i] & 0x000000FF)) . // R
-                    chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
-                    chr(($this->m_arColors[$i] & 0x00FF0000) >> 16); // B
-        }
-
-        return $ret;
-    }
-
-    function toRGBQuad()
-    {
-        $ret = "";
-
-        for ($i = 0; $i < $this->m_nColors; $i++) {
-            $ret .=
-                chr(($this->m_arColors[$i] & 0x00FF0000) >> 16) . // B
-                    chr(($this->m_arColors[$i] & 0x0000FF00) >> 8) . // G
-                    chr(($this->m_arColors[$i] & 0x000000FF)) . // R
-                    "\x00";
-        }
-
-        return $ret;
-    }
-
-    function colorIndex($rgb)
-    {
-        $rgb = intval($rgb) & 0xFFFFFF;
-        $r1 = ($rgb & 0x0000FF);
-        $g1 = ($rgb & 0x00FF00) >> 8;
-        $b1 = ($rgb & 0xFF0000) >> 16;
-        $idx = -1;
-
-        for ($i = 0; $i < $this->m_nColors; $i++) {
-            $r2 = ($this->m_arColors[$i] & 0x000000FF);
-            $g2 = ($this->m_arColors[$i] & 0x0000FF00) >> 8;
-            $b2 = ($this->m_arColors[$i] & 0x00FF0000) >> 16;
-            $d = abs($r2 - $r1) + abs($g2 - $g1) + abs($b2 - $b1);
-
-            if (($idx == -1) || ($d < $dif)) {
-                $idx = $i;
-                $dif = $d;
-            }
-        }
-
-        return $idx;
-    }
-}
-
-class CGIFFILEHEADER
-{
-    var $m_lpVer;
-    var $m_nWidth;
-    var $m_nHeight;
-    var $m_bGlobalClr;
-    var $m_nColorRes;
-    var $m_bSorted;
-    var $m_nTableSize;
-    var $m_nBgColor;
-    var $m_nPixelRatio;
-    var $m_colorTable;
-
-    // CONSTRUCTOR
-    function CGIFFILEHEADER()
-    {
-        unSet($this->m_lpVer);
-        unSet($this->m_nWidth);
-        unSet($this->m_nHeight);
-        unSet($this->m_bGlobalClr);
-        unSet($this->m_nColorRes);
-        unSet($this->m_bSorted);
-        unSet($this->m_nTableSize);
-        unSet($this->m_nBgColor);
-        unSet($this->m_nPixelRatio);
-        unSet($this->m_colorTable);
-    }
-
-    function load($lpData, &$hdrLen)
-    {
-        $hdrLen = 0;
-
-        $this->m_lpVer = substr($lpData, 0, 6);
-        if (($this->m_lpVer <> "GIF87a") && ($this->m_lpVer <> "GIF89a")) {
-            return false;
-        }
-
-        $this->m_nWidth = $this->w2i(substr($lpData, 6, 2));
-        $this->m_nHeight = $this->w2i(substr($lpData, 8, 2));
-        if (!$this->m_nWidth || !$this->m_nHeight) {
-            return false;
-        }
-
-        $b = ord(substr($lpData, 10, 1));
-        $this->m_bGlobalClr = ($b & 0x80) ? true : false;
-        $this->m_nColorRes = ($b & 0x70) >> 4;
-        $this->m_bSorted = ($b & 0x08) ? true : false;
-        $this->m_nTableSize = 2 << ($b & 0x07);
-        $this->m_nBgColor = ord(substr($lpData, 11, 1));
-        $this->m_nPixelRatio = ord(substr($lpData, 12, 1));
-        $hdrLen = 13;
-
-        if ($this->m_bGlobalClr) {
-            $this->m_colorTable = new CGIFCOLORTABLE();
-            if (!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) {
-                return false;
-            }
-            $hdrLen += 3 * $this->m_nTableSize;
-        }
-
-        return true;
-    }
-
-    function w2i($str)
-    {
-        return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
-    }
-}
-
-class CGIFIMAGEHEADER
-{
-    var $m_nLeft;
-    var $m_nTop;
-    var $m_nWidth;
-    var $m_nHeight;
-    var $m_bLocalClr;
-    var $m_bInterlace;
-    var $m_bSorted;
-    var $m_nTableSize;
-    var $m_colorTable;
-
-    // CONSTRUCTOR
-    function CGIFIMAGEHEADER()
-    {
-        unSet($this->m_nLeft);
-        unSet($this->m_nTop);
-        unSet($this->m_nWidth);
-        unSet($this->m_nHeight);
-        unSet($this->m_bLocalClr);
-        unSet($this->m_bInterlace);
-        unSet($this->m_bSorted);
-        unSet($this->m_nTableSize);
-        unSet($this->m_colorTable);
-    }
-
-    function load($lpData, &$hdrLen)
-    {
-        $hdrLen = 0;
-
-        $this->m_nLeft = $this->w2i(substr($lpData, 0, 2));
-        $this->m_nTop = $this->w2i(substr($lpData, 2, 2));
-        $this->m_nWidth = $this->w2i(substr($lpData, 4, 2));
-        $this->m_nHeight = $this->w2i(substr($lpData, 6, 2));
-
-        if (!$this->m_nWidth || !$this->m_nHeight) {
-            return false;
-        }
-
-        $b = ord($lpData{8});
-        $this->m_bLocalClr = ($b & 0x80) ? true : false;
-        $this->m_bInterlace = ($b & 0x40) ? true : false;
-        $this->m_bSorted = ($b & 0x20) ? true : false;
-        $this->m_nTableSize = 2 << ($b & 0x07);
-        $hdrLen = 9;
-
-        if ($this->m_bLocalClr) {
-            $this->m_colorTable = new CGIFCOLORTABLE();
-            if (!$this->m_colorTable->load(substr($lpData, $hdrLen), $this->m_nTableSize)) {
-                return false;
-            }
-            $hdrLen += 3 * $this->m_nTableSize;
-        }
-
-        return true;
-    }
-
-    function w2i($str)
-    {
-        return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
-    }
-}
-
-class CGIFIMAGE
-{
-    var $m_disp;
-    var $m_bUser;
-    var $m_bTrans;
-    var $m_nDelay;
-    var $m_nTrans;
-    var $m_lpComm;
-    var $m_gih;
-    var $m_data;
-    var $m_lzw;
-
-    function CGIFIMAGE()
-    {
-        unSet($this->m_disp);
-        unSet($this->m_bUser);
-        unSet($this->m_bTrans);
-        unSet($this->m_nDelay);
-        unSet($this->m_nTrans);
-        unSet($this->m_lpComm);
-        unSet($this->m_data);
-        $this->m_gih = new CGIFIMAGEHEADER();
-        $this->m_lzw = new CGIFLZW();
-    }
-
-    function load($data, &$datLen)
-    {
-        $datLen = 0;
-
-        while (true) {
-            $b = ord($data{0});
-            $data = substr($data, 1);
-            $datLen++;
-
-            switch ($b) {
-                case 0x21: // Extension
-                    if (!$this->skipExt($data, $len = 0)) {
-                        return false;
-                    }
-                    $datLen += $len;
-                    break;
-
-                case 0x2C: // Image
-                    // LOAD HEADER & COLOR TABLE
-                    if (!$this->m_gih->load($data, $len = 0)) {
-                        return false;
-                    }
-                    $data = substr($data, $len);
-                    $datLen += $len;
-
-                    // ALLOC BUFFER
-                    if (!($this->m_data = $this->m_lzw->deCompress($data, $len = 0))) {
-                        return false;
-                    }
-                    $data = substr($data, $len);
-                    $datLen += $len;
-
-                    if ($this->m_gih->m_bInterlace) {
-                        $this->deInterlace();
-                    }
-                    return true;
-
-                case 0x3B: // EOF
-                default:
-                    return false;
-            }
-        }
-        return false;
-    }
-
-    function skipExt(&$data, &$extLen)
-    {
-        $extLen = 0;
-
-        $b = ord($data{0});
-        $data = substr($data, 1);
-        $extLen++;
-
-        switch ($b) {
-            case 0xF9: // Graphic Control
-                $b = ord($data{1});
-                $this->m_disp = ($b & 0x1C) >> 2;
-                $this->m_bUser = ($b & 0x02) ? true : false;
-                $this->m_bTrans = ($b & 0x01) ? true : false;
-                $this->m_nDelay = $this->w2i(substr($data, 2, 2));
-                $this->m_nTrans = ord($data{4});
-                break;
-
-            case 0xFE: // Comment
-                $this->m_lpComm = substr($data, 1, ord($data{0}));
-                break;
-
-            case 0x01: // Plain text
-                break;
-
-            case 0xFF: // Application
-                break;
-        }
-
-        // SKIP DEFAULT AS DEFS MAY CHANGE
-        $b = ord($data{0});
-        $data = substr($data, 1);
-        $extLen++;
-        while ($b > 0) {
-            $data = substr($data, $b);
-            $extLen += $b;
-            $b = ord($data{0});
-            $data = substr($data, 1);
-            $extLen++;
-        }
-        return true;
-    }
-
-    function w2i($str)
-    {
-        return ord(substr($str, 0, 1)) + (ord(substr($str, 1, 1)) << 8);
-    }
-
-    function deInterlace()
-    {
-        $data = $this->m_data;
-
-        for ($i = 0; $i < 4; $i++) {
-            switch ($i) {
-                case 0:
-                    $s = 8;
-                    $y = 0;
-                    break;
-
-                case 1:
-                    $s = 8;
-                    $y = 4;
-                    break;
-
-                case 2:
-                    $s = 4;
-                    $y = 2;
-                    break;
-
-                case 3:
-                    $s = 2;
-                    $y = 1;
-                    break;
-            }
-
-            for (; $y < $this->m_gih->m_nHeight; $y += $s) {
-                $lne = substr($this->m_data, 0, $this->m_gih->m_nWidth);
-                $this->m_data = substr($this->m_data, $this->m_gih->m_nWidth);
-
-                $data =
-                    substr($data, 0, $y * $this->m_gih->m_nWidth) .
-                        $lne .
-                        substr($data, ($y + 1) * $this->m_gih->m_nWidth);
-            }
-        }
-
-        $this->m_data = $data;
-    }
-}
-
-class CGIF
-{
-    var $m_gfh;
-    var $m_lpData;
-    var $m_img;
-    var $m_bLoaded;
-
-    // CONSTRUCTOR
-    function CGIF()
-    {
-        $this->m_gfh = new CGIFFILEHEADER();
-        $this->m_img = new CGIFIMAGE();
-        $this->m_lpData = "";
-        $this->m_bLoaded = false;
-    }
-
-    function loadFile($lpszFileName, $iIndex)
-    {
-        if ($iIndex < 0) {
-            return false;
-        }
-
-        // READ FILE
-        if (!($fh = @fOpen($lpszFileName, "rb"))) {
-            return false;
-        }
-        $data = @fRead($fh, @fileSize($lpszFileName));
-        //        @fClose($fh);
-        //      $data=fread($fh,filesize($lpszFileName));
-        while (!feof($fh)) {
-            $data = $data . @fread($fh, 1024);
-            @fClose($fh);
-            $this->m_lpData = @fRead($fh, @fileSize($lpszFileName));
-            fClose($fh);
-
-            // GET FILE HEADER
-            if (!$this->m_gfh->load($this->m_lpData, $len = 0)) {
-                return false;
-            }
-            $this->m_lpData = substr($this->m_lpData, $len);
-
-            do {
-                if (!$this->m_img->load($this->m_lpData, $imgLen = 0)) {
-                    return false;
-                }
-                $this->m_lpData = substr($this->m_lpData, $imgLen);
-            } while ($iIndex-- > 0);
-
-            $this->m_bLoaded = true;
-            return true;
-        }
-
-        function getSize($lpszFileName, &$width, &$height)
-        {
-            if (!($fh = @fOpen($lpszFileName, "rb"))) {
-                return false;
-            }
-            $data = @fRead($fh, @fileSize($lpszFileName));
-            @fClose($fh);
-        }
-
-        $gfh = new CGIFFILEHEADER();
-        if (!$gfh->load($data, $len = 0)) {
-            return false;
-        }
-
-        $width = $gfh->m_nWidth;
-        $height = $gfh->m_nHeight;
-        return true;
-    }
-
-    function getBmp($bgColor)
-    {
-        $out = "";
-
-        if (!$this->m_bLoaded) {
-            return false;
-        }
-
-        // PREPARE COLOR TABLE (RGBQUADs)
-        if ($this->m_img->m_gih->m_bLocalClr) {
-            $nColors = $this->m_img->m_gih->m_nTableSize;
-            $rgbq = $this->m_img->m_gih->m_colorTable->toRGBQuad();
-            if ($bgColor != -1) {
-                $bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor);
-            }
-        } elseif ($this->m_gfh->m_bGlobalClr) {
-            $nColors = $this->m_gfh->m_nTableSize;
-            $rgbq = $this->m_gfh->m_colorTable->toRGBQuad();
-            if ($bgColor != -1) {
-                $bgColor = $this->m_gfh->m_colorTable->colorIndex($bgColor);
-            }
-        } else {
-            $nColors = 0;
-            $bgColor = -1;
-        }
-
-        // PREPARE BITMAP BITS
-        $data = $this->m_img->m_data;
-        $nPxl = ($this->m_gfh->m_nHeight - 1) * $this->m_gfh->m_nWidth;
-        $bmp = "";
-
-        $nPad = ($this->m_gfh->m_nWidth % 4) ? 4 - ($this->m_gfh->m_nWidth % 4) : 0;
-        for ($y = 0; $y < $this->m_gfh->m_nHeight; $y++) {
-            for ($x = 0; $x < $this->m_gfh->m_nWidth; $x++, $nPxl++) {
-                if (
-                    ($x >= $this->m_img->m_gih->m_nLeft) &&
-                    ($y >= $this->m_img->m_gih->m_nTop) &&
-                    ($x < ($this->m_img->m_gih->m_nLeft + $this->m_img->m_gih->m_nWidth)) &&
-                    ($y < ($this->m_img->m_gih->m_nTop + $this->m_img->m_gih->m_nHeight))
-                ) {
-                    // PART OF IMAGE
-                    if ($this->m_img->m_bTrans && (ord($data{$nPxl}) == $this->m_img->m_nTrans)) {
-                        // TRANSPARENT -> BACKGROUND
-                        if ($bgColor == -1) {
-                            $bmp .= chr($this->m_gfh->m_nBgColor);
-                        } else {
-                            $bmp .= chr($bgColor);
-                        }
-                    } else {
-                        $bmp .= $data{$nPxl};
-                    }
-                } else {
-                    // BACKGROUND
-                    if ($bgColor == -1) {
-                        $bmp .= chr($this->m_gfh->m_nBgColor);
-                    } else {
-                        $bmp .= chr($bgColor);
-                    }
-                }
-            }
-            $nPxl -= $this->m_gfh->m_nWidth << 1;
-
-            // ADD PADDING
-            for ($x = 0; $x < $nPad; $x++) {
-                $bmp .= "\x00";
-            }
-        }
-
-        // BITMAPFILEHEADER
-        $out .= "BM";
-        $out .= $this->dword(14 + 40 + ($nColors << 2) + strlen($bmp));
-        $out .= "\x00\x00";
-        $out .= "\x00\x00";
-        $out .= $this->dword(14 + 40 + ($nColors << 2));
-
-        // BITMAPINFOHEADER
-        $out .= $this->dword(40);
-        $out .= $this->dword($this->m_gfh->m_nWidth);
-        $out .= $this->dword($this->m_gfh->m_nHeight);
-        $out .= "\x01\x00";
-        $out .= "\x08\x00";
-        $out .= "\x00\x00\x00\x00";
-        $out .= "\x00\x00\x00\x00";
-        $out .= "\x12\x0B\x00\x00";
-        $out .= "\x12\x0B\x00\x00";
-        $out .= $this->dword($nColors % 256);
-        $out .= "\x00\x00\x00\x00";
-
-        // COLOR TABLE
-        if ($nColors > 0) {
-            $out .= $rgbq;
-        }
-
-        // DATA
-        $out .= $bmp;
-
-        return $out;
-    }
-
-    function getPng($bgColor)
-    {
-        $out = "";
-
-        if (!$this->m_bLoaded) {
-            return false;
-        }
-
-        // PREPARE COLOR TABLE (RGBQUADs)
-        if ($this->m_img->m_gih->m_bLocalClr) {
-            $nColors = $this->m_img->m_gih->m_nTableSize;
-            $pal = $this->m_img->m_gih->m_colorTable->toString();
-            if ($bgColor != -1) {
-                $bgColor = $this->m_img->m_gih->m_colorTable->colorIndex($bgColor);
-            }
-        } elseif ($this->m_gfh->m_bGlobalClr) {
-            $nColors = $this->m_gfh->m_nTableSize;
-            $pal = $this->m_gfh->m_colorTable->toString();
-            if ($bgColor != -1) {
-                $bgColor = $this->m_gfh->m_colorTable->colorIndex($bgColor);
-            }
-        } else {
-            $nColors = 0;
-            $bgColor = -1;
-        }
-
-        // PREPARE BITMAP BITS
-        $data = $this->m_img->m_data;
-        $nPxl = 0;
-        $bmp = "";
-        for ($y = 0; $y < $this->m_gfh->m_nHeight; $y++) {
-            $bmp .= "\x00";
-            for ($x = 0; $x < $this->m_gfh->m_nWidth; $x++, $nPxl++) {
-                if (
-                    ($x >= $this->m_img->m_gih->m_nLeft) &&
-                    ($y >= $this->m_img->m_gih->m_nTop) &&
-                    ($x < ($this->m_img->m_gih->m_nLeft + $this->m_img->m_gih->m_nWidth)) &&
-                    ($y < ($this->m_img->m_gih->m_nTop + $this->m_img->m_gih->m_nHeight))
-                ) {
-                    // PART OF IMAGE
-                    $bmp .= $data{$nPxl};
-                } else {
-                    // BACKGROUND
-                    if ($bgColor == -1) {
-                        $bmp .= chr($this->m_gfh->m_nBgColor);
-                    } else {
-                        $bmp .= chr($bgColor);
-                    }
-                }
-            }
-        }
-        $bmp = gzcompress($bmp, 9);
-
-        // SIGNATURE
-        $out .= "\x89\x50\x4E\x47\x0D\x0A\x1A\x0A";
-
-        // HEADER
-        $out .= "\x00\x00\x00\x0D";
-        $tmp = "IHDR";
-        $tmp .= $this->ndword($this->m_gfh->m_nWidth);
-        $tmp .= $this->ndword($this->m_gfh->m_nHeight);
-        $tmp .= "\x08\x03\x00\x00\x00";
-        $out .= $tmp;
-        $out .= $this->ndword(crc32($tmp));
-
-        // PALETTE
-        if ($nColors > 0) {
-            $out .= $this->ndword($nColors * 3);
-            $tmp = "PLTE";
-            $tmp .= $pal;
-            $out .= $tmp;
-            $out .= $this->ndword(crc32($tmp));
-        }
-
-        // TRANSPARENCY
-        if ($this->m_img->m_bTrans && ($nColors > 0)) {
-            $out .= $this->ndword($nColors);
-            $tmp = "tRNS";
-            for ($i = 0; $i < $nColors; $i++) {
-                $tmp .= ($i == $this->m_img->m_nTrans) ? "\x00" : "\xFF";
-            }
-            $out .= $tmp;
-            $out .= $this->ndword(crc32($tmp));
-        }
-
-        // DATA BITS
-        $out .= $this->ndword(strlen($bmp));
-        $tmp = "IDAT";
-        $tmp .= $bmp;
-        $out .= $tmp;
-        $out .= $this->ndword(crc32($tmp));
-
-        // END OF FILE
-        $out .= "\x00\x00\x00\x00IEND\xAE\x42\x60\x82";
-
-        return $out;
-    }
-
-    function dword($val)
-    {
-        $val = intval($val);
-        return chr($val & 0xFF) . chr(($val & 0xFF00) >> 8) . chr(($val & 0xFF0000) >> 16) . chr(($val & 0xFF000000) >> 24);
-    }
-
-    function ndword($val)
-    {
-        $val = intval($val);
-        return chr(($val & 0xFF000000) >> 24) . chr(($val & 0xFF0000) >> 16) . chr(($val & 0xFF00) >> 8) . chr($val & 0xFF);
-    }
-
-    function width()
-    {
-        return $this->m_gfh->m_nWidth;
-    }
-
-    function height()
-    {
-        return $this->m_gfh->m_nHeight;
-    }
-
-    function comment()
-    {
-        return $this->m_img->m_lpComm;
-    }
-
-    function loaded()
-    {
-        return $this->m_bLoaded;
-    }
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
diff --git a/src/plugins/wiki/www/lib/ziplib.php b/src/plugins/wiki/www/lib/mimelib.php
similarity index 100%
rename from src/plugins/wiki/www/lib/ziplib.php
rename to src/plugins/wiki/www/lib/mimelib.php
diff --git a/src/plugins/wiki/www/lib/nusoap/README.txt b/src/plugins/wiki/www/lib/nusoap/README.txt
deleted file mode 100644
index 306c887..0000000
--- a/src/plugins/wiki/www/lib/nusoap/README.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-NuSOAP - Web Services Toolkit for PHP
-
-Copyright (c) 2002 NuSphere Corporation
-Copyright (c) 2003 Dietrich Ayala
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-If you have any questions or comments, please email or visit the website:
-
-The development of this was once sponsored by NuSphere
-http://www.nusphere.com
-
-Information and updates are available at:
-http://dietrich.ganx4.com/nusoap
-
-For support, you can join the NuSOAP mailing list here:
-https://lists.sourceforge.net/lists/listinfo/nusoap-general
-
-Version: 0.6.4
-
-WHAT IS NuSOAP?
-
-NuSOAP is a set of PHP classes that allow users to send and receive
-SOAP messages. Also included are utility classes for parsing WSDL
-files and XML Schemas.
-
-INSTALLATION
-
-Enter this line at the top of your script:
-
-include('/path/to/nusoap.php');
-
-USAGE EXAMPLES:
-
-BASIC SERVER EXAMPLE
-
-<?php
-
-require_once('nusoap.php');
-$s = new soap_server;
-$s->register('hello');
-function hello($name){
-	// optionally catch an error and return a fault
-	if($name == ''){
-    	return new soap_fault('Client','','Must supply a valid name.');
-    }
-	return "hello $name!";
-}
-$s->service($HTTP_RAW_POST_DATA);
-
-?>
-
-BASIC CLIENT USAGE EXAMPLE
-
-<?php
-
-require_once('nusoap.php');
-$parameters = array('name'=>'dietrich');
-$soapclient = new soapclient('http://someSOAPServer.com/hello.php');
-echo $soapclient->call('hello',$parameters);
-
-?>
-
-WSDL CLIENT USAGE EXAMPLE
-
-<?php
-
-require_once('nusoap.php');
-$parameters = array('dietrich');
-$soapclient = new soapclient('http://someSOAPServer.com/hello.wsdl','wsdl');
-echo $soapclient->call('hello',$parameters);
-
-?>
-
-PROXY CLIENT USAGE EXAMPLE (only works w/ wsdl)
-
-<?php
-
-require_once('nusoap.php');
-$soapclient = new soapclient('http://someSOAPServer.com/hello.wsdl','wsdl');
-$soap_proxy = $soapclient->getProxy();
-echo $soap_proxy->hello('dietrich');
-
-?>
diff --git a/src/plugins/wiki/www/lib/nusoap/lgpl.txt b/src/plugins/wiki/www/lib/nusoap/lgpl.txt
deleted file mode 100644
index 4362b49..0000000
--- a/src/plugins/wiki/www/lib/nusoap/lgpl.txt
+++ /dev/null
@@ -1,502 +0,0 @@
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
-  When we speak of free software, we are referring to freedom of use,
-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 this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-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
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded.  In such case, this License incorporates the limitation as if
-written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser 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.
-
-Each version is given a distinguishing version number.  If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" 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
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY 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
-LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
diff --git a/src/plugins/wiki/www/lib/nusoap/nusoap.php b/src/plugins/wiki/www/lib/nusoap/nusoap.php
deleted file mode 100644
index d76082d..0000000
--- a/src/plugins/wiki/www/lib/nusoap/nusoap.php
+++ /dev/null
@@ -1,8148 +0,0 @@
-<?php
-
-/*
-$Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-
-NuSOAP - Web Services Toolkit for PHP
-
-Copyright (c) 2002 NuSphere Corporation
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License 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
-
-The NuSOAP project home is:
-http://sourceforge.net/projects/nusoap/
-
-The primary support for NuSOAP is the Help forum on the project home page.
-
-If you have any questions or comments, please email:
-
-Dietrich Ayala
-dietrich at ganx4.com
-http://dietrich.ganx4.com/nusoap
-
-NuSphere Corporation
-http://www.nusphere.com
-
-*/
-
-/*
- *	Some of the standards implmented in whole or part by NuSOAP:
- *
- *	SOAP 1.1 (http://www.w3.org/TR/2000/NOTE-SOAP-20000508/)
- *	WSDL 1.1 (http://www.w3.org/TR/2001/NOTE-wsdl-20010315)
- *	SOAP Messages With Attachments (http://www.w3.org/TR/SOAP-attachments)
- *	XML 1.0 (http://www.w3.org/TR/2006/REC-xml-20060816/)
- *	Namespaces in XML 1.0 (http://www.w3.org/TR/2006/REC-xml-names-20060816/)
- *	XML Schema 1.0 (http://www.w3.org/TR/xmlschema-0/)
- *	RFC 2045 Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies
- *	RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1
- *	RFC 2617 HTTP Authentication: Basic and Digest Access Authentication
- */
-
-/* load classes
-
-// necessary classes
-require_once('class.soapclient.php');
-require_once('class.soap_val.php');
-require_once('class.soap_parser.php');
-require_once('class.soap_fault.php');
-
-// transport classes
-require_once('class.soap_transport_http.php');
-
-// optional add-on classes
-require_once('class.xmlschema.php');
-require_once('class.wsdl.php');
-
-// server class
-require_once('class.soap_server.php');*/
-
-// class variable emulation
-// cf. http://www.webkreator.com/php/techniques/php-static-class-variables.html
-$GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = 9;
-
-/**
-*
-* nusoap_base
-*
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @author   Scott Nichol <snichol at users.sourceforge.net>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access   public
-*/
-class nusoap_base {
-	/**
-	 * Identification for HTTP headers.
-	 *
-	 * @var string
-	 * @access private
-	 */
-	var $title = 'NuSOAP';
-	/**
-	 * Version for HTTP headers.
-	 *
-	 * @var string
-	 * @access private
-	 */
-	var $version = '0.9.5';
-	/**
-	 * CVS revision for HTTP headers.
-	 *
-	 * @var string
-	 * @access private
-	 */
-	var $revision = '$Revision: 1.123 $';
-    /**
-     * Current error string (manipulated by getError/setError)
-	 *
-	 * @var string
-	 * @access private
-	 */
-	var $error_str = '';
-    /**
-     * Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment)
-	 *
-	 * @var string
-	 * @access private
-	 */
-    var $debug_str = '';
-    /**
-	 * toggles automatic encoding of special characters as entities
-	 * (should always be true, I think)
-	 *
-	 * @var boolean
-	 * @access private
-	 */
-	var $charencoding = true;
-	/**
-	 * the debug level for this instance
-	 *
-	 * @var	integer
-	 * @access private
-	 */
-	var $debugLevel;
-
-    /**
-	* set schema version
-	*
-	* @var      string
-	* @access   public
-	*/
-	var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema';
-	
-    /**
-	* charset encoding for outgoing messages
-	*
-	* @var      string
-	* @access   public
-	*/
-    var $soap_defencoding = 'ISO-8859-1';
-	//var $soap_defencoding = 'UTF-8';
-
-	/**
-	* namespaces in an array of prefix => uri
-	*
-	* this is "seeded" by a set of constants, but it may be altered by code
-	*
-	* @var      array
-	* @access   public
-	*/
-	var $namespaces = array(
-		'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/',
-		'xsd' => 'http://www.w3.org/2001/XMLSchema',
-		'xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
-		'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/'
-		);
-
-	/**
-	* namespaces used in the current context, e.g. during serialization
-	*
-	* @var      array
-	* @access   private
-	*/
-	var $usedNamespaces = array();
-
-	/**
-	* XML Schema types in an array of uri => (array of xml type => php type)
-	* is this legacy yet?
-	* no, this is used by the nusoap_xmlschema class to verify type => namespace mappings.
-	* @var      array
-	* @access   public
-	*/
-	var $typemap = array(
-	'http://www.w3.org/2001/XMLSchema' => array(
-		'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double',
-		'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'',
-		'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string',
-		// abstract "any" types
-		'anyType'=>'string','anySimpleType'=>'string',
-		// derived datatypes
-		'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'',
-		'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer',
-		'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer',
-		'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''),
-	'http://www.w3.org/2000/10/XMLSchema' => array(
-		'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double',
-		'float'=>'double','dateTime'=>'string',
-		'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'),
-	'http://www.w3.org/1999/XMLSchema' => array(
-		'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double',
-		'float'=>'double','dateTime'=>'string',
-		'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'),
-	'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'),
-	'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'),
-    'http://xml.apache.org/xml-soap' => array('Map')
-	);
-
-	/**
-	* XML entities to convert
-	*
-	* @var      array
-	* @access   public
-	* @deprecated
-	* @see	expandEntities
-	*/
-	var $xmlEntities = array('quot' => '"','amp' => '&',
-		'lt' => '<','gt' => '>','apos' => "'");
-
-	/**
-	* constructor
-	*
-	* @access	public
-	*/
-	function nusoap_base() {
-		$this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'];
-	}
-
-	/**
-	* gets the global debug level, which applies to future instances
-	*
-	* @return	integer	Debug level 0-9, where 0 turns off
-	* @access	public
-	*/
-	function getGlobalDebugLevel() {
-		return $GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'];
-	}
-
-	/**
-	* sets the global debug level, which applies to future instances
-	*
-	* @param	int	$level	Debug level 0-9, where 0 turns off
-	* @access	public
-	*/
-	function setGlobalDebugLevel($level) {
-		$GLOBALS['_transient']['static']['nusoap_base']['globalDebugLevel'] = $level;
-	}
-
-	/**
-	* gets the debug level for this instance
-	*
-	* @return	int	Debug level 0-9, where 0 turns off
-	* @access	public
-	*/
-	function getDebugLevel() {
-		return $this->debugLevel;
-	}
-
-	/**
-	* sets the debug level for this instance
-	*
-	* @param	int	$level	Debug level 0-9, where 0 turns off
-	* @access	public
-	*/
-	function setDebugLevel($level) {
-		$this->debugLevel = $level;
-	}
-
-	/**
-	* adds debug data to the instance debug string with formatting
-	*
-	* @param    string $string debug data
-	* @access   private
-	*/
-	function debug($string){
-		if ($this->debugLevel > 0) {
-			$this->appendDebug($this->getmicrotime().' '.get_class($this).": $string\n");
-		}
-	}
-
-	/**
-	* adds debug data to the instance debug string without formatting
-	*
-	* @param    string $string debug data
-	* @access   public
-	*/
-	function appendDebug($string){
-		if ($this->debugLevel > 0) {
-			// it would be nice to use a memory stream here to use
-			// memory more efficiently
-			$this->debug_str .= $string;
-		}
-	}
-
-	/**
-	* clears the current debug data for this instance
-	*
-	* @access   public
-	*/
-	function clearDebug() {
-		// it would be nice to use a memory stream here to use
-		// memory more efficiently
-		$this->debug_str = '';
-	}
-
-	/**
-	* gets the current debug data for this instance
-	*
-	* @return   debug data
-	* @access   public
-	*/
-	function &getDebug() {
-		// it would be nice to use a memory stream here to use
-		// memory more efficiently
-		return $this->debug_str;
-	}
-
-	/**
-	* gets the current debug data for this instance as an XML comment
-	* this may change the contents of the debug data
-	*
-	* @return   debug data as an XML comment
-	* @access   public
-	*/
-	function &getDebugAsXMLComment() {
-		// it would be nice to use a memory stream here to use
-		// memory more efficiently
-		while (strpos($this->debug_str, '--')) {
-			$this->debug_str = str_replace('--', '- -', $this->debug_str);
-		}
-		$ret = "<!--\n" . $this->debug_str . "\n-->";
-    	return $ret;
-	}
-
-	/**
-	* expands entities, e.g. changes '<' to '<'.
-	*
-	* @param	string	$val	The string in which to expand entities.
-	* @access	private
-	*/
-	function expandEntities($val) {
-		if ($this->charencoding) {
-	    	$val = str_replace('&', '&', $val);
-	    	$val = str_replace("'", ''', $val);
-	    	$val = str_replace('"', '"', $val);
-	    	$val = str_replace('<', '<', $val);
-	    	$val = str_replace('>', '>', $val);
-	    }
-	    return $val;
-	}
-
-	/**
-	* returns error string if present
-	*
-	* @return   mixed error string or false
-	* @access   public
-	*/
-	function getError(){
-		if($this->error_str != ''){
-			return $this->error_str;
-		}
-		return false;
-	}
-
-	/**
-	* sets error string
-	*
-	* @return   boolean $string error string
-	* @access   private
-	*/
-	function setError($str){
-		$this->error_str = $str;
-	}
-
-	/**
-	* detect if array is a simple array or a struct (associative array)
-	*
-	* @param	mixed	$val	The PHP array
-	* @return	string	(arraySimple|arrayStruct)
-	* @access	private
-	*/
-	function isArraySimpleOrStruct($val) {
-        $keyList = array_keys($val);
-		foreach ($keyList as $keyListValue) {
-			if (!is_int($keyListValue)) {
-				return 'arrayStruct';
-			}
-		}
-		return 'arraySimple';
-	}
-
-	/**
-	* serializes PHP values in accordance w/ section 5. Type information is
-	* not serialized if $use == 'literal'.
-	*
-	* @param	mixed	$val	The value to serialize
-	* @param	string	$name	The name (local part) of the XML element
-	* @param	string	$type	The XML schema type (local part) for the element
-	* @param	string	$name_ns	The namespace for the name of the XML element
-	* @param	string	$type_ns	The namespace for the type of the element
-	* @param	array	$attributes	The attributes to serialize as name=>value pairs
-	* @param	string	$use	The WSDL "use" (encoded|literal)
-	* @param	boolean	$soapval	Whether this is called from soapval.
-	* @return	string	The serialized element, possibly with child elements
-    * @access	public
-	*/
-	function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded',$soapval=false) {
-		$this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use, soapval=$soapval");
-		$this->appendDebug('value=' . $this->varDump($val));
-		$this->appendDebug('attributes=' . $this->varDump($attributes));
-		
-    	if (is_object($val) && get_class($val) == 'soapval' && (! $soapval)) {
-    		$this->debug("serialize_val: serialize soapval");
-        	$xml = $val->serialize($use);
-			$this->appendDebug($val->getDebug());
-			$val->clearDebug();
-			$this->debug("serialize_val of soapval returning $xml");
-			return $xml;
-        }
-		// force valid name if necessary
-		if (is_numeric($name)) {
-			$name = '__numeric_' . $name;
-		} elseif (! $name) {
-			$name = 'noname';
-		}
-		// if name has ns, add ns prefix to name
-		$xmlns = '';
-        if($name_ns){
-			$prefix = 'nu'.rand(1000,9999);
-			$name = $prefix.':'.$name;
-			$xmlns .= " xmlns:$prefix=\"$name_ns\"";
-		}
-		// if type is prefixed, create type prefix
-		if($type_ns != '' && $type_ns == $this->namespaces['xsd']){
-			// need to fix this. shouldn't default to xsd if no ns specified
-		    // w/o checking against typemap
-			$type_prefix = 'xsd';
-		} elseif($type_ns){
-			$type_prefix = 'ns'.rand(1000,9999);
-			$xmlns .= " xmlns:$type_prefix=\"$type_ns\"";
-		}
-		// serialize attributes if present
-		$atts = '';
-		if($attributes){
-			foreach($attributes as $k => $v){
-				$atts .= " $k=\"".$this->expandEntities($v).'"';
-			}
-		}
-		// serialize null value
-		if (is_null($val)) {
-    		$this->debug("serialize_val: serialize null");
-			if ($use == 'literal') {
-				// TODO: depends on minOccurs
-				$xml = "<$name$xmlns$atts/>";
-				$this->debug("serialize_val returning $xml");
-	        	return $xml;
-        	} else {
-				if (isset($type) && isset($type_prefix)) {
-					$type_str = " xsi:type=\"$type_prefix:$type\"";
-				} else {
-					$type_str = '';
-				}
-				$xml = "<$name$xmlns$type_str$atts xsi:nil=\"true\"/>";
-				$this->debug("serialize_val returning $xml");
-	        	return $xml;
-        	}
-		}
-        // serialize if an xsd built-in primitive type
-        if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){
-    		$this->debug("serialize_val: serialize xsd built-in primitive type");
-        	if (is_bool($val)) {
-        		if ($type == 'boolean') {
-	        		$val = $val ? 'true' : 'false';
-	        	} elseif (! $val) {
-	        		$val = 0;
-	        	}
-			} else if (is_string($val)) {
-				$val = $this->expandEntities($val);
-			}
-			if ($use == 'literal') {
-				$xml = "<$name$xmlns$atts>$val</$name>";
-				$this->debug("serialize_val returning $xml");
-	        	return $xml;
-        	} else {
-				$xml = "<$name$xmlns xsi:type=\"xsd:$type\"$atts>$val</$name>";
-				$this->debug("serialize_val returning $xml");
-	        	return $xml;
-        	}
-        }
-		// detect type and serialize
-		$xml = '';
-		switch(true) {
-			case (is_bool($val) || $type == 'boolean'):
-		   		$this->debug("serialize_val: serialize boolean");
-        		if ($type == 'boolean') {
-	        		$val = $val ? 'true' : 'false';
-	        	} elseif (! $val) {
-	        		$val = 0;
-	        	}
-				if ($use == 'literal') {
-					$xml .= "<$name$xmlns$atts>$val</$name>";
-				} else {
-					$xml .= "<$name$xmlns xsi:type=\"xsd:boolean\"$atts>$val</$name>";
-				}
-				break;
-			case (is_int($val) || is_long($val) || $type == 'int'):
-		   		$this->debug("serialize_val: serialize int");
-				if ($use == 'literal') {
-					$xml .= "<$name$xmlns$atts>$val</$name>";
-				} else {
-					$xml .= "<$name$xmlns xsi:type=\"xsd:int\"$atts>$val</$name>";
-				}
-				break;
-			case (is_float($val)|| is_double($val) || $type == 'float'):
-		   		$this->debug("serialize_val: serialize float");
-				if ($use == 'literal') {
-					$xml .= "<$name$xmlns$atts>$val</$name>";
-				} else {
-					$xml .= "<$name$xmlns xsi:type=\"xsd:float\"$atts>$val</$name>";
-				}
-				break;
-			case (is_string($val) || $type == 'string'):
-		   		$this->debug("serialize_val: serialize string");
-				$val = $this->expandEntities($val);
-				if ($use == 'literal') {
-					$xml .= "<$name$xmlns$atts>$val</$name>";
-				} else {
-					$xml .= "<$name$xmlns xsi:type=\"xsd:string\"$atts>$val</$name>";
-				}
-				break;
-			case is_object($val):
-		   		$this->debug("serialize_val: serialize object");
-		    	if (get_class($val) == 'soapval') {
-		    		$this->debug("serialize_val: serialize soapval object");
-		        	$pXml = $val->serialize($use);
-					$this->appendDebug($val->getDebug());
-					$val->clearDebug();
-		        } else {
-					if (! $name) {
-						$name = get_class($val);
-						$this->debug("In serialize_val, used class name $name as element name");
-					} else {
-						$this->debug("In serialize_val, do not override name $name for element name for class " . get_class($val));
-					}
-					foreach(get_object_vars($val) as $k => $v){
-						$pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->serialize_val($v,$k,false,false,false,false,$use);
-					}
-				}
-				if(isset($type) && isset($type_prefix)){
-					$type_str = " xsi:type=\"$type_prefix:$type\"";
-				} else {
-					$type_str = '';
-				}
-				if ($use == 'literal') {
-					$xml .= "<$name$xmlns$atts>$pXml</$name>";
-				} else {
-					$xml .= "<$name$xmlns$type_str$atts>$pXml</$name>";
-				}
-				break;
-			break;
-			case (is_array($val) || $type):
-				// detect if struct or array
-				$valueType = $this->isArraySimpleOrStruct($val);
-                if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){
-			   		$this->debug("serialize_val: serialize array");
-					$i = 0;
-					if(is_array($val) && count($val)> 0){
-						foreach($val as $v){
-	                    	if(is_object($v) && get_class($v) ==  'soapval'){
-								$tt_ns = $v->type_ns;
-								$tt = $v->type;
-							} elseif (is_array($v)) {
-								$tt = $this->isArraySimpleOrStruct($v);
-							} else {
-								$tt = gettype($v);
-	                        }
-							$array_types[$tt] = 1;
-							// TODO: for literal, the name should be $name
-							$xml .= $this->serialize_val($v,'item',false,false,false,false,$use);
-							++$i;
-						}
-						if(count($array_types) > 1){
-							$array_typename = 'xsd:anyType';
-						} elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) {
-							if ($tt == 'integer') {
-								$tt = 'int';
-							}
-							$array_typename = 'xsd:'.$tt;
-						} elseif(isset($tt) && $tt == 'arraySimple'){
-							$array_typename = 'SOAP-ENC:Array';
-						} elseif(isset($tt) && $tt == 'arrayStruct'){
-							$array_typename = 'unnamed_struct_use_soapval';
-						} else {
-							// if type is prefixed, create type prefix
-							if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){
-								 $array_typename = 'xsd:' . $tt;
-							} elseif ($tt_ns) {
-								$tt_prefix = 'ns' . rand(1000, 9999);
-								$array_typename = "$tt_prefix:$tt";
-								$xmlns .= " xmlns:$tt_prefix=\"$tt_ns\"";
-							} else {
-								$array_typename = $tt;
-							}
-						}
-						$array_type = $i;
-						if ($use == 'literal') {
-							$type_str = '';
-						} else if (isset($type) && isset($type_prefix)) {
-							$type_str = " xsi:type=\"$type_prefix:$type\"";
-						} else {
-							$type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\"";
-						}
-					// empty array
-					} else {
-						if ($use == 'literal') {
-							$type_str = '';
-						} else if (isset($type) && isset($type_prefix)) {
-							$type_str = " xsi:type=\"$type_prefix:$type\"";
-						} else {
-							$type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\"";
-						}
-					}
-					// TODO: for array in literal, there is no wrapper here
-					$xml = "<$name$xmlns$type_str$atts>".$xml."</$name>";
-				} else {
-					// got a struct
-			   		$this->debug("serialize_val: serialize struct");
-					if(isset($type) && isset($type_prefix)){
-						$type_str = " xsi:type=\"$type_prefix:$type\"";
-					} else {
-						$type_str = '';
-					}
-					if ($use == 'literal') {
-						$xml .= "<$name$xmlns$atts>";
-					} else {
-						$xml .= "<$name$xmlns$type_str$atts>";
-					}
-					foreach($val as $k => $v){
-						// Apache Map
-						if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') {
-							$xml .= '<item>';
-							$xml .= $this->serialize_val($k,'key',false,false,false,false,$use);
-							$xml .= $this->serialize_val($v,'value',false,false,false,false,$use);
-							$xml .= '</item>';
-						} else {
-							$xml .= $this->serialize_val($v,$k,false,false,false,false,$use);
-						}
-					}
-					$xml .= "</$name>";
-				}
-				break;
-			default:
-		   		$this->debug("serialize_val: serialize unknown");
-				$xml .= 'not detected, got '.gettype($val).' for '.$val;
-				break;
-		}
-		$this->debug("serialize_val returning $xml");
-		return $xml;
-	}
-
-    /**
-    * serializes a message
-    *
-    * @param string $body the XML of the SOAP body
-    * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array
-    * @param array $namespaces optional the namespaces used in generating the body and headers
-    * @param string $style optional (rpc|document)
-    * @param string $use optional (encoded|literal)
-    * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
-    * @return string the message
-    * @access public
-    */
-    function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){
-    // TODO: add an option to automatically run utf8_encode on $body and $headers
-    // if $this->soap_defencoding is UTF-8.  Not doing this automatically allows
-    // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1
-
-	$this->debug("In serializeEnvelope length=" . strlen($body) . " body (max 1000 characters)=" . substr($body, 0, 1000) . " style=$style use=$use encodingStyle=$encodingStyle");
-	$this->debug("headers:");
-	$this->appendDebug($this->varDump($headers));
-	$this->debug("namespaces:");
-	$this->appendDebug($this->varDump($namespaces));
-
-	// serialize namespaces
-    $ns_string = '';
-	foreach(array_merge($this->namespaces,$namespaces) as $k => $v){
-		$ns_string .= " xmlns:$k=\"$v\"";
-	}
-	if($encodingStyle) {
-		$ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string";
-	}
-
-	// serialize headers
-	if($headers){
-		if (is_array($headers)) {
-			$xml = '';
-			foreach ($headers as $k => $v) {
-				if (is_object($v) && get_class($v) == 'soapval') {
-					$xml .= $this->serialize_val($v, false, false, false, false, false, $use);
-				} else {
-					$xml .= $this->serialize_val($v, $k, false, false, false, false, $use);
-				}
-			}
-			$headers = $xml;
-			$this->debug("In serializeEnvelope, serialized array of headers to $headers");
-		}
-		$headers = "<SOAP-ENV:Header>".$headers."</SOAP-ENV:Header>";
-	}
-	// serialize envelope
-	return
-	'<?xml version="1.0" encoding="'.$this->soap_defencoding .'"?'.">".
-	'<SOAP-ENV:Envelope'.$ns_string.">".
-	$headers.
-	"<SOAP-ENV:Body>".
-		$body.
-	"</SOAP-ENV:Body>".
-	"</SOAP-ENV:Envelope>";
-    }
-
-	/**
-	 * formats a string to be inserted into an HTML stream
-	 *
-	 * @param string $str The string to format
-	 * @return string The formatted string
-	 * @access public
-	 * @deprecated
-	 */
-    function formatDump($str){
-		$str = htmlspecialchars($str);
-		return nl2br($str);
-    }
-
-	/**
-	* contracts (changes namespace to prefix) a qualified name
-	*
-	* @param    string $qname qname
-	* @return	string contracted qname
-	* @access   private
-	*/
-	function contractQname($qname){
-		// get element namespace
-		//$this->xdebug("Contract $qname");
-		if (strrpos($qname, ':')) {
-			// get unqualified name
-			$name = substr($qname, strrpos($qname, ':') + 1);
-			// get ns
-			$ns = substr($qname, 0, strrpos($qname, ':'));
-			$p = $this->getPrefixFromNamespace($ns);
-			if ($p) {
-				return $p . ':' . $name;
-			}
-			return $qname;
-		} else {
-			return $qname;
-		}
-	}
-
-	/**
-	* expands (changes prefix to namespace) a qualified name
-	*
-	* @param    string $qname qname
-	* @return	string expanded qname
-	* @access   private
-	*/
-	function expandQname($qname){
-		// get element prefix
-		if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){
-			// get unqualified name
-			$name = substr(strstr($qname,':'),1);
-			// get ns prefix
-			$prefix = substr($qname,0,strpos($qname,':'));
-			if(isset($this->namespaces[$prefix])){
-				return $this->namespaces[$prefix].':'.$name;
-			} else {
-				return $qname;
-			}
-		} else {
-			return $qname;
-		}
-	}
-
-    /**
-    * returns the local part of a prefixed string
-    * returns the original string, if not prefixed
-    *
-    * @param string $str The prefixed string
-    * @return string The local part
-    * @access public
-    */
-	function getLocalPart($str){
-		if($sstr = strrchr($str,':')){
-			// get unqualified name
-			return substr( $sstr, 1 );
-		} else {
-			return $str;
-		}
-	}
-
-	/**
-    * returns the prefix part of a prefixed string
-    * returns false, if not prefixed
-    *
-    * @param string $str The prefixed string
-    * @return mixed The prefix or false if there is no prefix
-    * @access public
-    */
-	function getPrefix($str){
-		if($pos = strrpos($str,':')){
-			// get prefix
-			return substr($str,0,$pos);
-		}
-		return false;
-	}
-
-	/**
-    * pass it a prefix, it returns a namespace
-    *
-    * @param string $prefix The prefix
-    * @return mixed The namespace, false if no namespace has the specified prefix
-    * @access public
-    */
-	function getNamespaceFromPrefix($prefix){
-		if (isset($this->namespaces[$prefix])) {
-			return $this->namespaces[$prefix];
-		}
-		//$this->setError("No namespace registered for prefix '$prefix'");
-		return false;
-	}
-
-	/**
-    * returns the prefix for a given namespace (or prefix)
-    * or false if no prefixes registered for the given namespace
-    *
-    * @param string $ns The namespace
-    * @return mixed The prefix, false if the namespace has no prefixes
-    * @access public
-    */
-	function getPrefixFromNamespace($ns) {
-		foreach ($this->namespaces as $p => $n) {
-			if ($ns == $n || $ns == $p) {
-			    $this->usedNamespaces[$p] = $n;
-				return $p;
-			}
-		}
-		return false;
-	}
-
-	/**
-    * returns the time in ODBC canonical form with microseconds
-    *
-    * @return string The time in ODBC canonical form with microseconds
-    * @access public
-    */
-	function getmicrotime() {
-		if (function_exists('gettimeofday')) {
-			$tod = gettimeofday();
-			$sec = $tod['sec'];
-			$usec = $tod['usec'];
-		} else {
-			$sec = time();
-			$usec = 0;
-		}
-		return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec);
-	}
-
-	/**
-	 * Returns a string with the output of var_dump
-	 *
-	 * @param mixed $data The variable to var_dump
-	 * @return string The output of var_dump
-	 * @access public
-	 */
-    function varDump($data) {
-		ob_start();
-		var_dump($data);
-		$ret_val = ob_get_contents();
-		ob_end_clean();
-		return $ret_val;
-	}
-
-	/**
-	* represents the object as a string
-	*
-	* @return	string
-	* @access   public
-	*/
-	function __toString() {
-		return $this->varDump($this);
-	}
-}
-
-// XML Schema Datatype Helper Functions
-
-//xsd:dateTime helpers
-
-/**
-* convert unix timestamp to ISO 8601 compliant date string
-*
-* @param    int $timestamp Unix time stamp
-* @param	boolean $utc Whether the time stamp is UTC or local
-* @return	mixed ISO 8601 date string or false
-* @access   public
-*/
-function timestamp_to_iso8601($timestamp,$utc=true){
-	$datestr = date('Y-m-d\TH:i:sO',$timestamp);
-	$pos = strrpos($datestr, "+");
-	if ($pos === FALSE) {
-		$pos = strrpos($datestr, "-");
-	}
-	if ($pos !== FALSE) {
-		if (strlen($datestr) == $pos + 5) {
-			$datestr = substr($datestr, 0, $pos + 3) . ':' . substr($datestr, -2);
-		}
-	}
-	if($utc){
-		$pattern = '/'.
-		'([0-9]{4})-'.	// centuries & years CCYY-
-		'([0-9]{2})-'.	// months MM-
-		'([0-9]{2})'.	// days DD
-		'T'.			// separator T
-		'([0-9]{2}):'.	// hours hh:
-		'([0-9]{2}):'.	// minutes mm:
-		'([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss...
-		'(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
-		'/';
-
-		if(preg_match($pattern,$datestr,$regs)){
-			return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]);
-		}
-		return false;
-	} else {
-		return $datestr;
-	}
-}
-
-/**
-* convert ISO 8601 compliant date string to unix timestamp
-*
-* @param    string $datestr ISO 8601 compliant date string
-* @return	mixed Unix timestamp (int) or false
-* @access   public
-*/
-function iso8601_to_timestamp($datestr){
-	$pattern = '/'.
-	'([0-9]{4})-'.	// centuries & years CCYY-
-	'([0-9]{2})-'.	// months MM-
-	'([0-9]{2})'.	// days DD
-	'T'.			// separator T
-	'([0-9]{2}):'.	// hours hh:
-	'([0-9]{2}):'.	// minutes mm:
-	'([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss...
-	'(Z|[+\-][0-9]{2}:?[0-9]{2})?'. // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's
-	'/';
-	if(preg_match($pattern,$datestr,$regs)){
-		// not utc
-		if($regs[8] != 'Z'){
-			$op = substr($regs[8],0,1);
-			$h = substr($regs[8],1,2);
-			$m = substr($regs[8],strlen($regs[8])-2,2);
-			if($op == '-'){
-				$regs[4] = $regs[4] + $h;
-				$regs[5] = $regs[5] + $m;
-			} elseif($op == '+'){
-				$regs[4] = $regs[4] - $h;
-				$regs[5] = $regs[5] - $m;
-			}
-		}
-		return gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]);
-//		return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z");
-	} else {
-		return false;
-	}
-}
-
-/**
-* sleeps some number of microseconds
-*
-* @param    string $usec the number of microseconds to sleep
-* @access   public
-* @deprecated
-*/
-function usleepWindows($usec)
-{
-	$start = gettimeofday();
-	
-	do
-	{
-		$stop = gettimeofday();
-		$timePassed = 1000000 * ($stop['sec'] - $start['sec'])
-		+ $stop['usec'] - $start['usec'];
-	}
-	while ($timePassed < $usec);
-}
-
-?><?php
-
-
-
-/**
-* Contains information for a SOAP fault.
-* Mainly used for returning faults from deployed functions
-* in a server instance.
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access public
-*/
-class nusoap_fault extends nusoap_base {
-	/**
-	 * The fault code (client|server)
-	 * @var string
-	 * @access private
-	 */
-	var $faultcode;
-	/**
-	 * The fault actor
-	 * @var string
-	 * @access private
-	 */
-	var $faultactor;
-	/**
-	 * The fault string, a description of the fault
-	 * @var string
-	 * @access private
-	 */
-	var $faultstring;
-	/**
-	 * The fault detail, typically a string or array of string
-	 * @var mixed
-	 * @access private
-	 */
-	var $faultdetail;
-
-	/**
-	* constructor
-    *
-    * @param string $faultcode (SOAP-ENV:Client | SOAP-ENV:Server)
-    * @param string $faultactor only used when msg routed between multiple actors
-    * @param string $faultstring human readable error message
-    * @param mixed $faultdetail detail, typically a string or array of string
-	*/
-	function nusoap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){
-		parent::nusoap_base();
-		$this->faultcode = $faultcode;
-		$this->faultactor = $faultactor;
-		$this->faultstring = $faultstring;
-		$this->faultdetail = $faultdetail;
-	}
-
-	/**
-	* serialize a fault
-	*
-	* @return	string	The serialization of the fault instance.
-	* @access   public
-	*/
-	function serialize(){
-		$ns_string = '';
-		foreach($this->namespaces as $k => $v){
-			$ns_string .= "\n  xmlns:$k=\"$v\"";
-		}
-		$return_msg =
-			'<?xml version="1.0" encoding="'.$this->soap_defencoding.'"?>'.
-			'<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"'.$ns_string.">\n".
-				'<SOAP-ENV:Body>'.
-				'<SOAP-ENV:Fault>'.
-					$this->serialize_val($this->faultcode, 'faultcode').
-					$this->serialize_val($this->faultactor, 'faultactor').
-					$this->serialize_val($this->faultstring, 'faultstring').
-					$this->serialize_val($this->faultdetail, 'detail').
-				'</SOAP-ENV:Fault>'.
-				'</SOAP-ENV:Body>'.
-			'</SOAP-ENV:Envelope>';
-		return $return_msg;
-	}
-}
-
-/**
- * Backward compatibility
- */
-class soap_fault extends nusoap_fault {
-}
-
-?><?php
-
-
-
-/**
-* parses an XML Schema, allows access to it's data, other utility methods.
-* imperfect, no validation... yet, but quite functional.
-*
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @author   Scott Nichol <snichol at users.sourceforge.net>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access   public
-*/
-class nusoap_xmlschema extends nusoap_base  {
-	
-	// files
-	var $schema = '';
-	var $xml = '';
-	// namespaces
-	var $enclosingNamespaces;
-	// schema info
-	var $schemaInfo = array();
-	var $schemaTargetNamespace = '';
-	// types, elements, attributes defined by the schema
-	var $attributes = array();
-	var $complexTypes = array();
-	var $complexTypeStack = array();
-	var $currentComplexType = null;
-	var $elements = array();
-	var $elementStack = array();
-	var $currentElement = null;
-	var $simpleTypes = array();
-	var $simpleTypeStack = array();
-	var $currentSimpleType = null;
-	// imports
-	var $imports = array();
-	// parser vars
-	var $parser;
-	var $position = 0;
-	var $depth = 0;
-	var $depth_array = array();
-	var $message = array();
-	var $defaultNamespace = array();
-    
-	/**
-	* constructor
-	*
-	* @param    string $schema schema document URI
-	* @param    string $xml xml document URI
-	* @param	string $namespaces namespaces defined in enclosing XML
-	* @access   public
-	*/
-	function nusoap_xmlschema($schema='',$xml='',$namespaces=array()){
-		parent::nusoap_base();
-		$this->debug('nusoap_xmlschema class instantiated, inside constructor');
-		// files
-		$this->schema = $schema;
-		$this->xml = $xml;
-
-		// namespaces
-		$this->enclosingNamespaces = $namespaces;
-		$this->namespaces = array_merge($this->namespaces, $namespaces);
-
-		// parse schema file
-		if($schema != ''){
-			$this->debug('initial schema file: '.$schema);
-			$this->parseFile($schema, 'schema');
-		}
-
-		// parse xml file
-		if($xml != ''){
-			$this->debug('initial xml file: '.$xml);
-			$this->parseFile($xml, 'xml');
-		}
-
-	}
-
-    /**
-    * parse an XML file
-    *
-    * @param string $xml path/URL to XML file
-    * @param string $type (schema | xml)
-	* @return boolean
-    * @access public
-    */
-	function parseFile($xml,$type){
-		// parse xml file
-		if($xml != ""){
-			$xmlStr = @join("", at file($xml));
-			if($xmlStr == ""){
-				$msg = 'Error reading XML from '.$xml;
-				$this->setError($msg);
-				$this->debug($msg);
-			return false;
-			} else {
-				$this->debug("parsing $xml");
-				$this->parseString($xmlStr,$type);
-				$this->debug("done parsing $xml");
-			return true;
-			}
-		}
-		return false;
-	}
-
-	/**
-	* parse an XML string
-	*
-	* @param    string $xml path or URL
-    * @param	string $type (schema|xml)
-	* @access   private
-	*/
-	function parseString($xml,$type){
-		// parse xml string
-		if($xml != ""){
-
-	    	// Create an XML parser.
-	    	$this->parser = xml_parser_create();
-	    	// Set the options for parsing the XML data.
-	    	xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
-
-	    	// Set the object for the parser.
-	    	xml_set_object($this->parser, $this);
-
-	    	// Set the element handlers for the parser.
-			if($type == "schema"){
-		    	xml_set_element_handler($this->parser, 'schemaStartElement','schemaEndElement');
-		    	xml_set_character_data_handler($this->parser,'schemaCharacterData');
-			} elseif($type == "xml"){
-				xml_set_element_handler($this->parser, 'xmlStartElement','xmlEndElement');
-		    	xml_set_character_data_handler($this->parser,'xmlCharacterData');
-			}
-
-		    // Parse the XML file.
-		    if(!xml_parse($this->parser,$xml,true)){
-			// Display an error message.
-				$errstr = sprintf('XML error parsing XML schema on line %d: %s',
-				xml_get_current_line_number($this->parser),
-				xml_error_string(xml_get_error_code($this->parser))
-				);
-				$this->debug($errstr);
-				$this->debug("XML payload:\n" . $xml);
-				$this->setError($errstr);
-	    	}
-            
-			xml_parser_free($this->parser);
-		} else{
-			$this->debug('no xml passed to parseString()!!');
-			$this->setError('no xml passed to parseString()!!');
-		}
-	}
-
-	/**
-	 * gets a type name for an unnamed type
-	 *
-	 * @param	string	Element name
-	 * @return	string	A type name for an unnamed type
-	 * @access	private
-	 */
-	function CreateTypeName($ename) {
-		$scope = '';
-		for ($i = 0; $i < count($this->complexTypeStack); $i++) {
-			$scope .= $this->complexTypeStack[$i] . '_';
-		}
-		return $scope . $ename . '_ContainedType';
-	}
-	
-	/**
-	* start-element handler
-	*
-	* @param    string $parser XML parser object
-	* @param    string $name element name
-	* @param    string $attrs associative array of attributes
-	* @access   private
-	*/
-	function schemaStartElement($parser, $name, $attrs) {
-		
-		// position in the total number of elements, starting from 0
-		$pos = $this->position++;
-		$depth = $this->depth++;
-		// set self as current value for this depth
-		$this->depth_array[$depth] = $pos;
-		$this->message[$pos] = array('cdata' => ''); 
-		if ($depth > 0) {
-			$this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]];
-		} else {
-			$this->defaultNamespace[$pos] = false;
-		}
-
-		// get element prefix
-		if($prefix = $this->getPrefix($name)){
-			// get unqualified name
-			$name = $this->getLocalPart($name);
-		} else {
-        	$prefix = '';
-        }
-		
-        // loop thru attributes, expanding, and registering namespace declarations
-        if(count($attrs) > 0){
-        	foreach($attrs as $k => $v){
-                // if ns declarations, add to class level array of valid namespaces
-				if(preg_match('/^xmlns/',$k)){
-                	//$this->xdebug("$k: $v");
-                	//$this->xdebug('ns_prefix: '.$this->getPrefix($k));
-                	if($ns_prefix = substr(strrchr($k,':'),1)){
-                		//$this->xdebug("Add namespace[$ns_prefix] = $v");
-						$this->namespaces[$ns_prefix] = $v;
-					} else {
-						$this->defaultNamespace[$pos] = $v;
-						if (! $this->getPrefixFromNamespace($v)) {
-							$this->namespaces['ns'.(count($this->namespaces)+1)] = $v;
-						}
-					}
-					if($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema'){
-						$this->XMLSchemaVersion = $v;
-						$this->namespaces['xsi'] = $v.'-instance';
-					}
-				}
-        	}
-        	foreach($attrs as $k => $v){
-                // expand each attribute
-                $k = strpos($k,':') ? $this->expandQname($k) : $k;
-                $v = strpos($v,':') ? $this->expandQname($v) : $v;
-        		$eAttrs[$k] = $v;
-        	}
-        	$attrs = $eAttrs;
-        } else {
-        	$attrs = array();
-        }
-		// find status, register data
-		switch($name){
-			case 'all':			// (optional) compositor content for a complexType
-			case 'choice':
-			case 'group':
-			case 'sequence':
-				//$this->xdebug("compositor $name for currentComplexType: $this->currentComplexType and currentElement: $this->currentElement");
-				$this->complexTypes[$this->currentComplexType]['compositor'] = $name;
-				//if($name == 'all' || $name == 'sequence'){
-				//	$this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
-				//}
-			break;
-			case 'attribute':	// complexType attribute
-            	//$this->xdebug("parsing attribute $attrs[name] $attrs[ref] of value: ".$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']);
-            	$this->xdebug("parsing attribute:");
-            	$this->appendDebug($this->varDump($attrs));
-				if (!isset($attrs['form'])) {
-					// TODO: handle globals
-					$attrs['form'] = $this->schemaInfo['attributeFormDefault'];
-				}
-            	if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) {
-					$v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
-					if (!strpos($v, ':')) {
-						// no namespace in arrayType attribute value...
-						if ($this->defaultNamespace[$pos]) {
-							// ...so use the default
-							$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
-						}
-					}
-            	}
-                if(isset($attrs['name'])){
-					$this->attributes[$attrs['name']] = $attrs;
-					$aname = $attrs['name'];
-				} elseif(isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType'){
-					if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) {
-	                	$aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
-	                } else {
-	                	$aname = '';
-	                }
-				} elseif(isset($attrs['ref'])){
-					$aname = $attrs['ref'];
-                    $this->attributes[$attrs['ref']] = $attrs;
-				}
-                
-				if($this->currentComplexType){	// This should *always* be
-					$this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs;
-				}
-				// arrayType attribute
-				if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType'){
-					$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
-                	$prefix = $this->getPrefix($aname);
-					if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])){
-						$v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'];
-					} else {
-						$v = '';
-					}
-                    if(strpos($v,'[,]')){
-                        $this->complexTypes[$this->currentComplexType]['multidimensional'] = true;
-                    }
-                    $v = substr($v,0,strpos($v,'[')); // clip the []
-                    if(!strpos($v,':') && isset($this->typemap[$this->XMLSchemaVersion][$v])){
-                        $v = $this->XMLSchemaVersion.':'.$v;
-                    }
-                    $this->complexTypes[$this->currentComplexType]['arrayType'] = $v;
-				}
-			break;
-			case 'complexContent':	// (optional) content for a complexType
-				$this->xdebug("do nothing for element $name");
-			break;
-			case 'complexType':
-				array_push($this->complexTypeStack, $this->currentComplexType);
-				if(isset($attrs['name'])){
-					// TODO: what is the scope of named complexTypes that appear
-					//       nested within other c complexTypes?
-					$this->xdebug('processing named complexType '.$attrs['name']);
-					//$this->currentElement = false;
-					$this->currentComplexType = $attrs['name'];
-					$this->complexTypes[$this->currentComplexType] = $attrs;
-					$this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType';
-					// This is for constructs like
-					//           <complexType name="ListOfString" base="soap:Array">
-					//                <sequence>
-					//                    <element name="string" type="xsd:string"
-					//                        minOccurs="0" maxOccurs="unbounded" />
-					//                </sequence>
-					//            </complexType>
-					if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){
-						$this->xdebug('complexType is unusual array');
-						$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
-					} else {
-						$this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
-					}
-				} else {
-					$name = $this->CreateTypeName($this->currentElement);
-					$this->xdebug('processing unnamed complexType for element ' . $this->currentElement . ' named ' . $name);
-					$this->currentComplexType = $name;
-					//$this->currentElement = false;
-					$this->complexTypes[$this->currentComplexType] = $attrs;
-					$this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType';
-					// This is for constructs like
-					//           <complexType name="ListOfString" base="soap:Array">
-					//                <sequence>
-					//                    <element name="string" type="xsd:string"
-					//                        minOccurs="0" maxOccurs="unbounded" />
-					//                </sequence>
-					//            </complexType>
-					if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){
-						$this->xdebug('complexType is unusual array');
-						$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
-					} else {
-						$this->complexTypes[$this->currentComplexType]['phpType'] = 'struct';
-					}
-				}
-				$this->complexTypes[$this->currentComplexType]['simpleContent'] = 'false';
-			break;
-			case 'element':
-				array_push($this->elementStack, $this->currentElement);
-				if (!isset($attrs['form'])) {
-					if ($this->currentComplexType) {
-						$attrs['form'] = $this->schemaInfo['elementFormDefault'];
-					} else {
-						// global
-						$attrs['form'] = 'qualified';
-					}
-				}
-				if(isset($attrs['type'])){
-					$this->xdebug("processing typed element ".$attrs['name']." of type ".$attrs['type']);
-					if (! $this->getPrefix($attrs['type'])) {
-						if ($this->defaultNamespace[$pos]) {
-							$attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type'];
-							$this->xdebug('used default namespace to make type ' . $attrs['type']);
-						}
-					}
-					// This is for constructs like
-					//           <complexType name="ListOfString" base="soap:Array">
-					//                <sequence>
-					//                    <element name="string" type="xsd:string"
-					//                        minOccurs="0" maxOccurs="unbounded" />
-					//                </sequence>
-					//            </complexType>
-					if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') {
-						$this->xdebug('arrayType for unusual array is ' . $attrs['type']);
-						$this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type'];
-					}
-					$this->currentElement = $attrs['name'];
-					$ename = $attrs['name'];
-				} elseif(isset($attrs['ref'])){
-					$this->xdebug("processing element as ref to ".$attrs['ref']);
-					$this->currentElement = "ref to ".$attrs['ref'];
-					$ename = $this->getLocalPart($attrs['ref']);
-				} else {
-					$type = $this->CreateTypeName($this->currentComplexType . '_' . $attrs['name']);
-					$this->xdebug("processing untyped element " . $attrs['name'] . ' type ' . $type);
-					$this->currentElement = $attrs['name'];
-					$attrs['type'] = $this->schemaTargetNamespace . ':' . $type;
-					$ename = $attrs['name'];
-				}
-				if (isset($ename) && $this->currentComplexType) {
-					$this->xdebug("add element $ename to complexType $this->currentComplexType");
-					$this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs;
-				} elseif (!isset($attrs['ref'])) {
-					$this->xdebug("add element $ename to elements array");
-					$this->elements[ $attrs['name'] ] = $attrs;
-					$this->elements[ $attrs['name'] ]['typeClass'] = 'element';
-				}
-			break;
-			case 'enumeration':	//	restriction value list member
-				$this->xdebug('enumeration ' . $attrs['value']);
-				if ($this->currentSimpleType) {
-					$this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value'];
-				} elseif ($this->currentComplexType) {
-					$this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value'];
-				}
-			break;
-			case 'extension':	// simpleContent or complexContent type extension
-				$this->xdebug('extension ' . $attrs['base']);
-				if ($this->currentComplexType) {
-					$ns = $this->getPrefix($attrs['base']);
-					if ($ns == '') {
-						$this->complexTypes[$this->currentComplexType]['extensionBase'] = $this->schemaTargetNamespace . ':' . $attrs['base'];
-					} else {
-						$this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base'];
-					}
-				} else {
-					$this->xdebug('no current complexType to set extensionBase');
-				}
-			break;
-			case 'import':
-			    if (isset($attrs['schemaLocation'])) {
-					$this->xdebug('import namespace ' . $attrs['namespace'] . ' from ' . $attrs['schemaLocation']);
-                    $this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false);
-				} else {
-					$this->xdebug('import namespace ' . $attrs['namespace']);
-                    $this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true);
-					if (! $this->getPrefixFromNamespace($attrs['namespace'])) {
-						$this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace'];
-					}
-				}
-			break;
-			case 'include':
-			    if (isset($attrs['schemaLocation'])) {
-					$this->xdebug('include into namespace ' . $this->schemaTargetNamespace . ' from ' . $attrs['schemaLocation']);
-                    $this->imports[$this->schemaTargetNamespace][] = array('location' => $attrs['schemaLocation'], 'loaded' => false);
-				} else {
-					$this->xdebug('ignoring invalid XML Schema construct: include without schemaLocation attribute');
-				}
-			break;
-			case 'list':	// simpleType value list
-				$this->xdebug("do nothing for element $name");
-			break;
-			case 'restriction':	// simpleType, simpleContent or complexContent value restriction
-				$this->xdebug('restriction ' . $attrs['base']);
-				if($this->currentSimpleType){
-					$this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base'];
-				} elseif($this->currentComplexType){
-					$this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base'];
-					if(strstr($attrs['base'],':') == ':Array'){
-						$this->complexTypes[$this->currentComplexType]['phpType'] = 'array';
-					}
-				}
-			break;
-			case 'schema':
-				$this->schemaInfo = $attrs;
-				$this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix);
-				if (isset($attrs['targetNamespace'])) {
-					$this->schemaTargetNamespace = $attrs['targetNamespace'];
-				}
-				if (!isset($attrs['elementFormDefault'])) {
-					$this->schemaInfo['elementFormDefault'] = 'unqualified';
-				}
-				if (!isset($attrs['attributeFormDefault'])) {
-					$this->schemaInfo['attributeFormDefault'] = 'unqualified';
-				}
-			break;
-			case 'simpleContent':	// (optional) content for a complexType
-				if ($this->currentComplexType) {	// This should *always* be
-					$this->complexTypes[$this->currentComplexType]['simpleContent'] = 'true';
-				} else {
-					$this->xdebug("do nothing for element $name because there is no current complexType");
-				}
-			break;
-			case 'simpleType':
-				array_push($this->simpleTypeStack, $this->currentSimpleType);
-				if(isset($attrs['name'])){
-					$this->xdebug("processing simpleType for name " . $attrs['name']);
-					$this->currentSimpleType = $attrs['name'];
-					$this->simpleTypes[ $attrs['name'] ] = $attrs;
-					$this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType';
-					$this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar';
-				} else {
-					$name = $this->CreateTypeName($this->currentComplexType . '_' . $this->currentElement);
-					$this->xdebug('processing unnamed simpleType for element ' . $this->currentElement . ' named ' . $name);
-					$this->currentSimpleType = $name;
-					//$this->currentElement = false;
-					$this->simpleTypes[$this->currentSimpleType] = $attrs;
-					$this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar';
-				}
-			break;
-			case 'union':	// simpleType type list
-				$this->xdebug("do nothing for element $name");
-			break;
-			default:
-				$this->xdebug("do not have any logic to process element $name");
-		}
-	}
-
-	/**
-	* end-element handler
-	*
-	* @param    string $parser XML parser object
-	* @param    string $name element name
-	* @access   private
-	*/
-	function schemaEndElement($parser, $name) {
-		// bring depth down a notch
-		$this->depth--;
-		// position of current element is equal to the last value left in depth_array for my depth
-		if(isset($this->depth_array[$this->depth])){
-        	$pos = $this->depth_array[$this->depth];
-        }
-		// get element prefix
-		if ($prefix = $this->getPrefix($name)){
-			// get unqualified name
-			$name = $this->getLocalPart($name);
-		} else {
-        	$prefix = '';
-        }
-		// move on...
-		if($name == 'complexType'){
-			$this->xdebug('done processing complexType ' . ($this->currentComplexType ? $this->currentComplexType : '(unknown)'));
-			$this->xdebug($this->varDump($this->complexTypes[$this->currentComplexType]));
-			$this->currentComplexType = array_pop($this->complexTypeStack);
-			//$this->currentElement = false;
-		}
-		if($name == 'element'){
-			$this->xdebug('done processing element ' . ($this->currentElement ? $this->currentElement : '(unknown)'));
-			$this->currentElement = array_pop($this->elementStack);
-		}
-		if($name == 'simpleType'){
-			$this->xdebug('done processing simpleType ' . ($this->currentSimpleType ? $this->currentSimpleType : '(unknown)'));
-			$this->xdebug($this->varDump($this->simpleTypes[$this->currentSimpleType]));
-			$this->currentSimpleType = array_pop($this->simpleTypeStack);
-		}
-	}
-
-	/**
-	* element content handler
-	*
-	* @param    string $parser XML parser object
-	* @param    string $data element content
-	* @access   private
-	*/
-	function schemaCharacterData($parser, $data){
-		$pos = $this->depth_array[$this->depth - 1];
-		$this->message[$pos]['cdata'] .= $data;
-	}
-
-	/**
-	* serialize the schema
-	*
-	* @access   public
-	*/
-	function serializeSchema(){
-
-		$schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion);
-		$xml = '';
-		// imports
-		if (sizeof($this->imports) > 0) {
-			foreach($this->imports as $ns => $list) {
-				foreach ($list as $ii) {
-					if ($ii['location'] != '') {
-						$xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n";
-					} else {
-						$xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n";
-					}
-				}
-			} 
-		} 
-		// complex types
-		foreach($this->complexTypes as $typeName => $attrs){
-			$contentStr = '';
-			// serialize child elements
-			if(isset($attrs['elements']) && (count($attrs['elements']) > 0)){
-				foreach($attrs['elements'] as $element => $eParts){
-					if(isset($eParts['ref'])){
-						$contentStr .= "   <$schemaPrefix:element ref=\"$element\"/>\n";
-					} else {
-						$contentStr .= "   <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\"";
-						foreach ($eParts as $aName => $aValue) {
-							// handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable
-							if ($aName != 'name' && $aName != 'type') {
-								$contentStr .= " $aName=\"$aValue\"";
-							}
-						}
-						$contentStr .= "/>\n";
-					}
-				}
-				// compositor wraps elements
-				if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) {
-					$contentStr = "  <$schemaPrefix:$attrs[compositor]>\n".$contentStr."  </$schemaPrefix:$attrs[compositor]>\n";
-				}
-			}
-			// attributes
-			if(isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)){
-				foreach($attrs['attrs'] as $attr => $aParts){
-					$contentStr .= "    <$schemaPrefix:attribute";
-					foreach ($aParts as $a => $v) {
-						if ($a == 'ref' || $a == 'type') {
-							$contentStr .= " $a=\"".$this->contractQName($v).'"';
-						} elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') {
-							$this->usedNamespaces['wsdl'] = $this->namespaces['wsdl'];
-							$contentStr .= ' wsdl:arrayType="'.$this->contractQName($v).'"';
-						} else {
-							$contentStr .= " $a=\"$v\"";
-						}
-					}
-					$contentStr .= "/>\n";
-				}
-			}
-			// if restriction
-			if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != ''){
-				$contentStr = "   <$schemaPrefix:restriction base=\"".$this->contractQName($attrs['restrictionBase'])."\">\n".$contentStr."   </$schemaPrefix:restriction>\n";
-				// complex or simple content
-				if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)){
-					$contentStr = "  <$schemaPrefix:complexContent>\n".$contentStr."  </$schemaPrefix:complexContent>\n";
-				}
-			}
-			// finalize complex type
-			if($contentStr != ''){
-				$contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n".$contentStr." </$schemaPrefix:complexType>\n";
-			} else {
-				$contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n";
-			}
-			$xml .= $contentStr;
-		}
-		// simple types
-		if(isset($this->simpleTypes) && count($this->simpleTypes) > 0){
-			foreach($this->simpleTypes as $typeName => $eParts){
-				$xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n  <$schemaPrefix:restriction base=\"".$this->contractQName($eParts['type'])."\">\n";
-				if (isset($eParts['enumeration'])) {
-					foreach ($eParts['enumeration'] as $e) {
-						$xml .= "  <$schemaPrefix:enumeration value=\"$e\"/>\n";
-					}
-				}
-				$xml .= "  </$schemaPrefix:restriction>\n </$schemaPrefix:simpleType>";
-			}
-		}
-		// elements
-		if(isset($this->elements) && count($this->elements) > 0){
-			foreach($this->elements as $element => $eParts){
-				$xml .= " <$schemaPrefix:element name=\"$element\" type=\"".$this->contractQName($eParts['type'])."\"/>\n";
-			}
-		}
-		// attributes
-		if(isset($this->attributes) && count($this->attributes) > 0){
-			foreach($this->attributes as $attr => $aParts){
-				$xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"".$this->contractQName($aParts['type'])."\"\n/>";
-			}
-		}
-		// finish 'er up
-		$attr = '';
-		foreach ($this->schemaInfo as $k => $v) {
-			if ($k == 'elementFormDefault' || $k == 'attributeFormDefault') {
-				$attr .= " $k=\"$v\"";
-			}
-		}
-		$el = "<$schemaPrefix:schema$attr targetNamespace=\"$this->schemaTargetNamespace\"\n";
-		foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) {
-			$el .= " xmlns:$nsp=\"$ns\"";
-		}
-		$xml = $el . ">\n".$xml."</$schemaPrefix:schema>\n";
-		return $xml;
-	}
-
-	/**
-	* adds debug data to the clas level debug string
-	*
-	* @param    string $string debug data
-	* @access   private
-	*/
-	function xdebug($string){
-		$this->debug('<' . $this->schemaTargetNamespace . '> '.$string);
-	}
-
-    /**
-    * get the PHP type of a user defined type in the schema
-    * PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays
-    * returns false if no type exists, or not w/ the given namespace
-    * else returns a string that is either a native php type, or 'struct'
-    *
-    * @param string $type name of defined type
-    * @param string $ns namespace of type
-    * @return mixed
-    * @access public
-    * @deprecated
-    */
-	function getPHPType($type,$ns){
-		if(isset($this->typemap[$ns][$type])){
-			//print "found type '$type' and ns $ns in typemap<br>";
-			return $this->typemap[$ns][$type];
-		} elseif(isset($this->complexTypes[$type])){
-			//print "getting type '$type' and ns $ns from complexTypes array<br>";
-			return $this->complexTypes[$type]['phpType'];
-		}
-		return false;
-	}
-
-	/**
-    * returns an associative array of information about a given type
-    * returns false if no type exists by the given name
-    *
-	*	For a complexType typeDef = array(
-	*	'restrictionBase' => '',
-	*	'phpType' => '',
-	*	'compositor' => '(sequence|all)',
-	*	'elements' => array(), // refs to elements array
-	*	'attrs' => array() // refs to attributes array
-	*	... and so on (see addComplexType)
-	*	)
-	*
-	*   For simpleType or element, the array has different keys.
-    *
-    * @param string $type
-    * @return mixed
-    * @access public
-    * @see addComplexType
-    * @see addSimpleType
-    * @see addElement
-    */
-	function getTypeDef($type){
-		//$this->debug("in getTypeDef for type $type");
-		if (substr($type, -1) == '^') {
-			$is_element = 1;
-			$type = substr($type, 0, -1);
-		} else {
-			$is_element = 0;
-		}
-
-		if((! $is_element) && isset($this->complexTypes[$type])){
-			$this->xdebug("in getTypeDef, found complexType $type");
-			return $this->complexTypes[$type];
-		} elseif((! $is_element) && isset($this->simpleTypes[$type])){
-			$this->xdebug("in getTypeDef, found simpleType $type");
-			if (!isset($this->simpleTypes[$type]['phpType'])) {
-				// get info for type to tack onto the simple type
-				// TODO: can this ever really apply (i.e. what is a simpleType really?)
-				$uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1);
-				$ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':'));
-				$etype = $this->getTypeDef($uqType);
-				if ($etype) {
-					$this->xdebug("in getTypeDef, found type for simpleType $type:");
-					$this->xdebug($this->varDump($etype));
-					if (isset($etype['phpType'])) {
-						$this->simpleTypes[$type]['phpType'] = $etype['phpType'];
-					}
-					if (isset($etype['elements'])) {
-						$this->simpleTypes[$type]['elements'] = $etype['elements'];
-					}
-				}
-			}
-			return $this->simpleTypes[$type];
-		} elseif(isset($this->elements[$type])){
-			$this->xdebug("in getTypeDef, found element $type");
-			if (!isset($this->elements[$type]['phpType'])) {
-				// get info for type to tack onto the element
-				$uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1);
-				$ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':'));
-				$etype = $this->getTypeDef($uqType);
-				if ($etype) {
-					$this->xdebug("in getTypeDef, found type for element $type:");
-					$this->xdebug($this->varDump($etype));
-					if (isset($etype['phpType'])) {
-						$this->elements[$type]['phpType'] = $etype['phpType'];
-					}
-					if (isset($etype['elements'])) {
-						$this->elements[$type]['elements'] = $etype['elements'];
-					}
-					if (isset($etype['extensionBase'])) {
-						$this->elements[$type]['extensionBase'] = $etype['extensionBase'];
-					}
-				} elseif ($ns == 'http://www.w3.org/2001/XMLSchema') {
-					$this->xdebug("in getTypeDef, element $type is an XSD type");
-					$this->elements[$type]['phpType'] = 'scalar';
-				}
-			}
-			return $this->elements[$type];
-		} elseif(isset($this->attributes[$type])){
-			$this->xdebug("in getTypeDef, found attribute $type");
-			return $this->attributes[$type];
-		} elseif (preg_match('/_ContainedType$/', $type)) {
-			$this->xdebug("in getTypeDef, have an untyped element $type");
-			$typeDef['typeClass'] = 'simpleType';
-			$typeDef['phpType'] = 'scalar';
-			$typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string';
-			return $typeDef;
-		}
-		$this->xdebug("in getTypeDef, did not find $type");
-		return false;
-	}
-
-	/**
-    * returns a sample serialization of a given type, or false if no type by the given name
-    *
-    * @param string $type name of type
-    * @return mixed
-    * @access public
-    * @deprecated
-    */
-    function serializeTypeDef($type){
-    	//print "in sTD() for type $type<br>";
-	if($typeDef = $this->getTypeDef($type)){
-		$str .= '<'.$type;
-	    if(is_array($typeDef['attrs'])){
-		foreach($typeDef['attrs'] as $attName => $data){
-		    $str .= " $attName=\"{type = ".$data['type']."}\"";
-		}
-	    }
-	    $str .= " xmlns=\"".$this->schema['targetNamespace']."\"";
-	    if(count($typeDef['elements']) > 0){
-		$str .= ">";
-		foreach($typeDef['elements'] as $element => $eData){
-		    $str .= $this->serializeTypeDef($element);
-		}
-		$str .= "</$type>";
-	    } elseif($typeDef['typeClass'] == 'element') {
-		$str .= "></$type>";
-	    } else {
-		$str .= "/>";
-	    }
-			return $str;
-	}
-    	return false;
-    }
-
-    /**
-    * returns HTML form elements that allow a user
-    * to enter values for creating an instance of the given type.
-    *
-    * @param string $name name for type instance
-    * @param string $type name of type
-    * @return string
-    * @access public
-    * @deprecated
-	*/
-	function typeToForm($name,$type){
-		// get typedef
-		if($typeDef = $this->getTypeDef($type)){
-			// if struct
-			if($typeDef['phpType'] == 'struct'){
-				$buffer .= '<table>';
-				foreach($typeDef['elements'] as $child => $childDef){
-					$buffer .= "
-					<tr><td align='right'>$childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):</td>
-					<td><input type='text' name='parameters[".$name."][$childDef[name]]'></td></tr>";
-				}
-				$buffer .= '</table>';
-			// if array
-			} elseif($typeDef['phpType'] == 'array'){
-				$buffer .= '<table>';
-				for($i=0;$i < 3; $i++){
-					$buffer .= "
-					<tr><td align='right'>array item (type: $typeDef[arrayType]):</td>
-					<td><input type='text' name='parameters[".$name."][]'></td></tr>";
-				}
-				$buffer .= '</table>';
-			// if scalar
-			} else {
-				$buffer .= "<input type='text' name='parameters[$name]'>";
-			}
-		} else {
-			$buffer .= "<input type='text' name='parameters[$name]'>";
-		}
-		return $buffer;
-	}
-	
-	/**
-	* adds a complex type to the schema
-	* 
-	* example: array
-	* 
-	* addType(
-	* 	'ArrayOfstring',
-	* 	'complexType',
-	* 	'array',
-	* 	'',
-	* 	'SOAP-ENC:Array',
-	* 	array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'),
-	* 	'xsd:string'
-	* );
-	* 
-	* example: PHP associative array ( SOAP Struct )
-	* 
-	* addType(
-	* 	'SOAPStruct',
-	* 	'complexType',
-	* 	'struct',
-	* 	'all',
-	* 	array('myVar'=> array('name'=>'myVar','type'=>'string')
-	* );
-	* 
-	* @param name
-	* @param typeClass (complexType|simpleType|attribute)
-	* @param phpType: currently supported are array and struct (php assoc array)
-	* @param compositor (all|sequence|choice)
-	* @param restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
-	* @param elements = array ( name = array(name=>'',type=>'') )
-	* @param attrs = array(
-	* 	array(
-	*		'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType",
-	*		"http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]"
-	* 	)
-	* )
-	* @param arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string)
-	* @access public
-	* @see getTypeDef
-	*/
-	function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){
-		$this->complexTypes[$name] = array(
-	    'name'		=> $name,
-	    'typeClass'	=> $typeClass,
-	    'phpType'	=> $phpType,
-		'compositor'=> $compositor,
-	    'restrictionBase' => $restrictionBase,
-		'elements'	=> $elements,
-	    'attrs'		=> $attrs,
-	    'arrayType'	=> $arrayType
-		);
-		
-		$this->xdebug("addComplexType $name:");
-		$this->appendDebug($this->varDump($this->complexTypes[$name]));
-	}
-	
-	/**
-	* adds a simple type to the schema
-	*
-	* @param string $name
-	* @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
-	* @param string $typeClass (should always be simpleType)
-	* @param string $phpType (should always be scalar)
-	* @param array $enumeration array of values
-	* @access public
-	* @see nusoap_xmlschema
-	* @see getTypeDef
-	*/
-	function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) {
-		$this->simpleTypes[$name] = array(
-	    'name'			=> $name,
-	    'typeClass'		=> $typeClass,
-	    'phpType'		=> $phpType,
-	    'type'			=> $restrictionBase,
-	    'enumeration'	=> $enumeration
-		);
-		
-		$this->xdebug("addSimpleType $name:");
-		$this->appendDebug($this->varDump($this->simpleTypes[$name]));
-	}
-
-	/**
-	* adds an element to the schema
-	*
-	* @param array $attrs attributes that must include name and type
-	* @see nusoap_xmlschema
-	* @access public
-	*/
-	function addElement($attrs) {
-		if (! $this->getPrefix($attrs['type'])) {
-			$attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type'];
-		}
-		$this->elements[ $attrs['name'] ] = $attrs;
-		$this->elements[ $attrs['name'] ]['typeClass'] = 'element';
-		
-		$this->xdebug("addElement " . $attrs['name']);
-		$this->appendDebug($this->varDump($this->elements[ $attrs['name'] ]));
-	}
-}
-
-/**
- * Backward compatibility
- */
-class XMLSchema extends nusoap_xmlschema {
-}
-
-?><?php
-
-
-
-/**
-* For creating serializable abstractions of native PHP types.  This class
-* allows element name/namespace, XSD type, and XML attributes to be
-* associated with a value.  This is extremely useful when WSDL is not
-* used, but is also useful when WSDL is used with polymorphic types, including
-* xsd:anyType and user-defined types.
-*
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access   public
-*/
-class soapval extends nusoap_base {
-	/**
-	 * The XML element name
-	 *
-	 * @var string
-	 * @access private
-	 */
-	var $name;
-	/**
-	 * The XML type name (string or false)
-	 *
-	 * @var mixed
-	 * @access private
-	 */
-	var $type;
-	/**
-	 * The PHP value
-	 *
-	 * @var mixed
-	 * @access private
-	 */
-	var $value;
-	/**
-	 * The XML element namespace (string or false)
-	 *
-	 * @var mixed
-	 * @access private
-	 */
-	var $element_ns;
-	/**
-	 * The XML type namespace (string or false)
-	 *
-	 * @var mixed
-	 * @access private
-	 */
-	var $type_ns;
-	/**
-	 * The XML element attributes (array or false)
-	 *
-	 * @var mixed
-	 * @access private
-	 */
-	var $attributes;
-
-	/**
-	* constructor
-	*
-	* @param    string $name optional name
-	* @param    mixed $type optional type name
-	* @param	mixed $value optional value
-	* @param	mixed $element_ns optional namespace of value
-	* @param	mixed $type_ns optional namespace of type
-	* @param	mixed $attributes associative array of attributes to add to element serialization
-	* @access   public
-	*/
-  	function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) {
-		parent::nusoap_base();
-		$this->name = $name;
-		$this->type = $type;
-		$this->value = $value;
-		$this->element_ns = $element_ns;
-		$this->type_ns = $type_ns;
-		$this->attributes = $attributes;
-    }
-
-	/**
-	* return serialized value
-	*
-	* @param	string $use The WSDL use value (encoded|literal)
-	* @return	string XML data
-	* @access   public
-	*/
-	function serialize($use='encoded') {
-		return $this->serialize_val($this->value, $this->name, $this->type, $this->element_ns, $this->type_ns, $this->attributes, $use, true);
-    }
-
-	/**
-	* decodes a soapval object into a PHP native type
-	*
-	* @return	mixed
-	* @access   public
-	*/
-	function decode(){
-		return $this->value;
-	}
-}
-
-
-
-?><?php
-
-
-
-/**
-* transport class for sending/receiving data via HTTP and HTTPS
-* NOTE: PHP must be compiled with the CURL extension for HTTPS support
-*
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @author   Scott Nichol <snichol at users.sourceforge.net>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access public
-*/
-class soap_transport_http extends nusoap_base {
-
-	var $url = '';
-	var $uri = '';
-	var $digest_uri = '';
-	var $scheme = '';
-	var $host = '';
-	var $port = '';
-	var $path = '';
-	var $request_method = 'POST';
-	var $protocol_version = '1.0';
-	var $encoding = '';
-	var $outgoing_headers = array();
-	var $incoming_headers = array();
-	var $incoming_cookies = array();
-	var $outgoing_payload = '';
-	var $incoming_payload = '';
-	var $response_status_line;	// HTTP response status line
-	var $useSOAPAction = true;
-	var $persistentConnection = false;
-	var $ch = false;	// cURL handle
-	var $ch_options = array();	// cURL custom options
-	var $use_curl = false;		// force cURL use
-	var $proxy = null;			// proxy information (associative array)
-	var $username = '';
-	var $password = '';
-	var $authtype = '';
-	var $digestRequest = array();
-	var $certRequest = array();	// keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional)
-								// cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem'
-								// sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem'
-								// sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem'
-								// passphrase: SSL key password/passphrase
-								// certpassword: SSL certificate password
-								// verifypeer: default is 1
-								// verifyhost: default is 1
-
-	/**
-	* constructor
-	*
-	* @param string $url The URL to which to connect
-	* @param array $curl_options User-specified cURL options
-	* @param boolean $use_curl Whether to try to force cURL use
-	* @access public
-	*/
-	function soap_transport_http($url, $curl_options = NULL, $use_curl = false){
-		parent::nusoap_base();
-		$this->debug("ctor url=$url use_curl=$use_curl curl_options:");
-		$this->appendDebug($this->varDump($curl_options));
-		$this->setURL($url);
-		if (is_array($curl_options)) {
-			$this->ch_options = $curl_options;
-		}
-		$this->use_curl = $use_curl;
-		preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev);
-		$this->setHeader('User-Agent', $this->title.'/'.$this->version.' ('.$rev[1].')');
-	}
-
-	/**
-	* sets a cURL option
-	*
-	* @param	mixed $option The cURL option (always integer?)
-	* @param	mixed $value The cURL option value
-	* @access   private
-	*/
-	function setCurlOption($option, $value) {
-		$this->debug("setCurlOption option=$option, value=");
-		$this->appendDebug($this->varDump($value));
-		curl_setopt($this->ch, $option, $value);
-	}
-
-	/**
-	* sets an HTTP header
-	*
-	* @param string $name The name of the header
-	* @param string $value The value of the header
-	* @access private
-	*/
-	function setHeader($name, $value) {
-		$this->outgoing_headers[$name] = $value;
-		$this->debug("set header $name: $value");
-	}
-
-	/**
-	* unsets an HTTP header
-	*
-	* @param string $name The name of the header
-	* @access private
-	*/
-	function unsetHeader($name) {
-		if (isset($this->outgoing_headers[$name])) {
-			$this->debug("unset header $name");
-			unset($this->outgoing_headers[$name]);
-		}
-	}
-
-	/**
-	* sets the URL to which to connect
-	*
-	* @param string $url The URL to which to connect
-	* @access private
-	*/
-	function setURL($url) {
-		$this->url = $url;
-
-		$u = parse_url($url);
-		foreach($u as $k => $v){
-			$this->debug("parsed URL $k = $v");
-			$this->$k = $v;
-		}
-		
-		// add any GET params to path
-		if(isset($u['query']) && $u['query'] != ''){
-            $this->path .= '?' . $u['query'];
-		}
-		
-		// set default port
-		if(!isset($u['port'])){
-			if($u['scheme'] == 'https'){
-				$this->port = 443;
-			} else {
-				$this->port = 80;
-			}
-		}
-		
-		$this->uri = $this->path;
-		$this->digest_uri = $this->uri;
-		
-		// build headers
-		if (!isset($u['port'])) {
-			$this->setHeader('Host', $this->host);
-		} else {
-			$this->setHeader('Host', $this->host.':'.$this->port);
-		}
-
-		if (isset($u['user']) && $u['user'] != '') {
-			$this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : '');
-		}
-	}
-
-	/**
-	* gets the I/O method to use
-	*
-	* @return	string	I/O method to use (socket|curl|unknown)
-	* @access	private
-	*/
-	function io_method() {
-		if ($this->use_curl || ($this->scheme == 'https') || ($this->scheme == 'http' && $this->authtype == 'ntlm') || ($this->scheme == 'http' && is_array($this->proxy) && $this->proxy['authtype'] == 'ntlm'))
-			return 'curl';
-		if (($this->scheme == 'http' || $this->scheme == 'ssl') && $this->authtype != 'ntlm' && (!is_array($this->proxy) || $this->proxy['authtype'] != 'ntlm'))
-			return 'socket';
-		return 'unknown';
-	}
-
-	/**
-	* establish an HTTP connection
-	*
-	* @param    integer $timeout set connection timeout in seconds
-	* @param	integer $response_timeout set response timeout in seconds
-	* @return	boolean true if connected, false if not
-	* @access   private
-	*/
-	function connect($connection_timeout=0,$response_timeout=30){
-	  	// For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like
-	  	// "regular" socket.
-	  	// TODO: disabled for now because OpenSSL must be *compiled* in (not just
-	  	//       loaded), and until PHP5 stream_get_wrappers is not available.
-//	  	if ($this->scheme == 'https') {
-//		  	if (version_compare(phpversion(), '4.3.0') >= 0) {
-//		  		if (extension_loaded('openssl')) {
-//		  			$this->scheme = 'ssl';
-//		  			$this->debug('Using SSL over OpenSSL');
-//		  		}
-//		  	}
-//		}
-		$this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port");
-	  if ($this->io_method() == 'socket') {
-		if (!is_array($this->proxy)) {
-			$host = $this->host;
-			$port = $this->port;
-		} else {
-			$host = $this->proxy['host'];
-			$port = $this->proxy['port'];
-		}
-
-		// use persistent connection
-		if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){
-			if (!feof($this->fp)) {
-				$this->debug('Re-use persistent connection');
-				return true;
-			}
-			fclose($this->fp);
-			$this->debug('Closed persistent connection at EOF');
-		}
-
-		// munge host if using OpenSSL
-		if ($this->scheme == 'ssl') {
-			$host = 'ssl://' . $host;
-		}
-		$this->debug('calling fsockopen with host ' . $host . ' connection_timeout ' . $connection_timeout);
-
-		// open socket
-		if($connection_timeout > 0){
-			$this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout);
-		} else {
-			$this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str);
-		}
-		
-		// test pointer
-		if(!$this->fp) {
-			$msg = 'Couldn\'t open socket connection to server ' . $this->url;
-			if ($this->errno) {
-				$msg .= ', Error ('.$this->errno.'): '.$this->error_str;
-			} else {
-				$msg .= ' prior to connect().  This is often a problem looking up the host name.';
-			}
-			$this->debug($msg);
-			$this->setError($msg);
-			return false;
-		}
-		
-		// set response timeout
-		$this->debug('set response timeout to ' . $response_timeout);
-		socket_set_timeout( $this->fp, $response_timeout);
-
-		$this->debug('socket connected');
-		return true;
-	  } else if ($this->io_method() == 'curl') {
-		if (!extension_loaded('curl')) {
-//			$this->setError('cURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS');
-			$this->setError('The PHP cURL Extension is required for HTTPS or NLTM.  You will need to re-build or update your PHP to include cURL or change php.ini to load the PHP cURL extension.');
-			return false;
-		}
-		// Avoid warnings when PHP does not have these options
-		if (defined('CURLOPT_CONNECTIONTIMEOUT'))
-			$CURLOPT_CONNECTIONTIMEOUT = CURLOPT_CONNECTIONTIMEOUT;
-		else
-			$CURLOPT_CONNECTIONTIMEOUT = 78;
-		if (defined('CURLOPT_HTTPAUTH'))
-			$CURLOPT_HTTPAUTH = CURLOPT_HTTPAUTH;
-		else
-			$CURLOPT_HTTPAUTH = 107;
-		if (defined('CURLOPT_PROXYAUTH'))
-			$CURLOPT_PROXYAUTH = CURLOPT_PROXYAUTH;
-		else
-			$CURLOPT_PROXYAUTH = 111;
-		if (defined('CURLAUTH_BASIC'))
-			$CURLAUTH_BASIC = CURLAUTH_BASIC;
-		else
-			$CURLAUTH_BASIC = 1;
-		if (defined('CURLAUTH_DIGEST'))
-			$CURLAUTH_DIGEST = CURLAUTH_DIGEST;
-		else
-			$CURLAUTH_DIGEST = 2;
-		if (defined('CURLAUTH_NTLM'))
-			$CURLAUTH_NTLM = CURLAUTH_NTLM;
-		else
-			$CURLAUTH_NTLM = 8;
-
-		$this->debug('connect using cURL');
-		// init CURL
-		$this->ch = curl_init();
-		// set url
-		$hostURL = ($this->port != '') ? "$this->scheme://$this->host:$this->port" : "$this->scheme://$this->host";
-		// add path
-		$hostURL .= $this->path;
-		$this->setCurlOption(CURLOPT_URL, $hostURL);
-		// follow location headers (re-directs)
-		if (ini_get('safe_mode') || ini_get('open_basedir')) {
-			$this->debug('safe_mode or open_basedir set, so do not set CURLOPT_FOLLOWLOCATION');
-			$this->debug('safe_mode = ');
-			$this->appendDebug($this->varDump(ini_get('safe_mode')));
-			$this->debug('open_basedir = ');
-			$this->appendDebug($this->varDump(ini_get('open_basedir')));
-		} else {
-			$this->setCurlOption(CURLOPT_FOLLOWLOCATION, 1);
-		}
-		// ask for headers in the response output
-		$this->setCurlOption(CURLOPT_HEADER, 1);
-		// ask for the response output as the return value
-		$this->setCurlOption(CURLOPT_RETURNTRANSFER, 1);
-		// encode
-		// We manage this ourselves through headers and encoding
-//		if(function_exists('gzuncompress')){
-//			$this->setCurlOption(CURLOPT_ENCODING, 'deflate');
-//		}
-		// persistent connection
-		if ($this->persistentConnection) {
-			// I believe the following comment is now bogus, having applied to
-			// the code when it used CURLOPT_CUSTOMREQUEST to send the request.
-			// The way we send data, we cannot use persistent connections, since
-			// there will be some "junk" at the end of our request.
-			//$this->setCurlOption(CURL_HTTP_VERSION_1_1, true);
-			$this->persistentConnection = false;
-			$this->setHeader('Connection', 'close');
-		}
-		// set timeouts
-		if ($connection_timeout != 0) {
-			$this->setCurlOption($CURLOPT_CONNECTIONTIMEOUT, $connection_timeout);
-		}
-		if ($response_timeout != 0) {
-			$this->setCurlOption(CURLOPT_TIMEOUT, $response_timeout);
-		}
-
-		if ($this->scheme == 'https') {
-			$this->debug('set cURL SSL verify options');
-			// recent versions of cURL turn on peer/host checking by default,
-			// while PHP binaries are not compiled with a default location for the
-			// CA cert bundle, so disable peer/host checking.
-			//$this->setCurlOption(CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt');		
-			$this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 0);
-			$this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 0);
-	
-			// support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo)
-			if ($this->authtype == 'certificate') {
-				$this->debug('set cURL certificate options');
-				if (isset($this->certRequest['cainfofile'])) {
-					$this->setCurlOption(CURLOPT_CAINFO, $this->certRequest['cainfofile']);
-				}
-				if (isset($this->certRequest['verifypeer'])) {
-					$this->setCurlOption(CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']);
-				} else {
-					$this->setCurlOption(CURLOPT_SSL_VERIFYPEER, 1);
-				}
-				if (isset($this->certRequest['verifyhost'])) {
-					$this->setCurlOption(CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']);
-				} else {
-					$this->setCurlOption(CURLOPT_SSL_VERIFYHOST, 1);
-				}
-				if (isset($this->certRequest['sslcertfile'])) {
-					$this->setCurlOption(CURLOPT_SSLCERT, $this->certRequest['sslcertfile']);
-				}
-				if (isset($this->certRequest['sslkeyfile'])) {
-					$this->setCurlOption(CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']);
-				}
-				if (isset($this->certRequest['passphrase'])) {
-					$this->setCurlOption(CURLOPT_SSLKEYPASSWD, $this->certRequest['passphrase']);
-				}
-				if (isset($this->certRequest['certpassword'])) {
-					$this->setCurlOption(CURLOPT_SSLCERTPASSWD, $this->certRequest['certpassword']);
-				}
-			}
-		}
-		if ($this->authtype && ($this->authtype != 'certificate')) {
-			if ($this->username) {
-				$this->debug('set cURL username/password');
-				$this->setCurlOption(CURLOPT_USERPWD, "$this->username:$this->password");
-			}
-			if ($this->authtype == 'basic') {
-				$this->debug('set cURL for Basic authentication');
-				$this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_BASIC);
-			}
-			if ($this->authtype == 'digest') {
-				$this->debug('set cURL for digest authentication');
-				$this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_DIGEST);
-			}
-			if ($this->authtype == 'ntlm') {
-				$this->debug('set cURL for NTLM authentication');
-				$this->setCurlOption($CURLOPT_HTTPAUTH, $CURLAUTH_NTLM);
-			}
-		}
-		if (is_array($this->proxy)) {
-			$this->debug('set cURL proxy options');
-			if ($this->proxy['port'] != '') {
-				$this->setCurlOption(CURLOPT_PROXY, $this->proxy['host'].':'.$this->proxy['port']);
-			} else {
-				$this->setCurlOption(CURLOPT_PROXY, $this->proxy['host']);
-			}
-			if ($this->proxy['username'] || $this->proxy['password']) {
-				$this->debug('set cURL proxy authentication options');
-				$this->setCurlOption(CURLOPT_PROXYUSERPWD, $this->proxy['username'].':'.$this->proxy['password']);
-				if ($this->proxy['authtype'] == 'basic') {
-					$this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_BASIC);
-				}
-				if ($this->proxy['authtype'] == 'ntlm') {
-					$this->setCurlOption($CURLOPT_PROXYAUTH, $CURLAUTH_NTLM);
-				}
-			}
-		}
-		$this->debug('cURL connection set up');
-		return true;
-	  } else {
-		$this->setError('Unknown scheme ' . $this->scheme);
-		$this->debug('Unknown scheme ' . $this->scheme);
-		return false;
-	  }
-	}
-
-	/**
-	* sends the SOAP request and gets the SOAP response via HTTP[S]
-	*
-	* @param    string $data message data
-	* @param    integer $timeout set connection timeout in seconds
-	* @param	integer $response_timeout set response timeout in seconds
-	* @param	array $cookies cookies to send
-	* @return	string data
-	* @access   public
-	*/
-	function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) {
-		
-		$this->debug('entered send() with data of length: '.strlen($data));
-
-		$this->tryagain = true;
-		$tries = 0;
-		while ($this->tryagain) {
-			$this->tryagain = false;
-			if ($tries++ < 2) {
-				// make connnection
-				if (!$this->connect($timeout, $response_timeout)){
-					return false;
-				}
-				
-				// send request
-				if (!$this->sendRequest($data, $cookies)){
-					return false;
-				}
-				
-				// get response
-				$respdata = $this->getResponse();
-			} else {
-				$this->setError("Too many tries to get an OK response ($this->response_status_line)");
-			}
-		}		
-		$this->debug('end of send()');
-		return $respdata;
-	}
-
-
-	/**
-	* sends the SOAP request and gets the SOAP response via HTTPS using CURL
-	*
-	* @param    string $data message data
-	* @param    integer $timeout set connection timeout in seconds
-	* @param	integer $response_timeout set response timeout in seconds
-	* @param	array $cookies cookies to send
-	* @return	string data
-	* @access   public
-	* @deprecated
-	*/
-	function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) {
-		return $this->send($data, $timeout, $response_timeout, $cookies);
-	}
-	
-	/**
-	* if authenticating, set user credentials here
-	*
-	* @param    string $username
-	* @param    string $password
-	* @param	string $authtype (basic|digest|certificate|ntlm)
-	* @param	array $digestRequest (keys must be nonce, nc, realm, qop)
-	* @param	array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)
-	* @access   public
-	*/
-	function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) {
-		$this->debug("setCredentials username=$username authtype=$authtype digestRequest=");
-		$this->appendDebug($this->varDump($digestRequest));
-		$this->debug("certRequest=");
-		$this->appendDebug($this->varDump($certRequest));
-		// cf. RFC 2617
-		if ($authtype == 'basic') {
-			$this->setHeader('Authorization', 'Basic '.base64_encode(str_replace(':','',$username).':'.$password));
-		} elseif ($authtype == 'digest') {
-			if (isset($digestRequest['nonce'])) {
-				$digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1;
-				
-				// calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html)
-	
-				// A1 = unq(username-value) ":" unq(realm-value) ":" passwd
-				$A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password;
-	
-				// H(A1) = MD5(A1)
-				$HA1 = md5($A1);
-	
-				// A2 = Method ":" digest-uri-value
-				$A2 = $this->request_method . ':' . $this->digest_uri;
-	
-				// H(A2)
-				$HA2 =  md5($A2);
-	
-				// KD(secret, data) = H(concat(secret, ":", data))
-				// if qop == auth:
-				// request-digest  = <"> < KD ( H(A1),     unq(nonce-value)
-				//                              ":" nc-value
-				//                              ":" unq(cnonce-value)
-				//                              ":" unq(qop-value)
-				//                              ":" H(A2)
-				//                            ) <">
-				// if qop is missing,
-				// request-digest  = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <">
-	
-				$unhashedDigest = '';
-				$nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : '';
-				$cnonce = $nonce;
-				if ($digestRequest['qop'] != '') {
-					$unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2;
-				} else {
-					$unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2;
-				}
-	
-				$hashedDigest = md5($unhashedDigest);
-	
-				$opaque = '';	
-				if (isset($digestRequest['opaque'])) {
-					$opaque = ', opaque="' . $digestRequest['opaque'] . '"';
-				}
-
-				$this->setHeader('Authorization', 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . $opaque . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"');
-			}
-		} elseif ($authtype == 'certificate') {
-			$this->certRequest = $certRequest;
-			$this->debug('Authorization header not set for certificate');
-		} elseif ($authtype == 'ntlm') {
-			// do nothing
-			$this->debug('Authorization header not set for ntlm');
-		}
-		$this->username = $username;
-		$this->password = $password;
-		$this->authtype = $authtype;
-		$this->digestRequest = $digestRequest;
-	}
-	
-	/**
-	* set the soapaction value
-	*
-	* @param    string $soapaction
-	* @access   public
-	*/
-	function setSOAPAction($soapaction) {
-		$this->setHeader('SOAPAction', '"' . $soapaction . '"');
-	}
-	
-	/**
-	* use http encoding
-	*
-	* @param    string $enc encoding style. supported values: gzip, deflate, or both
-	* @access   public
-	*/
-	function setEncoding($enc='gzip, deflate') {
-		if (function_exists('gzdeflate')) {
-			$this->protocol_version = '1.1';
-			$this->setHeader('Accept-Encoding', $enc);
-			if (!isset($this->outgoing_headers['Connection'])) {
-				$this->setHeader('Connection', 'close');
-				$this->persistentConnection = false;
-			}
-			// deprecated as of PHP 5.3.0
-			//set_magic_quotes_runtime(0);
-			$this->encoding = $enc;
-		}
-	}
-	
-	/**
-	* set proxy info here
-	*
-	* @param    string $proxyhost use an empty string to remove proxy
-	* @param    string $proxyport
-	* @param	string $proxyusername
-	* @param	string $proxypassword
-	* @param	string $proxyauthtype (basic|ntlm)
-	* @access   public
-	*/
-	function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '', $proxyauthtype = 'basic') {
-		if ($proxyhost) {
-			$this->proxy = array(
-				'host' => $proxyhost,
-				'port' => $proxyport,
-				'username' => $proxyusername,
-				'password' => $proxypassword,
-				'authtype' => $proxyauthtype
-			);
-			if ($proxyusername != '' && $proxypassword != '' && $proxyauthtype = 'basic') {
-				$this->setHeader('Proxy-Authorization', ' Basic '.base64_encode($proxyusername.':'.$proxypassword));
-			}
-		} else {
-			$this->debug('remove proxy');
-			$proxy = null;
-			unsetHeader('Proxy-Authorization');
-		}
-	}
-	
-
-	/**
-	 * Test if the given string starts with a header that is to be skipped.
-	 * Skippable headers result from chunked transfer and proxy requests.
-	 *
-	 * @param	string $data The string to check.
-	 * @returns	boolean	Whether a skippable header was found.
-	 * @access	private
-	 */
-	function isSkippableCurlHeader(&$data) {
-		$skipHeaders = array(	'HTTP/1.1 100',
-								'HTTP/1.0 301',
-								'HTTP/1.1 301',
-								'HTTP/1.0 302',
-								'HTTP/1.1 302',
-								'HTTP/1.0 401',
-								'HTTP/1.1 401',
-								'HTTP/1.0 200 Connection established');
-		foreach ($skipHeaders as $hd) {
-			$prefix = substr($data, 0, strlen($hd));
-			if ($prefix == $hd) return true;
-		}
-
-		return false;
-	}
-
-	/**
-	* decode a string that is encoded w/ "chunked' transfer encoding
- 	* as defined in RFC2068 19.4.6
-	*
-	* @param    string $buffer
-	* @param    string $lb
-	* @returns	string
-	* @access   public
-	* @deprecated
-	*/
-	function decodeChunked($buffer, $lb){
-		// length := 0
-		$length = 0;
-		$new = '';
-		
-		// read chunk-size, chunk-extension (if any) and CRLF
-		// get the position of the linebreak
-		$chunkend = strpos($buffer, $lb);
-		if ($chunkend == FALSE) {
-			$this->debug('no linebreak found in decodeChunked');
-			return $new;
-		}
-		$temp = substr($buffer,0,$chunkend);
-		$chunk_size = hexdec( trim($temp) );
-		$chunkstart = $chunkend + strlen($lb);
-		// while (chunk-size > 0) {
-		while ($chunk_size > 0) {
-			$this->debug("chunkstart: $chunkstart chunk_size: $chunk_size");
-			$chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size);
-		  	
-			// Just in case we got a broken connection
-		  	if ($chunkend == FALSE) {
-		  	    $chunk = substr($buffer,$chunkstart);
-				// append chunk-data to entity-body
-		    	$new .= $chunk;
-		  	    $length += strlen($chunk);
-		  	    break;
-			}
-			
-		  	// read chunk-data and CRLF
-		  	$chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart);
-		  	// append chunk-data to entity-body
-		  	$new .= $chunk;
-		  	// length := length + chunk-size
-		  	$length += strlen($chunk);
-		  	// read chunk-size and CRLF
-		  	$chunkstart = $chunkend + strlen($lb);
-			
-		  	$chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb);
-			if ($chunkend == FALSE) {
-				break; //Just in case we got a broken connection
-			}
-			$temp = substr($buffer,$chunkstart,$chunkend-$chunkstart);
-			$chunk_size = hexdec( trim($temp) );
-			$chunkstart = $chunkend;
-		}
-		return $new;
-	}
-	
-	/**
-	 * Writes the payload, including HTTP headers, to $this->outgoing_payload.
-	 *
-	 * @param	string $data HTTP body
-	 * @param	string $cookie_str data for HTTP Cookie header
-	 * @return	void
-	 * @access	private
-	 */
-	function buildPayload($data, $cookie_str = '') {
-		// Note: for cURL connections, $this->outgoing_payload is ignored,
-		// as is the Content-Length header, but these are still created as
-		// debugging guides.
-
-		// add content-length header
-		if ($this->request_method != 'GET') {
-			$this->setHeader('Content-Length', strlen($data));
-		}
-
-		// start building outgoing payload:
-		if ($this->proxy) {
-			$uri = $this->url;
-		} else {
-			$uri = $this->uri;
-		}
-		$req = "$this->request_method $uri HTTP/$this->protocol_version";
-		$this->debug("HTTP request: $req");
-		$this->outgoing_payload = "$req\r\n";
-
-		// loop thru headers, serializing
-		foreach($this->outgoing_headers as $k => $v){
-			$hdr = $k.': '.$v;
-			$this->debug("HTTP header: $hdr");
-			$this->outgoing_payload .= "$hdr\r\n";
-		}
-
-		// add any cookies
-		if ($cookie_str != '') {
-			$hdr = 'Cookie: '.$cookie_str;
-			$this->debug("HTTP header: $hdr");
-			$this->outgoing_payload .= "$hdr\r\n";
-		}
-
-		// header/body separator
-		$this->outgoing_payload .= "\r\n";
-		
-		// add data
-		$this->outgoing_payload .= $data;
-	}
-
-	/**
-	* sends the SOAP request via HTTP[S]
-	*
-	* @param    string $data message data
-	* @param	array $cookies cookies to send
-	* @return	boolean	true if OK, false if problem
-	* @access   private
-	*/
-	function sendRequest($data, $cookies = NULL) {
-		// build cookie string
-		$cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https')));
-
-		// build payload
-		$this->buildPayload($data, $cookie_str);
-
-	  if ($this->io_method() == 'socket') {
-		// send payload
-		if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) {
-			$this->setError('couldn\'t write message data to socket');
-			$this->debug('couldn\'t write message data to socket');
-			return false;
-		}
-		$this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload));
-		return true;
-	  } else if ($this->io_method() == 'curl') {
-		// set payload
-		// cURL does say this should only be the verb, and in fact it
-		// turns out that the URI and HTTP version are appended to this, which
-		// some servers refuse to work with (so we no longer use this method!)
-		//$this->setCurlOption(CURLOPT_CUSTOMREQUEST, $this->outgoing_payload);
-		$curl_headers = array();
-		foreach($this->outgoing_headers as $k => $v){
-			if ($k == 'Connection' || $k == 'Content-Length' || $k == 'Host' || $k == 'Authorization' || $k == 'Proxy-Authorization') {
-				$this->debug("Skip cURL header $k: $v");
-			} else {
-				$curl_headers[] = "$k: $v";
-			}
-		}
-		if ($cookie_str != '') {
-			$curl_headers[] = 'Cookie: ' . $cookie_str;
-		}
-		$this->setCurlOption(CURLOPT_HTTPHEADER, $curl_headers);
-		$this->debug('set cURL HTTP headers');
-		if ($this->request_method == "POST") {
-	  		$this->setCurlOption(CURLOPT_POST, 1);
-	  		$this->setCurlOption(CURLOPT_POSTFIELDS, $data);
-			$this->debug('set cURL POST data');
-	  	} else {
-	  	}
-		// insert custom user-set cURL options
-		foreach ($this->ch_options as $key => $val) {
-			$this->setCurlOption($key, $val);
-		}
-
-		$this->debug('set cURL payload');
-		return true;
-	  }
-	}
-
-	/**
-	* gets the SOAP response via HTTP[S]
-	*
-	* @return	string the response (also sets member variables like incoming_payload)
-	* @access   private
-	*/
-	function getResponse(){
-		$this->incoming_payload = '';
-	    
-	  if ($this->io_method() == 'socket') {
-	    // loop until headers have been retrieved
-	    $data = '';
-	    while (!isset($lb)){
-
-			// We might EOF during header read.
-			if(feof($this->fp)) {
-				$this->incoming_payload = $data;
-				$this->debug('found no headers before EOF after length ' . strlen($data));
-				$this->debug("received before EOF:\n" . $data);
-				$this->setError('server failed to send headers');
-				return false;
-			}
-
-			$tmp = fgets($this->fp, 256);
-			$tmplen = strlen($tmp);
-			$this->debug("read line of $tmplen bytes: " . trim($tmp));
-
-			if ($tmplen == 0) {
-				$this->incoming_payload = $data;
-				$this->debug('socket read of headers timed out after length ' . strlen($data));
-				$this->debug("read before timeout: " . $data);
-				$this->setError('socket read of headers timed out');
-				return false;
-			}
-
-			$data .= $tmp;
-			$pos = strpos($data,"\r\n\r\n");
-			if($pos > 1){
-				$lb = "\r\n";
-			} else {
-				$pos = strpos($data,"\n\n");
-				if($pos > 1){
-					$lb = "\n";
-				}
-			}
-			// remove 100 headers
-			if (isset($lb) && preg_match('/^HTTP\/1.1 100/',$data)) {
-				unset($lb);
-				$data = '';
-			}//
-		}
-		// store header data
-		$this->incoming_payload .= $data;
-		$this->debug('found end of headers after length ' . strlen($data));
-		// process headers
-		$header_data = trim(substr($data,0,$pos));
-		$header_array = explode($lb,$header_data);
-		$this->incoming_headers = array();
-		$this->incoming_cookies = array();
-		foreach($header_array as $header_line){
-			$arr = explode(':',$header_line, 2);
-			if(count($arr) > 1){
-				$header_name = strtolower(trim($arr[0]));
-				$this->incoming_headers[$header_name] = trim($arr[1]);
-				if ($header_name == 'set-cookie') {
-					// TODO: allow multiple cookies from parseCookie
-					$cookie = $this->parseCookie(trim($arr[1]));
-					if ($cookie) {
-						$this->incoming_cookies[] = $cookie;
-						$this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']);
-					} else {
-						$this->debug('did not find cookie in ' . trim($arr[1]));
-					}
-    			}
-			} else if (isset($header_name)) {
-				// append continuation line to previous header
-				$this->incoming_headers[$header_name] .= $lb . ' ' . $header_line;
-			}
-		}
-		
-		// loop until msg has been received
-		if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') {
-			$content_length =  2147483647;	// ignore any content-length header
-			$chunked = true;
-			$this->debug("want to read chunked content");
-		} elseif (isset($this->incoming_headers['content-length'])) {
-			$content_length = $this->incoming_headers['content-length'];
-			$chunked = false;
-			$this->debug("want to read content of length $content_length");
-		} else {
-			$content_length =  2147483647;
-			$chunked = false;
-			$this->debug("want to read content to EOF");
-		}
-		$data = '';
-		do {
-			if ($chunked) {
-				$tmp = fgets($this->fp, 256);
-				$tmplen = strlen($tmp);
-				$this->debug("read chunk line of $tmplen bytes");
-				if ($tmplen == 0) {
-					$this->incoming_payload = $data;
-					$this->debug('socket read of chunk length timed out after length ' . strlen($data));
-					$this->debug("read before timeout:\n" . $data);
-					$this->setError('socket read of chunk length timed out');
-					return false;
-				}
-				$content_length = hexdec(trim($tmp));
-				$this->debug("chunk length $content_length");
-			}
-			$strlen = 0;
-		    while (($strlen < $content_length) && (!feof($this->fp))) {
-		    	$readlen = min(8192, $content_length - $strlen);
-				$tmp = fread($this->fp, $readlen);
-				$tmplen = strlen($tmp);
-				$this->debug("read buffer of $tmplen bytes");
-				if (($tmplen == 0) && (!feof($this->fp))) {
-					$this->incoming_payload = $data;
-					$this->debug('socket read of body timed out after length ' . strlen($data));
-					$this->debug("read before timeout:\n" . $data);
-					$this->setError('socket read of body timed out');
-					return false;
-				}
-				$strlen += $tmplen;
-				$data .= $tmp;
-			}
-			if ($chunked && ($content_length > 0)) {
-				$tmp = fgets($this->fp, 256);
-				$tmplen = strlen($tmp);
-				$this->debug("read chunk terminator of $tmplen bytes");
-				if ($tmplen == 0) {
-					$this->incoming_payload = $data;
-					$this->debug('socket read of chunk terminator timed out after length ' . strlen($data));
-					$this->debug("read before timeout:\n" . $data);
-					$this->setError('socket read of chunk terminator timed out');
-					return false;
-				}
-			}
-		} while ($chunked && ($content_length > 0) && (!feof($this->fp)));
-		if (feof($this->fp)) {
-			$this->debug('read to EOF');
-		}
-		$this->debug('read body of length ' . strlen($data));
-		$this->incoming_payload .= $data;
-		$this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server');
-		
-		// close filepointer
-		if(
-			(isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || 
-			(! $this->persistentConnection) || feof($this->fp)){
-			fclose($this->fp);
-			$this->fp = false;
-			$this->debug('closed socket');
-		}
-		
-		// connection was closed unexpectedly
-		if($this->incoming_payload == ''){
-			$this->setError('no response from server');
-			return false;
-		}
-		
-		// decode transfer-encoding
-//		if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){
-//			if(!$data = $this->decodeChunked($data, $lb)){
-//				$this->setError('Decoding of chunked data failed');
-//				return false;
-//			}
-			//print "<pre>\nde-chunked:\n---------------\n$data\n\n---------------\n</pre>";
-			// set decoded payload
-//			$this->incoming_payload = $header_data.$lb.$lb.$data;
-//		}
-	
-	  } else if ($this->io_method() == 'curl') {
-		// send and receive
-		$this->debug('send and receive with cURL');
-		$this->incoming_payload = curl_exec($this->ch);
-		$data = $this->incoming_payload;
-
-        $cErr = curl_error($this->ch);
-		if ($cErr != '') {
-        	$err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'<br>';
-        	// TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE
-			foreach(curl_getinfo($this->ch) as $k => $v){
-				$err .= "$k: $v<br>";
-			}
-			$this->debug($err);
-			$this->setError($err);
-			curl_close($this->ch);
-	    	return false;
-		} else {
-			//echo '<pre>';
-			//var_dump(curl_getinfo($this->ch));
-			//echo '</pre>';
-		}
-		// close curl
-		$this->debug('No cURL error, closing cURL');
-		curl_close($this->ch);
-		
-		// try removing skippable headers
-		$savedata = $data;
-		while ($this->isSkippableCurlHeader($data)) {
-			$this->debug("Found HTTP header to skip");
-			if ($pos = strpos($data,"\r\n\r\n")) {
-				$data = ltrim(substr($data,$pos));
-			} elseif($pos = strpos($data,"\n\n") ) {
-				$data = ltrim(substr($data,$pos));
-			}
-		}
-
-		if ($data == '') {
-			// have nothing left; just remove 100 header(s)
-			$data = $savedata;
-			while (preg_match('/^HTTP\/1.1 100/',$data)) {
-				if ($pos = strpos($data,"\r\n\r\n")) {
-					$data = ltrim(substr($data,$pos));
-				} elseif($pos = strpos($data,"\n\n") ) {
-					$data = ltrim(substr($data,$pos));
-				}
-			}
-		}
-		
-		// separate content from HTTP headers
-		if ($pos = strpos($data,"\r\n\r\n")) {
-			$lb = "\r\n";
-		} elseif( $pos = strpos($data,"\n\n")) {
-			$lb = "\n";
-		} else {
-			$this->debug('no proper separation of headers and document');
-			$this->setError('no proper separation of headers and document');
-			return false;
-		}
-		$header_data = trim(substr($data,0,$pos));
-		$header_array = explode($lb,$header_data);
-		$data = ltrim(substr($data,$pos));
-		$this->debug('found proper separation of headers and document');
-		$this->debug('cleaned data, stringlen: '.strlen($data));
-		// clean headers
-		foreach ($header_array as $header_line) {
-			$arr = explode(':',$header_line,2);
-			if(count($arr) > 1){
-				$header_name = strtolower(trim($arr[0]));
-				$this->incoming_headers[$header_name] = trim($arr[1]);
-				if ($header_name == 'set-cookie') {
-					// TODO: allow multiple cookies from parseCookie
-					$cookie = $this->parseCookie(trim($arr[1]));
-					if ($cookie) {
-						$this->incoming_cookies[] = $cookie;
-						$this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']);
-					} else {
-						$this->debug('did not find cookie in ' . trim($arr[1]));
-					}
-    			}
-			} else if (isset($header_name)) {
-				// append continuation line to previous header
-				$this->incoming_headers[$header_name] .= $lb . ' ' . $header_line;
-			}
-		}
-	  }
-
-		$this->response_status_line = $header_array[0];
-		$arr = explode(' ', $this->response_status_line, 3);
-		$http_version = $arr[0];
-		$http_status = intval($arr[1]);
-		$http_reason = count($arr) > 2 ? $arr[2] : '';
-
- 		// see if we need to resend the request with http digest authentication
- 		if (isset($this->incoming_headers['location']) && ($http_status == 301 || $http_status == 302)) {
- 			$this->debug("Got $http_status $http_reason with Location: " . $this->incoming_headers['location']);
- 			$this->setURL($this->incoming_headers['location']);
-			$this->tryagain = true;
-			return false;
-		}
-
- 		// see if we need to resend the request with http digest authentication
- 		if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) {
- 			$this->debug("Got 401 $http_reason with WWW-Authenticate: " . $this->incoming_headers['www-authenticate']);
- 			if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) {
- 				$this->debug('Server wants digest authentication');
- 				// remove "Digest " from our elements
- 				$digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']);
- 				
- 				// parse elements into array
- 				$digestElements = explode(',', $digestString);
- 				foreach ($digestElements as $val) {
- 					$tempElement = explode('=', trim($val), 2);
- 					$digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]);
- 				}
-
-				// should have (at least) qop, realm, nonce
- 				if (isset($digestRequest['nonce'])) {
- 					$this->setCredentials($this->username, $this->password, 'digest', $digestRequest);
- 					$this->tryagain = true;
- 					return false;
- 				}
- 			}
-			$this->debug('HTTP authentication failed');
-			$this->setError('HTTP authentication failed');
-			return false;
- 		}
-		
-		if (
-			($http_status >= 300 && $http_status <= 307) ||
-			($http_status >= 400 && $http_status <= 417) ||
-			($http_status >= 501 && $http_status <= 505)
-		   ) {
-			$this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)");
-			return false;
-		}
-
-		// decode content-encoding
-		if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){
-			if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){
-    			// if decoding works, use it. else assume data wasn't gzencoded
-    			if(function_exists('gzinflate')){
-					//$timer->setMarker('starting decoding of gzip/deflated content');
-					// IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress)
-					// this means there are no Zlib headers, although there should be
-					$this->debug('The gzinflate function exists');
-					$datalen = strlen($data);
-					if ($this->incoming_headers['content-encoding'] == 'deflate') {
-						if ($degzdata = @gzinflate($data)) {
-	    					$data = $degzdata;
-	    					$this->debug('The payload has been inflated to ' . strlen($data) . ' bytes');
-	    					if (strlen($data) < $datalen) {
-	    						// test for the case that the payload has been compressed twice
-		    					$this->debug('The inflated payload is smaller than the gzipped one; try again');
-								if ($degzdata = @gzinflate($data)) {
-			    					$data = $degzdata;
-			    					$this->debug('The payload has been inflated again to ' . strlen($data) . ' bytes');
-								}
-	    					}
-	    				} else {
-	    					$this->debug('Error using gzinflate to inflate the payload');
-	    					$this->setError('Error using gzinflate to inflate the payload');
-	    				}
-					} elseif ($this->incoming_headers['content-encoding'] == 'gzip') {
-						if ($degzdata = @gzinflate(substr($data, 10))) {	// do our best
-							$data = $degzdata;
-	    					$this->debug('The payload has been un-gzipped to ' . strlen($data) . ' bytes');
-	    					if (strlen($data) < $datalen) {
-	    						// test for the case that the payload has been compressed twice
-		    					$this->debug('The un-gzipped payload is smaller than the gzipped one; try again');
-								if ($degzdata = @gzinflate(substr($data, 10))) {
-			    					$data = $degzdata;
-			    					$this->debug('The payload has been un-gzipped again to ' . strlen($data) . ' bytes');
-								}
-	    					}
-	    				} else {
-	    					$this->debug('Error using gzinflate to un-gzip the payload');
-							$this->setError('Error using gzinflate to un-gzip the payload');
-	    				}
-					}
-					//$timer->setMarker('finished decoding of gzip/deflated content');
-					//print "<xmp>\nde-inflated:\n---------------\n$data\n-------------\n</xmp>";
-					// set decoded payload
-					$this->incoming_payload = $header_data.$lb.$lb.$data;
-    			} else {
-					$this->debug('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.');
-					$this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.');
-				}
-			} else {
-				$this->debug('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']);
-				$this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']);
-			}
-		} else {
-			$this->debug('No Content-Encoding header');
-		}
-		
-		if(strlen($data) == 0){
-			$this->debug('no data after headers!');
-			$this->setError('no data present after HTTP headers');
-			return false;
-		}
-		
-		return $data;
-	}
-
-	/**
-	 * sets the content-type for the SOAP message to be sent
-	 *
-	 * @param	string $type the content type, MIME style
-	 * @param	mixed $charset character set used for encoding (or false)
-	 * @access	public
-	 */
-	function setContentType($type, $charset = false) {
-		$this->setHeader('Content-Type', $type . ($charset ? '; charset=' . $charset : ''));
-	}
-
-	/**
-	 * specifies that an HTTP persistent connection should be used
-	 *
-	 * @return	boolean whether the request was honored by this method.
-	 * @access	public
-	 */
-	function usePersistentConnection(){
-		if (isset($this->outgoing_headers['Accept-Encoding'])) {
-			return false;
-		}
-		$this->protocol_version = '1.1';
-		$this->persistentConnection = true;
-		$this->setHeader('Connection', 'Keep-Alive');
-		return true;
-	}
-
-	/**
-	 * parse an incoming Cookie into it's parts
-	 *
-	 * @param	string $cookie_str content of cookie
-	 * @return	array with data of that cookie
-	 * @access	private
-	 */
-	/*
-	 * TODO: allow a Set-Cookie string to be parsed into multiple cookies
-	 */
-	function parseCookie($cookie_str) {
-		$cookie_str = str_replace('; ', ';', $cookie_str) . ';';
-		$data = preg_split('/;/', $cookie_str);
-		$value_str = $data[0];
-
-		$cookie_param = 'domain=';
-		$start = strpos($cookie_str, $cookie_param);
-		if ($start > 0) {
-			$domain = substr($cookie_str, $start + strlen($cookie_param));
-			$domain = substr($domain, 0, strpos($domain, ';'));
-		} else {
-			$domain = '';
-		}
-
-		$cookie_param = 'expires=';
-		$start = strpos($cookie_str, $cookie_param);
-		if ($start > 0) {
-			$expires = substr($cookie_str, $start + strlen($cookie_param));
-			$expires = substr($expires, 0, strpos($expires, ';'));
-		} else {
-			$expires = '';
-		}
-
-		$cookie_param = 'path=';
-		$start = strpos($cookie_str, $cookie_param);
-		if ( $start > 0 ) {
-			$path = substr($cookie_str, $start + strlen($cookie_param));
-			$path = substr($path, 0, strpos($path, ';'));
-		} else {
-			$path = '/';
-		}
-						
-		$cookie_param = ';secure;';
-		if (strpos($cookie_str, $cookie_param) !== FALSE) {
-			$secure = true;
-		} else {
-			$secure = false;
-		}
-
-		$sep_pos = strpos($value_str, '=');
-
-		if ($sep_pos) {
-			$name = substr($value_str, 0, $sep_pos);
-			$value = substr($value_str, $sep_pos + 1);
-			$cookie= array(	'name' => $name,
-			                'value' => $value,
-							'domain' => $domain,
-							'path' => $path,
-							'expires' => $expires,
-							'secure' => $secure
-							);		
-			return $cookie;
-		}
-		return false;
-	}
-  
-	/**
-	 * sort out cookies for the current request
-	 *
-	 * @param	array $cookies array with all cookies
-	 * @param	boolean $secure is the send-content secure or not?
-	 * @return	string for Cookie-HTTP-Header
-	 * @access	private
-	 */
-	function getCookiesForRequest($cookies, $secure=false) {
-		$cookie_str = '';
-		if ((! is_null($cookies)) && (is_array($cookies))) {
-			foreach ($cookies as $cookie) {
-				if (! is_array($cookie)) {
-					continue;
-				}
-	    		$this->debug("check cookie for validity: ".$cookie['name'].'='.$cookie['value']);
-				if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) {
-					if (strtotime($cookie['expires']) <= time()) {
-						$this->debug('cookie has expired');
-						continue;
-					}
-				}
-				if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) {
-					$domain = preg_quote($cookie['domain']);
-					if (! preg_match("'.*$domain$'i", $this->host)) {
-						$this->debug('cookie has different domain');
-						continue;
-					}
-				}
-				if ((isset($cookie['path'])) && (! empty($cookie['path']))) {
-					$path = preg_quote($cookie['path']);
-					if (! preg_match("'^$path.*'i", $this->path)) {
-						$this->debug('cookie is for a different path');
-						continue;
-					}
-				}
-				if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) {
-					$this->debug('cookie is secure, transport is not');
-					continue;
-				}
-				$cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; ';
-	    		$this->debug('add cookie to Cookie-String: ' . $cookie['name'] . '=' . $cookie['value']);
-			}
-		}
-		return $cookie_str;
-  }
-}
-
-?><?php
-
-
-
-/**
-*
-* nusoap_server allows the user to create a SOAP server
-* that is capable of receiving messages and returning responses
-*
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @author   Scott Nichol <snichol at users.sourceforge.net>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access   public
-*/
-class nusoap_server extends nusoap_base {
-	/**
-	 * HTTP headers of request
-	 * @var array
-	 * @access private
-	 */
-	var $headers = array();
-	/**
-	 * HTTP request
-	 * @var string
-	 * @access private
-	 */
-	var $request = '';
-	/**
-	 * SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text)
-	 * @var string
-	 * @access public
-	 */
-	var $requestHeaders = '';
-	/**
-	 * SOAP Headers from request (parsed)
-	 * @var mixed
-	 * @access public
-	 */
-	var $requestHeader = NULL;
-	/**
-	 * SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text)
-	 * @var string
-	 * @access public
-	 */
-	var $document = '';
-	/**
-	 * SOAP payload for request (text)
-	 * @var string
-	 * @access public
-	 */
-	var $requestSOAP = '';
-	/**
-	 * requested method namespace URI
-	 * @var string
-	 * @access private
-	 */
-	var $methodURI = '';
-	/**
-	 * name of method requested
-	 * @var string
-	 * @access private
-	 */
-	var $methodname = '';
-	/**
-	 * method parameters from request
-	 * @var array
-	 * @access private
-	 */
-	var $methodparams = array();
-	/**
-	 * SOAP Action from request
-	 * @var string
-	 * @access private
-	 */
-	var $SOAPAction = '';
-	/**
-	 * character set encoding of incoming (request) messages
-	 * @var string
-	 * @access public
-	 */
-	var $xml_encoding = '';
-	/**
-	 * toggles whether the parser decodes element content w/ utf8_decode()
-	 * @var boolean
-	 * @access public
-	 */
-    var $decode_utf8 = true;
-
-	/**
-	 * HTTP headers of response
-	 * @var array
-	 * @access public
-	 */
-	var $outgoing_headers = array();
-	/**
-	 * HTTP response
-	 * @var string
-	 * @access private
-	 */
-	var $response = '';
-	/**
-	 * SOAP headers for response (text or array of soapval or associative array)
-	 * @var mixed
-	 * @access public
-	 */
-	var $responseHeaders = '';
-	/**
-	 * SOAP payload for response (text)
-	 * @var string
-	 * @access private
-	 */
-	var $responseSOAP = '';
-	/**
-	 * method return value to place in response
-	 * @var mixed
-	 * @access private
-	 */
-	var $methodreturn = false;
-	/**
-	 * whether $methodreturn is a string of literal XML
-	 * @var boolean
-	 * @access public
-	 */
-	var $methodreturnisliteralxml = false;
-	/**
-	 * SOAP fault for response (or false)
-	 * @var mixed
-	 * @access private
-	 */
-	var $fault = false;
-	/**
-	 * text indication of result (for debugging)
-	 * @var string
-	 * @access private
-	 */
-	var $result = 'successful';
-
-	/**
-	 * assoc array of operations => opData; operations are added by the register()
-	 * method or by parsing an external WSDL definition
-	 * @var array
-	 * @access private
-	 */
-	var $operations = array();
-	/**
-	 * wsdl instance (if one)
-	 * @var mixed
-	 * @access private
-	 */
-	var $wsdl = false;
-	/**
-	 * URL for WSDL (if one)
-	 * @var mixed
-	 * @access private
-	 */
-	var $externalWSDLURL = false;
-	/**
-	 * whether to append debug to response as XML comment
-	 * @var boolean
-	 * @access public
-	 */
-	var $debug_flag = false;
-
-
-	/**
-	* constructor
-    * the optional parameter is a path to a WSDL file that you'd like to bind the server instance to.
-	*
-    * @param mixed $wsdl file path or URL (string), or wsdl instance (object)
-	* @access   public
-	*/
-	function nusoap_server($wsdl=false){
-		parent::nusoap_base();
-		// turn on debugging?
-		global $debug;
-		global $HTTP_SERVER_VARS;
-
-		if (isset($_SERVER)) {
-			$this->debug("_SERVER is defined:");
-			$this->appendDebug($this->varDump($_SERVER));
-		} elseif (isset($HTTP_SERVER_VARS)) {
-			$this->debug("HTTP_SERVER_VARS is defined:");
-			$this->appendDebug($this->varDump($HTTP_SERVER_VARS));
-		} else {
-			$this->debug("Neither _SERVER nor HTTP_SERVER_VARS is defined.");
-		}
-
-		if (isset($debug)) {
-			$this->debug("In nusoap_server, set debug_flag=$debug based on global flag");
-			$this->debug_flag = $debug;
-		} elseif (isset($_SERVER['QUERY_STRING'])) {
-			$qs = explode('&', $_SERVER['QUERY_STRING']);
-			foreach ($qs as $v) {
-				if (substr($v, 0, 6) == 'debug=') {
-					$this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #1");
-					$this->debug_flag = substr($v, 6);
-				}
-			}
-		} elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
-			$qs = explode('&', $HTTP_SERVER_VARS['QUERY_STRING']);
-			foreach ($qs as $v) {
-				if (substr($v, 0, 6) == 'debug=') {
-					$this->debug("In nusoap_server, set debug_flag=" . substr($v, 6) . " based on query string #2");
-					$this->debug_flag = substr($v, 6);
-				}
-			}
-		}
-
-		// wsdl
-		if($wsdl){
-			$this->debug("In nusoap_server, WSDL is specified");
-			if (is_object($wsdl) && (get_class($wsdl) == 'wsdl')) {
-				$this->wsdl = $wsdl;
-				$this->externalWSDLURL = $this->wsdl->wsdl;
-				$this->debug('Use existing wsdl instance from ' . $this->externalWSDLURL);
-			} else {
-				$this->debug('Create wsdl from ' . $wsdl);
-				$this->wsdl = new wsdl($wsdl);
-				$this->externalWSDLURL = $wsdl;
-			}
-			$this->appendDebug($this->wsdl->getDebug());
-			$this->wsdl->clearDebug();
-			if($err = $this->wsdl->getError()){
-				die('WSDL ERROR: '.$err);
-			}
-		}
-	}
-
-	/**
-	* processes request and returns response
-	*
-	* @param    string $data usually is the value of $HTTP_RAW_POST_DATA
-	* @access   public
-	*/
-	function service($data){
-		global $HTTP_SERVER_VARS;
-
-		if (isset($_SERVER['REQUEST_METHOD'])) {
-			$rm = $_SERVER['REQUEST_METHOD'];
-		} elseif (isset($HTTP_SERVER_VARS['REQUEST_METHOD'])) {
-			$rm = $HTTP_SERVER_VARS['REQUEST_METHOD'];
-		} else {
-			$rm = '';
-		}
-
-		if (isset($_SERVER['QUERY_STRING'])) {
-			$qs = $_SERVER['QUERY_STRING'];
-		} elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
-			$qs = $HTTP_SERVER_VARS['QUERY_STRING'];
-		} else {
-			$qs = '';
-		}
-		$this->debug("In service, request method=$rm query string=$qs strlen(\$data)=" . strlen($data));
-
-		if ($rm == 'POST') {
-			$this->debug("In service, invoke the request");
-			$this->parse_request($data);
-			if (! $this->fault) {
-				$this->invoke_method();
-			}
-			if (! $this->fault) {
-				$this->serialize_return();
-			}
-			$this->send_response();
-		} elseif (preg_match('/wsdl/', $qs) ){
-			$this->debug("In service, this is a request for WSDL");
-			if ($this->externalWSDLURL){
-              if (strpos($this->externalWSDLURL, "http://") !== false) { // assume URL
-				$this->debug("In service, re-direct for WSDL");
-				header('Location: '.$this->externalWSDLURL);
-              } else { // assume file
-				$this->debug("In service, use file passthru for WSDL");
-                header("Content-Type: text/xml\r\n");
-				$pos = strpos($this->externalWSDLURL, "file://");
-				if ($pos === false) {
-					$filename = $this->externalWSDLURL;
-				} else {
-					$filename = substr($this->externalWSDLURL, $pos + 7);
-				}
-                $fp = fopen($this->externalWSDLURL, 'r');
-                fpassthru($fp);
-              }
-			} elseif ($this->wsdl) {
-				$this->debug("In service, serialize WSDL");
-				header("Content-Type: text/xml; charset=ISO-8859-1\r\n");
-				print $this->wsdl->serialize($this->debug_flag);
-				if ($this->debug_flag) {
-					$this->debug('wsdl:');
-					$this->appendDebug($this->varDump($this->wsdl));
-					print $this->getDebugAsXMLComment();
-				}
-			} else {
-				$this->debug("In service, there is no WSDL");
-				header("Content-Type: text/html; charset=ISO-8859-1\r\n");
-				print "This service does not provide WSDL";
-			}
-		} elseif ($this->wsdl) {
-			$this->debug("In service, return Web description");
-			print $this->wsdl->webDescription();
-		} else {
-			$this->debug("In service, no Web description");
-			header("Content-Type: text/html; charset=ISO-8859-1\r\n");
-			print "This service does not provide a Web description";
-		}
-	}
-
-	/**
-	* parses HTTP request headers.
-	*
-	* The following fields are set by this function (when successful)
-	*
-	* headers
-	* request
-	* xml_encoding
-	* SOAPAction
-	*
-	* @access   private
-	*/
-	function parse_http_headers() {
-		global $HTTP_SERVER_VARS;
-
-		$this->request = '';
-		$this->SOAPAction = '';
-		if(function_exists('getallheaders')){
-			$this->debug("In parse_http_headers, use getallheaders");
-			$headers = getallheaders();
-			foreach($headers as $k=>$v){
-				$k = strtolower($k);
-				$this->headers[$k] = $v;
-				$this->request .= "$k: $v\r\n";
-				$this->debug("$k: $v");
-			}
-			// get SOAPAction header
-			if(isset($this->headers['soapaction'])){
-				$this->SOAPAction = str_replace('"','',$this->headers['soapaction']);
-			}
-			// get the character encoding of the incoming request
-			if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){
-				$enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1));
-				if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
-					$this->xml_encoding = strtoupper($enc);
-				} else {
-					$this->xml_encoding = 'US-ASCII';
-				}
-			} else {
-				// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
-				$this->xml_encoding = 'ISO-8859-1';
-			}
-		} elseif(isset($_SERVER) && is_array($_SERVER)){
-			$this->debug("In parse_http_headers, use _SERVER");
-			foreach ($_SERVER as $k => $v) {
-				if (substr($k, 0, 5) == 'HTTP_') {
-					$k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5))));
-				} else {
-					$k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k)));
-				}
-				if ($k == 'soapaction') {
-					// get SOAPAction header
-					$k = 'SOAPAction';
-					$v = str_replace('"', '', $v);
-					$v = str_replace('\\', '', $v);
-					$this->SOAPAction = $v;
-				} else if ($k == 'content-type') {
-					// get the character encoding of the incoming request
-					if (strpos($v, '=')) {
-						$enc = substr(strstr($v, '='), 1);
-						$enc = str_replace('"', '', $enc);
-						$enc = str_replace('\\', '', $enc);
-						if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) {
-							$this->xml_encoding = strtoupper($enc);
-						} else {
-							$this->xml_encoding = 'US-ASCII';
-						}
-					} else {
-						// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
-						$this->xml_encoding = 'ISO-8859-1';
-					}
-				}
-				$this->headers[$k] = $v;
-				$this->request .= "$k: $v\r\n";
-				$this->debug("$k: $v");
-			}
-		} elseif (is_array($HTTP_SERVER_VARS)) {
-			$this->debug("In parse_http_headers, use HTTP_SERVER_VARS");
-			foreach ($HTTP_SERVER_VARS as $k => $v) {
-				if (substr($k, 0, 5) == 'HTTP_') {
-					$k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); 	                                         $k = strtolower(substr($k, 5));
-				} else {
-					$k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); 	                                         $k = strtolower($k);
-				}
-				if ($k == 'soapaction') {
-					// get SOAPAction header
-					$k = 'SOAPAction';
-					$v = str_replace('"', '', $v);
-					$v = str_replace('\\', '', $v);
-					$this->SOAPAction = $v;
-				} else if ($k == 'content-type') {
-					// get the character encoding of the incoming request
-					if (strpos($v, '=')) {
-						$enc = substr(strstr($v, '='), 1);
-						$enc = str_replace('"', '', $enc);
-						$enc = str_replace('\\', '', $enc);
-						if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)) {
-							$this->xml_encoding = strtoupper($enc);
-						} else {
-							$this->xml_encoding = 'US-ASCII';
-						}
-					} else {
-						// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
-						$this->xml_encoding = 'ISO-8859-1';
-					}
-				}
-				$this->headers[$k] = $v;
-				$this->request .= "$k: $v\r\n";
-				$this->debug("$k: $v");
-			}
-		} else {
-			$this->debug("In parse_http_headers, HTTP headers not accessible");
-			$this->setError("HTTP headers not accessible");
-		}
-	}
-
-	/**
-	* parses a request
-	*
-	* The following fields are set by this function (when successful)
-	*
-	* headers
-	* request
-	* xml_encoding
-	* SOAPAction
-	* request
-	* requestSOAP
-	* methodURI
-	* methodname
-	* methodparams
-	* requestHeaders
-	* document
-	*
-	* This sets the fault field on error
-	*
-	* @param    string $data XML string
-	* @access   private
-	*/
-	function parse_request($data='') {
-		$this->debug('entering parse_request()');
-		$this->parse_http_headers();
-		$this->debug('got character encoding: '.$this->xml_encoding);
-		// uncompress if necessary
-		if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') {
-			$this->debug('got content encoding: ' . $this->headers['content-encoding']);
-			if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') {
-		    	// if decoding works, use it. else assume data wasn't gzencoded
-				if (function_exists('gzuncompress')) {
-					if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) {
-						$data = $degzdata;
-					} elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) {
-						$data = $degzdata;
-					} else {
-						$this->fault('SOAP-ENV:Client', 'Errors occurred when trying to decode the data');
-						return;
-					}
-				} else {
-					$this->fault('SOAP-ENV:Client', 'This Server does not support compressed data');
-					return;
-				}
-			}
-		}
-		$this->request .= "\r\n".$data;
-		$data = $this->parseRequest($this->headers, $data);
-		$this->requestSOAP = $data;
-		$this->debug('leaving parse_request');
-	}
-
-	/**
-	* invokes a PHP function for the requested SOAP method
-	*
-	* The following fields are set by this function (when successful)
-	*
-	* methodreturn
-	*
-	* Note that the PHP function that is called may also set the following
-	* fields to affect the response sent to the client
-	*
-	* responseHeaders
-	* outgoing_headers
-	*
-	* This sets the fault field on error
-	*
-	* @access   private
-	*/
-	function invoke_method() {
-		$this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction);
-
-		//
-		// if you are debugging in this area of the code, your service uses a class to implement methods,
-		// you use SOAP RPC, and the client is .NET, please be aware of the following...
-		// when the .NET wsdl.exe utility generates a proxy, it will remove the '.' or '..' from the
-		// method name.  that is fine for naming the .NET methods.  it is not fine for properly constructing
-		// the XML request and reading the XML response.  you need to add the RequestElementName and
-		// ResponseElementName to the System.Web.Services.Protocols.SoapRpcMethodAttribute that wsdl.exe
-		// generates for the method.  these parameters are used to specify the correct XML element names
-		// for .NET to use, i.e. the names with the '.' in them.
-		//
-		$orig_methodname = $this->methodname;
-		if ($this->wsdl) {
-			if ($this->opData = $this->wsdl->getOperationData($this->methodname)) {
-				$this->debug('in invoke_method, found WSDL operation=' . $this->methodname);
-				$this->appendDebug('opData=' . $this->varDump($this->opData));
-			} elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) {
-				// Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element
-				$this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']);
-				$this->appendDebug('opData=' . $this->varDump($this->opData));
-				$this->methodname = $this->opData['name'];
-			} else {
-				$this->debug('in invoke_method, no WSDL for operation=' . $this->methodname);
-				$this->fault('SOAP-ENV:Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service");
-				return;
-			}
-		} else {
-			$this->debug('in invoke_method, no WSDL to validate method');
-		}
-
-		// if a . is present in $this->methodname, we see if there is a class in scope,
-		// which could be referred to. We will also distinguish between two deliminators,
-		// to allow methods to be called a the class or an instance
-		if (strpos($this->methodname, '..') > 0) {
-			$delim = '..';
-		} else if (strpos($this->methodname, '.') > 0) {
-			$delim = '.';
-		} else {
-			$delim = '';
-		}
-		$this->debug("in invoke_method, delim=$delim");
-
-		$class = '';
-		$method = '';
-		if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1) {
-			$try_class = substr($this->methodname, 0, strpos($this->methodname, $delim));
-			if (class_exists($try_class)) {
-				// get the class and method name
-				$class = $try_class;
-				$method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim));
-				$this->debug("in invoke_method, class=$class method=$method delim=$delim");
-			} else {
-				$this->debug("in invoke_method, class=$try_class not found");
-			}
-		} else {
-			$try_class = '';
-			$this->debug("in invoke_method, no class to try");
-		}
-
-		// does method exist?
-		if ($class == '') {
-			if (!function_exists($this->methodname)) {
-				$this->debug("in invoke_method, function '$this->methodname' not found!");
-				$this->result = 'fault: method not found';
-				$this->fault('SOAP-ENV:Client',"method '$this->methodname'('$orig_methodname') not defined in service('$try_class' '$delim')");
-				return;
-			}
-		} else {
-			$method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method;
-			if (!in_array($method_to_compare, get_class_methods($class))) {
-				$this->debug("in invoke_method, method '$this->methodname' not found in class '$class'!");
-				$this->result = 'fault: method not found';
-				$this->fault('SOAP-ENV:Client',"method '$this->methodname'/'$method_to_compare'('$orig_methodname') not defined in service/'$class'('$try_class' '$delim')");
-				return;
-			}
-		}
-
-		// evaluate message, getting back parameters
-		// verify that request parameters match the method's signature
-		if(! $this->verify_method($this->methodname,$this->methodparams)){
-			// debug
-			$this->debug('ERROR: request not verified against method signature');
-			$this->result = 'fault: request failed validation against method signature';
-			// return fault
-			$this->fault('SOAP-ENV:Client',"Operation '$this->methodname' not defined in service.");
-			return;
-		}
-
-		// if there are parameters to pass
-		$this->debug('in invoke_method, params:');
-		$this->appendDebug($this->varDump($this->methodparams));
-		$this->debug("in invoke_method, calling '$this->methodname'");
-		if (!function_exists('call_user_func_array')) {
-			if ($class == '') {
-				$this->debug('in invoke_method, calling function using eval()');
-				$funcCall = "\$this->methodreturn = $this->methodname(";
-			} else {
-				if ($delim == '..') {
-					$this->debug('in invoke_method, calling class method using eval()');
-					$funcCall = "\$this->methodreturn = ".$class."::".$method."(";
-				} else {
-					$this->debug('in invoke_method, calling instance method using eval()');
-					// generate unique instance name
-					$instname = "\$inst_".time();
-					$funcCall = $instname." = new ".$class."(); ";
-					$funcCall .= "\$this->methodreturn = ".$instname."->".$method."(";
-				}
-			}
-			if ($this->methodparams) {
-				foreach ($this->methodparams as $param) {
-					if (is_array($param) || is_object($param)) {
-						$this->fault('SOAP-ENV:Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available');
-						return;
-					}
-					$funcCall .= "\"$param\",";
-				}
-				$funcCall = substr($funcCall, 0, -1);
-			}
-			$funcCall .= ');';
-			$this->debug('in invoke_method, function call: '.$funcCall);
-			@eval($funcCall);
-		} else {
-			if ($class == '') {
-				$this->debug('in invoke_method, calling function using call_user_func_array()');
-				$call_arg = "$this->methodname";	// straight assignment changes $this->methodname to lower case after call_user_func_array()
-			} elseif ($delim == '..') {
-				$this->debug('in invoke_method, calling class method using call_user_func_array()');
-				$call_arg = array ($class, $method);
-			} else {
-				$this->debug('in invoke_method, calling instance method using call_user_func_array()');
-				$instance = new $class ();
-				$call_arg = array(&$instance, $method);
-			}
-			if (is_array($this->methodparams)) {
-				$this->methodreturn = call_user_func_array($call_arg, array_values($this->methodparams));
-			} else {
-				$this->methodreturn = call_user_func_array($call_arg, array());
-			}
-		}
-        $this->debug('in invoke_method, methodreturn:');
-        $this->appendDebug($this->varDump($this->methodreturn));
-		$this->debug("in invoke_method, called method $this->methodname, received data of type ".gettype($this->methodreturn));
-	}
-
-	/**
-	* serializes the return value from a PHP function into a full SOAP Envelope
-	*
-	* The following fields are set by this function (when successful)
-	*
-	* responseSOAP
-	*
-	* This sets the fault field on error
-	*
-	* @access   private
-	*/
-	function serialize_return() {
-		$this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI);
-		// if fault
-		if (isset($this->methodreturn) && is_object($this->methodreturn) && ((get_class($this->methodreturn) == 'soap_fault') || (get_class($this->methodreturn) == 'nusoap_fault'))) {
-			$this->debug('got a fault object from method');
-			$this->fault = $this->methodreturn;
-			return;
-		} elseif ($this->methodreturnisliteralxml) {
-			$return_val = $this->methodreturn;
-		// returned value(s)
-		} else {
-			$this->debug('got a(n) '.gettype($this->methodreturn).' from method');
-			$this->debug('serializing return value');
-			if($this->wsdl){
-				if (sizeof($this->opData['output']['parts']) > 1) {
-					$this->debug('more than one output part, so use the method return unchanged');
-			    	$opParams = $this->methodreturn;
-			    } elseif (sizeof($this->opData['output']['parts']) == 1) {
-					$this->debug('exactly one output part, so wrap the method return in a simple array');
-					// TODO: verify that it is not already wrapped!
-			    	//foreach ($this->opData['output']['parts'] as $name => $type) {
-					//	$this->debug('wrap in element named ' . $name);
-			    	//}
-			    	$opParams = array($this->methodreturn);
-			    }
-			    $return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams);
-			    $this->appendDebug($this->wsdl->getDebug());
-			    $this->wsdl->clearDebug();
-				if($errstr = $this->wsdl->getError()){
-					$this->debug('got wsdl error: '.$errstr);
-					$this->fault('SOAP-ENV:Server', 'unable to serialize result');
-					return;
-				}
-			} else {
-				if (isset($this->methodreturn)) {
-					$return_val = $this->serialize_val($this->methodreturn, 'return');
-				} else {
-					$return_val = '';
-					$this->debug('in absence of WSDL, assume void return for backward compatibility');
-				}
-			}
-		}
-		$this->debug('return value:');
-		$this->appendDebug($this->varDump($return_val));
-
-		$this->debug('serializing response');
-		if ($this->wsdl) {
-			$this->debug('have WSDL for serialization: style is ' . $this->opData['style']);
-			if ($this->opData['style'] == 'rpc') {
-				$this->debug('style is rpc for serialization: use is ' . $this->opData['output']['use']);
-				if ($this->opData['output']['use'] == 'literal') {
-					// http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace
-					if ($this->methodURI) {
-						$payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>";
-					} else {
-						$payload = '<'.$this->methodname.'Response>'.$return_val.'</'.$this->methodname.'Response>';
-					}
-				} else {
-					if ($this->methodURI) {
-						$payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>";
-					} else {
-						$payload = '<'.$this->methodname.'Response>'.$return_val.'</'.$this->methodname.'Response>';
-					}
-				}
-			} else {
-				$this->debug('style is not rpc for serialization: assume document');
-				$payload = $return_val;
-			}
-		} else {
-			$this->debug('do not have WSDL for serialization: assume rpc/encoded');
-			$payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>";
-		}
-		$this->result = 'successful';
-		if($this->wsdl){
-			//if($this->debug_flag){
-            	$this->appendDebug($this->wsdl->getDebug());
-            //	}
-			if (isset($this->opData['output']['encodingStyle'])) {
-				$encodingStyle = $this->opData['output']['encodingStyle'];
-			} else {
-				$encodingStyle = '';
-			}
-			// Added: In case we use a WSDL, return a serialized env. WITH the usedNamespaces.
-			$this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders,$this->wsdl->usedNamespaces,$this->opData['style'],$this->opData['output']['use'],$encodingStyle);
-		} else {
-			$this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders);
-		}
-		$this->debug("Leaving serialize_return");
-	}
-
-	/**
-	* sends an HTTP response
-	*
-	* The following fields are set by this function (when successful)
-	*
-	* outgoing_headers
-	* response
-	*
-	* @access   private
-	*/
-	function send_response() {
-		$this->debug('Enter send_response');
-		if ($this->fault) {
-			$payload = $this->fault->serialize();
-			$this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error";
-			$this->outgoing_headers[] = "Status: 500 Internal Server Error";
-		} else {
-			$payload = $this->responseSOAP;
-			// Some combinations of PHP+Web server allow the Status
-			// to come through as a header.  Since OK is the default
-			// just do nothing.
-			// $this->outgoing_headers[] = "HTTP/1.0 200 OK";
-			// $this->outgoing_headers[] = "Status: 200 OK";
-		}
-        // add debug data if in debug mode
-		if(isset($this->debug_flag) && $this->debug_flag){
-        	$payload .= $this->getDebugAsXMLComment();
-        }
-		$this->outgoing_headers[] = "Server: $this->title Server v$this->version";
-		preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev);
-		$this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")";
-		// Let the Web server decide about this
-		//$this->outgoing_headers[] = "Connection: Close\r\n";
-		$payload = $this->getHTTPBody($payload);
-		$type = $this->getHTTPContentType();
-		$charset = $this->getHTTPContentTypeCharset();
-		$this->outgoing_headers[] = "Content-Type: $type" . ($charset ? '; charset=' . $charset : '');
-		//begin code to compress payload - by John
-		// NOTE: there is no way to know whether the Web server will also compress
-		// this data.
-		if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) {	
-			if (strstr($this->headers['accept-encoding'], 'gzip')) {
-				if (function_exists('gzencode')) {
-					if (isset($this->debug_flag) && $this->debug_flag) {
-						$payload .= "<!-- Content being gzipped -->";
-					}
-					$this->outgoing_headers[] = "Content-Encoding: gzip";
-					$payload = gzencode($payload);
-				} else {
-					if (isset($this->debug_flag) && $this->debug_flag) {
-						$payload .= "<!-- Content will not be gzipped: no gzencode -->";
-					}
-				}
-			} elseif (strstr($this->headers['accept-encoding'], 'deflate')) {
-				// Note: MSIE requires gzdeflate output (no Zlib header and checksum),
-				// instead of gzcompress output,
-				// which conflicts with HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5)
-				if (function_exists('gzdeflate')) {
-					if (isset($this->debug_flag) && $this->debug_flag) {
-						$payload .= "<!-- Content being deflated -->";
-					}
-					$this->outgoing_headers[] = "Content-Encoding: deflate";
-					$payload = gzdeflate($payload);
-				} else {
-					if (isset($this->debug_flag) && $this->debug_flag) {
-						$payload .= "<!-- Content will not be deflated: no gzcompress -->";
-					}
-				}
-			}
-		}
-		//end code
-		$this->outgoing_headers[] = "Content-Length: ".strlen($payload);
-		reset($this->outgoing_headers);
-		foreach($this->outgoing_headers as $hdr){
-			header($hdr, false);
-		}
-		print $payload;
-		$this->response = join("\r\n",$this->outgoing_headers)."\r\n\r\n".$payload;
-	}
-
-	/**
-	* takes the value that was created by parsing the request
-	* and compares to the method's signature, if available.
-	*
-	* @param	string	$operation	The operation to be invoked
-	* @param	array	$request	The array of parameter values
-	* @return	boolean	Whether the operation was found
-	* @access   private
-	*/
-	function verify_method($operation,$request){
-		if(isset($this->wsdl) && is_object($this->wsdl)){
-			if($this->wsdl->getOperationData($operation)){
-				return true;
-			}
-	    } elseif(isset($this->operations[$operation])){
-			return true;
-		}
-		return false;
-	}
-
-	/**
-	* processes SOAP message received from client
-	*
-	* @param	array	$headers	The HTTP headers
-	* @param	string	$data		unprocessed request data from client
-	* @return	mixed	value of the message, decoded into a PHP type
-	* @access   private
-	*/
-    function parseRequest($headers, $data) {
-		$this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' headers:');
-		$this->appendDebug($this->varDump($headers));
-    	if (!isset($headers['content-type'])) {
-			$this->setError('Request not of type text/xml (no content-type header)');
-			return false;
-    	}
-		if (!strstr($headers['content-type'], 'text/xml')) {
-			$this->setError('Request not of type text/xml');
-			return false;
-		}
-		if (strpos($headers['content-type'], '=')) {
-			$enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
-			$this->debug('Got response encoding: ' . $enc);
-			if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
-				$this->xml_encoding = strtoupper($enc);
-			} else {
-				$this->xml_encoding = 'US-ASCII';
-			}
-		} else {
-			// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
-			$this->xml_encoding = 'ISO-8859-1';
-		}
-		$this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser');
-		// parse response, get soap parser obj
-		$parser = new nusoap_parser($data,$this->xml_encoding,'',$this->decode_utf8);
-		// parser debug
-		$this->debug("parser debug: \n".$parser->getDebug());
-		// if fault occurred during message parsing
-		if($err = $parser->getError()){
-			$this->result = 'fault: error in msg parsing: '.$err;
-			$this->fault('SOAP-ENV:Client',"error in msg parsing:\n".$err);
-		// else successfully parsed request into soapval object
-		} else {
-			// get/set methodname
-			$this->methodURI = $parser->root_struct_namespace;
-			$this->methodname = $parser->root_struct_name;
-			$this->debug('methodname: '.$this->methodname.' methodURI: '.$this->methodURI);
-			$this->debug('calling parser->get_soapbody()');
-			$this->methodparams = $parser->get_soapbody();
-			// get SOAP headers
-			$this->requestHeaders = $parser->getHeaders();
-			// get SOAP Header
-			$this->requestHeader = $parser->get_soapheader();
-            // add document for doclit support
-            $this->document = $parser->document;
-		}
-	 }
-
-	/**
-	* gets the HTTP body for the current response.
-	*
-	* @param string $soapmsg The SOAP payload
-	* @return string The HTTP body, which includes the SOAP payload
-	* @access private
-	*/
-	function getHTTPBody($soapmsg) {
-		return $soapmsg;
-	}
-	
-	/**
-	* gets the HTTP content type for the current response.
-	*
-	* Note: getHTTPBody must be called before this.
-	*
-	* @return string the HTTP content type for the current response.
-	* @access private
-	*/
-	function getHTTPContentType() {
-		return 'text/xml';
-	}
-	
-	/**
-	* gets the HTTP content type charset for the current response.
-	* returns false for non-text content types.
-	*
-	* Note: getHTTPBody must be called before this.
-	*
-	* @return string the HTTP content type charset for the current response.
-	* @access private
-	*/
-	function getHTTPContentTypeCharset() {
-		return $this->soap_defencoding;
-	}
-
-	/**
-	* add a method to the dispatch map (this has been replaced by the register method)
-	*
-	* @param    string $methodname
-	* @param    string $in array of input values
-	* @param    string $out array of output values
-	* @access   public
-	* @deprecated
-	*/
-	function add_to_map($methodname,$in,$out){
-			$this->operations[$methodname] = array('name' => $methodname,'in' => $in,'out' => $out);
-	}
-
-	/**
-	* register a service function with the server
-	*
-	* @param    string $name the name of the PHP function, class.method or class..method
-	* @param    array $in assoc array of input values: key = param name, value = param type
-	* @param    array $out assoc array of output values: key = param name, value = param type
-	* @param	mixed $namespace the element namespace for the method or false
-	* @param	mixed $soapaction the soapaction for the method or false
-	* @param	mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically
-	* @param	mixed $use optional (encoded|literal) or false
-	* @param	string $documentation optional Description to include in WSDL
-	* @param	string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
-	* @access   public
-	*/
-	function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){
-		global $HTTP_SERVER_VARS;
-
-		if($this->externalWSDLURL){
-			die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.');
-		}
-		if (! $name) {
-			die('You must specify a name when you register an operation');
-		}
-		if (!is_array($in)) {
-			die('You must provide an array for operation inputs');
-		}
-		if (!is_array($out)) {
-			die('You must provide an array for operation outputs');
-		}
-		if(false == $namespace) {
-		}
-		if(false == $soapaction) {
-			if (isset($_SERVER)) {
-				$SERVER_NAME = $_SERVER['SERVER_NAME'];
-				$SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
-				$HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off');
-			} elseif (isset($HTTP_SERVER_VARS)) {
-				$SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME'];
-				$SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
-				$HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off';
-			} else {
-				$this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
-			}
-        	if ($HTTPS == '1' || $HTTPS == 'on') {
-        		$SCHEME = 'https';
-        	} else {
-        		$SCHEME = 'http';
-        	}
-			$soapaction = "$SCHEME://$SERVER_NAME$SCRIPT_NAME/$name";
-		}
-		if(false == $style) {
-			$style = "rpc";
-		}
-		if(false == $use) {
-			$use = "encoded";
-		}
-		if ($use == 'encoded' && $encodingStyle == '') {
-			$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
-		}
-
-		$this->operations[$name] = array(
-	    'name' => $name,
-	    'in' => $in,
-	    'out' => $out,
-	    'namespace' => $namespace,
-	    'soapaction' => $soapaction,
-	    'style' => $style);
-        if($this->wsdl){
-        	$this->wsdl->addOperation($name,$in,$out,$namespace,$soapaction,$style,$use,$documentation,$encodingStyle);
-	    }
-		return true;
-	}
-
-	/**
-	* Specify a fault to be returned to the client.
-	* This also acts as a flag to the server that a fault has occured.
-	*
-	* @param	string $faultcode
-	* @param	string $faultstring
-	* @param	string $faultactor
-	* @param	string $faultdetail
-	* @access   public
-	*/
-	function fault($faultcode,$faultstring,$faultactor='',$faultdetail=''){
-		if ($faultdetail == '' && $this->debug_flag) {
-			$faultdetail = $this->getDebug();
-		}
-		$this->fault = new nusoap_fault($faultcode,$faultactor,$faultstring,$faultdetail);
-		$this->fault->soap_defencoding = $this->soap_defencoding;
-	}
-
-    /**
-    * Sets up wsdl object.
-    * Acts as a flag to enable internal WSDL generation
-    *
-    * @param string $serviceName, name of the service
-    * @param mixed $namespace optional 'tns' service namespace or false
-    * @param mixed $endpoint optional URL of service endpoint or false
-    * @param string $style optional (rpc|document) WSDL style (also specified by operation)
-    * @param string $transport optional SOAP transport
-    * @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false
-    */
-    function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false)
-    {
-    	global $HTTP_SERVER_VARS;
-
-		if (isset($_SERVER)) {
-			$SERVER_NAME = $_SERVER['SERVER_NAME'];
-			$SERVER_PORT = $_SERVER['SERVER_PORT'];
-			$SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
-			$HTTPS = isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : (isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off');
-		} elseif (isset($HTTP_SERVER_VARS)) {
-			$SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME'];
-			$SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT'];
-			$SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];
-			$HTTPS = isset($HTTP_SERVER_VARS['HTTPS']) ? $HTTP_SERVER_VARS['HTTPS'] : 'off';
-		} else {
-			$this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
-		}
-		// If server name has port number attached then strip it (else port number gets duplicated in WSDL output) (occurred using lighttpd and FastCGI)
-		$colon = strpos($SERVER_NAME,":");
-		if ($colon) {
-		    $SERVER_NAME = substr($SERVER_NAME, 0, $colon);
-		}
-		if ($SERVER_PORT == 80) {
-			$SERVER_PORT = '';
-		} else {
-			$SERVER_PORT = ':' . $SERVER_PORT;
-		}
-        if(false == $namespace) {
-            $namespace = "http://$SERVER_NAME/soap/$serviceName";
-        }
-        
-        if(false == $endpoint) {
-        	if ($HTTPS == '1' || $HTTPS == 'on') {
-        		$SCHEME = 'https';
-        	} else {
-        		$SCHEME = 'http';
-        	}
-            $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME";
-        }
-        
-        if(false == $schemaTargetNamespace) {
-            $schemaTargetNamespace = $namespace;
-        }
-        
-		$this->wsdl = new wsdl;
-		$this->wsdl->serviceName = $serviceName;
-        $this->wsdl->endpoint = $endpoint;
-		$this->wsdl->namespaces['tns'] = $namespace;
-		$this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/';
-		$this->wsdl->namespaces['wsdl'] = 'http://schemas.xmlsoap.org/wsdl/';
-		if ($schemaTargetNamespace != $namespace) {
-			$this->wsdl->namespaces['types'] = $schemaTargetNamespace;
-		}
-        $this->wsdl->schemas[$schemaTargetNamespace][0] = new nusoap_xmlschema('', '', $this->wsdl->namespaces);
-        if ($style == 'document') {
-	        $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaInfo['elementFormDefault'] = 'qualified';
-        }
-        $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaTargetNamespace = $schemaTargetNamespace;
-        $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true);
-        $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/wsdl/'][0] = array('location' => '', 'loaded' => true);
-        $this->wsdl->bindings[$serviceName.'Binding'] = array(
-        	'name'=>$serviceName.'Binding',
-            'style'=>$style,
-            'transport'=>$transport,
-            'portType'=>$serviceName.'PortType');
-        $this->wsdl->ports[$serviceName.'Port'] = array(
-        	'binding'=>$serviceName.'Binding',
-            'location'=>$endpoint,
-            'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/');
-    }
-}
-
-/**
- * Backward compatibility
- */
-class soap_server extends nusoap_server {
-}
-
-?><?php
-
-
-
-/**
-* parses a WSDL file, allows access to it's data, other utility methods.
-* also builds WSDL structures programmatically.
-* 
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @author   Scott Nichol <snichol at users.sourceforge.net>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access public 
-*/
-class wsdl extends nusoap_base {
-	// URL or filename of the root of this WSDL
-    var $wsdl; 
-    // define internal arrays of bindings, ports, operations, messages, etc.
-    var $schemas = array();
-    var $currentSchema;
-    var $message = array();
-    var $complexTypes = array();
-    var $messages = array();
-    var $currentMessage;
-    var $currentOperation;
-    var $portTypes = array();
-    var $currentPortType;
-    var $bindings = array();
-    var $currentBinding;
-    var $ports = array();
-    var $currentPort;
-    var $opData = array();
-    var $status = '';
-    var $documentation = false;
-    var $endpoint = ''; 
-    // array of wsdl docs to import
-    var $import = array(); 
-    // parser vars
-    var $parser;
-    var $position = 0;
-    var $depth = 0;
-    var $depth_array = array();
-	// for getting wsdl
-	var $proxyhost = '';
-    var $proxyport = '';
-	var $proxyusername = '';
-	var $proxypassword = '';
-	var $timeout = 0;
-	var $response_timeout = 30;
-	var $curl_options = array();	// User-specified cURL options
-	var $use_curl = false;			// whether to always try to use cURL
-	// for HTTP authentication
-	var $username = '';				// Username for HTTP authentication
-	var $password = '';				// Password for HTTP authentication
-	var $authtype = '';				// Type of HTTP authentication
-	var $certRequest = array();		// Certificate for HTTP SSL authentication
-
-    /**
-     * constructor
-     * 
-     * @param string $wsdl WSDL document URL
-	 * @param string $proxyhost
-	 * @param string $proxyport
-	 * @param string $proxyusername
-	 * @param string $proxypassword
-	 * @param integer $timeout set the connection timeout
-	 * @param integer $response_timeout set the response timeout
-	 * @param array $curl_options user-specified cURL options
-	 * @param boolean $use_curl try to use cURL
-     * @access public 
-     */
-    function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30,$curl_options=null,$use_curl=false){
-		parent::nusoap_base();
-		$this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout");
-        $this->proxyhost = $proxyhost;
-        $this->proxyport = $proxyport;
-		$this->proxyusername = $proxyusername;
-		$this->proxypassword = $proxypassword;
-		$this->timeout = $timeout;
-		$this->response_timeout = $response_timeout;
-		if (is_array($curl_options))
-			$this->curl_options = $curl_options;
-		$this->use_curl = $use_curl;
-		$this->fetchWSDL($wsdl);
-    }
-
-	/**
-	 * fetches the WSDL document and parses it
-	 *
-	 * @access public
-	 */
-	function fetchWSDL($wsdl) {
-		$this->debug("parse and process WSDL path=$wsdl");
-		$this->wsdl = $wsdl;
-        // parse wsdl file
-        if ($this->wsdl != "") {
-            $this->parseWSDL($this->wsdl);
-        }
-        // imports
-        // TODO: handle imports more properly, grabbing them in-line and nesting them
-    	$imported_urls = array();
-    	$imported = 1;
-    	while ($imported > 0) {
-    		$imported = 0;
-    		// Schema imports
-    		foreach ($this->schemas as $ns => $list) {
-    			foreach ($list as $xs) {
-					$wsdlparts = parse_url($this->wsdl);	// this is bogusly simple!
-		            foreach ($xs->imports as $ns2 => $list2) {
-		                for ($ii = 0; $ii < count($list2); $ii++) {
-		                	if (! $list2[$ii]['loaded']) {
-		                		$this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true;
-		                		$url = $list2[$ii]['location'];
-								if ($url != '') {
-									$urlparts = parse_url($url);
-									if (!isset($urlparts['host'])) {
-										$url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' .$wsdlparts['port'] : '') .
-												substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path'];
-									}
-									if (! in_array($url, $imported_urls)) {
-					                	$this->parseWSDL($url);
-				                		$imported++;
-				                		$imported_urls[] = $url;
-				                	}
-								} else {
-									$this->debug("Unexpected scenario: empty URL for unloaded import");
-								}
-							}
-						}
-		            } 
-    			}
-    		}
-    		// WSDL imports
-			$wsdlparts = parse_url($this->wsdl);	// this is bogusly simple!
-            foreach ($this->import as $ns => $list) {
-                for ($ii = 0; $ii < count($list); $ii++) {
-                	if (! $list[$ii]['loaded']) {
-                		$this->import[$ns][$ii]['loaded'] = true;
-                		$url = $list[$ii]['location'];
-						if ($url != '') {
-							$urlparts = parse_url($url);
-							if (!isset($urlparts['host'])) {
-								$url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' . $wsdlparts['port'] : '') .
-										substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path'];
-							}
-							if (! in_array($url, $imported_urls)) {
-			                	$this->parseWSDL($url);
-		                		$imported++;
-		                		$imported_urls[] = $url;
-		                	}
-						} else {
-							$this->debug("Unexpected scenario: empty URL for unloaded import");
-						}
-					}
-				}
-            } 
-		}
-        // add new data to operation data
-        foreach($this->bindings as $binding => $bindingData) {
-            if (isset($bindingData['operations']) && is_array($bindingData['operations'])) {
-                foreach($bindingData['operations'] as $operation => $data) {
-                    $this->debug('post-parse data gathering for ' . $operation);
-                    $this->bindings[$binding]['operations'][$operation]['input'] = 
-						isset($this->bindings[$binding]['operations'][$operation]['input']) ? 
-						array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) :
-						$this->portTypes[ $bindingData['portType'] ][$operation]['input'];
-                    $this->bindings[$binding]['operations'][$operation]['output'] = 
-						isset($this->bindings[$binding]['operations'][$operation]['output']) ?
-						array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) :
-						$this->portTypes[ $bindingData['portType'] ][$operation]['output'];
-                    if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){
-						$this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ];
-					}
-					if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){
-                   		$this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ];
-                    }
-                    // Set operation style if necessary, but do not override one already provided
-					if (isset($bindingData['style']) && !isset($this->bindings[$binding]['operations'][$operation]['style'])) {
-                        $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style'];
-                    }
-                    $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : '';
-                    $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : '';
-                    $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : '';
-                } 
-            } 
-        }
-	}
-
-    /**
-     * parses the wsdl document
-     * 
-     * @param string $wsdl path or URL
-     * @access private 
-     */
-    function parseWSDL($wsdl = '') {
-		$this->debug("parse WSDL at path=$wsdl");
-
-        if ($wsdl == '') {
-            $this->debug('no wsdl passed to parseWSDL()!!');
-            $this->setError('no wsdl passed to parseWSDL()!!');
-            return false;
-        }
-        
-        // parse $wsdl for url format
-        $wsdl_props = parse_url($wsdl);
-
-        if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) {
-            $this->debug('getting WSDL http(s) URL ' . $wsdl);
-        	// get wsdl
-	        $tr = new soap_transport_http($wsdl, $this->curl_options, $this->use_curl);
-			$tr->request_method = 'GET';
-			$tr->useSOAPAction = false;
-			if($this->proxyhost && $this->proxyport){
-				$tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword);
-			}
-			if ($this->authtype != '') {
-				$tr->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest);
-			}
-			$tr->setEncoding('gzip, deflate');
-			$wsdl_string = $tr->send('', $this->timeout, $this->response_timeout);
-			//$this->debug("WSDL request\n" . $tr->outgoing_payload);
-			//$this->debug("WSDL response\n" . $tr->incoming_payload);
-			$this->appendDebug($tr->getDebug());
-			// catch errors
-			if($err = $tr->getError() ){
-				$errstr = 'Getting ' . $wsdl . ' - HTTP ERROR: '.$err;
-				$this->debug($errstr);
-	            $this->setError($errstr);
-				unset($tr);
-	            return false;
-			}
-			unset($tr);
-			$this->debug("got WSDL URL");
-        } else {
-            // $wsdl is not http(s), so treat it as a file URL or plain file path
-        	if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) {
-        		$path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path'];
-        	} else {
-        		$path = $wsdl;
-        	}
-            $this->debug('getting WSDL file ' . $path);
-            if ($fp = @fopen($path, 'r')) {
-                $wsdl_string = '';
-                while ($data = fread($fp, 32768)) {
-                    $wsdl_string .= $data;
-                } 
-                fclose($fp);
-            } else {
-            	$errstr = "Bad path to WSDL file $path";
-            	$this->debug($errstr);
-                $this->setError($errstr);
-                return false;
-            } 
-        }
-        $this->debug('Parse WSDL');
-        // end new code added
-        // Create an XML parser.
-        $this->parser = xml_parser_create(); 
-        // Set the options for parsing the XML data.
-        // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
-        xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); 
-        // Set the object for the parser.
-        xml_set_object($this->parser, $this); 
-        // Set the element handlers for the parser.
-        xml_set_element_handler($this->parser, 'start_element', 'end_element');
-        xml_set_character_data_handler($this->parser, 'character_data');
-        // Parse the XML file.
-        if (!xml_parse($this->parser, $wsdl_string, true)) {
-            // Display an error message.
-            $errstr = sprintf(
-				'XML error parsing WSDL from %s on line %d: %s',
-				$wsdl,
-                xml_get_current_line_number($this->parser),
-                xml_error_string(xml_get_error_code($this->parser))
-                );
-            $this->debug($errstr);
-			$this->debug("XML payload:\n" . $wsdl_string);
-            $this->setError($errstr);
-            return false;
-        } 
-		// free the parser
-        xml_parser_free($this->parser);
-        $this->debug('Parsing WSDL done');
-		// catch wsdl parse errors
-		if($this->getError()){
-			return false;
-		}
-        return true;
-    } 
-
-    /**
-     * start-element handler
-     * 
-     * @param string $parser XML parser object
-     * @param string $name element name
-     * @param string $attrs associative array of attributes
-     * @access private 
-     */
-    function start_element($parser, $name, $attrs)
-    {
-        if ($this->status == 'schema') {
-            $this->currentSchema->schemaStartElement($parser, $name, $attrs);
-            $this->appendDebug($this->currentSchema->getDebug());
-            $this->currentSchema->clearDebug();
-        } elseif (preg_match('/schema$/', $name)) {
-        	$this->debug('Parsing WSDL schema');
-            // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")");
-            $this->status = 'schema';
-            $this->currentSchema = new nusoap_xmlschema('', '', $this->namespaces);
-            $this->currentSchema->schemaStartElement($parser, $name, $attrs);
-            $this->appendDebug($this->currentSchema->getDebug());
-            $this->currentSchema->clearDebug();
-        } else {
-            // position in the total number of elements, starting from 0
-            $pos = $this->position++;
-            $depth = $this->depth++; 
-            // set self as current value for this depth
-            $this->depth_array[$depth] = $pos;
-            $this->message[$pos] = array('cdata' => ''); 
-            // process attributes
-            if (count($attrs) > 0) {
-				// register namespace declarations
-                foreach($attrs as $k => $v) {
-                    if (preg_match('/^xmlns/',$k)) {
-                        if ($ns_prefix = substr(strrchr($k, ':'), 1)) {
-                            $this->namespaces[$ns_prefix] = $v;
-                        } else {
-                            $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v;
-                        } 
-                        if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') {
-                            $this->XMLSchemaVersion = $v;
-                            $this->namespaces['xsi'] = $v . '-instance';
-                        } 
-                    }
-                }
-                // expand each attribute prefix to its namespace
-                foreach($attrs as $k => $v) {
-                    $k = strpos($k, ':') ? $this->expandQname($k) : $k;
-                    if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') {
-                        $v = strpos($v, ':') ? $this->expandQname($v) : $v;
-                    } 
-                    $eAttrs[$k] = $v;
-                } 
-                $attrs = $eAttrs;
-            } else {
-                $attrs = array();
-            } 
-            // get element prefix, namespace and name
-            if (preg_match('/:/', $name)) {
-                // get ns prefix
-                $prefix = substr($name, 0, strpos($name, ':')); 
-                // get ns
-                $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; 
-                // get unqualified name
-                $name = substr(strstr($name, ':'), 1);
-            } 
-			// process attributes, expanding any prefixes to namespaces
-            // find status, register data
-            switch ($this->status) {
-                case 'message':
-                    if ($name == 'part') {
-			            if (isset($attrs['type'])) {
-		                    $this->debug("msg " . $this->currentMessage . ": found part (with type) $attrs[name]: " . implode(',', $attrs));
-		                    $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type'];
-            			} 
-			            if (isset($attrs['element'])) {
-		                    $this->debug("msg " . $this->currentMessage . ": found part (with element) $attrs[name]: " . implode(',', $attrs));
-			                $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element'] . '^';
-			            } 
-        			} 
-        			break;
-			    case 'portType':
-			        switch ($name) {
-			            case 'operation':
-			                $this->currentPortOperation = $attrs['name'];
-			                $this->debug("portType $this->currentPortType operation: $this->currentPortOperation");
-			                if (isset($attrs['parameterOrder'])) {
-			                	$this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder'];
-			        		} 
-			        		break;
-					    case 'documentation':
-					        $this->documentation = true;
-					        break; 
-					    // merge input/output data
-					    default:
-					        $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : '';
-					        $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m;
-					        break;
-					} 
-			    	break;
-				case 'binding':
-				    switch ($name) {
-				        case 'binding': 
-				            // get ns prefix
-				            if (isset($attrs['style'])) {
-				            $this->bindings[$this->currentBinding]['prefix'] = $prefix;
-					    	} 
-					    	$this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs);
-					    	break;
-						case 'header':
-						    $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs;
-						    break;
-						case 'operation':
-						    if (isset($attrs['soapAction'])) {
-						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction'];
-						    } 
-						    if (isset($attrs['style'])) {
-						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style'];
-						    } 
-						    if (isset($attrs['name'])) {
-						        $this->currentOperation = $attrs['name'];
-						        $this->debug("current binding operation: $this->currentOperation");
-						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name'];
-						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding;
-						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : '';
-						    } 
-						    break;
-						case 'input':
-						    $this->opStatus = 'input';
-						    break;
-						case 'output':
-						    $this->opStatus = 'output';
-						    break;
-						case 'body':
-						    if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) {
-						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs);
-						    } else {
-						        $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs;
-						    } 
-						    break;
-					} 
-					break;
-				case 'service':
-					switch ($name) {
-					    case 'port':
-					        $this->currentPort = $attrs['name'];
-					        $this->debug('current port: ' . $this->currentPort);
-					        $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']);
-					
-					        break;
-					    case 'address':
-					        $this->ports[$this->currentPort]['location'] = $attrs['location'];
-					        $this->ports[$this->currentPort]['bindingType'] = $namespace;
-					        $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace;
-					        $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location'];
-					        break;
-					} 
-					break;
-			} 
-		// set status
-		switch ($name) {
-			case 'import':
-			    if (isset($attrs['location'])) {
-                    $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false);
-                    $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')');
-				} else {
-                    $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true);
-					if (! $this->getPrefixFromNamespace($attrs['namespace'])) {
-						$this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace'];
-					}
-                    $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')');
-				}
-				break;
-			//wait for schema
-			//case 'types':
-			//	$this->status = 'schema';
-			//	break;
-			case 'message':
-				$this->status = 'message';
-				$this->messages[$attrs['name']] = array();
-				$this->currentMessage = $attrs['name'];
-				break;
-			case 'portType':
-				$this->status = 'portType';
-				$this->portTypes[$attrs['name']] = array();
-				$this->currentPortType = $attrs['name'];
-				break;
-			case "binding":
-				if (isset($attrs['name'])) {
-				// get binding name
-					if (strpos($attrs['name'], ':')) {
-			    		$this->currentBinding = $this->getLocalPart($attrs['name']);
-					} else {
-			    		$this->currentBinding = $attrs['name'];
-					} 
-					$this->status = 'binding';
-					$this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']);
-					$this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']);
-				} 
-				break;
-			case 'service':
-				$this->serviceName = $attrs['name'];
-				$this->status = 'service';
-				$this->debug('current service: ' . $this->serviceName);
-				break;
-			case 'definitions':
-				foreach ($attrs as $name => $value) {
-					$this->wsdl_info[$name] = $value;
-				} 
-				break;
-			} 
-		} 
-	} 
-
-	/**
-	* end-element handler
-	* 
-	* @param string $parser XML parser object
-	* @param string $name element name
-	* @access private 
-	*/
-	function end_element($parser, $name){ 
-		// unset schema status
-		if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) {
-			$this->status = "";
-            $this->appendDebug($this->currentSchema->getDebug());
-            $this->currentSchema->clearDebug();
-			$this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema;
-        	$this->debug('Parsing WSDL schema done');
-		} 
-		if ($this->status == 'schema') {
-			$this->currentSchema->schemaEndElement($parser, $name);
-		} else {
-			// bring depth down a notch
-			$this->depth--;
-		} 
-		// end documentation
-		if ($this->documentation) {
-			//TODO: track the node to which documentation should be assigned; it can be a part, message, etc.
-			//$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation;
-			$this->documentation = false;
-		} 
-	} 
-
-	/**
-	 * element content handler
-	 * 
-	 * @param string $parser XML parser object
-	 * @param string $data element content
-	 * @access private 
-	 */
-	function character_data($parser, $data)
-	{
-		$pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0;
-		if (isset($this->message[$pos]['cdata'])) {
-			$this->message[$pos]['cdata'] .= $data;
-		} 
-		if ($this->documentation) {
-			$this->documentation .= $data;
-		} 
-	} 
-
-	/**
-	* if authenticating, set user credentials here
-	*
-	* @param    string $username
-	* @param    string $password
-	* @param	string $authtype (basic|digest|certificate|ntlm)
-	* @param	array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, certpassword (optional), verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)
-	* @access   public
-	*/
-	function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) {
-		$this->debug("setCredentials username=$username authtype=$authtype certRequest=");
-		$this->appendDebug($this->varDump($certRequest));
-		$this->username = $username;
-		$this->password = $password;
-		$this->authtype = $authtype;
-		$this->certRequest = $certRequest;
-	}
-	
-	function getBindingData($binding)
-	{
-		if (is_array($this->bindings[$binding])) {
-			return $this->bindings[$binding];
-		} 
-	}
-	
-	/**
-	 * returns an assoc array of operation names => operation data
-	 * 
-	 * @param string $portName WSDL port name
-	 * @param string $bindingType eg: soap, smtp, dime (only soap and soap12 are currently supported)
-	 * @return array 
-	 * @access public 
-	 */
-	function getOperations($portName = '', $bindingType = 'soap') {
-		$ops = array();
-		if ($bindingType == 'soap') {
-			$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
-		} elseif ($bindingType == 'soap12') {
-			$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/';
-		} else {
-			$this->debug("getOperations bindingType $bindingType may not be supported");
-		}
-		$this->debug("getOperations for port '$portName' bindingType $bindingType");
-		// loop thru ports
-		foreach($this->ports as $port => $portData) {
-			$this->debug("getOperations checking port $port bindingType " . $portData['bindingType']);
-			if ($portName == '' || $port == $portName) {
-				// binding type of port matches parameter
-				if ($portData['bindingType'] == $bindingType) {
-					$this->debug("getOperations found port $port bindingType $bindingType");
-					//$this->debug("port data: " . $this->varDump($portData));
-					//$this->debug("bindings: " . $this->varDump($this->bindings[ $portData['binding'] ]));
-					// merge bindings
-					if (isset($this->bindings[ $portData['binding'] ]['operations'])) {
-						$ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']);
-					}
-				}
-			}
-		}
-		if (count($ops) == 0) {
-			$this->debug("getOperations found no operations for port '$portName' bindingType $bindingType");
-		}
-		return $ops;
-	} 
-	
-	/**
-	 * returns an associative array of data necessary for calling an operation
-	 * 
-	 * @param string $operation name of operation
-	 * @param string $bindingType type of binding eg: soap, soap12
-	 * @return array 
-	 * @access public 
-	 */
-	function getOperationData($operation, $bindingType = 'soap')
-	{
-		if ($bindingType == 'soap') {
-			$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
-		} elseif ($bindingType == 'soap12') {
-			$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/';
-		}
-		// loop thru ports
-		foreach($this->ports as $port => $portData) {
-			// binding type of port matches parameter
-			if ($portData['bindingType'] == $bindingType) {
-				// get binding
-				//foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
-				foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) {
-					// note that we could/should also check the namespace here
-					if ($operation == $bOperation) {
-						$opData = $this->bindings[ $portData['binding'] ]['operations'][$operation];
-					    return $opData;
-					} 
-				} 
-			}
-		} 
-	}
-	
-	/**
-	 * returns an associative array of data necessary for calling an operation
-	 * 
-	 * @param string $soapAction soapAction for operation
-	 * @param string $bindingType type of binding eg: soap, soap12
-	 * @return array 
-	 * @access public 
-	 */
-	function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') {
-		if ($bindingType == 'soap') {
-			$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/';
-		} elseif ($bindingType == 'soap12') {
-			$bindingType = 'http://schemas.xmlsoap.org/wsdl/soap12/';
-		}
-		// loop thru ports
-		foreach($this->ports as $port => $portData) {
-			// binding type of port matches parameter
-			if ($portData['bindingType'] == $bindingType) {
-				// loop through operations for the binding
-				foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) {
-					if ($opData['soapAction'] == $soapAction) {
-					    return $opData;
-					} 
-				} 
-			}
-		} 
-	}
-	
-	/**
-    * returns an array of information about a given type
-    * returns false if no type exists by the given name
-    *
-	*	 typeDef = array(
-	*	 'elements' => array(), // refs to elements array
-	*	'restrictionBase' => '',
-	*	'phpType' => '',
-	*	'order' => '(sequence|all)',
-	*	'attrs' => array() // refs to attributes array
-	*	)
-    *
-    * @param string $type the type
-    * @param string $ns namespace (not prefix) of the type
-    * @return mixed
-    * @access public
-    * @see nusoap_xmlschema
-    */
-	function getTypeDef($type, $ns) {
-		$this->debug("in getTypeDef: type=$type, ns=$ns");
-		if ((! $ns) && isset($this->namespaces['tns'])) {
-			$ns = $this->namespaces['tns'];
-			$this->debug("in getTypeDef: type namespace forced to $ns");
-		}
-		if (!isset($this->schemas[$ns])) {
-			foreach ($this->schemas as $ns0 => $schema0) {
-				if (strcasecmp($ns, $ns0) == 0) {
-					$this->debug("in getTypeDef: replacing schema namespace $ns with $ns0");
-					$ns = $ns0;
-					break;
-				}
-			}
-		}
-		if (isset($this->schemas[$ns])) {
-			$this->debug("in getTypeDef: have schema for namespace $ns");
-			for ($i = 0; $i < count($this->schemas[$ns]); $i++) {
-				$xs = &$this->schemas[$ns][$i];
-				$t = $xs->getTypeDef($type);
-				$this->appendDebug($xs->getDebug());
-				$xs->clearDebug();
-				if ($t) {
-					$this->debug("in getTypeDef: found type $type");
-					if (!isset($t['phpType'])) {
-						// get info for type to tack onto the element
-						$uqType = substr($t['type'], strrpos($t['type'], ':') + 1);
-						$ns = substr($t['type'], 0, strrpos($t['type'], ':'));
-						$etype = $this->getTypeDef($uqType, $ns);
-						if ($etype) {
-							$this->debug("found type for [element] $type:");
-							$this->debug($this->varDump($etype));
-							if (isset($etype['phpType'])) {
-								$t['phpType'] = $etype['phpType'];
-							}
-							if (isset($etype['elements'])) {
-								$t['elements'] = $etype['elements'];
-							}
-							if (isset($etype['attrs'])) {
-								$t['attrs'] = $etype['attrs'];
-							}
-						} else {
-							$this->debug("did not find type for [element] $type");
-						}
-					}
-					return $t;
-				}
-			}
-			$this->debug("in getTypeDef: did not find type $type");
-		} else {
-			$this->debug("in getTypeDef: do not have schema for namespace $ns");
-		}
-		return false;
-	}
-
-    /**
-    * prints html description of services
-    *
-    * @access private
-    */
-    function webDescription(){
-    	global $HTTP_SERVER_VARS;
-
-		if (isset($_SERVER)) {
-			$PHP_SELF = $_SERVER['PHP_SELF'];
-		} elseif (isset($HTTP_SERVER_VARS)) {
-			$PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
-		} else {
-			$this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available");
-		}
-
-		$b = '
-		<html><head><title>NuSOAP: '.$this->serviceName.'</title>
-		<style type="text/css">
-		    body    { font-family: arial; color: #000000; background-color: #ffffff; margin: 0px 0px 0px 0px; }
-		    p       { font-family: arial; color: #000000; margin-top: 0px; margin-bottom: 12px; }
-		    pre { background-color: silver; padding: 5px; font-family: Courier New; font-size: x-small; color: #000000;}
-		    ul      { margin-top: 10px; margin-left: 20px; }
-		    li      { list-style-type: none; margin-top: 10px; color: #000000; }
-		    .content{
-			margin-left: 0px; padding-bottom: 2em; }
-		    .nav {
-			padding-top: 10px; padding-bottom: 10px; padding-left: 15px; font-size: .70em;
-			margin-top: 10px; margin-left: 0px; color: #000000;
-			background-color: #ccccff; width: 20%; margin-left: 20px; margin-top: 20px; }
-		    .title {
-			font-family: arial; font-size: 26px; color: #ffffff;
-			background-color: #999999; width: 100%;
-			margin-left: 0px; margin-right: 0px;
-			padding-top: 10px; padding-bottom: 10px;}
-		    .hidden {
-			position: absolute; visibility: hidden; z-index: 200; left: 250px; top: 100px;
-			font-family: arial; overflow: hidden; width: 600;
-			padding: 20px; font-size: 10px; background-color: #999999;
-			layer-background-color:#FFFFFF; }
-		    a,a:active  { color: charcoal; font-weight: bold; }
-		    a:visited   { color: #666666; font-weight: bold; }
-		    a:hover     { color: cc3300; font-weight: bold; }
-		</style>
-		<script language="JavaScript" type="text/javascript">
-		<!--
-		// POP-UP CAPTIONS...
-		function lib_bwcheck(){ //Browsercheck (needed)
-		    this.ver=navigator.appVersion
-		    this.agent=navigator.userAgent
-		    this.dom=document.getElementById?1:0
-		    this.opera5=this.agent.indexOf("Opera 5")>-1
-		    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
-		    this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
-		    this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
-		    this.ie=this.ie4||this.ie5||this.ie6
-		    this.mac=this.agent.indexOf("Mac")>-1
-		    this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
-		    this.ns4=(document.layers && !this.dom)?1:0;
-		    this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
-		    return this
-		}
-		var bw = new lib_bwcheck()
-		//Makes crossbrowser object.
-		function makeObj(obj){
-		    this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0;
-		    if(!this.evnt) return false
-		    this.css=bw.dom||bw.ie4?this.evnt.style:bw.ns4?this.evnt:0;
-		    this.wref=bw.dom||bw.ie4?this.evnt:bw.ns4?this.css.document:0;
-		    this.writeIt=b_writeIt;
-		    return this
-		}
-		// A unit of measure that will be added when setting the position of a layer.
-		//var px = bw.ns4||window.opera?"":"px";
-		function b_writeIt(text){
-		    if (bw.ns4){this.wref.write(text);this.wref.close()}
-		    else this.wref.innerHTML = text
-		}
-		//Shows the messages
-		var oDesc;
-		function popup(divid){
-		    if(oDesc = new makeObj(divid)){
-			oDesc.css.visibility = "visible"
-		    }
-		}
-		function popout(){ // Hides message
-		    if(oDesc) oDesc.css.visibility = "hidden"
-		}
-		//-->
-		</script>
-		</head>
-		<body>
-		<div class=content>
-			<br><br>
-			<div class=title>'.$this->serviceName.'</div>
-			<div class=nav>
-				<p>View the <a href="'.$PHP_SELF.'?wsdl">WSDL</a> for the service.
-				Click on an operation name to view it's details.</p>
-				<ul>';
-				foreach($this->getOperations() as $op => $data){
-				    $b .= "<li><a href='#' onclick=\"popout();popup('$op')\">$op</a></li>";
-				    // create hidden div
-				    $b .= "<div id='$op' class='hidden'>
-				    <a href='#' onclick='popout()'><font color='#ffffff'>Close</font></a><br><br>";
-				    foreach($data as $donnie => $marie){ // loop through opdata
-						if($donnie == 'input' || $donnie == 'output'){ // show input/output data
-						    $b .= "<font color='white'>".ucfirst($donnie).':</font><br>';
-						    foreach($marie as $captain => $tenille){ // loop through data
-								if($captain == 'parts'){ // loop thru parts
-								    $b .= "  $captain:<br>";
-					                //if(is_array($tenille)){
-								    	foreach($tenille as $joanie => $chachi){
-											$b .= "    $joanie: $chachi<br>";
-								    	}
-					        		//}
-								} else {
-								    $b .= "  $captain: $tenille<br>";
-								}
-						    }
-						} else {
-						    $b .= "<font color='white'>".ucfirst($donnie).":</font> $marie<br>";
-						}
-				    }
-					$b .= '</div>';
-				}
-				$b .= '
-				<ul>
-			</div>
-		</div></body></html>';
-		return $b;
-    }
-
-	/**
-	* serialize the parsed wsdl
-	*
-	* @param mixed $debug whether to put debug=1 in endpoint URL
-	* @return string serialization of WSDL
-	* @access public 
-	*/
-	function serialize($debug = 0)
-	{
-		$xml = '<?xml version="1.0" encoding="ISO-8859-1"?>';
-		$xml .= "\n<definitions";
-		foreach($this->namespaces as $k => $v) {
-			$xml .= " xmlns:$k=\"$v\"";
-		} 
-		// 10.9.02 - add poulter fix for wsdl and tns declarations
-		if (isset($this->namespaces['wsdl'])) {
-			$xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\"";
-		} 
-		if (isset($this->namespaces['tns'])) {
-			$xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\"";
-		} 
-		$xml .= '>'; 
-		// imports
-		if (sizeof($this->import) > 0) {
-			foreach($this->import as $ns => $list) {
-				foreach ($list as $ii) {
-					if ($ii['location'] != '') {
-						$xml .= '<import location="' . $ii['location'] . '" namespace="' . $ns . '" />';
-					} else {
-						$xml .= '<import namespace="' . $ns . '" />';
-					}
-				}
-			} 
-		} 
-		// types
-		if (count($this->schemas)>=1) {
-			$xml .= "\n<types>\n";
-			foreach ($this->schemas as $ns => $list) {
-				foreach ($list as $xs) {
-					$xml .= $xs->serializeSchema();
-				}
-			}
-			$xml .= '</types>';
-		} 
-		// messages
-		if (count($this->messages) >= 1) {
-			foreach($this->messages as $msgName => $msgParts) {
-				$xml .= "\n<message name=\"" . $msgName . '">';
-				if(is_array($msgParts)){
-					foreach($msgParts as $partName => $partType) {
-						// print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'<br>';
-						if (strpos($partType, ':')) {
-						    $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType));
-						} elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) {
-						    // print 'checking typemap: '.$this->XMLSchemaVersion.'<br>';
-						    $typePrefix = 'xsd';
-						} else {
-						    foreach($this->typemap as $ns => $types) {
-						        if (isset($types[$partType])) {
-						            $typePrefix = $this->getPrefixFromNamespace($ns);
-						        } 
-						    } 
-						    if (!isset($typePrefix)) {
-						        die("$partType has no namespace!");
-						    } 
-						}
-						$ns = $this->getNamespaceFromPrefix($typePrefix);
-						$localPart = $this->getLocalPart($partType);
-						$typeDef = $this->getTypeDef($localPart, $ns);
-						if ($typeDef['typeClass'] == 'element') {
-							$elementortype = 'element';
-							if (substr($localPart, -1) == '^') {
-								$localPart = substr($localPart, 0, -1);
-							}
-						} else {
-							$elementortype = 'type';
-						}
-						$xml .= "\n" . '  <part name="' . $partName . '" ' . $elementortype . '="' . $typePrefix . ':' . $localPart . '" />';
-					}
-				}
-				$xml .= '</message>';
-			} 
-		} 
-		// bindings & porttypes
-		if (count($this->bindings) >= 1) {
-			$binding_xml = '';
-			$portType_xml = '';
-			foreach($this->bindings as $bindingName => $attrs) {
-				$binding_xml .= "\n<binding name=\"" . $bindingName . '" type="tns:' . $attrs['portType'] . '">';
-				$binding_xml .= "\n" . '  <soap:binding style="' . $attrs['style'] . '" transport="' . $attrs['transport'] . '"/>';
-				$portType_xml .= "\n<portType name=\"" . $attrs['portType'] . '">';
-				foreach($attrs['operations'] as $opName => $opParts) {
-					$binding_xml .= "\n" . '  <operation name="' . $opName . '">';
-					$binding_xml .= "\n" . '    <soap:operation soapAction="' . $opParts['soapAction'] . '" style="'. $opParts['style'] . '"/>';
-					if (isset($opParts['input']['encodingStyle']) && $opParts['input']['encodingStyle'] != '') {
-						$enc_style = ' encodingStyle="' . $opParts['input']['encodingStyle'] . '"';
-					} else {
-						$enc_style = '';
-					}
-					$binding_xml .= "\n" . '    <input><soap:body use="' . $opParts['input']['use'] . '" namespace="' . $opParts['input']['namespace'] . '"' . $enc_style . '/></input>';
-					if (isset($opParts['output']['encodingStyle']) && $opParts['output']['encodingStyle'] != '') {
-						$enc_style = ' encodingStyle="' . $opParts['output']['encodingStyle'] . '"';
-					} else {
-						$enc_style = '';
-					}
-					$binding_xml .= "\n" . '    <output><soap:body use="' . $opParts['output']['use'] . '" namespace="' . $opParts['output']['namespace'] . '"' . $enc_style . '/></output>';
-					$binding_xml .= "\n" . '  </operation>';
-					$portType_xml .= "\n" . '  <operation name="' . $opParts['name'] . '"';
-					if (isset($opParts['parameterOrder'])) {
-					    $portType_xml .= ' parameterOrder="' . $opParts['parameterOrder'] . '"';
-					} 
-					$portType_xml .= '>';
-					if(isset($opParts['documentation']) && $opParts['documentation'] != '') {
-						$portType_xml .= "\n" . '    <documentation>' . htmlspecialchars($opParts['documentation']) . '</documentation>';
-					}
-					$portType_xml .= "\n" . '    <input message="tns:' . $opParts['input']['message'] . '"/>';
-					$portType_xml .= "\n" . '    <output message="tns:' . $opParts['output']['message'] . '"/>';
-					$portType_xml .= "\n" . '  </operation>';
-				} 
-				$portType_xml .= "\n" . '</portType>';
-				$binding_xml .= "\n" . '</binding>';
-			} 
-			$xml .= $portType_xml . $binding_xml;
-		} 
-		// services
-		$xml .= "\n<service name=\"" . $this->serviceName . '">';
-		if (count($this->ports) >= 1) {
-			foreach($this->ports as $pName => $attrs) {
-				$xml .= "\n" . '  <port name="' . $pName . '" binding="tns:' . $attrs['binding'] . '">';
-				$xml .= "\n" . '    <soap:address location="' . $attrs['location'] . ($debug ? '?debug=1' : '') . '"/>';
-				$xml .= "\n" . '  </port>';
-			} 
-		} 
-		$xml .= "\n" . '</service>';
-		return $xml . "\n</definitions>";
-	} 
-
-	/**
-	 * determine whether a set of parameters are unwrapped
-	 * when they are expect to be wrapped, Microsoft-style.
-	 *
-	 * @param string $type the type (element name) of the wrapper
-	 * @param array $parameters the parameter values for the SOAP call
-	 * @return boolean whether they parameters are unwrapped (and should be wrapped)
-	 * @access private
-	 */
-	function parametersMatchWrapped($type, &$parameters) {
-		$this->debug("in parametersMatchWrapped type=$type, parameters=");
-		$this->appendDebug($this->varDump($parameters));
-
-		// split type into namespace:unqualified-type
-		if (strpos($type, ':')) {
-			$uqType = substr($type, strrpos($type, ':') + 1);
-			$ns = substr($type, 0, strrpos($type, ':'));
-			$this->debug("in parametersMatchWrapped: got a prefixed type: $uqType, $ns");
-			if ($this->getNamespaceFromPrefix($ns)) {
-				$ns = $this->getNamespaceFromPrefix($ns);
-				$this->debug("in parametersMatchWrapped: expanded prefixed type: $uqType, $ns");
-			}
-		} else {
-			// TODO: should the type be compared to types in XSD, and the namespace
-			// set to XSD if the type matches?
-			$this->debug("in parametersMatchWrapped: No namespace for type $type");
-			$ns = '';
-			$uqType = $type;
-		}
-
-		// get the type information
-		if (!$typeDef = $this->getTypeDef($uqType, $ns)) {
-			$this->debug("in parametersMatchWrapped: $type ($uqType) is not a supported type.");
-			return false;
-		}
-		$this->debug("in parametersMatchWrapped: found typeDef=");
-		$this->appendDebug($this->varDump($typeDef));
-		if (substr($uqType, -1) == '^') {
-			$uqType = substr($uqType, 0, -1);
-		}
-		$phpType = $typeDef['phpType'];
-		$arrayType = (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '');
-		$this->debug("in parametersMatchWrapped: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: $arrayType");
-		
-		// we expect a complexType or element of complexType
-		if ($phpType != 'struct') {
-			$this->debug("in parametersMatchWrapped: not a struct");
-			return false;
-		}
-
-		// see whether the parameter names match the elements
-		if (isset($typeDef['elements']) && is_array($typeDef['elements'])) {
-			$elements = 0;
-			$matches = 0;
-			foreach ($typeDef['elements'] as $name => $attrs) {
-				if (isset($parameters[$name])) {
-					$this->debug("in parametersMatchWrapped: have parameter named $name");
-					$matches++;
-				} else {
-					$this->debug("in parametersMatchWrapped: do not have parameter named $name");
-				}
-				$elements++;
-			}
-
-			$this->debug("in parametersMatchWrapped: $matches parameter names match $elements wrapped parameter names");
-			if ($matches == 0) {
-				return false;
-			}
-			return true;
-		}
-
-		// since there are no elements for the type, if the user passed no
-		// parameters, the parameters match wrapped.
-		$this->debug("in parametersMatchWrapped: no elements type $ns:$uqType");
-		return count($parameters) == 0;
-	}
-
-	/**
-	 * serialize PHP values according to a WSDL message definition
-	 * contrary to the method name, this is not limited to RPC
-	 *
-	 * TODO
-	 * - multi-ref serialization
-	 * - validate PHP values against type definitions, return errors if invalid
-	 * 
-	 * @param string $operation operation name
-	 * @param string $direction (input|output)
-	 * @param mixed $parameters parameter value(s)
-	 * @param string $bindingType (soap|soap12)
-	 * @return mixed parameters serialized as XML or false on error (e.g. operation not found)
-	 * @access public
-	 */
-	function serializeRPCParameters($operation, $direction, $parameters, $bindingType = 'soap') {
-		$this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion, bindingType=$bindingType");
-		$this->appendDebug('parameters=' . $this->varDump($parameters));
-		
-		if ($direction != 'input' && $direction != 'output') {
-			$this->debug('The value of the \$direction argument needs to be either "input" or "output"');
-			$this->setError('The value of the \$direction argument needs to be either "input" or "output"');
-			return false;
-		} 
-		if (!$opData = $this->getOperationData($operation, $bindingType)) {
-			$this->debug('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType);
-			$this->setError('Unable to retrieve WSDL data for operation: ' . $operation . ' bindingType: ' . $bindingType);
-			return false;
-		}
-		$this->debug('in serializeRPCParameters: opData:');
-		$this->appendDebug($this->varDump($opData));
-
-		// Get encoding style for output and set to current
-		$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
-		if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) {
-			$encodingStyle = $opData['output']['encodingStyle'];
-			$enc_style = $encodingStyle;
-		}
-
-		// set input params
-		$xml = '';
-		if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) {
-			$parts = &$opData[$direction]['parts'];
-			$part_count = sizeof($parts);
-			$style = $opData['style'];
-			$use = $opData[$direction]['use'];
-			$this->debug("have $part_count part(s) to serialize using $style/$use");
-			if (is_array($parameters)) {
-				$parametersArrayType = $this->isArraySimpleOrStruct($parameters);
-				$parameter_count = count($parameters);
-				$this->debug("have $parameter_count parameter(s) provided as $parametersArrayType to serialize");
-				// check for Microsoft-style wrapped parameters
-				if ($style == 'document' && $use == 'literal' && $part_count == 1 && isset($parts['parameters'])) {
-					$this->debug('check whether the caller has wrapped the parameters');
-					if ($direction == 'output' && $parametersArrayType == 'arraySimple' && $parameter_count == 1) {
-						// TODO: consider checking here for double-wrapping, when
-						// service function wraps, then NuSOAP wraps again
-						$this->debug("change simple array to associative with 'parameters' element");
-						$parameters['parameters'] = $parameters[0];
-						unset($parameters[0]);
-					}
-					if (($parametersArrayType == 'arrayStruct' || $parameter_count == 0) && !isset($parameters['parameters'])) {
-						$this->debug('check whether caller\'s parameters match the wrapped ones');
-						if ($this->parametersMatchWrapped($parts['parameters'], $parameters)) {
-							$this->debug('wrap the parameters for the caller');
-							$parameters = array('parameters' => $parameters);
-							$parameter_count = 1;
-						}
-					}
-				}
-				foreach ($parts as $name => $type) {
-					$this->debug("serializing part $name of type $type");
-					// Track encoding style
-					if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) {
-						$encodingStyle = $opData[$direction]['encodingStyle'];			
-						$enc_style = $encodingStyle;
-					} else {
-						$enc_style = false;
-					}
-					// NOTE: add error handling here
-					// if serializeType returns false, then catch global error and fault
-					if ($parametersArrayType == 'arraySimple') {
-						$p = array_shift($parameters);
-						$this->debug('calling serializeType w/indexed param');
-						$xml .= $this->serializeType($name, $type, $p, $use, $enc_style);
-					} elseif (isset($parameters[$name])) {
-						$this->debug('calling serializeType w/named param');
-						$xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style);
-					} else {
-						// TODO: only send nillable
-						$this->debug('calling serializeType w/null param');
-						$xml .= $this->serializeType($name, $type, null, $use, $enc_style);
-					}
-				}
-			} else {
-				$this->debug('no parameters passed.');
-			}
-		}
-		$this->debug("serializeRPCParameters returning: $xml");
-		return $xml;
-	} 
-	
-	/**
-	 * serialize a PHP value according to a WSDL message definition
-	 * 
-	 * TODO
-	 * - multi-ref serialization
-	 * - validate PHP values against type definitions, return errors if invalid
-	 * 
-	 * @param string $operation operation name
-	 * @param string $direction (input|output)
-	 * @param mixed $parameters parameter value(s)
-	 * @return mixed parameters serialized as XML or false on error (e.g. operation not found)
-	 * @access public
-	 * @deprecated
-	 */
-	function serializeParameters($operation, $direction, $parameters)
-	{
-		$this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); 
-		$this->appendDebug('parameters=' . $this->varDump($parameters));
-		
-		if ($direction != 'input' && $direction != 'output') {
-			$this->debug('The value of the \$direction argument needs to be either "input" or "output"');
-			$this->setError('The value of the \$direction argument needs to be either "input" or "output"');
-			return false;
-		} 
-		if (!$opData = $this->getOperationData($operation)) {
-			$this->debug('Unable to retrieve WSDL data for operation: ' . $operation);
-			$this->setError('Unable to retrieve WSDL data for operation: ' . $operation);
-			return false;
-		}
-		$this->debug('opData:');
-		$this->appendDebug($this->varDump($opData));
-		
-		// Get encoding style for output and set to current
-		$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
-		if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) {
-			$encodingStyle = $opData['output']['encodingStyle'];
-			$enc_style = $encodingStyle;
-		}
-		
-		// set input params
-		$xml = '';
-		if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) {
-			
-			$use = $opData[$direction]['use'];
-			$this->debug("use=$use");
-			$this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)');
-			if (is_array($parameters)) {
-				$parametersArrayType = $this->isArraySimpleOrStruct($parameters);
-				$this->debug('have ' . $parametersArrayType . ' parameters');
-				foreach($opData[$direction]['parts'] as $name => $type) {
-					$this->debug('serializing part "'.$name.'" of type "'.$type.'"');
-					// Track encoding style
-					if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) {
-						$encodingStyle = $opData[$direction]['encodingStyle'];			
-						$enc_style = $encodingStyle;
-					} else {
-						$enc_style = false;
-					}
-					// NOTE: add error handling here
-					// if serializeType returns false, then catch global error and fault
-					if ($parametersArrayType == 'arraySimple') {
-						$p = array_shift($parameters);
-						$this->debug('calling serializeType w/indexed param');
-						$xml .= $this->serializeType($name, $type, $p, $use, $enc_style);
-					} elseif (isset($parameters[$name])) {
-						$this->debug('calling serializeType w/named param');
-						$xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style);
-					} else {
-						// TODO: only send nillable
-						$this->debug('calling serializeType w/null param');
-						$xml .= $this->serializeType($name, $type, null, $use, $enc_style);
-					}
-				}
-			} else {
-				$this->debug('no parameters passed.');
-			}
-		}
-		$this->debug("serializeParameters returning: $xml");
-		return $xml;
-	} 
-	
-	/**
-	 * serializes a PHP value according a given type definition
-	 * 
-	 * @param string $name name of value (part or element)
-	 * @param string $type XML schema type of value (type or element)
-	 * @param mixed $value a native PHP value (parameter value)
-	 * @param string $use use for part (encoded|literal)
-	 * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style)
-	 * @param boolean $unqualified a kludge for what should be XML namespace form handling
-	 * @return string value serialized as an XML string
-	 * @access private
-	 */
-	function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false)
-	{
-		$this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified"));
-		$this->appendDebug("value=" . $this->varDump($value));
-		if($use == 'encoded' && $encodingStyle) {
-			$encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"';
-		}
-
-		// if a soapval has been supplied, let its type override the WSDL
-    	if (is_object($value) && get_class($value) == 'soapval') {
-    		if ($value->type_ns) {
-    			$type = $value->type_ns . ':' . $value->type;
-		    	$forceType = true;
-		    	$this->debug("in serializeType: soapval overrides type to $type");
-    		} elseif ($value->type) {
-	    		$type = $value->type;
-		    	$forceType = true;
-		    	$this->debug("in serializeType: soapval overrides type to $type");
-	    	} else {
-	    		$forceType = false;
-		    	$this->debug("in serializeType: soapval does not override type");
-	    	}
-	    	$attrs = $value->attributes;
-	    	$value = $value->value;
-	    	$this->debug("in serializeType: soapval overrides value to $value");
-	    	if ($attrs) {
-	    		if (!is_array($value)) {
-	    			$value['!'] = $value;
-	    		}
-	    		foreach ($attrs as $n => $v) {
-	    			$value['!' . $n] = $v;
-	    		}
-		    	$this->debug("in serializeType: soapval provides attributes");
-		    }
-        } else {
-        	$forceType = false;
-        }
-
-		$xml = '';
-		if (strpos($type, ':')) {
-			$uqType = substr($type, strrpos($type, ':') + 1);
-			$ns = substr($type, 0, strrpos($type, ':'));
-			$this->debug("in serializeType: got a prefixed type: $uqType, $ns");
-			if ($this->getNamespaceFromPrefix($ns)) {
-				$ns = $this->getNamespaceFromPrefix($ns);
-				$this->debug("in serializeType: expanded prefixed type: $uqType, $ns");
-			}
-
-			if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){
-				$this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type');
-				if ($unqualified && $use == 'literal') {
-					$elementNS = " xmlns=\"\"";
-				} else {
-					$elementNS = '';
-				}
-				if (is_null($value)) {
-					if ($use == 'literal') {
-						// TODO: depends on minOccurs
-						$xml = "<$name$elementNS/>";
-					} else {
-						// TODO: depends on nillable, which should be checked before calling this method
-						$xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>";
-					}
-					$this->debug("in serializeType: returning: $xml");
-					return $xml;
-				}
-				if ($uqType == 'Array') {
-					// JBoss/Axis does this sometimes
-					return $this->serialize_val($value, $name, false, false, false, false, $use);
-				}
-		    	if ($uqType == 'boolean') {
-		    		if ((is_string($value) && $value == 'false') || (! $value)) {
-						$value = 'false';
-					} else {
-						$value = 'true';
-					}
-				} 
-				if ($uqType == 'string' && gettype($value) == 'string') {
-					$value = $this->expandEntities($value);
-				}
-				if (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') {
-					$value = sprintf("%.0lf", $value);
-				}
-				// it's a scalar
-				// TODO: what about null/nil values?
-				// check type isn't a custom type extending xmlschema namespace
-				if (!$this->getTypeDef($uqType, $ns)) {
-					if ($use == 'literal') {
-						if ($forceType) {
-							$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>";
-						} else {
-							$xml = "<$name$elementNS>$value</$name>";
-						}
-					} else {
-						$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>";
-					}
-					$this->debug("in serializeType: returning: $xml");
-					return $xml;
-				}
-				$this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)');
-			} else if ($ns == 'http://xml.apache.org/xml-soap') {
-				$this->debug('in serializeType: appears to be Apache SOAP type');
-				if ($uqType == 'Map') {
-					$tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap');
-					if (! $tt_prefix) {
-						$this->debug('in serializeType: Add namespace for Apache SOAP type');
-						$tt_prefix = 'ns' . rand(1000, 9999);
-						$this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap';
-						// force this to be added to usedNamespaces
-						$tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap');
-					}
-					$contents = '';
-					foreach($value as $k => $v) {
-						$this->debug("serializing map element: key $k, value $v");
-						$contents .= '<item>';
-						$contents .= $this->serialize_val($k,'key',false,false,false,false,$use);
-						$contents .= $this->serialize_val($v,'value',false,false,false,false,$use);
-						$contents .= '</item>';
-					}
-					if ($use == 'literal') {
-						if ($forceType) {
-							$xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\">$contents</$name>";
-						} else {
-							$xml = "<$name>$contents</$name>";
-						}
-					} else {
-						$xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\"$encodingStyle>$contents</$name>";
-					}
-					$this->debug("in serializeType: returning: $xml");
-					return $xml;
-				}
-				$this->debug('in serializeType: Apache SOAP type, but only support Map');
-			}
-		} else {
-			// TODO: should the type be compared to types in XSD, and the namespace
-			// set to XSD if the type matches?
-			$this->debug("in serializeType: No namespace for type $type");
-			$ns = '';
-			$uqType = $type;
-		}
-		if(!$typeDef = $this->getTypeDef($uqType, $ns)){
-			$this->setError("$type ($uqType) is not a supported type.");
-			$this->debug("in serializeType: $type ($uqType) is not a supported type.");
-			return false;
-		} else {
-			$this->debug("in serializeType: found typeDef");
-			$this->appendDebug('typeDef=' . $this->varDump($typeDef));
-			if (substr($uqType, -1) == '^') {
-				$uqType = substr($uqType, 0, -1);
-			}
-		}
-		if (!isset($typeDef['phpType'])) {
-			$this->setError("$type ($uqType) has no phpType.");
-			$this->debug("in serializeType: $type ($uqType) has no phpType.");
-			return false;
-		}
-		$phpType = $typeDef['phpType'];
-		$this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); 
-		// if php type == struct, map value to the <all> element names
-		if ($phpType == 'struct') {
-			if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') {
-				$elementName = $uqType;
-				if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {
-					$elementNS = " xmlns=\"$ns\"";
-				} else {
-					$elementNS = " xmlns=\"\"";
-				}
-			} else {
-				$elementName = $name;
-				if ($unqualified) {
-					$elementNS = " xmlns=\"\"";
-				} else {
-					$elementNS = '';
-				}
-			}
-			if (is_null($value)) {
-				if ($use == 'literal') {
-					// TODO: depends on minOccurs and nillable
-					$xml = "<$elementName$elementNS/>";
-				} else {
-					$xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>";
-				}
-				$this->debug("in serializeType: returning: $xml");
-				return $xml;
-			}
-			if (is_object($value)) {
-				$value = get_object_vars($value);
-			}
-			if (is_array($value)) {
-				$elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType);
-				if ($use == 'literal') {
-					if ($forceType) {
-						$xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">";
-					} else {
-						$xml = "<$elementName$elementNS$elementAttrs>";
-					}
-				} else {
-					$xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>";
-				}
-
-				if (isset($typeDef['simpleContent']) && $typeDef['simpleContent'] == 'true') {
-					if (isset($value['!'])) {
-						$xml .= $value['!'];
-						$this->debug("in serializeType: serialized simpleContent for type $type");
-					} else {
-						$this->debug("in serializeType: no simpleContent to serialize for type $type");
-					}
-				} else {
-					// complexContent
-					$xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle);
-				}
-				$xml .= "</$elementName>";
-			} else {
-				$this->debug("in serializeType: phpType is struct, but value is not an array");
-				$this->setError("phpType is struct, but value is not an array: see debug output for details");
-				$xml = '';
-			}
-		} elseif ($phpType == 'array') {
-			if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {
-				$elementNS = " xmlns=\"$ns\"";
-			} else {
-				if ($unqualified) {
-					$elementNS = " xmlns=\"\"";
-				} else {
-					$elementNS = '';
-				}
-			}
-			if (is_null($value)) {
-				if ($use == 'literal') {
-					// TODO: depends on minOccurs
-					$xml = "<$name$elementNS/>";
-				} else {
-					$xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" .
-						$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .
-						":Array\" " .
-						$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .
-						':arrayType="' .
-						$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) .
-						':' .
-						$this->getLocalPart($typeDef['arrayType'])."[0]\"/>";
-				}
-				$this->debug("in serializeType: returning: $xml");
-				return $xml;
-			}
-			if (isset($typeDef['multidimensional'])) {
-				$nv = array();
-				foreach($value as $v) {
-					$cols = ',' . sizeof($v);
-					$nv = array_merge($nv, $v);
-				} 
-				$value = $nv;
-			} else {
-				$cols = '';
-			} 
-			if (is_array($value) && sizeof($value) >= 1) {
-				$rows = sizeof($value);
-				$contents = '';
-				foreach($value as $k => $v) {
-					//$this->debug("serializing array element: $k, $v of type: ".$typeDef['arrayType']);
-					//if (strpos($typeDef['arrayType'], ':') ) {
-					if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) {
-					    $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use);
-					} else {
-					    $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use);
-					} 
-				}
-			} else {
-				$rows = 0;
-				$contents = null;
-			}
-			// TODO: for now, an empty value will be serialized as a zero element
-			// array.  Revisit this when coding the handling of null/nil values.
-			if ($use == 'literal') {
-				$xml = "<$name$elementNS>"
-					.$contents
-					."</$name>";
-			} else {
-				$xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array" '.
-					$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/')
-					.':arrayType="'
-					.$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType']))
-					.":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">"
-					.$contents
-					."</$name>";
-			}
-		} elseif ($phpType == 'scalar') {
-			if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) {
-				$elementNS = " xmlns=\"$ns\"";
-			} else {
-				if ($unqualified) {
-					$elementNS = " xmlns=\"\"";
-				} else {
-					$elementNS = '';
-				}
-			}
-			if ($use == 'literal') {
-				if ($forceType) {
-					$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>";
-				} else {
-					$xml = "<$name$elementNS>$value</$name>";
-				}
-			} else {
-				$xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>";
-			}
-		}
-		$this->debug("in serializeType: returning: $xml");
-		return $xml;
-	}
-	
-	/**
-	 * serializes the attributes for a complexType
-	 *
-	 * @param array $typeDef our internal representation of an XML schema type (or element)
-	 * @param mixed $value a native PHP value (parameter value)
-	 * @param string $ns the namespace of the type
-	 * @param string $uqType the local part of the type
-	 * @return string value serialized as an XML string
-	 * @access private
-	 */
-	function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) {
-		$this->debug("serializeComplexTypeAttributes for XML Schema type $ns:$uqType");
-		$xml = '';
-		if (isset($typeDef['extensionBase'])) {
-			$nsx = $this->getPrefix($typeDef['extensionBase']);
-			$uqTypex = $this->getLocalPart($typeDef['extensionBase']);
-			if ($this->getNamespaceFromPrefix($nsx)) {
-				$nsx = $this->getNamespaceFromPrefix($nsx);
-			}
-			if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) {
-				$this->debug("serialize attributes for extension base $nsx:$uqTypex");
-				$xml .= $this->serializeComplexTypeAttributes($typeDefx, $value, $nsx, $uqTypex);
-			} else {
-				$this->debug("extension base $nsx:$uqTypex is not a supported type");
-			}
-		}
-		if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) {
-			$this->debug("serialize attributes for XML Schema type $ns:$uqType");
-			if (is_array($value)) {
-				$xvalue = $value;
-			} elseif (is_object($value)) {
-				$xvalue = get_object_vars($value);
-			} else {
-				$this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType");
-				$xvalue = array();
-			}
-			foreach ($typeDef['attrs'] as $aName => $attrs) {
-				if (isset($xvalue['!' . $aName])) {
-					$xname = '!' . $aName;
-					$this->debug("value provided for attribute $aName with key $xname");
-				} elseif (isset($xvalue[$aName])) {
-					$xname = $aName;
-					$this->debug("value provided for attribute $aName with key $xname");
-				} elseif (isset($attrs['default'])) {
-					$xname = '!' . $aName;
-					$xvalue[$xname] = $attrs['default'];
-					$this->debug('use default value of ' . $xvalue[$aName] . ' for attribute ' . $aName);
-				} else {
-					$xname = '';
-					$this->debug("no value provided for attribute $aName");
-				}
-				if ($xname) {
-					$xml .=  " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\"";
-				}
-			} 
-		} else {
-			$this->debug("no attributes to serialize for XML Schema type $ns:$uqType");
-		}
-		return $xml;
-	}
-
-	/**
-	 * serializes the elements for a complexType
-	 *
-	 * @param array $typeDef our internal representation of an XML schema type (or element)
-	 * @param mixed $value a native PHP value (parameter value)
-	 * @param string $ns the namespace of the type
-	 * @param string $uqType the local part of the type
-	 * @param string $use use for part (encoded|literal)
-	 * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style)
-	 * @return string value serialized as an XML string
-	 * @access private
-	 */
-	function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) {
-		$this->debug("in serializeComplexTypeElements for XML Schema type $ns:$uqType");
-		$xml = '';
-		if (isset($typeDef['extensionBase'])) {
-			$nsx = $this->getPrefix($typeDef['extensionBase']);
-			$uqTypex = $this->getLocalPart($typeDef['extensionBase']);
-			if ($this->getNamespaceFromPrefix($nsx)) {
-				$nsx = $this->getNamespaceFromPrefix($nsx);
-			}
-			if ($typeDefx = $this->getTypeDef($uqTypex, $nsx)) {
-				$this->debug("serialize elements for extension base $nsx:$uqTypex");
-				$xml .= $this->serializeComplexTypeElements($typeDefx, $value, $nsx, $uqTypex, $use, $encodingStyle);
-			} else {
-				$this->debug("extension base $nsx:$uqTypex is not a supported type");
-			}
-		}
-		if (isset($typeDef['elements']) && is_array($typeDef['elements'])) {
-			$this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType");
-			if (is_array($value)) {
-				$xvalue = $value;
-			} elseif (is_object($value)) {
-				$xvalue = get_object_vars($value);
-			} else {
-				$this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType");
-				$xvalue = array();
-			}
-			// toggle whether all elements are present - ideally should validate against schema
-			if (count($typeDef['elements']) != count($xvalue)){
-				$optionals = true;
-			}
-			foreach ($typeDef['elements'] as $eName => $attrs) {
-				if (!isset($xvalue[$eName])) {
-					if (isset($attrs['default'])) {
-						$xvalue[$eName] = $attrs['default'];
-						$this->debug('use default value of ' . $xvalue[$eName] . ' for element ' . $eName);
-					}
-				}
-				// if user took advantage of a minOccurs=0, then only serialize named parameters
-				if (isset($optionals)
-				    && (!isset($xvalue[$eName])) 
-					&& ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true')
-					){
-					if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') {
-						$this->debug("apparent error: no value provided for element $eName with minOccurs=" . $attrs['minOccurs']);
-					}
-					// do nothing
-					$this->debug("no value provided for complexType element $eName and element is not nillable, so serialize nothing");
-				} else {
-					// get value
-					if (isset($xvalue[$eName])) {
-					    $v = $xvalue[$eName];
-					} else {
-					    $v = null;
-					}
-					if (isset($attrs['form'])) {
-						$unqualified = ($attrs['form'] == 'unqualified');
-					} else {
-						$unqualified = false;
-					}
-					if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') {
-						$vv = $v;
-						foreach ($vv as $k => $v) {
-							if (isset($attrs['type']) || isset($attrs['ref'])) {
-								// serialize schema-defined type
-							    $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified);
-							} else {
-								// serialize generic type (can this ever really happen?)
-							    $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use");
-							    $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use);
-							}
-						}
-					} else {
-						if (is_null($v) && isset($attrs['minOccurs']) && $attrs['minOccurs'] == '0') {
-							// do nothing
-						} elseif (is_null($v) && isset($attrs['nillable']) && $attrs['nillable'] == 'true') {
-							// TODO: serialize a nil correctly, but for now serialize schema-defined type
-						    $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified);
-						} elseif (isset($attrs['type']) || isset($attrs['ref'])) {
-							// serialize schema-defined type
-						    $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified);
-						} else {
-							// serialize generic type (can this ever really happen?)
-						    $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use");
-						    $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use);
-						}
-					}
-				}
-			} 
-		} else {
-			$this->debug("no elements to serialize for XML Schema type $ns:$uqType");
-		}
-		return $xml;
-	}
-
-	/**
-	* adds an XML Schema complex type to the WSDL types
-	*
-	* @param string	$name
-	* @param string $typeClass (complexType|simpleType|attribute)
-	* @param string $phpType currently supported are array and struct (php assoc array)
-	* @param string $compositor (all|sequence|choice)
-	* @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
-	* @param array $elements e.g. array ( name => array(name=>'',type=>'') )
-	* @param array $attrs e.g. array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]'))
-	* @param string $arrayType as namespace:name (xsd:string)
-	* @see nusoap_xmlschema
-	* @access public
-	*/
-	function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') {
-		if (count($elements) > 0) {
-			$eElements = array();
-	    	foreach($elements as $n => $e){
-	            // expand each element
-	            $ee = array();
-	            foreach ($e as $k => $v) {
-		            $k = strpos($k,':') ? $this->expandQname($k) : $k;
-		            $v = strpos($v,':') ? $this->expandQname($v) : $v;
-		            $ee[$k] = $v;
-		    	}
-	    		$eElements[$n] = $ee;
-	    	}
-	    	$elements = $eElements;
-		}
-		
-		if (count($attrs) > 0) {
-	    	foreach($attrs as $n => $a){
-	            // expand each attribute
-	            foreach ($a as $k => $v) {
-		            $k = strpos($k,':') ? $this->expandQname($k) : $k;
-		            $v = strpos($v,':') ? $this->expandQname($v) : $v;
-		            $aa[$k] = $v;
-		    	}
-	    		$eAttrs[$n] = $aa;
-	    	}
-	    	$attrs = $eAttrs;
-		}
-
-		$restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase;
-		$arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType;
-
-		$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
-		$this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,$elements,$attrs,$arrayType);
-	}
-
-	/**
-	* adds an XML Schema simple type to the WSDL types
-	*
-	* @param string $name
-	* @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array)
-	* @param string $typeClass (should always be simpleType)
-	* @param string $phpType (should always be scalar)
-	* @param array $enumeration array of values
-	* @see nusoap_xmlschema
-	* @access public
-	*/
-	function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) {
-		$restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase;
-
-		$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
-		$this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumeration);
-	}
-
-	/**
-	* adds an element to the WSDL types
-	*
-	* @param array $attrs attributes that must include name and type
-	* @see nusoap_xmlschema
-	* @access public
-	*/
-	function addElement($attrs) {
-		$typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns'];
-		$this->schemas[$typens][0]->addElement($attrs);
-	}
-
-	/**
-	* register an operation with the server
-	* 
-	* @param string $name operation (method) name
-	* @param array $in assoc array of input values: key = param name, value = param type
-	* @param array $out assoc array of output values: key = param name, value = param type
-	* @param string $namespace optional The namespace for the operation
-	* @param string $soapaction optional The soapaction for the operation
-	* @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically
-	* @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now)
-	* @param string $documentation optional The description to include in the WSDL
-	* @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded)
-	* @access public 
-	*/
-	function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){
-		if ($use == 'encoded' && $encodingStyle == '') {
-			$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
-		}
-
-		if ($style == 'document') {
-			$elements = array();
-			foreach ($in as $n => $t) {
-				$elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified');
-			}
-			$this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements);
-			$this->addElement(array('name' => $name, 'type' => $name . 'RequestType'));
-			$in = array('parameters' => 'tns:' . $name . '^');
-
-			$elements = array();
-			foreach ($out as $n => $t) {
-				$elements[$n] = array('name' => $n, 'type' => $t, 'form' => 'unqualified');
-			}
-			$this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements);
-			$this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType', 'form' => 'qualified'));
-			$out = array('parameters' => 'tns:' . $name . 'Response' . '^');
-		}
-
-		// get binding
-		$this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] =
-		array(
-		'name' => $name,
-		'binding' => $this->serviceName . 'Binding',
-		'endpoint' => $this->endpoint,
-		'soapAction' => $soapaction,
-		'style' => $style,
-		'input' => array(
-			'use' => $use,
-			'namespace' => $namespace,
-			'encodingStyle' => $encodingStyle,
-			'message' => $name . 'Request',
-			'parts' => $in),
-		'output' => array(
-			'use' => $use,
-			'namespace' => $namespace,
-			'encodingStyle' => $encodingStyle,
-			'message' => $name . 'Response',
-			'parts' => $out),
-		'namespace' => $namespace,
-		'transport' => 'http://schemas.xmlsoap.org/soap/http',
-		'documentation' => $documentation); 
-		// add portTypes
-		// add messages
-		if($in)
-		{
-			foreach($in as $pName => $pType)
-			{
-				if(strpos($pType,':')) {
-					$pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType);
-				}
-				$this->messages[$name.'Request'][$pName] = $pType;
-			}
-		} else {
-            $this->messages[$name.'Request']= '0';
-        }
-		if($out)
-		{
-			foreach($out as $pName => $pType)
-			{
-				if(strpos($pType,':')) {
-					$pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType);
-				}
-				$this->messages[$name.'Response'][$pName] = $pType;
-			}
-		} else {
-            $this->messages[$name.'Response']= '0';
-        }
-		return true;
-	} 
-}
-?><?php
-
-
-
-/**
-*
-* nusoap_parser class parses SOAP XML messages into native PHP values
-*
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @author   Scott Nichol <snichol at users.sourceforge.net>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access   public
-*/
-class nusoap_parser extends nusoap_base {
-
-	var $xml = '';
-	var $xml_encoding = '';
-	var $method = '';
-	var $root_struct = '';
-	var $root_struct_name = '';
-	var $root_struct_namespace = '';
-	var $root_header = '';
-    var $document = '';			// incoming SOAP body (text)
-	// determines where in the message we are (envelope,header,body,method)
-	var $status = '';
-	var $position = 0;
-	var $depth = 0;
-	var $default_namespace = '';
-	var $namespaces = array();
-	var $message = array();
-    var $parent = '';
-	var $fault = false;
-	var $fault_code = '';
-	var $fault_str = '';
-	var $fault_detail = '';
-	var $depth_array = array();
-	var $debug_flag = true;
-	var $soapresponse = NULL;	// parsed SOAP Body
-	var $soapheader = NULL;		// parsed SOAP Header
-	var $responseHeaders = '';	// incoming SOAP headers (text)
-	var $body_position = 0;
-	// for multiref parsing:
-	// array of id => pos
-	var $ids = array();
-	// array of id => hrefs => pos
-	var $multirefs = array();
-	// toggle for auto-decoding element content
-	var $decode_utf8 = true;
-
-	/**
-	* constructor that actually does the parsing
-	*
-	* @param    string $xml SOAP message
-	* @param    string $encoding character encoding scheme of message
-	* @param    string $method method for which XML is parsed (unused?)
-	* @param    string $decode_utf8 whether to decode UTF-8 to ISO-8859-1
-	* @access   public
-	*/
-	function nusoap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){
-		parent::nusoap_base();
-		$this->xml = $xml;
-		$this->xml_encoding = $encoding;
-		$this->method = $method;
-		$this->decode_utf8 = $decode_utf8;
-
-		// Check whether content has been read.
-		if(!empty($xml)){
-			// Check XML encoding
-			$pos_xml = strpos($xml, '<?xml');
-			if ($pos_xml !== FALSE) {
-				$xml_decl = substr($xml, $pos_xml, strpos($xml, '?>', $pos_xml + 2) - $pos_xml + 1);
-				if (preg_match("/encoding=[\"']([^\"']*)[\"']/", $xml_decl, $res)) {
-					$xml_encoding = $res[1];
-					if (strtoupper($xml_encoding) != $encoding) {
-						$err = "Charset from HTTP Content-Type '" . $encoding . "' does not match encoding from XML declaration '" . $xml_encoding . "'";
-						$this->debug($err);
-						if ($encoding != 'ISO-8859-1' || strtoupper($xml_encoding) != 'UTF-8') {
-							$this->setError($err);
-							return;
-						}
-						// when HTTP says ISO-8859-1 (the default) and XML says UTF-8 (the typical), assume the other endpoint is just sloppy and proceed
-					} else {
-						$this->debug('Charset from HTTP Content-Type matches encoding from XML declaration');
-					}
-				} else {
-					$this->debug('No encoding specified in XML declaration');
-				}
-			} else {
-				$this->debug('No XML declaration');
-			}
-			$this->debug('Entering nusoap_parser(), length='.strlen($xml).', encoding='.$encoding);
-			// Create an XML parser - why not xml_parser_create_ns?
-			$this->parser = xml_parser_create($this->xml_encoding);
-			// Set the options for parsing the XML data.
-			//xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
-			xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
-			xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->xml_encoding);
-			// Set the object for the parser.
-			xml_set_object($this->parser, $this);
-			// Set the element handlers for the parser.
-			xml_set_element_handler($this->parser, 'start_element','end_element');
-			xml_set_character_data_handler($this->parser,'character_data');
-
-			// Parse the XML file.
-			if(!xml_parse($this->parser,$xml,true)){
-			    // Display an error message.
-			    $err = sprintf('XML error parsing SOAP payload on line %d: %s',
-			    xml_get_current_line_number($this->parser),
-			    xml_error_string(xml_get_error_code($this->parser)));
-				$this->debug($err);
-				$this->debug("XML payload:\n" . $xml);
-				$this->setError($err);
-			} else {
-				$this->debug('in nusoap_parser ctor, message:');
-				$this->appendDebug($this->varDump($this->message));
-				$this->debug('parsed successfully, found root struct: '.$this->root_struct.' of name '.$this->root_struct_name);
-				// get final value
-				$this->soapresponse = $this->message[$this->root_struct]['result'];
-				// get header value
-				if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){
-					$this->soapheader = $this->message[$this->root_header]['result'];
-				}
-				// resolve hrefs/ids
-				if(sizeof($this->multirefs) > 0){
-					foreach($this->multirefs as $id => $hrefs){
-						$this->debug('resolving multirefs for id: '.$id);
-						$idVal = $this->buildVal($this->ids[$id]);
-						if (is_array($idVal) && isset($idVal['!id'])) {
-							unset($idVal['!id']);
-						}
-						foreach($hrefs as $refPos => $ref){
-							$this->debug('resolving href at pos '.$refPos);
-							$this->multirefs[$id][$refPos] = $idVal;
-						}
-					}
-				}
-			}
-			xml_parser_free($this->parser);
-		} else {
-			$this->debug('xml was empty, didn\'t parse!');
-			$this->setError('xml was empty, didn\'t parse!');
-		}
-	}
-
-	/**
-	* start-element handler
-	*
-	* @param    resource $parser XML parser object
-	* @param    string $name element name
-	* @param    array $attrs associative array of attributes
-	* @access   private
-	*/
-	function start_element($parser, $name, $attrs) {
-		// position in a total number of elements, starting from 0
-		// update class level pos
-		$pos = $this->position++;
-		// and set mine
-		$this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>'');
-		// depth = how many levels removed from root?
-		// set mine as current global depth and increment global depth value
-		$this->message[$pos]['depth'] = $this->depth++;
-
-		// else add self as child to whoever the current parent is
-		if($pos != 0){
-			$this->message[$this->parent]['children'] .= '|'.$pos;
-		}
-		// set my parent
-		$this->message[$pos]['parent'] = $this->parent;
-		// set self as current parent
-		$this->parent = $pos;
-		// set self as current value for this depth
-		$this->depth_array[$this->depth] = $pos;
-		// get element prefix
-		if(strpos($name,':')){
-			// get ns prefix
-			$prefix = substr($name,0,strpos($name,':'));
-			// get unqualified name
-			$name = substr(strstr($name,':'),1);
-		}
-		// set status
-		if ($name == 'Envelope' && $this->status == '') {
-			$this->status = 'envelope';
-		} elseif ($name == 'Header' && $this->status == 'envelope') {
-			$this->root_header = $pos;
-			$this->status = 'header';
-		} elseif ($name == 'Body' && $this->status == 'envelope'){
-			$this->status = 'body';
-			$this->body_position = $pos;
-		// set method
-		} elseif($this->status == 'body' && $pos == ($this->body_position+1)) {
-			$this->status = 'method';
-			$this->root_struct_name = $name;
-			$this->root_struct = $pos;
-			$this->message[$pos]['type'] = 'struct';
-			$this->debug("found root struct $this->root_struct_name, pos $this->root_struct");
-		}
-		// set my status
-		$this->message[$pos]['status'] = $this->status;
-		// set name
-		$this->message[$pos]['name'] = htmlspecialchars($name);
-		// set attrs
-		$this->message[$pos]['attrs'] = $attrs;
-
-		// loop through atts, logging ns and type declarations
-        $attstr = '';
-		foreach($attrs as $key => $value){
-        	$key_prefix = $this->getPrefix($key);
-			$key_localpart = $this->getLocalPart($key);
-			// if ns declarations, add to class level array of valid namespaces
-            if($key_prefix == 'xmlns'){
-				if(preg_match('/^http:\/\/www.w3.org\/[0-9]{4}\/XMLSchema$/',$value)){
-					$this->XMLSchemaVersion = $value;
-					$this->namespaces['xsd'] = $this->XMLSchemaVersion;
-					$this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance';
-				}
-                $this->namespaces[$key_localpart] = $value;
-				// set method namespace
-				if($name == $this->root_struct_name){
-					$this->methodNamespace = $value;
-				}
-			// if it's a type declaration, set type
-        } elseif($key_localpart == 'type'){
-        		if (isset($this->message[$pos]['type']) && $this->message[$pos]['type'] == 'array') {
-        			// do nothing: already processed arrayType
-        		} else {
-	            	$value_prefix = $this->getPrefix($value);
-	                $value_localpart = $this->getLocalPart($value);
-					$this->message[$pos]['type'] = $value_localpart;
-					$this->message[$pos]['typePrefix'] = $value_prefix;
-	                if(isset($this->namespaces[$value_prefix])){
-	                	$this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix];
-	                } else if(isset($attrs['xmlns:'.$value_prefix])) {
-						$this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix];
-	                }
-					// should do something here with the namespace of specified type?
-				}
-			} elseif($key_localpart == 'arrayType'){
-				$this->message[$pos]['type'] = 'array';
-				/* do arrayType ereg here
-				[1]    arrayTypeValue    ::=    atype asize
-				[2]    atype    ::=    QName rank*
-				[3]    rank    ::=    '[' (',')* ']'
-				[4]    asize    ::=    '[' length~ ']'
-				[5]    length    ::=    nextDimension* Digit+
-				[6]    nextDimension    ::=    Digit+ ','
-				*/
-				$expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/';
-				if(preg_match($expr,$value,$regs)){
-					$this->message[$pos]['typePrefix'] = $regs[1];
-					$this->message[$pos]['arrayTypePrefix'] = $regs[1];
-	                if (isset($this->namespaces[$regs[1]])) {
-	                	$this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]];
-	                } else if (isset($attrs['xmlns:'.$regs[1]])) {
-						$this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]];
-	                }
-					$this->message[$pos]['arrayType'] = $regs[2];
-					$this->message[$pos]['arraySize'] = $regs[3];
-					$this->message[$pos]['arrayCols'] = $regs[4];
-				}
-			// specifies nil value (or not)
-			} elseif ($key_localpart == 'nil'){
-				$this->message[$pos]['nil'] = ($value == 'true' || $value == '1');
-			// some other attribute
-			} elseif ($key != 'href' && $key != 'xmlns' && $key_localpart != 'encodingStyle' && $key_localpart != 'root') {
-				$this->message[$pos]['xattrs']['!' . $key] = $value;
-			}
-
-			if ($key == 'xmlns') {
-				$this->default_namespace = $value;
-			}
-			// log id
-			if($key == 'id'){
-				$this->ids[$value] = $pos;
-			}
-			// root
-			if($key_localpart == 'root' && $value == 1){
-				$this->status = 'method';
-				$this->root_struct_name = $name;
-				$this->root_struct = $pos;
-				$this->debug("found root struct $this->root_struct_name, pos $pos");
-			}
-            // for doclit
-            $attstr .= " $key=\"$value\"";
-		}
-        // get namespace - must be done after namespace atts are processed
-		if(isset($prefix)){
-			$this->message[$pos]['namespace'] = $this->namespaces[$prefix];
-			$this->default_namespace = $this->namespaces[$prefix];
-		} else {
-			$this->message[$pos]['namespace'] = $this->default_namespace;
-		}
-        if($this->status == 'header'){
-        	if ($this->root_header != $pos) {
-	        	$this->responseHeaders .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>";
-	        }
-        } elseif($this->root_struct_name != ''){
-        	$this->document .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>";
-        }
-	}
-
-	/**
-	* end-element handler
-	*
-	* @param    resource $parser XML parser object
-	* @param    string $name element name
-	* @access   private
-	*/
-	function end_element($parser, $name) {
-		// position of current element is equal to the last value left in depth_array for my depth
-		$pos = $this->depth_array[$this->depth--];
-
-        // get element prefix
-		if(strpos($name,':')){
-			// get ns prefix
-			$prefix = substr($name,0,strpos($name,':'));
-			// get unqualified name
-			$name = substr(strstr($name,':'),1);
-		}
-		
-		// build to native type
-		if(isset($this->body_position) && $pos > $this->body_position){
-			// deal w/ multirefs
-			if(isset($this->message[$pos]['attrs']['href'])){
-				// get id
-				$id = substr($this->message[$pos]['attrs']['href'],1);
-				// add placeholder to href array
-				$this->multirefs[$id][$pos] = 'placeholder';
-				// add set a reference to it as the result value
-				$this->message[$pos]['result'] =& $this->multirefs[$id][$pos];
-            // build complexType values
-			} elseif($this->message[$pos]['children'] != ''){
-				// if result has already been generated (struct/array)
-				if(!isset($this->message[$pos]['result'])){
-					$this->message[$pos]['result'] = $this->buildVal($pos);
-				}
-			// build complexType values of attributes and possibly simpleContent
-			} elseif (isset($this->message[$pos]['xattrs'])) {
-				if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) {
-					$this->message[$pos]['xattrs']['!'] = null;
-				} elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') {
-	            	if (isset($this->message[$pos]['type'])) {
-						$this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : '');
-					} else {
-						$parent = $this->message[$pos]['parent'];
-						if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) {
-							$this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : '');
-						} else {
-							$this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata'];
-						}
-					}
-				}
-				$this->message[$pos]['result'] = $this->message[$pos]['xattrs'];
-			// set value of simpleType (or nil complexType)
-			} else {
-            	//$this->debug('adding data for scalar value '.$this->message[$pos]['name'].' of value '.$this->message[$pos]['cdata']);
-				if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) {
-					$this->message[$pos]['xattrs']['!'] = null;
-				} elseif (isset($this->message[$pos]['type'])) {
-					$this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : '');
-				} else {
-					$parent = $this->message[$pos]['parent'];
-					if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) {
-						$this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : '');
-					} else {
-						$this->message[$pos]['result'] = $this->message[$pos]['cdata'];
-					}
-				}
-
-				/* add value to parent's result, if parent is struct/array
-				$parent = $this->message[$pos]['parent'];
-				if($this->message[$parent]['type'] != 'map'){
-					if(strtolower($this->message[$parent]['type']) == 'array'){
-						$this->message[$parent]['result'][] = $this->message[$pos]['result'];
-					} else {
-						$this->message[$parent]['result'][$this->message[$pos]['name']] = $this->message[$pos]['result'];
-					}
-				}
-				*/
-			}
-		}
-		
-        // for doclit
-        if($this->status == 'header'){
-        	if ($this->root_header != $pos) {
-	        	$this->responseHeaders .= "</" . (isset($prefix) ? $prefix . ':' : '') . "$name>";
-	        }
-        } elseif($pos >= $this->root_struct){
-        	$this->document .= "</" . (isset($prefix) ? $prefix . ':' : '') . "$name>";
-        }
-		// switch status
-		if ($pos == $this->root_struct){
-			$this->status = 'body';
-			$this->root_struct_namespace = $this->message[$pos]['namespace'];
-		} elseif ($pos == $this->root_header) {
-			$this->status = 'envelope';
-		} elseif ($name == 'Body' && $this->status == 'body') {
-			$this->status = 'envelope';
-		} elseif ($name == 'Header' && $this->status == 'header') { // will never happen
-			$this->status = 'envelope';
-		} elseif ($name == 'Envelope' && $this->status == 'envelope') {
-			$this->status = '';
-		}
-		// set parent back to my parent
-		$this->parent = $this->message[$pos]['parent'];
-	}
-
-	/**
-	* element content handler
-	*
-	* @param    resource $parser XML parser object
-	* @param    string $data element content
-	* @access   private
-	*/
-	function character_data($parser, $data){
-		$pos = $this->depth_array[$this->depth];
-		if ($this->xml_encoding=='UTF-8'){
-			// TODO: add an option to disable this for folks who want
-			// raw UTF-8 that, e.g., might not map to iso-8859-1
-			// TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1");
-			if($this->decode_utf8){
-				$data = utf8_decode($data);
-			}
-		}
-        $this->message[$pos]['cdata'] .= $data;
-        // for doclit
-        if($this->status == 'header'){
-        	$this->responseHeaders .= $data;
-        } else {
-        	$this->document .= $data;
-        }
-	}
-
-	/**
-	* get the parsed message (SOAP Body)
-	*
-	* @return	mixed
-	* @access   public
-	* @deprecated	use get_soapbody instead
-	*/
-	function get_response(){
-		return $this->soapresponse;
-	}
-
-	/**
-	* get the parsed SOAP Body (NULL if there was none)
-	*
-	* @return	mixed
-	* @access   public
-	*/
-	function get_soapbody(){
-		return $this->soapresponse;
-	}
-
-	/**
-	* get the parsed SOAP Header (NULL if there was none)
-	*
-	* @return	mixed
-	* @access   public
-	*/
-	function get_soapheader(){
-		return $this->soapheader;
-	}
-
-	/**
-	* get the unparsed SOAP Header
-	*
-	* @return	string XML or empty if no Header
-	* @access   public
-	*/
-	function getHeaders(){
-	    return $this->responseHeaders;
-	}
-
-	/**
-	* decodes simple types into PHP variables
-	*
-	* @param    string $value value to decode
-	* @param    string $type XML type to decode
-	* @param    string $typens XML type namespace to decode
-	* @return	mixed PHP value
-	* @access   private
-	*/
-	function decodeSimple($value, $type, $typens) {
-		// TODO: use the namespace!
-		if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') {
-			return (string) $value;
-		}
-		if ($type == 'int' || $type == 'integer' || $type == 'short' || $type == 'byte') {
-			return (int) $value;
-		}
-		if ($type == 'float' || $type == 'double' || $type == 'decimal') {
-			return (double) $value;
-		}
-		if ($type == 'boolean') {
-			if (strtolower($value) == 'false' || strtolower($value) == 'f') {
-				return false;
-			}
-			return (boolean) $value;
-		}
-		if ($type == 'base64' || $type == 'base64Binary') {
-			$this->debug('Decode base64 value');
-			return base64_decode($value);
-		}
-		// obscure numeric types
-		if ($type == 'nonPositiveInteger' || $type == 'negativeInteger'
-			|| $type == 'nonNegativeInteger' || $type == 'positiveInteger'
-			|| $type == 'unsignedInt'
-			|| $type == 'unsignedShort' || $type == 'unsignedByte') {
-			return (int) $value;
-		}
-		// bogus: parser treats array with no elements as a simple type
-		if ($type == 'array') {
-			return array();
-		}
-		// everything else
-		return (string) $value;
-	}
-
-	/**
-	* builds response structures for compound values (arrays/structs)
-	* and scalars
-	*
-	* @param    integer $pos position in node tree
-	* @return	mixed	PHP value
-	* @access   private
-	*/
-	function buildVal($pos){
-		if(!isset($this->message[$pos]['type'])){
-			$this->message[$pos]['type'] = '';
-		}
-		$this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']);
-		// if there are children...
-		if($this->message[$pos]['children'] != ''){
-			$this->debug('in buildVal, there are children');
-			$children = explode('|',$this->message[$pos]['children']);
-			array_shift($children); // knock off empty
-			// md array
-			if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){
-            	$r=0; // rowcount
-            	$c=0; // colcount
-            	foreach($children as $child_pos){
-					$this->debug("in buildVal, got an MD array element: $r, $c");
-					$params[$r][] = $this->message[$child_pos]['result'];
-				    $c++;
-				    if($c == $this->message[$pos]['arrayCols']){
-				    	$c = 0;
-						$r++;
-				    }
-                }
-            // array
-			} elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){
-                $this->debug('in buildVal, adding array '.$this->message[$pos]['name']);
-                foreach($children as $child_pos){
-                	$params[] = &$this->message[$child_pos]['result'];
-                }
-            // apache Map type: java hashtable
-            } elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap'){
-                $this->debug('in buildVal, Java Map '.$this->message[$pos]['name']);
-                foreach($children as $child_pos){
-                	$kv = explode("|",$this->message[$child_pos]['children']);
-                   	$params[$this->message[$kv[1]]['result']] = &$this->message[$kv[2]]['result'];
-                }
-            // generic compound type
-            //} elseif($this->message[$pos]['type'] == 'SOAPStruct' || $this->message[$pos]['type'] == 'struct') {
-		    } else {
-	    		// Apache Vector type: treat as an array
-                $this->debug('in buildVal, adding Java Vector or generic compound type '.$this->message[$pos]['name']);
-				if ($this->message[$pos]['type'] == 'Vector' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap') {
-					$notstruct = 1;
-				} else {
-					$notstruct = 0;
-	            }
-            	//
-            	foreach($children as $child_pos){
-            		if($notstruct){
-            			$params[] = &$this->message[$child_pos]['result'];
-            		} else {
-            			if (isset($params[$this->message[$child_pos]['name']])) {
-            				// de-serialize repeated element name into an array
-            				if ((!is_array($params[$this->message[$child_pos]['name']])) || (!isset($params[$this->message[$child_pos]['name']][0]))) {
-            					$params[$this->message[$child_pos]['name']] = array($params[$this->message[$child_pos]['name']]);
-            				}
-            				$params[$this->message[$child_pos]['name']][] = &$this->message[$child_pos]['result'];
-            			} else {
-					    	$params[$this->message[$child_pos]['name']] = &$this->message[$child_pos]['result'];
-					    }
-                	}
-                }
-			}
-			if (isset($this->message[$pos]['xattrs'])) {
-                $this->debug('in buildVal, handling attributes');
-				foreach ($this->message[$pos]['xattrs'] as $n => $v) {
-					$params[$n] = $v;
-				}
-			}
-			// handle simpleContent
-			if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') {
-                $this->debug('in buildVal, handling simpleContent');
-            	if (isset($this->message[$pos]['type'])) {
-					$params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : '');
-				} else {
-					$parent = $this->message[$pos]['parent'];
-					if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) {
-						$params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : '');
-					} else {
-						$params['!'] = $this->message[$pos]['cdata'];
-					}
-				}
-			}
-			$ret = is_array($params) ? $params : array();
-			$this->debug('in buildVal, return:');
-			$this->appendDebug($this->varDump($ret));
-			return $ret;
-		} else {
-        	$this->debug('in buildVal, no children, building scalar');
-			$cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : '';
-        	if (isset($this->message[$pos]['type'])) {
-				$ret = $this->decodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : '');
-				$this->debug("in buildVal, return: $ret");
-				return $ret;
-			}
-			$parent = $this->message[$pos]['parent'];
-			if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) {
-				$ret = $this->decodeSimple($cdata, $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : '');
-				$this->debug("in buildVal, return: $ret");
-				return $ret;
-			}
-           	$ret = $this->message[$pos]['cdata'];
-			$this->debug("in buildVal, return: $ret");
-           	return $ret;
-		}
-	}
-}
-
-/**
- * Backward compatibility
- */
-class soap_parser extends nusoap_parser {
-}
-
-?><?php
-
-
-
-/**
-*
-* [nu]soapclient higher level class for easy usage.
-*
-* usage:
-*
-* // instantiate client with server info
-* $soapclient = new nusoap_client( string path [ ,mixed wsdl] );
-*
-* // call method, get results
-* echo $soapclient->call( string methodname [ ,array parameters] );
-*
-* // bye bye client
-* unset($soapclient);
-*
-* @author   Dietrich Ayala <dietrich at ganx4.com>
-* @author   Scott Nichol <snichol at users.sourceforge.net>
-* @version  $Id: nusoap.php,v 1.123 2010/04/26 20:15:08 snichol Exp $
-* @access   public
-*/
-class nusoap_client extends nusoap_base  {
-
-	var $username = '';				// Username for HTTP authentication
-	var $password = '';				// Password for HTTP authentication
-	var $authtype = '';				// Type of HTTP authentication
-	var $certRequest = array();		// Certificate for HTTP SSL authentication
-	var $requestHeaders = false;	// SOAP headers in request (text)
-	var $responseHeaders = '';		// SOAP headers from response (incomplete namespace resolution) (text)
-	var $responseHeader = NULL;		// SOAP Header from response (parsed)
-	var $document = '';				// SOAP body response portion (incomplete namespace resolution) (text)
-	var $endpoint;
-	var $forceEndpoint = '';		// overrides WSDL endpoint
-    var $proxyhost = '';
-    var $proxyport = '';
-	var $proxyusername = '';
-	var $proxypassword = '';
-	var $portName = '';				// port name to use in WSDL
-    var $xml_encoding = '';			// character set encoding of incoming (response) messages
-	var $http_encoding = false;
-	var $timeout = 0;				// HTTP connection timeout
-	var $response_timeout = 30;		// HTTP response timeout
-	var $endpointType = '';			// soap|wsdl, empty for WSDL initialization error
-	var $persistentConnection = false;
-	var $defaultRpcParams = false;	// This is no longer used
-	var $request = '';				// HTTP request
-	var $response = '';				// HTTP response
-	var $responseData = '';			// SOAP payload of response
-	var $cookies = array();			// Cookies from response or for request
-    var $decode_utf8 = true;		// toggles whether the parser decodes element content w/ utf8_decode()
-	var $operations = array();		// WSDL operations, empty for WSDL initialization error
-	var $curl_options = array();	// User-specified cURL options
-	var $bindingType = '';			// WSDL operation binding type
-	var $use_curl = false;			// whether to always try to use cURL
-
-	/*
-	 * fault related variables
-	 */
-	/**
-	 * @var      fault
-	 * @access   public
-	 */
-	var $fault;
-	/**
-	 * @var      faultcode
-	 * @access   public
-	 */
-	var $faultcode;
-	/**
-	 * @var      faultstring
-	 * @access   public
-	 */
-	var $faultstring;
-	/**
-	 * @var      faultdetail
-	 * @access   public
-	 */
-	var $faultdetail;
-
-	/**
-	* constructor
-	*
-	* @param    mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object)
-	* @param    mixed $wsdl optional, set to 'wsdl' or true if using WSDL
-	* @param    string $proxyhost optional
-	* @param    string $proxyport optional
-	* @param	string $proxyusername optional
-	* @param	string $proxypassword optional
-	* @param	integer $timeout set the connection timeout
-	* @param	integer $response_timeout set the response timeout
-	* @param	string $portName optional portName in WSDL document
-	* @access   public
-	*/
-	function nusoap_client($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30, $portName = ''){
-		parent::nusoap_base();
-		$this->endpoint = $endpoint;
-		$this->proxyhost = $proxyhost;
-		$this->proxyport = $proxyport;
-		$this->proxyusername = $proxyusername;
-		$this->proxypassword = $proxypassword;
-		$this->timeout = $timeout;
-		$this->response_timeout = $response_timeout;
-		$this->portName = $portName;
-
-		$this->debug("ctor wsdl=$wsdl timeout=$timeout response_timeout=$response_timeout");
-		$this->appendDebug('endpoint=' . $this->varDump($endpoint));
-
-		// make values
-		if($wsdl){
-			if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) {
-				$this->wsdl = $endpoint;
-				$this->endpoint = $this->wsdl->wsdl;
-				$this->wsdlFile = $this->endpoint;
-				$this->debug('existing wsdl instance created from ' . $this->endpoint);
-				$this->checkWSDL();
-			} else {
-				$this->wsdlFile = $this->endpoint;
-				$this->wsdl = null;
-				$this->debug('will use lazy evaluation of wsdl from ' . $this->endpoint);
-			}
-			$this->endpointType = 'wsdl';
-		} else {
-			$this->debug("instantiate SOAP with endpoint at $endpoint");
-			$this->endpointType = 'soap';
-		}
-	}
-
-	/**
-	* calls method, returns PHP native type
-	*
-	* @param    string $operation SOAP server URL or path
-	* @param    mixed $params An array, associative or simple, of the parameters
-	*			              for the method call, or a string that is the XML
-	*			              for the call.  For rpc style, this call will
-	*			              wrap the XML in a tag named after the method, as
-	*			              well as the SOAP Envelope and Body.  For document
-	*			              style, this will only wrap with the Envelope and Body.
-	*			              IMPORTANT: when using an array with document style,
-	*			              in which case there
-	*                         is really one parameter, the root of the fragment
-	*                         used in the call, which encloses what programmers
-	*                         normally think of parameters.  A parameter array
-	*                         *must* include the wrapper.
-	* @param	string $namespace optional method namespace (WSDL can override)
-	* @param	string $soapAction optional SOAPAction value (WSDL can override)
-	* @param	mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers, or associative array
-	* @param	boolean $rpcParams optional (no longer used)
-	* @param	string	$style optional (rpc|document) the style to use when serializing parameters (WSDL can override)
-	* @param	string	$use optional (encoded|literal) the use when serializing parameters (WSDL can override)
-	* @return	mixed	response from SOAP call, normally an associative array mirroring the structure of the XML response, false for certain fatal errors
-	* @access   public
-	*/
-	function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){
-		$this->operation = $operation;
-		$this->fault = false;
-		$this->setError('');
-		$this->request = '';
-		$this->response = '';
-		$this->responseData = '';
-		$this->faultstring = '';
-		$this->faultcode = '';
-		$this->opData = array();
-		
-		$this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType");
-		$this->appendDebug('params=' . $this->varDump($params));
-		$this->appendDebug('headers=' . $this->varDump($headers));
-		if ($headers) {
-			$this->requestHeaders = $headers;
-		}
-		if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
-			$this->loadWSDL();
-			if ($this->getError())
-				return false;
-		}
-		// serialize parameters
-		if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){
-			// use WSDL for operation
-			$this->opData = $opData;
-			$this->debug("found operation");
-			$this->appendDebug('opData=' . $this->varDump($opData));
-			if (isset($opData['soapAction'])) {
-				$soapAction = $opData['soapAction'];
-			}
-			if (! $this->forceEndpoint) {
-				$this->endpoint = $opData['endpoint'];
-			} else {
-				$this->endpoint = $this->forceEndpoint;
-			}
-			$namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] :	$namespace;
-			$style = $opData['style'];
-			$use = $opData['input']['use'];
-			// add ns to ns array
-			if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){
-				$nsPrefix = 'ns' . rand(1000, 9999);
-				$this->wsdl->namespaces[$nsPrefix] = $namespace;
-			}
-            $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace);
-			// serialize payload
-			if (is_string($params)) {
-				$this->debug("serializing param string for WSDL operation $operation");
-				$payload = $params;
-			} elseif (is_array($params)) {
-				$this->debug("serializing param array for WSDL operation $operation");
-				$payload = $this->wsdl->serializeRPCParameters($operation,'input',$params,$this->bindingType);
-			} else {
-				$this->debug('params must be array or string');
-				$this->setError('params must be array or string');
-				return false;
-			}
-            $usedNamespaces = $this->wsdl->usedNamespaces;
-			if (isset($opData['input']['encodingStyle'])) {
-				$encodingStyle = $opData['input']['encodingStyle'];
-			} else {
-				$encodingStyle = '';
-			}
-			$this->appendDebug($this->wsdl->getDebug());
-			$this->wsdl->clearDebug();
-			if ($errstr = $this->wsdl->getError()) {
-				$this->debug('got wsdl error: '.$errstr);
-				$this->setError('wsdl error: '.$errstr);
-				return false;
-			}
-		} elseif($this->endpointType == 'wsdl') {
-			// operation not in WSDL
-			$this->appendDebug($this->wsdl->getDebug());
-			$this->wsdl->clearDebug();
-			$this->setError('operation '.$operation.' not present in WSDL.');
-			$this->debug("operation '$operation' not present in WSDL.");
-			return false;
-		} else {
-			// no WSDL
-			//$this->namespaces['ns1'] = $namespace;
-			$nsPrefix = 'ns' . rand(1000, 9999);
-			// serialize 
-			$payload = '';
-			if (is_string($params)) {
-				$this->debug("serializing param string for operation $operation");
-				$payload = $params;
-			} elseif (is_array($params)) {
-				$this->debug("serializing param array for operation $operation");
-				foreach($params as $k => $v){
-					$payload .= $this->serialize_val($v,$k,false,false,false,false,$use);
-				}
-			} else {
-				$this->debug('params must be array or string');
-				$this->setError('params must be array or string');
-				return false;
-			}
-			$usedNamespaces = array();
-			if ($use == 'encoded') {
-				$encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/';
-			} else {
-				$encodingStyle = '';
-			}
-		}
-		// wrap RPC calls with method element
-		if ($style == 'rpc') {
-			if ($use == 'literal') {
-				$this->debug("wrapping RPC request with literal method element");
-				if ($namespace) {
-					// http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html R2735 says rpc/literal accessor elements should not be in a namespace
-					$payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" .
-								$payload .
-								"</$nsPrefix:$operation>";
-				} else {
-					$payload = "<$operation>" . $payload . "</$operation>";
-				}
-			} else {
-				$this->debug("wrapping RPC request with encoded method element");
-				if ($namespace) {
-					$payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" .
-								$payload .
-								"</$nsPrefix:$operation>";
-				} else {
-					$payload = "<$operation>" .
-								$payload .
-								"</$operation>";
-				}
-			}
-		}
-		// serialize envelope
-		$soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle);
-		$this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle");
-		$this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($soapmsg, 0, 1000));
-		// send
-		$return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_timeout);
-		if($errstr = $this->getError()){
-			$this->debug('Error: '.$errstr);
-			return false;
-		} else {
-			$this->return = $return;
-			$this->debug('sent message successfully and got a(n) '.gettype($return));
-           	$this->appendDebug('return=' . $this->varDump($return));
-			
-			// fault?
-			if(is_array($return) && isset($return['faultcode'])){
-				$this->debug('got fault');
-				$this->setError($return['faultcode'].': '.$return['faultstring']);
-				$this->fault = true;
-				foreach($return as $k => $v){
-					$this->$k = $v;
-					$this->debug("$k = $v<br>");
-				}
-				return $return;
-			} elseif ($style == 'document') {
-				// NOTE: if the response is defined to have multiple parts (i.e. unwrapped),
-				// we are only going to return the first part here...sorry about that
-				return $return;
-			} else {
-				// array of return values
-				if(is_array($return)){
-					// multiple 'out' parameters, which we return wrapped up
-					// in the array
-					if(sizeof($return) > 1){
-						return $return;
-					}
-					// single 'out' parameter (normally the return value)
-					$return = array_shift($return);
-					$this->debug('return shifted value: ');
-					$this->appendDebug($this->varDump($return));
-           			return $return;
-				// nothing returned (ie, echoVoid)
-				} else {
-					return "";
-				}
-			}
-		}
-	}
-
-	/**
-	* check WSDL passed as an instance or pulled from an endpoint
-	*
-	* @access   private
-	*/
-	function checkWSDL() {
-		$this->appendDebug($this->wsdl->getDebug());
-		$this->wsdl->clearDebug();
-		$this->debug('checkWSDL');
-		// catch errors
-		if ($errstr = $this->wsdl->getError()) {
-			$this->appendDebug($this->wsdl->getDebug());
-			$this->wsdl->clearDebug();
-			$this->debug('got wsdl error: '.$errstr);
-			$this->setError('wsdl error: '.$errstr);
-		} elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap')) {
-			$this->appendDebug($this->wsdl->getDebug());
-			$this->wsdl->clearDebug();
-			$this->bindingType = 'soap';
-			$this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType);
-		} elseif ($this->operations = $this->wsdl->getOperations($this->portName, 'soap12')) {
-			$this->appendDebug($this->wsdl->getDebug());
-			$this->wsdl->clearDebug();
-			$this->bindingType = 'soap12';
-			$this->debug('got '.count($this->operations).' operations from wsdl '.$this->wsdlFile.' for binding type '.$this->bindingType);
-			$this->debug('**************** WARNING: SOAP 1.2 BINDING *****************');
-		} else {
-			$this->appendDebug($this->wsdl->getDebug());
-			$this->wsdl->clearDebug();
-			$this->debug('getOperations returned false');
-			$this->setError('no operations defined in the WSDL document!');
-		}
-	}
-
-	/**
-	 * instantiate wsdl object and parse wsdl file
-	 *
-	 * @access	public
-	 */
-	function loadWSDL() {
-		$this->debug('instantiating wsdl class with doc: '.$this->wsdlFile);
-		$this->wsdl = new wsdl('',$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout,$this->curl_options,$this->use_curl);
-		$this->wsdl->setCredentials($this->username, $this->password, $this->authtype, $this->certRequest);
-		$this->wsdl->fetchWSDL($this->wsdlFile);
-		$this->checkWSDL();
-	}
-
-	/**
-	* get available data pertaining to an operation
-	*
-	* @param    string $operation operation name
-	* @return	array array of data pertaining to the operation
-	* @access   public
-	*/
-	function getOperationData($operation){
-		if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
-			$this->loadWSDL();
-			if ($this->getError())
-				return false;
-		}
-		if(isset($this->operations[$operation])){
-			return $this->operations[$operation];
-		}
-		$this->debug("No data for operation: $operation");
-	}
-
-    /**
-    * send the SOAP message
-    *
-    * Note: if the operation has multiple return values
-    * the return value of this method will be an array
-    * of those values.
-    *
-	* @param    string $msg a SOAPx4 soapmsg object
-	* @param    string $soapaction SOAPAction value
-	* @param    integer $timeout set connection timeout in seconds
-	* @param	integer $response_timeout set response timeout in seconds
-	* @return	mixed native PHP types.
-	* @access   private
-	*/
-	function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) {
-		$this->checkCookies();
-		// detect transport
-		switch(true){
-			// http(s)
-			case preg_match('/^http/',$this->endpoint):
-				$this->debug('transporting via HTTP');
-				if($this->persistentConnection == true && is_object($this->persistentConnection)){
-					$http =& $this->persistentConnection;
-				} else {
-					$http = new soap_transport_http($this->endpoint, $this->curl_options, $this->use_curl);
-					if ($this->persistentConnection) {
-						$http->usePersistentConnection();
-					}
-				}
-				$http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset());
-				$http->setSOAPAction($soapaction);
-				if($this->proxyhost && $this->proxyport){
-					$http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword);
-				}
-                if($this->authtype != '') {
-					$http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest);
-				}
-				if($this->http_encoding != ''){
-					$http->setEncoding($this->http_encoding);
-				}
-				$this->debug('sending message, length='.strlen($msg));
-				if(preg_match('/^http:/',$this->endpoint)){
-				//if(strpos($this->endpoint,'http:')){
-					$this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies);
-				} elseif(preg_match('/^https/',$this->endpoint)){
-				//} elseif(strpos($this->endpoint,'https:')){
-					//if(phpversion() == '4.3.0-dev'){
-						//$response = $http->send($msg,$timeout,$response_timeout);
-                   		//$this->request = $http->outgoing_payload;
-						//$this->response = $http->incoming_payload;
-					//} else
-					$this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies);
-				} else {
-					$this->setError('no http/s in endpoint url');
-				}
-				$this->request = $http->outgoing_payload;
-				$this->response = $http->incoming_payload;
-				$this->appendDebug($http->getDebug());
-				$this->UpdateCookies($http->incoming_cookies);
-
-				// save transport object if using persistent connections
-				if ($this->persistentConnection) {
-					$http->clearDebug();
-					if (!is_object($this->persistentConnection)) {
-						$this->persistentConnection = $http;
-					}
-				}
-				
-				if($err = $http->getError()){
-					$this->setError('HTTP Error: '.$err);
-					return false;
-				} elseif($this->getError()){
-					return false;
-				} else {
-					$this->debug('got response, length='. strlen($this->responseData).' type='.$http->incoming_headers['content-type']);
-					return $this->parseResponse($http->incoming_headers, $this->responseData);
-				}
-			break;
-			default:
-				$this->setError('no transport found, or selected transport is not yet supported!');
-			return false;
-			break;
-		}
-	}
-
-	/**
-	* processes SOAP message returned from server
-	*
-	* @param	array	$headers	The HTTP headers
-	* @param	string	$data		unprocessed response data from server
-	* @return	mixed	value of the message, decoded into a PHP type
-	* @access   private
-	*/
-    function parseResponse($headers, $data) {
-		$this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' headers:');
-		$this->appendDebug($this->varDump($headers));
-    	if (!isset($headers['content-type'])) {
-			$this->setError('Response not of type text/xml (no content-type header)');
-			return false;
-    	}
-		if (!strstr($headers['content-type'], 'text/xml')) {
-			$this->setError('Response not of type text/xml: ' . $headers['content-type']);
-			return false;
-		}
-		if (strpos($headers['content-type'], '=')) {
-			$enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1));
-			$this->debug('Got response encoding: ' . $enc);
-			if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){
-				$this->xml_encoding = strtoupper($enc);
-			} else {
-				$this->xml_encoding = 'US-ASCII';
-			}
-		} else {
-			// should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1
-			$this->xml_encoding = 'ISO-8859-1';
-		}
-		$this->debug('Use encoding: ' . $this->xml_encoding . ' when creating nusoap_parser');
-		$parser = new nusoap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8);
-		// add parser debug data to our debug
-		$this->appendDebug($parser->getDebug());
-		// if parse errors
-		if($errstr = $parser->getError()){
-			$this->setError( $errstr);
-			// destroy the parser object
-			unset($parser);
-			return false;
-		} else {
-			// get SOAP headers
-			$this->responseHeaders = $parser->getHeaders();
-			// get SOAP headers
-			$this->responseHeader = $parser->get_soapheader();
-			// get decoded message
-			$return = $parser->get_soapbody();
-            // add document for doclit support
-            $this->document = $parser->document;
-			// destroy the parser object
-			unset($parser);
-			// return decode message
-			return $return;
-		}
-	 }
-
-	/**
-	* sets user-specified cURL options
-	*
-	* @param	mixed $option The cURL option (always integer?)
-	* @param	mixed $value The cURL option value
-	* @access   public
-	*/
-	function setCurlOption($option, $value) {
-		$this->debug("setCurlOption option=$option, value=");
-		$this->appendDebug($this->varDump($value));
-		$this->curl_options[$option] = $value;
-	}
-
-	/**
-	* sets the SOAP endpoint, which can override WSDL
-	*
-	* @param	string $endpoint The endpoint URL to use, or empty string or false to prevent override
-	* @access   public
-	*/
-	function setEndpoint($endpoint) {
-		$this->debug("setEndpoint(\"$endpoint\")");
-		$this->forceEndpoint = $endpoint;
-	}
-
-	/**
-	* set the SOAP headers
-	*
-	* @param	mixed $headers String of XML with SOAP header content, or array of soapval objects for SOAP headers
-	* @access   public
-	*/
-	function setHeaders($headers){
-		$this->debug("setHeaders headers=");
-		$this->appendDebug($this->varDump($headers));
-		$this->requestHeaders = $headers;
-	}
-
-	/**
-	* get the SOAP response headers (namespace resolution incomplete)
-	*
-	* @return	string
-	* @access   public
-	*/
-	function getHeaders(){
-		return $this->responseHeaders;
-	}
-
-	/**
-	* get the SOAP response Header (parsed)
-	*
-	* @return	mixed
-	* @access   public
-	*/
-	function getHeader(){
-		return $this->responseHeader;
-	}
-
-	/**
-	* set proxy info here
-	*
-	* @param    string $proxyhost
-	* @param    string $proxyport
-	* @param	string $proxyusername
-	* @param	string $proxypassword
-	* @access   public
-	*/
-	function setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') {
-		$this->proxyhost = $proxyhost;
-		$this->proxyport = $proxyport;
-		$this->proxyusername = $proxyusername;
-		$this->proxypassword = $proxypassword;
-	}
-
-	/**
-	* if authenticating, set user credentials here
-	*
-	* @param    string $username
-	* @param    string $password
-	* @param	string $authtype (basic|digest|certificate|ntlm)
-	* @param	array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)
-	* @access   public
-	*/
-	function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) {
-		$this->debug("setCredentials username=$username authtype=$authtype certRequest=");
-		$this->appendDebug($this->varDump($certRequest));
-		$this->username = $username;
-		$this->password = $password;
-		$this->authtype = $authtype;
-		$this->certRequest = $certRequest;
-	}
-	
-	/**
-	* use HTTP encoding
-	*
-	* @param    string $enc HTTP encoding
-	* @access   public
-	*/
-	function setHTTPEncoding($enc='gzip, deflate'){
-		$this->debug("setHTTPEncoding(\"$enc\")");
-		$this->http_encoding = $enc;
-	}
-	
-	/**
-	* Set whether to try to use cURL connections if possible
-	*
-	* @param	boolean $use Whether to try to use cURL
-	* @access   public
-	*/
-	function setUseCURL($use) {
-		$this->debug("setUseCURL($use)");
-		$this->use_curl = $use;
-	}
-
-	/**
-	* use HTTP persistent connections if possible
-	*
-	* @access   public
-	*/
-	function useHTTPPersistentConnection(){
-		$this->debug("useHTTPPersistentConnection");
-		$this->persistentConnection = true;
-	}
-	
-	/**
-	* gets the default RPC parameter setting.
-	* If true, default is that call params are like RPC even for document style.
-	* Each call() can override this value.
-	*
-	* This is no longer used.
-	*
-	* @return boolean
-	* @access public
-	* @deprecated
-	*/
-	function getDefaultRpcParams() {
-		return $this->defaultRpcParams;
-	}
-
-	/**
-	* sets the default RPC parameter setting.
-	* If true, default is that call params are like RPC even for document style
-	* Each call() can override this value.
-	*
-	* This is no longer used.
-	*
-	* @param    boolean $rpcParams
-	* @access public
-	* @deprecated
-	*/
-	function setDefaultRpcParams($rpcParams) {
-		$this->defaultRpcParams = $rpcParams;
-	}
-	
-	/**
-	* dynamically creates an instance of a proxy class,
-	* allowing user to directly call methods from wsdl
-	*
-	* @return   object soap_proxy object
-	* @access   public
-	*/
-	function getProxy() {
-		$r = rand();
-		$evalStr = $this->_getProxyClassCode($r);
-		//$this->debug("proxy class: $evalStr");
-		if ($this->getError()) {
-			$this->debug("Error from _getProxyClassCode, so return NULL");
-			return null;
-		}
-		// eval the class
-		eval($evalStr);
-		// instantiate proxy object
-		eval("\$proxy = new nusoap_proxy_$r('');");
-		// transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice
-		$proxy->endpointType = 'wsdl';
-		$proxy->wsdlFile = $this->wsdlFile;
-		$proxy->wsdl = $this->wsdl;
-		$proxy->operations = $this->operations;
-		$proxy->defaultRpcParams = $this->defaultRpcParams;
-		// transfer other state
-		$proxy->soap_defencoding = $this->soap_defencoding;
-		$proxy->username = $this->username;
-		$proxy->password = $this->password;
-		$proxy->authtype = $this->authtype;
-		$proxy->certRequest = $this->certRequest;
-		$proxy->requestHeaders = $this->requestHeaders;
-		$proxy->endpoint = $this->endpoint;
-		$proxy->forceEndpoint = $this->forceEndpoint;
-		$proxy->proxyhost = $this->proxyhost;
-		$proxy->proxyport = $this->proxyport;
-		$proxy->proxyusername = $this->proxyusername;
-		$proxy->proxypassword = $this->proxypassword;
-		$proxy->http_encoding = $this->http_encoding;
-		$proxy->timeout = $this->timeout;
-		$proxy->response_timeout = $this->response_timeout;
-		$proxy->persistentConnection = &$this->persistentConnection;
-		$proxy->decode_utf8 = $this->decode_utf8;
-		$proxy->curl_options = $this->curl_options;
-		$proxy->bindingType = $this->bindingType;
-		$proxy->use_curl = $this->use_curl;
-		return $proxy;
-	}
-
-	/**
-	* dynamically creates proxy class code
-	*
-	* @return   string PHP/NuSOAP code for the proxy class
-	* @access   private
-	*/
-	function _getProxyClassCode($r) {
-		$this->debug("in getProxy endpointType=$this->endpointType");
-		$this->appendDebug("wsdl=" . $this->varDump($this->wsdl));
-		if ($this->endpointType != 'wsdl') {
-			$evalStr = 'A proxy can only be created for a WSDL client';
-			$this->setError($evalStr);
-			$evalStr = "echo \"$evalStr\";";
-			return $evalStr;
-		}
-		if ($this->endpointType == 'wsdl' && is_null($this->wsdl)) {
-			$this->loadWSDL();
-			if ($this->getError()) {
-				return "echo \"" . $this->getError() . "\";";
-			}
-		}
-		$evalStr = '';
-		foreach ($this->operations as $operation => $opData) {
-			if ($operation != '') {
-				// create param string and param comment string
-				if (sizeof($opData['input']['parts']) > 0) {
-					$paramStr = '';
-					$paramArrayStr = '';
-					$paramCommentStr = '';
-					foreach ($opData['input']['parts'] as $name => $type) {
-						$paramStr .= "\$$name, ";
-						$paramArrayStr .= "'$name' => \$$name, ";
-						$paramCommentStr .= "$type \$$name, ";
-					}
-					$paramStr = substr($paramStr, 0, strlen($paramStr)-2);
-					$paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2);
-					$paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2);
-				} else {
-					$paramStr = '';
-					$paramArrayStr = '';
-					$paramCommentStr = 'void';
-				}
-				$opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace'];
-				$evalStr .= "// $paramCommentStr
-	function " . str_replace('.', '__', $operation) . "($paramStr) {
-		\$params = array($paramArrayStr);
-		return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAction']) ? $opData['soapAction'] : '')."');
-	}
-	";
-				unset($paramStr);
-				unset($paramCommentStr);
-			}
-		}
-		$evalStr = 'class nusoap_proxy_'.$r.' extends nusoap_client {
-	'.$evalStr.'
-}';
-		return $evalStr;
-	}
-
-	/**
-	* dynamically creates proxy class code
-	*
-	* @return   string PHP/NuSOAP code for the proxy class
-	* @access   public
-	*/
-	function getProxyClassCode() {
-		$r = rand();
-		return $this->_getProxyClassCode($r);
-	}
-
-	/**
-	* gets the HTTP body for the current request.
-	*
-	* @param string $soapmsg The SOAP payload
-	* @return string The HTTP body, which includes the SOAP payload
-	* @access private
-	*/
-	function getHTTPBody($soapmsg) {
-		return $soapmsg;
-	}
-	
-	/**
-	* gets the HTTP content type for the current request.
-	*
-	* Note: getHTTPBody must be called before this.
-	*
-	* @return string the HTTP content type for the current request.
-	* @access private
-	*/
-	function getHTTPContentType() {
-		return 'text/xml';
-	}
-	
-	/**
-	* gets the HTTP content type charset for the current request.
-	* returns false for non-text content types.
-	*
-	* Note: getHTTPBody must be called before this.
-	*
-	* @return string the HTTP content type charset for the current request.
-	* @access private
-	*/
-	function getHTTPContentTypeCharset() {
-		return $this->soap_defencoding;
-	}
-
-	/*
-	* whether or not parser should decode utf8 element content
-    *
-    * @return   always returns true
-    * @access   public
-    */
-    function decodeUTF8($bool){
-		$this->decode_utf8 = $bool;
-		return true;
-    }
-
-	/**
-	 * adds a new Cookie into $this->cookies array
-	 *
-	 * @param	string $name Cookie Name
-	 * @param	string $value Cookie Value
-	 * @return	boolean if cookie-set was successful returns true, else false
-	 * @access	public
-	 */
-	function setCookie($name, $value) {
-		if (strlen($name) == 0) {
-			return false;
-		}
-		$this->cookies[] = array('name' => $name, 'value' => $value);
-		return true;
-	}
-
-	/**
-	 * gets all Cookies
-	 *
-	 * @return   array with all internal cookies
-	 * @access   public
-	 */
-	function getCookies() {
-		return $this->cookies;
-	}
-
-	/**
-	 * checks all Cookies and delete those which are expired
-	 *
-	 * @return   boolean always return true
-	 * @access   private
-	 */
-	function checkCookies() {
-		if (sizeof($this->cookies) == 0) {
-			return true;
-		}
-		$this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies');
-		$curr_cookies = $this->cookies;
-		$this->cookies = array();
-		foreach ($curr_cookies as $cookie) {
-			if (! is_array($cookie)) {
-				$this->debug('Remove cookie that is not an array');
-				continue;
-			}
-			if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) {
-				if (strtotime($cookie['expires']) > time()) {
-					$this->cookies[] = $cookie;
-				} else {
-					$this->debug('Remove expired cookie ' . $cookie['name']);
-				}
-			} else {
-				$this->cookies[] = $cookie;
-			}
-		}
-		$this->debug('checkCookie: '.sizeof($this->cookies).' cookies left in array');
-		return true;
-	}
-
-	/**
-	 * updates the current cookies with a new set
-	 *
-	 * @param	array $cookies new cookies with which to update current ones
-	 * @return	boolean always return true
-	 * @access	private
-	 */
-	function UpdateCookies($cookies) {
-		if (sizeof($this->cookies) == 0) {
-			// no existing cookies: take whatever is new
-			if (sizeof($cookies) > 0) {
-				$this->debug('Setting new cookie(s)');
-				$this->cookies = $cookies;
-			}
-			return true;
-		}
-		if (sizeof($cookies) == 0) {
-			// no new cookies: keep what we've got
-			return true;
-		}
-		// merge
-		foreach ($cookies as $newCookie) {
-			if (!is_array($newCookie)) {
-				continue;
-			}
-			if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) {
-				continue;
-			}
-			$newName = $newCookie['name'];
-
-			$found = false;
-			for ($i = 0; $i < count($this->cookies); $i++) {
-				$cookie = $this->cookies[$i];
-				if (!is_array($cookie)) {
-					continue;
-				}
-				if (!isset($cookie['name'])) {
-					continue;
-				}
-				if ($newName != $cookie['name']) {
-					continue;
-				}
-				$newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN';
-				$domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN';
-				if ($newDomain != $domain) {
-					continue;
-				}
-				$newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH';
-				$path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH';
-				if ($newPath != $path) {
-					continue;
-				}
-				$this->cookies[$i] = $newCookie;
-				$found = true;
-				$this->debug('Update cookie ' . $newName . '=' . $newCookie['value']);
-				break;
-			}
-			if (! $found) {
-				$this->debug('Add cookie ' . $newName . '=' . $newCookie['value']);
-				$this->cookies[] = $newCookie;
-			}
-		}
-		return true;
-	}
-}
-
-if (!extension_loaded('soap')) {
-	/**
-	 *	For backwards compatiblity, define soapclient unless the PHP SOAP extension is loaded.
-	 */
-	class soapclient extends nusoap_client {
-	}
-}
-?>
diff --git a/src/plugins/wiki/www/lib/pear/DB/Pager.php b/src/plugins/wiki/www/lib/pear/DB/Pager.php
deleted file mode 100644
index 5650bcd..0000000
--- a/src/plugins/wiki/www/lib/pear/DB/Pager.php
+++ /dev/null
@@ -1,253 +0,0 @@
-<?php
-//
-//  Pear DB Pager - Retrieve and return information of databases
-//                  result sets
-//
-//  Copyright (C) 2001  Tomas Von Veschler Cox <cox at idecnet.com>
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-//
-//
-///
-// Based on DB_Pager 0.7 from the pear.php.net repository.
-// The only modifications made have been modification of the include paths.
-//
-// From Pear CVS: Id: Pager.php,v 1.3 2002/05/12 13:59:40 cox Exp
-
-require_once 'PEAR.php';
-require_once 'DB.php';
-
-/**
-* This class handles all the stuff needed for displaying paginated results
-* from a database query of Pear DB, in a very easy way.
-* Documentation and examples of use, can be found in:
-* http://vulcanonet.com/soft/pager/ (could be outdated)
-*
-* IMPORTANT!
-* Since PEAR DB already support native row limit (more fast and avaible in
-* all the drivers), there is no more need to use $pager->build() or
-* the $pager->fetch*() methods.
-*
-* Usage example:
-*
-*< ?php
-* require_once 'DB/Pager.php';
-* $db = DB::connect('your DSN string');
-* $from = 0;   // The row to start to fetch from (you might want to get this
-*              // param from the $_GET array
-* $limit = 10; // The number of results per page
-* $maxpages = 10; // The number of pages for displaying in the pager (optional)
-* $res = $db->limitQuery($sql, $from, $limit);
-* $nrows = 0; // Alternative you could use $res->numRows()
-* while ($row = $res->fetchrow()) {
-*    // XXX code for building the page here
-*     $nrows++;
-* }
-* $data = DB_Pager::getData($from, $limit, $nrows, $maxpages);
-* // XXX code for building the pager here
-* ? >
-*
-* @version 0.7
-* @author Tomas V.V.Cox <cox at idecnet.com>
-* @see http://vulcanonet.com/soft/pager/
-*/
-
-class DB_Pager extends PEAR
-{
-
-    /**
-    * Constructor
-    *
-    * @param object $res  A DB_result object from Pear_DB
-    * @param int    $from  The row to start fetching
-    * @param int    $limit  How many results per page
-    * @param int    $numrows Pager will automatically
-    *    find this param if is not given. If your Pear_DB backend extension
-    *    doesn't support numrows(), you can manually calculate it
-    *    and supply later to the constructor
-    * @deprecated
-    */
-    function DB_Pager (&$res, $from, $limit, $numrows = null)
-    {
-        $this->res = $res;
-        $this->from = $from;
-        $this->limit = $limit;
-        $this->numrows = $numrows;
-    }
-
-    /**
-    * Calculates all the data needed by Pager to work
-    *
-    * @return mixed An assoc array with all the data (see getData)
-    *    or DB_Error on error
-    * @see DB_Pager::getData
-    * @deprecated
-    */
-    function build()
-    {
-        // if there is no numrows given, calculate it
-        if ($this->numrows === null) {
-            $this->numrows = $this->res->numrows();
-            if (DB::isError($this->numrows)) {
-                return $this->numrows;
-            }
-        }
-        $data = $this->getData($this->from, $this->limit, $this->numrows);
-        if (DB::isError($data)) {
-            return $data;
-        }
-        $this->current = $this->from - 1;
-        $this->top = $data['to'];
-        return $data;
-    }
-
-    /**
-    * @deprecated
-    */
-    function fetchRow($mode=DB_FETCHMODE_DEFAULT)
-    {
-        $this->current++;
-        if ($this->current >= $this->top) {
-            return null;
-        }
-        return $this->res->fetchRow($mode, $this->current);
-    }
-
-    /**
-    * @deprecated
-    */
-    function fetchInto(&$arr, $mode=DB_FETCHMODE_DEFAULT)
-    {
-        $this->current++;
-        if ($this->current >= $this->top) {
-            return null;
-        }
-        return $this->res->fetchInto($arr, $mode, $this->current);
-    }
-
-    /*
-    * Gets all the data needed to paginate results
-    * This is an associative array with the following
-    * values filled in:
-    *
-    * array(
-    *    'current' => X,    // current page you are
-    *    'numrows' => X,    // total number of results
-    *    'next'    => X,    // row number where next page starts
-    *    'prev'    => X,    // row number where prev page starts
-    *    'remain'  => X,    // number of results remaning *in next page*
-    *    'numpages'=> X,    // total number of pages
-    *    'from'    => X,    // the row to start fetching
-    *    'to'      => X,    // the row to stop fetching
-    *    'limit'   => X,    // how many results per page
-    *    'maxpages'   => X, // how many pages to show (google style)
-    *    'firstpage'  => X, // the row number of the first page
-    *    'lastpage'   => X, // the row number where the last page starts
-    *    'pages'   => array(    // assoc with page "number => start row"
-    *                1 => X,
-    *                2 => X,
-    *                3 => X
-    *                )
-    *    );
-    * @param int $from    The row to start fetching
-    * @param int $limit   How many results per page
-    * @param int $numrows Number of results from query
-    *
-    * @return array associative array with data or DB_error on error
-    *
-    */
-    function &getData($from, $limit, $numrows, $maxpages = false)
-    {
-        if (empty($numrows) || ($numrows < 0)) {
-            return null;
-        }
-        $from = (empty($from)) ? 0 : $from;
-
-        if ($limit <= 0) {
-            return PEAR::raiseError (null, 'wrong "limit" param', null,
-                                     null, null, 'DB_Error', true);
-        }
-
-        // Total number of pages
-        $pages = ceil($numrows/$limit);
-        $data['numpages'] = $pages;
-
-        // first & last page
-        $data['firstpage'] = 1;
-        $data['lastpage']  = $pages;
-
-        // Build pages array
-        $data['pages'] = array();
-        for ($i=1; $i <= $pages; $i++) {
-            $offset = $limit * ($i-1);
-            $data['pages'][$i] = $offset;
-            // $from must point to one page
-            if ($from == $offset) {
-                // The current page we are
-                $data['current'] = $i;
-            }
-        }
-        if (!isset($data['current'])) {
-            return PEAR::raiseError (null, 'wrong "from" param', null,
-                                     null, null, 'DB_Error', true);
-        }
-
-        // Limit number of pages (goole algoritm)
-        if ($maxpages) {
-            $radio = floor($maxpages/2);
-            $minpage = $data['current'] - $radio;
-            if ($minpage < 1) {
-                $minpage = 1;
-            }
-            $maxpage = $data['current'] + $radio - 1;
-            if ($maxpage > $data['numpages']) {
-                $maxpage = $data['numpages'];
-            }
-            foreach (range($minpage, $maxpage) as $page) {
-                $tmp[$page] = $data['pages'][$page];
-            }
-            $data['pages'] = $tmp;
-            $data['maxpages'] = $maxpages;
-        } else {
-            $data['maxpages'] = null;
-        }
-
-        // Prev link
-        $prev = $from - $limit;
-        $data['prev'] = ($prev >= 0) ? $prev : null;
-
-        // Next link
-        $next = $from + $limit;
-        $data['next'] = ($next < $numrows) ? $next : null;
-
-        // Results remaining in next page & Last row to fetch
-        if ($data['current'] == $pages) {
-            $data['remain'] = 0;
-            $data['to'] = $numrows;
-        } else {
-            if ($data['current'] == ($pages - 1)) {
-                $data['remain'] = $numrows - ($limit*($pages-1));
-            } else {
-                $data['remain'] = $limit;
-            }
-            $data['to'] = $data['current'] * $limit;
-        }
-        $data['numrows'] = $numrows;
-        $data['from']    = $from + 1;
-        $data['limit']   = $limit;
-
-        return $data;
-    }
-}
diff --git a/src/plugins/wiki/www/lib/pear/DB/ldap.php b/src/plugins/wiki/www/lib/pear/DB/ldap.php
deleted file mode 100644
index 7b7da21..0000000
--- a/src/plugins/wiki/www/lib/pear/DB/ldap.php
+++ /dev/null
@@ -1,912 +0,0 @@
-<?php
-//
-// Pear DB LDAP - Database independent query interface definition
-// for PHP's LDAP extension.
-//
-// Copyright (C) 2002 Ludovico Magnocavallo <ludo at sumatrasolutions.com>
-//
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-//
-// Contributors
-// - Piotr Roszatycki <Piotr_Roszatycki at netia.net.pl>
-//   DB_ldap::base() method, support for LDAP sequences, various fixes
-//
-// Based on DB 1.3 from the pear.php.net repository.
-// The only modifications made have been modification of the include paths.
-//
-// From Pear CVS: Id: ldap.php,v 1.9 2002/02/11 12:59:37 mj Exp
-
-require_once 'DB/common.php';
-define("DB_ERROR_BIND_FAILED",     -26);
-define("DB_ERROR_UNKNOWN_LDAP_ACTION",     -27);
-
-/**
- * LDAP result class
- *
- * LDAP_result extends DB_result to provide specific LDAP
- * result methods.
- *
- * @version 1.0
- * @author Ludovico Magnocavallo <ludo at sumatrasolutions.com>
- * @package DB
- */
-
-class LDAP_result extends DB_result
-{
-
-    // {{{ properties
-
-    /**
-     * data returned from ldap_entries()
-     * @access private
-     */
-    var $_entries   = null;
-    /**
-     * result rows as hash of records
-     * @access private
-     */
-    var $_recordset = null;
-    /**
-     * current record as hash
-     * @access private
-     */
-    var $_record    = null;
-
-    // }}}
-    // {{{ constructor
-
-    /**
-     * class constructor, calls DB_result constructor
-     * @param ref      $dbh    reference to the db instance
-     * @param resource $result ldap command result
-     */
-    function LDAP_result(&$dbh, $result)
-    {
-        $this->DB_result($dbh, $result);
-    }
-
-    /**
-     * fetch rows of data into $this->_recordset
-     *
-     * called once as soon as something needs to be returned
-     * @access private
-     * @param  resource $result ldap command result
-     * @return boolean  true
-     */
-    function getRows() {
-        if ($this->_recordset === null) {
-            // begin processing result into recordset
-            $this->_entries = ldap_get_entries($this->dbh->connection, $this->result);
-            $this->row_counter = $this->_entries['count'];
-            $i = 1;
-            $rs_template = array();
-            if (count($this->dbh->attributes) > 0) {
-                reset($this->dbh->attributes);
-                while (list($a_index, $a_name) = each($this->dbh->attributes)) $rs_template[$a_name] = '';
-            }
-            while (list($entry_idx, $entry) = each($this->_entries)) {
-                // begin first loop, iterate through entries
-                if (!empty($this->dbh->limit_from) && ($i < $this->dbh->limit_from)) continue;
-                if (!empty($this->dbh->limit_count) && ($i > $this->dbh->limit_count)) break;
-                $rs = $rs_template;
-                if (!is_array($entry)) continue;
-                while (list($attr, $attr_values) = each($entry)) {
-                    // begin second loop, iterate through attributes
-                    if (is_int($attr) || $attr == 'count') continue;
-                    if (is_string($attr_values)) $rs[$attr] = $attr_values;
-                    else {
-                        $value = '';
-                        while (list($value_idx, $attr_value) = each($attr_values)) {
-                            // begin third loop, iterate through attribute values
-                            if (!is_int($value_idx)) continue;
-                            if (empty($value)) $value = $attr_value;
-                            else {
-                                if (is_array($value)) $value[] = $attr_value;
-                                else $value = array($value, $attr_value);
-                            }
-//                          else $value .= "\n$attr_value";
-                            // end third loop
-                        }
-                        $rs[$attr] = $value;
-                    }
-                    // end second loop
-                }
-                reset($rs);
-                $this->_recordset[$entry_idx] = $rs;
-                $i++;
-                // end first loop
-            }
-            $this->_entries = null;
-            if (!is_array($this->_recordset))
-                $this->_recordset = array();
-            if (!empty($this->dbh->sorting)) {
-                $sorting_method = (!empty($this->dbh->sorting_method) ? $this->dbh->sorting_method : 'cmp');
-                uksort($this->_recordset, array(&$this, $sorting_method));
-            }
-            reset($this->_recordset);
-            // end processing result into recordset
-        }
-        return DB_OK;
-    }
-
-
-    /**
-     * Fetch and return a row of data (it uses driver->fetchInto for that)
-     * @param int $fetchmode format of fetched row
-     * @param int $rownum    the row number to fetch
-     *
-     * @return array a row of data, NULL on no more rows or PEAR_Error on error
-     *
-     * @access public
-     */
-    function &fetchRow($fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null)
-    {
-        $this->getRows();
-        if (count($this->_recordset) == 0) return null;
-        if ($this->_record !== null) $this->_record = next($this->_recordset);
-        else $this->_record = current($this->_recordset);
-        $row = $this->_record;
-        return $row;
-    }
-
-
-    /**
-     * Fetch a row of data into an existing variable.
-     *
-     * @param mixed   $arr       reference to data containing the row
-     * @param integer $fetchmode format of fetched row
-     * @param integer $rownum    the row number to fetch
-     *
-     * @return mixed DB_OK on success, NULL on no more rows or
-     *                 a DB_Error object on error
-     *
-     * @access public
-     */
-
-    function fetchInto(&$ar, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null)
-    {
-        $this->getRows();
-        if ($this->_record !== null) $this->_record = next($this->_recordset);
-        else $this->_record = current($this->_recordset);
-        $ar = $this->_record;
-        if (!$ar) {
-            return null;
-        }
-        return DB_OK;
-    }
-
-    /**
-     * return all records
-     *
-     * returns a hash of all records, basically returning
-     * a copy of $this->_recordset
-     * @param integer $fetchmode format of fetched row
-     * @param integer $rownum    the row number to fetch (not used, here for interface compatibility)
-     *
-     * @return mixed DB_OK on success, NULL on no more rows or
-     *                 a DB_Error object on error
-     *
-     * @access public
-     */
-    function fetchAll($fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null)
-    {
-        $this->getRows();
-        return($this->_recordset);
-    }
-
-    /**
-     * Get the the number of columns in a result set.
-     *
-     * @return int the number of columns, or a DB error
-     *
-     * @access public
-     */
-    function numCols($result)
-    {
-        $this->getRows();
-        return(count(array_keys($this->_record)));
-    }
-
-    function cmp($a, $b)
-    {
-        return(strcmp(strtolower($this->_recordset[$a][$this->dbh->sorting]), strtolower($this->_recordset[$b][$this->dbh->sorting])));
-    }
-
-    /**
-     * Get the number of rows in a result set.
-     *
-     * @return int the number of rows, or a DB error
-     *
-     * @access public
-     */
-    function numRows()
-    {
-        $this->getRows();
-        return $this->row_counter;
-    }
-
-    /**
-     * Get the next result if a batch of queries was executed.
-     *
-     * @return bool true if a new result is available or false if not.
-     *
-     * @access public
-     */
-    function nextResult()
-    {
-        return $this->dbh->nextResult($this->result);
-    }
-
-    /**
-     * Frees the resources allocated for this result set.
-     * @return int error code
-     *
-     * @access public
-     */
-    function free()
-    {
-        $this->_recordset = null;
-        $this->_record = null;
-        ldap_free_result($this->result);
-        $this->result = null;
-        return true;
-    }
-
-    /**
-    * @deprecated
-    */
-    function tableInfo($mode = null)
-    {
-        return $this->dbh->tableInfo($this->result, $mode);
-    }
-
-    /**
-    * returns the actual rows number
-    * @return integer
-    */
-    function getRowCounter()
-    {
-        $this->getRows();
-        return $this->row_counter;
-    }
-}
-
-/**
- * LDAP DB interface class
- *
- * LDAP extends DB_common to provide DB compliant
- * access to LDAP servers
- *
- * @version 1.0
- * @author Ludovico Magnocavallo <ludo at sumatrasolutions.com>
- * @package DB
- */
-
-class DB_ldap extends DB_common
-{
-    // {{{ properties
-
-    /**
-     * LDAP connection
-     * @access private
-     */
-    var $connection;
-    /**
-     * base dn
-     * @access private
-     */
-    var $base           = '';
-    /**
-     * query base dn
-     * @access private
-     */
-    var $q_base           = '';
-    /**
-     * array of LDAP actions that only manipulate data
-     * returning a true/false value
-     * @access private
-     */
-    var $manip          = array('add', 'compare', 'delete', 'modify', 'mod_add', 'mod_del', 'mod_replace', 'rename');
-    /**
-     * store the real LDAP action to perform
-     * (ie PHP ldap function to call) for a query
-     * @access private
-     */
-    var $q_action       = '';
-    /**
-     * store optional parameters passed
-     *  to the real LDAP action
-     * @access private
-     */
-    var $q_params       = array();
-
-    // }}}
-
-    /**
-     * Constructor, calls DB_common constructor
-     *
-     * @see DB_common::DB_common()
-     */
-    function DB_ldap()
-    {
-        $this->DB_common();
-        $this->phptype = 'ldap';
-        $this->dbsyntax = 'ldap';
-        $this->features = array(
-            'prepare'       => false,
-            'pconnect'      => false,
-            'transactions'  => false,
-            'limit'         => false
-        );
-    }
-
-    /**
-     * Connect and bind to LDAP server with either anonymous or authenticated bind depending on dsn info
-     *
-     * @param  array   $dsninfo    dsn info as passed by DB::connect()
-     * @param  boolean $persistent kept for interface compatibility
-     * @return DB_OK   if successfully connected. A DB error code is returned on failure.
-     */
-    function connect($dsninfo, $persistent = false)
-    {
-        if (!DB::assertExtension('ldap'))
-            return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND);
-
-        $this->dsn = $dsninfo;
-        $user   = $dsninfo['username'];
-        $pw     = $dsninfo['password'];
-        $host   = $dsninfo['hostspec'];
-        $this->base = $dsninfo['database'];
-
-        if ($host) {
-            $conn = ldap_connect($host);
-        } else {
-            return $this->raiseError("unknown host $host");
-        }
-        if (!$conn) {
-            return $this->raiseError(DB_ERROR_CONNECT_FAILED);
-        }
-        if ($user && $pw) {
-            $bind = ldap_bind($conn, "${user}," . $this->base, $pw);
-        } else {
-            $bind = ldap_bind($conn);
-        }
-        if (!$bind) {
-            return $this->raiseError(DB_ERROR_BIND_FAILED);
-        }
-        $this->connection = $conn;
-        return DB_OK;
-    }
-
-    /**
-     * Unbinds from LDAP server
-     *
-     * @return int ldap_unbind() return value
-     */
-    function disconnect()
-    {
-        $ret = @ldap_unbind($this->connection);
-        $this->connection = null;
-        return $ret;
-    }
-
-
-    /**
-     * Performs a request against the LDAP server
-     *
-     * The type of request (and the corresponding PHP ldap function called)
-     * depend on two additional parameters, added in respect to the
-     * DB_common interface.
-     *
-     * @param  string $filter text of the request to send to the LDAP server
-     * @param  string $action type of request to perform, defaults to search (ldap_search())
-     * @param  array  $params array of additional parameters to pass to the PHP ldap function requested
-     * @return result from ldap function or DB Error object if no result
-     */
-    function simpleQuery($filter, $action = null, $params = null)
-    {
-        if ($action === null) {
-            $action = (!empty($this->q_action) ? $this->q_action : 'search');
-        }
-        if ($params === null) {
-            $params = (count($this->q_params) > 0 ? $this->q_params : array());
-        }
-        if (!$this->isManip($action)) {
-            $base = $this->q_base ? $this->q_base : $this->base;
-            $attributes = array();
-            $attrsonly = 0;
-            $sizelimit = 0;
-            $timelimit = 0;
-            $deref = LDAP_DEREF_NEVER;
-            $sorting = '';
-            $sorting_method = '';
-            reset($params);
-            while (list($k, $v) = each($params)) {
-                if (isset(${$k})) ${$k} = $v;
-            }
-            $this->sorting = $sorting;
-            $this->sorting_method = $sorting_method;
-            $this->attributes = $attributes;
-            if ($action == 'search')
-                $result = @ldap_search($this->connection, $base, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref);
-            else if ($action == 'list')
-                $result = @ldap_list($this->connection, $base, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref);
-            else if ($action == 'read')
-                $result = @ldap_read($this->connection, $base, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref);
-            else
-                return $this->raiseError(DB_ERROR_UNKNOWN_LDAP_ACTION);
-            if (!$result) {
-                return $this->raiseError();
-            }
-        } else {
-            # If first argument is an array, it contains the entry with DN.
-            if (is_array($filter)) {
-                $entry = $filter;
-                $filter = $entry["dn"];
-            } else {
-                $entry = array();
-            }
-            unset($entry["dn"]);
-            $attribute      = '';
-            $value          = '';
-            $newrdn         = '';
-            $newparent      = '';
-            $deleteoldrdn   = false;
-            reset($params);
-            while (list($k, $v) = each($params)) {
-                if (isset(${$k})) ${$k} = $v;
-            }
-            if ($action == 'add')
-                $result = @ldap_add($this->connection, $filter, $entry);
-            else if ($action == 'compare')
-                $result = @ldap_add($this->connection, $filter, $attribute, $value);
-            else if ($action == 'delete')
-                $result = @ldap_delete($this->connection, $filter);
-            else if ($action == 'modify')
-                $result = @ldap_modify($this->connection, $filter, $entry);
-            else if ($action == 'mod_add')
-                $result = @ldap_mod_add($this->connection, $filter, $entry);
-            else if ($action == 'mod_del')
-                $result = @ldap_mod_del($this->connection, $filter, $entry);
-            else if ($action == 'mod_replace')
-                $result = @ldap_mod_replace($this->connection, $filter, $entry);
-            else if ($action == 'rename')
-                $result = @ldap_rename($this->connection, $filter, $newrdn, $newparent, $deleteoldrdn);
-            else
-                return $this->raiseError(DB_ERROR_UNKNOWN_LDAP_ACTION);
-            if (!$result) {
-                return $this->raiseError();
-            }
-        }
-        $this->freeQuery();
-        return $result;
-    }
-
-    /**
-     * Executes a query performing variables substitution in the query text
-     *
-     * @param  string      $stmt   text of the request to send to the LDAP server
-     * @param  array       $data   query variables values to substitute
-     * @param  string      $action type of request to perform, defaults to search (ldap_search())
-     * @param  array       $params array of additional parameters to pass to the PHP ldap function requested
-     * @return LDAP_result object or DB Error object if no result
-     * @see DB_common::executeEmulateQuery $this->simpleQuery()
-     */
-    function execute($stmt, $data = false, $action = 'search', $params = array())
-    {
-        $this->q_action = $action;
-        $this->q_params = $params;
-        $realquery = $this->executeEmulateQuery($stmt, $data);
-        if (DB::isError($realquery)) {
-            return $realquery;
-        }
-        $result = $this->simpleQuery($realquery);
-        if (DB::isError($result) || $result === DB_OK) {
-            return $result;
-        } else {
-            return new LDAP_result($this, $result);
-        }
-    }
-
-    /**
-     * Executes multiple queries performing variables substitution for each query
-     *
-     * @param  string      $stmt   text of the request to send to the LDAP server
-     * @param  array       $data   query variables values to substitute
-     * @param  string      $action type of request to perform, defaults to search (ldap_search())
-     * @param  array       $params array of additional parameters to pass to the PHP ldap function requested
-     * @return LDAP_result object or DB Error object if no result
-     * @see DB_common::executeMultiple
-     */
-    function executeMultiple($stmt, &$data, $action = 'search', $params = array())
-    {
-        $this->q_action = $action;
-        $this->q_params = $params;
-        return(parent::executeMultiple($stmt, $data));
-    }
-
-    /**
-     * Executes a query substituting variables if any are present
-     *
-     * @param  string      $query  text of the request to send to the LDAP server
-     * @param  array       $data   query variables values to substitute
-     * @param  string      $action type of request to perform, defaults to search (ldap_search())
-     * @param  array       $params array of additional parameters to pass to the PHP ldap function requested
-     * @return LDAP_result object or DB Error object if no result
-     * @see DB_common::prepare() $this->execute()$this->simpleQuery()
-     */
-    function &query($query, $data = array(), $action = 'search', $params = array()) {
-        $this->q_action = $action;
-        $this->q_params = $params;
-        if (sizeof($data) > 0) {
-            $sth = $this->prepare($query);
-            if (DB::isError($sth)) {
-                return $sth;
-            }
-            return $this->execute($sth, $data);
-        } else {
-            $result = $this->simpleQuery($query);
-            if (DB::isError($result) || $result === DB_OK) {
-                return $result;
-            } else {
-                return new LDAP_result($this, $result);
-            }
-        }
-    }
-
-    /**
-     * Modifies a query to return only a set of rows, stores $from and $count for LDAP_result
-     *
-     * @param  string   $query text of the request to send to the LDAP server
-     * @param  int      $from  record position from which to start returning data
-     * @param  int      $count number of records to return
-     * @return modified query text (no modifications are made, see above)
-     */
-    function modifyLimitQuery($query, $from, $count)
-    {
-        $this->limit_from = $from;
-        $this->limit_count = $count;
-        return $query;
-    }
-
-    /**
-     * Executes a query returning only a specified number of rows
-     *
-     * This method only saves the $from and $count parameters for LDAP_result
-     * where the actual records processing takes place
-     *
-     * @param  string      $query  text of the request to send to the LDAP server
-     * @param  int         $from   record position from which to start returning data
-     * @param  int         $count  number of records to return
-     * @param  string      $action type of request to perform, defaults to search (ldap_search())
-     * @param  array       $params array of additional parameters to pass to the PHP ldap function requested
-     * @return LDAP_result object or DB Error object if no result
-     */
-    function limitQuery($query, $from, $count, $action = 'search', $params = array())
-    {
-        $query = $this->modifyLimitQuery($query, $from, $count);
-        $this->q_action = $action;
-        $this->q_params = $params;
-        return $this->query($query, $action, $params);
-    }
-
-    /**
-     * Fetch the first column of the first row of data returned from
-     * a query.  Takes care of doing the query and freeing the results
-     * when finished.
-     *
-     * @param $query the SQL query
-     * @param $data if supplied, prepare/execute will be used
-     *        with this array as execute parameters
-     * @param  string $action type of request to perform, defaults to search (ldap_search())
-     * @param  array  $params array of additional parameters to pass to the PHP ldap function requested
-     * @return array
-     * @see DB_common::getOne()
-     * @access public
-     */
-    function &getOne($query, $data = array(), $action = 'search', $params = array())
-    {
-        $this->q_action = $action;
-        $this->q_params = $params;
-        return(parent::getOne($query, $data));
-    }
-
-    /**
-     * Fetch the first row of data returned from a query.  Takes care
-     * of doing the query and freeing the results when finished.
-     *
-     * @param $query the SQL query
-     * @param $fetchmode the fetch mode to use
-     * @param $data array if supplied, prepare/execute will be used
-     *        with this array as execute parameters
-     * @param string $action type of request to perform, defaults to search (ldap_search())
-     * @param array  $params array of additional parameters to pass to the PHP ldap function requested
-     * @access public
-     * @return array the first row of results as an array indexed from
-     * 0, or a DB error code.
-     * @see DB_common::getRow()
-     * @access public
-     */
-    function &getRow($query,
-                     $data = null,
-                     $fetchmode = DB_FETCHMODE_DEFAULT,
-                     $action = 'search', $params = array())
-    {
-        $this->q_action = $action;
-        $this->q_params = $params;
-        return(parent::getRow($query, $data, $fetchmode));
-    }
-
-    /**
-     * Fetch the first column of data returned from a query.  Takes care
-     * of doing the query and freeing the results when finished.
-     *
-     * @param $query the SQL query
-     * @param $col which column to return (integer [column number,
-     * starting at 0] or string [column name])
-     * @param $data array if supplied, prepare/execute will be used
-     *        with this array as execute parameters
-     * @param string $action type of request to perform, defaults to search (ldap_search())
-     * @param array  $params array of additional parameters to pass to the PHP ldap function requested
-     * @access public
-     * @return array an indexed array with the data from the first
-     * row at index 0, or a DB error code.
-     * @see DB_common::getCol()
-     * @access public
-     */
-    function &getCol($query, $col = 0, $data = array(), $action = 'search', $params = array())
-    {
-        $this->q_action = $action;
-        $this->q_params = $params;
-        return(parent::getCol($query, $col, $data));
-    }
-
-    /**
-     * Calls DB_common::getAssoc()
-     *
-     * @param $query the SQL query
-     * @param $force_array (optional) used only when the query returns
-     * exactly two columns.  If true, the values of the returned array
-     * will be one-element arrays instead of scalars.
-     * starting at 0] or string [column name])
-     * @param array $data if supplied, prepare/execute will be used
-     *        with this array as execute parameters
-     * @param $fetchmode the fetch mode to use
-     * @param boolean $group  see DB_Common::getAssoc()
-     * @param string  $action type of request to perform, defaults to search (ldap_search())
-     * @param array   $params array of additional parameters to pass to the PHP ldap function requested
-     * @access public
-     * @return array an indexed array with the data from the first
-     * row at index 0, or a DB error code.
-     * @see DB_common::getAssoc()
-     * @access public
-     */
-    function &getAssoc($query, $force_array = false, $data = array(),
-                       $fetchmode = DB_FETCHMODE_ORDERED, $group = false,
-                       $action = 'search', $params = array())
-    {
-        $this->q_action = $action;
-        $this->q_params = $params;
-        return(parent::getAssoc($query, $force_array, $data, $fetchmode, $group));
-    }
-
-    /**
-     * Fetch all the rows returned from a query.
-     *
-     * @param $query the SQL query
-     * @param array $data if supplied, prepare/execute will be used
-     *        with this array as execute parameters
-     * @param $fetchmode the fetch mode to use
-     * @param string $action type of request to perform, defaults to search (ldap_search())
-     * @param array  $params array of additional parameters to pass to the PHP ldap function requested
-     * @access public
-     * @return array an nested array, or a DB error
-     * @see DB_common::getAll()
-     */
-    function &getAll($query,
-                     $data = null,
-                     $fetchmode = DB_FETCHMODE_DEFAULT,
-                     $action = 'search', $params = array())
-    {
-        $this->q_action = $action;
-        $this->q_params = $params;
-        return(parent::getAll($query, $data, $fetchmode));
-    }
-
-    function numRows($result)
-    {
-        return $result->numRows();
-    }
-
-    function getTables()
-    {
-        return $this->raiseError(DB_ERROR_NOT_CAPABLE);
-    }
-
-    function getListOf($type)
-    {
-        return $this->raiseError(DB_ERROR_NOT_CAPABLE);
-    }
-
-    function isManip($action)
-    {
-        return(in_array($action, $this->manip));
-    }
-
-    function freeResult()
-    {
-        return true;
-    }
-
-    function freeQuery($query = '')
-    {
-        $this->q_action = '';
-        $this->q_base   = '';
-        $this->q_params = array();
-        $this->attributes = null;
-        $this->sorting = '';
-        return true;
-    }
-
-    function base($base = null)
-    {
-        $this->q_base = ($base !== null) ? $base : null;
-        return true;
-    }
-
-    /**
-     * Get the next value in a sequence.
-     *
-     * LDAP provides transactions for only one entry and we need to
-     * prevent race condition. If unique value before and after modify
-     * aren't equal then wait and try again.
-     *
-     * The name of sequence is LDAP DN of entry.
-     *
-     * @access public
-     * @param  string $seq_name the DN of the sequence
-     * @param  bool   $ondemand whether to create the sequence on demand
-     * @return a      sequence integer, or a DB error
-     */
-    function nextId($seq_name, $ondemand = true)
-    {
-        $repeat = 0;
-        do {
-            // Get the sequence entry
-            $this->base($seq_name);
-            $this->pushErrorHandling(PEAR_ERROR_RETURN);
-            $data = $this->getRow("objectClass=*");
-            $this->popErrorHandling();
-
-            if (DB::isError($data)) {
-                // DB_ldap doesn't use DB_ERROR_NOT_FOUND
-                if ($ondemand && $repeat == 0
-                && $data->getCode() == DB_ERROR) {
-                // Try to create sequence and repeat
-                    $repeat = 1;
-                    $data = $this->createSequence($seq_name);
-                    if (DB::isError($data)) {
-                        return $this->raiseError($data);
-                    }
-                } else {
-                    // Other error
-                    return $this->raiseError($data);
-                }
-            } else {
-                // Increment sequence value
-                $data["cn"]++;
-                // Unique identificator of transaction
-                $seq_unique = mt_rand();
-                $data["uid"] = $seq_unique;
-                // Modify the LDAP entry
-                $this->pushErrorHandling(PEAR_ERROR_RETURN);
-                $data = $this->simpleQuery($data, 'modify');
-                $this->popErrorHandling();
-                if (DB::isError($data)) {
-                    return $this->raiseError($data);
-                }
-                // Get the entry and check if it contains our unique value
-                $this->base($seq_name);
-                $data = $this->getRow("objectClass=*");
-                if (DB::isError($data)) {
-                    return $this->raiseError($data);
-                }
-                if ($data["uid"] != $seq_unique) {
-                    // It is not our entry. Wait a little time and repeat
-                    sleep(1);
-                    $repeat = 1;
-                } else {
-                    $repeat = 0;
-                }
-            }
-        } while ($repeat);
-
-        if (DB::isError($data)) {
-            return $data;
-        }
-        return $data["cn"];
-    }
-
-    /**
-     * Create the sequence
-     *
-     * The sequence entry is based on core schema with extensibleObject,
-     * so it should work with any LDAP server which doesn't check schema
-     * or supports extensibleObject object class.
-     *
-     * Sequence name have to be DN started with "sn=$seq_id,", i.e.:
-     *
-     * $seq_name = "sn=uidNumber,ou=sequences,dc=php,dc=net";
-     *
-     * dn: $seq_name
-     * objectClass: top
-     * objectClass: extensibleObject
-     * sn: $seq_id
-     * cn: $seq_value
-     * uid: $seq_uniq
-     *
-     * @param  string $seq_name the DN of the sequence
-     * @return mixed  DB_OK on success or DB error on error
-     * @access public
-     */
-    function createSequence($seq_name)
-    {
-        // Extract $seq_id from DN
-        ereg("^([^,]*),", $seq_name, $regs);
-        $seq_id = $regs[1];
-
-        // Create the sequence entry
-        $data = array(
-            dn => $seq_name,
-            objectclass => array("top", "extensibleObject"),
-            sn => $seq_id,
-            cn => 0,
-            uid => 0
-        );
-
-        // Add the LDAP entry
-        $this->pushErrorHandling(PEAR_ERROR_RETURN);
-        $data = $this->simpleQuery($data, 'add');
-        $this->popErrorHandling();
-        return $data;
-    }
-
-    /**
-     * Drop a sequence
-     *
-     * @param  string $seq_name the DN of the sequence
-     * @return mixed  DB_OK on success or DB error on error
-     * @access public
-     */
-    function dropSequence($seq_name)
-    {
-        // Delete the sequence entry
-        $data = array(
-            dn => $seq_name,
-        );
-        $this->pushErrorHandling(PEAR_ERROR_RETURN);
-        $data = $this->simpleQuery($data, 'delete');
-        $this->popErrorHandling();
-        return $data;
-    }
-
-}
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- */
diff --git a/src/plugins/wiki/www/lib/pear/LICENSE b/src/plugins/wiki/www/lib/pear/LICENSE
new file mode 100644
index 0000000..a00a242
--- /dev/null
+++ b/src/plugins/wiki/www/lib/pear/LICENSE
@@ -0,0 +1,27 @@
+Copyright (c) 1997-2009,
+ Stig Bakken <ssb at php.net>,
+ Gregory Beaver <cellog at php.net>,
+ Helgi Þormar Þorbjörnsson <helgi at php.net>,
+ Tomas V.V.Cox <cox at idecnet.com>,
+ Martin Jansen <mj at php.net>.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/plugins/wiki/www/lib/plugin/FrameInclude.php b/src/plugins/wiki/www/lib/plugin/FrameInclude.php
deleted file mode 100644
index ff390db..0000000
--- a/src/plugins/wiki/www/lib/plugin/FrameInclude.php
+++ /dev/null
@@ -1,153 +0,0 @@
-<?php
-
-/*
- * Copyright 2002 $ThePhpWikiProgrammingTeam
- *
- * This file is part of PhpWiki.
- *
- * PhpWiki 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 2 of the License, or
- * (at your option) any later version.
- *
- * PhpWiki 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 PhpWiki; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-/**
- * FrameInclude:  Display a url or page in a separate frame inside our body.
- *
- * Usage:
- *  <<FrameInclude src=http://www.internet-technology.de/fourwins_de.htm >>
- *  <<FrameInclude page=OtherPage >>
- *  at the VERY BEGINNING in the content!
- *
- * Author:  Reini Urban <rurban at x-ray.at>, rewrite by Jeff Dairiki <dairiki at dairiki.org>
- *
- * KNOWN ISSUES:
- *
- * This is a dirty hack into the whole system. To display the page as
- * frameset we:
- *
- *  1. Discard any output buffered so far.
- *  2. Recursively call displayPage with magic arguments to generate
- *     the frameset (or individual frame contents.)
- *  3. Exit early.  (So this plugin is usually a no-return.)
- *
- *  In any cases we can now serve only specific templates with the new
- *  frame argument. The whole page is now ?frame=html (before it was
- *  named "top") For the Sidebar theme (or derived from it) we provide
- *  a left frame also, otherwise only top, content and bottom.
- */
-class WikiPlugin_FrameInclude
-    extends WikiPlugin
-{
-    function getDescription()
-    {
-        return _("Display a url in a separate frame inside our body. Only one frame allowed.");
-    }
-
-    function getDefaultArguments()
-    {
-        return array('src' => false, // the src url to include
-            'page' => false,
-            'name' => 'content', // name of our frame
-            'title' => false,
-            'rows' => '18%,*,15%', // names: top, $name, bottom
-            'cols' => '20%,*', // names: left, $name
-            // only useful on WikiTheme "Sidebar"
-            'frameborder' => 1,
-            'marginwidth' => false,
-            'marginheight' => false,
-            'noresize' => false,
-            'scrolling' => 'auto', // '[ yes | no | auto ]'
-        );
-    }
-
-    function run($dbi, $argstr, &$request, $basepage)
-    {
-
-        $args = ($this->getArgs($argstr, $request));
-        extract($args);
-
-        if ($request->getArg('action') != 'browse') {
-            return $this->disabled(_("Plugin not run: not in browse mode"));
-        }
-        if (!$request->isGetOrHead()) {
-            return $this->disabled("(method != 'GET')");
-        }
-
-        if (!$src and $page) {
-            if ($page == $request->get('pagename')) {
-                return $this->error(sprintf(_("Recursive inclusion of page %s"),
-                    $page));
-            }
-            $src = WikiURL($page);
-        }
-        if (!$src) {
-            return $this->error(sprintf(_("%s or %s parameter missing"),
-                'src', 'page'));
-        }
-
-        // FIXME: How to normalize url's to compare against recursion?
-        if ($src == $request->getURLtoSelf()) {
-            return $this->error(sprintf(_("Recursive inclusion of url %s"),
-                $src));
-        }
-
-        static $noframes = false;
-        if ($noframes) {
-            // Content for noframes version of page.
-            return HTML::p(fmt("See %s",
-                HTML::a(array('href' => $src), $src)));
-        }
-        $noframes = true;
-
-        if (($which = $request->getArg('frame'))) {
-            // Generate specialized frame output (header, footer, etc...)
-            $request->discardOutput();
-            displayPage($request, new Template("frame-$which", $request));
-            $request->finish(); //noreturn
-        }
-
-        // Generate the outer frameset
-        $frame = HTML::frame(array('name' => $name,
-            'src' => $src,
-            'title' => $title,
-            'frameborder' => (int)$frameborder,
-            'scrolling' => (string)$scrolling,
-            'noresize' => (bool)$noresize,
-        ));
-
-        if ($marginwidth)
-            $frame->setArg('marginwidth', $marginwidth);
-        if ($marginheight)
-            $frame->setArg('marginheight', $marginheight);
-
-        $tokens = array('CONTENT_FRAME' => $frame,
-            'ROWS' => $rows,
-            'COLS' => $cols,
-            'FRAMEARGS' => sprintf('frameborder="%d"', $frameborder),
-        );
-
-        // Produce the frameset.
-        $request->discardOutput();
-        displayPage($request, new Template('frameset', $request, $tokens));
-        $request->finish(); //noreturn
-        return '';
-    }
-}
-
-// Local Variables:
-// mode: php
-// tab-width: 8
-// c-basic-offset: 4
-// c-hanging-comment-ender-p: nil
-// indent-tabs-mode: nil
-// End:
diff --git a/src/plugins/wiki/www/lib/plugin/SyntaxHighlighter.php b/src/plugins/wiki/www/lib/plugin/SyntaxHighlighter.php
new file mode 100644
index 0000000..09c296c
--- /dev/null
+++ b/src/plugins/wiki/www/lib/plugin/SyntaxHighlighter.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * Copyright 2004 $ThePhpWikiProgrammingTeam
+ *
+ * This file is part of PhpWiki.
+ *
+ * PhpWiki 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PhpWiki 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 PhpWiki; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+class WikiPlugin_SyntaxHighlighter
+    extends WikiPlugin
+{
+    public $source;
+
+    function getDescription()
+    {
+        return _("Source code syntax highlighter (via http://highlightjs.org/).");
+    }
+
+    function managesValidators()
+    {
+        return true;
+    }
+
+    function getDefaultArguments()
+    {
+        return array(
+            'syntax' => null, // required argument
+            'style' => null, // optional argument ["ansi", "gnu", "kr", "java", "linux"]
+            'color' => null, // optional, see highlight/themes
+            'number' => 0,
+            'wrap' => 0,
+        );
+    }
+
+    function handle_plugin_args_cruft($argstr, $args)
+    {
+        $this->source = $argstr;
+    }
+
+    /**
+     * @param WikiDB $dbi
+     * @param string $argstr
+     * @param WikiRequest $request
+     * @param string $basepage
+     * @return mixed
+     */
+    function run($dbi, $argstr, &$request, $basepage)
+    {
+        extract($this->getArgs($argstr, $request));
+        $source =& $this->source;
+        if (empty($source)) {
+            return HTML::div(array('class' => "error"),
+                   "Please provide source code to SyntaxHighlighter plugin");
+        }
+        $html = HTML();
+        $code = "\n<code>\n".htmlspecialchars($source)."\n</code>\n";
+        $pre = HTML::pre(HTML::raw($code));
+        $html->pushContent($pre);
+        return HTML($html);
+    }
+}
+
+// Local Variables:
+// mode: php
+// tab-width: 8
+// c-basic-offset: 4
+// c-hanging-comment-ender-p: nil
+// indent-tabs-mode: nil
+// End:
diff --git a/src/plugins/wiki/www/lib/plugin/Video.php b/src/plugins/wiki/www/lib/plugin/Video.php
new file mode 100644
index 0000000..67e04f0
--- /dev/null
+++ b/src/plugins/wiki/www/lib/plugin/Video.php
@@ -0,0 +1,157 @@
+<?php
+
+/*
+ * Copyright 2009 Roger Guignard and Marc-Etienne Vargenau, Alcatel-Lucent
+ *
+ * This file is part of PhpWiki.
+ *
+ * PhpWiki 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 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PhpWiki 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 PhpWiki; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/*
+ * Standard Alcatel-Lucent disclaimer for contributing to open source
+ *
+ * "The VideoPlugin ("Contribution") has not been tested and/or
+ * validated for release as or in products, combinations with products or
+ * other commercial use. Any use of the Contribution is entirely made at
+ * the user's own responsibility and the user can not rely on any features,
+ * functionalities or performances Alcatel-Lucent has attributed to the
+ * Contribution.
+ *
+ * THE CONTRIBUTION BY ALCATEL-LUCENT IS PROVIDED AS IS, WITHOUT WARRANTY
+ * OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+ * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPLIANCE,
+ * NON-INTERFERENCE AND/OR INTERWORKING WITH THE SOFTWARE TO WHICH THE
+ * CONTRIBUTION HAS BEEN MADE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * ALCATEL-LUCENT BE LIABLE FOR ANY DAMAGES OR OTHER LIABLITY, WHETHER IN
+ * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * CONTRIBUTION OR THE USE OR OTHER DEALINGS IN THE CONTRIBUTION, WHETHER
+ * TOGETHER WITH THE SOFTWARE TO WHICH THE CONTRIBUTION RELATES OR ON A STAND
+ * ALONE BASIS."
+ */
+
+class WikiPlugin_Video
+    extends WikiPlugin
+{
+    function getDescription()
+    {
+        return _("Display video in Flash or HTML5.");
+    }
+
+    function getDefaultArguments()
+    {
+        return array('width' => 460,
+            'height' => 320,
+            'url' => '',
+            'file' => '',
+            'autoplay' => 'false'
+        );
+    }
+
+    /**
+     * @param WikiDB $dbi
+     * @param string $argstr
+     * @param WikiRequest $request
+     * @param string $basepage
+     * @return mixed
+     */
+    function run($dbi, $argstr, &$request, $basepage)
+    {
+
+        global $WikiTheme;
+        $args = $this->getArgs($argstr, $request);
+        extract($args);
+
+        if (!$url && !$file) {
+            return $this->error(_("Both 'url' or 'file' parameters missing."));
+        } elseif ($url && $file) {
+            return $this->error(_("Choose only one of 'url' or 'file' parameters."));
+        } elseif ($file) {
+            // $url = SERVER_URL . getUploadDataPath() . '/' . $file;
+            $url = getUploadDataPath() . '/' . $file;
+        }
+
+        if (string_ends_with($url, ".ogg")) {
+            return HTML::video(array('autoplay' => 'true', 'controls' => 'true', 'src' => $url),
+                _("Your browser does not understand the HTML 5 video tag."));
+        }
+
+        $html = HTML();
+
+        if (isBrowserIE()) {
+            $object = HTML::object(array('id' => 'flowplayer',
+                'classid' => 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
+                'width' => $width,
+                'height' => $height));
+
+            $param = HTML::param(array('name' => 'movie',
+                'value' => SERVER_URL . $WikiTheme->_findData('flowplayer-3.2.4.swf')));
+            $object->pushContent($param);
+
+            $param = HTML::param(array('name' => "allowfullscreen",
+                'value' => "true"));
+            $object->pushContent($param);
+
+            $param = HTML::param(array('name' => "allowscriptaccess",
+                'value' => "false"));
+            $object->pushContent($param);
+
+            $flashvars = "config={'clip':{'url':'" . $url . "','autoPlay':" . $autoplay . "}}";
+
+            $param = HTML::param(array('name' => 'flashvars',
+                'value' => $flashvars));
+            $object->pushContent($param);
+
+            $embed = HTML::embed(array('type' => 'application/x-shockwave-flash',
+                'width' => $width,
+                'height' => $height,
+                'src' => SERVER_URL . $WikiTheme->_findData('flowplayer-3.2.4.swf'),
+                'flashvars' => $flashvars));
+            $object->pushContent($embed);
+
+            $html->pushContent($object);
+
+        } else {
+            $object = HTML::object(array('data' => SERVER_URL . $WikiTheme->_findData('flowplayer-3.2.4.swf'),
+                'type' => "application/x-shockwave-flash",
+                'width' => $width,
+                'height' => $height));
+
+            $param = HTML::param(array('name' => "allowfullscreen",
+                'value' => "true"));
+            $object->pushContent($param);
+
+            $param = HTML::param(array('name' => "allowscriptaccess",
+                'value' => "false"));
+            $object->pushContent($param);
+
+            $value = "config={'clip':{'url':'" . $url . "','autoPlay':" . $autoplay . "}}";
+            $param = HTML::param(array('name' => "flashvars",
+                'value' => $value));
+            $object->pushContent($param);
+
+            $html->pushContent($object);
+        }
+        return $html;
+    }
+}
+
+// Local Variables:
+// mode: php
+// tab-width: 8
+// c-basic-offset: 4
+// c-hanging-comment-ender-p: nil
+// indent-tabs-mode: nil
+// End:
diff --git a/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FD%C3%A9finirAclSimple b/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FD%C3%A9finirAclSimple
new file mode 100644
index 0000000..00a919c
--- /dev/null
+++ b/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FD%C3%A9finirAclSimple
@@ -0,0 +1,23 @@
+Date: Wed,  4 Mar 2015 14:19:52 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=AdministrationDePhpWiki%2FD%C3%A9finirAclSimple;
+  flags=PAGE_LOCKED;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+{| style="width: 100%; background-color: #e9fbff; border-style: solid; border-color: blue; border-width: 2px;"
+|-
+| {{(on)}} **//Liberal Access Rights//** means **//Everyone can edit//**.
+|-
+| {{(on)}} **//Restrictive Access Rights//** means **//Only logged users can see the page//**.
+|}
+
+For more complex Access Rights modifications, see **[[phpwiki:?action=setacl|SetAcl]]**.
+
+----
+
+<<WikiAdminSetAclSimple>>
+
+----
+[[CatégoriePageDAction]]
diff --git a/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FPurger b/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FPurger
new file mode 100644
index 0000000..20ae7cb
--- /dev/null
+++ b/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FPurger
@@ -0,0 +1,12 @@
+Date: Wed,  4 Mar 2015 14:19:52 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=AdministrationDePhpWiki%2FPurger;
+  flags=PAGE_LOCKED;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+<<WikiAdminPurge>>
+
+----
+[[CatégoriePageDAction]]
diff --git a/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FSupprimerAcl b/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FSupprimerAcl
new file mode 100644
index 0000000..0bc4bc9
--- /dev/null
+++ b/src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FSupprimerAcl
@@ -0,0 +1,12 @@
+Date: Wed,  4 Mar 2015 14:19:52 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=PhpWikiAdministration%2FSupprimerAcl;
+  flags=PAGE_LOCKED;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+<<WikiAdminDeleteAcl>>
+
+----
+[[CatégoriePageDAction]]
diff --git a/src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginInclureUnCadre b/src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginInclureUnCadre
deleted file mode 100644
index 31ff979..0000000
--- a/src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginInclureUnCadre
+++ /dev/null
@@ -1,36 +0,0 @@
-Date: Tue, 29 Jul 2014 10:42:12 +0000
-Mime-Version: 1.0 (Produced by PhpWiki 1.5.0)
-Content-Type: application/x-phpwiki;
-  pagename=Aide%2FPluginInclureUnCadre;
-  flags="";
-  charset=UTF-8
-Content-Transfer-Encoding: binary
-
-Ce plugin créera un cadre HTML qui remplira complètement la surface de la
-page (c'est-à-dire toute la surface que l'utilisateur peut éditer). Tout
-autre texte sera rejeté quand la page est affichée (tout ce qui est en
-dehors de l'appel du plugin). Dans le langage de l'hypertexte, ça s'appelle
-la <i>transclusion</i>.
-
-Vous pouvez être intéressé également par PluginInclureUnePage.
-
-Exemples: pour inclure une page depuis un autre site, utilisez l'argument <b>src</b> :
-
-{{{
-<<FrameInclude src="http://phpwiki.fr/">>
-}}}
-
-Pour inclure une page depuis ce wiki, utilisez l'argument <b>page</b> :
-
-{{{
-<<FrameInclude page=PageAccueil>>
-}}}
-
-Pour plus d'informations sur ce plugin, lisez s'il vous plaît, la source
-PHP dans le répertoire /lib/plugin.
-
-<noinclude>
-----
-[[DocumentationDePhpWiki]] [[CatégoriePluginWiki]]
-</noinclude>
-
diff --git a/src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginListeDePages b/src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginListeDePages
new file mode 100644
index 0000000..2386d17
--- /dev/null
+++ b/src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginListeDePages
@@ -0,0 +1,66 @@
+Date: Wed,  4 Mar 2015 14:19:52 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=Aide%2FPluginListeDePages;
+  flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+The **~ListPages** [[Help:WikiPlugin|plugin]] is the simplest plugin to explicitly list a set of pages with all available
+[[Help:PageList|PageList]] options, mainly used for a wikilens theme to display ratings info
+and recommendations.
+
+It can also be used with the [[PluginList]] method to list a set of pages generated by
+another plugin, and/or to exclude a set of pages generated by another plugin.
+
+See the [[Help:PageList|PageList]] options.
+
+== Usage ==
+
+{{{
+<<ListPages arguments>>
+}}}
+
+== Arguments ==
+
+All [[Help:PageList|PageList]] arguments, plus the following ones:
+
+{| class="bordered"
+|-
+! Argument
+! Description
+! Default value
+|-
+| **pages**
+| Pages to list
+| false
+|-
+| **dimension**
+|
+| 0
+|}
+
+=== Additional info arguments ===
+
+|= top3recs     | recommendations (wikilens theme only)
+|= numbacklinks | number of backlinks (links to the given page)
+|= numpagelinks | number of forward links (links at the given page)
+
+== Examples ==
+
+{{{
+<<ListPages pages=HomePage,FindPage>>
+}}}
+
+{{{
+<<ListPages info=hits
+            sortby=hits
+            pages=<!plugin-list BackLink page=[] !>
+            exclude=ListPagesPlugin,WikiPlugin
+>>
+}}}
+
+<noinclude>
+----
+[[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
+</noinclude>
diff --git a/src/plugins/wiki/www/locale/fr/pgsrc/D%C3%A9bogageDePhpWiki b/src/plugins/wiki/www/locale/fr/pgsrc/D%C3%A9bogageDePhpWiki
new file mode 100644
index 0000000..d729f74
--- /dev/null
+++ b/src/plugins/wiki/www/locale/fr/pgsrc/D%C3%A9bogageDePhpWiki
@@ -0,0 +1,53 @@
+Date: Wed,  4 Mar 2015 14:19:52 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=locale/fr/pgsrc/D%C3%A9bogageDePhpWiki;
+  flags=PAGE_LOCKED;
+  acl="view:_AUTHENTICATED,-_EVERY; list:_AUTHENTICATED,-_EVERY";
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+**//Note ://** //La plupart des actions sur cette page nécessitent des privilèges d'administrateur.//
+
+<<CreateToc jshide||=0 with_toclink||=1 position=right with_counter=1>>
+
+== Le coeur de Phpwiki ==
+
+Tout ceci surtout pour des débogages (au moins c'est ce que j'espère).
+
+En utilisation normale, vous ne devriez par les utiliser mais ça ne devrait
+pas vous faire de mal.
+
+=== Purger le cache ===
+
+Si votre wiki est ainsi configuré, le contenu transformé (presque HTML) de la plus récente version des pages est mis en cache. Ceci accélère la vitesse de chargement dans le navigateur car transformer le texte wiki prend du temps.
+
+Une pression sur ce bouton effacera tout le cache. Le contenu de chaque page sera transformer et remis en cache la prochaine fois que quelqu'un la verra.
+
+  <<WikiAdminUtils
+           action=purge-cache
+           label="Purge du cache"
+  >>
+
+=== Suppression des pages vides et non référencées ===
+
+ *Attention!* en appuyant sur ce bouton toutes les pages vides et non référencées seront supprimées sans aucune possiblité de les restaurer.
+ Ceci supprimera toute possibilité de retrouver les page ainsi supprimées.
+
+ <<WikiAdminUtils
+           action=purge-empty-pages
+           label="Purge all empty unreferenced pages"
+  >>
+
+=== Suppression des pages indésirables dans la base des données wiki ===
+
+Les pages dont le nom commence avec un séparateur de sous-page (habituellement un slash =/=) ne sont pas autorisées. Elles sont parfois crées par un plugin mal écrit...
+
+Ce bouton effacera toutes les pages dont le nom est illégal.
+  <<WikiAdminUtils
+           action=purge-bad-pagenames
+           label="Nettoyage de WikiDB"
+  >>
+
+----
+[[CatégoriePageDAction]]
diff --git a/src/plugins/wiki/www/locale/fr/pgsrc/DerniersVisiteurs b/src/plugins/wiki/www/locale/fr/pgsrc/DerniersVisiteurs
deleted file mode 100644
index 59784e2..0000000
--- a/src/plugins/wiki/www/locale/fr/pgsrc/DerniersVisiteurs
+++ /dev/null
@@ -1,13 +0,0 @@
-Date: Tue, 29 Jul 2014 10:42:12 +0000
-Mime-Version: 1.0 (Produced by PhpWiki 1.5.0)
-Content-Type: application/x-phpwiki;
-  pagename=DerniersVisiteurs;
-  flags="";
-  charset=UTF-8
-Content-Transfer-Encoding: binary
-
-Ajoutez votre nom ici, et datez votre visite !
-
-Arno Hollosi, Aredridel Stauck, Jeff Dairiki, Steve Wainstead, les auteurs de PhpWiki.
-
-Julien Pierre De La Brière et Pierrick Meignen, deux traducteurs pour la version française.
diff --git a/src/plugins/wiki/www/locale/fr/pgsrc/ListeDePages b/src/plugins/wiki/www/locale/fr/pgsrc/ListeDePages
deleted file mode 100644
index 9dc695d..0000000
--- a/src/plugins/wiki/www/locale/fr/pgsrc/ListeDePages
+++ /dev/null
@@ -1,15 +0,0 @@
-Date: Tue, 29 Jul 2014 10:42:12 +0000
-Mime-Version: 1.0 (Produced by PhpWiki 1.5.0)
-Content-Type: application/x-phpwiki;
-  pagename=ListeDePages;
-  flags="";
-  charset=UTF-8
-Content-Transfer-Encoding: binary
-
-Ein einfaches Beispiel für das PluginListeDePages. Hauptsächlich für ein wikilens Thema benutzt,
-um Ratings Info anzuzeigen.
-
-<<ListPages pages=HomePage,FindPage,WikiWikiWeb>>
-
-----
-[[CatégoriePageDAction]]
diff --git a/src/plugins/wiki/www/pgsrc/Copyrights b/src/plugins/wiki/www/pgsrc/Copyrights
new file mode 100644
index 0000000..a2add61
--- /dev/null
+++ b/src/plugins/wiki/www/pgsrc/Copyrights
@@ -0,0 +1,13 @@
+Date: Wed,  4 Mar 2015 14:20:06 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=Copyrights;
+  flags=PAGE_LOCKED;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+<!-- Insert your Copyrights statements here -->
+
+Content in this Website is Copyright [[The PhpWiki programming team]].
+
+It is licensed under GNU Free Documentation License (GFDL).
diff --git a/src/plugins/wiki/www/pgsrc/GeneralDisclaimer b/src/plugins/wiki/www/pgsrc/GeneralDisclaimer
new file mode 100644
index 0000000..8f0cd71
--- /dev/null
+++ b/src/plugins/wiki/www/pgsrc/GeneralDisclaimer
@@ -0,0 +1,12 @@
+Date: Wed,  4 Mar 2015 14:20:06 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=GeneralDisclaimer;
+  flags=PAGE_LOCKED;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+<!-- Insert your General Disclaimer here -->
+
+Content in this Website is licensed under GNU Free Documentation License 
+(GFDL).
diff --git a/src/plugins/wiki/www/pgsrc/Help%2FAdobe%20Flash b/src/plugins/wiki/www/pgsrc/Help%2FAdobe%20Flash
new file mode 100644
index 0000000..2138ee2
--- /dev/null
+++ b/src/plugins/wiki/www/pgsrc/Help%2FAdobe%20Flash
@@ -0,0 +1,76 @@
+Date: Wed,  4 Mar 2015 14:20:06 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=Help%2FAdobe%20Flash;
+  flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+You can easily insert **Adobe Flash** (.swf) files in the wiki.
+
+== Uploading Flash files ==
+
+First, Flash files need to be uploaded in the wiki. For that purpose, you will use the
+[[Help:UpLoadPlugin|UpLoad]] plugin.
+
+=== Syntax ===
+
+You give access to the uploaded Flash files with the following syntax.
+
+{{{
+{{myflash.swf}}
+}}}
+or
+{{{
+[[Upload:myflash.swf]]
+}}}
+will inline the image.
+
+=== Options ===
+
+Using the {{{Upload:}}} syntax, options are allowed to change the appearance:
+{{{
+[[Upload:myflash.png size=40x25 align=center]]
+}}}
+
+Separate options by spaces. The allowed options are the following:
+* size: //width "x" height// or //num + "%"//
+* align: //string//
+* border: //number//
+* hspace: //number//
+* vspace: //number//
+
+== Examples ==
+
+=== Wikicreole syntax ===
+
+{{{
+{{ora.swf}}
+}}}
+
+{{/themes/Sidebar/ora.swf}}
+
+=== Upload syntax ===
+
+{{{
+[[Upload:ora.swf]]
+[[Upload:ora.swf size=50x50]]
+}}}
+
+=== URL syntax ===
+
+{{{
+[[http://www.qasia.com/games/mahjong.swf]]
+}}}
+
+[[http://www.qasia.com/games/mahjong.swf]]
+
+== See Also ==
+* [[Help:Images]]
+* [[Help:VideoPlugin]]
+* [[Help:Wikicreole]]
+
+<noinclude>
+----
+[[PhpWikiDocumentation]]
+</noinclude>
diff --git a/src/plugins/wiki/www/pgsrc/Help%2FFrameIncludePlugin b/src/plugins/wiki/www/pgsrc/Help%2FFrameIncludePlugin
deleted file mode 100644
index 5994a9d..0000000
--- a/src/plugins/wiki/www/pgsrc/Help%2FFrameIncludePlugin
+++ /dev/null
@@ -1,32 +0,0 @@
-Date: Tue, 29 Jul 2014 10:42:12 +0000
-Mime-Version: 1.0 (Produced by PhpWiki 1.5.0)
-Content-Type: application/x-phpwiki;
-  pagename=Help%2FFrameIncludePlugin;
-  flags=PAGE_LOCKED;
-  charset=UTF-8
-Content-Transfer-Encoding: binary
-
-The **~FrameInclude** [[Help:WikiPlugin|plugin]] will create an HTML frame that will fill the entire display area of the page (that is, the whole area the user is allowed to edit). All other text will be discarded when the page is rendered (anything outside the call to plugin, that is). In the language of hypertext this is called //transclusion//.
-
-You might also be interested in the [[Help:IncludePagePlugin|IncludePage]] plugin.
-
-== Examples ==
-
-To include a page from another site, use the **src** attribute:
-
-{{{
-<<FrameInclude src="http://phpwiki.fr/">>
-}}}
-
-To include a page from within this wiki, use the **page** attribute:
-
-{{{
-<<FrameInclude page=HomePage>>
-}}}
-
-For more information on this plugin please read the PHP source code in the /lib/plugin directory.
-
-<noinclude>
-----
-[[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
-</noinclude>
diff --git a/src/plugins/wiki/www/pgsrc/Help%2FSyntaxHighlighterPlugin b/src/plugins/wiki/www/pgsrc/Help%2FSyntaxHighlighterPlugin
new file mode 100644
index 0000000..7c0be73
--- /dev/null
+++ b/src/plugins/wiki/www/pgsrc/Help%2FSyntaxHighlighterPlugin
@@ -0,0 +1,95 @@
+Date: Wed,  4 Mar 2015 14:20:06 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=Help%2FSyntaxHighlighterPlugin;
+  flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+The **~SyntaxHighlighter** [[Help:WikiPlugin|plugin]] will highlight source
+code in a variety of languages.
+
+Highlighting is done in Javascript with [[http://highlightjs.org/]].
+
+Recognized languages are the following:
+| Apache      | Bash         | C#       | C++
+| CSS         | CoffeeScript | Diff     | HTML, XML
+| HTTP        | Ini          | JSON     | Java
+| JavaScript  | Makefile     | Markdown | Nginx
+| Objective C | PHP          | Perl     | Python
+| Ruby        | SQL 
+
+== Arguments ==
+
+None.
+
+The source code is put between {{{<<SyntaxHighlighter}}} and {{{>>}}}.
+
+== Example ==
+
+{{{
+<<SyntaxHighlighter
+ #include <stdio.h>
+
+ int main() {
+     printf("Lalala\n");
+ }
+>>
+}}}
+
+will give:
+
+<<SyntaxHighlighter
+ #include <stdio.h>
+
+ int main() {
+     printf("Lalala\n");
+ }
+>>
+
+== History ==
+
+The first implementation of this plugin passed all its arguments through a C++
+highlighter called "highlight" (available at [[http://www.andre-simon.de]]).
+
+This implementation allowed the following arguments, which are now ignored.
+
+=== Former Arguments ===
+
+{| class="bordered"
+|-
+! Argument
+! Description
+! Default value
+|-
+| **syntax**
+|
+| //None// (required argument), see http://www.andre-simon.de/doku/highlight/highlight.html
+|-
+| **style**
+|
+| ~[ "ansi", "gnu", "kr", "java", "linux" ~] (required)
+|-
+| **color**
+|
+| null (optional), see ##highlight/themes##
+|-
+| **number**
+|
+| 0  (optional)
+|-
+| **wrap**
+|
+| 0  (optional)
+|}
+
+== Authors ==
+
+* alecthomas
+* Fixes by [[Help:Reini Urban|Reini Urban]]
+* Re-implementation with [[http://highlightjs.org/]] by Alain Peyrat and Marc-Etienne Vargenau, Alcatel-Lucent
+
+<noinclude>
+----
+[[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
+</noinclude>
diff --git a/src/plugins/wiki/www/pgsrc/Help%2FVideoPlugin b/src/plugins/wiki/www/pgsrc/Help%2FVideoPlugin
new file mode 100644
index 0000000..a707124
--- /dev/null
+++ b/src/plugins/wiki/www/pgsrc/Help%2FVideoPlugin
@@ -0,0 +1,75 @@
+Date: Wed,  4 Mar 2015 14:20:06 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=Help%2FVideoPlugin;
+  flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+The **~Video** [[Help:WikiPlugin|plugin]] allows to include video in a wiki page.
+Video file must be encoded in FLV format.
+
+The Video plugin can also be called with the ~{~{video.flv~}~} syntax.
+
+== Arguments ==
+
+Use only one of ##url## or ##file## arguments at a time.
+
+{| class="bordered"
+|-
+! Argument
+! Description
+! Default value
+|-
+| **url**
+| The url of a video file.
+| none
+|-
+| **file**
+| The name of a video file that has been uploaded.
+| none
+|-
+| **width**
+| The width of the video (in pixels).
+| 460
+|-
+| **height**
+| The height of the video (in pixels).
+| 320
+|-
+| **autoplay**
+| Auto play the video when page is displayed.
+| false
+|}
+
+== Example ==
+
+A video:
+{{{
+<<Video url=http://a.video.server/a_video.flv>>
+}}}
+
+Another video:
+{{{
+<<Video file=another_video.flv>>
+}}}
+
+This is equivalent to:
+{{{
+{{another_video.flv}}
+}}}
+
+== Authors ==
+
+* Roger Guignard, Alcatel-Lucent
+* Marc-Etienne Vargenau, Alcatel-Lucent
+
+== See Also ==
+* [[Help:Images]]
+* [[Help:Adobe Flash]]
+* [[Help:Wikicreole]]
+
+<noinclude>
+----
+[[PhpWikiDocumentation]] [[CategoryWikiPlugin]]
+</noinclude>
diff --git a/src/plugins/wiki/www/pgsrc/Help%2FWikisUsingPhpWiki b/src/plugins/wiki/www/pgsrc/Help%2FWikisUsingPhpWiki
new file mode 100644
index 0000000..7fbfa91
--- /dev/null
+++ b/src/plugins/wiki/www/pgsrc/Help%2FWikisUsingPhpWiki
@@ -0,0 +1,42 @@
+Date: Wed,  4 Mar 2015 14:20:06 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=Help%2FWikisUsingPhpWiki
+  flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+Here are some wikis using ~PhpWiki:
+
+|= URL                                                     |= ~PhpWiki release
+| http://bayernprovider.info/                              | 1.4.0RC1
+| http://bh.hallikainen.org/                               | 1.4.0
+| http://crdo.up.univ-aix.fr/phpwiki/                      | 1.3.14
+| http://danm.ucsc.edu/web/                                | 1.3.14
+| http://dev.cmeerw.org/HomePage                           | 1.5.0
+| http://esk.uz                                            | 1.3.14
+| http://helpdesk.razorline.com/wiki/                      | 1.4.0RC1
+| http://ifellner.de/ingowiki/                             | 1.4.0RC1
+| http://iwant2know.net/singaporewiki/                     | 1.4.0RC1
+| http://logix.me/wiki/                                    | 1.4.0RC1
+| http://mtswiki.westwood-tech.com/mtswiki-index.php       | 1.4.0RC1
+| http://nextdoordiscount.com/nydba/                       | 1.4.0RC1
+| http://pcsgwiki.com/wiki/                                | 1.3.14
+| http://php-rql.dnsalias.net/wiki/                        | 1.4.0RC1
+| http://profit.colegiolasalleguaparo.edu.ve/wiki/         | 1.3.14
+| http://rec-puzzles.org/                                  | 1.3.11p1
+| http://rhythsmbox.com/wiki/index.php                     | 1.4.0RC1
+| http://sldr-test.lpl-aix.fr/phpwiki/                     | 1.3.14
+| https://open-innovation.alcatel-lucent.com/wiki/g/help/  | 1.3.14
+| http://stardrive.genesismuds.com/index.php/              | 1.4.0RC1
+| https://www.geroedel.de/wiki/                            | 1.4.0
+| http://utenmelk.no/wiki/                                 | 1.4.0RC1
+| http://wac-tk.drni.de/                                   | 1.3.11p1
+| http://wiki.cyberleo.net/                                | 1.4.0RC1
+| http://wiki.inde-mayenne.org                             | 1.3.14
+| http://www-bd.lip6.fr/ens/li345-2011/index.php/Accueil   | 1.4.0RC1
+| http://www.dkbush.com/zphpwiki/                          | 1.3.14
+| http://www.drtedwilliams.net/kb/                         | 1.3.14
+| http://www.e38.org/phpwiki/                              | 1.3.14
+| http://www.michelsystems.com/phpwiki/                    | 1.4.0RC1
+| http://zombiecouncil.com/zwiki/                          | 1.4.0RC1
diff --git a/src/plugins/wiki/www/soapscripts/README b/src/plugins/wiki/www/soapscripts/README
new file mode 100644
index 0000000..d110f94
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/README
@@ -0,0 +1,19 @@
+The following scripts are available as examples of SOAP use:
+* createpage
+* createpagefromfile
+* fulltextsearch
+* getallpagenames
+* getcurrentrevision
+* getpage
+* getpagemeta
+* getpagerevision
+* getpluginsynopsis
+* listlinks
+* listplugins
+* listrelations
+* recentchanges
+* replacestring
+* titlesearch
+
+The WSDL file is taken from environment variable PHPWIKI_WSDL_URL.
+If this variable is not set, http://phpwiki.fr/PhpWiki.wsdl is used.
diff --git a/src/plugins/wiki/www/soapscripts/createpage b/src/plugins/wiki/www/soapscripts/createpage
new file mode 100755
index 0000000..7f621c4
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/createpage
@@ -0,0 +1,38 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 3) {
+    echo "usage: $argv[0] pagename content\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    echo $client->doSavePage($argv[1], $argv[2], $credentials);
+    echo "\n";
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/createpagefromfile b/src/plugins/wiki/www/soapscripts/createpagefromfile
new file mode 100755
index 0000000..d25562d
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/createpagefromfile
@@ -0,0 +1,48 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 3) {
+    echo "usage: $argv[0] pagename filename\n";
+    exit;
+}
+
+if (!file_exists($argv[2])) {
+    echo "error: file $argv[2] does not exist\n";
+    exit;
+}
+
+if (!is_readable($argv[2])) {
+    echo "error: file $argv[2] is not readable\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    echo $client->doSavePage($argv[1], file_get_contents($argv[2]), $credentials);
+    echo "\n";
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/fulltextsearch b/src/plugins/wiki/www/soapscripts/fulltextsearch
new file mode 100755
index 0000000..ee087ec
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/fulltextsearch
@@ -0,0 +1,40 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 2) {
+    echo "usage: $argv[0] term-to-search\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $pages = $client->doFullTextSearch($argv[1], $credentials);
+    foreach ($pages as $page) {
+        echo $page['pagename']."\n";
+    }
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/getallpagenames b/src/plugins/wiki/www/soapscripts/getallpagenames
new file mode 100755
index 0000000..1d9758a
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/getallpagenames
@@ -0,0 +1,41 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 1) {
+    echo "usage: $argv[0]\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $all_pages = $client->getAllPagenames();
+    for ($i = 0; $i < count($all_pages); $i++) {
+        echo $all_pages[$i]['pagename'];
+        echo "\n";
+    }
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/getcurrentrevision b/src/plugins/wiki/www/soapscripts/getcurrentrevision
new file mode 100755
index 0000000..0953144
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/getcurrentrevision
@@ -0,0 +1,38 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 2) {
+    echo "usage: $argv[0] pagename\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    echo $client->getCurrentRevision($argv[1], $credentials);
+    echo "\n";
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/getpage b/src/plugins/wiki/www/soapscripts/getpage
new file mode 100755
index 0000000..18314e1
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/getpage
@@ -0,0 +1,38 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 2) {
+    echo "usage: $argv[0] pagename\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    echo $client->getPageContent($argv[1], $credentials);
+    echo "\n";
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/getpagemeta b/src/plugins/wiki/www/soapscripts/getpagemeta
new file mode 100755
index 0000000..5268e43
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/getpagemeta
@@ -0,0 +1,40 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 2) {
+    echo "usage: $argv[0] pagename\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $pagemeta = $client->getPageMeta($argv[1], $credentials);
+    foreach ($pagemeta as $key => $value) {
+        echo "$key: $value\n";
+    }
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/getpagerevision b/src/plugins/wiki/www/soapscripts/getpagerevision
new file mode 100755
index 0000000..8d07e80
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/getpagerevision
@@ -0,0 +1,42 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 3) {
+    echo "usage: $argv[0] pagename revision\n";
+    exit;
+}
+if (!is_numeric($argv[2])) {
+    echo "usage: revision must be an integer\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    echo $client->getPageRevision($argv[1], $argv[2], $credentials);
+    echo "\n";
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/getpluginsynopsis b/src/plugins/wiki/www/soapscripts/getpluginsynopsis
new file mode 100755
index 0000000..95ca331
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/getpluginsynopsis
@@ -0,0 +1,38 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 2) {
+    echo "usage: $argv[0] plugin-name\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    echo $client->getPluginSynopsis($argv[1], $credentials);
+    echo "\n";
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/listlinks b/src/plugins/wiki/www/soapscripts/listlinks
new file mode 100755
index 0000000..c41144b
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/listlinks
@@ -0,0 +1,40 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 2) {
+    echo "usage: $argv[0] pagename\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $links = $client->listLinks($argv[1], $credentials);
+    foreach ($links as $link) {
+        echo $link['pagename']."\n";
+    }
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/listplugins b/src/plugins/wiki/www/soapscripts/listplugins
new file mode 100755
index 0000000..bb6f297
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/listplugins
@@ -0,0 +1,41 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 1) {
+    echo "usage: $argv[0]\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $plugins = $client->listPlugins($credentials);
+    for ($i = 0; $i < count($plugins); $i++) {
+        echo $plugins[$i];
+        echo "\n";
+    }
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/listrelations b/src/plugins/wiki/www/soapscripts/listrelations
new file mode 100755
index 0000000..28c3f2c
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/listrelations
@@ -0,0 +1,41 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 1) {
+    echo "usage: $argv[0]\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $relations = $client->listRelations($credentials);
+    for ($i = 0; $i < count($relations); $i++) {
+        echo $relations[$i];
+        echo "\n";
+    }
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/recentchanges b/src/plugins/wiki/www/soapscripts/recentchanges
new file mode 100755
index 0000000..283b4ee
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/recentchanges
@@ -0,0 +1,50 @@
+#!/usr/bin/php
+<?php
+if (count($argv) == 1) {
+    $limit = 20;
+} elseif (count($argv) == 2) {
+    $limit = $argv[0];
+} else {
+    echo "usage: $argv[0] [limit]\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $changes = $client->getRecentChanges($limit, $credentials);
+    foreach ($changes as $change) {
+        echo "Pagename: ".$change['pagename']."\n";
+        echo "Last modified: ".$change['lastModified']."\n";
+        echo "Author: ".$change['author']."\n";
+        echo "Summary: ".$change['summary']."\n";
+        echo "Version: ".$change['version']."\n";
+        echo "\n";
+    }
+
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/replacestring b/src/plugins/wiki/www/soapscripts/replacestring
new file mode 100755
index 0000000..57478a8
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/replacestring
@@ -0,0 +1,42 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 4) {
+    echo "usage: $argv[0] pagename search replace\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $old_content = $client->getPageContent($argv[1], $credentials);
+    $new_content = str_replace($argv[2], $argv[3], $old_content);
+    if ($new_content != $old_content) {
+       echo $client->doSavePage($argv[1], $new_content, $credentials);
+       echo "\n";
+    }
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/soapscripts/titlesearch b/src/plugins/wiki/www/soapscripts/titlesearch
new file mode 100755
index 0000000..fe1908a
--- /dev/null
+++ b/src/plugins/wiki/www/soapscripts/titlesearch
@@ -0,0 +1,40 @@
+#!/usr/bin/php
+<?php
+if (count($argv) != 2) {
+    echo "usage: $argv[0] term-to-search\n";
+    exit;
+}
+
+$wsdl = getenv('PHPWIKI_WSDL_URL');
+if ($wsdl === false) {
+    $wsdl = "http://phpwiki.fr/PhpWiki.wsdl";
+}
+
+try {
+    $client = new SoapClient($wsdl);
+} catch (SoapFault $fault) {
+    die($fault->faultstring);
+}
+
+$phpwiki = getenv("HOME")."/.phpwiki";
+if (!file_exists($phpwiki)) {
+    $login = readline("Login: ");
+    $password = readline("Password: ");
+    $credentials = base64_encode($login.':'.$password);
+    if ($fp = fopen($phpwiki, 'w')) {
+        fprintf($fp, "%s:%s", $login, $password);
+        fclose($fp);
+        chmod($phpwiki, 0600);
+    }
+} else {
+    $credentials = base64_encode(file_get_contents($phpwiki));
+}
+
+try {
+    $pages = $client->doTitleSearch($argv[1], $credentials);
+    foreach ($pages as $page) {
+        echo $page['pagename']."\n";
+    }
+} catch (SoapFault $e) {
+    echo 'Error: ' .  $e->getMessage() . "\n";
+}
diff --git a/src/plugins/wiki/www/themes/MacOSX/images/index.php b/src/plugins/wiki/www/themes/MacOSX/images/index.php
deleted file mode 100644
index 991feae..0000000
--- a/src/plugins/wiki/www/themes/MacOSX/images/index.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
-<head><title>Alpha Channel Test</title>
-    <script type="text/javascript"><!--
-    var backgroundcolor = new Array();
-    backgroundcolor[0] = '#ffffff';
-    backgroundcolor[1] = '#cccccc';
-    backgroundcolor[2] = '#888888';
-    backgroundcolor[3] = '#444444';
-    backgroundcolor[4] = '#000000';
-    backgroundcolor[5] = '#aa8888';
-    backgroundcolor[6] = '#88aa88';
-    backgroundcolor[7] = '#8888aa';
-    function changebg(color) {
-        document.bgColor = backgroundcolor[color];
-    }
-    //--></script>
-</head>
-<body style="background-color:"#8888aa">
-<?php
-$dir = opendir(".");
-while ($fileName = readdir($dir))
-    if (!(strcmp(substr($fileName, -4), ".png")))
-        print("<img src=\"" . urlencode($fileName) . "\" alt=\"$fileName\" />\n");
-?>
-<hr>
-bgcolor:
-<script type="text/javascript"><!--
-for (var n = 0; n < backgroundcolor.length; n++) {
-    document.write(
-            ' <a href="#" onmouseover="javascript:changebg(' + n + ')">' + backgroundcolor[n] + '</a>'
-    );
-}
-//--></script>
-<hr>
-</body>
-</html>
diff --git a/src/plugins/wiki/www/themes/Sidebar/images/bulletLoading.gif b/src/plugins/wiki/www/themes/Sidebar/images/bulletLoading.gif
new file mode 100644
index 0000000..93e95fb
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/images/bulletLoading.gif differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/images/discussionitem_icon.png b/src/plugins/wiki/www/themes/Sidebar/images/discussionitem_icon.png
new file mode 100644
index 0000000..28df08d
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/images/discussionitem_icon.png differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/images/file_icon.png b/src/plugins/wiki/www/themes/Sidebar/images/file_icon.png
new file mode 100644
index 0000000..f8245e8
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/images/file_icon.png differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/images/lock_icon.png b/src/plugins/wiki/www/themes/Sidebar/images/lock_icon.png
new file mode 100644
index 0000000..db5d21c
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/images/lock_icon.png differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/images/mail_icon.png b/src/plugins/wiki/www/themes/Sidebar/images/mail_icon.png
new file mode 100644
index 0000000..8802e8c
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/images/mail_icon.png differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/images/news_icon.png b/src/plugins/wiki/www/themes/Sidebar/images/news_icon.png
new file mode 100644
index 0000000..7ac6a5b
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/images/news_icon.png differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/images/url.png b/src/plugins/wiki/www/themes/Sidebar/images/url.png
new file mode 100644
index 0000000..d153f56
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/images/url.png differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/README b/src/plugins/wiki/www/themes/Sidebar/jscalendar/README
new file mode 100644
index 0000000..455ab3d
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/README
@@ -0,0 +1,33 @@
+The DHTML Calendar
+-------------------
+
+  Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+          http://dynarch.com/mishoo/
+
+  This program is free software published under the
+  terms of the GNU Lesser General Public License.
+
+  For the entire license text please refer to
+  http://www.gnu.org/licenses/lgpl.html
+
+Contents
+---------
+
+  calendar.js     -- the main program file
+  lang/*.js       -- internalization files
+  *.css           -- color themes
+  cal.html        -- example usage file
+  doc/            -- documentation, in PDF and HTML
+  simple-1.html   -- quick setup examples [popup calendars]
+  simple-2.html   -- quick setup example for flat calendar
+  calendar.php    -- PHP wrapper
+  test.php        -- test file for the PHP wrapper
+
+Homepage
+---------
+
+  For details and latest versions please refer to calendar
+  homepage, located on my website:
+
+    http://dynarch.com/mishoo/calendar.epl
+
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-phpwiki.css b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-phpwiki.css
new file mode 100644
index 0000000..3a46a62
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-phpwiki.css
@@ -0,0 +1,272 @@
+/* The main calendar widget.  DIV containing a table. */
+
+div.calendar {
+    position: relative;
+}
+
+.calendar {
+    font-size: 9px;
+    color: #000;
+    cursor: default;
+    font-family: tahoma, verdana, sans-serif;
+}
+
+.calendar table {
+    border: 1px solid #556;
+    font-size: 9px;
+    color: #000;
+    cursor: default;
+    /*background: #eef;*/
+    font-family: tahoma, verdana, sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button {
+    /* "<<", "<", ">", ">>" buttons have this class */
+    text-align: center; /* They are the navigation buttons */
+    padding: 2px; /* Make the buttons seem like they're pressing */
+}
+
+.calendar .nav {
+    background: #778 url(menuarrow.png) no-repeat 100% 100%;
+}
+
+.calendar thead .title {
+    /* This holds the current "month, year" */
+    font-weight: bold; /* Pressing it will take you to the current date */
+    text-align: center;
+    background: #fff;
+    color: #000;
+    padding: 2px;
+}
+
+.calendar thead .headrow {
+    /* Row <TR> containing navigation buttons */
+    background: #778;
+    color: #fff;
+}
+
+.calendar thead .daynames {
+    /* Row <TR> containing the day names */
+    background: #bdf;
+}
+
+.calendar thead .name {
+    /* Cells <TD> containing the day names */
+    border-bottom: 1px solid #556;
+    padding: 2px;
+    text-align: center;
+    color: #000;
+}
+
+.calendar thead .weekend {
+    /* How a weekend day name shows in header */
+    color: #a66;
+}
+
+.calendar thead .hilite {
+    /* How do the buttons in header appear when hover */
+    background-color: #aaf;
+    color: #000;
+    border: 1px solid #04f;
+    padding: 1px;
+}
+
+.calendar thead .active {
+    /* Active (pressed) buttons in header */
+    background-color: #77c;
+    padding: 1px 0px 0px 1px;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day {
+    /* Cells <TD> containing month days dates */
+    width: 2em;
+    color: #456;
+    text-align: right;
+    padding: 1px 2px 1px 1px;
+    /*  padding: 2px 4px 2px 2px; */
+}
+
+.calendar tbody .day.othermonth {
+    font-size: 80%;
+    color: #bbb;
+}
+
+.calendar tbody .day.othermonth.oweekend {
+    color: #fbb;
+}
+
+.calendar table .wn {
+    padding: 1px 2px 1px 1px;
+    border-right: 1px solid #000;
+    background: #bdf;
+}
+
+.calendar tbody .rowhilite td {
+    background: #def;
+}
+
+.calendar tbody .rowhilite td.wn {
+    background: #eef;
+}
+
+.calendar tbody td.hilite {
+    /* Hovered cells <TD> */
+    background: #def;
+    padding: 0px 1px 0px 0px;
+    border: 1px solid #bbb;
+}
+
+.calendar tbody td.active {
+    /* Active (pressed) cells <TD> */
+    background: #cde;
+    padding: 2px 2px 0px 2px;
+}
+
+.calendar tbody .existing {
+    /* Existing dates */
+    background: #cde;
+    color: #a66;
+    padding: 2px 2px 0px 2px;
+}
+
+.calendar tbody td.selected {
+    /* Cell showing today date */
+    font-weight: bold;
+    border: 1px solid #000;
+    padding: 1px 3px 1px 1px;
+    background: #fff;
+    color: #000;
+}
+
+.calendar tbody td.weekend {
+    /* Cells showing weekend days */
+    color: #a66;
+}
+
+.calendar tbody td.today {
+    /* Cell showing selected date */
+    font-weight: bold;
+    color: #00f;
+}
+
+.calendar tbody .disabled {
+    color: #999;
+}
+
+.calendar tbody .emptycell {
+    /* Empty cells (the best is to hide them) */
+    visibility: hidden;
+}
+
+.calendar tbody .emptyrow {
+    /* Empty row (some months need less than 6 rows) */
+    display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow {
+    /* The <TR> in footer (only one right now) */
+    text-align: center;
+    background: #556;
+    color: #fff;
+}
+
+.calendar tfoot .ttip {
+    /* Tooltip (status bar) cell <TD> */
+    background: #fff;
+    color: #445;
+    border-top: 1px solid #556;
+    padding: 1px;
+}
+
+.calendar tfoot .hilite {
+    /* Hover style for buttons in footer */
+    background: #aaf;
+    border: 1px solid #04f;
+    color: #000;
+    padding: 1px;
+}
+
+.calendar tfoot .active {
+    /* Active (pressed) style for buttons in footer */
+    background: #77c;
+    padding: 2px 0px 0px 2px;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+    position: absolute;
+    display: none;
+    top: 0px;
+    left: 0px;
+    width: 4em;
+    cursor: default;
+    border: 1px solid #655;
+    background: #def;
+    color: #000;
+    font-size: 90%;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+    text-align: center;
+    padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+    width: 4em;
+}
+
+.calendar .combo .hilite {
+    background: #acf;
+}
+
+.calendar .combo .active {
+    border-top: 1px solid #46a;
+    border-bottom: 1px solid #46a;
+    background: #eef;
+    font-weight: bold;
+}
+
+.calendar td.time {
+    border-top: 1px solid #000;
+    padding: 1px 0px;
+    text-align: center;
+    background-color: #f4f0e8;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+    padding: 0px 3px 0px 4px;
+    border: 1px solid #889;
+    font-weight: bold;
+    background-color: #fff;
+}
+
+.calendar td.time .ampm {
+    text-align: center;
+}
+
+.calendar td.time .colon {
+    padding: 0px 2px 0px 3px;
+    font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+    border-color: #000;
+    background-color: #667;
+    color: #fff;
+}
+
+.calendar td.time span.active {
+    border-color: #f00;
+    background-color: #000;
+    color: #0f0;
+}
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-setup.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-setup.js
new file mode 100644
index 0000000..82ea3e9
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-setup.js
@@ -0,0 +1,400 @@
+/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
+ * ---------------------------------------------------------------------------
+ *
+ * The DHTML Calendar
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ *
+ * This file defines helper functions for setting up the calendar.  They are
+ * intended to help non-programmers get a working calendar on their site
+ * quickly.  This script should not be seen as part of the calendar.  It just
+ * shows you what one can do with the calendar, while in the same time
+ * providing a quick and simple method for setting it up.  If you need
+ * exhaustive customization of the calendar creation process feel free to
+ * modify this code to suit your needs (this is recommended and much better
+ * than modifying calendar.js itself).
+ */
+
+// $Id: calendar-setup.js 6204 2008-08-26 15:12:03Z vargenau $
+
+/**
+ *  This function "patches" an input field (or other element) to use a calendar
+ *  widget for date selection.
+ *
+ *  The "params" is a single object that can have the following properties:
+ *
+ *    prop. name   | description
+ *  -------------------------------------------------------------------------------------------------
+ *   inputField    | the ID of an input field to store the date
+ *   displayArea   | the ID of a DIV or other element to show the date
+ *   button        | ID of a button or other element that will trigger the calendar
+ *   eventName     | event that will trigger the calendar, without the "on" prefix (default: "click")
+ *   ifFormat      | date format that will be stored in the input field
+ *   daFormat      | the date format that will be used to display the date in displayArea
+ *   singleClick   | (true/false) wether the calendar is in single click mode or not (default: true)
+ *   firstDay      | numeric: 0 to 6.  "0" means display Sunday first, "1" means display Monday first, etc.
+ *   align         | alignment (default: "Br"); if you don't know what's this see the calendar documentation
+ *   range         | array with 2 elements.  Default: [1900, 2999] -- the range of years available
+ *   weekNumbers   | (true/false) if it's true (default) the calendar will display week numbers
+ *   flat          | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
+ *   flatCallback  | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
+ *   disableFunc   | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
+ *   onSelect      | function that gets called when a date is selected.  You don't _have_ to supply this (the default is generally okay)
+ *   onClose       | function that gets called when the calendar is closed.  [default]
+ *   onUpdate      | function that gets called after the date is updated in the input field.  Receives a reference to the calendar.
+ *   date          | the date that the calendar will be initially displayed to
+ *   showsTime     | default: false; if true the calendar will include a time selector
+ *   timeFormat    | the time format; can be "12" or "24", default is "12"
+ *   electric      | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
+ *   step          | configures the step of the years in drop-down boxes; default: 2
+ *   position      | configures the calendar absolute position; default: null
+ *   cache         | if "true" (but default: "false") it will reuse the same calendar object, where possible
+ *   showOthers    | if "true" (but default: "false") it will show days from other months too
+ *
+ *  None of them is required, they all have default values.  However, if you
+ *  pass none of "inputField", "displayArea" or "button" you'll get a warning
+ *  saying "nothing to setup".
+ */
+Calendar.setup = function (params) {
+	function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
+
+	param_default("inputField",     null);
+	param_default("displayArea",    null);
+	param_default("button",         null);
+	param_default("eventName",      "click");
+	param_default("ifFormat",       "%Y/%m/%d");
+	param_default("daFormat",       "%Y/%m/%d");
+	param_default("singleClick",    true);
+	param_default("disableFunc",    null);
+	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
+	param_default("dateText",       null);
+	param_default("firstDay",       null);
+	param_default("align",          "Br");
+	param_default("range",          [1900, 2999]);
+	param_default("weekNumbers",    true);
+	param_default("flat",           null);
+	param_default("flatCallback",   null);
+	param_default("onSelect",       null);
+	param_default("onClose",        null);
+	param_default("onUpdate",       null);
+	param_default("date",           null);
+	param_default("showsTime",      false);
+	param_default("timeFormat",     "24");
+	param_default("electric",       true);
+	param_default("step",           2);
+	param_default("position",       null);
+	param_default("cache",          false);
+	param_default("showOthers",     false);
+	param_default("multiple",       null);
+
+	var tmp = ["inputField", "displayArea", "button"];
+	for (var i in tmp) {
+		if (typeof params[tmp[i]] == "string") {
+			params[tmp[i]] = document.getElementById(params[tmp[i]]);
+		}
+	}
+	if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) {
+		alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
+		return false;
+	}
+
+	function onSelect(cal) {
+		var p = cal.params;
+		var update = (cal.dateClicked || p.electric);
+		if (update && p.inputField) {
+			p.inputField.value = cal.date.print(p.ifFormat);
+			if (typeof p.inputField.onchange == "function")
+				p.inputField.onchange();
+		}
+		if (update && p.displayArea)
+			p.displayArea.innerHTML = cal.date.print(p.daFormat);
+		if (update && typeof p.onUpdate == "function")
+			p.onUpdate(cal);
+		if (update && p.flat) {
+			if (typeof p.flatCallback == "function")
+				p.flatCallback(cal);
+		}
+		if (update && p.singleClick && cal.dateClicked)
+			cal.callCloseHandler();
+	};
+
+	if (params.flat != null) {
+		if (typeof params.flat == "string")
+			params.flat = document.getElementById(params.flat);
+		if (!params.flat) {
+			alert("Calendar.setup:\n  Flat specified but can't find parent.");
+			return false;
+		}
+		var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
+		cal.showsOtherMonths = params.showOthers;
+		cal.showsTime = params.showsTime;
+		cal.time24 = (params.timeFormat == "24");
+		cal.params = params;
+		cal.weekNumbers = params.weekNumbers;
+		cal.setRange(params.range[0], params.range[1]);
+		cal.setDateStatusHandler(params.dateStatusFunc);
+		cal.getDateText = params.dateText;
+		if (params.ifFormat) {
+			cal.setDateFormat(params.ifFormat);
+		}
+		if (params.inputField && typeof params.inputField.value == "string") {
+			cal.parseDate(params.inputField.value);
+		}
+		cal.create(params.flat);
+		cal.show();
+		return false;
+	}
+
+	var triggerEl = params.button || params.displayArea || params.inputField;
+	triggerEl["on" + params.eventName] = function() {
+		var dateEl = params.inputField || params.displayArea;
+		var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
+		var mustCreate = false;
+		var cal = window.calendar;
+		if (dateEl)
+			params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt);
+		if (!(cal && params.cache)) {
+			window.calendar = cal = new Calendar(params.firstDay,
+							     params.date,
+							     params.onSelect || onSelect,
+							     params.onClose || function(cal) { cal.hide(); });
+			cal.showsTime = params.showsTime;
+			cal.time24 = (params.timeFormat == "24");
+			cal.weekNumbers = params.weekNumbers;
+			mustCreate = true;
+		} else {
+			if (params.date)
+				cal.setDate(params.date);
+			cal.hide();
+		}
+		if (params.multiple) {
+			cal.multiple = {};
+			for (var i = params.multiple.length; --i >= 0;) {
+				var d = params.multiple[i];
+				var ds = d.print("%Y%m%d");
+				cal.multiple[ds] = d;
+			}
+		}
+		cal.showsOtherMonths = params.showOthers;
+		cal.yearStep = params.step;
+		cal.setRange(params.range[0], params.range[1]);
+		cal.params = params;
+		cal.setDateStatusHandler(params.dateStatusFunc);
+		cal.getDateText = params.dateText;
+		cal.setDateFormat(dateFmt);
+		if (mustCreate)
+			cal.create();
+		cal.refresh();
+		if (!params.position)
+			cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
+		else
+			cal.showAt(params.position[0], params.position[1]);
+		return false;
+	};
+
+	return cal;
+};
+/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
+ * ---------------------------------------------------------------------------
+ *
+ * The DHTML Calendar
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ *
+ * This file defines helper functions for setting up the calendar.  They are
+ * intended to help non-programmers get a working calendar on their site
+ * quickly.  This script should not be seen as part of the calendar.  It just
+ * shows you what one can do with the calendar, while in the same time
+ * providing a quick and simple method for setting it up.  If you need
+ * exhaustive customization of the calendar creation process feel free to
+ * modify this code to suit your needs (this is recommended and much better
+ * than modifying calendar.js itself).
+ */
+
+// $Id: calendar-setup.js 6204 2008-08-26 15:12:03Z vargenau $
+
+/**
+ *  This function "patches" an input field (or other element) to use a calendar
+ *  widget for date selection.
+ *
+ *  The "params" is a single object that can have the following properties:
+ *
+ *    prop. name   | description
+ *  -------------------------------------------------------------------------------------------------
+ *   inputField    | the ID of an input field to store the date
+ *   displayArea   | the ID of a DIV or other element to show the date
+ *   button        | ID of a button or other element that will trigger the calendar
+ *   eventName     | event that will trigger the calendar, without the "on" prefix (default: "click")
+ *   ifFormat      | date format that will be stored in the input field
+ *   daFormat      | the date format that will be used to display the date in displayArea
+ *   singleClick   | (true/false) wether the calendar is in single click mode or not (default: true)
+ *   firstDay      | numeric: 0 to 6.  "0" means display Sunday first, "1" means display Monday first, etc.
+ *   align         | alignment (default: "Br"); if you don't know what's this see the calendar documentation
+ *   range         | array with 2 elements.  Default: [1900, 2999] -- the range of years available
+ *   weekNumbers   | (true/false) if it's true (default) the calendar will display week numbers
+ *   flat          | null or element ID; if not null the calendar will be a flat calendar having the parent with the given ID
+ *   flatCallback  | function that receives a JS Date object and returns an URL to point the browser to (for flat calendar)
+ *   disableFunc   | function that receives a JS Date object and should return true if that date has to be disabled in the calendar
+ *   onSelect      | function that gets called when a date is selected.  You don't _have_ to supply this (the default is generally okay)
+ *   onClose       | function that gets called when the calendar is closed.  [default]
+ *   onUpdate      | function that gets called after the date is updated in the input field.  Receives a reference to the calendar.
+ *   date          | the date that the calendar will be initially displayed to
+ *   showsTime     | default: false; if true the calendar will include a time selector
+ *   timeFormat    | the time format; can be "12" or "24", default is "12"
+ *   electric      | if true (default) then given fields/date areas are updated for each move; otherwise they're updated only on close
+ *   step          | configures the step of the years in drop-down boxes; default: 2
+ *   position      | configures the calendar absolute position; default: null
+ *   cache         | if "true" (but default: "false") it will reuse the same calendar object, where possible
+ *   showOthers    | if "true" (but default: "false") it will show days from other months too
+ *
+ *  None of them is required, they all have default values.  However, if you
+ *  pass none of "inputField", "displayArea" or "button" you'll get a warning
+ *  saying "nothing to setup".
+ */
+Calendar.setup = function (params) {
+	function param_default(pname, def) { if (typeof params[pname] == "undefined") { params[pname] = def; } };
+
+	param_default("inputField",     null);
+	param_default("displayArea",    null);
+	param_default("button",         null);
+	param_default("eventName",      "click");
+	param_default("ifFormat",       "%Y/%m/%d");
+	param_default("daFormat",       "%Y/%m/%d");
+	param_default("singleClick",    true);
+	param_default("disableFunc",    null);
+	param_default("dateStatusFunc", params["disableFunc"]);	// takes precedence if both are defined
+	param_default("dateText",       null);
+	param_default("firstDay",       null);
+	param_default("align",          "Br");
+	param_default("range",          [1900, 2999]);
+	param_default("weekNumbers",    true);
+	param_default("flat",           null);
+	param_default("flatCallback",   null);
+	param_default("onSelect",       null);
+	param_default("onClose",        null);
+	param_default("onUpdate",       null);
+	param_default("date",           null);
+	param_default("showsTime",      false);
+	param_default("timeFormat",     "24");
+	param_default("electric",       true);
+	param_default("step",           2);
+	param_default("position",       null);
+	param_default("cache",          false);
+	param_default("showOthers",     false);
+	param_default("multiple",       null);
+
+	var tmp = ["inputField", "displayArea", "button"];
+	for (var i in tmp) {
+		if (typeof params[tmp[i]] == "string") {
+			params[tmp[i]] = document.getElementById(params[tmp[i]]);
+		}
+	}
+	if (!(params.flat || params.multiple || params.inputField || params.displayArea || params.button)) {
+		alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");
+		return false;
+	}
+
+	function onSelect(cal) {
+		var p = cal.params;
+		var update = (cal.dateClicked || p.electric);
+		if (update && p.inputField) {
+			p.inputField.value = cal.date.print(p.ifFormat);
+			if (typeof p.inputField.onchange == "function")
+				p.inputField.onchange();
+		}
+		if (update && p.displayArea)
+			p.displayArea.innerHTML = cal.date.print(p.daFormat);
+		if (update && typeof p.onUpdate == "function")
+			p.onUpdate(cal);
+		if (update && p.flat) {
+			if (typeof p.flatCallback == "function")
+				p.flatCallback(cal);
+		}
+		if (update && p.singleClick && cal.dateClicked)
+			cal.callCloseHandler();
+	};
+
+	if (params.flat != null) {
+		if (typeof params.flat == "string")
+			params.flat = document.getElementById(params.flat);
+		if (!params.flat) {
+			alert("Calendar.setup:\n  Flat specified but can't find parent.");
+			return false;
+		}
+		var cal = new Calendar(params.firstDay, params.date, params.onSelect || onSelect);
+		cal.showsOtherMonths = params.showOthers;
+		cal.showsTime = params.showsTime;
+		cal.time24 = (params.timeFormat == "24");
+		cal.params = params;
+		cal.weekNumbers = params.weekNumbers;
+		cal.setRange(params.range[0], params.range[1]);
+		cal.setDateStatusHandler(params.dateStatusFunc);
+		cal.getDateText = params.dateText;
+		if (params.ifFormat) {
+			cal.setDateFormat(params.ifFormat);
+		}
+		if (params.inputField && typeof params.inputField.value == "string") {
+			cal.parseDate(params.inputField.value);
+		}
+		cal.create(params.flat);
+		cal.show();
+		return false;
+	}
+
+	var triggerEl = params.button || params.displayArea || params.inputField;
+	triggerEl["on" + params.eventName] = function() {
+		var dateEl = params.inputField || params.displayArea;
+		var dateFmt = params.inputField ? params.ifFormat : params.daFormat;
+		var mustCreate = false;
+		var cal = window.calendar;
+		if (dateEl)
+			params.date = Date.parseDate(dateEl.value || dateEl.innerHTML, dateFmt);
+		if (!(cal && params.cache)) {
+			window.calendar = cal = new Calendar(params.firstDay,
+							     params.date,
+							     params.onSelect || onSelect,
+							     params.onClose || function(cal) { cal.hide(); });
+			cal.showsTime = params.showsTime;
+			cal.time24 = (params.timeFormat == "24");
+			cal.weekNumbers = params.weekNumbers;
+			mustCreate = true;
+		} else {
+			if (params.date)
+				cal.setDate(params.date);
+			cal.hide();
+		}
+		if (params.multiple) {
+			cal.multiple = {};
+			for (var i = params.multiple.length; --i >= 0;) {
+				var d = params.multiple[i];
+				var ds = d.print("%Y%m%d");
+				cal.multiple[ds] = d;
+			}
+		}
+		cal.showsOtherMonths = params.showOthers;
+		cal.yearStep = params.step;
+		cal.setRange(params.range[0], params.range[1]);
+		cal.params = params;
+		cal.setDateStatusHandler(params.dateStatusFunc);
+		cal.getDateText = params.dateText;
+		cal.setDateFormat(dateFmt);
+		if (mustCreate)
+			cal.create();
+		cal.refresh();
+		if (!params.position)
+			cal.showAtElement(params.button || params.displayArea || params.inputField, params.align);
+		else
+			cal.showAt(params.position[0], params.position[1]);
+		return false;
+	};
+
+	return cal;
+};
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-setup_stripped.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-setup_stripped.js
new file mode 100644
index 0000000..91c927f
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-setup_stripped.js
@@ -0,0 +1,21 @@
+/*  Copyright Mihai Bazon, 2002, 2003  |  http://dynarch.com/mishoo/
+ * ---------------------------------------------------------------------------
+ *
+ * The DHTML Calendar
+ *
+ * Details and latest version at:
+ * http://dynarch.com/mishoo/calendar.epl
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ *
+ * This file defines helper functions for setting up the calendar.  They are
+ * intended to help non-programmers get a working calendar on their site
+ * quickly.  This script should not be seen as part of the calendar.  It just
+ * shows you what one can do with the calendar, while in the same time
+ * providing a quick and simple method for setting it up.  If you need
+ * exhaustive customization of the calendar creation process feel free to
+ * modify this code to suit your needs (this is recommended and much better
+ * than modifying calendar.js itself).
+ */
+ Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");return false;}function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")p.inputField.onchange();}if(update&&p.displayArea)p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")p.flatCallback(cal);}if(update&&p.singleClick&&cal.dateClicked)cal.callCloseHandler();};if(params.flat!=null){if(typeof params.flat=="string")params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n  Flat specified but can't find parent.");return false;}var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat);}if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value);}cal.create(params.flat);cal.show();return false;}var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&&params.cache)){window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();});cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date)cal.setDate(params.date);cal.hide();}if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d;}}cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)cal.create();cal.refresh();if(!params.position)cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else cal.showAt(params.position[0],params.position[1]);return false;};return cal;};
\ No newline at end of file
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-win2k-1.css b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-win2k-1.css
new file mode 100644
index 0000000..cf939b1
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-win2k-1.css
@@ -0,0 +1,295 @@
+/* The main calendar widget.  DIV containing a table. */
+
+.calendar {
+    position: relative;
+    display: none;
+    border-top: 2px solid #fff;
+    border-right: 2px solid #000;
+    border-bottom: 2px solid #000;
+    border-left: 2px solid #fff;
+    font-size: 11px;
+    color: #000;
+    cursor: default;
+    background: #d4d0c8;
+    font-family: tahoma, verdana, sans-serif;
+}
+
+.calendar table {
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+    font-size: 11px;
+    color: #000;
+    cursor: default;
+    background: #d4d0c8;
+    font-family: tahoma, verdana, sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button {
+    /* "<<", "<", ">", ">>" buttons have this class */
+    text-align: center;
+    padding: 1px;
+    border-top: 1px solid #fff;
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    border-left: 1px solid #fff;
+}
+
+.calendar .nav {
+    background: transparent url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title {
+    /* This holds the current "month, year" */
+    font-weight: bold;
+    padding: 1px;
+    border: 1px solid #000;
+    background: #848078;
+    color: #fff;
+    text-align: center;
+}
+
+.calendar thead .headrow {
+    /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames {
+    /* Row <TR> containing the day names */
+}
+
+.calendar thead .name {
+    /* Cells <TD> containing the day names */
+    border-bottom: 1px solid #000;
+    padding: 2px;
+    text-align: center;
+    background: #f4f0e8;
+}
+
+.calendar thead .weekend {
+    /* How a weekend day name shows in header */
+    color: #f00;
+}
+
+.calendar thead .hilite {
+    /* How do the buttons in header appear when hover */
+    border-top: 2px solid #fff;
+    border-right: 2px solid #000;
+    border-bottom: 2px solid #000;
+    border-left: 2px solid #fff;
+    padding: 0px;
+    background-color: #e4e0d8;
+}
+
+.calendar thead .active {
+    /* Active (pressed) buttons in header */
+    padding: 2px 0px 0px 2px;
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+    background-color: #c4c0b8;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day {
+    /* Cells <TD> containing month days dates */
+    width: 2em;
+    text-align: right;
+    padding: 2px 4px 2px 2px;
+}
+
+.calendar tbody .day.othermonth {
+    font-size: 80%;
+    color: #aaa;
+}
+
+.calendar tbody .day.othermonth.oweekend {
+    color: #faa;
+}
+
+.calendar table .wn {
+    padding: 2px 3px 2px 2px;
+    border-right: 1px solid #000;
+    background: #f4f0e8;
+}
+
+.calendar tbody .rowhilite td {
+    background: #e4e0d8;
+}
+
+.calendar tbody .rowhilite td.wn {
+    background: #d4d0c8;
+}
+
+.calendar tbody td.hilite {
+    /* Hovered cells <TD> */
+    padding: 1px 3px 1px 1px;
+    border-top: 1px solid #fff;
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    border-left: 1px solid #fff;
+}
+
+.calendar tbody td.active {
+    /* Active (pressed) cells <TD> */
+    padding: 2px 2px 0px 2px;
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+}
+
+.calendar tbody td.selected {
+    /* Cell showing selected date */
+    font-weight: bold;
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+    padding: 2px 2px 0px 2px;
+    background: #e4e0d8;
+}
+
+.calendar tbody td.weekend {
+    /* Cells showing weekend days */
+    color: #f00;
+}
+
+.calendar tbody td.today {
+    /* Cell showing today date */
+    font-weight: bold;
+    color: #00f;
+}
+
+.calendar tbody .disabled {
+    color: #999;
+}
+
+.calendar tbody .emptycell {
+    /* Empty cells (the best is to hide them) */
+    visibility: hidden;
+}
+
+.calendar tbody .emptyrow {
+    /* Empty row (some months need less than 6 rows) */
+    display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow {
+    /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip {
+    /* Tooltip (status bar) cell <TD> */
+    background: #f4f0e8;
+    padding: 1px;
+    border: 1px solid #000;
+    background: #848078;
+    color: #fff;
+    text-align: center;
+}
+
+.calendar tfoot .hilite {
+    /* Hover style for buttons in footer */
+    border-top: 1px solid #fff;
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    border-left: 1px solid #fff;
+    padding: 1px;
+    background: #e4e0d8;
+}
+
+.calendar tfoot .active {
+    /* Active (pressed) style for buttons in footer */
+    padding: 2px 0px 0px 2px;
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+    position: absolute;
+    display: none;
+    width: 4em;
+    top: 0px;
+    left: 0px;
+    cursor: default;
+    border-top: 1px solid #fff;
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    border-left: 1px solid #fff;
+    background: #e4e0d8;
+    font-size: 90%;
+    padding: 1px;
+    z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+    text-align: center;
+    padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+    width: 4em;
+}
+
+.calendar .combo .active {
+    background: #c4c0b8;
+    padding: 0px;
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+    background: #048;
+    color: #fea;
+}
+
+.calendar td.time {
+    border-top: 1px solid #000;
+    padding: 1px 0px;
+    text-align: center;
+    background-color: #f4f0e8;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+    padding: 0px 3px 0px 4px;
+    border: 1px solid #889;
+    font-weight: bold;
+    background-color: #fff;
+}
+
+.calendar td.time .ampm {
+    text-align: center;
+}
+
+.calendar td.time .colon {
+    padding: 0px 2px 0px 3px;
+    font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+    border-color: #000;
+    background-color: #766;
+    color: #fff;
+}
+
+.calendar td.time span.active {
+    border-color: #f00;
+    background-color: #000;
+    color: #0f0;
+}
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-win2k-cold-1.css b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-win2k-cold-1.css
new file mode 100644
index 0000000..55a010b
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-win2k-cold-1.css
@@ -0,0 +1,289 @@
+/* The main calendar widget.  DIV containing a table. */
+
+.calendar {
+    position: relative;
+    display: none;
+    border-top: 2px solid #fff;
+    border-right: 2px solid #000;
+    border-bottom: 2px solid #000;
+    border-left: 2px solid #fff;
+    font-size: 11px;
+    color: #000;
+    cursor: default;
+    background: #c8d0d4;
+    font-family: tahoma, verdana, sans-serif;
+}
+
+.calendar table {
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+    font-size: 11px;
+    color: #000;
+    cursor: default;
+    background: #c8d0d4;
+    font-family: tahoma, verdana, sans-serif;
+}
+
+/* Header part -- contains navigation buttons and day names. */
+
+.calendar .button {
+    /* "<<", "<", ">", ">>" buttons have this class */
+    text-align: center;
+    padding: 1px;
+    border-top: 1px solid #fff;
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    border-left: 1px solid #fff;
+}
+
+.calendar .nav {
+    background: transparent url(menuarrow.gif) no-repeat 100% 100%;
+}
+
+.calendar thead .title {
+    /* This holds the current "month, year" */
+    font-weight: bold;
+    padding: 1px;
+    border: 1px solid #000;
+    background: #788084;
+    color: #fff;
+    text-align: center;
+}
+
+.calendar thead .headrow {
+    /* Row <TR> containing navigation buttons */
+}
+
+.calendar thead .daynames {
+    /* Row <TR> containing the day names */
+}
+
+.calendar thead .name {
+    /* Cells <TD> containing the day names */
+    border-bottom: 1px solid #000;
+    padding: 2px;
+    text-align: center;
+    background: #e8f0f4;
+}
+
+.calendar thead .weekend {
+    /* How a weekend day name shows in header */
+    color: #f00;
+}
+
+.calendar thead .hilite {
+    /* How do the buttons in header appear when hover */
+    border-top: 2px solid #fff;
+    border-right: 2px solid #000;
+    border-bottom: 2px solid #000;
+    border-left: 2px solid #fff;
+    padding: 0px;
+    background-color: #d8e0e4;
+}
+
+.calendar thead .active {
+    /* Active (pressed) buttons in header */
+    padding: 2px 0px 0px 2px;
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+    background-color: #b8c0c4;
+}
+
+/* The body part -- contains all the days in month. */
+
+.calendar tbody .day {
+    /* Cells <TD> containing month days dates */
+    width: 2em;
+    text-align: right;
+    padding: 2px 4px 2px 2px;
+}
+
+.calendar tbody .day.othermonth {
+    font-size: 80%;
+    color: #aaa;
+}
+
+.calendar tbody .day.othermonth.oweekend {
+    color: #faa;
+}
+
+.calendar table .wn {
+    padding: 2px 3px 2px 2px;
+    border-right: 1px solid #000;
+    background: #e8f4f0;
+}
+
+.calendar tbody .rowhilite td {
+    background: #d8e4e0;
+}
+
+.calendar tbody .rowhilite td.wn {
+    background: #c8d4d0;
+}
+
+.calendar tbody td.hilite {
+    /* Hovered cells <TD> */
+    padding: 1px 3px 1px 1px;
+    border: 1px solid;
+    border-color: #fff #000 #000 #fff;
+}
+
+.calendar tbody td.active {
+    /* Active (pressed) cells <TD> */
+    padding: 2px 2px 0px 2px;
+    border: 1px solid;
+    border-color: #000 #fff #fff #000;
+}
+
+.calendar tbody td.selected {
+    /* Cell showing selected date */
+    font-weight: bold;
+    padding: 2px 2px 0px 2px;
+    border: 1px solid;
+    border-color: #000 #fff #fff #000;
+    background: #d8e0e4;
+}
+
+.calendar tbody td.weekend {
+    /* Cells showing weekend days */
+    color: #f00;
+}
+
+.calendar tbody td.today {
+    /* Cell showing today date */
+    font-weight: bold;
+    color: #00f;
+}
+
+.calendar tbody .disabled {
+    color: #999;
+}
+
+.calendar tbody .emptycell {
+    /* Empty cells (the best is to hide them) */
+    visibility: hidden;
+}
+
+.calendar tbody .emptyrow {
+    /* Empty row (some months need less than 6 rows) */
+    display: none;
+}
+
+/* The footer part -- status bar and "Close" button */
+
+.calendar tfoot .footrow {
+    /* The <TR> in footer (only one right now) */
+}
+
+.calendar tfoot .ttip {
+    /* Tooltip (status bar) cell <TD> */
+    background: #e8f0f4;
+    padding: 1px;
+    border: 1px solid #000;
+    background: #788084;
+    color: #fff;
+    text-align: center;
+}
+
+.calendar tfoot .hilite {
+    /* Hover style for buttons in footer */
+    border-top: 1px solid #fff;
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    border-left: 1px solid #fff;
+    padding: 1px;
+    background: #d8e0e4;
+}
+
+.calendar tfoot .active {
+    /* Active (pressed) style for buttons in footer */
+    padding: 2px 0px 0px 2px;
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+}
+
+/* Combo boxes (menus that display months/years for direct selection) */
+
+.calendar .combo {
+    position: absolute;
+    display: none;
+    width: 4em;
+    top: 0px;
+    left: 0px;
+    cursor: default;
+    border-top: 1px solid #fff;
+    border-right: 1px solid #000;
+    border-bottom: 1px solid #000;
+    border-left: 1px solid #fff;
+    background: #d8e0e4;
+    font-size: 90%;
+    padding: 1px;
+    z-index: 100;
+}
+
+.calendar .combo .label,
+.calendar .combo .label-IEfix {
+    text-align: center;
+    padding: 1px;
+}
+
+.calendar .combo .label-IEfix {
+    width: 4em;
+}
+
+.calendar .combo .active {
+    background: #c8d0d4;
+    padding: 0px;
+    border-top: 1px solid #000;
+    border-right: 1px solid #fff;
+    border-bottom: 1px solid #fff;
+    border-left: 1px solid #000;
+}
+
+.calendar .combo .hilite {
+    background: #048;
+    color: #aef;
+}
+
+.calendar td.time {
+    border-top: 1px solid #000;
+    padding: 1px 0px;
+    text-align: center;
+    background-color: #e8f0f4;
+}
+
+.calendar td.time .hour,
+.calendar td.time .minute,
+.calendar td.time .ampm {
+    padding: 0px 3px 0px 4px;
+    border: 1px solid #889;
+    font-weight: bold;
+    background-color: #fff;
+}
+
+.calendar td.time .ampm {
+    text-align: center;
+}
+
+.calendar td.time .colon {
+    padding: 0px 2px 0px 3px;
+    font-weight: bold;
+}
+
+.calendar td.time span.hilite {
+    border-color: #000;
+    background-color: #667;
+    color: #fff;
+}
+
+.calendar td.time span.active {
+    border-color: #f00;
+    background-color: #000;
+    color: #0f0;
+}
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar.js
new file mode 100644
index 0000000..61b0f3d
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar.js
@@ -0,0 +1,3612 @@
+/*  Copyright Mihai Bazon, 2002-2005  |  www.bazon.net/mishoo
+ * -----------------------------------------------------------
+ *
+ * The DHTML Calendar, version 1.0 "It is happening again"
+ *
+ * Details and latest version at:
+ * www.dynarch.com/projects/calendar
+ *
+ * This script is developed by Dynarch.com.  Visit us at www.dynarch.com.
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ */
+
+// $Id: calendar.js 6204 2008-08-26 15:12:03Z vargenau $
+
+/** The Calendar object constructor. */
+Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
+	// member variables
+	this.activeDiv = null;
+	this.currentDateEl = null;
+	this.getDateStatus = null;
+	this.getDateToolTip = null;
+	this.getDateText = null;
+	this.timeout = null;
+	this.onSelected = onSelected || null;
+	this.onClose = onClose || null;
+	this.dragging = false;
+	this.hidden = false;
+	this.minYear = 1970;
+	this.maxYear = 2050;
+	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
+	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
+	this.isPopup = true;
+	this.weekNumbers = true;
+	this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD; // 0 for Sunday, 1 for Monday, etc.
+	this.showsOtherMonths = false;
+	this.dateStr = dateStr;
+	this.ar_days = null;
+	this.showsTime = false;
+	this.time24 = true;
+	this.yearStep = 2;
+	this.hiliteToday = true;
+	this.multiple = null;
+	// HTML elements
+	this.table = null;
+	this.element = null;
+	this.tbody = null;
+	this.firstdayname = null;
+	// Combo boxes
+	this.monthsCombo = null;
+	this.yearsCombo = null;
+	this.hilitedMonth = null;
+	this.activeMonth = null;
+	this.hilitedYear = null;
+	this.activeYear = null;
+	// Information
+	this.dateClicked = false;
+
+	// one-time initializations
+	if (typeof Calendar._SDN == "undefined") {
+		// table of short day names
+		if (typeof Calendar._SDN_len == "undefined")
+			Calendar._SDN_len = 3;
+		var ar = new Array();
+		for (var i = 8; i > 0;) {
+			ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
+		}
+		Calendar._SDN = ar;
+		// table of short month names
+		if (typeof Calendar._SMN_len == "undefined")
+			Calendar._SMN_len = 3;
+		ar = new Array();
+		for (var i = 12; i > 0;) {
+			ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
+		}
+		Calendar._SMN = ar;
+	}
+};
+
+// ** constants
+
+/// "static", needed for event handlers.
+Calendar._C = null;
+
+/// detect a special case of "web browser"
+Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
+		   !/opera/i.test(navigator.userAgent) );
+
+Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
+
+/// detect Opera browser
+Calendar.is_opera = /opera/i.test(navigator.userAgent);
+
+/// detect KHTML-based browsers
+Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
+
+// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
+//        library, at some point.
+
+Calendar.getAbsolutePos = function(el) {
+	var SL = 0, ST = 0;
+	var is_div = /^div$/i.test(el.tagName);
+	if (is_div && el.scrollLeft)
+		SL = el.scrollLeft;
+	if (is_div && el.scrollTop)
+		ST = el.scrollTop;
+	var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
+	if (el.offsetParent) {
+		var tmp = this.getAbsolutePos(el.offsetParent);
+		r.x += tmp.x;
+		r.y += tmp.y;
+	}
+	return r;
+};
+
+Calendar.isRelated = function (el, evt) {
+	var related = evt.relatedTarget;
+	if (!related) {
+		var type = evt.type;
+		if (type == "mouseover") {
+			related = evt.fromElement;
+		} else if (type == "mouseout") {
+			related = evt.toElement;
+		}
+	}
+	while (related) {
+		if (related == el) {
+			return true;
+		}
+		related = related.parentNode;
+	}
+	return false;
+};
+
+Calendar.removeClass = function(el, className) {
+	if (!(el && el.className)) {
+		return;
+	}
+	var cls = el.className.split(" ");
+	var ar = new Array();
+	for (var i = cls.length; i > 0;) {
+		if (cls[--i] != className) {
+			ar[ar.length] = cls[i];
+		}
+	}
+	el.className = ar.join(" ");
+};
+
+Calendar.addClass = function(el, className) {
+	Calendar.removeClass(el, className);
+	el.className += " " + className;
+};
+
+// FIXME: the following 2 functions totally suck, are useless and should be replaced immediately.
+Calendar.getElement = function(ev) {
+	var f = Calendar.is_ie ? window.event.srcElement : ev.currentTarget;
+	while (f.nodeType != 1 || /^div$/i.test(f.tagName))
+		f = f.parentNode;
+	return f;
+};
+
+Calendar.getTargetElement = function(ev) {
+	var f = Calendar.is_ie ? window.event.srcElement : ev.target;
+	while (f.nodeType != 1)
+		f = f.parentNode;
+	return f;
+};
+
+Calendar.stopEvent = function(ev) {
+	ev || (ev = window.event);
+	if (Calendar.is_ie) {
+		ev.cancelBubble = true;
+		ev.returnValue = false;
+	} else {
+		ev.preventDefault();
+		ev.stopPropagation();
+	}
+	return false;
+};
+
+Calendar.addEvent = function(el, evname, func) {
+	if (el.attachEvent) { // IE
+		el.attachEvent("on" + evname, func);
+	} else if (el.addEventListener) { // Gecko / W3C
+		el.addEventListener(evname, func, true);
+	} else {
+		el["on" + evname] = func;
+	}
+};
+
+Calendar.removeEvent = function(el, evname, func) {
+	if (el.detachEvent) { // IE
+		el.detachEvent("on" + evname, func);
+	} else if (el.removeEventListener) { // Gecko / W3C
+		el.removeEventListener(evname, func, true);
+	} else {
+		el["on" + evname] = null;
+	}
+};
+
+Calendar.createElement = function(type, parent) {
+	var el = null;
+	if (document.createElementNS) {
+		// use the XHTML namespace; IE won't normally get here unless
+		// _they_ "fix" the DOM2 implementation.
+		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
+	} else {
+		el = document.createElement(type);
+	}
+	if (typeof parent != "undefined") {
+		parent.appendChild(el);
+	}
+	return el;
+};
+
+// END: UTILITY FUNCTIONS
+
+// BEGIN: CALENDAR STATIC FUNCTIONS
+
+/** Internal -- adds a set of events to make some element behave like a button. */
+Calendar._add_evs = function(el) {
+	with (Calendar) {
+		addEvent(el, "mouseover", dayMouseOver);
+		addEvent(el, "mousedown", dayMouseDown);
+		addEvent(el, "mouseout", dayMouseOut);
+		if (is_ie) {
+			addEvent(el, "dblclick", dayMouseDblClick);
+			el.setAttribute("unselectable", true);
+		}
+	}
+};
+
+Calendar.findMonth = function(el) {
+	if (typeof el.month != "undefined") {
+		return el;
+	} else if (typeof el.parentNode.month != "undefined") {
+		return el.parentNode;
+	}
+	return null;
+};
+
+Calendar.findYear = function(el) {
+	if (typeof el.year != "undefined") {
+		return el;
+	} else if (typeof el.parentNode.year != "undefined") {
+		return el.parentNode;
+	}
+	return null;
+};
+
+Calendar.showMonthsCombo = function () {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	var cal = cal;
+	var cd = cal.activeDiv;
+	var mc = cal.monthsCombo;
+	if (cal.hilitedMonth) {
+		Calendar.removeClass(cal.hilitedMonth, "hilite");
+	}
+	if (cal.activeMonth) {
+		Calendar.removeClass(cal.activeMonth, "active");
+	}
+	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
+	Calendar.addClass(mon, "active");
+	cal.activeMonth = mon;
+	var s = mc.style;
+	s.display = "block";
+	if (cd.navtype < 0)
+		s.left = cd.offsetLeft + "px";
+	else {
+		var mcw = mc.offsetWidth;
+		if (typeof mcw == "undefined")
+			// Konqueror brain-dead techniques
+			mcw = 50;
+		s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
+	}
+	s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+};
+
+Calendar.showYearsCombo = function (fwd) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	var cal = cal;
+	var cd = cal.activeDiv;
+	var yc = cal.yearsCombo;
+	if (cal.hilitedYear) {
+		Calendar.removeClass(cal.hilitedYear, "hilite");
+	}
+	if (cal.activeYear) {
+		Calendar.removeClass(cal.activeYear, "active");
+	}
+	cal.activeYear = null;
+	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
+	var yr = yc.firstChild;
+	var show = false;
+	for (var i = 12; i > 0; --i) {
+		if (Y >= cal.minYear && Y <= cal.maxYear) {
+			yr.innerHTML = Y;
+			yr.year = Y;
+			yr.style.display = "block";
+			show = true;
+		} else {
+			yr.style.display = "none";
+		}
+		yr = yr.nextSibling;
+		Y += fwd ? cal.yearStep : -cal.yearStep;
+	}
+	if (show) {
+		var s = yc.style;
+		s.display = "block";
+		if (cd.navtype < 0)
+			s.left = cd.offsetLeft + "px";
+		else {
+			var ycw = yc.offsetWidth;
+			if (typeof ycw == "undefined")
+				// Konqueror brain-dead techniques
+				ycw = 50;
+			s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
+		}
+		s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+	}
+};
+
+// event handlers
+
+Calendar.tableMouseUp = function(ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	if (cal.timeout) {
+		clearTimeout(cal.timeout);
+	}
+	var el = cal.activeDiv;
+	if (!el) {
+		return false;
+	}
+	var target = Calendar.getTargetElement(ev);
+	ev || (ev = window.event);
+	Calendar.removeClass(el, "active");
+	if (target == el || target.parentNode == el) {
+		Calendar.cellClick(el, ev);
+	}
+	var mon = Calendar.findMonth(target);
+	var date = null;
+	if (mon) {
+		date = new Date(cal.date);
+		if (mon.month != date.getMonth()) {
+			date.setMonth(mon.month);
+			cal.setDate(date);
+			cal.dateClicked = false;
+			cal.callHandler();
+		}
+	} else {
+		var year = Calendar.findYear(target);
+		if (year) {
+			date = new Date(cal.date);
+			if (year.year != date.getFullYear()) {
+				date.setFullYear(year.year);
+				cal.setDate(date);
+				cal.dateClicked = false;
+				cal.callHandler();
+			}
+		}
+	}
+	with (Calendar) {
+		removeEvent(document, "mouseup", tableMouseUp);
+		removeEvent(document, "mouseover", tableMouseOver);
+		removeEvent(document, "mousemove", tableMouseOver);
+		cal._hideCombos();
+		_C = null;
+		return stopEvent(ev);
+	}
+};
+
+Calendar.tableMouseOver = function (ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return;
+	}
+	var el = cal.activeDiv;
+	var target = Calendar.getTargetElement(ev);
+	if (target == el || target.parentNode == el) {
+		Calendar.addClass(el, "hilite active");
+		Calendar.addClass(el.parentNode, "rowhilite");
+	} else {
+		if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
+			Calendar.removeClass(el, "active");
+		Calendar.removeClass(el, "hilite");
+		Calendar.removeClass(el.parentNode, "rowhilite");
+	}
+	ev || (ev = window.event);
+	if (el.navtype == 50 && target != el) {
+		var pos = Calendar.getAbsolutePos(el);
+		var w = el.offsetWidth;
+		var x = ev.clientX;
+		var dx;
+		var decrease = true;
+		if (x > pos.x + w) {
+			dx = x - pos.x - w;
+			decrease = false;
+		} else
+			dx = pos.x - x;
+
+		if (dx < 0) dx = 0;
+		var range = el._range;
+		var current = el._current;
+		var count = Math.floor(dx / 10) % range.length;
+		for (var i = range.length; --i >= 0;)
+			if (range[i] == current)
+				break;
+		while (count-- > 0)
+			if (decrease) {
+				if (--i < 0)
+					i = range.length - 1;
+			} else if ( ++i >= range.length )
+				i = 0;
+		var newval = range[i];
+		el.innerHTML = newval;
+
+		cal.onUpdateTime();
+	}
+	var mon = Calendar.findMonth(target);
+	if (mon) {
+		if (mon.month != cal.date.getMonth()) {
+			if (cal.hilitedMonth) {
+				Calendar.removeClass(cal.hilitedMonth, "hilite");
+			}
+			Calendar.addClass(mon, "hilite");
+			cal.hilitedMonth = mon;
+		} else if (cal.hilitedMonth) {
+			Calendar.removeClass(cal.hilitedMonth, "hilite");
+		}
+	} else {
+		if (cal.hilitedMonth) {
+			Calendar.removeClass(cal.hilitedMonth, "hilite");
+		}
+		var year = Calendar.findYear(target);
+		if (year) {
+			if (year.year != cal.date.getFullYear()) {
+				if (cal.hilitedYear) {
+					Calendar.removeClass(cal.hilitedYear, "hilite");
+				}
+				Calendar.addClass(year, "hilite");
+				cal.hilitedYear = year;
+			} else if (cal.hilitedYear) {
+				Calendar.removeClass(cal.hilitedYear, "hilite");
+			}
+		} else if (cal.hilitedYear) {
+			Calendar.removeClass(cal.hilitedYear, "hilite");
+		}
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.tableMouseDown = function (ev) {
+	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
+		return Calendar.stopEvent(ev);
+	}
+};
+
+Calendar.calDragIt = function (ev) {
+	var cal = Calendar._C;
+	if (!(cal && cal.dragging)) {
+		return false;
+	}
+	var posX;
+	var posY;
+	if (Calendar.is_ie) {
+		posY = window.event.clientY + document.body.scrollTop;
+		posX = window.event.clientX + document.body.scrollLeft;
+	} else {
+		posX = ev.pageX;
+		posY = ev.pageY;
+	}
+	cal.hideShowCovered();
+	var st = cal.element.style;
+	st.left = (posX - cal.xOffs) + "px";
+	st.top = (posY - cal.yOffs) + "px";
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.calDragEnd = function (ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	cal.dragging = false;
+	with (Calendar) {
+		removeEvent(document, "mousemove", calDragIt);
+		removeEvent(document, "mouseup", calDragEnd);
+		tableMouseUp(ev);
+	}
+	cal.hideShowCovered();
+};
+
+Calendar.dayMouseDown = function(ev) {
+	var el = Calendar.getElement(ev);
+	if (el.disabled) {
+		return false;
+	}
+	var cal = el.calendar;
+	cal.activeDiv = el;
+	Calendar._C = cal;
+	if (el.navtype != 300) with (Calendar) {
+		if (el.navtype == 50) {
+			el._current = el.innerHTML;
+			addEvent(document, "mousemove", tableMouseOver);
+		} else
+			addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
+		addClass(el, "hilite active");
+		addEvent(document, "mouseup", tableMouseUp);
+	} else if (cal.isPopup) {
+		cal._dragStart(ev);
+	}
+	if (el.navtype == -1 || el.navtype == 1) {
+		if (cal.timeout) clearTimeout(cal.timeout);
+		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
+	} else if (el.navtype == -2 || el.navtype == 2) {
+		if (cal.timeout) clearTimeout(cal.timeout);
+		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
+	} else {
+		cal.timeout = null;
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseDblClick = function(ev) {
+	Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
+	if (Calendar.is_ie) {
+		document.selection.empty();
+	}
+};
+
+Calendar.dayMouseOver = function(ev) {
+	var el = Calendar.getElement(ev);
+	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
+		return false;
+	}
+	if (el.ttip) {
+		if (el.ttip.substr(0, 1) == "_") {
+			el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
+		}
+		el.calendar.tooltips.innerHTML = el.ttip;
+	}
+	if (el.navtype != 300) {
+		Calendar.addClass(el, "hilite");
+		if (el.caldate) {
+			Calendar.addClass(el.parentNode, "rowhilite");
+		}
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseOut = function(ev) {
+	with (Calendar) {
+		var el = getElement(ev);
+		if (isRelated(el, ev) || _C || el.disabled)
+			return false;
+		removeClass(el, "hilite");
+		if (el.caldate)
+			removeClass(el.parentNode, "rowhilite");
+		if (el.calendar)
+			el.calendar.tooltips.innerHTML = _TT["SEL_DATE"];
+		return stopEvent(ev);
+	}
+};
+
+/**
+ *  A generic "click" handler :) handles all types of buttons defined in this
+ *  calendar.
+ */
+Calendar.cellClick = function(el, ev) {
+	var cal = el.calendar;
+	var closing = false;
+	var newdate = false;
+	var date = null;
+	if (typeof el.navtype == "undefined") {
+		if (cal.currentDateEl) {
+			Calendar.removeClass(cal.currentDateEl, "selected");
+			Calendar.addClass(el, "selected");
+			closing = (cal.currentDateEl == el);
+			if (!closing) {
+				cal.currentDateEl = el;
+			}
+		}
+		cal.date.setDateOnly(el.caldate);
+		date = cal.date;
+		var other_month = !(cal.dateClicked = !el.otherMonth);
+		if (!other_month && !cal.currentDateEl)
+			cal._toggleMultipleDate(new Date(date));
+		else
+			newdate = !el.disabled;
+		// a date was clicked
+		if (other_month)
+			cal._init(cal.firstDayOfWeek, date);
+	} else {
+		if (el.navtype == 200) {
+			Calendar.removeClass(el, "hilite");
+			cal.callCloseHandler();
+			return;
+		}
+		date = new Date(cal.date);
+		if (el.navtype == 0)
+			date.setDateOnly(new Date()); // TODAY
+		// unless "today" was clicked, we assume no date was clicked so
+		// the selected handler will know not to close the calenar when
+		// in single-click mode.
+		// cal.dateClicked = (el.navtype == 0);
+		cal.dateClicked = false;
+		var year = date.getFullYear();
+		var mon = date.getMonth();
+		function setMonth(m) {
+			var day = date.getDate();
+			var max = date.getMonthDays(m);
+			if (day > max) {
+				date.setDate(max);
+			}
+			date.setMonth(m);
+		};
+		switch (el.navtype) {
+		    case 400:
+			Calendar.removeClass(el, "hilite");
+			var text = Calendar._TT["ABOUT"];
+			if (typeof text != "undefined") {
+				text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
+			} else {
+				// FIXME: this should be removed as soon as lang files get updated!
+				text = "Help and about box text is not translated into this language.\n" +
+					"If you know this language and you feel generous please update\n" +
+					"the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
+					"and send it back to <mihai_bazon at yahoo.com> to get it into the distribution  ;-)\n\n" +
+					"Thank you!\n" +
+					"http://dynarch.com/mishoo/calendar.epl\n";
+			}
+			alert(text);
+			return;
+		    case -2:
+			if (year > cal.minYear) {
+				date.setFullYear(year - 1);
+			}
+			break;
+		    case -1:
+			if (mon > 0) {
+				setMonth(mon - 1);
+			} else if (year-- > cal.minYear) {
+				date.setFullYear(year);
+				setMonth(11);
+			}
+			break;
+		    case 1:
+			if (mon < 11) {
+				setMonth(mon + 1);
+			} else if (year < cal.maxYear) {
+				date.setFullYear(year + 1);
+				setMonth(0);
+			}
+			break;
+		    case 2:
+			if (year < cal.maxYear) {
+				date.setFullYear(year + 1);
+			}
+			break;
+		    case 100:
+			cal.setFirstDayOfWeek(el.fdow);
+			return;
+		    case 50:
+			var range = el._range;
+			var current = el.innerHTML;
+			for (var i = range.length; --i >= 0;)
+				if (range[i] == current)
+					break;
+			if (ev && ev.shiftKey) {
+				if (--i < 0)
+					i = range.length - 1;
+			} else if ( ++i >= range.length )
+				i = 0;
+			var newval = range[i];
+			el.innerHTML = newval;
+			cal.onUpdateTime();
+			return;
+		    case 0:
+			// TODAY will bring us here
+			if ((typeof cal.getDateStatus == "function") &&
+			    cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
+				return false;
+			}
+			break;
+		}
+		if (!date.equalsTo(cal.date)) {
+			cal.setDate(date);
+			newdate = true;
+		} else if (el.navtype == 0)
+			newdate = closing = true;
+	}
+	if (newdate) {
+		ev && cal.callHandler();
+	}
+	if (closing) {
+		Calendar.removeClass(el, "hilite");
+		ev && cal.callCloseHandler();
+	}
+};
+
+// END: CALENDAR STATIC FUNCTIONS
+
+// BEGIN: CALENDAR OBJECT FUNCTIONS
+
+/**
+ *  This function creates the calendar inside the given parent.  If _par is
+ *  null than it creates a popup calendar inside the BODY element.  If _par is
+ *  an element, be it BODY, then it creates a non-popup calendar (still
+ *  hidden).  Some properties need to be set before calling this function.
+ */
+Calendar.prototype.create = function (_par) {
+	var parent = null;
+	if (! _par) {
+		// default parent is the document body, in which case we create
+		// a popup calendar.
+		parent = document.getElementsByTagName("body")[0];
+		this.isPopup = true;
+	} else {
+		parent = _par;
+		this.isPopup = false;
+	}
+	this.date = this.dateStr ? new Date(this.dateStr) : new Date();
+
+	var table = Calendar.createElement("table");
+	this.table = table;
+	table.cellSpacing = 0;
+	table.cellPadding = 0;
+	table.calendar = this;
+	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
+
+	var div = Calendar.createElement("div");
+	this.element = div;
+	div.className = "calendar";
+	if (this.isPopup) {
+		div.style.position = "absolute";
+		div.style.display = "none";
+	}
+	div.appendChild(table);
+
+	var thead = Calendar.createElement("thead", table);
+	var cell = null;
+	var row = null;
+
+	var cal = this;
+	var hh = function (text, cs, navtype) {
+		cell = Calendar.createElement("td", row);
+		cell.colSpan = cs;
+		cell.className = "button";
+		if (navtype != 0 && Math.abs(navtype) <= 2)
+			cell.className += " nav";
+		Calendar._add_evs(cell);
+		cell.calendar = cal;
+		cell.navtype = navtype;
+		cell.innerHTML = "<div unselectable='on'>" + text + "</div>";
+		return cell;
+	};
+
+	row = Calendar.createElement("tr", thead);
+	var title_length = 6;
+	(this.isPopup) && --title_length;
+	(this.weekNumbers) && ++title_length;
+
+	hh("?", 1, 400).ttip = Calendar._TT["INFO"];
+	this.title = hh("", title_length, 300);
+	this.title.className = "title";
+	if (this.isPopup) {
+		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
+		this.title.style.cursor = "move";
+		hh("&#x00d7;", 1, 200).ttip = Calendar._TT["CLOSE"];
+	}
+
+	row = Calendar.createElement("tr", thead);
+	row.className = "headrow";
+
+	this._nav_py = hh("&#x00ab;", 1, -2);
+	this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
+
+	this._nav_pm = hh("&#x2039;", 1, -1);
+	this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
+
+	this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
+	this._nav_now.ttip = Calendar._TT["GO_TODAY"];
+
+	this._nav_nm = hh("&#x203a;", 1, 1);
+	this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
+
+	this._nav_ny = hh("&#x00bb;", 1, 2);
+	this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
+
+	// day names
+	row = Calendar.createElement("tr", thead);
+	row.className = "daynames";
+	if (this.weekNumbers) {
+		cell = Calendar.createElement("td", row);
+		cell.className = "name wn";
+		cell.innerHTML = Calendar._TT["WK"];
+	}
+	for (var i = 7; i > 0; --i) {
+		cell = Calendar.createElement("td", row);
+		if (!i) {
+			cell.navtype = 100;
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+	}
+	this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
+	this._displayWeekdays();
+
+	var tbody = Calendar.createElement("tbody", table);
+	this.tbody = tbody;
+
+	for (i = 6; i > 0; --i) {
+		row = Calendar.createElement("tr", tbody);
+		if (this.weekNumbers) {
+			cell = Calendar.createElement("td", row);
+		}
+		for (var j = 7; j > 0; --j) {
+			cell = Calendar.createElement("td", row);
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+	}
+
+	if (this.showsTime) {
+		row = Calendar.createElement("tr", tbody);
+		row.className = "time";
+
+		cell = Calendar.createElement("td", row);
+		cell.className = "time";
+		cell.colSpan = 2;
+		cell.innerHTML = Calendar._TT["TIME"] || " ";
+
+		cell = Calendar.createElement("td", row);
+		cell.className = "time";
+		cell.colSpan = this.weekNumbers ? 4 : 3;
+
+		(function(){
+			function makeTimePart(className, init, range_start, range_end) {
+				var part = Calendar.createElement("span", cell);
+				part.className = className;
+				part.innerHTML = init;
+				part.calendar = cal;
+				part.ttip = Calendar._TT["TIME_PART"];
+				part.navtype = 50;
+				part._range = [];
+				if (typeof range_start != "number")
+					part._range = range_start;
+				else {
+					for (var i = range_start; i <= range_end; ++i) {
+						var txt;
+						if (i < 10 && range_end >= 10) txt = '0' + i;
+						else txt = '' + i;
+						part._range[part._range.length] = txt;
+					}
+				}
+				Calendar._add_evs(part);
+				return part;
+			};
+			var hrs = cal.date.getHours();
+			var mins = cal.date.getMinutes();
+			var t12 = !cal.time24;
+			var pm = (hrs > 12);
+			if (t12 && pm) hrs -= 12;
+			var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
+			var span = Calendar.createElement("span", cell);
+			span.innerHTML = ":";
+			span.className = "colon";
+			var M = makeTimePart("minute", mins, 0, 59);
+			var AP = null;
+			cell = Calendar.createElement("td", row);
+			cell.className = "time";
+			cell.colSpan = 2;
+			if (t12)
+				AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
+			else
+				cell.innerHTML = " ";
+
+			cal.onSetTime = function() {
+				var pm, hrs = this.date.getHours(),
+					mins = this.date.getMinutes();
+				if (t12) {
+					pm = (hrs >= 12);
+					if (pm) hrs -= 12;
+					if (hrs == 0) hrs = 12;
+					AP.innerHTML = pm ? "pm" : "am";
+				}
+				H.innerHTML = (hrs < 10) ? ("0" + hrs) : hrs;
+				M.innerHTML = (mins < 10) ? ("0" + mins) : mins;
+			};
+
+			cal.onUpdateTime = function() {
+				var date = this.date;
+				var h = parseInt(H.innerHTML, 10);
+				if (t12) {
+					if (/pm/i.test(AP.innerHTML) && h < 12)
+						h += 12;
+					else if (/am/i.test(AP.innerHTML) && h == 12)
+						h = 0;
+				}
+				var d = date.getDate();
+				var m = date.getMonth();
+				var y = date.getFullYear();
+				date.setHours(h);
+				date.setMinutes(parseInt(M.innerHTML, 10));
+				date.setFullYear(y);
+				date.setMonth(m);
+				date.setDate(d);
+				this.dateClicked = false;
+				this.callHandler();
+			};
+		})();
+	} else {
+		this.onSetTime = this.onUpdateTime = function() {};
+	}
+
+	var tfoot = Calendar.createElement("tfoot", table);
+
+	row = Calendar.createElement("tr", tfoot);
+	row.className = "footrow";
+
+	cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
+	cell.className = "ttip";
+	if (this.isPopup) {
+		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
+		cell.style.cursor = "move";
+	}
+	this.tooltips = cell;
+
+	div = Calendar.createElement("div", this.element);
+	this.monthsCombo = div;
+	div.className = "combo";
+	for (i = 0; i < Calendar._MN.length; ++i) {
+		var mn = Calendar.createElement("div");
+		mn.className = Calendar.is_ie ? "label-IEfix" : "label";
+		mn.month = i;
+		mn.innerHTML = Calendar._SMN[i];
+		div.appendChild(mn);
+	}
+
+	div = Calendar.createElement("div", this.element);
+	this.yearsCombo = div;
+	div.className = "combo";
+	for (i = 12; i > 0; --i) {
+		var yr = Calendar.createElement("div");
+		yr.className = Calendar.is_ie ? "label-IEfix" : "label";
+		div.appendChild(yr);
+	}
+
+	this._init(this.firstDayOfWeek, this.date);
+	parent.appendChild(this.element);
+};
+
+/** keyboard navigation, only for popup calendars */
+Calendar._keyEvent = function(ev) {
+	var cal = window._dynarch_popupCalendar;
+	if (!cal || cal.multiple)
+		return false;
+	(Calendar.is_ie) && (ev = window.event);
+	var act = (Calendar.is_ie || ev.type == "keypress"),
+		K = ev.keyCode;
+	if (ev.ctrlKey) {
+		switch (K) {
+		    case 37: // KEY left
+			act && Calendar.cellClick(cal._nav_pm);
+			break;
+		    case 38: // KEY up
+			act && Calendar.cellClick(cal._nav_py);
+			break;
+		    case 39: // KEY right
+			act && Calendar.cellClick(cal._nav_nm);
+			break;
+		    case 40: // KEY down
+			act && Calendar.cellClick(cal._nav_ny);
+			break;
+		    default:
+			return false;
+		}
+	} else switch (K) {
+	    case 32: // KEY space (now)
+		Calendar.cellClick(cal._nav_now);
+		break;
+	    case 27: // KEY esc
+		act && cal.callCloseHandler();
+		break;
+	    case 37: // KEY left
+	    case 38: // KEY up
+	    case 39: // KEY right
+	    case 40: // KEY down
+		if (act) {
+			var prev, x, y, ne, el, step;
+			prev = K == 37 || K == 38;
+			step = (K == 37 || K == 39) ? 1 : 7;
+			function setVars() {
+				el = cal.currentDateEl;
+				var p = el.pos;
+				x = p & 15;
+				y = p >> 4;
+				ne = cal.ar_days[y][x];
+			};setVars();
+			function prevMonth() {
+				var date = new Date(cal.date);
+				date.setDate(date.getDate() - step);
+				cal.setDate(date);
+			};
+			function nextMonth() {
+				var date = new Date(cal.date);
+				date.setDate(date.getDate() + step);
+				cal.setDate(date);
+			};
+			while (1) {
+				switch (K) {
+				    case 37: // KEY left
+					if (--x >= 0)
+						ne = cal.ar_days[y][x];
+					else {
+						x = 6;
+						K = 38;
+						continue;
+					}
+					break;
+				    case 38: // KEY up
+					if (--y >= 0)
+						ne = cal.ar_days[y][x];
+					else {
+						prevMonth();
+						setVars();
+					}
+					break;
+				    case 39: // KEY right
+					if (++x < 7)
+						ne = cal.ar_days[y][x];
+					else {
+						x = 0;
+						K = 40;
+						continue;
+					}
+					break;
+				    case 40: // KEY down
+					if (++y < cal.ar_days.length)
+						ne = cal.ar_days[y][x];
+					else {
+						nextMonth();
+						setVars();
+					}
+					break;
+				}
+				break;
+			}
+			if (ne) {
+				if (!ne.disabled)
+					Calendar.cellClick(ne);
+				else if (prev)
+					prevMonth();
+				else
+					nextMonth();
+			}
+		}
+		break;
+	    case 13: // KEY enter
+		if (act)
+			Calendar.cellClick(cal.currentDateEl, ev);
+		break;
+	    default:
+		return false;
+	}
+	return Calendar.stopEvent(ev);
+};
+
+/**
+ *  (RE)Initializes the calendar to the given date and firstDayOfWeek
+ */
+Calendar.prototype._init = function (firstDayOfWeek, date) {
+	var today = new Date(),
+		TY = today.getFullYear(),
+		TM = today.getMonth(),
+		TD = today.getDate();
+	this.table.style.visibility = "hidden";
+	var year = date.getFullYear();
+	if (year < this.minYear) {
+		year = this.minYear;
+		date.setFullYear(year);
+	} else if (year > this.maxYear) {
+		year = this.maxYear;
+		date.setFullYear(year);
+	}
+	this.firstDayOfWeek = firstDayOfWeek;
+	this.date = new Date(date);
+	var month = date.getMonth();
+	var mday = date.getDate();
+	var no_days = date.getMonthDays();
+
+	// calendar voodoo for computing the first day that would actually be
+	// displayed in the calendar, even if it's from the previous month.
+	// WARNING: this is magic. ;-)
+	date.setDate(1);
+	var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
+	if (day1 < 0)
+		day1 += 7;
+	date.setDate(-day1);
+	date.setDate(date.getDate() + 1);
+
+	var row = this.tbody.firstChild;
+	var MN = Calendar._SMN[month];
+	var ar_days = this.ar_days = new Array();
+	var weekend = Calendar._TT["WEEKEND"];
+	var dates = this.multiple ? (this.datesCells = {}) : null;
+	for (var i = 0; i < 6; ++i, row = row.nextSibling) {
+		var cell = row.firstChild;
+		if (this.weekNumbers) {
+			cell.className = "day wn";
+			cell.innerHTML = date.getWeekNumber();
+			cell = cell.nextSibling;
+		}
+		row.className = "daysrow";
+		var hasdays = false, iday, dpos = ar_days[i] = [];
+		for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(iday + 1)) {
+			iday = date.getDate();
+			var wday = date.getDay();
+			cell.className = "day";
+			cell.pos = i << 4 | j;
+			dpos[j] = cell;
+			var current_month = (date.getMonth() == month);
+			if (!current_month) {
+				if (this.showsOtherMonths) {
+					cell.className += " othermonth";
+					cell.otherMonth = true;
+				} else {
+					cell.className = "emptycell";
+					cell.innerHTML = " ";
+					cell.disabled = true;
+					continue;
+				}
+			} else {
+				cell.otherMonth = false;
+				hasdays = true;
+			}
+			cell.disabled = false;
+			cell.innerHTML = this.getDateText ? this.getDateText(date, iday) : iday;
+			if (dates)
+				dates[date.print("%Y%m%d")] = cell;
+			if (this.getDateStatus) {
+				var status = this.getDateStatus(date, year, month, iday);
+				if (this.getDateToolTip) {
+					var toolTip = this.getDateToolTip(date, year, month, iday);
+					if (toolTip)
+						cell.title = toolTip;
+				}
+				if (status === true) {
+					cell.className += " disabled";
+					cell.disabled = true;
+				} else {
+					if (/disabled/i.test(status))
+						cell.disabled = true;
+					cell.className += " " + status;
+				}
+			}
+			if (!cell.disabled) {
+				cell.caldate = new Date(date);
+				cell.ttip = "_";
+				if (!this.multiple && current_month
+				    && iday == mday && this.hiliteToday) {
+					cell.className += " selected";
+					this.currentDateEl = cell;
+				}
+				if (date.getFullYear() == TY &&
+				    date.getMonth() == TM &&
+				    iday == TD) {
+					cell.className += " today";
+					cell.ttip += Calendar._TT["PART_TODAY"];
+				}
+				if (weekend.indexOf(wday.toString()) != -1)
+					cell.className += cell.otherMonth ? " oweekend" : " weekend";
+			}
+		}
+		if (!(hasdays || this.showsOtherMonths))
+			row.className = "emptyrow";
+	}
+	this.title.innerHTML = Calendar._MN[month] + ", " + year;
+	this.onSetTime();
+	this.table.style.visibility = "visible";
+	this._initMultipleDates();
+	// PROFILE
+	// this.tooltips.innerHTML = "Generated in " + ((new Date()) - today) + " ms";
+};
+
+Calendar.prototype._initMultipleDates = function() {
+	if (this.multiple) {
+		for (var i in this.multiple) {
+			var cell = this.datesCells[i];
+			var d = this.multiple[i];
+			if (!d)
+				continue;
+			if (cell)
+				cell.className += " selected";
+		}
+	}
+};
+
+Calendar.prototype._toggleMultipleDate = function(date) {
+	if (this.multiple) {
+		var ds = date.print("%Y%m%d");
+		var cell = this.datesCells[ds];
+		if (cell) {
+			var d = this.multiple[ds];
+			if (!d) {
+				Calendar.addClass(cell, "selected");
+				this.multiple[ds] = date;
+			} else {
+				Calendar.removeClass(cell, "selected");
+				delete this.multiple[ds];
+			}
+		}
+	}
+};
+
+Calendar.prototype.setDateToolTipHandler = function (unaryFunction) {
+	this.getDateToolTip = unaryFunction;
+};
+
+/**
+ *  Calls _init function above for going to a certain date (but only if the
+ *  date is different than the currently selected one).
+ */
+Calendar.prototype.setDate = function (date) {
+	if (!date.equalsTo(this.date)) {
+		this._init(this.firstDayOfWeek, date);
+	}
+};
+
+/**
+ *  Refreshes the calendar.  Useful if the "disabledHandler" function is
+ *  dynamic, meaning that the list of disabled date can change at runtime.
+ *  Just * call this function if you think that the list of disabled dates
+ *  should * change.
+ */
+Calendar.prototype.refresh = function () {
+	this._init(this.firstDayOfWeek, this.date);
+};
+
+/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
+Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
+	this._init(firstDayOfWeek, this.date);
+	this._displayWeekdays();
+};
+
+/**
+ *  Allows customization of what dates are enabled.  The "unaryFunction"
+ *  parameter must be a function object that receives the date (as a JS Date
+ *  object) and returns a boolean value.  If the returned value is true then
+ *  the passed date will be marked as disabled.
+ */
+Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
+	this.getDateStatus = unaryFunction;
+};
+
+/** Customization of allowed year range for the calendar. */
+Calendar.prototype.setRange = function (a, z) {
+	this.minYear = a;
+	this.maxYear = z;
+};
+
+/** Calls the first user handler (selectedHandler). */
+Calendar.prototype.callHandler = function () {
+	if (this.onSelected) {
+		this.onSelected(this, this.date.print(this.dateFormat));
+	}
+};
+
+/** Calls the second user handler (closeHandler). */
+Calendar.prototype.callCloseHandler = function () {
+	if (this.onClose) {
+		this.onClose(this);
+	}
+	this.hideShowCovered();
+};
+
+/** Removes the calendar object from the DOM tree and destroys it. */
+Calendar.prototype.destroy = function () {
+	var el = this.element.parentNode;
+	el.removeChild(this.element);
+	Calendar._C = null;
+	window._dynarch_popupCalendar = null;
+};
+
+/**
+ *  Moves the calendar element to a different section in the DOM tree (changes
+ *  its parent).
+ */
+Calendar.prototype.reparent = function (new_parent) {
+	var el = this.element;
+	el.parentNode.removeChild(el);
+	new_parent.appendChild(el);
+};
+
+// This gets called when the user presses a mouse button anywhere in the
+// document, if the calendar is shown.  If the click was outside the open
+// calendar this function closes it.
+Calendar._checkCalendar = function(ev) {
+	var calendar = window._dynarch_popupCalendar;
+	if (!calendar) {
+		return false;
+	}
+	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
+	for (; el != null && el != calendar.element; el = el.parentNode);
+	if (el == null) {
+		// calls closeHandler which should hide the calendar.
+		window._dynarch_popupCalendar.callCloseHandler();
+		return Calendar.stopEvent(ev);
+	}
+};
+
+/** Shows the calendar. */
+Calendar.prototype.show = function () {
+	var rows = this.table.getElementsByTagName("tr");
+	for (var i = rows.length; i > 0;) {
+		var row = rows[--i];
+		Calendar.removeClass(row, "rowhilite");
+		var cells = row.getElementsByTagName("td");
+		for (var j = cells.length; j > 0;) {
+			var cell = cells[--j];
+			Calendar.removeClass(cell, "hilite");
+			Calendar.removeClass(cell, "active");
+		}
+	}
+	this.element.style.display = "block";
+	this.hidden = false;
+	if (this.isPopup) {
+		window._dynarch_popupCalendar = this;
+		Calendar.addEvent(document, "keydown", Calendar._keyEvent);
+		Calendar.addEvent(document, "keypress", Calendar._keyEvent);
+		Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
+	}
+	this.hideShowCovered();
+};
+
+/**
+ *  Hides the calendar.  Also removes any "hilite" from the class of any TD
+ *  element.
+ */
+Calendar.prototype.hide = function () {
+	if (this.isPopup) {
+		Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
+		Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
+		Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
+	}
+	this.element.style.display = "none";
+	this.hidden = true;
+	this.hideShowCovered();
+};
+
+/**
+ *  Shows the calendar at a given absolute position (beware that, depending on
+ *  the calendar element style -- position property -- this might be relative
+ *  to the parent's containing rectangle).
+ */
+Calendar.prototype.showAt = function (x, y) {
+	var s = this.element.style;
+	s.left = x + "px";
+	s.top = y + "px";
+	this.show();
+};
+
+/** Shows the calendar near a given element. */
+Calendar.prototype.showAtElement = function (el, opts) {
+	var self = this;
+	var p = Calendar.getAbsolutePos(el);
+	if (!opts || typeof opts != "string") {
+		this.showAt(p.x, p.y + el.offsetHeight);
+		return true;
+	}
+	function fixPosition(box) {
+		if (box.x < 0)
+			box.x = 0;
+		if (box.y < 0)
+			box.y = 0;
+		var cp = document.createElement("div");
+		var s = cp.style;
+		s.position = "absolute";
+		s.right = s.bottom = s.width = s.height = "0px";
+		document.body.appendChild(cp);
+		var br = Calendar.getAbsolutePos(cp);
+		document.body.removeChild(cp);
+		if (Calendar.is_ie) {
+			br.y += document.body.scrollTop;
+			br.x += document.body.scrollLeft;
+		} else {
+			br.y += window.scrollY;
+			br.x += window.scrollX;
+		}
+		var tmp = box.x + box.width - br.x;
+		if (tmp > 0) box.x -= tmp;
+		tmp = box.y + box.height - br.y;
+		if (tmp > 0) box.y -= tmp;
+	};
+	this.element.style.display = "block";
+	Calendar.continuation_for_the_fucking_khtml_browser = function() {
+		var w = self.element.offsetWidth;
+		var h = self.element.offsetHeight;
+		self.element.style.display = "none";
+		var valign = opts.substr(0, 1);
+		var halign = "l";
+		if (opts.length > 1) {
+			halign = opts.substr(1, 1);
+		}
+		// vertical alignment
+		switch (valign) {
+		    case "T": p.y -= h; break;
+		    case "B": p.y += el.offsetHeight; break;
+		    case "C": p.y += (el.offsetHeight - h) / 2; break;
+		    case "t": p.y += el.offsetHeight - h; break;
+		    case "b": break; // already there
+		}
+		// horizontal alignment
+		switch (halign) {
+		    case "L": p.x -= w; break;
+		    case "R": p.x += el.offsetWidth; break;
+		    case "C": p.x += (el.offsetWidth - w) / 2; break;
+		    case "l": p.x += el.offsetWidth - w; break;
+		    case "r": break; // already there
+		}
+		p.width = w;
+		p.height = h + 40;
+		self.monthsCombo.style.display = "none";
+		fixPosition(p);
+		self.showAt(p.x, p.y);
+	};
+	if (Calendar.is_khtml)
+		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
+	else
+		Calendar.continuation_for_the_fucking_khtml_browser();
+};
+
+/** Customizes the date format. */
+Calendar.prototype.setDateFormat = function (str) {
+	this.dateFormat = str;
+};
+
+/** Customizes the tooltip date format. */
+Calendar.prototype.setTtDateFormat = function (str) {
+	this.ttDateFormat = str;
+};
+
+/**
+ *  Tries to identify the date represented in a string.  If successful it also
+ *  calls this.setDate which moves the calendar to the given date.
+ */
+Calendar.prototype.parseDate = function(str, fmt) {
+	if (!fmt)
+		fmt = this.dateFormat;
+	this.setDate(Date.parseDate(str, fmt));
+};
+
+Calendar.prototype.hideShowCovered = function () {
+	if (!Calendar.is_ie && !Calendar.is_opera)
+		return;
+	function getVisib(obj){
+		var value = obj.style.visibility;
+		if (!value) {
+			if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
+				if (!Calendar.is_khtml)
+					value = document.defaultView.
+						getComputedStyle(obj, "").getPropertyValue("visibility");
+				else
+					value = '';
+			} else if (obj.currentStyle) { // IE
+				value = obj.currentStyle.visibility;
+			} else
+				value = '';
+		}
+		return value;
+	};
+
+	var tags = new Array("applet", "iframe", "select");
+	var el = this.element;
+
+	var p = Calendar.getAbsolutePos(el);
+	var EX1 = p.x;
+	var EX2 = el.offsetWidth + EX1;
+	var EY1 = p.y;
+	var EY2 = el.offsetHeight + EY1;
+
+	for (var k = tags.length; k > 0; ) {
+		var ar = document.getElementsByTagName(tags[--k]);
+		var cc = null;
+
+		for (var i = ar.length; i > 0;) {
+			cc = ar[--i];
+
+			p = Calendar.getAbsolutePos(cc);
+			var CX1 = p.x;
+			var CX2 = cc.offsetWidth + CX1;
+			var CY1 = p.y;
+			var CY2 = cc.offsetHeight + CY1;
+
+			if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
+				if (!cc.__msh_save_visibility) {
+					cc.__msh_save_visibility = getVisib(cc);
+				}
+				cc.style.visibility = cc.__msh_save_visibility;
+			} else {
+				if (!cc.__msh_save_visibility) {
+					cc.__msh_save_visibility = getVisib(cc);
+				}
+				cc.style.visibility = "hidden";
+			}
+		}
+	}
+};
+
+/** Internal function; it displays the bar with the names of the weekday. */
+Calendar.prototype._displayWeekdays = function () {
+	var fdow = this.firstDayOfWeek;
+	var cell = this.firstdayname;
+	var weekend = Calendar._TT["WEEKEND"];
+	for (var i = 0; i < 7; ++i) {
+		cell.className = "day name";
+		var realday = (i + fdow) % 7;
+		if (i) {
+			cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
+			cell.navtype = 100;
+			cell.calendar = this;
+			cell.fdow = realday;
+			Calendar._add_evs(cell);
+		}
+		if (weekend.indexOf(realday.toString()) != -1) {
+			Calendar.addClass(cell, "weekend");
+		}
+		cell.innerHTML = Calendar._SDN[(i + fdow) % 7];
+		cell = cell.nextSibling;
+	}
+};
+
+/** Internal function.  Hides all combo boxes that might be displayed. */
+Calendar.prototype._hideCombos = function () {
+	this.monthsCombo.style.display = "none";
+	this.yearsCombo.style.display = "none";
+};
+
+/** Internal function.  Starts dragging the element. */
+Calendar.prototype._dragStart = function (ev) {
+	if (this.dragging) {
+		return;
+	}
+	this.dragging = true;
+	var posX;
+	var posY;
+	if (Calendar.is_ie) {
+		posY = window.event.clientY + document.body.scrollTop;
+		posX = window.event.clientX + document.body.scrollLeft;
+	} else {
+		posY = ev.clientY + window.scrollY;
+		posX = ev.clientX + window.scrollX;
+	}
+	var st = this.element.style;
+	this.xOffs = posX - parseInt(st.left);
+	this.yOffs = posY - parseInt(st.top);
+	with (Calendar) {
+		addEvent(document, "mousemove", calDragIt);
+		addEvent(document, "mouseup", calDragEnd);
+	}
+};
+
+// BEGIN: DATE OBJECT PATCHES
+
+/** Adds the number of days array to the Date object. */
+Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
+
+/** Constants used for time computations */
+Date.SECOND = 1000 /* milliseconds */;
+Date.MINUTE = 60 * Date.SECOND;
+Date.HOUR   = 60 * Date.MINUTE;
+Date.DAY    = 24 * Date.HOUR;
+Date.WEEK   =  7 * Date.DAY;
+
+Date.parseDate = function(str, fmt) {
+	var today = new Date();
+	var y = 0;
+	var m = -1;
+	var d = 0;
+	var a = str.split(/\W+/);
+	var b = fmt.match(/%./g);
+	var i = 0, j = 0;
+	var hr = 0;
+	var min = 0;
+	for (i = 0; i < a.length; ++i) {
+		if (!a[i])
+			continue;
+		switch (b[i]) {
+		    case "%d":
+		    case "%e":
+			d = parseInt(a[i], 10);
+			break;
+
+		    case "%m":
+			m = parseInt(a[i], 10) - 1;
+			break;
+
+		    case "%Y":
+		    case "%y":
+			y = parseInt(a[i], 10);
+			(y < 100) && (y += (y > 29) ? 1900 : 2000);
+			break;
+
+		    case "%b":
+		    case "%B":
+			for (j = 0; j < 12; ++j) {
+				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
+			}
+			break;
+
+		    case "%H":
+		    case "%I":
+		    case "%k":
+		    case "%l":
+			hr = parseInt(a[i], 10);
+			break;
+
+		    case "%P":
+		    case "%p":
+			if (/pm/i.test(a[i]) && hr < 12)
+				hr += 12;
+			else if (/am/i.test(a[i]) && hr >= 12)
+				hr -= 12;
+			break;
+
+		    case "%M":
+			min = parseInt(a[i], 10);
+			break;
+		}
+	}
+	if (isNaN(y)) y = today.getFullYear();
+	if (isNaN(m)) m = today.getMonth();
+	if (isNaN(d)) d = today.getDate();
+	if (isNaN(hr)) hr = today.getHours();
+	if (isNaN(min)) min = today.getMinutes();
+	if (y != 0 && m != -1 && d != 0)
+		return new Date(y, m, d, hr, min, 0);
+	y = 0; m = -1; d = 0;
+	for (i = 0; i < a.length; ++i) {
+		if (a[i].search(/[a-zA-Z]+/) != -1) {
+			var t = -1;
+			for (j = 0; j < 12; ++j) {
+				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
+			}
+			if (t != -1) {
+				if (m != -1) {
+					d = m+1;
+				}
+				m = t;
+			}
+		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
+			m = a[i]-1;
+		} else if (parseInt(a[i], 10) > 31 && y == 0) {
+			y = parseInt(a[i], 10);
+			(y < 100) && (y += (y > 29) ? 1900 : 2000);
+		} else if (d == 0) {
+			d = a[i];
+		}
+	}
+	if (y == 0)
+		y = today.getFullYear();
+	if (m != -1 && d != 0)
+		return new Date(y, m, d, hr, min, 0);
+	return today;
+};
+
+/** Returns the number of days in the current month */
+Date.prototype.getMonthDays = function(month) {
+	var year = this.getFullYear();
+	if (typeof month == "undefined") {
+		month = this.getMonth();
+	}
+	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
+		return 29;
+	} else {
+		return Date._MD[month];
+	}
+};
+
+/** Returns the number of day in the year. */
+Date.prototype.getDayOfYear = function() {
+	var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+	var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
+	var time = now - then;
+	return Math.floor(time / Date.DAY);
+};
+
+/** Returns the number of the week in year, as defined in ISO 8601. */
+Date.prototype.getWeekNumber = function() {
+	var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+	var DoW = d.getDay();
+	d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
+	var ms = d.valueOf(); // GMT
+	d.setMonth(0);
+	d.setDate(4); // Thu in Week 1
+	return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
+};
+
+/** Checks date and time equality */
+Date.prototype.equalsTo = function(date) {
+	return ((this.getFullYear() == date.getFullYear()) &&
+		(this.getMonth() == date.getMonth()) &&
+		(this.getDate() == date.getDate()) &&
+		(this.getHours() == date.getHours()) &&
+		(this.getMinutes() == date.getMinutes()));
+};
+
+/** Set only the year, month, date parts (keep existing time) */
+Date.prototype.setDateOnly = function(date) {
+	var tmp = new Date(date);
+	this.setDate(1);
+	this.setFullYear(tmp.getFullYear());
+	this.setMonth(tmp.getMonth());
+	this.setDate(tmp.getDate());
+};
+
+/** Prints the date in a string according to the given format. */
+Date.prototype.print = function (str) {
+	var m = this.getMonth();
+	var d = this.getDate();
+	var y = this.getFullYear();
+	var wn = this.getWeekNumber();
+	var w = this.getDay();
+	var s = {};
+	var hr = this.getHours();
+	var pm = (hr >= 12);
+	var ir = (pm) ? (hr - 12) : hr;
+	var dy = this.getDayOfYear();
+	if (ir == 0)
+		ir = 12;
+	var min = this.getMinutes();
+	var sec = this.getSeconds();
+	s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
+	s["%A"] = Calendar._DN[w]; // full weekday name
+	s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
+	s["%B"] = Calendar._MN[m]; // full month name
+	// FIXME: %c : preferred date and time representation for the current locale
+	s["%C"] = 1 + Math.floor(y / 100); // the century number
+	s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
+	s["%e"] = d; // the day of the month (range 1 to 31)
+	// FIXME: %D : american date style: %m/%d/%y
+	// FIXME: %E, %F, %G, %g, %h (man strftime)
+	s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
+	s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
+	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
+	s["%k"] = hr;		// hour, range 0 to 23 (24h format)
+	s["%l"] = ir;		// hour, range 1 to 12 (12h format)
+	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
+	s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
+	s["%n"] = "\n";		// a newline character
+	s["%p"] = pm ? "PM" : "AM";
+	s["%P"] = pm ? "pm" : "am";
+	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
+	// FIXME: %R : the time in 24-hour notation %H:%M
+	s["%s"] = Math.floor(this.getTime() / 1000);
+	s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
+	s["%t"] = "\t";		// a tab character
+	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
+	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
+	s["%u"] = w + 1;	// the day of the week (range 1 to 7, 1 = MON)
+	s["%w"] = w;		// the day of the week (range 0 to 6, 0 = SUN)
+	// FIXME: %x : preferred date representation for the current locale without the time
+	// FIXME: %X : preferred time representation for the current locale without the date
+	s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
+	s["%Y"] = y;		// year with the century
+	s["%%"] = "%";		// a literal '%' character
+
+	var re = /%./g;
+	if (!Calendar.is_ie5 && !Calendar.is_khtml)
+		return str.replace(re, function (par) { return s[par] || par; });
+
+	var a = str.match(re);
+	for (var i = 0; i < a.length; i++) {
+		var tmp = s[a[i]];
+		if (tmp) {
+			re = new RegExp(a[i], 'g');
+			str = str.replace(re, tmp);
+		}
+	}
+
+	return str;
+};
+
+Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
+Date.prototype.setFullYear = function(y) {
+	var d = new Date(this);
+	d.__msh_oldSetFullYear(y);
+	if (d.getMonth() != this.getMonth())
+		this.setDate(28);
+	this.__msh_oldSetFullYear(y);
+};
+
+// END: DATE OBJECT PATCHES
+
+
+// global object that remembers the calendar
+window._dynarch_popupCalendar = null;
+/*  Copyright Mihai Bazon, 2002-2005  |  www.bazon.net/mishoo
+ * -----------------------------------------------------------
+ *
+ * The DHTML Calendar, version 1.0 "It is happening again"
+ *
+ * Details and latest version at:
+ * www.dynarch.com/projects/calendar
+ *
+ * This script is developed by Dynarch.com.  Visit us at www.dynarch.com.
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ */
+
+// $Id: calendar.js 6204 2008-08-26 15:12:03Z vargenau $
+
+/** The Calendar object constructor. */
+Calendar = function (firstDayOfWeek, dateStr, onSelected, onClose) {
+	// member variables
+	this.activeDiv = null;
+	this.currentDateEl = null;
+	this.getDateStatus = null;
+	this.getDateToolTip = null;
+	this.getDateText = null;
+	this.timeout = null;
+	this.onSelected = onSelected || null;
+	this.onClose = onClose || null;
+	this.dragging = false;
+	this.hidden = false;
+	this.minYear = 1970;
+	this.maxYear = 2050;
+	this.dateFormat = Calendar._TT["DEF_DATE_FORMAT"];
+	this.ttDateFormat = Calendar._TT["TT_DATE_FORMAT"];
+	this.isPopup = true;
+	this.weekNumbers = true;
+	this.firstDayOfWeek = typeof firstDayOfWeek == "number" ? firstDayOfWeek : Calendar._FD; // 0 for Sunday, 1 for Monday, etc.
+	this.showsOtherMonths = false;
+	this.dateStr = dateStr;
+	this.ar_days = null;
+	this.showsTime = false;
+	this.time24 = true;
+	this.yearStep = 2;
+	this.hiliteToday = true;
+	this.multiple = null;
+	// HTML elements
+	this.table = null;
+	this.element = null;
+	this.tbody = null;
+	this.firstdayname = null;
+	// Combo boxes
+	this.monthsCombo = null;
+	this.yearsCombo = null;
+	this.hilitedMonth = null;
+	this.activeMonth = null;
+	this.hilitedYear = null;
+	this.activeYear = null;
+	// Information
+	this.dateClicked = false;
+
+	// one-time initializations
+	if (typeof Calendar._SDN == "undefined") {
+		// table of short day names
+		if (typeof Calendar._SDN_len == "undefined")
+			Calendar._SDN_len = 3;
+		var ar = new Array();
+		for (var i = 8; i > 0;) {
+			ar[--i] = Calendar._DN[i].substr(0, Calendar._SDN_len);
+		}
+		Calendar._SDN = ar;
+		// table of short month names
+		if (typeof Calendar._SMN_len == "undefined")
+			Calendar._SMN_len = 3;
+		ar = new Array();
+		for (var i = 12; i > 0;) {
+			ar[--i] = Calendar._MN[i].substr(0, Calendar._SMN_len);
+		}
+		Calendar._SMN = ar;
+	}
+};
+
+// ** constants
+
+/// "static", needed for event handlers.
+Calendar._C = null;
+
+/// detect a special case of "web browser"
+Calendar.is_ie = ( /msie/i.test(navigator.userAgent) &&
+		   !/opera/i.test(navigator.userAgent) );
+
+Calendar.is_ie5 = ( Calendar.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
+
+/// detect Opera browser
+Calendar.is_opera = /opera/i.test(navigator.userAgent);
+
+/// detect KHTML-based browsers
+Calendar.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
+
+// BEGIN: UTILITY FUNCTIONS; beware that these might be moved into a separate
+//        library, at some point.
+
+Calendar.getAbsolutePos = function(el) {
+	var SL = 0, ST = 0;
+	var is_div = /^div$/i.test(el.tagName);
+	if (is_div && el.scrollLeft)
+		SL = el.scrollLeft;
+	if (is_div && el.scrollTop)
+		ST = el.scrollTop;
+	var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
+	if (el.offsetParent) {
+		var tmp = this.getAbsolutePos(el.offsetParent);
+		r.x += tmp.x;
+		r.y += tmp.y;
+	}
+	return r;
+};
+
+Calendar.isRelated = function (el, evt) {
+	var related = evt.relatedTarget;
+	if (!related) {
+		var type = evt.type;
+		if (type == "mouseover") {
+			related = evt.fromElement;
+		} else if (type == "mouseout") {
+			related = evt.toElement;
+		}
+	}
+	while (related) {
+		if (related == el) {
+			return true;
+		}
+		related = related.parentNode;
+	}
+	return false;
+};
+
+Calendar.removeClass = function(el, className) {
+	if (!(el && el.className)) {
+		return;
+	}
+	var cls = el.className.split(" ");
+	var ar = new Array();
+	for (var i = cls.length; i > 0;) {
+		if (cls[--i] != className) {
+			ar[ar.length] = cls[i];
+		}
+	}
+	el.className = ar.join(" ");
+};
+
+Calendar.addClass = function(el, className) {
+	Calendar.removeClass(el, className);
+	el.className += " " + className;
+};
+
+// FIXME: the following 2 functions totally suck, are useless and should be replaced immediately.
+Calendar.getElement = function(ev) {
+	var f = Calendar.is_ie ? window.event.srcElement : ev.currentTarget;
+	while (f.nodeType != 1 || /^div$/i.test(f.tagName))
+		f = f.parentNode;
+	return f;
+};
+
+Calendar.getTargetElement = function(ev) {
+	var f = Calendar.is_ie ? window.event.srcElement : ev.target;
+	while (f.nodeType != 1)
+		f = f.parentNode;
+	return f;
+};
+
+Calendar.stopEvent = function(ev) {
+	ev || (ev = window.event);
+	if (Calendar.is_ie) {
+		ev.cancelBubble = true;
+		ev.returnValue = false;
+	} else {
+		ev.preventDefault();
+		ev.stopPropagation();
+	}
+	return false;
+};
+
+Calendar.addEvent = function(el, evname, func) {
+	if (el.attachEvent) { // IE
+		el.attachEvent("on" + evname, func);
+	} else if (el.addEventListener) { // Gecko / W3C
+		el.addEventListener(evname, func, true);
+	} else {
+		el["on" + evname] = func;
+	}
+};
+
+Calendar.removeEvent = function(el, evname, func) {
+	if (el.detachEvent) { // IE
+		el.detachEvent("on" + evname, func);
+	} else if (el.removeEventListener) { // Gecko / W3C
+		el.removeEventListener(evname, func, true);
+	} else {
+		el["on" + evname] = null;
+	}
+};
+
+Calendar.createElement = function(type, parent) {
+	var el = null;
+	if (document.createElementNS) {
+		// use the XHTML namespace; IE won't normally get here unless
+		// _they_ "fix" the DOM2 implementation.
+		el = document.createElementNS("http://www.w3.org/1999/xhtml", type);
+	} else {
+		el = document.createElement(type);
+	}
+	if (typeof parent != "undefined") {
+		parent.appendChild(el);
+	}
+	return el;
+};
+
+// END: UTILITY FUNCTIONS
+
+// BEGIN: CALENDAR STATIC FUNCTIONS
+
+/** Internal -- adds a set of events to make some element behave like a button. */
+Calendar._add_evs = function(el) {
+	with (Calendar) {
+		addEvent(el, "mouseover", dayMouseOver);
+		addEvent(el, "mousedown", dayMouseDown);
+		addEvent(el, "mouseout", dayMouseOut);
+		if (is_ie) {
+			addEvent(el, "dblclick", dayMouseDblClick);
+			el.setAttribute("unselectable", true);
+		}
+	}
+};
+
+Calendar.findMonth = function(el) {
+	if (typeof el.month != "undefined") {
+		return el;
+	} else if (typeof el.parentNode.month != "undefined") {
+		return el.parentNode;
+	}
+	return null;
+};
+
+Calendar.findYear = function(el) {
+	if (typeof el.year != "undefined") {
+		return el;
+	} else if (typeof el.parentNode.year != "undefined") {
+		return el.parentNode;
+	}
+	return null;
+};
+
+Calendar.showMonthsCombo = function () {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	var cal = cal;
+	var cd = cal.activeDiv;
+	var mc = cal.monthsCombo;
+	if (cal.hilitedMonth) {
+		Calendar.removeClass(cal.hilitedMonth, "hilite");
+	}
+	if (cal.activeMonth) {
+		Calendar.removeClass(cal.activeMonth, "active");
+	}
+	var mon = cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
+	Calendar.addClass(mon, "active");
+	cal.activeMonth = mon;
+	var s = mc.style;
+	s.display = "block";
+	if (cd.navtype < 0)
+		s.left = cd.offsetLeft + "px";
+	else {
+		var mcw = mc.offsetWidth;
+		if (typeof mcw == "undefined")
+			// Konqueror brain-dead techniques
+			mcw = 50;
+		s.left = (cd.offsetLeft + cd.offsetWidth - mcw) + "px";
+	}
+	s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+};
+
+Calendar.showYearsCombo = function (fwd) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	var cal = cal;
+	var cd = cal.activeDiv;
+	var yc = cal.yearsCombo;
+	if (cal.hilitedYear) {
+		Calendar.removeClass(cal.hilitedYear, "hilite");
+	}
+	if (cal.activeYear) {
+		Calendar.removeClass(cal.activeYear, "active");
+	}
+	cal.activeYear = null;
+	var Y = cal.date.getFullYear() + (fwd ? 1 : -1);
+	var yr = yc.firstChild;
+	var show = false;
+	for (var i = 12; i > 0; --i) {
+		if (Y >= cal.minYear && Y <= cal.maxYear) {
+			yr.innerHTML = Y;
+			yr.year = Y;
+			yr.style.display = "block";
+			show = true;
+		} else {
+			yr.style.display = "none";
+		}
+		yr = yr.nextSibling;
+		Y += fwd ? cal.yearStep : -cal.yearStep;
+	}
+	if (show) {
+		var s = yc.style;
+		s.display = "block";
+		if (cd.navtype < 0)
+			s.left = cd.offsetLeft + "px";
+		else {
+			var ycw = yc.offsetWidth;
+			if (typeof ycw == "undefined")
+				// Konqueror brain-dead techniques
+				ycw = 50;
+			s.left = (cd.offsetLeft + cd.offsetWidth - ycw) + "px";
+		}
+		s.top = (cd.offsetTop + cd.offsetHeight) + "px";
+	}
+};
+
+// event handlers
+
+Calendar.tableMouseUp = function(ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	if (cal.timeout) {
+		clearTimeout(cal.timeout);
+	}
+	var el = cal.activeDiv;
+	if (!el) {
+		return false;
+	}
+	var target = Calendar.getTargetElement(ev);
+	ev || (ev = window.event);
+	Calendar.removeClass(el, "active");
+	if (target == el || target.parentNode == el) {
+		Calendar.cellClick(el, ev);
+	}
+	var mon = Calendar.findMonth(target);
+	var date = null;
+	if (mon) {
+		date = new Date(cal.date);
+		if (mon.month != date.getMonth()) {
+			date.setMonth(mon.month);
+			cal.setDate(date);
+			cal.dateClicked = false;
+			cal.callHandler();
+		}
+	} else {
+		var year = Calendar.findYear(target);
+		if (year) {
+			date = new Date(cal.date);
+			if (year.year != date.getFullYear()) {
+				date.setFullYear(year.year);
+				cal.setDate(date);
+				cal.dateClicked = false;
+				cal.callHandler();
+			}
+		}
+	}
+	with (Calendar) {
+		removeEvent(document, "mouseup", tableMouseUp);
+		removeEvent(document, "mouseover", tableMouseOver);
+		removeEvent(document, "mousemove", tableMouseOver);
+		cal._hideCombos();
+		_C = null;
+		return stopEvent(ev);
+	}
+};
+
+Calendar.tableMouseOver = function (ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return;
+	}
+	var el = cal.activeDiv;
+	var target = Calendar.getTargetElement(ev);
+	if (target == el || target.parentNode == el) {
+		Calendar.addClass(el, "hilite active");
+		Calendar.addClass(el.parentNode, "rowhilite");
+	} else {
+		if (typeof el.navtype == "undefined" || (el.navtype != 50 && (el.navtype == 0 || Math.abs(el.navtype) > 2)))
+			Calendar.removeClass(el, "active");
+		Calendar.removeClass(el, "hilite");
+		Calendar.removeClass(el.parentNode, "rowhilite");
+	}
+	ev || (ev = window.event);
+	if (el.navtype == 50 && target != el) {
+		var pos = Calendar.getAbsolutePos(el);
+		var w = el.offsetWidth;
+		var x = ev.clientX;
+		var dx;
+		var decrease = true;
+		if (x > pos.x + w) {
+			dx = x - pos.x - w;
+			decrease = false;
+		} else
+			dx = pos.x - x;
+
+		if (dx < 0) dx = 0;
+		var range = el._range;
+		var current = el._current;
+		var count = Math.floor(dx / 10) % range.length;
+		for (var i = range.length; --i >= 0;)
+			if (range[i] == current)
+				break;
+		while (count-- > 0)
+			if (decrease) {
+				if (--i < 0)
+					i = range.length - 1;
+			} else if ( ++i >= range.length )
+				i = 0;
+		var newval = range[i];
+		el.innerHTML = newval;
+
+		cal.onUpdateTime();
+	}
+	var mon = Calendar.findMonth(target);
+	if (mon) {
+		if (mon.month != cal.date.getMonth()) {
+			if (cal.hilitedMonth) {
+				Calendar.removeClass(cal.hilitedMonth, "hilite");
+			}
+			Calendar.addClass(mon, "hilite");
+			cal.hilitedMonth = mon;
+		} else if (cal.hilitedMonth) {
+			Calendar.removeClass(cal.hilitedMonth, "hilite");
+		}
+	} else {
+		if (cal.hilitedMonth) {
+			Calendar.removeClass(cal.hilitedMonth, "hilite");
+		}
+		var year = Calendar.findYear(target);
+		if (year) {
+			if (year.year != cal.date.getFullYear()) {
+				if (cal.hilitedYear) {
+					Calendar.removeClass(cal.hilitedYear, "hilite");
+				}
+				Calendar.addClass(year, "hilite");
+				cal.hilitedYear = year;
+			} else if (cal.hilitedYear) {
+				Calendar.removeClass(cal.hilitedYear, "hilite");
+			}
+		} else if (cal.hilitedYear) {
+			Calendar.removeClass(cal.hilitedYear, "hilite");
+		}
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.tableMouseDown = function (ev) {
+	if (Calendar.getTargetElement(ev) == Calendar.getElement(ev)) {
+		return Calendar.stopEvent(ev);
+	}
+};
+
+Calendar.calDragIt = function (ev) {
+	var cal = Calendar._C;
+	if (!(cal && cal.dragging)) {
+		return false;
+	}
+	var posX;
+	var posY;
+	if (Calendar.is_ie) {
+		posY = window.event.clientY + document.body.scrollTop;
+		posX = window.event.clientX + document.body.scrollLeft;
+	} else {
+		posX = ev.pageX;
+		posY = ev.pageY;
+	}
+	cal.hideShowCovered();
+	var st = cal.element.style;
+	st.left = (posX - cal.xOffs) + "px";
+	st.top = (posY - cal.yOffs) + "px";
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.calDragEnd = function (ev) {
+	var cal = Calendar._C;
+	if (!cal) {
+		return false;
+	}
+	cal.dragging = false;
+	with (Calendar) {
+		removeEvent(document, "mousemove", calDragIt);
+		removeEvent(document, "mouseup", calDragEnd);
+		tableMouseUp(ev);
+	}
+	cal.hideShowCovered();
+};
+
+Calendar.dayMouseDown = function(ev) {
+	var el = Calendar.getElement(ev);
+	if (el.disabled) {
+		return false;
+	}
+	var cal = el.calendar;
+	cal.activeDiv = el;
+	Calendar._C = cal;
+	if (el.navtype != 300) with (Calendar) {
+		if (el.navtype == 50) {
+			el._current = el.innerHTML;
+			addEvent(document, "mousemove", tableMouseOver);
+		} else
+			addEvent(document, Calendar.is_ie5 ? "mousemove" : "mouseover", tableMouseOver);
+		addClass(el, "hilite active");
+		addEvent(document, "mouseup", tableMouseUp);
+	} else if (cal.isPopup) {
+		cal._dragStart(ev);
+	}
+	if (el.navtype == -1 || el.navtype == 1) {
+		if (cal.timeout) clearTimeout(cal.timeout);
+		cal.timeout = setTimeout("Calendar.showMonthsCombo()", 250);
+	} else if (el.navtype == -2 || el.navtype == 2) {
+		if (cal.timeout) clearTimeout(cal.timeout);
+		cal.timeout = setTimeout((el.navtype > 0) ? "Calendar.showYearsCombo(true)" : "Calendar.showYearsCombo(false)", 250);
+	} else {
+		cal.timeout = null;
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseDblClick = function(ev) {
+	Calendar.cellClick(Calendar.getElement(ev), ev || window.event);
+	if (Calendar.is_ie) {
+		document.selection.empty();
+	}
+};
+
+Calendar.dayMouseOver = function(ev) {
+	var el = Calendar.getElement(ev);
+	if (Calendar.isRelated(el, ev) || Calendar._C || el.disabled) {
+		return false;
+	}
+	if (el.ttip) {
+		if (el.ttip.substr(0, 1) == "_") {
+			el.ttip = el.caldate.print(el.calendar.ttDateFormat) + el.ttip.substr(1);
+		}
+		el.calendar.tooltips.innerHTML = el.ttip;
+	}
+	if (el.navtype != 300) {
+		Calendar.addClass(el, "hilite");
+		if (el.caldate) {
+			Calendar.addClass(el.parentNode, "rowhilite");
+		}
+	}
+	return Calendar.stopEvent(ev);
+};
+
+Calendar.dayMouseOut = function(ev) {
+	with (Calendar) {
+		var el = getElement(ev);
+		if (isRelated(el, ev) || _C || el.disabled)
+			return false;
+		removeClass(el, "hilite");
+		if (el.caldate)
+			removeClass(el.parentNode, "rowhilite");
+		if (el.calendar)
+			el.calendar.tooltips.innerHTML = _TT["SEL_DATE"];
+		return stopEvent(ev);
+	}
+};
+
+/**
+ *  A generic "click" handler :) handles all types of buttons defined in this
+ *  calendar.
+ */
+Calendar.cellClick = function(el, ev) {
+	var cal = el.calendar;
+	var closing = false;
+	var newdate = false;
+	var date = null;
+	if (typeof el.navtype == "undefined") {
+		if (cal.currentDateEl) {
+			Calendar.removeClass(cal.currentDateEl, "selected");
+			Calendar.addClass(el, "selected");
+			closing = (cal.currentDateEl == el);
+			if (!closing) {
+				cal.currentDateEl = el;
+			}
+		}
+		cal.date.setDateOnly(el.caldate);
+		date = cal.date;
+		var other_month = !(cal.dateClicked = !el.otherMonth);
+		if (!other_month && !cal.currentDateEl)
+			cal._toggleMultipleDate(new Date(date));
+		else
+			newdate = !el.disabled;
+		// a date was clicked
+		if (other_month)
+			cal._init(cal.firstDayOfWeek, date);
+	} else {
+		if (el.navtype == 200) {
+			Calendar.removeClass(el, "hilite");
+			cal.callCloseHandler();
+			return;
+		}
+		date = new Date(cal.date);
+		if (el.navtype == 0)
+			date.setDateOnly(new Date()); // TODAY
+		// unless "today" was clicked, we assume no date was clicked so
+		// the selected handler will know not to close the calenar when
+		// in single-click mode.
+		// cal.dateClicked = (el.navtype == 0);
+		cal.dateClicked = false;
+		var year = date.getFullYear();
+		var mon = date.getMonth();
+		function setMonth(m) {
+			var day = date.getDate();
+			var max = date.getMonthDays(m);
+			if (day > max) {
+				date.setDate(max);
+			}
+			date.setMonth(m);
+		};
+		switch (el.navtype) {
+		    case 400:
+			Calendar.removeClass(el, "hilite");
+			var text = Calendar._TT["ABOUT"];
+			if (typeof text != "undefined") {
+				text += cal.showsTime ? Calendar._TT["ABOUT_TIME"] : "";
+			} else {
+				// FIXME: this should be removed as soon as lang files get updated!
+				text = "Help and about box text is not translated into this language.\n" +
+					"If you know this language and you feel generous please update\n" +
+					"the corresponding file in \"lang\" subdir to match calendar-en.js\n" +
+					"and send it back to <mihai_bazon at yahoo.com> to get it into the distribution  ;-)\n\n" +
+					"Thank you!\n" +
+					"http://dynarch.com/mishoo/calendar.epl\n";
+			}
+			alert(text);
+			return;
+		    case -2:
+			if (year > cal.minYear) {
+				date.setFullYear(year - 1);
+			}
+			break;
+		    case -1:
+			if (mon > 0) {
+				setMonth(mon - 1);
+			} else if (year-- > cal.minYear) {
+				date.setFullYear(year);
+				setMonth(11);
+			}
+			break;
+		    case 1:
+			if (mon < 11) {
+				setMonth(mon + 1);
+			} else if (year < cal.maxYear) {
+				date.setFullYear(year + 1);
+				setMonth(0);
+			}
+			break;
+		    case 2:
+			if (year < cal.maxYear) {
+				date.setFullYear(year + 1);
+			}
+			break;
+		    case 100:
+			cal.setFirstDayOfWeek(el.fdow);
+			return;
+		    case 50:
+			var range = el._range;
+			var current = el.innerHTML;
+			for (var i = range.length; --i >= 0;)
+				if (range[i] == current)
+					break;
+			if (ev && ev.shiftKey) {
+				if (--i < 0)
+					i = range.length - 1;
+			} else if ( ++i >= range.length )
+				i = 0;
+			var newval = range[i];
+			el.innerHTML = newval;
+			cal.onUpdateTime();
+			return;
+		    case 0:
+			// TODAY will bring us here
+			if ((typeof cal.getDateStatus == "function") &&
+			    cal.getDateStatus(date, date.getFullYear(), date.getMonth(), date.getDate())) {
+				return false;
+			}
+			break;
+		}
+		if (!date.equalsTo(cal.date)) {
+			cal.setDate(date);
+			newdate = true;
+		} else if (el.navtype == 0)
+			newdate = closing = true;
+	}
+	if (newdate) {
+		ev && cal.callHandler();
+	}
+	if (closing) {
+		Calendar.removeClass(el, "hilite");
+		ev && cal.callCloseHandler();
+	}
+};
+
+// END: CALENDAR STATIC FUNCTIONS
+
+// BEGIN: CALENDAR OBJECT FUNCTIONS
+
+/**
+ *  This function creates the calendar inside the given parent.  If _par is
+ *  null than it creates a popup calendar inside the BODY element.  If _par is
+ *  an element, be it BODY, then it creates a non-popup calendar (still
+ *  hidden).  Some properties need to be set before calling this function.
+ */
+Calendar.prototype.create = function (_par) {
+	var parent = null;
+	if (! _par) {
+		// default parent is the document body, in which case we create
+		// a popup calendar.
+		parent = document.getElementsByTagName("body")[0];
+		this.isPopup = true;
+	} else {
+		parent = _par;
+		this.isPopup = false;
+	}
+	this.date = this.dateStr ? new Date(this.dateStr) : new Date();
+
+	var table = Calendar.createElement("table");
+	this.table = table;
+	table.cellSpacing = 0;
+	table.cellPadding = 0;
+	table.calendar = this;
+	Calendar.addEvent(table, "mousedown", Calendar.tableMouseDown);
+
+	var div = Calendar.createElement("div");
+	this.element = div;
+	div.className = "calendar";
+	if (this.isPopup) {
+		div.style.position = "absolute";
+		div.style.display = "none";
+	}
+	div.appendChild(table);
+
+	var thead = Calendar.createElement("thead", table);
+	var cell = null;
+	var row = null;
+
+	var cal = this;
+	var hh = function (text, cs, navtype) {
+		cell = Calendar.createElement("td", row);
+		cell.colSpan = cs;
+		cell.className = "button";
+		if (navtype != 0 && Math.abs(navtype) <= 2)
+			cell.className += " nav";
+		Calendar._add_evs(cell);
+		cell.calendar = cal;
+		cell.navtype = navtype;
+		cell.innerHTML = "<div unselectable='on'>" + text + "</div>";
+		return cell;
+	};
+
+	row = Calendar.createElement("tr", thead);
+	var title_length = 6;
+	(this.isPopup) && --title_length;
+	(this.weekNumbers) && ++title_length;
+
+	hh("?", 1, 400).ttip = Calendar._TT["INFO"];
+	this.title = hh("", title_length, 300);
+	this.title.className = "title";
+	if (this.isPopup) {
+		this.title.ttip = Calendar._TT["DRAG_TO_MOVE"];
+		this.title.style.cursor = "move";
+		hh("&#x00d7;", 1, 200).ttip = Calendar._TT["CLOSE"];
+	}
+
+	row = Calendar.createElement("tr", thead);
+	row.className = "headrow";
+
+	this._nav_py = hh("&#x00ab;", 1, -2);
+	this._nav_py.ttip = Calendar._TT["PREV_YEAR"];
+
+	this._nav_pm = hh("&#x2039;", 1, -1);
+	this._nav_pm.ttip = Calendar._TT["PREV_MONTH"];
+
+	this._nav_now = hh(Calendar._TT["TODAY"], this.weekNumbers ? 4 : 3, 0);
+	this._nav_now.ttip = Calendar._TT["GO_TODAY"];
+
+	this._nav_nm = hh("&#x203a;", 1, 1);
+	this._nav_nm.ttip = Calendar._TT["NEXT_MONTH"];
+
+	this._nav_ny = hh("&#x00bb;", 1, 2);
+	this._nav_ny.ttip = Calendar._TT["NEXT_YEAR"];
+
+	// day names
+	row = Calendar.createElement("tr", thead);
+	row.className = "daynames";
+	if (this.weekNumbers) {
+		cell = Calendar.createElement("td", row);
+		cell.className = "name wn";
+		cell.innerHTML = Calendar._TT["WK"];
+	}
+	for (var i = 7; i > 0; --i) {
+		cell = Calendar.createElement("td", row);
+		if (!i) {
+			cell.navtype = 100;
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+	}
+	this.firstdayname = (this.weekNumbers) ? row.firstChild.nextSibling : row.firstChild;
+	this._displayWeekdays();
+
+	var tbody = Calendar.createElement("tbody", table);
+	this.tbody = tbody;
+
+	for (i = 6; i > 0; --i) {
+		row = Calendar.createElement("tr", tbody);
+		if (this.weekNumbers) {
+			cell = Calendar.createElement("td", row);
+		}
+		for (var j = 7; j > 0; --j) {
+			cell = Calendar.createElement("td", row);
+			cell.calendar = this;
+			Calendar._add_evs(cell);
+		}
+	}
+
+	if (this.showsTime) {
+		row = Calendar.createElement("tr", tbody);
+		row.className = "time";
+
+		cell = Calendar.createElement("td", row);
+		cell.className = "time";
+		cell.colSpan = 2;
+		cell.innerHTML = Calendar._TT["TIME"] || " ";
+
+		cell = Calendar.createElement("td", row);
+		cell.className = "time";
+		cell.colSpan = this.weekNumbers ? 4 : 3;
+
+		(function(){
+			function makeTimePart(className, init, range_start, range_end) {
+				var part = Calendar.createElement("span", cell);
+				part.className = className;
+				part.innerHTML = init;
+				part.calendar = cal;
+				part.ttip = Calendar._TT["TIME_PART"];
+				part.navtype = 50;
+				part._range = [];
+				if (typeof range_start != "number")
+					part._range = range_start;
+				else {
+					for (var i = range_start; i <= range_end; ++i) {
+						var txt;
+						if (i < 10 && range_end >= 10) txt = '0' + i;
+						else txt = '' + i;
+						part._range[part._range.length] = txt;
+					}
+				}
+				Calendar._add_evs(part);
+				return part;
+			};
+			var hrs = cal.date.getHours();
+			var mins = cal.date.getMinutes();
+			var t12 = !cal.time24;
+			var pm = (hrs > 12);
+			if (t12 && pm) hrs -= 12;
+			var H = makeTimePart("hour", hrs, t12 ? 1 : 0, t12 ? 12 : 23);
+			var span = Calendar.createElement("span", cell);
+			span.innerHTML = ":";
+			span.className = "colon";
+			var M = makeTimePart("minute", mins, 0, 59);
+			var AP = null;
+			cell = Calendar.createElement("td", row);
+			cell.className = "time";
+			cell.colSpan = 2;
+			if (t12)
+				AP = makeTimePart("ampm", pm ? "pm" : "am", ["am", "pm"]);
+			else
+				cell.innerHTML = " ";
+
+			cal.onSetTime = function() {
+				var pm, hrs = this.date.getHours(),
+					mins = this.date.getMinutes();
+				if (t12) {
+					pm = (hrs >= 12);
+					if (pm) hrs -= 12;
+					if (hrs == 0) hrs = 12;
+					AP.innerHTML = pm ? "pm" : "am";
+				}
+				H.innerHTML = (hrs < 10) ? ("0" + hrs) : hrs;
+				M.innerHTML = (mins < 10) ? ("0" + mins) : mins;
+			};
+
+			cal.onUpdateTime = function() {
+				var date = this.date;
+				var h = parseInt(H.innerHTML, 10);
+				if (t12) {
+					if (/pm/i.test(AP.innerHTML) && h < 12)
+						h += 12;
+					else if (/am/i.test(AP.innerHTML) && h == 12)
+						h = 0;
+				}
+				var d = date.getDate();
+				var m = date.getMonth();
+				var y = date.getFullYear();
+				date.setHours(h);
+				date.setMinutes(parseInt(M.innerHTML, 10));
+				date.setFullYear(y);
+				date.setMonth(m);
+				date.setDate(d);
+				this.dateClicked = false;
+				this.callHandler();
+			};
+		})();
+	} else {
+		this.onSetTime = this.onUpdateTime = function() {};
+	}
+
+	var tfoot = Calendar.createElement("tfoot", table);
+
+	row = Calendar.createElement("tr", tfoot);
+	row.className = "footrow";
+
+	cell = hh(Calendar._TT["SEL_DATE"], this.weekNumbers ? 8 : 7, 300);
+	cell.className = "ttip";
+	if (this.isPopup) {
+		cell.ttip = Calendar._TT["DRAG_TO_MOVE"];
+		cell.style.cursor = "move";
+	}
+	this.tooltips = cell;
+
+	div = Calendar.createElement("div", this.element);
+	this.monthsCombo = div;
+	div.className = "combo";
+	for (i = 0; i < Calendar._MN.length; ++i) {
+		var mn = Calendar.createElement("div");
+		mn.className = Calendar.is_ie ? "label-IEfix" : "label";
+		mn.month = i;
+		mn.innerHTML = Calendar._SMN[i];
+		div.appendChild(mn);
+	}
+
+	div = Calendar.createElement("div", this.element);
+	this.yearsCombo = div;
+	div.className = "combo";
+	for (i = 12; i > 0; --i) {
+		var yr = Calendar.createElement("div");
+		yr.className = Calendar.is_ie ? "label-IEfix" : "label";
+		div.appendChild(yr);
+	}
+
+	this._init(this.firstDayOfWeek, this.date);
+	parent.appendChild(this.element);
+};
+
+/** keyboard navigation, only for popup calendars */
+Calendar._keyEvent = function(ev) {
+	var cal = window._dynarch_popupCalendar;
+	if (!cal || cal.multiple)
+		return false;
+	(Calendar.is_ie) && (ev = window.event);
+	var act = (Calendar.is_ie || ev.type == "keypress"),
+		K = ev.keyCode;
+	if (ev.ctrlKey) {
+		switch (K) {
+		    case 37: // KEY left
+			act && Calendar.cellClick(cal._nav_pm);
+			break;
+		    case 38: // KEY up
+			act && Calendar.cellClick(cal._nav_py);
+			break;
+		    case 39: // KEY right
+			act && Calendar.cellClick(cal._nav_nm);
+			break;
+		    case 40: // KEY down
+			act && Calendar.cellClick(cal._nav_ny);
+			break;
+		    default:
+			return false;
+		}
+	} else switch (K) {
+	    case 32: // KEY space (now)
+		Calendar.cellClick(cal._nav_now);
+		break;
+	    case 27: // KEY esc
+		act && cal.callCloseHandler();
+		break;
+	    case 37: // KEY left
+	    case 38: // KEY up
+	    case 39: // KEY right
+	    case 40: // KEY down
+		if (act) {
+			var prev, x, y, ne, el, step;
+			prev = K == 37 || K == 38;
+			step = (K == 37 || K == 39) ? 1 : 7;
+			function setVars() {
+				el = cal.currentDateEl;
+				var p = el.pos;
+				x = p & 15;
+				y = p >> 4;
+				ne = cal.ar_days[y][x];
+			};setVars();
+			function prevMonth() {
+				var date = new Date(cal.date);
+				date.setDate(date.getDate() - step);
+				cal.setDate(date);
+			};
+			function nextMonth() {
+				var date = new Date(cal.date);
+				date.setDate(date.getDate() + step);
+				cal.setDate(date);
+			};
+			while (1) {
+				switch (K) {
+				    case 37: // KEY left
+					if (--x >= 0)
+						ne = cal.ar_days[y][x];
+					else {
+						x = 6;
+						K = 38;
+						continue;
+					}
+					break;
+				    case 38: // KEY up
+					if (--y >= 0)
+						ne = cal.ar_days[y][x];
+					else {
+						prevMonth();
+						setVars();
+					}
+					break;
+				    case 39: // KEY right
+					if (++x < 7)
+						ne = cal.ar_days[y][x];
+					else {
+						x = 0;
+						K = 40;
+						continue;
+					}
+					break;
+				    case 40: // KEY down
+					if (++y < cal.ar_days.length)
+						ne = cal.ar_days[y][x];
+					else {
+						nextMonth();
+						setVars();
+					}
+					break;
+				}
+				break;
+			}
+			if (ne) {
+				if (!ne.disabled)
+					Calendar.cellClick(ne);
+				else if (prev)
+					prevMonth();
+				else
+					nextMonth();
+			}
+		}
+		break;
+	    case 13: // KEY enter
+		if (act)
+			Calendar.cellClick(cal.currentDateEl, ev);
+		break;
+	    default:
+		return false;
+	}
+	return Calendar.stopEvent(ev);
+};
+
+/**
+ *  (RE)Initializes the calendar to the given date and firstDayOfWeek
+ */
+Calendar.prototype._init = function (firstDayOfWeek, date) {
+	var today = new Date(),
+		TY = today.getFullYear(),
+		TM = today.getMonth(),
+		TD = today.getDate();
+	this.table.style.visibility = "hidden";
+	var year = date.getFullYear();
+	if (year < this.minYear) {
+		year = this.minYear;
+		date.setFullYear(year);
+	} else if (year > this.maxYear) {
+		year = this.maxYear;
+		date.setFullYear(year);
+	}
+	this.firstDayOfWeek = firstDayOfWeek;
+	this.date = new Date(date);
+	var month = date.getMonth();
+	var mday = date.getDate();
+	var no_days = date.getMonthDays();
+
+	// calendar voodoo for computing the first day that would actually be
+	// displayed in the calendar, even if it's from the previous month.
+	// WARNING: this is magic. ;-)
+	date.setDate(1);
+	var day1 = (date.getDay() - this.firstDayOfWeek) % 7;
+	if (day1 < 0)
+		day1 += 7;
+	date.setDate(-day1);
+	date.setDate(date.getDate() + 1);
+
+	var row = this.tbody.firstChild;
+	var MN = Calendar._SMN[month];
+	var ar_days = this.ar_days = new Array();
+	var weekend = Calendar._TT["WEEKEND"];
+	var dates = this.multiple ? (this.datesCells = {}) : null;
+	for (var i = 0; i < 6; ++i, row = row.nextSibling) {
+		var cell = row.firstChild;
+		if (this.weekNumbers) {
+			cell.className = "day wn";
+			cell.innerHTML = date.getWeekNumber();
+			cell = cell.nextSibling;
+		}
+		row.className = "daysrow";
+		var hasdays = false, iday, dpos = ar_days[i] = [];
+		for (var j = 0; j < 7; ++j, cell = cell.nextSibling, date.setDate(iday + 1)) {
+			iday = date.getDate();
+			var wday = date.getDay();
+			cell.className = "day";
+			cell.pos = i << 4 | j;
+			dpos[j] = cell;
+			var current_month = (date.getMonth() == month);
+			if (!current_month) {
+				if (this.showsOtherMonths) {
+					cell.className += " othermonth";
+					cell.otherMonth = true;
+				} else {
+					cell.className = "emptycell";
+					cell.innerHTML = " ";
+					cell.disabled = true;
+					continue;
+				}
+			} else {
+				cell.otherMonth = false;
+				hasdays = true;
+			}
+			cell.disabled = false;
+			cell.innerHTML = this.getDateText ? this.getDateText(date, iday) : iday;
+			if (dates)
+				dates[date.print("%Y%m%d")] = cell;
+			if (this.getDateStatus) {
+				var status = this.getDateStatus(date, year, month, iday);
+				if (this.getDateToolTip) {
+					var toolTip = this.getDateToolTip(date, year, month, iday);
+					if (toolTip)
+						cell.title = toolTip;
+				}
+				if (status === true) {
+					cell.className += " disabled";
+					cell.disabled = true;
+				} else {
+					if (/disabled/i.test(status))
+						cell.disabled = true;
+					cell.className += " " + status;
+				}
+			}
+			if (!cell.disabled) {
+				cell.caldate = new Date(date);
+				cell.ttip = "_";
+				if (!this.multiple && current_month
+				    && iday == mday && this.hiliteToday) {
+					cell.className += " selected";
+					this.currentDateEl = cell;
+				}
+				if (date.getFullYear() == TY &&
+				    date.getMonth() == TM &&
+				    iday == TD) {
+					cell.className += " today";
+					cell.ttip += Calendar._TT["PART_TODAY"];
+				}
+				if (weekend.indexOf(wday.toString()) != -1)
+					cell.className += cell.otherMonth ? " oweekend" : " weekend";
+			}
+		}
+		if (!(hasdays || this.showsOtherMonths))
+			row.className = "emptyrow";
+	}
+	this.title.innerHTML = Calendar._MN[month] + ", " + year;
+	this.onSetTime();
+	this.table.style.visibility = "visible";
+	this._initMultipleDates();
+	// PROFILE
+	// this.tooltips.innerHTML = "Generated in " + ((new Date()) - today) + " ms";
+};
+
+Calendar.prototype._initMultipleDates = function() {
+	if (this.multiple) {
+		for (var i in this.multiple) {
+			var cell = this.datesCells[i];
+			var d = this.multiple[i];
+			if (!d)
+				continue;
+			if (cell)
+				cell.className += " selected";
+		}
+	}
+};
+
+Calendar.prototype._toggleMultipleDate = function(date) {
+	if (this.multiple) {
+		var ds = date.print("%Y%m%d");
+		var cell = this.datesCells[ds];
+		if (cell) {
+			var d = this.multiple[ds];
+			if (!d) {
+				Calendar.addClass(cell, "selected");
+				this.multiple[ds] = date;
+			} else {
+				Calendar.removeClass(cell, "selected");
+				delete this.multiple[ds];
+			}
+		}
+	}
+};
+
+Calendar.prototype.setDateToolTipHandler = function (unaryFunction) {
+	this.getDateToolTip = unaryFunction;
+};
+
+/**
+ *  Calls _init function above for going to a certain date (but only if the
+ *  date is different than the currently selected one).
+ */
+Calendar.prototype.setDate = function (date) {
+	if (!date.equalsTo(this.date)) {
+		this._init(this.firstDayOfWeek, date);
+	}
+};
+
+/**
+ *  Refreshes the calendar.  Useful if the "disabledHandler" function is
+ *  dynamic, meaning that the list of disabled date can change at runtime.
+ *  Just * call this function if you think that the list of disabled dates
+ *  should * change.
+ */
+Calendar.prototype.refresh = function () {
+	this._init(this.firstDayOfWeek, this.date);
+};
+
+/** Modifies the "firstDayOfWeek" parameter (pass 0 for Synday, 1 for Monday, etc.). */
+Calendar.prototype.setFirstDayOfWeek = function (firstDayOfWeek) {
+	this._init(firstDayOfWeek, this.date);
+	this._displayWeekdays();
+};
+
+/**
+ *  Allows customization of what dates are enabled.  The "unaryFunction"
+ *  parameter must be a function object that receives the date (as a JS Date
+ *  object) and returns a boolean value.  If the returned value is true then
+ *  the passed date will be marked as disabled.
+ */
+Calendar.prototype.setDateStatusHandler = Calendar.prototype.setDisabledHandler = function (unaryFunction) {
+	this.getDateStatus = unaryFunction;
+};
+
+/** Customization of allowed year range for the calendar. */
+Calendar.prototype.setRange = function (a, z) {
+	this.minYear = a;
+	this.maxYear = z;
+};
+
+/** Calls the first user handler (selectedHandler). */
+Calendar.prototype.callHandler = function () {
+	if (this.onSelected) {
+		this.onSelected(this, this.date.print(this.dateFormat));
+	}
+};
+
+/** Calls the second user handler (closeHandler). */
+Calendar.prototype.callCloseHandler = function () {
+	if (this.onClose) {
+		this.onClose(this);
+	}
+	this.hideShowCovered();
+};
+
+/** Removes the calendar object from the DOM tree and destroys it. */
+Calendar.prototype.destroy = function () {
+	var el = this.element.parentNode;
+	el.removeChild(this.element);
+	Calendar._C = null;
+	window._dynarch_popupCalendar = null;
+};
+
+/**
+ *  Moves the calendar element to a different section in the DOM tree (changes
+ *  its parent).
+ */
+Calendar.prototype.reparent = function (new_parent) {
+	var el = this.element;
+	el.parentNode.removeChild(el);
+	new_parent.appendChild(el);
+};
+
+// This gets called when the user presses a mouse button anywhere in the
+// document, if the calendar is shown.  If the click was outside the open
+// calendar this function closes it.
+Calendar._checkCalendar = function(ev) {
+	var calendar = window._dynarch_popupCalendar;
+	if (!calendar) {
+		return false;
+	}
+	var el = Calendar.is_ie ? Calendar.getElement(ev) : Calendar.getTargetElement(ev);
+	for (; el != null && el != calendar.element; el = el.parentNode);
+	if (el == null) {
+		// calls closeHandler which should hide the calendar.
+		window._dynarch_popupCalendar.callCloseHandler();
+		return Calendar.stopEvent(ev);
+	}
+};
+
+/** Shows the calendar. */
+Calendar.prototype.show = function () {
+	var rows = this.table.getElementsByTagName("tr");
+	for (var i = rows.length; i > 0;) {
+		var row = rows[--i];
+		Calendar.removeClass(row, "rowhilite");
+		var cells = row.getElementsByTagName("td");
+		for (var j = cells.length; j > 0;) {
+			var cell = cells[--j];
+			Calendar.removeClass(cell, "hilite");
+			Calendar.removeClass(cell, "active");
+		}
+	}
+	this.element.style.display = "block";
+	this.hidden = false;
+	if (this.isPopup) {
+		window._dynarch_popupCalendar = this;
+		Calendar.addEvent(document, "keydown", Calendar._keyEvent);
+		Calendar.addEvent(document, "keypress", Calendar._keyEvent);
+		Calendar.addEvent(document, "mousedown", Calendar._checkCalendar);
+	}
+	this.hideShowCovered();
+};
+
+/**
+ *  Hides the calendar.  Also removes any "hilite" from the class of any TD
+ *  element.
+ */
+Calendar.prototype.hide = function () {
+	if (this.isPopup) {
+		Calendar.removeEvent(document, "keydown", Calendar._keyEvent);
+		Calendar.removeEvent(document, "keypress", Calendar._keyEvent);
+		Calendar.removeEvent(document, "mousedown", Calendar._checkCalendar);
+	}
+	this.element.style.display = "none";
+	this.hidden = true;
+	this.hideShowCovered();
+};
+
+/**
+ *  Shows the calendar at a given absolute position (beware that, depending on
+ *  the calendar element style -- position property -- this might be relative
+ *  to the parent's containing rectangle).
+ */
+Calendar.prototype.showAt = function (x, y) {
+	var s = this.element.style;
+	s.left = x + "px";
+	s.top = y + "px";
+	this.show();
+};
+
+/** Shows the calendar near a given element. */
+Calendar.prototype.showAtElement = function (el, opts) {
+	var self = this;
+	var p = Calendar.getAbsolutePos(el);
+	if (!opts || typeof opts != "string") {
+		this.showAt(p.x, p.y + el.offsetHeight);
+		return true;
+	}
+	function fixPosition(box) {
+		if (box.x < 0)
+			box.x = 0;
+		if (box.y < 0)
+			box.y = 0;
+		var cp = document.createElement("div");
+		var s = cp.style;
+		s.position = "absolute";
+		s.right = s.bottom = s.width = s.height = "0px";
+		document.body.appendChild(cp);
+		var br = Calendar.getAbsolutePos(cp);
+		document.body.removeChild(cp);
+		if (Calendar.is_ie) {
+			br.y += document.body.scrollTop;
+			br.x += document.body.scrollLeft;
+		} else {
+			br.y += window.scrollY;
+			br.x += window.scrollX;
+		}
+		var tmp = box.x + box.width - br.x;
+		if (tmp > 0) box.x -= tmp;
+		tmp = box.y + box.height - br.y;
+		if (tmp > 0) box.y -= tmp;
+	};
+	this.element.style.display = "block";
+	Calendar.continuation_for_the_fucking_khtml_browser = function() {
+		var w = self.element.offsetWidth;
+		var h = self.element.offsetHeight;
+		self.element.style.display = "none";
+		var valign = opts.substr(0, 1);
+		var halign = "l";
+		if (opts.length > 1) {
+			halign = opts.substr(1, 1);
+		}
+		// vertical alignment
+		switch (valign) {
+		    case "T": p.y -= h; break;
+		    case "B": p.y += el.offsetHeight; break;
+		    case "C": p.y += (el.offsetHeight - h) / 2; break;
+		    case "t": p.y += el.offsetHeight - h; break;
+		    case "b": break; // already there
+		}
+		// horizontal alignment
+		switch (halign) {
+		    case "L": p.x -= w; break;
+		    case "R": p.x += el.offsetWidth; break;
+		    case "C": p.x += (el.offsetWidth - w) / 2; break;
+		    case "l": p.x += el.offsetWidth - w; break;
+		    case "r": break; // already there
+		}
+		p.width = w;
+		p.height = h + 40;
+		self.monthsCombo.style.display = "none";
+		fixPosition(p);
+		self.showAt(p.x, p.y);
+	};
+	if (Calendar.is_khtml)
+		setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()", 10);
+	else
+		Calendar.continuation_for_the_fucking_khtml_browser();
+};
+
+/** Customizes the date format. */
+Calendar.prototype.setDateFormat = function (str) {
+	this.dateFormat = str;
+};
+
+/** Customizes the tooltip date format. */
+Calendar.prototype.setTtDateFormat = function (str) {
+	this.ttDateFormat = str;
+};
+
+/**
+ *  Tries to identify the date represented in a string.  If successful it also
+ *  calls this.setDate which moves the calendar to the given date.
+ */
+Calendar.prototype.parseDate = function(str, fmt) {
+	if (!fmt)
+		fmt = this.dateFormat;
+	this.setDate(Date.parseDate(str, fmt));
+};
+
+Calendar.prototype.hideShowCovered = function () {
+	if (!Calendar.is_ie && !Calendar.is_opera)
+		return;
+	function getVisib(obj){
+		var value = obj.style.visibility;
+		if (!value) {
+			if (document.defaultView && typeof (document.defaultView.getComputedStyle) == "function") { // Gecko, W3C
+				if (!Calendar.is_khtml)
+					value = document.defaultView.
+						getComputedStyle(obj, "").getPropertyValue("visibility");
+				else
+					value = '';
+			} else if (obj.currentStyle) { // IE
+				value = obj.currentStyle.visibility;
+			} else
+				value = '';
+		}
+		return value;
+	};
+
+	var tags = new Array("applet", "iframe", "select");
+	var el = this.element;
+
+	var p = Calendar.getAbsolutePos(el);
+	var EX1 = p.x;
+	var EX2 = el.offsetWidth + EX1;
+	var EY1 = p.y;
+	var EY2 = el.offsetHeight + EY1;
+
+	for (var k = tags.length; k > 0; ) {
+		var ar = document.getElementsByTagName(tags[--k]);
+		var cc = null;
+
+		for (var i = ar.length; i > 0;) {
+			cc = ar[--i];
+
+			p = Calendar.getAbsolutePos(cc);
+			var CX1 = p.x;
+			var CX2 = cc.offsetWidth + CX1;
+			var CY1 = p.y;
+			var CY2 = cc.offsetHeight + CY1;
+
+			if (this.hidden || (CX1 > EX2) || (CX2 < EX1) || (CY1 > EY2) || (CY2 < EY1)) {
+				if (!cc.__msh_save_visibility) {
+					cc.__msh_save_visibility = getVisib(cc);
+				}
+				cc.style.visibility = cc.__msh_save_visibility;
+			} else {
+				if (!cc.__msh_save_visibility) {
+					cc.__msh_save_visibility = getVisib(cc);
+				}
+				cc.style.visibility = "hidden";
+			}
+		}
+	}
+};
+
+/** Internal function; it displays the bar with the names of the weekday. */
+Calendar.prototype._displayWeekdays = function () {
+	var fdow = this.firstDayOfWeek;
+	var cell = this.firstdayname;
+	var weekend = Calendar._TT["WEEKEND"];
+	for (var i = 0; i < 7; ++i) {
+		cell.className = "day name";
+		var realday = (i + fdow) % 7;
+		if (i) {
+			cell.ttip = Calendar._TT["DAY_FIRST"].replace("%s", Calendar._DN[realday]);
+			cell.navtype = 100;
+			cell.calendar = this;
+			cell.fdow = realday;
+			Calendar._add_evs(cell);
+		}
+		if (weekend.indexOf(realday.toString()) != -1) {
+			Calendar.addClass(cell, "weekend");
+		}
+		cell.innerHTML = Calendar._SDN[(i + fdow) % 7];
+		cell = cell.nextSibling;
+	}
+};
+
+/** Internal function.  Hides all combo boxes that might be displayed. */
+Calendar.prototype._hideCombos = function () {
+	this.monthsCombo.style.display = "none";
+	this.yearsCombo.style.display = "none";
+};
+
+/** Internal function.  Starts dragging the element. */
+Calendar.prototype._dragStart = function (ev) {
+	if (this.dragging) {
+		return;
+	}
+	this.dragging = true;
+	var posX;
+	var posY;
+	if (Calendar.is_ie) {
+		posY = window.event.clientY + document.body.scrollTop;
+		posX = window.event.clientX + document.body.scrollLeft;
+	} else {
+		posY = ev.clientY + window.scrollY;
+		posX = ev.clientX + window.scrollX;
+	}
+	var st = this.element.style;
+	this.xOffs = posX - parseInt(st.left);
+	this.yOffs = posY - parseInt(st.top);
+	with (Calendar) {
+		addEvent(document, "mousemove", calDragIt);
+		addEvent(document, "mouseup", calDragEnd);
+	}
+};
+
+// BEGIN: DATE OBJECT PATCHES
+
+/** Adds the number of days array to the Date object. */
+Date._MD = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
+
+/** Constants used for time computations */
+Date.SECOND = 1000 /* milliseconds */;
+Date.MINUTE = 60 * Date.SECOND;
+Date.HOUR   = 60 * Date.MINUTE;
+Date.DAY    = 24 * Date.HOUR;
+Date.WEEK   =  7 * Date.DAY;
+
+Date.parseDate = function(str, fmt) {
+	var today = new Date();
+	var y = 0;
+	var m = -1;
+	var d = 0;
+	var a = str.split(/\W+/);
+	var b = fmt.match(/%./g);
+	var i = 0, j = 0;
+	var hr = 0;
+	var min = 0;
+	for (i = 0; i < a.length; ++i) {
+		if (!a[i])
+			continue;
+		switch (b[i]) {
+		    case "%d":
+		    case "%e":
+			d = parseInt(a[i], 10);
+			break;
+
+		    case "%m":
+			m = parseInt(a[i], 10) - 1;
+			break;
+
+		    case "%Y":
+		    case "%y":
+			y = parseInt(a[i], 10);
+			(y < 100) && (y += (y > 29) ? 1900 : 2000);
+			break;
+
+		    case "%b":
+		    case "%B":
+			for (j = 0; j < 12; ++j) {
+				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { m = j; break; }
+			}
+			break;
+
+		    case "%H":
+		    case "%I":
+		    case "%k":
+		    case "%l":
+			hr = parseInt(a[i], 10);
+			break;
+
+		    case "%P":
+		    case "%p":
+			if (/pm/i.test(a[i]) && hr < 12)
+				hr += 12;
+			else if (/am/i.test(a[i]) && hr >= 12)
+				hr -= 12;
+			break;
+
+		    case "%M":
+			min = parseInt(a[i], 10);
+			break;
+		}
+	}
+	if (isNaN(y)) y = today.getFullYear();
+	if (isNaN(m)) m = today.getMonth();
+	if (isNaN(d)) d = today.getDate();
+	if (isNaN(hr)) hr = today.getHours();
+	if (isNaN(min)) min = today.getMinutes();
+	if (y != 0 && m != -1 && d != 0)
+		return new Date(y, m, d, hr, min, 0);
+	y = 0; m = -1; d = 0;
+	for (i = 0; i < a.length; ++i) {
+		if (a[i].search(/[a-zA-Z]+/) != -1) {
+			var t = -1;
+			for (j = 0; j < 12; ++j) {
+				if (Calendar._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) { t = j; break; }
+			}
+			if (t != -1) {
+				if (m != -1) {
+					d = m+1;
+				}
+				m = t;
+			}
+		} else if (parseInt(a[i], 10) <= 12 && m == -1) {
+			m = a[i]-1;
+		} else if (parseInt(a[i], 10) > 31 && y == 0) {
+			y = parseInt(a[i], 10);
+			(y < 100) && (y += (y > 29) ? 1900 : 2000);
+		} else if (d == 0) {
+			d = a[i];
+		}
+	}
+	if (y == 0)
+		y = today.getFullYear();
+	if (m != -1 && d != 0)
+		return new Date(y, m, d, hr, min, 0);
+	return today;
+};
+
+/** Returns the number of days in the current month */
+Date.prototype.getMonthDays = function(month) {
+	var year = this.getFullYear();
+	if (typeof month == "undefined") {
+		month = this.getMonth();
+	}
+	if (((0 == (year%4)) && ( (0 != (year%100)) || (0 == (year%400)))) && month == 1) {
+		return 29;
+	} else {
+		return Date._MD[month];
+	}
+};
+
+/** Returns the number of day in the year. */
+Date.prototype.getDayOfYear = function() {
+	var now = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+	var then = new Date(this.getFullYear(), 0, 0, 0, 0, 0);
+	var time = now - then;
+	return Math.floor(time / Date.DAY);
+};
+
+/** Returns the number of the week in year, as defined in ISO 8601. */
+Date.prototype.getWeekNumber = function() {
+	var d = new Date(this.getFullYear(), this.getMonth(), this.getDate(), 0, 0, 0);
+	var DoW = d.getDay();
+	d.setDate(d.getDate() - (DoW + 6) % 7 + 3); // Nearest Thu
+	var ms = d.valueOf(); // GMT
+	d.setMonth(0);
+	d.setDate(4); // Thu in Week 1
+	return Math.round((ms - d.valueOf()) / (7 * 864e5)) + 1;
+};
+
+/** Checks date and time equality */
+Date.prototype.equalsTo = function(date) {
+	return ((this.getFullYear() == date.getFullYear()) &&
+		(this.getMonth() == date.getMonth()) &&
+		(this.getDate() == date.getDate()) &&
+		(this.getHours() == date.getHours()) &&
+		(this.getMinutes() == date.getMinutes()));
+};
+
+/** Set only the year, month, date parts (keep existing time) */
+Date.prototype.setDateOnly = function(date) {
+	var tmp = new Date(date);
+	this.setDate(1);
+	this.setFullYear(tmp.getFullYear());
+	this.setMonth(tmp.getMonth());
+	this.setDate(tmp.getDate());
+};
+
+/** Prints the date in a string according to the given format. */
+Date.prototype.print = function (str) {
+	var m = this.getMonth();
+	var d = this.getDate();
+	var y = this.getFullYear();
+	var wn = this.getWeekNumber();
+	var w = this.getDay();
+	var s = {};
+	var hr = this.getHours();
+	var pm = (hr >= 12);
+	var ir = (pm) ? (hr - 12) : hr;
+	var dy = this.getDayOfYear();
+	if (ir == 0)
+		ir = 12;
+	var min = this.getMinutes();
+	var sec = this.getSeconds();
+	s["%a"] = Calendar._SDN[w]; // abbreviated weekday name [FIXME: I18N]
+	s["%A"] = Calendar._DN[w]; // full weekday name
+	s["%b"] = Calendar._SMN[m]; // abbreviated month name [FIXME: I18N]
+	s["%B"] = Calendar._MN[m]; // full month name
+	// FIXME: %c : preferred date and time representation for the current locale
+	s["%C"] = 1 + Math.floor(y / 100); // the century number
+	s["%d"] = (d < 10) ? ("0" + d) : d; // the day of the month (range 01 to 31)
+	s["%e"] = d; // the day of the month (range 1 to 31)
+	// FIXME: %D : american date style: %m/%d/%y
+	// FIXME: %E, %F, %G, %g, %h (man strftime)
+	s["%H"] = (hr < 10) ? ("0" + hr) : hr; // hour, range 00 to 23 (24h format)
+	s["%I"] = (ir < 10) ? ("0" + ir) : ir; // hour, range 01 to 12 (12h format)
+	s["%j"] = (dy < 100) ? ((dy < 10) ? ("00" + dy) : ("0" + dy)) : dy; // day of the year (range 001 to 366)
+	s["%k"] = hr;		// hour, range 0 to 23 (24h format)
+	s["%l"] = ir;		// hour, range 1 to 12 (12h format)
+	s["%m"] = (m < 9) ? ("0" + (1+m)) : (1+m); // month, range 01 to 12
+	s["%M"] = (min < 10) ? ("0" + min) : min; // minute, range 00 to 59
+	s["%n"] = "\n";		// a newline character
+	s["%p"] = pm ? "PM" : "AM";
+	s["%P"] = pm ? "pm" : "am";
+	// FIXME: %r : the time in am/pm notation %I:%M:%S %p
+	// FIXME: %R : the time in 24-hour notation %H:%M
+	s["%s"] = Math.floor(this.getTime() / 1000);
+	s["%S"] = (sec < 10) ? ("0" + sec) : sec; // seconds, range 00 to 59
+	s["%t"] = "\t";		// a tab character
+	// FIXME: %T : the time in 24-hour notation (%H:%M:%S)
+	s["%U"] = s["%W"] = s["%V"] = (wn < 10) ? ("0" + wn) : wn;
+	s["%u"] = w + 1;	// the day of the week (range 1 to 7, 1 = MON)
+	s["%w"] = w;		// the day of the week (range 0 to 6, 0 = SUN)
+	// FIXME: %x : preferred date representation for the current locale without the time
+	// FIXME: %X : preferred time representation for the current locale without the date
+	s["%y"] = ('' + y).substr(2, 2); // year without the century (range 00 to 99)
+	s["%Y"] = y;		// year with the century
+	s["%%"] = "%";		// a literal '%' character
+
+	var re = /%./g;
+	if (!Calendar.is_ie5 && !Calendar.is_khtml)
+		return str.replace(re, function (par) { return s[par] || par; });
+
+	var a = str.match(re);
+	for (var i = 0; i < a.length; i++) {
+		var tmp = s[a[i]];
+		if (tmp) {
+			re = new RegExp(a[i], 'g');
+			str = str.replace(re, tmp);
+		}
+	}
+
+	return str;
+};
+
+Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
+Date.prototype.setFullYear = function(y) {
+	var d = new Date(this);
+	d.__msh_oldSetFullYear(y);
+	if (d.getMonth() != this.getMonth())
+		this.setDate(28);
+	this.__msh_oldSetFullYear(y);
+};
+
+// END: DATE OBJECT PATCHES
+
+
+// global object that remembers the calendar
+window._dynarch_popupCalendar = null;
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar_stripped.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar_stripped.js
new file mode 100644
index 0000000..4fe03f1
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar_stripped.js
@@ -0,0 +1,14 @@
+/*  Copyright Mihai Bazon, 2002-2005  |  www.bazon.net/mishoo
+ * -----------------------------------------------------------
+ *
+ * The DHTML Calendar, version 1.0 "It is happening again"
+ *
+ * Details and latest version at:
+ * www.dynarch.com/projects/calendar
+ *
+ * This script is developed by Dynarch.com.  Visit us at www.dynarch.com.
+ *
+ * This script is distributed under the GNU Lesser General Public License.
+ * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html
+ */
+ Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];return stopEvent(ev);}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon at yahoo.com> to get it into the distribution  ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year<cal.maxYear){date.setFullYear(year+1);setMonth(0);}break;case 2:if(year<cal.maxYear){date.setFullYear(year+1);}break;case 100:cal.setFirstDayOfWeek(el.fdow);return;case 50:var range=el._range;var current=el.innerHTML;for(var i=range.length;--i>=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="<div unselectable='on'>"+text+"</div>";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("&#x00ab;",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("&#x2039;",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("&#x203a;",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("&#x00bb;",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||" ";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML=" ";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i<Calendar._MN.length;++i){var mn=Calendar.createElement("div");mn.className=Calendar.is_ie?"label-IEfix":"label";mn.month=i;mn.innerHTML=Calendar._SMN[i];div.appendChild(mn);}div=Calendar.createElement("div",this.element);this.yearsCombo=div;div.className="combo";for(i=12;i>0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++y<cal.ar_days.length)ne=cal.ar_days[y][x];else{nextMonth();setVars();}break;}break;}if(ne){if(!ne.disabled)Calendar.cellClick(ne);else if(prev)prevMonth();else nextMonth();}}break;case 13:if(act)Calendar.cellClick(cal.currentDateEl,ev);break;default:return false;}return Calendar.stopEvent(ev);};Calendar.prototype._init=function(firstDayOfWeek,date){var today=new Date(),TY=today.getFullYear(),TM=today.getMonth(),TD=today.getDate();this.table.style.visibility="hidden";var year=date.getFullYear();if(year<this.minYear){year=this.minYear;date.setFullYear(year);}else if(year>this.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML=" ";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(this.getDateToolTip){var toolTip=this.getDateToolTip(date,year,month,iday);if(toolTip)cell.title=toolTip;}if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&&current_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility=cc.__msh_save_visibility;}else{if(!cc.__msh_save_visibility){cc.__msh_save_visibility=getVisib(cc);}cc.style.visibility="hidden";}}}};Calendar.prototype._displayWeekdays=function(){var fdow=this.firstDayOfWeek;var cell=this.firstdayname;var weekend=Calendar._TT["WEEKEND"];for(var i=0;i<7;++i){cell.className="day name";var realday=(i+fdow)%7;if(i){cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[realday]);cell.navtype=100;cell.calendar=this;cell.fdow=realday;Calendar._add_evs(cell);}if(weekend.indexOf(realday.toString())!=-1){Calendar.addClass(cell,"weekend");}cell.innerHTML=Calendar._SDN[(i+fdow)%7];cell=cell.nextSibling;}};Calendar.prototype._hideCombos=function(){this.monthsCombo.style.display="none";this.yearsCombo.style.display="none";};Calendar.prototype._dragStart=function(ev){if(this.dragging){return;}this.dragging=true;var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posY=ev.clientY+window.scrollY;posX=ev.clientX+window.scrollX;}var st=this.element.style;this.xOffs=posX-parseInt(st.left);this.yOffs=posY-parseInt(st.top);with(Calendar){addEvent(document,"mousemove",calDragIt);addEvent(document,"mouseup",calDragEnd);}};Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);Date.SECOND=1000;Date.MINUTE=60*Date.SECOND;Date.HOUR=60*Date.MINUTE;Date.DAY=24*Date.HOUR;Date.WEEK=7*Date.DAY;Date.parseDate=function(str,fmt){var today=new Date();var y=0;var m=-1;var d=0;var a=str.split(/\W+/);var b=fmt.match(/%./g);var i=0,j=0;var hr=0;var min=0;for(i=0;i<a.length;++i){if(!a[i])continue;switch(b[i]){case "%d":case "%e":d=parseInt(a[i],10);break;case "%m":m=parseInt(a[i],10)-1;break;case "%Y":case "%y":y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i<a.length;++i){if(a[i].search(/[a-zA-Z]+/)!=-1){var t=-1;for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){t=j;break;}}if(t!=-1){if(m!=-1){d=m+1;}m=t;}}else if(parseInt(a[i],10)<=12&&m==-1){m=a[i]-1;}else if(parseInt(a[i],10)>31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i<a.length;i++){var tmp=s[a[i]];if(tmp){re=new RegExp(a[i],'g');str=str.replace(re,tmp);}}return str;};Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;Date.prototype.setFullYear=function(y){var d=new Date(this);d.__msh_oldSetFullYear(y);if(d.getMonth()!=this.getMonth())this.setDate(28);this.__msh_oldSetFullYear(y);};window._dynarch_popupCalendar=null;
\ No newline at end of file
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-af.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-af.js
new file mode 100644
index 0000000..aeda581
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-af.js
@@ -0,0 +1,39 @@
+// ** I18N Afrikaans
+Calendar._DN = new Array
+("Sondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrydag",
+ "Saterdag",
+ "Sondag");
+Calendar._MN = new Array
+("Januarie",
+ "Februarie",
+ "Maart",
+ "April",
+ "Mei",
+ "Junie",
+ "Julie",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "Desember");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Verander eerste dag van die week";
+Calendar._TT["PREV_YEAR"] = "Vorige jaar (hou vir keuselys)";
+Calendar._TT["PREV_MONTH"] = "Vorige maand (hou vir keuselys)";
+Calendar._TT["GO_TODAY"] = "Gaan na vandag";
+Calendar._TT["NEXT_MONTH"] = "Volgende maand (hou vir keuselys)";
+Calendar._TT["NEXT_YEAR"] = "Volgende jaar (hou vir keuselys)";
+Calendar._TT["SEL_DATE"] = "Kies datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te skuif";
+Calendar._TT["PART_TODAY"] = " (vandag)";
+Calendar._TT["MON_FIRST"] = "Vertoon Maandag eerste";
+Calendar._TT["SUN_FIRST"] = "Display Sunday first";
+Calendar._TT["CLOSE"] = "Close";
+Calendar._TT["TODAY"] = "Today";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-br.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-br.js
new file mode 100644
index 0000000..d7db4b4
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-br.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Domingo",
+ "Segunda",
+ "Terça",
+ "Quarta",
+ "Quinta",
+ "Sexta",
+ "Sábado",
+ "Domingo");
+Calendar._MN = new Array
+("Janeiro",
+ "Fevereiro",
+ "Março",
+ "Abril",
+ "Maio",
+ "Junho",
+ "Julho",
+ "Agosto",
+ "Setembro",
+ "Outubro",
+ "Novembro",
+ "Dezembro");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Altera primeiro dia da semana";
+Calendar._TT["PREV_YEAR"] = "Ano anterior(hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Mês anterior (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Hoje";
+Calendar._TT["NEXT_MONTH"] = "Mês seguinte (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "ano seguinte (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Seleciona uma data";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrasta calendário";
+Calendar._TT["PART_TODAY"] = " (hoje)";
+Calendar._TT["MON_FIRST"] = "Inicia na segunda-feira";
+Calendar._TT["SUN_FIRST"] = "Inicia no domingo";
+Calendar._TT["CLOSE"] = "Fechar";
+Calendar._TT["TODAY"] = "Hoje";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, dd de MM de y";
+
+Calendar._TT["WK"] = "sem";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ca.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ca.js
new file mode 100644
index 0000000..3498d76
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ca.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Diumenge",
+ "Dilluns",
+ "Dimarts",
+ "Dimecres",
+ "Dijous",
+ "Divendres",
+ "Dissabte",
+ "Diumenge");
+Calendar._MN = new Array
+("Gener",
+ "Febrer",
+ "Març",
+ "Abril",
+ "Maig",
+ "Juny",
+ "Juliol",
+ "Agost",
+ "Setembre",
+ "Octubre",
+ "Novembre",
+ "Desembre");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Canvia el primer dia de la setmana";
+Calendar._TT["PREV_YEAR"] = "Any anterior (mantenir per a menu)";
+Calendar._TT["PREV_MONTH"] = "Mes anterior (mantenir per a menu)";
+Calendar._TT["GO_TODAY"] = "Anar a avui";
+Calendar._TT["NEXT_MONTH"] = "Mes següent (mantenir per a menu)";
+Calendar._TT["NEXT_YEAR"] = "Any següent (mantenir per a menu)";
+Calendar._TT["SEL_DATE"] = "Seleccionar data";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per a moure";
+Calendar._TT["PART_TODAY"] = " (avui)";
+Calendar._TT["MON_FIRST"] = "Mostrar dilluns primer";
+Calendar._TT["SUN_FIRST"] = "Mostrar diumenge primer";
+Calendar._TT["CLOSE"] = "Tancar";
+Calendar._TT["TODAY"] = "Avui";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "sem";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-cs-win.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-cs-win.js
new file mode 100644
index 0000000..b34213f
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-cs-win.js
@@ -0,0 +1,34 @@
+/* 
+	calendar-cs-win.js
+	language: Czech
+	encoding: windows-1250
+	author: Lubos Jerabek (xnet at seznam.cz)
+*/
+
+// ** I18N
+Calendar._DN = new Array('Nedìle','Pondìlí','Úterý','Støeda','Ètvrtek','Pátek','Sobota','Nedìle');
+Calendar._DN3 = new Array('Ne','Po','Út','St','Èt','Pá','So','Ne');
+Calendar._MN = new Array('Leden','Únor','Bøezen','Duben','Kvìten','Èerven','Èervenec','Srpen','Záøí','Øíjen','Listopad','Prosinec');
+Calendar._MN3 = new Array('Led','Úno','Bøe','Dub','Kvì','Èrv','Èvc','Srp','Záø','Øíj','Lis','Pro');
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Zmìna prvního dne v týdnu";
+Calendar._TT["PREV_YEAR"] = "Pøedchozí rok (pøidrž pro menu)";
+Calendar._TT["PREV_MONTH"] = "Pøedchozí mìsíc (pøidrž pro menu)";
+Calendar._TT["GO_TODAY"] = "Dnešní datum";
+Calendar._TT["NEXT_MONTH"] = "Další mìsíc (pøidrž pro menu)";
+Calendar._TT["NEXT_YEAR"] = "Další rok (pøidrž pro menu)";
+Calendar._TT["SEL_DATE"] = "Vyber datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Chy a táhni, pro pøesun";
+Calendar._TT["PART_TODAY"] = " (dnes)";
+Calendar._TT["MON_FIRST"] = "Ukaž jako první Pondìlí";
+Calendar._TT["SUN_FIRST"] = "Ukaž jako první Nedìli";
+Calendar._TT["CLOSE"] = "Zavøít";
+Calendar._TT["TODAY"] = "Dnes";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, 5.MM y";
+
+Calendar._TT["WK"] = "wk";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-da.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-da.js
new file mode 100644
index 0000000..579cee0
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-da.js
@@ -0,0 +1,63 @@
+// ** I18N
+Calendar._DN = new Array
+("Søndag",
+ "Mandag",
+ "Tirsdag",
+ "Onsdag",
+ "Torsdag",
+ "Fredag",
+ "Lørdag",
+ "Søndag");
+Calendar._MN = new Array
+("January",
+ "Februar",
+ "Marts",
+ "April",
+ "Maj",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Om Kalenderen";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"For den seneste version besøg: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribueret under GNU LGPL.  Se http://gnu.org/licenses/lgpl.html for detajler." +
+"\n\n" +
+"Valg af dato:\n" +
+"- Brug \xab, \xbb knapperne for at vælge år\n" +
+"- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge måned\n" +
+"- Hold knappen på musen nede på knapperne ovenfor for hurtigere valg.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Valg af tid:\n" +
+"- Klik på en vilkårlig del for større værdi\n" +
+"- eller Shift-klik for for mindre værdi\n" +
+"- eller klik og træk for hurtigere valg.";
+
+Calendar._TT["TOGGLE"] = "Skift første ugedag";
+Calendar._TT["PREV_YEAR"] = "Ét år tilbage (hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Én måned tilbage (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Gå til i dag";
+Calendar._TT["NEXT_MONTH"] = "Én måned frem (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "Ét år frem (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Vælg dag";
+Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet";
+Calendar._TT["PART_TODAY"] = " (i dag)";
+Calendar._TT["MON_FIRST"] = "Vis mandag først";
+Calendar._TT["SUN_FIRST"] = "Vis søndag først";
+Calendar._TT["CLOSE"] = "Luk vinduet";
+Calendar._TT["TODAY"] = "I dag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy";
+Calendar._TT["TT_DATE_FORMAT"] = "%d. %b, %Y";
+
+Calendar._TT["WK"] = "wk";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-de.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-de.js
new file mode 100644
index 0000000..4bc1137
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-de.js
@@ -0,0 +1,124 @@
+// ** I18N
+
+// Calendar DE language
+// Author: Jack (tR), <jack at jtr.de>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sonntag",
+ "Montag",
+ "Dienstag",
+ "Mittwoch",
+ "Donnerstag",
+ "Freitag",
+ "Samstag",
+ "Sonntag");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("So",
+ "Mo",
+ "Di",
+ "Mi",
+ "Do",
+ "Fr",
+ "Sa",
+ "So");
+
+// full month names
+Calendar._MN = new Array
+("Januar",
+ "Februar",
+ "M\u00e4rz",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Dezember");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "M\u00e4r",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dez");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "\u00DCber dieses Kalendarmodul";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Datum ausw\u00e4hlen:\n" +
+"- Benutzen Sie die \xab, \xbb Buttons um das Jahr zu w\u00e4hlen\n" +
+"- Benutzen Sie die " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " Buttons um den Monat zu w\u00e4hlen\n" +
+"- F\u00fcr eine Schnellauswahl halten Sie die Maustaste \u00fcber diesen Buttons fest.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Zeit ausw\u00e4hlen:\n" +
+"- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\u00F6hen\n" +
+"- oder klicken Sie mit festgehaltener Shift-Taste um diese zu verringern\n" +
+"- oder klicken und festhalten f\u00fcr Schnellauswahl.";
+
+Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\u00e4hlen";
+Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Festhalten f\u00fcr Schnellauswahl)";
+Calendar._TT["PREV_MONTH"] = "Voriger Monat (Festhalten f\u00fcr Schnellauswahl)";
+Calendar._TT["GO_TODAY"] = "Heute ausw\u00e4hlen";
+Calendar._TT["NEXT_MONTH"] = "N\u00e4chst. Monat (Festhalten f\u00fcr Schnellauswahl)";
+Calendar._TT["NEXT_YEAR"] = "N\u00e4chst. Jahr (Festhalten f\u00fcr Schnellauswahl)";
+Calendar._TT["SEL_DATE"] = "Datum ausw\u00e4hlen";
+Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen festhalten";
+Calendar._TT["PART_TODAY"] = " (Heute)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s ";
+
+// This may be locale-dependent.  It specifies the week-end days, as an array
+// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Schlie\u00dfen";
+Calendar._TT["TODAY"] = "Heute";
+Calendar._TT["TIME_PART"] = "(Shift-)Klick oder Festhalten und Ziehen um den Wert zu \u00e4ndern";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Zeit:";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-du.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-du.js
new file mode 100644
index 0000000..2200448
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-du.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Zondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrijdag",
+ "Zaterdag",
+ "Zondag");
+Calendar._MN = new Array
+("Januari",
+ "Februari",
+ "Maart",
+ "April",
+ "Mei",
+ "Juni",
+ "Juli",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Toggle startdag van de week";
+Calendar._TT["PREV_YEAR"] = "Vorig jaar (indrukken voor menu)";
+Calendar._TT["PREV_MONTH"] = "Vorige month (indrukken voor menu)";
+Calendar._TT["GO_TODAY"] = "Naar Vandaag";
+Calendar._TT["NEXT_MONTH"] = "Volgende Maand (indrukken voor menu)";
+Calendar._TT["NEXT_YEAR"] = "Volgend jaar (indrukken voor menu)";
+Calendar._TT["SEL_DATE"] = "Selecteer datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen";
+Calendar._TT["PART_TODAY"] = " (vandaag)";
+Calendar._TT["MON_FIRST"] = "Toon Maandag eerst";
+Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst";
+Calendar._TT["CLOSE"] = "Sluiten";
+Calendar._TT["TODAY"] = "Vandaag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "wk";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-el.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-el.js
new file mode 100644
index 0000000..1afcbb2
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-el.js
@@ -0,0 +1,89 @@
+// ** I18N
+Calendar._DN = new Array
+("Κυριακή",
+ "Δευτέρα",
+ "Τρίτη",
+ "Τετάρτη",
+ "Πέμπτη",
+ "Παρασκευή",
+ "Σάββατο",
+ "Κυριακή");
+
+Calendar._SDN = new Array
+("Κυ",
+ "Δε",
+ "Tρ",
+ "Τε",
+ "Πε",
+ "Πα",
+ "Σα",
+ "Κυ");
+
+Calendar._MN = new Array
+("Ιανουάριος",
+ "Φεβρουάριος",
+ "Μάρτιος",
+ "Απρίλιος",
+ "Μάϊος",
+ "Ιούνιος",
+ "Ιούλιος",
+ "Αύγουστος",
+ "Σεπτέμβριος",
+ "Οκτώβριος",
+ "Νοέμβριος",
+ "Δεκέμβριος");
+
+Calendar._SMN = new Array
+("Ιαν",
+ "Φεβ",
+ "Μαρ",
+ "Απρ",
+ "Μαι",
+ "Ιουν",
+ "Ιουλ",
+ "Αυγ",
+ "Σεπ",
+ "Οκτ",
+ "Νοε",
+ "Δεκ");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Για το ημερολόγιο";
+
+Calendar._TT["ABOUT"] =
+"Επιλογέας ημερομηνίας/ώρας σε DHTML\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Για τελευταία έκδοση: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Επιλογή ημερομηνίας:\n" +
+"- Χρησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" +
+"- Χρησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" +
+"- Κρατήστε κουμπί ποντικού πατημένο στα παραπάνω κουμπιά για πιο γρήγορη επιλογή.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Επιλογή ώρας:\n" +
+"- Κάντε κλικ σε ένα από τα μέρη της ώρας για αύξηση\n" +
+"- ή Shift-κλικ για μείωση\n" +
+"- ή κλικ και μετακίνηση για πιο γρήγορη επιλογή.";
+Calendar._TT["TOGGLE"] = "Μπάρα πρώτης ημέρας της εβδομάδας";
+Calendar._TT["PREV_YEAR"] = "Προηγ. έτος (κρατήστε για το μενού)";
+Calendar._TT["PREV_MONTH"] = "Προηγ. μήνας (κρατήστε για το μενού)";
+Calendar._TT["GO_TODAY"] = "Σήμερα";
+Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κρατήστε για το μενού)";
+Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κρατήστε για το μενού)";
+Calendar._TT["SEL_DATE"] = "Επιλέξτε ημερομηνία";
+Calendar._TT["DRAG_TO_MOVE"] = "Σύρτε για να μετακινήσετε";
+Calendar._TT["PART_TODAY"] = " (σήμερα)";
+Calendar._TT["MON_FIRST"] = "Εμφάνιση Δευτέρας πρώτα";
+Calendar._TT["SUN_FIRST"] = "Εμφάνιση Κυριακής πρώτα";
+Calendar._TT["CLOSE"] = "Κλείσιμο";
+Calendar._TT["TODAY"] = "Σήμερα";
+Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "D, d M";
+
+Calendar._TT["WK"] = "εβδ";
+
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-en.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-en.js
new file mode 100644
index 0000000..0dbde79
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-en.js
@@ -0,0 +1,127 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mihai_bazon at yahoo.com>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sunday",
+ "Monday",
+ "Tuesday",
+ "Wednesday",
+ "Thursday",
+ "Friday",
+ "Saturday",
+ "Sunday");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sun",
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat",
+ "Sun");
+
+// First day of the week. "0" means display Sunday first, "1" means display
+// Monday first, etc.
+Calendar._FD = 0;
+
+// full month names
+Calendar._MN = new Array
+("January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "May",
+ "Jun",
+ "Jul",
+ "Aug",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "About the calendar";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-)
+"For latest version visit: http://www.dynarch.com/projects/calendar/\n" +
+"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Date selection:\n" +
+"- Use the \xab, \xbb buttons to select year\n" +
+"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" +
+"- Hold mouse button on any of the above buttons for faster selection.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Time selection:\n" +
+"- Click on any of the time parts to increase it\n" +
+"- or Shift-click to decrease it\n" +
+"- or click and drag for faster selection.";
+
+Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)";
+Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)";
+Calendar._TT["GO_TODAY"] = "Go Today";
+Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)";
+Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)";
+Calendar._TT["SEL_DATE"] = "Select date";
+Calendar._TT["DRAG_TO_MOVE"] = "Drag to move";
+Calendar._TT["PART_TODAY"] = " (today)";
+
+// the following is to inform that "%s" is to be the first day of week
+// %s will be replaced with the day name.
+Calendar._TT["DAY_FIRST"] = "Display %s first";
+
+// This may be locale-dependent.  It specifies the week-end days, as an array
+// of comma-separated numbers.  The numbers are from 0 to 6: 0 means Sunday, 1
+// means Monday, etc.
+Calendar._TT["WEEKEND"] = "0,6";
+
+Calendar._TT["CLOSE"] = "Close";
+Calendar._TT["TODAY"] = "Today";
+Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
+Calendar._TT["TIME"] = "Time:";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-es.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-es.js
new file mode 100644
index 0000000..a8d52ea
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-es.js
@@ -0,0 +1,114 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo at infoiasi.ro>
+// Encoding: any
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Domingo",
+ "Lunes",
+ "Martes",
+ "Miircoles",
+ "Jueves",
+ "Viernes",
+ "Sabado",
+ "Domingo");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Dom",
+ "Lun",
+ "Mar",
+ "Mii",
+ "Jue",
+ "Vie",
+ "Sab",
+ "Dom");
+
+// full month names
+Calendar._MN = new Array
+("Enero",
+ "Febrero",
+ "Marzo",
+ "Abril",
+ "Mayo",
+ "Junio",
+ "Julio",
+ "Agosto",
+ "Septiembre",
+ "Octubre",
+ "Noviembre",
+ "Diciembre");
+
+// short month names
+Calendar._SMN = new Array
+("Ene",
+ "Feb",
+ "Mar",
+ "Abr",
+ "May",
+ "Jun",
+ "Jul",
+ "Ago",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dic");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Acerca del calendario";
+
+Calendar._TT["ABOUT"] =
+"Selector DHTML de Fecha/Hora\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Para conseguir la zltima versisn visite: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuido bajo licencia GNU LGPL. Visite http://gnu.org/licenses/lgpl.html para mas detalles." +
+"\n\n" +
+"Seleccisn de fecha:\n" +
+"- Use los botones \xab, \xbb para seleccionar el aqo\n" +
+"- Use los botones " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" +
+"- Mantenga pulsado el ratsn en cualquiera de estos botones para una seleccisn rapida.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Seleccisn de hora:\n" +
+"- Pulse en cualquiera de las partes de la hora para incrementarla\n" +
+"- s pulse las mayzsculas mientras hace clic para decrementarla\n" +
+"- s haga clic y arrastre el ratsn para una seleccisn mas rapida.";
+
+Calendar._TT["PREV_YEAR"] = "Aqo anterior (mantener para menu)";
+Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para menu)";
+Calendar._TT["GO_TODAY"] = "Ir a hoy";
+Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para menu)";
+Calendar._TT["NEXT_YEAR"] = "Aqo siguiente (mantener para menu)";
+Calendar._TT["SEL_DATE"] = "Seleccionar fecha";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover";
+Calendar._TT["PART_TODAY"] = " (hoy)";
+Calendar._TT["MON_FIRST"] = "Mostrar lunes primero";
+Calendar._TT["SUN_FIRST"] = "Mostrar domingo primero";
+Calendar._TT["CLOSE"] = "Cerrar";
+Calendar._TT["TODAY"] = "Hoy";
+Calendar._TT["TIME_PART"] = "(Mayzscula-)Clic o arrastre para cambiar valor";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y";
+
+Calendar._TT["WK"] = "sem";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-fi.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-fi.js
new file mode 100644
index 0000000..844ed6c
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-fi.js
@@ -0,0 +1,98 @@
+// ** I18N
+
+// Calendar FI language (Finnish, Suomi)
+// Author: Jarno Käyhkö, <gambler at phnet.fi>
+// Encoding: UTF-8
+// Distributed under the same terms as the calendar itself.
+
+// full day names
+Calendar._DN = new Array
+("Sunnuntai",
+ "Maanantai",
+ "Tiistai",
+ "Keskiviikko",
+ "Torstai",
+ "Perjantai",
+ "Lauantai",
+ "Sunnuntai");
+
+// short day names
+Calendar._SDN = new Array
+("Su",
+ "Ma",
+ "Ti",
+ "Ke",
+ "To",
+ "Pe",
+ "La",
+ "Su");
+
+// full month names
+Calendar._MN = new Array
+("Tammikuu",
+ "Helmikuu",
+ "Maaliskuu",
+ "Huhtikuu",
+ "Toukokuu",
+ "Kesäkuu",
+ "Heinäkuu",
+ "Elokuu",
+ "Syyskuu",
+ "Lokakuu",
+ "Marraskuu",
+ "Joulukuu");
+
+// short month names
+Calendar._SMN = new Array
+("Tam",
+ "Hel",
+ "Maa",
+ "Huh",
+ "Tou",
+ "Kes",
+ "Hei",
+ "Elo",
+ "Syy",
+ "Lok",
+ "Mar",
+ "Jou");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Tietoja kalenterista";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Uusin versio osoitteessa: http://dynarch.com/mishoo/calendar.epl\n" +
+"Julkaistu GNU LGPL lisenssin alaisuudessa. Lisätietoja osoitteessa http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Päivämäärä valinta:\n" +
+"- Käytä \xab, \xbb painikkeita valitaksesi vuosi\n" +
+"- Käytä " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " painikkeita valitaksesi kuukausi\n" +
+"- Pitämällä hiiren painiketta minkä tahansa yllä olevan painikkeen kohdalla, saat näkyviin valikon nopeampaan siirtymiseen.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Ajan valinta:\n" +
+"- Klikkaa kellonajan numeroita lisätäksesi aikaa\n" +
+"- tai pitämällä Shift-näppäintä pohjassa saat aikaa taaksepäin\n" +
+"- tai klikkaa ja pidä hiiren painike pohjassa sekä liikuta hiirtä muuttaaksesi aikaa nopeasti eteen- ja taaksepäin.";
+
+Calendar._TT["PREV_YEAR"] = "Edell. vuosi (paina hetki, näet valikon)";
+Calendar._TT["PREV_MONTH"] = "Edell. kuukausi (paina hetki, näet valikon)";
+Calendar._TT["GO_TODAY"] = "Siirry tähän päivään";
+Calendar._TT["NEXT_MONTH"] = "Seur. kuukausi (paina hetki, näet valikon)";
+Calendar._TT["NEXT_YEAR"] = "Seur. vuosi (paina hetki, näet valikon)";
+Calendar._TT["SEL_DATE"] = "Valitse päivämäärä";
+Calendar._TT["DRAG_TO_MOVE"] = "Siirrä kalenterin paikkaa";
+Calendar._TT["PART_TODAY"] = " (tänään)";
+Calendar._TT["MON_FIRST"] = "Näytä maanantai ensimmäisenä";
+Calendar._TT["SUN_FIRST"] = "Näytä sunnuntai ensimmäisenä";
+Calendar._TT["CLOSE"] = "Sulje";
+Calendar._TT["TODAY"] = "Tänään";
+Calendar._TT["TIME_PART"] = "(Shift-) Klikkaa tai liikuta muuttaaksesi aikaa";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%d.%m.%Y";
+
+Calendar._TT["WK"] = "Vko";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-fr.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-fr.js
new file mode 100644
index 0000000..5e9c6c0
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-fr.js
@@ -0,0 +1,86 @@
+// ** I18N
+Calendar._DN = new Array
+("Dimanche",
+ "Lundi",
+ "Mardi",
+ "Mercredi",
+ "Jeudi",
+ "Vendredi",
+ "Samedi",
+ "Dimanche");
+Calendar._MN = new Array
+("Janvier",
+ "Février",
+ "Mars",
+ "Avril",
+ "Mai",
+ "Juin",
+ "Juillet",
+ "Août",
+ "Septembre",
+ "Octobre",
+ "Novembre",
+ "Décembre");
+Calendar._SDN = new Array
+("Lun",
+ "Mar",
+ "Mer",
+ "Jeu",
+ "Thu",
+ "Ven",
+ "Sam",
+ "Dim");
+Calendar._SMN = new Array
+("Jan",
+ "Fev",
+ "Mar",
+ "Avr",
+ "Mai",
+ "Juin",
+ "Juil",
+ "Aout",
+ "Sep",
+ "Oct",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+
+Calendar._TT["INFO"] = "A propos du calendrier";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Heure Selecteur\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Pour la derniere version visitez: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribué par GNU LGPL.  Voir http://gnu.org/licenses/lgpl.html pour les details." +
+"\n\n" +
+"Selection de la date :\n" +
+"- Utiliser les bouttons \xab, \xbb  pour selectionner l\'annee\n" +
+"- Utiliser les bouttons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour selectionner les mois\n" +
+"- Garder la souris sur n'importe quels boutons pour un selection plus rapide";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selection de l\'heure:\n" +
+"- Cliquer sur heures ou minutes pour incrementer\n" +
+"- ou Maj-clic pour decrementer\n" +
+"- ou clic et glisser deplacer pour un selection plus rapide";
+
+Calendar._TT["TOGGLE"] = "Changer le premier jour de la semaine";
+Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)";
+Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)";
+Calendar._TT["GO_TODAY"] = "Atteindre date du jour";
+Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)";
+Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)";
+Calendar._TT["SEL_DATE"] = "Choisir une date";
+Calendar._TT["DRAG_TO_MOVE"] = "Déplacer";
+Calendar._TT["PART_TODAY"] = " (Aujourd'hui)";
+Calendar._TT["MON_FIRST"] = "Commencer par lundi";
+Calendar._TT["SUN_FIRST"] = "Commencer par dimanche";
+Calendar._TT["CLOSE"] = "Fermer";
+Calendar._TT["TODAY"] = "Aujourd'hui";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%y";
+Calendar._TT["TT_DATE_FORMAT"] = " %A %e %B %Y";
+
+Calendar._TT["WK"] = "sem";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hr-utf8.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hr-utf8.js
new file mode 100644
index 0000000..84eed90
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hr-utf8.js
@@ -0,0 +1,49 @@
+/* Croatian language file for the DHTML Calendar version 0.9.2 
+* Author Krunoslav Zubrinic <krunoslav.zubrinic at vip.hr>, June 2003.
+* Feel free to use this script under the terms of the GNU Lesser General
+* Public License, as long as you do not remove or alter this notice.
+*/
+Calendar._DN = new Array
+("Nedjelja",
+ "Ponedjeljak",
+ "Utorak",
+ "Srijeda",
+ "ÄŒetvrtak",
+ "Petak",
+ "Subota",
+ "Nedjelja");
+Calendar._MN = new Array
+("Siječanj",
+ "Veljača",
+ "Ožujak",
+ "Travanj",
+ "Svibanj",
+ "Lipanj",
+ "Srpanj",
+ "Kolovoz",
+ "Rujan",
+ "Listopad",
+ "Studeni",
+ "Prosinac");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Promjeni dan s kojim počinje tjedan";
+Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)";
+Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)";
+Calendar._TT["GO_TODAY"] = "Idi na tekući dan";
+Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)";
+Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)";
+Calendar._TT["SEL_DATE"] = "Izaberite datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije";
+Calendar._TT["PART_TODAY"] = " (today)";
+Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan";
+Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan";
+Calendar._TT["CLOSE"] = "Zatvori";
+Calendar._TT["TODAY"] = "Danas";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y";
+
+Calendar._TT["WK"] = "Tje";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hr.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hr.js
new file mode 100644
index 0000000..c93439e
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hr.js differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hu.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hu.js
new file mode 100644
index 0000000..64b38d6
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hu.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Vasárnap",
+ "Hétfõ",
+ "Kedd",
+ "Szerda",
+ "Csütörtök",
+ "Péntek",
+ "Szombat",
+ "Vasárnap");
+Calendar._MN = new Array
+("január",
+ "február",
+ "március",
+ "április",
+ "május",
+ "június",
+ "július",
+ "augusztus",
+ "szeptember",
+ "október",
+ "november",
+ "december");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "A hét elsõ napjának beállítása";
+Calendar._TT["PREV_YEAR"] = "Elõzõ év (tartsa nyomva a menühöz)";
+Calendar._TT["PREV_MONTH"] = "Elõzõ hónap (tartsa nyomva a menühöz)";
+Calendar._TT["GO_TODAY"] = "Mai napra ugrás";
+Calendar._TT["NEXT_MONTH"] = "Köv. hónap (tartsa nyomva a menühöz)";
+Calendar._TT["NEXT_YEAR"] = "Köv. év (tartsa nyomva a menühöz)";
+Calendar._TT["SEL_DATE"] = "Válasszon dátumot";
+Calendar._TT["DRAG_TO_MOVE"] = "Húzza a mozgatáshoz";
+Calendar._TT["PART_TODAY"] = " (ma)";
+Calendar._TT["MON_FIRST"] = "Hétfõ legyen a hét elsõ napja";
+Calendar._TT["SUN_FIRST"] = "Vasárnap legyen a hét elsõ napja";
+Calendar._TT["CLOSE"] = "Bezár";
+Calendar._TT["TODAY"] = "Ma";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "M d, D";
+
+Calendar._TT["WK"] = "hét";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-it.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-it.js
new file mode 100644
index 0000000..bb43449
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-it.js
@@ -0,0 +1,79 @@
+// ** I18N
+Calendar._DN = new Array
+("Domenica",
+ "Lunedì",
+ "Martedì",
+ "Mercoledì",
+ "Giovedì",
+ "Venerdì",
+ "Sabato",
+ "Domenica");
+Calendar._MN = new Array
+("Gennaio",
+ "Febbraio",
+ "Marzo",
+ "Aprile",
+ "Maggio",
+ "Giugno",
+ "Luglio",
+ "Agosto",
+ "Settembre",
+ "Ottobre",
+ "Novembre",
+ "Dicembre");
+
+// short month names
+Calendar._SMN = new Array
+("Gen",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Mag",
+ "Giu",
+ "Lug",
+ "Ago",
+ "Set",
+ "Ott",
+ "Nov",
+ "Dic");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "a proposito del calendario";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Per le ultime versioni vai a: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuito su licenza GNU LGPL.  Vedi http://gnu.org/licenses/lgpl.html per i dettagli." +
+"\n\n" +
+"selezione della data:\n" +
+"- Usa i bottoni \xab, \xbb per selezionare l'anno\n" +
+"- Usa i bottoni " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per selezionare il mese\n" +
+"- Utilizza il mouse per una selezione rapida.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"selezione dell'ora:\n" +
+"- Clicca sull'ora visualizzata per aumentarla\n" +
+"- o Shift-click per diminuirla\n" +
+"- o click a trascina per la selezione rapida.";
+
+
+Calendar._TT["TOGGLE"] = "Modifica il primo giorno della settimana";
+Calendar._TT["PREV_YEAR"] = "Anno prec. (tieni premuto per menu)";
+Calendar._TT["PREV_MONTH"] = "Mese prec. (tieni premuto per menu)";
+Calendar._TT["GO_TODAY"] = "Vai a oggi";
+Calendar._TT["NEXT_MONTH"] = "Mese succ. (tieni premuto per menu)";
+Calendar._TT["NEXT_YEAR"] = "Anno succ. (tieni premuto per menu)";
+Calendar._TT["SEL_DATE"] = "Seleziona data";
+Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostare";
+Calendar._TT["PART_TODAY"] = " (oggi)";
+Calendar._TT["MON_FIRST"] = "Parti da lunedì";
+Calendar._TT["SUN_FIRST"] = "Parti da domenica";
+Calendar._TT["CLOSE"] = "Chiudi";
+Calendar._TT["TODAY"] = "Oggi";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b ";
+
+Calendar._TT["WK"] = "Setti";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-jp.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-jp.js
new file mode 100644
index 0000000..3bca7eb
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-jp.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("“ú",
+ "ŒŽ",
+ "‰Î",
+ "…",
+ "–Ø",
+ "‹à",
+ "“y",
+ "“ú");
+Calendar._MN = new Array
+("1ŒŽ",
+ "2ŒŽ",
+ "3ŒŽ",
+ "4ŒŽ",
+ "5ŒŽ",
+ "6ŒŽ",
+ "7ŒŽ",
+ "8ŒŽ",
+ "9ŒŽ",
+ "10ŒŽ",
+ "11ŒŽ",
+ "12ŒŽ");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "T‚̍ŏ‰‚Ì—j“ú‚ðØ‚è‘Ö‚¦";
+Calendar._TT["PREV_YEAR"] = "‘O”N";
+Calendar._TT["PREV_MONTH"] = "‘OŒŽ";
+Calendar._TT["GO_TODAY"] = "¡“ú";
+Calendar._TT["NEXT_MONTH"] = "—‚ŒŽ";
+Calendar._TT["NEXT_YEAR"] = "—‚”N";
+Calendar._TT["SEL_DATE"] = "“ú•t‘I‘ð";
+Calendar._TT["DRAG_TO_MOVE"] = "ƒEƒBƒ“ƒhƒE‚̈ړ®";
+Calendar._TT["PART_TODAY"] = " (¡“ú)";
+Calendar._TT["MON_FIRST"] = "ŒŽ—j“ú‚ðæ“ª‚É";
+Calendar._TT["SUN_FIRST"] = "“ú—j“ú‚ðæ“ª‚É";
+Calendar._TT["CLOSE"] = "•Â‚¶‚é";
+Calendar._TT["TODAY"] = "¡“ú";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "%mŒŽ %d“ú (%a)";
+
+Calendar._TT["WK"] = "T";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ko-utf8.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ko-utf8.js
new file mode 100644
index 0000000..d71687a
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ko-utf8.js
@@ -0,0 +1,120 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo at infoiasi.ro>
+// Translation: Yourim Yi <yyi at yourim.net>
+// Encoding: EUC-KR
+// lang : ko
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+
+Calendar._DN = new Array
+("일요일",
+ "월요일",
+ "화요일",
+ "수요일",
+ "목요일",
+ "금요일",
+ "토요일",
+ "일요일");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("일",
+ "ì›”",
+ "í™”",
+ "수",
+ "목",
+ "금",
+ "토",
+ "일");
+
+// full month names
+Calendar._MN = new Array
+("1ì›”",
+ "2ì›”",
+ "3ì›”",
+ "4ì›”",
+ "5ì›”",
+ "6ì›”",
+ "7ì›”",
+ "8ì›”",
+ "9ì›”",
+ "10ì›”",
+ "11ì›”",
+ "12ì›”");
+
+// short month names
+Calendar._SMN = new Array
+("1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "calendar 에 대해서";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"\n"+
+"최신 버전을 받으시려면 http://dynarch.com/mishoo/calendar.epl 에 방문하세요\n" +
+"\n"+
+"GNU LGPL 라이센스로 배포됩니다. \n"+
+"라이센스에 대한 자세한 내용은 http://gnu.org/licenses/lgpl.html 을 읽으세요." +
+"\n\n" +
+"날짜 선택:\n" +
+"- 연도를 선택하려면 \xab, \xbb 버튼을 사용합니다\n" +
+"- 달을 선택하려면 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 버튼을 누르세요\n" +
+"- 계속 누르고 있으면 위 값들을 빠르게 선택하실 수 있습니다.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"시간 선택:\n" +
+"- 마우스로 누르면 시간이 증가합니다\n" +
+"- Shift 키와 함께 누르면 감소합니다\n" +
+"- 누른 상태에서 마우스를 움직이면 좀 더 빠르게 값이 변합니다.\n";
+
+Calendar._TT["PREV_YEAR"] = "지난 해 (길게 누르면 목록)";
+Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목록)";
+Calendar._TT["GO_TODAY"] = "오늘 날짜로";
+Calendar._TT["NEXT_MONTH"] = "다음 달 (길게 누르면 목록)";
+Calendar._TT["NEXT_YEAR"] = "다음 해 (길게 누르면 목록)";
+Calendar._TT["SEL_DATE"] = "날짜를 선택하세요";
+Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 이동 하세요";
+Calendar._TT["PART_TODAY"] = " (오늘)";
+Calendar._TT["MON_FIRST"] = "월요일을 한 주의 시작 요일로";
+Calendar._TT["SUN_FIRST"] = "일요일을 한 주의 시작 요일로";
+Calendar._TT["CLOSE"] = "닫기";
+Calendar._TT["TODAY"] = "오늘";
+Calendar._TT["TIME_PART"] = "(Shift-)클릭 또는 드래그 하세요";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
+
+Calendar._TT["WK"] = "주";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ko.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ko.js
new file mode 100644
index 0000000..b845aa5
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ko.js
@@ -0,0 +1,120 @@
+// ** I18N
+
+// Calendar EN language
+// Author: Mihai Bazon, <mishoo at infoiasi.ro>
+// Translation: Yourim Yi <yyi at yourim.net>
+// Encoding: EUC-KR
+// lang : ko
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+
+Calendar._DN = new Array
+("ÀÏ¿äÀÏ",
+ "¿ù¿äÀÏ",
+ "È­¿äÀÏ",
+ "¼ö¿äÀÏ",
+ "¸ñ¿äÀÏ",
+ "±Ý¿äÀÏ",
+ "Åä¿äÀÏ",
+ "ÀÏ¿äÀÏ");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("ÀÏ",
+ "¿ù",
+ "È­",
+ "¼ö",
+ "¸ñ",
+ "±Ý",
+ "Åä",
+ "ÀÏ");
+
+// full month names
+Calendar._MN = new Array
+("1¿ù",
+ "2¿ù",
+ "3¿ù",
+ "4¿ù",
+ "5¿ù",
+ "6¿ù",
+ "7¿ù",
+ "8¿ù",
+ "9¿ù",
+ "10¿ù",
+ "11¿ù",
+ "12¿ù");
+
+// short month names
+Calendar._SMN = new Array
+("1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "calendar ¿¡ ´ëÇؼ­";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"\n"+
+"ÃֽŠ¹öÀüÀ» ¹ÞÀ¸½Ã·Á¸é http://dynarch.com/mishoo/calendar.epl ¿¡ ¹æ¹®Çϼ¼¿ä\n" +
+"\n"+
+"GNU LGPL ¶óÀ̼¾½º·Î ¹èÆ÷µË´Ï´Ù. \n"+
+"¶óÀ̼¾½º¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº http://gnu.org/licenses/lgpl.html À» ÀÐÀ¸¼¼¿ä." +
+"\n\n" +
+"³¯Â¥ ¼±ÅÃ:\n" +
+"- ¿¬µµ¸¦ ¼±ÅÃÇÏ·Á¸é \xab, \xbb ¹öÆ°À» »ç¿ëÇÕ´Ï´Ù\n" +
+"- ´ÞÀ» ¼±ÅÃÇÏ·Á¸é " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ¹öÆ°À» ´©¸£¼¼¿ä\n" +
+"- °è¼Ó ´©¸£°í ÀÖÀ¸¸é À§ °ªµéÀ» ºü¸£°Ô ¼±ÅÃÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"½Ã°£ ¼±ÅÃ:\n" +
+"- ¸¶¿ì½º·Î ´©¸£¸é ½Ã°£ÀÌ Áõ°¡ÇÕ´Ï´Ù\n" +
+"- Shift Å°¿Í ÇÔ²² ´©¸£¸é °¨¼ÒÇÕ´Ï´Ù\n" +
+"- ´©¸¥ »óÅ¿¡¼­ ¸¶¿ì½º¸¦ ¿òÁ÷À̸é Á» ´õ ºü¸£°Ô °ªÀÌ º¯ÇÕ´Ï´Ù.\n";
+
+Calendar._TT["PREV_YEAR"] = "Áö³­ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["PREV_MONTH"] = "Áö³­ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["GO_TODAY"] = "¿À´Ã ³¯Â¥·Î";
+Calendar._TT["NEXT_MONTH"] = "´ÙÀ½ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["NEXT_YEAR"] = "´ÙÀ½ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)";
+Calendar._TT["SEL_DATE"] = "³¯Â¥¸¦ ¼±ÅÃÇϼ¼¿ä";
+Calendar._TT["DRAG_TO_MOVE"] = "¸¶¿ì½º µå·¡±×·Î À̵¿ Çϼ¼¿ä";
+Calendar._TT["PART_TODAY"] = " (¿À´Ã)";
+Calendar._TT["MON_FIRST"] = "¿ù¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î";
+Calendar._TT["SUN_FIRST"] = "ÀÏ¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î";
+Calendar._TT["CLOSE"] = "´Ý±â";
+Calendar._TT["TODAY"] = "¿À´Ã";
+Calendar._TT["TIME_PART"] = "(Shift-)Ŭ¸¯ ¶Ç´Â µå·¡±× Çϼ¼¿ä";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]";
+
+Calendar._TT["WK"] = "ÁÖ";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-lt-utf8.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-lt-utf8.js
new file mode 100644
index 0000000..c3dca8d
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-lt-utf8.js
@@ -0,0 +1,114 @@
+// ** I18N
+
+// Calendar LT language
+// Author: Martynas Majeris, <martynas at solmetra.lt>
+// Encoding: UTF-8
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sekmadienis",
+ "Pirmadienis",
+ "Antradienis",
+ "Trečiadienis",
+ "Ketvirtadienis",
+ "Pentadienis",
+ "Šeštadienis",
+ "Sekmadienis");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sek",
+ "Pir",
+ "Ant",
+ "Tre",
+ "Ket",
+ "Pen",
+ "Šeš",
+ "Sek");
+
+// full month names
+Calendar._MN = new Array
+("Sausis",
+ "Vasaris",
+ "Kovas",
+ "Balandis",
+ "Gegužė",
+ "Birželis",
+ "Liepa",
+ "Rugpjūtis",
+ "RugsÄ—jis",
+ "Spalis",
+ "Lapkritis",
+ "Gruodis");
+
+// short month names
+Calendar._SMN = new Array
+("Sau",
+ "Vas",
+ "Kov",
+ "Bal",
+ "Geg",
+ "Bir",
+ "Lie",
+ "Rgp",
+ "Rgs",
+ "Spa",
+ "Lap",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Apie kalendorių";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"NaujausiÄ… versijÄ… rasite: http://dynarch.com/mishoo/calendar.epl\n" +
+"Platinamas pagal GNU LGPL licencijÄ…. Aplankykite http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Datos pasirinkimas:\n" +
+"- Metų pasirinkimas: \xab, \xbb\n" +
+"- MÄ—nesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- Nuspauskite ir laikykite pelės klavišą greitesniam pasirinkimui.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Laiko pasirinkimas:\n" +
+"- Spustelkite ant valandų arba minučių - skaičius padidės vienetu.\n" +
+"- Jei spausite kartu su Shift, skaičius sumažės.\n" +
+"- Greitam pasirinkimui spustelkite ir pajudinkite pelÄ™.";
+
+Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)";
+Calendar._TT["PREV_MONTH"] = "Ankstesnis mÄ—nuo (laikykite, jei norite meniu)";
+Calendar._TT["GO_TODAY"] = "Pasirinkti Å¡iandienÄ…";
+Calendar._TT["NEXT_MONTH"] = "Kitas mÄ—nuo (laikykite, jei norite meniu)";
+Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)";
+Calendar._TT["SEL_DATE"] = "Pasirinkite datÄ…";
+Calendar._TT["DRAG_TO_MOVE"] = "Tempkite";
+Calendar._TT["PART_TODAY"] = " (Å¡iandien)";
+Calendar._TT["MON_FIRST"] = "Pirma savaitÄ—s diena - pirmadienis";
+Calendar._TT["SUN_FIRST"] = "Pirma savaitÄ—s diena - sekmadienis";
+Calendar._TT["CLOSE"] = "Uždaryti";
+Calendar._TT["TODAY"] = "Å iandien";
+Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d";
+
+Calendar._TT["WK"] = "sav";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-lt.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-lt.js
new file mode 100644
index 0000000..1b614b8
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-lt.js
@@ -0,0 +1,114 @@
+// ** I18N
+
+// Calendar LT language
+// Author: Martynas Majeris, <martynas at solmetra.lt>
+// Encoding: Windows-1257
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("Sekmadienis",
+ "Pirmadienis",
+ "Antradienis",
+ "Treèiadienis",
+ "Ketvirtadienis",
+ "Pentadienis",
+ "Ðeðtadienis",
+ "Sekmadienis");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+
+// short day names
+Calendar._SDN = new Array
+("Sek",
+ "Pir",
+ "Ant",
+ "Tre",
+ "Ket",
+ "Pen",
+ "Ðeð",
+ "Sek");
+
+// full month names
+Calendar._MN = new Array
+("Sausis",
+ "Vasaris",
+ "Kovas",
+ "Balandis",
+ "Geguþë",
+ "Birþelis",
+ "Liepa",
+ "Rugpjûtis",
+ "Rugsëjis",
+ "Spalis",
+ "Lapkritis",
+ "Gruodis");
+
+// short month names
+Calendar._SMN = new Array
+("Sau",
+ "Vas",
+ "Kov",
+ "Bal",
+ "Geg",
+ "Bir",
+ "Lie",
+ "Rgp",
+ "Rgs",
+ "Spa",
+ "Lap",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Apie kalendoriø";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Naujausià versijà rasite: http://dynarch.com/mishoo/calendar.epl\n" +
+"Platinamas pagal GNU LGPL licencijà. Aplankykite http://gnu.org/licenses/lgpl.html" +
+"\n\n" +
+"Datos pasirinkimas:\n" +
+"- Metø pasirinkimas: \xab, \xbb\n" +
+"- Mënesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- Nuspauskite ir laikykite pelës klaviðà greitesniam pasirinkimui.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Laiko pasirinkimas:\n" +
+"- Spustelkite ant valandø arba minuèiø - skaièus padidës vienetu.\n" +
+"- Jei spausite kartu su Shift, skaièius sumaþës.\n" +
+"- Greitam pasirinkimui spustelkite ir pajudinkite pelæ.";
+
+Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)";
+Calendar._TT["PREV_MONTH"] = "Ankstesnis mënuo (laikykite, jei norite meniu)";
+Calendar._TT["GO_TODAY"] = "Pasirinkti ðiandienà";
+Calendar._TT["NEXT_MONTH"] = "Kitas mënuo (laikykite, jei norite meniu)";
+Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)";
+Calendar._TT["SEL_DATE"] = "Pasirinkite datà";
+Calendar._TT["DRAG_TO_MOVE"] = "Tempkite";
+Calendar._TT["PART_TODAY"] = " (ðiandien)";
+Calendar._TT["MON_FIRST"] = "Pirma savaitës diena - pirmadienis";
+Calendar._TT["SUN_FIRST"] = "Pirma savaitës diena - sekmadienis";
+Calendar._TT["CLOSE"] = "Uþdaryti";
+Calendar._TT["TODAY"] = "Ðiandien";
+Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d";
+
+Calendar._TT["WK"] = "sav";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-nl.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-nl.js
new file mode 100644
index 0000000..2ddc68b
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-nl.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Zondag",
+ "Maandag",
+ "Dinsdag",
+ "Woensdag",
+ "Donderdag",
+ "Vrijdag",
+ "Zaterdag",
+ "Zondag");
+Calendar._MN = new Array
+("Januari",
+ "Februari",
+ "Maart",
+ "April",
+ "Mei",
+ "Juni",
+ "Juli",
+ "Augustus",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag";
+Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)";
+Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)";
+Calendar._TT["GO_TODAY"] = "Ga naar Vandaag";
+Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)";
+Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)";
+Calendar._TT["SEL_DATE"] = "Selecteer datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen";
+Calendar._TT["PART_TODAY"] = " (vandaag)";
+Calendar._TT["MON_FIRST"] = "Toon Maandag eerst";
+Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst";
+Calendar._TT["CLOSE"] = "Sluiten";
+Calendar._TT["TODAY"] = "Vandaag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "DD, d MM";
+
+Calendar._TT["WK"] = "wk";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-no.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-no.js
new file mode 100644
index 0000000..3325e34
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-no.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Søndag",
+ "Mandag",
+ "Tirsdag",
+ "Onsdag",
+ "Torsdag",
+ "Fredag",
+ "Lørdag",
+ "Søndag");
+Calendar._MN = new Array
+("Januar",
+ "Februar",
+ "Mars",
+ "April",
+ "Mai",
+ "Juni",
+ "Juli",
+ "August",
+ "September",
+ "Oktober",
+ "November",
+ "Desember");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Skift første ukedag";
+Calendar._TT["PREV_YEAR"] = "Et år tilbake (hold for meny)";
+Calendar._TT["PREV_MONTH"] = "En måned tilbake (hold for meny)";
+Calendar._TT["GO_TODAY"] = "Gå til i dag";
+Calendar._TT["NEXT_MONTH"] = "En måned fram (hold for meny)";
+Calendar._TT["NEXT_YEAR"] = "Et år fram (hold for meny)";
+Calendar._TT["SEL_DATE"] = "Velg dag";
+Calendar._TT["DRAG_TO_MOVE"] = "Dra vinduet";
+Calendar._TT["PART_TODAY"] = " (i dag)";
+Calendar._TT["MON_FIRST"] = "Vis mandag først";
+Calendar._TT["SUN_FIRST"] = "Vis søndag først";
+Calendar._TT["CLOSE"] = "Lukk vinduet";
+Calendar._TT["TODAY"] = "I dag";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D d. M, y";
+
+Calendar._TT["WK"] = "wk";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pl-utf8.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pl-utf8.js
new file mode 100644
index 0000000..819281f
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pl-utf8.js
@@ -0,0 +1,93 @@
+// ** I18N
+
+// Calendar PL language
+// Author: Dariusz Pietrzak, <eyck at ghost.anime.pl>
+// Author: Janusz Piwowarski, <jpiw at go2.pl>
+// Encoding: utf-8
+// Distributed under the same terms as the calendar itself.
+
+Calendar._DN = new Array
+("Niedziela",
+ "Poniedziałek",
+ "Wtorek",
+ "Åšroda",
+ "Czwartek",
+ "PiÄ…tek",
+ "Sobota",
+ "Niedziela");
+Calendar._SDN = new Array
+("Nie",
+ "Pn",
+ "Wt",
+ "Åšr",
+ "Cz",
+ "Pt",
+ "So",
+ "Nie");
+Calendar._MN = new Array
+("Styczeń",
+ "Luty",
+ "Marzec",
+ "Kwiecień",
+ "Maj",
+ "Czerwiec",
+ "Lipiec",
+ "Sierpień",
+ "Wrzesień",
+ "Październik",
+ "Listopad",
+ "Grudzień");
+Calendar._SMN = new Array
+("Sty",
+ "Lut",
+ "Mar",
+ "Kwi",
+ "Maj",
+ "Cze",
+ "Lip",
+ "Sie",
+ "Wrz",
+ "Paź",
+ "Lis",
+ "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendarzu";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Aby pobrać najnowszą wersję, odwiedź: http://dynarch.com/mishoo/calendar.epl\n" +
+"Dostępny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html." +
+"\n\n" +
+"Wybór daty:\n" +
+"- Użyj przycisków \xab, \xbb by wybrać rok\n" +
+"- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybrać miesiąc\n" +
+"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Wybór czasu:\n" +
+"- Kliknij na jednym z pól czasu by zwiększyć jego wartość\n" +
+"- lub kliknij trzymając Shift by zmiejszyć jego wartość\n" +
+"- lub kliknij i przeciÄ…gnij dla szybszego wyboru.";
+
+//Calendar._TT["TOGGLE"] = "Zmień pierwszy dzień tygodnia";
+Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)";
+Calendar._TT["PREV_MONTH"] = "Poprzedni miesiÄ…c (przytrzymaj dla menu)";
+Calendar._TT["GO_TODAY"] = "Idź do dzisiaj";
+Calendar._TT["NEXT_MONTH"] = "Następny miesiąc (przytrzymaj dla menu)";
+Calendar._TT["NEXT_YEAR"] = "Następny rok (przytrzymaj dla menu)";
+Calendar._TT["SEL_DATE"] = "Wybierz datÄ™";
+Calendar._TT["DRAG_TO_MOVE"] = "Przeciągnij by przesunąć";
+Calendar._TT["PART_TODAY"] = " (dzisiaj)";
+Calendar._TT["MON_FIRST"] = "Wyświetl poniedziałek jako pierwszy";
+Calendar._TT["SUN_FIRST"] = "Wyświetl niedzielę jako pierwszą";
+Calendar._TT["CLOSE"] = "Zamknij";
+Calendar._TT["TODAY"] = "Dzisiaj";
+Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciągnij by zmienić wartość";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A";
+
+Calendar._TT["WK"] = "ty";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pl.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pl.js
new file mode 100644
index 0000000..e49970b
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pl.js
@@ -0,0 +1,56 @@
+// ** I18N
+// Calendar PL language
+// Author: Artur Filipiak, <imagen at poczta.fm>
+// January, 2004
+// Encoding: UTF-8
+Calendar._DN = new Array
+("Niedziela", "Poniedziałek", "Wtorek", "Środa", "Czwartek", "Piątek", "Sobota", "Niedziela");
+
+Calendar._SDN = new Array
+("N", "Pn", "Wt", "Åšr", "Cz", "Pt", "So", "N");
+
+Calendar._MN = new Array
+("Styczeń", "Luty", "Marzec", "Kwiecień", "Maj", "Czerwiec", "Lipiec", "Sierpień", "Wrzesień", "Październik", "Listopad", "Grudzień");
+
+Calendar._SMN = new Array
+("Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendarzu";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Wybór daty:\n" +
+"- aby wybrać rok użyj przycisków \xab, \xbb\n" +
+"- aby wybrać miesiąc użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" +
+"- aby przyspieszyć wybór przytrzymaj wciśnięty przycisk myszy nad ww. przyciskami.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Wybór czasu:\n" +
+"- aby zwiększyć wartość kliknij na dowolnym elemencie selekcji czasu\n" +
+"- aby zmniejszyć wartość użyj dodatkowo klawisza Shift\n" +
+"- możesz również poruszać myszkę w lewo i prawo wraz z wciśniętym lewym klawiszem.";
+
+Calendar._TT["PREV_YEAR"] = "Poprz. rok (przytrzymaj dla menu)";
+Calendar._TT["PREV_MONTH"] = "Poprz. miesiÄ…c (przytrzymaj dla menu)";
+Calendar._TT["GO_TODAY"] = "Pokaż dziś";
+Calendar._TT["NEXT_MONTH"] = "Nast. miesiÄ…c (przytrzymaj dla menu)";
+Calendar._TT["NEXT_YEAR"] = "Nast. rok (przytrzymaj dla menu)";
+Calendar._TT["SEL_DATE"] = "Wybierz datÄ™";
+Calendar._TT["DRAG_TO_MOVE"] = "Przesuń okienko";
+Calendar._TT["PART_TODAY"] = " (dziÅ›)";
+Calendar._TT["MON_FIRST"] = "Pokaż Poniedziałek jako pierwszy";
+Calendar._TT["SUN_FIRST"] = "Pokaż Niedzielę jako pierwszą";
+Calendar._TT["CLOSE"] = "Zamknij";
+Calendar._TT["TODAY"] = "DziÅ›";
+Calendar._TT["TIME_PART"] = "(Shift-)klik | drag, aby zmienić wartość";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y.%m.%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "wk";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pt.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pt.js
new file mode 100644
index 0000000..1184dfa
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pt.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Domingo",
+ "Segunda",
+ "Terça",
+ "Quarta",
+ "Quinta",
+ "Sexta",
+ "Sábado",
+ "Domingo");
+Calendar._MN = new Array
+("Janeiro",
+ "Fevereiro",
+ "Março",
+ "Abril",
+ "Maio",
+ "Junho",
+ "Julho",
+ "Agosto",
+ "Setembro",
+ "Outubro",
+ "Novembro",
+ "Dezembro");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Trocar o primeiro dia da semana";
+Calendar._TT["PREV_YEAR"] = "Ano Anterior (mantenha para menu)";
+Calendar._TT["PREV_MONTH"] = "Mês Anterior (mantenha para menu)";
+Calendar._TT["GO_TODAY"] = "Ir para hoje";
+Calendar._TT["NEXT_MONTH"] = "Próximo Mês (mantenha para menu)";
+Calendar._TT["NEXT_YEAR"] = "Próximo Ano (mantenha para menu)";
+Calendar._TT["SEL_DATE"] = "Escolha Data";
+Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover";
+Calendar._TT["PART_TODAY"] = " (hoje)";
+Calendar._TT["MON_FIRST"] = "Mostrar Segunda primeiro";
+Calendar._TT["SUN_FIRST"] = "Mostrar Domingo primeiro";
+Calendar._TT["CLOSE"] = "Fechar";
+Calendar._TT["TODAY"] = "Hoje";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "a-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "sm";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ro.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ro.js
new file mode 100644
index 0000000..f4926f0
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ro.js
@@ -0,0 +1,66 @@
+// ** I18N
+Calendar._DN = new Array
+("Duminică",
+ "Luni",
+ "Marţi",
+ "Miercuri",
+ "Joi",
+ "Vineri",
+ "Sâmbătă",
+ "Duminică");
+Calendar._SDN_len = 2;
+Calendar._MN = new Array
+("Ianuarie",
+ "Februarie",
+ "Martie",
+ "Aprilie",
+ "Mai",
+ "Iunie",
+ "Iulie",
+ "August",
+ "Septembrie",
+ "Octombrie",
+ "Noiembrie",
+ "Decembrie");
+
+// tooltips
+Calendar._TT = {};
+
+Calendar._TT["INFO"] = "Despre calendar";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Pentru ultima versiune vizitaţi: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuit sub GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details." +
+"\n\n" +
+"Selecţia datei:\n" +
+"- Folosiţi butoanele \xab, \xbb pentru a selecta anul\n" +
+"- Folosiţi butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" +
+"- Tineţi butonul mouse-ului apăsat pentru selecţie mai rapidă.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selecţia orei:\n" +
+"- Click pe ora sau minut pentru a mări valoarea cu 1\n" +
+"- Sau Shift-Click pentru a micÅŸora valoarea cu 1\n" +
+"- Sau Click ÅŸi drag pentru a selecta mai repede.";
+
+Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)";
+Calendar._TT["PREV_MONTH"] = "Luna precedentă (lung pt menu)";
+Calendar._TT["GO_TODAY"] = "Data de azi";
+Calendar._TT["NEXT_MONTH"] = "Luna următoare (lung pt menu)";
+Calendar._TT["NEXT_YEAR"] = "Anul următor (lung pt menu)";
+Calendar._TT["SEL_DATE"] = "Selectează data";
+Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a miÅŸca";
+Calendar._TT["PART_TODAY"] = " (astăzi)";
+Calendar._TT["DAY_FIRST"] = "Afişează %s prima zi";
+Calendar._TT["WEEKEND"] = "0,6";
+Calendar._TT["CLOSE"] = "ÃŽnchide";
+Calendar._TT["TODAY"] = "Astăzi";
+Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B";
+
+Calendar._TT["WK"] = "spt";
+Calendar._TT["TIME"] = "Ora:";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ru.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ru.js
new file mode 100644
index 0000000..459cec5
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ru.js
@@ -0,0 +1,45 @@
+// ** I18N
+Calendar._DN = new Array
+("Âîñêðåñåíüå",
+ "Ïîíåäåëüíèê",
+ "Âòîðíèê",
+ "Ñðåäà",
+ "×åòâåðã",
+ "Ïÿòíèöà",
+ "Ñóááîòà",
+ "Âîñêðåñåíüå");
+Calendar._MN = new Array
+("ßíâàðü",
+ "Ôåâðàëü",
+ "Ìàðò",
+ "Àïðåëü",
+ "Ìàé",
+ "Èþíü",
+ "Èþëü",
+ "Àâãóñò",
+ "Ñåíòÿáðü",
+ "Îêòÿáðü",
+ "Íîÿáðü",
+ "Äåêàáðü");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Ñìåíèòü äåíü íà÷àëà íåäåëè (ÏÍ/ÂÑ)";
+Calendar._TT["PREV_YEAR"] = "Ïðåä. ãîä (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["PREV_MONTH"] = "Ïðåä. ìåñÿö (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["GO_TODAY"] = "Íà ñåãîäíÿ";
+Calendar._TT["NEXT_MONTH"] = "Ñëåä. ìåñÿö (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["NEXT_YEAR"] = "Ñëåä. ãîä (óäåðæèâàòü äëÿ ìåíþ)";
+Calendar._TT["SEL_DATE"] = "Âûáðàòü äàòó";
+Calendar._TT["DRAG_TO_MOVE"] = "Ïåðåòàùèòü";
+Calendar._TT["PART_TODAY"] = " (ñåãîäíÿ)";
+Calendar._TT["MON_FIRST"] = "Ïîêàçàòü ïîíåäåëüíèê ïåðâûì";
+Calendar._TT["SUN_FIRST"] = "Ïîêàçàòü âîñêðåñåíüå ïåðâûì";
+Calendar._TT["CLOSE"] = "Çàêðûòü";
+Calendar._TT["TODAY"] = "Ñåãîäíÿ";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "íåä";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-si.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-si.js
new file mode 100644
index 0000000..356efb5
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-si.js
@@ -0,0 +1,94 @@
+/* Slovenian language file for the DHTML Calendar version 0.9.2 
+* Author David Milost <mercy at volja.net>, January 2004.
+* Feel free to use this script under the terms of the GNU Lesser General
+* Public License, as long as you do not remove or alter this notice.
+*/
+ // full day names
+Calendar._DN = new Array
+("Nedelja",
+ "Ponedeljek",
+ "Torek",
+ "Sreda",
+ "ÄŒetrtek",
+ "Petek",
+ "Sobota",
+ "Nedelja");
+ // short day names
+ Calendar._SDN = new Array
+("Ned",
+ "Pon",
+ "Tor",
+ "Sre",
+ "ÄŒet",
+ "Pet",
+ "Sob",
+ "Ned");
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Maj",
+ "Jun",
+ "Jul",
+ "Avg",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dec");
+  // full month names
+Calendar._MN = new Array
+("Januar",
+ "Februar",
+ "Marec",
+ "April",
+ "Maj",
+ "Junij",
+ "Julij",
+ "Avgust",
+ "September",
+ "Oktober",
+ "November",
+ "December");
+
+// tooltips
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O koledarju";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Za zadnjo verzijo pojdine na naslov: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuirano pod GNU LGPL.  Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." +
+"\n\n" +
+"Izbor datuma:\n" +
+"- Uporabite \xab, \xbb gumbe za izbor leta\n" +
+"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" +
+"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Izbor ćasa:\n" +
+"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" +
+"- ali Shift-click za zmanj. le-tega\n" +
+"- ali kliknite in povlecite za hiter izbor.";
+
+Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden";
+Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)";
+Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)";
+Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan";
+Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)";
+Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)";
+Calendar._TT["SEL_DATE"] = "Izberite datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije";
+Calendar._TT["PART_TODAY"] = " (danes)";
+Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan";
+Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan";
+Calendar._TT["CLOSE"] = "Zapri";
+Calendar._TT["TODAY"] = "Danes";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e";
+
+Calendar._TT["WK"] = "Ted";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sk.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sk.js
new file mode 100644
index 0000000..9b2dfc3
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sk.js
@@ -0,0 +1,99 @@
+// ** I18N
+
+// Calendar SK language
+// Author: Peter Valach (pvalach at gmx.net)
+// Encoding: utf-8
+// Last update: 2003/10/29
+// Distributed under the same terms as the calendar itself.
+
+// full day names
+Calendar._DN = new Array
+("NedeÄľa",
+ "Pondelok",
+ "Utorok",
+ "Streda",
+ "Ĺ tvrtok",
+ "Piatok",
+ "Sobota",
+ "NedeÄľa");
+
+// short day names
+Calendar._SDN = new Array
+("Ned",
+ "Pon",
+ "Uto",
+ "Str",
+ "Ĺ tv",
+ "Pia",
+ "Sob",
+ "Ned");
+
+// full month names
+Calendar._MN = new Array
+("Január",
+ "Február",
+ "Marec",
+ "AprĂ­l",
+ "Máj",
+ "JÄ‚ÅŸn",
+ "JÄ‚ÅŸl",
+ "August",
+ "September",
+ "OktĂłber",
+ "November",
+ "December");
+
+// short month names
+Calendar._SMN = new Array
+("Jan",
+ "Feb",
+ "Mar",
+ "Apr",
+ "Máj",
+ "JÄ‚ÅŸn",
+ "JÄ‚ÅŸl",
+ "Aug",
+ "Sep",
+ "Okt",
+ "Nov",
+ "Dec");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "O kalendári";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" +
+"Poslednú verziu nájdete na: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuované pod GNU LGPL.  Viď http://gnu.org/licenses/lgpl.html pre detaily." +
+"\n\n" +
+"Výber dátumu:\n" +
+"- Použite tlačidlá \xab, \xbb pre výber roku\n" +
+"- Použite tlačidlá " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre výber mesiaca\n" +
+"- Ak ktorékoľvek z týchto tlačidiel podržíte dlhšie, zobrazí sa rýchly výber.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Výber času:\n" +
+"- Kliknutie na niektorú položku času ju zvýši\n" +
+"- Shift-klik ju znĂ­Ĺľi\n" +
+"- Ak podržíte tlačítko stlačené, posúvaním meníte hodnotu.";
+
+Calendar._TT["PREV_YEAR"] = "Predošlý rok (podržte pre menu)";
+Calendar._TT["PREV_MONTH"] = "Predošlý mesiac (podržte pre menu)";
+Calendar._TT["GO_TODAY"] = "Prejsť na dnešok";
+Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podrĹľte pre menu)";
+Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podrĹľte pre menu)";
+Calendar._TT["SEL_DATE"] = "Zvoľte dátum";
+Calendar._TT["DRAG_TO_MOVE"] = "PodrĹľanĂ­m tlaÄŤĂ­tka zmenĂ­te polohu";
+Calendar._TT["PART_TODAY"] = " (dnes)";
+Calendar._TT["MON_FIRST"] = "ZobraziĹĄ pondelok ako prvĂ˝";
+Calendar._TT["SUN_FIRST"] = "ZobraziĹĄ nedeÄľu ako prvĂş";
+Calendar._TT["CLOSE"] = "ZavrieĹĄ";
+Calendar._TT["TODAY"] = "Dnes";
+Calendar._TT["TIME_PART"] = "(Shift-)klik/ĹĄahanie zmenĂ­ hodnotu";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y";
+Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b";
+
+Calendar._TT["WK"] = "týž";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sp.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sp.js
new file mode 100644
index 0000000..2937a30
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sp.js
@@ -0,0 +1,63 @@
+// ** I18N
+Calendar._DN = new Array
+("Domingo",
+ "Lunes",
+ "Martes",
+ "Miercoles",
+ "Jueves",
+ "Viernes",
+ "Sabado",
+ "Domingo");
+Calendar._MN = new Array
+("Enero",
+ "Febrero",
+ "Marzo",
+ "Abril",
+ "Mayo",
+ "Junio",
+ "Julio",
+ "Agosto",
+ "Septiembre",
+ "Octubre",
+ "Noviembre",
+ "Diciembre");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Información del Calendario";
+
+Calendar._TT["ABOUT"] =
+"DHTML Date/Time Selector\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"Nuevas versiones en: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribuida bajo licencia GNU LGPL.  Para detalles vea http://gnu.org/licenses/lgpl.html ." +
+"\n\n" +
+"Selección de Fechas:\n" +
+"- Use  \xab, \xbb para seleccionar el año\n" +
+"- Use " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" +
+"- Mantenga presionado el botón del ratón en cualquiera de las opciones superiores para un acceso rapido .";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Selección del Reloj:\n" +
+"- Seleccione la hora para cambiar el reloj\n" +
+"- o presione  Shift-click para disminuirlo\n" +
+"- o presione click y arrastre del ratón para una selección rapida.";
+
+Calendar._TT["TOGGLE"] = "Primer dia de la semana";
+Calendar._TT["PREV_YEAR"] = "Año anterior (Presione para menu)";
+Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)";
+Calendar._TT["GO_TODAY"] = "Ir a Hoy";
+Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)";
+Calendar._TT["NEXT_YEAR"] = "Año Siguiente (Presione para menu)";
+Calendar._TT["SEL_DATE"] = "Seleccione fecha";
+Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva";
+Calendar._TT["PART_TODAY"] = " (Hoy)";
+Calendar._TT["MON_FIRST"] = "Lunes Primero";
+Calendar._TT["SUN_FIRST"] = "Domingo Primero";
+Calendar._TT["CLOSE"] = "Cerrar";
+Calendar._TT["TODAY"] = "Hoy";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-yy";
+Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y";
+
+Calendar._TT["WK"] = "Smn";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sv.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sv.js
new file mode 100644
index 0000000..dc0a072
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sv.js
@@ -0,0 +1,93 @@
+// ** I18N
+
+// Calendar SV language (Swedish, svenska)
+// Author: Mihai Bazon, <mishoo at infoiasi.ro>
+// Translation team: <sv at li.org>
+// Translator: Leonard Norrgård <leonard.norrgard at refactor.fi>
+// Last translator: Leonard Norrgård <leonard.norrgard at refactor.fi>
+// Encoding: iso-latin-1
+// Distributed under the same terms as the calendar itself.
+
+// For translators: please use UTF-8 if possible.  We strongly believe that
+// Unicode is the answer to a real internationalized world.  Also please
+// include your contact information in the header, as can be seen above.
+
+// full day names
+Calendar._DN = new Array
+("söndag",
+ "måndag",
+ "tisdag",
+ "onsdag",
+ "torsdag",
+ "fredag",
+ "lördag",
+ "söndag");
+
+// Please note that the following array of short day names (and the same goes
+// for short month names, _SMN) isn't absolutely necessary.  We give it here
+// for exemplification on how one can customize the short day names, but if
+// they are simply the first N letters of the full name you can simply say:
+//
+//   Calendar._SDN_len = N; // short day name length
+//   Calendar._SMN_len = N; // short month name length
+//
+// If N = 3 then this is not needed either since we assume a value of 3 if not
+// present, to be compatible with translation files that were written before
+// this feature.
+Calendar._SDN_len = 2;
+Calendar._SMN_len = 3;
+
+// full month names
+Calendar._MN = new Array
+("januari",
+ "februari",
+ "mars",
+ "april",
+ "maj",
+ "juni",
+ "juli",
+ "augusti",
+ "september",
+ "oktober",
+ "november",
+ "december");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["INFO"] = "Om kalendern";
+
+Calendar._TT["ABOUT"] =
+"DHTML Datum/tid-väljare\n" +
+"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-)
+"För senaste version gå till: http://dynarch.com/mishoo/calendar.epl\n" +
+"Distribueras under GNU LGPL.  Se http://gnu.org/licenses/lgpl.html för detaljer." +
+"\n\n" +
+"Val av datum:\n" +
+"- Använd knapparna \xab, \xbb för att välja år\n" +
+"- Använd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " för att välja månad\n" +
+"- Håll musknappen nedtryckt på någon av ovanstående knappar för snabbare val.";
+Calendar._TT["ABOUT_TIME"] = "\n\n" +
+"Val av tid:\n" +
+"- Klicka på en del av tiden för att öka den delen\n" +
+"- eller skift-klicka för att minska den\n" +
+"- eller klicka och drag för snabbare val.";
+
+Calendar._TT["PREV_YEAR"] = "Föregående år (håll för menu)";
+Calendar._TT["PREV_MONTH"] = "Föregående månad (håll för menu)";
+Calendar._TT["GO_TODAY"] = "Gå till dagens datum";
+Calendar._TT["NEXT_MONTH"] = "Följande månad (håll för menu)";
+Calendar._TT["NEXT_YEAR"] = "Följande år (håll för menu)";
+Calendar._TT["SEL_DATE"] = "Välj datum";
+Calendar._TT["DRAG_TO_MOVE"] = "Drag för att flytta";
+Calendar._TT["PART_TODAY"] = " (idag)";
+Calendar._TT["MON_FIRST"] = "Visa måndag först";
+Calendar._TT["SUN_FIRST"] = "Visa söndag först";
+Calendar._TT["CLOSE"] = "Stäng";
+Calendar._TT["TODAY"] = "Idag";
+Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag för att ändra tid";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d";
+Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y";
+
+Calendar._TT["WK"] = "vecka";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-tr.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-tr.js
new file mode 100644
index 0000000..f2c906c
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-tr.js
@@ -0,0 +1,58 @@
+//////////////////////////////////////////////////////////////////////////////////////////////
+//	Turkish Translation by Nuri AKMAN
+//	Location: Ankara/TURKEY
+//	e-mail	: nuriakman at hotmail.com
+//	Date	: April, 9 2003
+//
+//	Note: if Turkish Characters does not shown on you screen
+//		  please include falowing line your html code:
+//
+//		  <meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
+//
+//////////////////////////////////////////////////////////////////////////////////////////////
+
+// ** I18N
+Calendar._DN = new Array
+("Pazar",
+ "Pazartesi",
+ "Salý",
+ "Çarþamba",
+ "Perþembe",
+ "Cuma",
+ "Cumartesi",
+ "Pazar");
+Calendar._MN = new Array
+("Ocak",
+ "Þubat",
+ "Mart",
+ "Nisan",
+ "Mayýs",
+ "Haziran",
+ "Temmuz",
+ "Aðustos",
+ "Eylül",
+ "Ekim",
+ "Kasým",
+ "Aralýk");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Haftanýn ilk gününü kaydýr";
+Calendar._TT["PREV_YEAR"] = "Önceki Yýl (Menü için basýlý tutunuz)";
+Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basýlý tutunuz)";
+Calendar._TT["GO_TODAY"] = "Bugün'e git";
+Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basýlý tutunuz)";
+Calendar._TT["NEXT_YEAR"] = "Sonraki Yýl (Menü için basýlý tutunuz)";
+Calendar._TT["SEL_DATE"] = "Tarih seçiniz";
+Calendar._TT["DRAG_TO_MOVE"] = "Taþýmak için sürükleyiniz";
+Calendar._TT["PART_TODAY"] = " (bugün)";
+Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gününden baþlasýn";
+Calendar._TT["SUN_FIRST"] = "Takvim Pazar gününden baþlasýn";
+Calendar._TT["CLOSE"] = "Kapat";
+Calendar._TT["TODAY"] = "Bugün";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y";
+Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD";
+
+Calendar._TT["WK"] = "Hafta";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-zh.js b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-zh.js
new file mode 100644
index 0000000..4549c2a
--- /dev/null
+++ b/src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-zh.js
@@ -0,0 +1,45 @@
+// ** Translated by ATang ** I18N
+Calendar._DN = new Array
+("ÐÇÆÚÈÕ",
+ "ÐÇÆÚÒ»",
+ "ÐÇÆÚ¶þ",
+ "ÐÇÆÚÈý",
+ "ÐÇÆÚËÄ",
+ "ÐÇÆÚÎå",
+ "ÐÇÆÚÁù",
+ "ÐÇÆÚÈÕ");
+Calendar._MN = new Array
+("Ò»ÔÂ",
+ "¶þÔÂ",
+ "ÈýÔÂ",
+ "ËÄÔÂ",
+ "ÎåÔÂ",
+ "ÁùÔÂ",
+ "ÆßÔÂ",
+ "°ËÔÂ",
+ "¾ÅÔÂ",
+ "Ê®ÔÂ",
+ "ʮһÔÂ",
+ "Ê®¶þÔÂ");
+
+// tooltips
+Calendar._TT = {};
+Calendar._TT["TOGGLE"] = "Çл»ÖÜ¿ªÊ¼µÄÒ»Ìì";
+Calendar._TT["PREV_YEAR"] = "ÉÏÒ»Äê (°´×¡³ö²Ëµ¥)";
+Calendar._TT["PREV_MONTH"] = "ÉÏÒ»Ô (°´×¡³ö²Ëµ¥)";
+Calendar._TT["GO_TODAY"] = "µ½½ñÈÕ";
+Calendar._TT["NEXT_MONTH"] = "ÏÂÒ»Ô (°´×¡³ö²Ëµ¥)";
+Calendar._TT["NEXT_YEAR"] = "ÏÂÒ»Äê (°´×¡³ö²Ëµ¥)";
+Calendar._TT["SEL_DATE"] = "Ñ¡ÔñÈÕÆÚ";
+Calendar._TT["DRAG_TO_MOVE"] = "Í϶¯";
+Calendar._TT["PART_TODAY"] = " (½ñÈÕ)";
+Calendar._TT["MON_FIRST"] = "Ê×ÏÈÏÔʾÐÇÆÚÒ»";
+Calendar._TT["SUN_FIRST"] = "Ê×ÏÈÏÔʾÐÇÆÚÈÕ";
+Calendar._TT["CLOSE"] = "¹Ø±Õ";
+Calendar._TT["TODAY"] = "½ñÈÕ";
+
+// date formats
+Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd";
+Calendar._TT["TT_DATE_FORMAT"] = "D, M d";
+
+Calendar._TT["WK"] = "ÖÜ";
diff --git a/src/plugins/wiki/www/themes/Sidebar/jscalendar/menuarrow.png b/src/plugins/wiki/www/themes/Sidebar/jscalendar/menuarrow.png
new file mode 100644
index 0000000..02e158c
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/jscalendar/menuarrow.png differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/ora.swf b/src/plugins/wiki/www/themes/Sidebar/ora.swf
new file mode 100644
index 0000000..fa1b7ba
Binary files /dev/null and b/src/plugins/wiki/www/themes/Sidebar/ora.swf differ
diff --git a/src/plugins/wiki/www/themes/Sidebar/templates/frame-left.tmpl b/src/plugins/wiki/www/themes/Sidebar/templates/frame-left.tmpl
deleted file mode 100644
index de5774c..0000000
--- a/src/plugins/wiki/www/themes/Sidebar/templates/frame-left.tmpl
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-/* 
- * This template is responsible mainly for the outer level <html> stuff.
- */
-?>
-<!DOCTYPE html>
-<head>
-<meta charset="UTF-8" />
-<?php echo Template('head') ?>
-<body>
-<div class="toolbar"><?php echo Template('navbar') ?></div>
-<div class="toolbar"><?php echo Template('actionbar') ?></div>
-</body>
-</html>
diff --git a/src/plugins/wiki/www/themes/Sidebar/templates/frameset.tmpl b/src/plugins/wiki/www/themes/Sidebar/templates/frameset.tmpl
deleted file mode 100644
index 9a34cff..0000000
--- a/src/plugins/wiki/www/themes/Sidebar/templates/frameset.tmpl
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/*
- * This template is used for the FrameInclude plugin.
- */
-
-$topurl = $request->getURLtoSelf(array('frame' => 'header'));
-$boturl = $request->getURLtoSelf(array('frame' => 'footer'));
-$lefturl = $request->getURLtoSelf(array('frame' => 'left'));
-
-printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", CHARSET);
-?>
-<!DOCTYPE html   PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<?php echo Template('head') ?>
-
-<frameset rows="<?php echo $ROWS?>">
-  <frame name="header" src="<?php echo $topurl?>" <?php echo $FRAMEARGS ?> />
-  <frameset cols="<?php echo $COLS?>">
-    <frame name="left" src="<?php echo $lefturl?>" <?php echo $FRAMEARGS ?> />
-    <?php echo $CONTENT_FRAME ?>
-  </frameset>
-  <frame name="footer" src="<?php echo $boturl?>" <?php echo $FRAMEARGS ?> />
-  <noframes><?php echo Template('body') ?></noframes>
-</frameset>
-</html>
diff --git a/src/plugins/wiki/www/themes/blog/templates/blogform.tmpl b/src/plugins/wiki/www/themes/blog/templates/blogform.tmpl
deleted file mode 100644
index b71fa57..0000000
--- a/src/plugins/wiki/www/themes/blog/templates/blogform.tmpl
+++ /dev/null
@@ -1,26 +0,0 @@
-<div class="wikiblog wikiblog-form">
-<form action="<?php echo $request->getPostURL()?>" method="post" name="editpage"
-      accept-charset="UTF-8" id="wikiblog-form">
-  <input type="hidden" name="edit[pagename]" value="<?php echo $PAGENAME?>" />
-  <input type="hidden" name="mode" value="add" />
-  <div class="wikiblog-form">
-     <?php echo _("Headline")._(": ") ?><br />
-     <input id="wikiblog-summary" class="wikitext" type="text" style="width:540px" size="60"
-                   maxlength="256" name="edit[summary]" value="" />
-     <?php echo $EDIT_TOOLBAR ?>
-     <a id="editarea"></a>
-     <textarea id="edit-content" class="edit-content" rows="8" style="width:540px"
-               name="edit[content]"></textarea>
-     <br />
-     <input id="wikiblog-submit" type="submit" value="<?php echo _("Add Entry")?>"
-                     name="edit[save]" class="wikiaction" />
-  </div>
-
-<hr />
-<div class="wiki-edithelp">
-  <p><?php echo fmt("See %s tips for editing.", WikiLink(_("Help")."/"._("GoodStyle"))) ?></p>
-  <?plugin IncludePage page=_("Help/TextFormattingRules") section=_("Synopsis") quiet=1?>
-</div>
-<?php echo $HIDDEN_INPUTS?>
-</form>
-</div>
diff --git a/src/plugins/wiki/www/themes/default/buttons/asc_order.png b/src/plugins/wiki/www/themes/default/buttons/asc_order.png
deleted file mode 100644
index 8542466..0000000
Binary files a/src/plugins/wiki/www/themes/default/buttons/asc_order.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/buttons/desc_order.png b/src/plugins/wiki/www/themes/default/buttons/desc_order.png
deleted file mode 100644
index 18508f3..0000000
Binary files a/src/plugins/wiki/www/themes/default/buttons/desc_order.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/buttons/no_order.png b/src/plugins/wiki/www/themes/default/buttons/no_order.png
deleted file mode 100644
index 367adfd..0000000
Binary files a/src/plugins/wiki/www/themes/default/buttons/no_order.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/buttons/sort_down.gif b/src/plugins/wiki/www/themes/default/buttons/sort_down.gif
new file mode 100644
index 0000000..348cf95
Binary files /dev/null and b/src/plugins/wiki/www/themes/default/buttons/sort_down.gif differ
diff --git a/src/plugins/wiki/www/themes/default/buttons/sort_none.gif b/src/plugins/wiki/www/themes/default/buttons/sort_none.gif
new file mode 100644
index 0000000..28382b8
Binary files /dev/null and b/src/plugins/wiki/www/themes/default/buttons/sort_none.gif differ
diff --git a/src/plugins/wiki/www/themes/default/buttons/sort_up.gif b/src/plugins/wiki/www/themes/default/buttons/sort_up.gif
new file mode 100644
index 0000000..37c076f
Binary files /dev/null and b/src/plugins/wiki/www/themes/default/buttons/sort_up.gif differ
diff --git a/src/plugins/wiki/www/themes/default/flowplayer-3.2.4.swf b/src/plugins/wiki/www/themes/default/flowplayer-3.2.4.swf
new file mode 100644
index 0000000..d8c5ce9
Binary files /dev/null and b/src/plugins/wiki/www/themes/default/flowplayer-3.2.4.swf differ
diff --git a/src/plugins/wiki/www/themes/default/flowplayer.controls-3.2.2.swf b/src/plugins/wiki/www/themes/default/flowplayer.controls-3.2.2.swf
new file mode 100644
index 0000000..3f814c0
Binary files /dev/null and b/src/plugins/wiki/www/themes/default/flowplayer.controls-3.2.2.swf differ
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/CHANGES.md b/src/plugins/wiki/www/themes/default/highlight.js/CHANGES.md
new file mode 100644
index 0000000..f878062
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/CHANGES.md
@@ -0,0 +1,827 @@
+## Version 8.0 beta
+
+This new major release is quite a big overhaul bringing both new features and
+some backwards incompatible changes. However, chances are that the majority of
+users won't be affected by the latter: the basic scenario described in the
+README is left intact.
+
+Here's what did change in an incompatible way:
+
+- We're now prefixing all classes located in [CSS classes reference][cr] with
+  `hljs-`, by default, because some class names would collide with other
+  people's stylesheets. If you were using an older version, you might still want
+  the previous behavior, but still want to upgrade. To suppress this new
+  behavior, you would initialize like so:
+
+  ```html
+  <script type="text/javascript">
+    hljs.configure({classPrefix: ''});
+    hljs.initHighlightingOnLoad();
+  </script>
+  ```
+
+- `tabReplace` and `useBR` that were used in different places are also unified
+  into the global options object and are to be set using `configure(options)`.
+  This function is documented in our [API docs][]. Also note that these
+  parameters are gone from `highlightBlock` and `fixMarkup` which are now also
+  rely on `configure`.
+
+- We removed public-facing (though undocumented) object `hljs.LANGUAGES` which
+  was used to register languages with the library in favor of two new methods:
+  `registerLanguage` and `getLanguage`. Both are documented in our [API docs][].
+
+- Result returned from `highlight` and `highlightAuto` no longer contains two
+  separate attributes contributing to relevance score, `relevance` and
+  `keyword_count`. They are now unified in `relevance`.
+
+Another technically compatible change that nonetheless might need attention:
+
+- The structure of the NPM package was refactored, so if you had installed it
+  locally, you'll have to update your paths. The usual `require('highlight.js')`
+  works as before. This is contributed by [Dmitry Smolin][].
+
+New features:
+
+- Languages now can be recognized by multiple names like "js" for JavaScript or
+  "html" for, well, HTML (which earlier insisted on calling it "xml"). These
+  aliases can be specified in the class attribute of the code container in your
+  HTML as well as in various API calls. For now there are only a few very common
+  aliases but we'll expand it in the future. All of them are listed in the
+  [class reference][].
+
+- Language detection can now be restricted to a subset of languages relevant in
+  a given context — a web page or even a single highlighting call. This is
+  especially useful for node.js build that includes all the known languages.
+  Another example is a StackOverflow-style site where users specify languages
+  as tags rather than in the markdown-formatted code snippets. This is
+  documented in the [API reference][] (see methods `highlightAuto` and
+  `configure`).
+
+- Language definition syntax streamlined with [variants][] and
+  [beginKeywords][].
+
+New languages and styles:
+
+- *Oxygene* by [Carlo Kok][]
+- *Mathematica* by [Daniel Kvasnička][]
+- *Autohotkey* by [Seongwon Lee][]
+- *Atelier* family of styles in 10 variants by [Bram de Haan][]
+- *Paraíso* styles by [Jan T. Sott][]
+
+Miscelleanous improvements:
+
+- Highlighting `=>` prompts in Clojure.
+- [Jeremy Hull][] fixed a lot of styles for consistency.
+- Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html].
+- Objective C and C# now properly highlight titles in method definition.
+- Big overhaul of relevance counting for a number of languages. Please do report
+  bugs about mis-detection of non-trivial code snippets!
+
+[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
+[api docs]: http://highlightjs.readthedocs.org/en/latest/api.html
+[variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion
+[beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d
+[php-html]: https://twitter.com/highlightjs/status/408890903017689088
+
+[Carlo Kok]: https://github.com/carlokok
+[Bram de Haan]: https://github.com/atelierbram
+[Daniel Kvasnička]: https://github.com/dkvasnicka
+[Dmitry Smolin]: https://github.com/dimsmol
+[Jeremy Hull]: https://github.com/sourrust
+[Seongwon Lee]: https://github.com/dlimpid
+[Jan T. Sott]: https://github.com/idleberg
+
+
+## Version 7.5
+
+A catch-up release dealing with some of the accumulated contributions. This one
+is probably will be the last before the 8.0 which will be slightly backwards
+incompatible regarding some advanced use-cases.
+
+One outstanding change in this version is the addition of 6 languages to the
+[hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and
+Makefile. It now weighs about 6K more but we're going to keep it under 30K.
+
+New languages:
+
+- OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud]
+- [LiveCode Server][lcs] by [Ralf Bitter][revig]
+- Scilab by [Sylvestre Ledru][sylvestre]
+- basic support for Makefile by [Ivan Sagalaev][isagalaev]
+
+Improvements:
+
+- Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}`
+  regexps.
+- Clojure now allows a function call in the beginning of s-expressions
+  `(($filter "myCount") (arr 1 2 3 4 5))`.
+- Haskell's got new keywords and now recognizes more things like pragmas,
+  preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
+  for the implementation and to [Jeremy Hull][sourrust] for guiding it.
+- Miscelleanous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
+
+[mehdid]: https://github.com/mehdid
+[nbraud]: https://github.com/nbraud
+[revig]: https://github.com/revig
+[lcs]: http://livecode.com/developers/guides/server/
+[sylvestre]: https://github.com/sylvestre
+[isagalaev]: https://github.com/isagalaev
+[treep]: https://github.com/treep
+[sourrust]: https://github.com/sourrust
+[d]: http://highlightjs.org/download/
+
+
+## New core developers
+
+The latest long period of almost complete inactivity in the project coincided
+with growing interest to it led to a decision that now seems completely obvious:
+we need more core developers.
+
+So without further ado let me welcome to the core team two long-time
+contributors: [Jeremy Hull][] and [Oleg
+Efimov][].
+
+Hope now we'll be able to work through stuff faster!
+
+P.S. The historical commit is [here][1] for the record.
+
+[Jeremy Hull]: https://github.com/sourrust
+[Oleg Efimov]: https://github.com/sannis
+[1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f
+
+
+## Version 7.4
+
+This long overdue version is a snapshot of the current source tree with all the
+changes that happened during the past year. Sorry for taking so long!
+
+Along with the changes in code highlight.js has finally got its new home at
+<http://highlightjs.org/>, moving from its craddle on Software Maniacs which it
+outgrew a long time ago. Be sure to report any bugs about the site to
+<mailto:info at highlightjs.org>.
+
+On to what's new…
+
+New languages:
+
+- Handlebars templates by [Robin Ward][]
+- Oracle Rules Language by [Jason Jacobson][]
+- F# by [Joans Follesø][]
+- AsciiDoc and Haml by [Dan Allen][]
+- Lasso by [Eric Knibbe][]
+- SCSS by [Kurt Emch][]
+- VB.NET by [Poren Chiang][]
+- Mizar by [Kelley van Evert][]
+
+[Robin Ward]: https://github.com/eviltrout
+[Jason Jacobson]: https://github.com/jayce7
+[Joans Follesø]: https://github.com/follesoe
+[Dan Allen]: https://github.com/mojavelinux
+[Eric Knibbe]: https://github.com/EricFromCanada
+[Kurt Emch]: https://github.com/kemch
+[Poren Chiang]: https://github.com/rschiang
+[Kelley van Evert]: https://github.com/kelleyvanevert
+
+New style themes:
+
+- Monokai Sublime by [noformnocontent][]
+- Railscasts by [Damien White][]
+- Obsidian by [Alexander Marenin][]
+- Docco by [Simon Madine][]
+- Mono Blue by [Ivan Sagalaev][] (uses a single color hue for everything)
+- Foundation by [Dan Allen][]
+
+[noformnocontent]: http://nn.mit-license.org/
+[Damien White]: https://github.com/visoft
+[Alexander Marenin]: https://github.com/ioncreature
+[Simon Madine]: https://github.com/thingsinjars
+[Ivan Sagalaev]: https://github.com/isagalaev
+
+Other notable changes:
+
+- Corrected many corner cases in CSS.
+- Dropped Python 2 version of the build tool.
+- Implemented building for the AMD format.
+- Updated Rust keywords (thanks to [Dmitry Medvinsky][]).
+- Literal regexes can now be used in language definitions.
+- CoffeeScript highlighting is now significantly more robust and rich due to
+  input from [Cédric Néhémie][].
+
+[Dmitry Medvinsky]: https://github.com/dmedvinsky
+[Cédric Néhémie]: https://github.com/abe33
+
+
+## Version 7.3
+
+- Since this version highlight.js no longer works in IE version 8 and older.
+  It's made it possible to reduce the library size and dramatically improve code
+  readability and made it easier to maintain. Time to go forward!
+
+- New languages: AppleScript (by [Nathan Grigg][ng] and [Dr. Drang][dd]) and
+  Brainfuck (by [Evgeny Stepanischev][bolk]).
+
+- Improvements to existing languages:
+
+    - interpreter prompt in Python (`>>>` and `...`)
+    - @-properties and classes in CoffeeScript
+    - E4X in JavaScript (by [Oleg Efimov][oe])
+    - new keywords in Perl (by [Kirk Kimmel][kk])
+    - big Ruby syntax update (by [Vasily Polovnyov][vast])
+    - small fixes in Bash
+
+- Also Oleg Efimov did a great job of moving all the docs for language and style
+  developers and contributors from the old wiki under the source code in the
+  "docs" directory. Now these docs are nicely presented at
+  <http://highlightjs.readthedocs.org/>.
+
+[ng]: https://github.com/nathan11g
+[dd]: https://github.com/drdrang
+[bolk]: https://github.com/bolknote
+[oe]: https://github.com/Sannis
+[kk]: https://github.com/kimmel
+[vast]: https://github.com/vast
+
+
+## Version 7.2
+
+A regular bug-fix release without any significant new features. Enjoy!
+
+
+## Version 7.1
+
+A Summer crop:
+
+- [Marc Fornos][mf] made the definition for Clojure along with the matching
+  style Rainbow (which, of course, works for other languages too).
+- CoffeeScript support continues to improve getting support for regular
+  expressions.
+- Yoshihide Jimbo ported to highlight.js [five Tomorrow styles][tm] from the
+  [project by Chris Kempson][tm0].
+- Thanks to [Casey Duncun][cd] the library can now be built in the popular
+  [AMD format][amd].
+- And last but not least, we've got a fair number of correctness and consistency
+  fixes, including a pretty significant refactoring of Ruby.
+
+[mf]: https://github.com/mfornos
+[tm]: http://jmblog.github.com/color-themes-for-highlightjs/
+[tm0]: https://github.com/ChrisKempson/Tomorrow-Theme
+[cd]: https://github.com/caseman
+[amd]: http://requirejs.org/docs/whyamd.html
+
+
+## Version 7.0
+
+The reason for the new major version update is a global change of keyword syntax
+which resulted in the library getting smaller once again. For example, the
+hosted build is 2K less than at the previous version while supporting two new
+languages.
+
+Notable changes:
+
+- The library now works not only in a browser but also with [node.js][]. It is
+  installable with `npm install highlight.js`. [API][] docs are available on our
+  wiki.
+
+- The new unique feature (apparently) among syntax highlighters is highlighting
+  *HTTP* headers and an arbitrary language in the request body. The most useful
+  languages here are *XML* and *JSON* both of which highlight.js does support.
+  Here's [the detailed post][p] about the feature.
+
+- Two new style themes: a dark "south" *[Pojoaque][]* by Jason Tate and an
+  emulation of*XCode* IDE by [Angel Olloqui][ao].
+
+- Three new languages: *D* by [Aleksandar Ružičić][ar], *R* by [Joe Cheng][jc]
+  and *GLSL* by [Sergey Tikhomirov][st].
+
+- *Nginx* syntax has become a million times smaller and more universal thanks to
+  remaking it in a more generic manner that doesn't require listing all the
+  directives in the known universe.
+
+- Function titles are now highlighted in *PHP*.
+
+- *Haskell* and *VHDL* were significantly reworked to be more rich and correct
+  by their respective maintainers [Jeremy Hull][sr] and [Igor Kalnitsky][ik].
+
+And last but not least, many bugs have been fixed around correctness and
+language detection.
+
+Overall highlight.js currently supports 51 languages and 20 style themes.
+
+[node.js]: http://nodejs.org/
+[api]: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api
+[p]: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/
+[pojoaque]: http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
+[ao]: https://github.com/angelolloqui
+[ar]: https://github.com/raleksandar
+[jc]: https://github.com/jcheng5
+[st]: https://github.com/tikhomirov
+[sr]: https://github.com/sourrust
+[ik]: https://github.com/ikalnitsky
+
+
+## Version 6.2
+
+A lot of things happened in highlight.js since the last version! We've got nine
+new contributors, the discussion group came alive, and the main branch on GitHub
+now counts more than 350 followers. Here are most significant results coming
+from all this activity:
+
+- 5 (five!) new languages: Rust, ActionScript, CoffeeScript, MatLab and
+  experimental support for markdown. Thanks go to [Andrey Vlasovskikh][av],
+  [Alexander Myadzel][am], [Dmytrii Nagirniak][dn], [Oleg Efimov][oe], [Denis
+  Bardadym][db] and [John Crepezzi][jc].
+
+- 2 new style themes: Monokai by [Luigi Maselli][lm] and stylistic imitation of
+  another well-known highlighter Google Code Prettify by [Aahan Krish][ak].
+
+- A vast number of [correctness fixes and code refactorings][log], mostly made
+  by [Oleg Efimov][oe] and [Evgeny Stepanischev][es].
+
+[av]: https://github.com/vlasovskikh
+[am]: https://github.com/myadzel
+[dn]: https://github.com/dnagir
+[oe]: https://github.com/Sannis
+[db]: https://github.com/btd
+[jc]: https://github.com/seejohnrun
+[lm]: http://grigio.org/
+[ak]: https://github.com/geekpanth3r
+[es]: https://github.com/bolknote
+[log]: https://github.com/isagalaev/highlight.js/commits/
+
+
+## Version 6.1 — Solarized
+
+[Jeremy Hull][jh] has implemented my dream feature — a port of [Solarized][]
+style theme famous for being based on the intricate color theory to achieve
+correct contrast and color perception. It is now available for highlight.js in
+both variants — light and dark.
+
+This version also adds a new original style Arta. Its author pumbur maintains a
+[heavily modified fork of highlight.js][pb] on GitHub.
+
+[jh]: https://github.com/sourrust
+[solarized]: http://ethanschoonover.com/solarized
+[pb]: https://github.com/pumbur/highlight.js
+
+
+## Version 6.0
+
+New major version of the highlighter has been built on a significantly
+refactored syntax. Due to this it's even smaller than the previous one while
+supporting more languages!
+
+New languages are:
+
+- Haskell by [Jeremy Hull][sourrust]
+- Erlang in two varieties — module and REPL — made collectively by [Nikolay
+  Zakharov][desh], [Dmitry Kovega][arhibot] and [Sergey Ignatov][ignatov]
+- Objective C by [Valerii Hiora][vhbit]
+- Vala by [Antono Vasiljev][antono]
+- Go by [Stephan Kountso][steplg]
+
+[sourrust]: https://github.com/sourrust
+[desh]: http://desh.su/
+[arhibot]: https://github.com/arhibot
+[ignatov]: https://github.com/ignatov
+[vhbit]: https://github.com/vhbit
+[antono]: https://github.com/antono
+[steplg]: https://github.com/steplg
+
+Also this version is marginally faster and fixes a number of small long-standing
+bugs.
+
+Developer overview of the new language syntax is available in a [blog post about
+recent beta release][beta].
+
+[beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/
+
+P.S. New version is not yet available on a Yandex' CDN, so for now you have to
+download [your own copy][d].
+
+[d]: /soft/highlight/en/download/
+
+
+## Version 5.14
+
+Fixed bugs in HTML/XML detection and relevance introduced in previous
+refactoring.
+
+Also test.html now shows the second best result of language detection by
+relevance.
+
+
+## Version 5.13
+
+Past weekend began with a couple of simple additions for existing languages but
+ended up in a big code refactoring bringing along nice improvements for language
+developers.
+
+### For users
+
+- Description of C++ has got new keywords from the upcoming [C++ 0x][] standard.
+- Description of HTML has got new tags from [HTML 5][].
+- CSS-styles have been unified to use consistent padding and also have lost
+  pop-outs with names of detected languages.
+- [Igor Kalnitsky][ik] has sent two new language descriptions: CMake и VHDL.
+
+This makes total number of languages supported by highlight.js to reach 35.
+
+Bug fixes:
+
+- Custom classes on `<pre>` tags are not being overridden anymore
+- More correct highlighting of code blocks inside non-`<pre>` containers:
+  highlighter now doesn't insist on replacing them with its own container and
+  just replaces the contents.
+- Small fixes in browser compatibility and heuristics.
+
+[c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
+[html 5]: http://en.wikipedia.org/wiki/HTML5
+[ik]: http://kalnitsky.org.ua/
+
+### For developers
+
+The most significant change is the ability to include language submodes right
+under `contains` instead of defining explicit named submodes in the main array:
+
+    contains: [
+      'string',
+      'number',
+      {begin: '\\n', end: hljs.IMMEDIATE_RE}
+    ]
+
+This is useful for auxiliary modes needed only in one place to define parsing.
+Note that such modes often don't have `className` and hence won't generate a
+separate `<span>` in the resulting markup. This is similar in effect to
+`noMarkup: true`. All existing languages have been refactored accordingly.
+
+Test file test.html has at last become a real test. Now it not only puts the
+detected language name under the code snippet but also tests if it matches the
+expected one. Test summary is displayed right above all language snippets.
+
+
+## CDN
+
+Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
+[Link up][l]!
+
+[yandex]: http://yandex.com/
+[l]: http://softwaremaniacs.org/soft/highlight/en/download/
+
+
+## Version 5.10 — "Paris".
+
+Though I'm on a vacation in Paris, I decided to release a new version with a
+couple of small fixes:
+
+- Tomas Vitvar discovered that TAB replacement doesn't always work when used
+  with custom markup in code
+- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
+
+
+## Version 5.9
+
+A long-awaited version is finally released.
+
+New languages:
+
+- Andrew Fedorov made a definition for Lua
+- a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
+  Nginx config
+- [Vladimir Moskva][vm] made a definition for TeX
+
+[pl]: http://kung-fu-tzu.ru/
+[vm]: http://fulc.ru/
+
+Fixes for existing languages:
+
+- [Loren Segal][ls] reworked the Ruby definition and added highlighting for
+  [YARD][] inline documentation
+- the definition of SQL has become more solid and now it shouldn't be overly
+  greedy when it comes to language detection
+
+[ls]: http://gnuu.org/
+[yard]: http://yardoc.org/
+
+The highlighter has become more usable as a library allowing to do highlighting
+from initialization code of JS frameworks and in ajax methods (see.
+readme.eng.txt).
+
+Also this version drops support for the [WordPress][wp] plugin. Everyone is
+welcome to [pick up its maintenance][p] if needed.
+
+[wp]: http://wordpress.org/
+[p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
+
+
+## Version 5.8
+
+- Jan Berkel has contributed a definition for Scala. +1 to hotness!
+- All CSS-styles are rewritten to work only inside `<pre>` tags to avoid
+  conflicts with host site styles.
+
+
+## Version 5.7.
+
+Fixed escaping of quotes in VBScript strings.
+
+
+## Version 5.5
+
+This version brings a small change: now .ini-files allow digits, underscores and
+square brackets in key names.
+
+
+## Version 5.4
+
+Fixed small but upsetting bug in the packer which caused incorrect highlighting
+of explicitly specified languages. Thanks to Andrew Fedorov for precise
+diagnostics!
+
+
+## Version 5.3
+
+The version to fulfil old promises.
+
+The most significant change is that highlight.js now preserves custom user
+markup in code along with its own highlighting markup. This means that now it's
+possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
+[initial proposal][1] and for making a proof-of-concept patch.
+
+Also in this version:
+
+- [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
+  support for CSS @-rules and Ruby symbols.
+- Yura Zaripov has sent two styles: Brown Paper and School Book.
+- Oleg Volchkov has sent a definition for [Parser 3][p3].
+
+[1]: http://softwaremaniacs.org/forum/highlightjs/6612/
+[p3]: http://www.parser.ru/
+[vp]: http://vasily.polovnyov.ru/
+[vd]: http://dolzhenko.blogspot.com/
+
+
+## Version 5.2
+
+- at last it's possible to replace indentation TABs with something sensible (e.g. 2 or 4 spaces)
+- new keywords and built-ins for 1C by Sergey Baranov
+- a couple of small fixes to Apache highlighting
+
+
+## Version 5.1
+
+This is one of those nice version consisting entirely of new and shiny
+contributions!
+
+- [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
+- [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
+  original visual style for it is now available for all highlight.js languages
+  under the name "Magula".
+- [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
+  languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
+  the matter.
+
+[vooon]: http://vehq.ru/about/
+[rukeba]: http://rukeba.com/
+[drake]: http://drakeguan.org/
+[ke]: http://k-evdokimenko.moikrug.ru/
+
+
+## Version 5.0
+
+The main change in the new major version of highlight.js is a mechanism for
+packing several languages along with the library itself into a single compressed
+file. Now sites using several languages will load considerably faster because
+the library won't dynamically include additional files while loading.
+
+Also this version fixes a long-standing bug with Javascript highlighting that
+couldn't distinguish between regular expressions and division operations.
+
+And as usually there were a couple of minor correctness fixes.
+
+Great thanks to all contributors! Keep using highlight.js.
+
+
+## Version 4.3
+
+This version comes with two contributions from [Jason Diamond][jd]:
+
+- language definition for C# (yes! it was a long-missed thing!)
+- Visual Studio-like highlighting style
+
+Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
+
+[jd]: http://jason.diamond.name/weblog/
+
+
+## Version 4.2
+
+The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
+somewhat experimental meaning that for highlighting "keywords" it doesn't use
+any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
+in parentheses wherever it makes sense. I'd like to ask people programming in
+Lisp to confirm if it's a good idea and send feedback to [the forum][f].
+
+Other changes:
+
+- Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
+- [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
+  test.html
+- comments now allowed inside Ruby function definition
+- [MEL][] language from [Shuen-Huei Guan][drake]
+- whitespace now allowed between `<pre>` and `<code>`
+- better auto-detection of C++ and PHP
+- HTML allows embedded VBScript (`<% .. %>`)
+
+[f]: http://softwaremaniacs.org/forum/highlightjs/
+[voldmar]: http://voldmar.ya.ru/
+[mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
+[drake]: http://drakeguan.org/
+
+
+## Version 4.1
+
+Languages:
+
+- Bash from Vah
+- DOS bat-files from Alexander Makarov (Sam)
+- Diff files from Vasily Polovnyov
+- Ini files from myself though initial idea was from Sam
+
+Styles:
+
+- Zenburn from Vladimir Epifanov, this is an imitation of a
+  [well-known theme for Vim][zenburn].
+- Ascetic from myself, as a realization of ideals of non-flashy highlighting:
+  just one color in only three gradations :-)
+
+In other news. [One small bug][bug] was fixed, built-in keywords were added for
+Python and C++ which improved auto-detection for the latter (it was shame that
+[my wife's blog][alenacpp] had issues with it from time to time). And lastly
+thanks go to Sam for getting rid of my stylistic comments in code that were
+getting in the way of [JSMin][].
+
+[zenburn]: http://en.wikipedia.org/wiki/Zenburn
+[alenacpp]: http://alenacpp.blogspot.com/
+[bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
+[jsmin]: http://code.google.com/p/jsmin-php/
+
+
+## Version 4.0
+
+New major version is a result of vast refactoring and of many contributions.
+
+Visible new features:
+
+- Highlighting of embedded languages. Currently is implemented highlighting of
+  Javascript and CSS inside HTML.
+- Bundled 5 ready-made style themes!
+
+Invisible new features:
+
+- Highlight.js no longer pollutes global namespace. Only one object and one
+  function for backward compatibility.
+- Performance is further increased by about 15%.
+
+Changing of a major version number caused by a new format of language definition
+files. If you use some third-party language files they should be updated.
+
+
+## Version 3.5
+
+A very nice version in my opinion fixing a number of small bugs and slightly
+increased speed in a couple of corner cases. Thanks to everybody who reports
+bugs in he [forum][f] and by email!
+
+There is also a new language — XML. A custom XML formerly was detected as HTML
+and didn't highlight custom tags. In this version I tried to make custom XML to
+be detected and highlighted by its own rules. Which by the way include such
+things as CDATA sections and processing instructions (`<? ... ?>`).
+
+[f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
+
+
+## Version 3.3
+
+[Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
+File export.html contains a little program that shows and allows to copy and
+paste an HTML code generated by the highlighter for any code snippet. This can
+be useful in situations when one can't use the script itself on a site.
+
+
+[xonix]: http://xonixx.blogspot.com/
+
+
+## Version 3.2 consists completely of contributions:
+
+- Vladimir Gubarkov has described SmallTalk
+- Yuri Ivanov has described 1C
+- Peter Leonov has packaged the highlighter as a Firefox extension
+- Vladimir Ermakov has compiled a mod for phpBB
+
+Many thanks to you all!
+
+
+## Version 3.1
+
+Three new languages are available: Django templates, SQL and Axapta. The latter
+two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
+SQL definition but I'd never started it be it from the ground up :-)
+
+The engine itself has got a long awaited feature of grouping keywords
+("keyword", "built-in function", "literal"). No more hacks!
+
+[1]: http://roudakov.ru/
+
+
+## Version 3.0
+
+It is major mainly because now highlight.js has grown large and has become
+modular. Now when you pass it a list of languages to highlight it will
+dynamically load into a browser only those languages.
+
+Also:
+
+- Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
+  RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
+  languages!
+- Heuristics for C++ and HTML got better.
+- I've implemented (at last) a correct handling of backslash escapes in C-like
+  languages.
+
+There is also a small backwards incompatible change in the new version. The
+function initHighlighting that was used to initialize highlighting instead of
+initHighlightingOnLoad a long time ago no longer works. If you by chance still
+use it — replace it with the new one.
+
+[RibKit]: http://ribkit.sourceforge.net/
+
+
+## Version 2.9
+
+Highlight.js is a parser, not just a couple of regular expressions. That said
+I'm glad to announce that in the new version 2.9 has support for:
+
+- in-string substitutions for Ruby -- `#{...}`
+- strings from from numeric symbol codes (like #XX) for Delphi
+
+
+## Version 2.8
+
+A maintenance release with more tuned heuristics. Fully backwards compatible.
+
+
+## Version 2.7
+
+- Nikita Ledyaev presents highlighting for VBScript, yay!
+- A couple of bugs with escaping in strings were fixed thanks to Mickle
+- Ongoing tuning of heuristics
+
+Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
+
+
+## Version 2.4
+
+- Peter Leonov provides another improved highlighting for Perl
+- Javascript gets a new kind of keywords — "literals". These are the words
+  "true", "false" and "null"
+
+Also highlight.js homepage now lists sites that use the library. Feel free to
+add your site by [dropping me a message][mail] until I find the time to build a
+submit form.
+
+[mail]: mailto:Maniac at SoftwareManiacs.Org
+
+
+## Version 2.3
+
+This version fixes IE breakage in previous version. My apologies to all who have
+already downloaded that one!
+
+
+## Version 2.2
+
+- added highlighting for Javascript
+- at last fixed parsing of Delphi's escaped apostrophes in strings
+- in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
+  Perl
+
+
+## Version 2.0
+
+- Ruby support by [Anton Kovalyov][ak]
+- speed increased by orders of magnitude due to new way of parsing
+- this same way allows now correct highlighting of keywords in some tricky
+  places (like keyword "End" at the end of Delphi classes)
+
+[ak]: http://anton.kovalyov.net/
+
+
+## Version 1.0
+
+Version 1.0 of javascript syntax highlighter is released!
+
+It's the first version available with English description. Feel free to post
+your comments and question to [highlight.js forum][forum]. And don't be afraid
+if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
+
+[forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/LICENSE b/src/plugins/wiki/www/themes/default/highlight.js/LICENSE
new file mode 100644
index 0000000..422deb7
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/LICENSE
@@ -0,0 +1,24 @@
+Copyright (c) 2006, Ivan Sagalaev
+All rights reserved.
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of highlight.js nor the names of its contributors 
+      may be used to endorse or promote products derived from this software 
+      without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/README.md b/src/plugins/wiki/www/themes/default/highlight.js/README.md
new file mode 100644
index 0000000..0ee9637
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/README.md
@@ -0,0 +1,167 @@
+# Highlight.js
+
+Highlight.js highlights syntax in code examples on blogs, forums and,
+in fact, on any web page. It's very easy to use because it works
+automatically: finds blocks of code, detects a language, highlights it.
+
+Autodetection can be fine tuned when it fails by itself (see "Heuristics").
+
+
+## Basic usage
+
+Link the library and a stylesheet from your page and hook highlighting to
+the page load event:
+
+```html
+<link rel="stylesheet" href="styles/default.css">
+<script src="highlight.pack.js"></script>
+<script>hljs.initHighlightingOnLoad();</script>
+```
+
+This will highlight all code on the page marked up as `<pre><code> .. </code></pre>`.
+If you use different markup or need to apply highlighting dynamically, read
+"Custom initialization" below.
+
+- You can download your own customized version of "highlight.pack.js" or
+  use the hosted one as described on the download page:
+  <http://highlightjs.org/download/>
+
+- Style themes are available in the download package or as hosted files.
+  To create a custom style for your site see the class reference in the file
+  [CSS classes reference][cr] from the downloaded package.
+
+[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
+
+
+## node.js
+
+Highlight.js can be used under node.js. The package with all supported languages is
+installable from NPM:
+
+    npm install highlight.js
+
+Alternatively, you can build it from the source with only languages you need:
+
+    python3 tools/build.py -tnode lang1 lang2 ..
+
+Using the library:
+
+```javascript
+var hljs = require('highlight.js');
+
+// If you know the language
+hljs.highlight(lang, code).value;
+
+// Automatic language detection
+hljs.highlightAuto(code).value;
+```
+
+
+## AMD
+
+Highlight.js can be used with an AMD loader.  You will need to build it from
+source in order to do so:
+
+```bash
+$ python3 tools/build.py -tamd lang1 lang2 ..
+```
+
+Which will generate a `build/highlight.pack.js` which will load as an AMD
+module with support for the built languages and can be used like so:
+
+```javascript
+require(["highlight.js/build/highlight.pack"], function(hljs){
+
+  // If you know the language
+  hljs.highlight(lang, code).value;
+
+  // Automatic language detection
+  hljs.highlightAuto(code).value;
+});
+```
+
+
+## Tab replacement
+
+You can replace TAB ('\x09') characters used for indentation in your code
+with some fixed number of spaces or with a `<span>` to give them special
+styling:
+
+```html
+<script type="text/javascript">
+  hljs.configure({tabReplace: '    '}); // 4 spaces
+  // ... or
+  hljs.configure({tabReplace: '<span class="indent">\t</span>'});
+
+  hljs.initHighlightingOnLoad();
+</script>
+```
+
+## Custom initialization
+
+If you use different markup for code blocks you can initialize them manually
+with `highlightBlock(code)` function. It takes a DOM element containing the
+code to highlight and optionally a string with which to replace TAB
+characters.
+
+Initialization using, for example, jQuery might look like this:
+
+```javascript
+$(document).ready(function() {
+  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+});
+```
+
+You can use `highlightBlock` to highlight blocks dynamically inserted into
+the page. Just make sure you don't do it twice for already highlighted
+blocks.
+
+If your code container relies on `<br>` tags instead of line breaks (i.e. if
+it's not `<pre>`) set the `useBR` option to `true`:
+
+```javascript
+hljs.configure({useBR: true});
+$('div.code').each(function(i, e) {hljs.highlightBlock(e)});
+```
+
+
+## Heuristics
+
+Autodetection of a code's language is done using a simple heuristic:
+the program tries to highlight a fragment with all available languages and
+counts all syntactic structures that it finds along the way. The language
+with greatest count wins.
+
+This means that in short fragments the probability of an error is high
+(and it really happens sometimes). In this cases you can set the fragment's
+language explicitly by assigning a class to the `<code>` element:
+
+```html
+<pre><code class="html">...</code></pre>
+```
+
+You can use class names recommended in HTML5: "language-html",
+"language-php". Classes also can be assigned to the `<pre>` element.
+
+To disable highlighting of a fragment altogether use "no-highlight" class:
+
+```html
+<pre><code class="no-highlight">...</code></pre>
+```
+
+
+## Export
+
+File export.html contains a little program that allows you to paste in a code
+snippet and then copy and paste the resulting HTML code generated by the
+highlighter. This is useful in situations when you can't use the script itself
+on a site.
+
+
+## Meta
+
+- Version: 8.0
+- URL:     http://highlightjs.org/
+
+For the license terms see LICENSE files.
+For authors and contributors see AUTHORS.en.txt file.
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/README.ru.md b/src/plugins/wiki/www/themes/default/highlight.js/README.ru.md
new file mode 100644
index 0000000..0d0e0fe
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/README.ru.md
@@ -0,0 +1,171 @@
+# Highlight.js
+
+Highlight.js нужен для подсветки синтаксиса в примерах кода в блогах,
+форумах и вообще на любых веб-страницах. Пользоваться им очень просто,
+потому что работает он автоматически: сам находит блоки кода, сам
+определяет язык, сам подсвечивает.
+
+Автоопределением языка можно управлять, когда оно не справляется само (см.
+дальше "Эвристика").
+
+
+## Простое использование
+
+Подключите библиотеку и стиль на страницу и повесть вызов подсветки на
+загрузку страницы:
+
+```html
+<link rel="stylesheet" href="styles/default.css">
+<script src="highlight.pack.js"></script>
+<script>hljs.initHighlightingOnLoad();</script>
+```
+
+Весь код на странице, обрамлённый в теги `<pre><code> .. </code></pre>`
+будет автоматически подсвечен. Если вы используете другие теги или хотите
+подсвечивать блоки кода динамически, читайте "Инициализацию вручную" ниже.
+
+- Вы можете скачать собственную версию "highlight.pack.js" или сослаться
+  на захостенный файл, как описано на странице загрузки:
+  <http://highlightjs.org/download/>
+
+- Стилевые темы можно найти в загруженном архиве или также использовать
+  захостенные. Чтобы сделать собственный стиль для своего сайта, вам
+  будет полезен [CSS classes reference][cr], который тоже есть в архиве.
+
+[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
+
+
+## node.js
+
+Highlight.js можно использовать в node.js. Библиотеку со всеми возможными языками можно
+установить с NPM:
+
+    npm install highlight.js
+
+Также её можно собрать из исходников с только теми языками, которые нужны:
+
+    python3 tools/build.py -tnode lang1 lang2 ..
+
+Использование библиотеки:
+
+```javascript
+var hljs = require('highlight.js');
+
+// Если вы знаете язык
+hljs.highlight(lang, code).value;
+
+// Автоопределение языка
+hljs.highlightAuto(code).value;
+```
+
+
+## AMD
+
+Highlight.js можно использовать с загрузчиком AMD-модулей.  Для этого его
+нужно собрать из исходников следующей командой:
+
+```bash
+$ python3 tools/build.py -tamd lang1 lang2 ..
+```
+
+Она создаст файл `build/highlight.pack.js`, который является загружаемым
+AMD-модулем и содержит все выбранные при сборке языки. Используется он так:
+
+```javascript
+require(["highlight.js/build/highlight.pack"], function(hljs){
+
+  // Если вы знаете язык
+  hljs.highlight(lang, code).value;
+
+  // Автоопределение языка
+  hljs.highlightAuto(code).value;
+});
+```
+
+
+## Замена TABов
+
+Также вы можете заменить символы TAB ('\x09'), используемые для отступов, на
+фиксированное количество пробелов или на отдельный `<span>`, чтобы задать ему
+какой-нибудь специальный стиль:
+
+```html
+<script type="text/javascript">
+  hljs.configure({tabReplace: '    '}); // 4 spaces
+  // ... or
+  hljs.configure({tabReplace: '<span class="indent">\t</span>'});
+
+  hljs.initHighlightingOnLoad();
+</script>
+```
+
+
+## Инициализация вручную
+
+Если вы используете другие теги для блоков кода, вы можете инициализировать их
+явно с помощью функции `highlightBlock(code)`. Она принимает DOM-элемент с
+текстом расцвечиваемого кода и опционально - строчку для замены символов TAB.
+
+Например с использованием jQuery код инициализации может выглядеть так:
+
+```javascript
+$(document).ready(function() {
+  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});
+});
+```
+
+`highlightBlock` можно также использовать, чтобы подсветить блоки кода,
+добавленные на страницу динамически. Только убедитесь, что вы не делаете этого
+повторно для уже раскрашенных блоков.
+
+Если ваш блок кода использует `<br>` вместо переводов строки (т.е. если это не
+`<pre>`), включите опцию `useBR`:
+
+```javascript
+hljs.configure({useBR: true});
+$('div.code').each(function(i, e) {hljs.highlightBlock(e)});
+```
+
+
+## Эвристика
+
+Определение языка, на котором написан фрагмент, делается с помощью
+довольно простой эвристики: программа пытается расцветить фрагмент всеми
+языками подряд, и для каждого языка считает количество подошедших
+синтаксически конструкций и ключевых слов. Для какого языка нашлось больше,
+тот и выбирается.
+
+Это означает, что в коротких фрагментах высока вероятность ошибки, что
+периодически и случается. Чтобы указать язык фрагмента явно, надо написать
+его название в виде класса к элементу `<code>`:
+
+```html
+<pre><code class="html">...</code></pre>
+```
+
+Можно использовать рекомендованные в HTML5 названия классов:
+"language-html", "language-php". Также можно назначать классы на элемент
+`<pre>`.
+
+Чтобы запретить расцветку фрагмента вообще, используется класс "no-highlight":
+
+```html
+<pre><code class="no-highlight">...</code></pre>
+```
+
+
+## Экспорт
+
+В файле export.html находится небольшая программка, которая показывает и дает
+скопировать непосредственно HTML-код подсветки для любого заданного фрагмента кода.
+Это может понадобится например на сайте, на котором нельзя подключить сам скрипт
+highlight.js.
+
+
+## Координаты
+
+- Версия: 8.0
+- URL:    http://highlightjs.org/
+
+Лицензионное соглашение читайте в файле LICENSE.
+Список авторов и соавторов читайте в файле AUTHORS.ru.txt
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/highlight.pack.js b/src/plugins/wiki/www/themes/default/highlight.js/highlight.pack.js
new file mode 100644
index 0000000..d8acc5c
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/highlight.pack.js
@@ -0,0 +1 @@
+var hljs=new function(){function k(v){return v.replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">")}function t(v){return v.nodeName.toLowerCase()}function i(w,x){var v=w&&w.exec(x);return v&&v.index==0}function d(v){return Array.prototype.map.call(v.childNodes,function(w){if(w.nodeType==3){return b.useBR?w.nodeValue.replace(/\n/g,""):w.nodeValue}if(t(w)=="br"){return"\n"}return d(w)}).join("")}function r(w){var v=(w.className+" "+(w.parentNode?w.parentNode.className:"")).split(/\s+/);v=v.map(function(x){return x.replace(/^language-/,"")});return v.filter(function(x){return j(x)||x=="no-highlight"})[0]}function o(x,y){var v={};for(var w in x){v[w]=x[w]}if(y){for(var w in y){v[w]=y[w]}}return v}function u(x){var v=[];(function w(y,z){for(var A=y.firstChild;A;A=A.nextSibling){if(A.nodeType==3){z+=A.nodeValue.length}else{if(t(A)=="br"){z+=1}else{if(A.nodeType==1){v.push({event:"start",offset:z,node:A});z=w(A,z);v.push({event:"stop",offset:z,node:A})}}}}return z})(x,0);return v}function q(w,y,C){var x=0;var F="";var z=[];function B(){if(!w.length||!y.length){return w.length?w:y}if(w[0].offset!=y[0].offset){return(w[0].offset<y[0].offset)?w:y}return y[0].event=="start"?w:y}function A(H){function G(I){return" "+I.nodeName+'="'+k(I.value)+'"'}F+="<"+t(H)+Array.prototype.map.call(H.attributes,G).join("")+">"}function E(G){F+="</"+t(G)+">"}function v(G){(G.event=="start"?A:E)(G.node)}while(w.length||y.length){var D=B();F+=k(C.substr(x,D[0].offset-x));x=D[0].offset;if(D==w){z.reverse().forEach(E);do{v(D.splice(0,1)[0]);D=B()}while(D==w&&D.length&&D[0].offset==x);z.reverse().forEach(A)}else{if(D[0].event=="start"){z.push(D[0].node)}else{z.pop()}v(D.splice(0,1)[0])}}return F+k(C.substr(x))}function m(y){function v(z){return(z&&z.source)||z}function w(A,z){return RegExp(v(A),"m"+(y.cI?"i":"")+(z?"g":""))}function x(D,C){if(D.compiled){return}D.compiled=true;D.k=D.k||D.bK;if(D.k){var z={};function E(G,F){if(y.cI){F=F.toLowerCase()}F.split(" ").forEach(function(H){var I=H.split("|");z[I[0]]=[G,I[1]?Number(I[1]):1]})}if(typeof D.k=="string"){E("keyword",D.k)}else{Object.keys(D.k).forEach(function(F){E(F,D.k[F])})}D.k=z}D.lR=w(D.l||/\b[A-Za-z0-9_]+\b/,true);if(C){if(D.bK){D.b=D.bK.split(" ").join("|")}if(!D.b){D.b=/\B|\b/}D.bR=w(D.b);if(!D.e&&!D.eW){D.e=/\B|\b/}if(D.e){D.eR=w(D.e)}D.tE=v(D.e)||"";if(D.eW&&C.tE){D.tE+=(D.e?"|":"")+C.tE}}if(D.i){D.iR=w(D.i)}if(D.r===undefined){D.r=1}if(!D.c){D.c=[]}var B=[];D.c.forEach(function(F){if(F.v){F.v.forEach(function(G){B.push(o(F,G))})}else{B.push(F=="self"?D:F)}});D.c=B;D.c.forEach(function(F){x(F,D)});if(D.starts){x(D.starts,C)}var A=D.c.map(function(F){return F.bK?"\\.?\\b("+F.b+")\\b\\.?":F.b}).concat([D.tE]).concat([D.i]).map(v).filter(Boolean);D.t=A.length?w(A.join("|"),true):{exec:function(F){return null}};D.continuation={}}x(y)}function c(S,L,J,R){function v(U,V){for(var T=0;T<V.c.length;T++){if(i(V.c[T].bR,U)){return V.c[T]}}}function z(U,T){if(i(U.eR,T)){return U}if(U.eW){return z(U.parent,T)}}function A(T,U){return !J&&i(U.iR,T)}function E(V,T){var U=M.cI?T[0].toLowerCase():T[0];return V.k.hasOwnProperty(U)&&V.k[U]}function w(Z,X,W,V){var T=V?"":b.classPrefix,U='<span class="'+T,Y=W?"":"</span>";U+=Z+'">';return U+X+Y}function N(){var U=k(C);if(!I.k){return U}var T="";var X=0;I.lR.lastIndex=0;var V=I.lR.exec(U);while(V){T+=U.substr(X,V.index-X);var W=E(I,V);if(W){H+=W[1];T+=w(W[0],V[0])}else{T+=V[0]}X=I.lR.lastIndex;V=I.lR.exec(U)}return T+U.substr(X)}function F(){if(I.sL&&!f[I.sL]){return k(C)}var T=I.sL?c(I.sL,C,true,I.continuation.top):g(C);if(I.r>0){H+=T.r}if(I.subLanguageMode=="continuous"){I.continuation.top=T.top}return w(T.language,T.value,false,true)}function Q(){return I.sL!==undefined?F():N()}function P(V,U){var T=V.cN?w(V.cN,"",true):"";if(V.rB){D+=T;C=""}else{if(V.eB){D+=k(U)+T;C=""}else{D+=T;C=U}}I=Object.create(V,{parent:{value:I}})}function G(T,X){C+=T;if(X===undefined){D+=Q();return 0}var V=v(X,I);if(V){D+=Q();P(V,X);return V.rB?0:X.length}var W=z(I,X);if(W){var U=I;if(!(U.rE||U.eE)){C+=X}D+=Q();do{if(I.cN){D+="</span>"}H+=I.r;I=I.parent}while(I!=W.parent);if(U.eE){D+=k(X)}C="";if(W.starts){P(W.starts,"")}return U.rE?0:X.length}if(A(X,I)){throw new Error('Illegal lexeme "'+X+'" for mode "'+(I.cN||"<unnamed>")+'"')}C+=X;return X.length||1}var M=j(S);if(!M){throw new Error('Unknown language: "'+S+'"')}m(M);var I=R||M;var D="";for(var K=I;K!=M;K=K.parent){if(K.cN){D=w(K.cN,D,true)}}var C="";var H=0;try{var B,y,x=0;while(true){I.t.lastIndex=x;B=I.t.exec(L);if(!B){break}y=G(L.substr(x,B.index-x),B[0]);x=B.index+y}G(L.substr(x));for(var K=I;K.parent;K=K.parent){if(K.cN){D+="</span>"}}return{r:H,value:D,language:S,top:I}}catch(O){if(O.message.indexOf("Illegal")!=-1){return{r:0,value:k(L)}}else{throw O}}}function g(y,x){x=x||b.languages||Object.keys(f);var v={r:0,value:k(y)};var w=v;x.forEach(function(z){if(!j(z)){return}var A=c(z,y,false);A.language=z;if(A.r>w.r){w=A}if(A.r>v.r){w=v;v=A}});if(w.language){v.second_best=w}return v}function h(v){if(b.tabReplace){v=v.replace(/^((<[^>]+>|\t)+)/gm,function(w,z,y,x){return z.replace(/\t/g,b.tabReplace)})}if(b.useBR){v=v.replace(/\n/g,"<br>")}return v}function p(z){var y=d(z);var A=r(z);if(A=="no-highlight"){return}var v=A?c(A,y,true):g(y);var w=u(z);if(w.length){var x=document.createElementNS("http://www.w3.org/1999/xhtml","pre");x.innerHTML=v.value;v.value=q(w,u(x),y)}v.value=h(v.value);z.innerHTML=v.value;z.className+=" hljs "+(!A&&v.language||"");z.result={language:v.language,re:v.r};if(v.second_best){z.second_best={language:v.second_best.language,re:v.second_best.r}}}var b={classPrefix:"hljs-",tabReplace:null,useBR:false,languages:undefined};function s(v){b=o(b,v)}function l(){if(l.called){return}l.called=true;var v=document.querySelectorAll("pre code");Array.prototype.forEach.call(v,p)}function a(){addEventListener("DOMContentLoaded",l,false);addEventListener("load",l,false)}var f={};var n={};function e(v,x){var w=f[v]=x(this);if(w.aliases){w.aliases.forEach(function(y){n[y]=v})}}function j(v){return f[v]||f[n[v]]}this.highlight=c;this.highlightAuto=g;this.fixMarkup=h;this.highlightBlock=p;this.configure=s;this.initHighlighting=l;this.initHighlightingOnLoad=a;this.registerLanguage=e;this.getLanguage=j;this.inherit=o;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE]};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE]};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.TM={cN:"title",b:this.IR,r:0};this.UTM={cN:"title",b:this.UIR,r:0}}();hljs.registerLanguage("bash",function(b){var a={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)\}/}]};var d={cN:"string",b:/"/,e:/"/,c:[b.BE,a,{cN:"variable",b:/\$\(/,e:/\)/,c:[b.BE]}]};var c={cN:"string",b:/'/,e:/'/};return{l:/-?[a-z\.]+/,k:{keyword:"if then else elif fi for break continue while in do done exit return set declare case esac export exec",literal:"true false",built_in:"printf echo read cd pwd pushd popd dirs let eval unset typeset readonly getopts source shopt caller type hash bind help sudo",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"shebang",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:true,c:[b.inherit(b.TM,{b:/\w[\w\d_]*/})],r:0},b.HCM,b.NM,d,c,a]}});hljs.registerLanguage("cs",function(b){var a="abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async await ascending descending from get group into join let orderby partial select set value var where yield";return{k:a,c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"///|<!--|-->"},{cN:"xmlDocTag",b:"</?",e:">"}]},b.CLCM,b.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},b.ASM,b.QSM,b.CNM,{bK:"protected public private internal",e:/[{;=]/,k:a,c:[{bK:"class namespace interface",starts:{c:[b.TM]}},{b:b.IR+"\\s*\\(",rB:true,c:[b.TM]}]}]}});hljs.registerLanguage("ruby",function(e){var h="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor";var a={cN:"yardoctag",b:"@[A-Za-z]+"};var i={cN:"comment",v:[{b:"#",e:"$",c:[a]},{b:"^\\=begin",e:"^\\=end",c:[a],r:10},{b:"^__END__",e:"\\n$"}]};var c={cN:"subst",b:"#\\{",e:"}",k:g};var d={cN:"string",c:[e.BE,c],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:"%[qw]?\\(",e:"\\)"},{b:"%[qw]?\\[",e:"\\]"},{b:"%[qw]?{",e:"}"},{b:"%[qw]?<",e:">",r:10},{b:"%[qw]?/",e:"/",r:10},{b:"%[qw]?%",e:"%",r:10},{b:"%[qw]?-",e:"-",r:10},{b:"%[qw]?\\|",e:"\\|",r:10},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]};var b={cN:"params",b:"\\(",e:"\\)",k:g};var f=[d,i,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]},i]},{cN:"function",bK:"def",e:" |$|;",r:0,c:[e.inherit(e.TM,{b:h}),b,i]},{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[d,{b:h}],r:0},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:[i,{cN:"regexp",c:[e.BE,c],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];c.c=f;b.c=f;return{k:g,c:f}});hljs.registerLanguage("diff",function(a){return{c:[{cN:"chunk",r:10,v:[{b:/^\@\@ +\-\d+,\d+ +\+\d+,\d+ +\@\@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"header",v:[{b:/Index: /,e:/$/},{b:/=====/,e:/=====$/},{b:/^\-\-\-/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+\+\+/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}});hljs.registerLanguage("javascript",function(a){return{aliases:["js"],k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require"},c:[{cN:"pi",b:/^\s*('|")use strict('|")/,r:10},a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/</,e:/>;/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,c:[a.inherit(a.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+a.IR,r:0}]}});hljs.registerLanguage("xml",function(a){var c="[A-Za-z0-9\\._:-]+";var d={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php",subLanguageMode:"continuous"};var b={eW:true,i:/</,r:0,c:[d,{cN:"attribute",b:c,r:0},{b:"=",r:0,c:[{cN:"value",v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html"],cI:true,c:[{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},d,{cN:"pi",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ /><]+",r:0},b]}]}});hljs.registerLanguage("markdown",function(a){return{c:[{cN:"header",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"blockquote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{cN:"horizontal_rule",b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].+?[\\)\\]]",rB:true,c:[{cN:"link_label",b:"\\[",e:"\\]",eB:true,rE:true,r:0},{cN:"link_url",b:"\\]\\(",e:"\\)",eB:true,eE:true},{cN:"link_reference",b:"\\]\\[",e:"\\]",eB:true,eE:true,}],r:10},{b:"^\\[.+\\]:",e:"$",rB:true,c:[{cN:"link_reference",b:"\\[",e:"\\]",eB:true,eE:true},{cN:"link_url",b:"\\s",e:"$"}]}]}});hljs.registerLanguage("css",function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}});hljs.registerLanguage("http",function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}});hljs.registerLanguage("java",function(b){var a="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws";return{k:a,i:/<\//,c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"(^|\\s)@[A-Za-z]+"}],r:10},b.CLCM,b.CBLCLM,b.ASM,b.QSM,{bK:"protected public private",e:/[{;=]/,k:a,c:[{cN:"class",bK:"class interface",eW:true,i:/[:"<>]/,c:[{bK:"extends implements",r:10},b.UTM]},{b:b.UIR+"\\s*\\(",rB:true,c:[b.UTM]}]},b.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("php",function(b){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var a={cN:"preprocessor",b:/<\?(php)?|\?>/};var c={cN:"string",c:[b.BE,a],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},b.inherit(b.ASM,{i:null}),b.inherit(b.QSM,{i:null})]};var d={v:[b.BNM,b.CNM]};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[b.CLCM,b.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"},a]},{cN:"comment",b:"__halt_compiler.+?;",eW:true,k:"__halt_compiler",l:b.UIR},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[b.BE]},a,e,{cN:"function",bK:"function",e:/[;{]/,i:"\\$|\\[|%",c:[b.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e,b.CBLCLM,c,d]}]},{cN:"class",bK:"class interface",e:"{",i:/[:\(\$"]/,c:[{bK:"extends implements",r:10},b.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[b.UTM]},{bK:"use",e:";",c:[b.UTM]},{b:"=>"},c,d]}});hljs.registerLanguage("python",function(a){var f={cN:"prompt",b:/^(>>>|\.\.\.) /};var b={cN:"string",c:[a.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[f],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[f],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/,},{b:/(b|br)"/,e:/"/,},a.ASM,a.QSM]};var d={cN:"number",r:0,v:[{b:a.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:a.CNR+"[lLjJ]?"}]};var e={cN:"params",b:/\(/,e:/\)/,c:["self",f,d,b]};var c={e:/:/,i:/[${=;\n]/,c:[a.UTM,e]};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)/,c:[f,d,b,a.HCM,a.inherit(c,{cN:"function",bK:"def",r:10}),a.inherit(c,{cN:"class",bK:"class"}),{cN:"decorator",b:/@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("sql",function(a){return{cI:true,i:/[<>]/,c:[{cN:"operator",b:"\\b(begin|end|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant|merge)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number trigger if before after each row merge matched database",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}});hljs.registerLanguage("ini",function(a){return{cI:true,i:/\S/,c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM],r:0}]}]}});hljs.registerLanguage("perl",function(c){var d="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var f={cN:"subst",b:"[$@]\\{",e:"\\}",k:d};var g={b:"->{",e:"}"};var a={cN:"variable",v:[{b:/\$\d/},{b:/[\$\%\@\*](\^\w\b|#\w+(\:\:\w+)*|{\w+}|\w+(\:\:\w*)*)/},{b:/[\$\%\@\*][^\s\w{]/,r:0}]};var e={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var h=[c.BE,f,a];var b=[a,c.HCM,e,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},g,{cN:"string",c:h,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[c.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[c.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+c.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[c.HCM,e,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[c.BE],r:0}]},{cN:"sub",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",r:5},{cN:"operator",b:"-\\w\\b",r:0}];f.c=b;g.c=b;return{k:d,c:b}});hljs.registerLanguage("objectivec",function(a){var d={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign self synchronized id nonatomic super unichar IBOutlet IBAction strong weak @private @protected @public @try @property @end @throw @catch @finally @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"NSString NSDictionary CGRect CGPoint UIButton UILabel UITextView UIWebView MKMapView UISegmentedControl NSObject UITableViewDelegate UITableViewDataSource NSThread UIActivityIndicator UITabbar UIToolBar UIBarButtonItem UIImageView NSAutoreleasePool UITableView BOOL NSInteger CGFloat NSException NSLog NSMutableString NSMutableArray NSMutableDictionary NSURL NSIndexPath CGSize UITableViewCell UIView UIViewController UINavigationBar UINavigationController UITabBarController UIPopoverController UIPopoverControllerDelegate UIImage NSNumber UISearchBar NSFetchedResultsController NSFetchedResultsChangeType UIScrollView UIScrollViewDelegate UIEdgeInsets UIColor UIFont UIApplication NSNotFound NSNotificationCenter NSNotification UILocalNotification NSBundle NSFileManager NSTimeInterval NSDate NSCalendar NSUserDefaults UIWindow NSRange NSArray NSError NSURLRequest NSURLConnection UIInterfaceOrientation MPMoviePlayerController dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"};var c=/[a-zA-Z@][a-zA-Z0-9_]*/;var b="@interface @class @protocol @implementation";return{k:d,l:c,i:"</",c:[a.CLCM,a.CBLCLM,a.CNM,a.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"preprocessor",b:"#import",e:"$",c:[{cN:"title",b:'"',e:'"'},{cN:"title",b:"<",e:">"}]},{cN:"preprocessor",b:"#",e:"$"},{cN:"class",b:"("+b.split(" ").join("|")+")\\b",e:"({|$)",k:b,l:c,c:[a.UTM]},{cN:"variable",b:"\\."+a.UIR,r:0}]}});hljs.registerLanguage("coffeescript",function(c){var b={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",reserved:"case default function var void with const let enum export import native __hasProp __extends __slice __bind __indexOf",built_in:"npm require console print module exports global window document"};var a="[A-Za-z$_][0-9A-Za-z$_]*";var f=c.inherit(c.TM,{b:a});var e={cN:"subst",b:/#\{/,e:/}/,k:b};var d=[c.BNM,c.inherit(c.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[c.BE]},{b:/'/,e:/'/,c:[c.BE]},{b:/"""/,e:/"""/,c:[c.BE,e]},{b:/"/,e:/"/,c:[c.BE,e]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[e,c.HCM]},{b:"//[gim]*",r:0},{b:"/\\S(\\\\.|[^\\n])*?/[gim]*(?=\\s|\\W|$)"}]},{cN:"property",b:"@"+a},{b:"`",e:"`",eB:true,eE:true,sL:"javascript"}];e.c=d;return{k:b,c:d.concat([{cN:"comment",b:"###",e:"###"},c.HCM,{cN:"function",b:"("+a+"\\s*=\\s*)?(\\(.*\\))?\\s*\\B[-=]>",e:"[-=]>",rB:true,c:[f,{cN:"params",b:"\\(",rB:true,c:[{b:/\(/,e:/\)/,k:b,c:["self"].concat(d)}]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:true,i:/[:="\[\]]/,c:[f]},f]},{cN:"attribute",b:a+":",e:":",rB:true,eE:true,r:0}])}});hljs.registerLanguage("nginx",function(c){var b={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+c.UIR}]};var a={eW:true,l:"[a-z/_]+",k:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[c.HCM,{cN:"string",c:[c.BE,b],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{cN:"url",b:"([a-z]+):/",e:"\\s",eW:true,eE:true},{cN:"regexp",c:[c.BE,b],v:[{b:"\\s\\^",e:"\\s|{|;",rE:true},{b:"~\\*?\\s+",e:"\\s|{|;",rE:true},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},b]};return{c:[c.HCM,{b:c.UIR+"\\s",e:";|{",rB:true,c:[c.inherit(c.UTM,{starts:a})],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("json",function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}});hljs.registerLanguage("apache",function(a){var b={cN:"number",b:"[\\$%]\\d+"};return{cI:true,c:[a.HCM,{cN:"tag",b:"</?",e:">"},{cN:"keyword",b:/\w+/,r:0,k:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"sqbracket",b:"\\s\\[",e:"\\]$"},{cN:"cbracket",b:"[\\$%]\\{",e:"\\}",c:["self",b]},b,a.QSM]}}],i:/\S/}});hljs.registerLanguage("cpp",function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex _Complex _Imaginary",built_in:"std string cin cout cerr clog stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf"};return{aliases:["c"],k:b,i:"</",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},a.CNM,{cN:"preprocessor",b:"#",e:"$",c:[{b:"include\\s*<",e:">",i:"\\n"},a.CLCM]},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,r:10,c:["self"]}]}});hljs.registerLanguage("makefile",function(a){var b={cN:"variable",b:/\$\(/,e:/\)/,c:[a.BE]};return{c:[a.HCM,{b:/^\w+\s*\W*=/,rB:true,r:0,starts:{cN:"constant",e:/\s*\W*=/,eE:true,starts:{e:/$/,r:0,c:[b],}}},{cN:"title",b:/^[\w]+:\s*$/},{cN:"phony",b:/^\.PHONY:/,e:/$/,k:".PHONY",l:/[\.\w]+/},{b:/^\t+/,e:/$/,c:[a.QSM,b]}]}});
\ No newline at end of file
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/arta.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/arta.css
new file mode 100644
index 0000000..02db86a
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/arta.css
@@ -0,0 +1,160 @@
+/*
+Date: 17.V.2011
+Author: pumbur <pumbur at pumbur.net>
+*/
+
+.hljs
+{
+  display: block; padding: 0.5em;
+  background: #222;
+}
+
+.profile .hljs-header *,
+.ini .hljs-title,
+.nginx .hljs-title
+{
+  color: #fff;
+}
+
+.hljs-comment,
+.hljs-javadoc,
+.hljs-preprocessor,
+.hljs-preprocessor .hljs-title,
+.hljs-pragma,
+.hljs-shebang,
+.profile .hljs-summary,
+.diff,
+.hljs-pi,
+.hljs-doctype,
+.hljs-tag,
+.hljs-template_comment,
+.css .hljs-rules,
+.tex .hljs-special
+{
+  color: #444;
+}
+
+.hljs-string,
+.hljs-symbol,
+.diff .hljs-change,
+.hljs-regexp,
+.xml .hljs-attribute,
+.smalltalk .hljs-char,
+.xml .hljs-value,
+.ini .hljs-value,
+.clojure .hljs-attribute,
+.coffeescript .hljs-attribute
+{
+  color: #ffcc33;
+}
+
+.hljs-number,
+.hljs-addition
+{
+  color: #00cc66;
+}
+
+.hljs-built_in,
+.hljs-literal,
+.vhdl .hljs-typename,
+.go .hljs-constant,
+.go .hljs-typename,
+.ini .hljs-keyword,
+.lua .hljs-title,
+.perl .hljs-variable,
+.php .hljs-variable,
+.mel .hljs-variable,
+.django .hljs-variable,
+.css .funtion,
+.smalltalk .method,
+.hljs-hexcolor,
+.hljs-important,
+.hljs-flow,
+.hljs-inheritance,
+.parser3 .hljs-variable
+{
+  color: #32AAEE;
+}
+
+.hljs-keyword,
+.hljs-tag .hljs-title,
+.css .hljs-tag,
+.css .hljs-class,
+.css .hljs-id,
+.css .hljs-pseudo,
+.css .hljs-attr_selector,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.hljs-winutils,
+.tex .hljs-command,
+.hljs-request,
+.hljs-status
+{
+  color: #6644aa;
+}
+
+.hljs-title,
+.ruby .hljs-constant,
+.vala .hljs-constant,
+.hljs-parent,
+.hljs-deletion,
+.hljs-template_tag,
+.css .hljs-keyword,
+.objectivec .hljs-class .hljs-id,
+.smalltalk .hljs-class,
+.lisp .hljs-keyword,
+.apache .hljs-tag,
+.nginx .hljs-variable,
+.hljs-envvar,
+.bash .hljs-variable,
+.go .hljs-built_in,
+.vbscript .hljs-built_in,
+.lua .hljs-built_in,
+.rsl .hljs-built_in,
+.tail,
+.avrasm .hljs-label,
+.tex .hljs-formula,
+.tex .hljs-formula *
+{
+  color: #bb1166;
+}
+
+.hljs-yardoctag,
+.hljs-phpdoc,
+.profile .hljs-header,
+.ini .hljs-title,
+.apache .hljs-tag,
+.parser3 .hljs-title
+{
+  font-weight: bold;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata
+{
+  opacity: 0.6;
+}
+
+.hljs,
+.javascript,
+.css,
+.xml,
+.hljs-subst,
+.diff .hljs-chunk,
+.css .hljs-value,
+.css .hljs-attribute,
+.lisp .hljs-string,
+.lisp .hljs-number,
+.tail .hljs-params,
+.hljs-container,
+.haskell *,
+.erlang *,
+.erlang_repl *
+{
+  color: #aaa;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/ascetic.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/ascetic.css
new file mode 100644
index 0000000..031c88a
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/ascetic.css
@@ -0,0 +1,50 @@
+/*
+
+Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Org>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: white; color: black;
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-filter .hljs-argument,
+.hljs-addition,
+.hljs-change,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.nginx .hljs-built_in,
+.tex .hljs-formula {
+  color: #888;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.hljs-shebang,
+.hljs-doctype,
+.hljs-pi,
+.hljs-javadoc,
+.hljs-deletion,
+.apache .hljs-sqbracket {
+  color: #CCC;
+}
+
+.hljs-keyword,
+.hljs-tag .hljs-title,
+.ini .hljs-title,
+.lisp .hljs-title,
+.clojure .hljs-title,
+.http .hljs-title,
+.nginx .hljs-title,
+.css .hljs-tag,
+.hljs-winutils,
+.hljs-flow,
+.apache .hljs-tag,
+.tex .hljs-command,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-dune.dark.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-dune.dark.css
new file mode 100644
index 0000000..2779601
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-dune.dark.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Dune Dark - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Dune Dark Comment */
+.hljs-comment,
+.hljs-title {
+  color: #999580;
+}
+
+/* Atelier Dune Dark Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #d73737;
+}
+
+/* Atelier Dune Dark Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #b65611;
+}
+
+/* Atelier Dune Dark Yellow */
+.ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #cfb017;
+}
+
+/* Atelier Dune Dark Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #60ac39;
+}
+
+/* Atelier Dune Dark Aqua */
+.css .hljs-hexcolor {
+  color: #1fad83;
+}
+
+/* Atelier Dune Dark Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #6684e1;
+}
+
+/* Atelier Dune Dark Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #b854d4;
+}
+
+.hljs {
+  display: block;
+  background: #292824;
+  color: #a6a28c;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-dune.light.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-dune.light.css
new file mode 100644
index 0000000..11c7423
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-dune.light.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Dune Light - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Dune Light Comment */
+.hljs-comment,
+.hljs-title {
+  color: #7d7a68;
+}
+
+/* Atelier Dune Light Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #d73737;
+}
+
+/* Atelier Dune Light Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #b65611;
+}
+
+/* Atelier Dune Light Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #cfb017;
+}
+
+/* Atelier Dune Light Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #60ac39;
+}
+
+/* Atelier Dune Light Aqua */
+.css .hljs-hexcolor {
+  color: #1fad83;
+}
+
+/* Atelier Dune Light Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #6684e1;
+}
+
+/* Atelier Dune Light Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #b854d4;
+}
+
+.hljs {
+  display: block;
+  background: #fefbec;
+  color: #6e6b5e;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-forest.dark.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-forest.dark.css
new file mode 100644
index 0000000..c1f7211
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-forest.dark.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Forest Dark - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Forest Dark Comment */
+.hljs-comment,
+.hljs-title {
+  color: #9c9491;
+}
+
+/* Atelier Forest Dark Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #f22c40;
+}
+
+/* Atelier Forest Dark Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #df5320;
+}
+
+/* Atelier Forest Dark Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #d5911a;
+}
+
+/* Atelier Forest Dark Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #5ab738;
+}
+
+/* Atelier Forest Dark Aqua */
+.css .hljs-hexcolor {
+  color: #00ad9c;
+}
+
+/* Atelier Forest Dark Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #407ee7;
+}
+
+/* Atelier Forest Dark Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #6666ea;
+}
+
+.hljs {
+  display: block;
+  background: #2c2421;
+  color: #a8a19f;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-forest.light.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-forest.light.css
new file mode 100644
index 0000000..806ba73
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-forest.light.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Forest Light - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Forest Light Comment */
+.hljs-comment,
+.hljs-title {
+  color: #766e6b;
+}
+
+/* Atelier Forest Light Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #f22c40;
+}
+
+/* Atelier Forest Light Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #df5320;
+}
+
+/* Atelier Forest Light Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #d5911a;
+}
+
+/* Atelier Forest Light Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #5ab738;
+}
+
+/* Atelier Forest Light Aqua */
+.css .hljs-hexcolor {
+  color: #00ad9c;
+}
+
+/* Atelier Forest Light Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #407ee7;
+}
+
+/* Atelier Forest Light Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #6666ea;
+}
+
+.hljs {
+  display: block;
+  background: #f1efee;
+  color: #68615e;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-heath.dark.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-heath.dark.css
new file mode 100644
index 0000000..3670669
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-heath.dark.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Heath Dark - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Heath Dark Comment */
+.hljs-comment,
+.hljs-title {
+  color: #9e8f9e;
+}
+
+/* Atelier Heath Dark Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #ca402b;
+}
+
+/* Atelier Heath Dark Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #a65926;
+}
+
+/* Atelier Heath Dark Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #bb8a35;
+}
+
+/* Atelier Heath Dark Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #379a37;
+}
+
+/* Atelier Heath Dark Aqua */
+.css .hljs-hexcolor {
+  color: #159393;
+}
+
+/* Atelier Heath Dark Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #516aec;
+}
+
+/* Atelier Heath Dark Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #7b59c0;
+}
+
+.hljs {
+  display: block;
+  background: #292329;
+  color: #ab9bab;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-heath.light.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-heath.light.css
new file mode 100644
index 0000000..e73a0b8
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-heath.light.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Heath Light - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Heath Light Comment */
+.hljs-comment,
+.hljs-title {
+  color: #776977;
+}
+
+/* Atelier Heath Light Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #ca402b;
+}
+
+/* Atelier Heath Light Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #a65926;
+}
+
+/* Atelier Heath Light Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #bb8a35;
+}
+
+/* Atelier Heath Light Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #379a37;
+}
+
+/* Atelier Heath Light Aqua */
+.css .hljs-hexcolor {
+  color: #159393;
+}
+
+/* Atelier Heath Light Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #516aec;
+}
+
+/* Atelier Heath Light Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #7b59c0;
+}
+
+.hljs {
+  display: block;
+  background: #f7f3f7;
+  color: #695d69;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-lakeside.dark.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-lakeside.dark.css
new file mode 100644
index 0000000..8506246
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-lakeside.dark.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Lakeside Dark - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Lakeside Dark Comment */
+.hljs-comment,
+.hljs-title {
+  color: #7195a8;
+}
+
+/* Atelier Lakeside Dark Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #d22d72;
+}
+
+/* Atelier Lakeside Dark Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #935c25;
+}
+
+/* Atelier Lakeside Dark Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #8a8a0f;
+}
+
+/* Atelier Lakeside Dark Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #568c3b;
+}
+
+/* Atelier Lakeside Dark Aqua */
+.css .hljs-hexcolor {
+  color: #2d8f6f;
+}
+
+/* Atelier Lakeside Dark Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #257fad;
+}
+
+/* Atelier Lakeside Dark Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #5d5db1;
+}
+
+.hljs {
+  display: block;
+  background: #1f292e;
+  color: #7ea2b4;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-lakeside.light.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-lakeside.light.css
new file mode 100644
index 0000000..006ae6d
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-lakeside.light.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Lakeside Light - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Lakeside Light Comment */
+.hljs-comment,
+.hljs-title {
+  color: #5a7b8c;
+}
+
+/* Atelier Lakeside Light Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #d22d72;
+}
+
+/* Atelier Lakeside Light Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #935c25;
+}
+
+/* Atelier Lakeside Light Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #8a8a0f;
+}
+
+/* Atelier Lakeside Light Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #568c3b;
+}
+
+/* Atelier Lakeside Light Aqua */
+.css .hljs-hexcolor {
+  color: #2d8f6f;
+}
+
+/* Atelier Lakeside Light Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #257fad;
+}
+
+/* Atelier Lakeside Light Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #5d5db1;
+}
+
+.hljs {
+  display: block;
+  background: #ebf8ff;
+  color: #516d7b;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-seaside.dark.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-seaside.dark.css
new file mode 100644
index 0000000..cbea6ed
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-seaside.dark.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Seaside Dark - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Seaside Dark Comment */
+.hljs-comment,
+.hljs-title {
+  color: #809980;
+}
+
+/* Atelier Seaside Dark Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #e6193c;
+}
+
+/* Atelier Seaside Dark Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #87711d;
+}
+
+/* Atelier Seaside Dark Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #c3c322;
+}
+
+/* Atelier Seaside Dark Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #29a329;
+}
+
+/* Atelier Seaside Dark Aqua */
+.css .hljs-hexcolor {
+  color: #1999b3;
+}
+
+/* Atelier Seaside Dark Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #3d62f5;
+}
+
+/* Atelier Seaside Dark Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #ad2bee;
+}
+
+.hljs {
+  display: block;
+  background: #242924;
+  color: #8ca68c;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-seaside.light.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-seaside.light.css
new file mode 100644
index 0000000..159121e
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-seaside.light.css
@@ -0,0 +1,93 @@
+/* Base16 Atelier Seaside Light - Theme */
+/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/) */ 
+/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
+/* https://github.com/jmblog/color-themes-for-highlightjs */
+
+/* Atelier Seaside Light Comment */
+.hljs-comment,
+.hljs-title {
+  color: #687d68;
+}
+
+/* Atelier Seaside Light Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #e6193c;
+}
+
+/* Atelier Seaside Light Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #87711d;
+}
+
+/* Atelier Seaside Light Yellow */
+.hljs-ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #c3c322;
+}
+
+/* Atelier Seaside Light Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #29a329;
+}
+
+/* Atelier Seaside Light Aqua */
+.css .hljs-hexcolor {
+  color: #1999b3;
+}
+
+/* Atelier Seaside Light Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #3d62f5;
+}
+
+/* Atelier Seaside Light Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #ad2bee;
+}
+
+.hljs {
+  display: block;
+  background: #f0fff0;
+  color: #5e6e5e;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/brown_paper.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/brown_paper.css
new file mode 100644
index 0000000..f9541c3
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/brown_paper.css
@@ -0,0 +1,105 @@
+/*
+
+Brown Paper style from goldblog.com.ua (c) Zaripov Yura <yur4ik7 at ukr.net>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background:#b7a68e url(./brown_papersq.png);
+}
+
+.hljs-keyword,
+.hljs-literal,
+.hljs-change,
+.hljs-winutils,
+.hljs-flow,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title,
+.tex .hljs-special,
+.hljs-request,
+.hljs-status {
+  color:#005599;
+  font-weight:bold;
+}
+
+.hljs,
+.hljs-subst,
+.hljs-tag .hljs-keyword {
+  color: #363C69;
+}
+
+.hljs-string,
+.hljs-title,
+.haskell .hljs-type,
+.hljs-tag .hljs-value,
+.css .hljs-rules .hljs-value,
+.hljs-preprocessor,
+.hljs-pragma,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.ruby .hljs-class .hljs-parent,
+.hljs-built_in,
+.sql .hljs-aggregate,
+.django .hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-javadoc,
+.ruby .hljs-string,
+.django .hljs-filter .hljs-argument,
+.smalltalk .hljs-localvars,
+.smalltalk .hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-addition,
+.hljs-stream,
+.hljs-envvar,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-number {
+  color: #2C009F;
+}
+
+.hljs-comment,
+.java .hljs-annotation,
+.python .hljs-decorator,
+.hljs-template_comment,
+.hljs-pi,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in,
+.tex .hljs-formula {
+  color: #802022;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.css .hljs-id,
+.hljs-phpdoc,
+.hljs-title,
+.haskell .hljs-type,
+.vbscript .hljs-built_in,
+.sql .hljs-aggregate,
+.rsl .hljs-built_in,
+.smalltalk .hljs-class,
+.diff .hljs-header,
+.hljs-chunk,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.tex .hljs-command {
+  font-weight: bold;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.8;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/brown_papersq.png b/src/plugins/wiki/www/themes/default/highlight.js/styles/brown_papersq.png
new file mode 100644
index 0000000..3813903
Binary files /dev/null and b/src/plugins/wiki/www/themes/default/highlight.js/styles/brown_papersq.png differ
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/dark.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/dark.css
new file mode 100644
index 0000000..e479d0a
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/dark.css
@@ -0,0 +1,105 @@
+/*
+
+Dark style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Org>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #444;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.hljs-change,
+.hljs-winutils,
+.hljs-flow,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title,
+.tex .hljs-special {
+  color: white;
+}
+
+.hljs,
+.hljs-subst {
+  color: #DDD;
+}
+
+.hljs-string,
+.hljs-title,
+.haskell .hljs-type,
+.ini .hljs-title,
+.hljs-tag .hljs-value,
+.css .hljs-rules .hljs-value,
+.hljs-preprocessor,
+.hljs-pragma,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.ruby .hljs-class .hljs-parent,
+.hljs-built_in,
+.sql .hljs-aggregate,
+.django .hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-javadoc,
+.ruby .hljs-string,
+.django .hljs-filter .hljs-argument,
+.smalltalk .hljs-localvars,
+.smalltalk .hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-addition,
+.hljs-stream,
+.hljs-envvar,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-command,
+.hljs-prompt,
+.coffeescript .hljs-attribute {
+  color: #D88;
+}
+
+.hljs-comment,
+.java .hljs-annotation,
+.python .hljs-decorator,
+.hljs-template_comment,
+.hljs-pi,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.tex .hljs-formula {
+  color: #777;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.hljs-title,
+.css .hljs-id,
+.hljs-phpdoc,
+.haskell .hljs-type,
+.vbscript .hljs-built_in,
+.sql .hljs-aggregate,
+.rsl .hljs-built_in,
+.smalltalk .hljs-class,
+.diff .hljs-header,
+.hljs-chunk,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.tex .hljs-special,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/default.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/default.css
new file mode 100644
index 0000000..3d8485b
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/default.css
@@ -0,0 +1,153 @@
+/*
+
+Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac at SoftwareManiacs.Org>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #F0F0F0;
+}
+
+.hljs,
+.hljs-subst,
+.hljs-tag .hljs-title,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title {
+  color: black;
+}
+
+.hljs-string,
+.hljs-title,
+.hljs-constant,
+.hljs-parent,
+.hljs-tag .hljs-value,
+.hljs-rules .hljs-value,
+.hljs-rules .hljs-value .hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.haml .hljs-symbol,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-aggregate,
+.hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-addition,
+.hljs-flow,
+.hljs-stream,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-command,
+.tex .hljs-special,
+.erlang_repl .hljs-function_or_atom,
+.asciidoc .hljs-header,
+.markdown .hljs-header,
+.coffeescript .hljs-attribute {
+  color: #800;
+}
+
+.smartquote,
+.hljs-comment,
+.hljs-annotation,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-chunk,
+.asciidoc .hljs-blockquote,
+.markdown .hljs-blockquote {
+  color: #888;
+}
+
+.hljs-number,
+.hljs-date,
+.hljs-regexp,
+.hljs-literal,
+.hljs-hexcolor,
+.smalltalk .hljs-symbol,
+.smalltalk .hljs-char,
+.go .hljs-constant,
+.hljs-change,
+.lasso .hljs-variable,
+.makefile .hljs-variable,
+.asciidoc .hljs-bullet,
+.markdown .hljs-bullet,
+.asciidoc .hljs-link_url,
+.markdown .hljs-link_url {
+  color: #080;
+}
+
+.hljs-label,
+.hljs-javadoc,
+.ruby .hljs-string,
+.hljs-decorator,
+.hljs-filter .hljs-argument,
+.hljs-localvars,
+.hljs-array,
+.hljs-attr_selector,
+.hljs-important,
+.hljs-pseudo,
+.hljs-pi,
+.haml .hljs-bullet,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-envvar,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in,
+.tex .hljs-formula,
+.erlang_repl .hljs-reserved,
+.hljs-prompt,
+.asciidoc .hljs-link_label,
+.markdown .hljs-link_label,
+.vhdl .hljs-attribute,
+.clojure .hljs-attribute,
+.asciidoc .hljs-attribute,
+.lasso .hljs-attribute,
+.coffeescript .hljs-property,
+.hljs-phony {
+  color: #88F
+}
+
+.hljs-keyword,
+.hljs-id,
+.hljs-title,
+.hljs-built_in,
+.hljs-aggregate,
+.css .hljs-tag,
+.hljs-javadoctag,
+.hljs-phpdoc,
+.hljs-yardoctag,
+.smalltalk .hljs-class,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.go .hljs-typename,
+.tex .hljs-command,
+.asciidoc .hljs-strong,
+.markdown .hljs-strong,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+}
+
+.asciidoc .hljs-emphasis,
+.markdown .hljs-emphasis {
+  font-style: italic;
+}
+
+.nginx .hljs-built_in {
+  font-weight: normal;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.lasso .markup,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/docco.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/docco.css
new file mode 100644
index 0000000..993fd26
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/docco.css
@@ -0,0 +1,132 @@
+/*
+Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  color: #000;
+  background: #f8f8ff
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-javadoc {
+  color: #408080;
+  font-style: italic
+}
+
+.hljs-keyword,
+.assignment,
+.hljs-literal,
+.css .rule .hljs-keyword,
+.hljs-winutils,
+.javascript .hljs-title,
+.lisp .hljs-title,
+.hljs-subst {
+  color: #954121;
+}
+
+.hljs-number,
+.hljs-hexcolor {
+  color: #40a070
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-phpdoc,
+.tex .hljs-formula {
+  color: #219161;
+}
+
+.hljs-title,
+.hljs-id {
+  color: #19469D;
+}
+.hljs-params {
+  color: #00F;
+}
+
+.javascript .hljs-title,
+.lisp .hljs-title,
+.hljs-subst {
+  font-weight: normal
+}
+
+.hljs-class .hljs-title,
+.haskell .hljs-label,
+.tex .hljs-command {
+  color: #458;
+  font-weight: bold
+}
+
+.hljs-tag,
+.hljs-tag .hljs-title,
+.hljs-rules .hljs-property,
+.django .hljs-tag .hljs-keyword {
+  color: #000080;
+  font-weight: normal
+}
+
+.hljs-attribute,
+.hljs-variable,
+.instancevar,
+.lisp .hljs-body {
+  color: #008080
+}
+
+.hljs-regexp {
+  color: #B68
+}
+
+.hljs-class {
+  color: #458;
+  font-weight: bold
+}
+
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.ruby .hljs-symbol .hljs-keyword,
+.ruby .hljs-symbol .keymethods,
+.lisp .hljs-keyword,
+.tex .hljs-special,
+.input_number {
+  color: #990073
+}
+
+.builtin,
+.constructor,
+.hljs-built_in,
+.lisp .hljs-title {
+  color: #0086b3
+}
+
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-pi,
+.hljs-doctype,
+.hljs-shebang,
+.hljs-cdata {
+  color: #999;
+  font-weight: bold
+}
+
+.hljs-deletion {
+  background: #fdd
+}
+
+.hljs-addition {
+  background: #dfd
+}
+
+.diff .hljs-change {
+  background: #0086b3
+}
+
+.hljs-chunk {
+  color: #aaa
+}
+
+.tex .hljs-formula {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/far.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/far.css
new file mode 100644
index 0000000..ecac3c9
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/far.css
@@ -0,0 +1,113 @@
+/*
+
+FAR Style (c) MajestiC <majestic2k at gmail.com>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #000080;
+}
+
+.hljs,
+.hljs-subst {
+  color: #0FF;
+}
+
+.hljs-string,
+.ruby .hljs-string,
+.haskell .hljs-type,
+.hljs-tag .hljs-value,
+.css .hljs-rules .hljs-value,
+.css .hljs-rules .hljs-value .hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-built_in,
+.sql .hljs-aggregate,
+.django .hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-addition,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-command,
+.clojure .hljs-title,
+.coffeescript .hljs-attribute {
+  color: #FF0;
+}
+
+.hljs-keyword,
+.css .hljs-id,
+.hljs-title,
+.haskell .hljs-type,
+.vbscript .hljs-built_in,
+.sql .hljs-aggregate,
+.rsl .hljs-built_in,
+.smalltalk .hljs-class,
+.xml .hljs-tag .hljs-title,
+.hljs-winutils,
+.hljs-flow,
+.hljs-change,
+.hljs-envvar,
+.bash .hljs-variable,
+.tex .hljs-special,
+.clojure .hljs-built_in {
+  color: #FFF;
+}
+
+.hljs-comment,
+.hljs-phpdoc,
+.hljs-javadoc,
+.java .hljs-annotation,
+.hljs-template_comment,
+.hljs-deletion,
+.apache .hljs-sqbracket,
+.tex .hljs-formula {
+  color: #888;
+}
+
+.hljs-number,
+.hljs-date,
+.hljs-regexp,
+.hljs-literal,
+.smalltalk .hljs-symbol,
+.smalltalk .hljs-char,
+.clojure .hljs-attribute {
+  color: #0F0;
+}
+
+.python .hljs-decorator,
+.django .hljs-filter .hljs-argument,
+.smalltalk .hljs-localvars,
+.smalltalk .hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.xml .hljs-pi,
+.diff .hljs-header,
+.hljs-chunk,
+.hljs-shebang,
+.nginx .hljs-built_in,
+.hljs-prompt {
+  color: #008080;
+}
+
+.hljs-keyword,
+.css .hljs-id,
+.hljs-title,
+.haskell .hljs-type,
+.vbscript .hljs-built_in,
+.sql .hljs-aggregate,
+.rsl .hljs-built_in,
+.smalltalk .hljs-class,
+.hljs-winutils,
+.hljs-flow,
+.apache .hljs-tag,
+.nginx .hljs-built_in,
+.tex .hljs-command,
+.tex .hljs-special,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/foundation.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/foundation.css
new file mode 100644
index 0000000..bc8d4df
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/foundation.css
@@ -0,0 +1,133 @@
+/*
+Description: Foundation 4 docs style for highlight.js
+Author: Dan Allen <dan.j.allen at gmail.com>
+Website: http://foundation.zurb.com/docs/
+Version: 1.0
+Date: 2013-04-02
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #eee;
+}
+
+.hljs-header,
+.hljs-decorator,
+.hljs-annotation {
+  color: #000077;
+}
+
+.hljs-horizontal_rule,
+.hljs-link_url,
+.hljs-emphasis,
+.hljs-attribute {
+  color: #070;
+}
+
+.hljs-emphasis {
+  font-style: italic;
+}
+
+.hljs-link_label,
+.hljs-strong,
+.hljs-value,
+.hljs-string,
+.scss .hljs-value .hljs-string {
+  color: #d14;
+}
+
+.hljs-strong {
+  font-weight: bold;
+}
+
+.hljs-blockquote,
+.hljs-comment {
+  color: #998;
+  font-style: italic;
+}
+
+.asciidoc .hljs-title,
+.hljs-function .hljs-title {
+  color: #900;
+}
+
+.hljs-class {
+  color: #458;
+}
+
+.hljs-id,
+.hljs-pseudo,
+.hljs-constant,
+.hljs-hexcolor {
+  color: teal;
+}
+
+.hljs-variable {
+  color: #336699;
+}
+
+.hljs-bullet,
+.hljs-javadoc {
+  color: #997700;
+}
+
+.hljs-pi,
+.hljs-doctype {
+  color: #3344bb;
+}
+
+.hljs-code,
+.hljs-number {
+  color: #099;
+}
+
+.hljs-important {
+  color: #f00;
+}
+
+.smartquote,
+.hljs-label {
+  color: #970;
+}
+
+.hljs-preprocessor,
+.hljs-pragma {
+  color: #579;
+}
+
+.hljs-reserved,
+.hljs-keyword,
+.scss .hljs-value {
+  color: #000;
+}
+
+.hljs-regexp {
+  background-color: #fff0ff;
+  color: #880088;
+}
+
+.hljs-symbol {
+  color: #990073;
+}
+
+.hljs-symbol .hljs-string {
+  color: #a60;
+}
+
+.hljs-tag {
+  color: #007700;
+}
+
+.hljs-at_rule,
+.hljs-at_rule .hljs-keyword {
+  color: #088;
+}
+
+.hljs-at_rule .hljs-preprocessor {
+  color: #808;
+}
+
+.scss .hljs-tag,
+.scss .hljs-attribute {
+  color: #339;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/github.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/github.css
new file mode 100644
index 0000000..71967a3
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/github.css
@@ -0,0 +1,125 @@
+/*
+
+github.com style (c) Vasily Polovnyov <vast at whiteants.net>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  color: #333;
+  background: #f8f8f8
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-javadoc {
+  color: #998;
+  font-style: italic
+}
+
+.hljs-keyword,
+.css .rule .hljs-keyword,
+.hljs-winutils,
+.javascript .hljs-title,
+.nginx .hljs-title,
+.hljs-subst,
+.hljs-request,
+.hljs-status {
+  color: #333;
+  font-weight: bold
+}
+
+.hljs-number,
+.hljs-hexcolor,
+.ruby .hljs-constant {
+  color: #099;
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-phpdoc,
+.tex .hljs-formula {
+  color: #d14
+}
+
+.hljs-title,
+.hljs-id,
+.coffeescript .hljs-params,
+.scss .hljs-preprocessor {
+  color: #900;
+  font-weight: bold
+}
+
+.javascript .hljs-title,
+.lisp .hljs-title,
+.clojure .hljs-title,
+.hljs-subst {
+  font-weight: normal
+}
+
+.hljs-class .hljs-title,
+.haskell .hljs-type,
+.vhdl .hljs-literal,
+.tex .hljs-command {
+  color: #458;
+  font-weight: bold
+}
+
+.hljs-tag,
+.hljs-tag .hljs-title,
+.hljs-rules .hljs-property,
+.django .hljs-tag .hljs-keyword {
+  color: #000080;
+  font-weight: normal
+}
+
+.hljs-attribute,
+.hljs-variable,
+.lisp .hljs-body {
+  color: #008080
+}
+
+.hljs-regexp {
+  color: #009926
+}
+
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.lisp .hljs-keyword,
+.tex .hljs-special,
+.hljs-prompt {
+  color: #990073
+}
+
+.hljs-built_in,
+.lisp .hljs-title,
+.clojure .hljs-built_in {
+  color: #0086b3
+}
+
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-pi,
+.hljs-doctype,
+.hljs-shebang,
+.hljs-cdata {
+  color: #999;
+  font-weight: bold
+}
+
+.hljs-deletion {
+  background: #fdd
+}
+
+.hljs-addition {
+  background: #dfd
+}
+
+.diff .hljs-change {
+  background: #0086b3
+}
+
+.hljs-chunk {
+  color: #aaa
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/googlecode.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/googlecode.css
new file mode 100644
index 0000000..45b8b3b
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/googlecode.css
@@ -0,0 +1,147 @@
+/*
+
+Google Code style (c) Aahan Krish <geekpanth3r at gmail.com>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: white; color: black;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.hljs-javadoc,
+.hljs-comment * {
+  color: #800;
+}
+
+.hljs-keyword,
+.method,
+.hljs-list .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title,
+.hljs-tag .hljs-title,
+.setting .hljs-value,
+.hljs-winutils,
+.tex .hljs-command,
+.http .hljs-title,
+.hljs-request,
+.hljs-status {
+  color: #008;
+}
+
+.hljs-envvar,
+.tex .hljs-special {
+  color: #660;
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-cdata,
+.hljs-filter .hljs-argument,
+.hljs-attr_selector,
+.apache .hljs-cbracket,
+.hljs-date,
+.hljs-regexp,
+.coffeescript .hljs-attribute {
+  color: #080;
+}
+
+.hljs-sub .hljs-identifier,
+.hljs-pi,
+.hljs-tag,
+.hljs-tag .hljs-keyword,
+.hljs-decorator,
+.ini .hljs-title,
+.hljs-shebang,
+.hljs-prompt,
+.hljs-hexcolor,
+.hljs-rules .hljs-value,
+.css .hljs-value .hljs-number,
+.hljs-literal,
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-number,
+.css .hljs-function,
+.clojure .hljs-attribute {
+  color: #066;
+}
+
+.hljs-class .hljs-title,
+.haskell .hljs-type,
+.smalltalk .hljs-class,
+.hljs-javadoctag,
+.hljs-yardoctag,
+.hljs-phpdoc,
+.hljs-typename,
+.hljs-tag .hljs-attribute,
+.hljs-doctype,
+.hljs-class .hljs-id,
+.hljs-built_in,
+.setting,
+.hljs-params,
+.hljs-variable,
+.clojure .hljs-title {
+  color: #606;
+}
+
+.css .hljs-tag,
+.hljs-rules .hljs-property,
+.hljs-pseudo,
+.hljs-subst {
+  color: #000;
+}
+
+.css .hljs-class,
+.css .hljs-id {
+  color: #9B703F;
+}
+
+.hljs-value .hljs-important {
+  color: #ff7700;
+  font-weight: bold;
+}
+
+.hljs-rules .hljs-keyword {
+  color: #C5AF75;
+}
+
+.hljs-annotation,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in {
+  color: #9B859D;
+}
+
+.hljs-preprocessor,
+.hljs-preprocessor *,
+.hljs-pragma {
+  color: #444;
+}
+
+.tex .hljs-formula {
+  background-color: #EEE;
+  font-style: italic;
+}
+
+.diff .hljs-header,
+.hljs-chunk {
+  color: #808080;
+  font-weight: bold;
+}
+
+.diff .hljs-change {
+  background-color: #BCCFF9;
+}
+
+.hljs-addition {
+  background-color: #BAEEBA;
+}
+
+.hljs-deletion {
+  background-color: #FFC8BD;
+}
+
+.hljs-comment .hljs-yardoctag {
+  font-weight: bold;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/idea.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/idea.css
new file mode 100644
index 0000000..77352f4
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/idea.css
@@ -0,0 +1,122 @@
+/*
+
+Intellij Idea-like styling (c) Vasily Polovnyov <vast at whiteants.net>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  color: #000;
+  background: #fff;
+}
+
+.hljs-subst,
+.hljs-title {
+  font-weight: normal;
+  color: #000;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.hljs-javadoc,
+.diff .hljs-header {
+  color: #808080;
+  font-style: italic;
+}
+
+.hljs-annotation,
+.hljs-decorator,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-doctype,
+.hljs-pi,
+.hljs-chunk,
+.hljs-shebang,
+.apache .hljs-cbracket,
+.hljs-prompt,
+.http .hljs-title {
+  color: #808000;
+}
+
+.hljs-tag,
+.hljs-pi {
+  background: #efefef;
+}
+
+.hljs-tag .hljs-title,
+.hljs-id,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-literal,
+.hljs-keyword,
+.hljs-hexcolor,
+.css .hljs-function,
+.ini .hljs-title,
+.css .hljs-class,
+.hljs-list .hljs-title,
+.clojure .hljs-title,
+.nginx .hljs-title,
+.tex .hljs-command,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+  color: #000080;
+}
+
+.hljs-attribute,
+.hljs-rules .hljs-keyword,
+.hljs-number,
+.hljs-date,
+.hljs-regexp,
+.tex .hljs-special {
+  font-weight: bold;
+  color: #0000ff;
+}
+
+.hljs-number,
+.hljs-regexp {
+  font-weight: normal;
+}
+
+.hljs-string,
+.hljs-value,
+.hljs-filter .hljs-argument,
+.css .hljs-function .hljs-params,
+.apache .hljs-tag {
+  color: #008000;
+  font-weight: bold;
+}
+
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-char,
+.tex .hljs-formula {
+  color: #000;
+  background: #d0eded;
+  font-style: italic;
+}
+
+.hljs-phpdoc,
+.hljs-yardoctag,
+.hljs-javadoctag {
+  text-decoration: underline;
+}
+
+.hljs-variable,
+.hljs-envvar,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in {
+  color: #660e7a;
+}
+
+.hljs-addition {
+  background: #baeeba;
+}
+
+.hljs-deletion {
+  background: #ffc8bd;
+}
+
+.diff .hljs-change {
+  background: #bccff9;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/ir_black.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/ir_black.css
new file mode 100644
index 0000000..cc64ef5
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/ir_black.css
@@ -0,0 +1,105 @@
+/*
+  IR_Black style (c) Vasily Mikhailitchenko <vaskas at programica.ru>
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #000; color: #f8f8f8;
+}
+
+.hljs-shebang,
+.hljs-comment,
+.hljs-template_comment,
+.hljs-javadoc {
+  color: #7c7c7c;
+}
+
+.hljs-keyword,
+.hljs-tag,
+.tex .hljs-command,
+.hljs-request,
+.hljs-status,
+.clojure .hljs-attribute {
+  color: #96CBFE;
+}
+
+.hljs-sub .hljs-keyword,
+.method,
+.hljs-list .hljs-title,
+.nginx .hljs-title {
+  color: #FFFFB6;
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-cdata,
+.hljs-filter .hljs-argument,
+.hljs-attr_selector,
+.apache .hljs-cbracket,
+.hljs-date,
+.coffeescript .hljs-attribute {
+  color: #A8FF60;
+}
+
+.hljs-subst {
+  color: #DAEFA3;
+}
+
+.hljs-regexp {
+  color: #E9C062;
+}
+
+.hljs-title,
+.hljs-sub .hljs-identifier,
+.hljs-pi,
+.hljs-decorator,
+.tex .hljs-special,
+.haskell .hljs-type,
+.hljs-constant,
+.smalltalk .hljs-class,
+.hljs-javadoctag,
+.hljs-yardoctag,
+.hljs-phpdoc,
+.nginx .hljs-built_in {
+  color: #FFFFB6;
+}
+
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-number,
+.hljs-variable,
+.vbscript,
+.hljs-literal {
+  color: #C6C5FE;
+}
+
+.css .hljs-tag {
+  color: #96CBFE;
+}
+
+.css .hljs-rules .hljs-property,
+.css .hljs-id {
+  color: #FFFFB6;
+}
+
+.css .hljs-class {
+  color: #FFF;
+}
+
+.hljs-hexcolor {
+  color: #C6C5FE;
+}
+
+.hljs-number {
+  color:#FF73FD;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.7;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/magula.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/magula.css
new file mode 100644
index 0000000..cafe3d3
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/magula.css
@@ -0,0 +1,123 @@
+/*
+Description: Magula style for highligh.js
+Author: Ruslan Keba <rukeba at gmail.com>
+Website: http://rukeba.com/
+Version: 1.0
+Date: 2009-01-03
+Music: Aphex Twin / Xtal
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background-color: #f4f4f4;
+}
+
+.hljs,
+.hljs-subst,
+.lisp .hljs-title,
+.clojure .hljs-built_in {
+  color: black;
+}
+
+.hljs-string,
+.hljs-title,
+.hljs-parent,
+.hljs-tag .hljs-value,
+.hljs-rules .hljs-value,
+.hljs-rules .hljs-value .hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-aggregate,
+.hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-addition,
+.hljs-flow,
+.hljs-stream,
+.bash .hljs-variable,
+.apache .hljs-cbracket,
+.coffeescript .hljs-attribute {
+  color: #050;
+}
+
+.hljs-comment,
+.hljs-annotation,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-chunk {
+  color: #777;
+}
+
+.hljs-number,
+.hljs-date,
+.hljs-regexp,
+.hljs-literal,
+.smalltalk .hljs-symbol,
+.smalltalk .hljs-char,
+.hljs-change,
+.tex .hljs-special {
+  color: #800;
+}
+
+.hljs-label,
+.hljs-javadoc,
+.ruby .hljs-string,
+.hljs-decorator,
+.hljs-filter .hljs-argument,
+.hljs-localvars,
+.hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-pi,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-envvar,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in,
+.tex .hljs-formula,
+.hljs-prompt,
+.clojure .hljs-attribute {
+  color: #00e;
+}
+
+.hljs-keyword,
+.hljs-id,
+.hljs-phpdoc,
+.hljs-title,
+.hljs-built_in,
+.hljs-aggregate,
+.smalltalk .hljs-class,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.xml .hljs-tag,
+.tex .hljs-command,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+  color: navy;
+}
+
+.nginx .hljs-built_in {
+  font-weight: normal;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
+
+/* --- */
+.apache .hljs-tag {
+  font-weight: bold;
+  color: blue;
+}
+
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/mono-blue.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/mono-blue.css
new file mode 100644
index 0000000..4152d82
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/mono-blue.css
@@ -0,0 +1,62 @@
+/*
+  Five-color theme from a single blue hue.
+*/
+.hljs {
+  display: block; padding: 0.5em;
+  background: #EAEEF3; color: #00193A;
+}
+
+.hljs-keyword,
+.hljs-title,
+.hljs-important,
+.hljs-request,
+.hljs-header,
+.hljs-javadoctag {
+  font-weight: bold;
+}
+
+.hljs-comment,
+.hljs-chunk,
+.hljs-template_comment {
+  color: #738191;
+}
+
+.hljs-string,
+.hljs-title,
+.hljs-parent,
+.hljs-built_in,
+.hljs-literal,
+.hljs-filename,
+.hljs-value,
+.hljs-addition,
+.hljs-tag,
+.hljs-argument,
+.hljs-link_label,
+.hljs-blockquote,
+.hljs-header {
+  color: #0048AB;
+}
+
+.hljs-decorator,
+.hljs-prompt,
+.hljs-yardoctag,
+.hljs-subst,
+.hljs-symbol,
+.hljs-doctype,
+.hljs-regexp,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-pi,
+.hljs-attribute,
+.hljs-attr_selector,
+.hljs-javadoc,
+.hljs-xmlDocTag,
+.hljs-deletion,
+.hljs-shebang,
+.hljs-string .hljs-variable,
+.hljs-link_url,
+.hljs-bullet,
+.hljs-sqbracket,
+.hljs-phony {
+  color: #4C81C9;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/monokai.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/monokai.css
new file mode 100644
index 0000000..4e49bef
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/monokai.css
@@ -0,0 +1,127 @@
+/*
+Monokai style - ported by Luigi Maselli - http://grigio.org
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #272822;
+}
+
+.hljs-tag,
+.hljs-tag .hljs-title,
+.hljs-keyword,
+.hljs-literal,
+.hljs-strong,
+.hljs-change,
+.hljs-winutils,
+.hljs-flow,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title,
+.tex .hljs-special {
+  color: #F92672;
+}
+
+.hljs {
+  color: #DDD;
+}
+
+.hljs .hljs-constant,
+.asciidoc .hljs-code {
+	color: #66D9EF;
+}
+
+.hljs-code,
+.hljs-class .hljs-title,
+.hljs-header {
+	color: white;
+}
+
+.hljs-link_label,
+.hljs-attribute,
+.hljs-symbol,
+.hljs-symbol .hljs-string,
+.hljs-value,
+.hljs-regexp {
+	color: #BF79DB;
+}
+
+.hljs-link_url,
+.hljs-tag .hljs-value,
+.hljs-string,
+.hljs-bullet,
+.hljs-subst,
+.hljs-title,
+.hljs-emphasis,
+.haskell .hljs-type,
+.hljs-preprocessor,
+.hljs-pragma,
+.ruby .hljs-class .hljs-parent,
+.hljs-built_in,
+.sql .hljs-aggregate,
+.django .hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-javadoc,
+.django .hljs-filter .hljs-argument,
+.smalltalk .hljs-localvars,
+.smalltalk .hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-addition,
+.hljs-stream,
+.hljs-envvar,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-command,
+.hljs-prompt {
+  color: #A6E22E;
+}
+
+.hljs-comment,
+.java .hljs-annotation,
+.smartquote,
+.hljs-blockquote,
+.hljs-horizontal_rule,
+.python .hljs-decorator,
+.hljs-template_comment,
+.hljs-pi,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.tex .hljs-formula {
+  color: #75715E;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.css .hljs-id,
+.hljs-phpdoc,
+.hljs-title,
+.hljs-header,
+.haskell .hljs-type,
+.vbscript .hljs-built_in,
+.sql .hljs-aggregate,
+.rsl .hljs-built_in,
+.smalltalk .hljs-class,
+.diff .hljs-header,
+.hljs-chunk,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.tex .hljs-special,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/monokai_sublime.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/monokai_sublime.css
new file mode 100644
index 0000000..7b0eb2e
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/monokai_sublime.css
@@ -0,0 +1,149 @@
+/*
+
+Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
+
+*/
+
+.hljs {
+  display: block;
+  padding: 0.5em;
+  background: #23241f;
+}
+
+.hljs,
+.hljs-tag,
+.css .hljs-rules,
+.css .hljs-value,
+.css .hljs-function
+.hljs-preprocessor,
+.hljs-pragma {
+  color: #f8f8f2;
+}
+
+.hljs-strongemphasis,
+.hljs-strong,
+.hljs-emphasis {
+  color: #a8a8a2;
+}
+
+.hljs-bullet,
+.hljs-blockquote,
+.hljs-horizontal_rule,
+.hljs-number,
+.hljs-regexp,
+.alias .hljs-keyword,
+.hljs-literal,
+.hljs-hexcolor {
+  color: #ae81ff;
+}
+
+.hljs-tag .hljs-value,
+.hljs-code,
+.hljs-title,
+.css .hljs-class,
+.hljs-class .hljs-title:last-child {
+  color: #a6e22e;
+}
+
+.hljs-link_url {
+  font-size: 80%;
+}
+
+.hljs-strong,
+.hljs-strongemphasis {
+  font-weight: bold;
+}
+
+.hljs-emphasis,
+.hljs-strongemphasis,
+.hljs-class .hljs-title:last-child {
+  font-style: italic;
+}
+
+.hljs-keyword,
+.hljs-function,
+.hljs-change,
+.hljs-winutils,
+.hljs-flow,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title,
+.tex .hljs-special,
+.hljs-header,
+.hljs-attribute,
+.hljs-symbol,
+.hljs-symbol .hljs-string,
+.hljs-tag .hljs-title,
+.hljs-value,
+.alias .hljs-keyword:first-child,
+.css .hljs-tag,
+.css .unit,
+.css .hljs-important {
+  color: #F92672;
+}
+
+.hljs-function .hljs-keyword,
+.hljs-class .hljs-keyword:first-child,
+.hljs-constant,
+.css .hljs-attribute {
+  color: #66d9ef;
+}
+
+.hljs-variable,
+.hljs-params,
+.hljs-class .hljs-title {
+  color: #f8f8f2;
+}
+
+.hljs-string,
+.css .hljs-id,
+.hljs-subst,
+.haskell .hljs-type,
+.ruby .hljs-class .hljs-parent,
+.hljs-built_in,
+.sql .hljs-aggregate,
+.django .hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.django .hljs-filter .hljs-argument,
+.smalltalk .hljs-localvars,
+.smalltalk .hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-addition,
+.hljs-stream,
+.hljs-envvar,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-command,
+.hljs-prompt,
+.hljs-link_label,
+.hljs-link_url {
+  color: #e6db74;
+}
+
+.hljs-comment,
+.hljs-javadoc,
+.java .hljs-annotation,
+.python .hljs-decorator,
+.hljs-template_comment,
+.hljs-pi,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.tex .hljs-formula {
+  color: #75715e;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata,
+.xml .php,
+.php .xml {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/obsidian.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/obsidian.css
new file mode 100644
index 0000000..1174e4c
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/obsidian.css
@@ -0,0 +1,154 @@
+/**
+ * Obsidian style
+ * ported by Alexander Marenin (http://github.com/ioncreature)
+ */
+
+.hljs {
+    display: block; padding: 0.5em;
+    background: #282B2E;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.hljs-change,
+.hljs-winutils,
+.hljs-flow,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title,
+.css .hljs-id,
+.tex .hljs-special {
+    color: #93C763;
+}
+
+.hljs-number {
+    color: #FFCD22;
+}
+
+.hljs {
+    color: #E0E2E4;
+}
+
+.css .hljs-tag,
+.css .hljs-pseudo {
+    color: #D0D2B5;
+}
+
+.hljs-attribute,
+.hljs .hljs-constant {
+    color: #668BB0;
+}
+
+.xml .hljs-attribute {
+    color: #B3B689;
+}
+
+.xml .hljs-tag .hljs-value {
+    color: #E8E2B7;
+}
+
+.hljs-code,
+.hljs-class .hljs-title,
+.hljs-header {
+    color: white;
+}
+
+.hljs-class,
+.hljs-hexcolor {
+    color: #93C763;
+}
+
+.hljs-regexp {
+    color: #D39745;
+}
+
+.hljs-at_rule,
+.hljs-at_rule .hljs-keyword {
+    color: #A082BD;
+}
+
+.hljs-doctype {
+    color: #557182;
+}
+
+.hljs-link_url,
+.hljs-tag,
+.hljs-tag .hljs-title,
+.hljs-bullet,
+.hljs-subst,
+.hljs-emphasis,
+.haskell .hljs-type,
+.hljs-preprocessor,
+.hljs-pragma,
+.ruby .hljs-class .hljs-parent,
+.hljs-built_in,
+.sql .hljs-aggregate,
+.django .hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-javadoc,
+.django .hljs-filter .hljs-argument,
+.smalltalk .hljs-localvars,
+.smalltalk .hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-addition,
+.hljs-stream,
+.hljs-envvar,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.tex .hljs-command,
+.hljs-prompt {
+    color: #8CBBAD;
+}
+
+.hljs-string {
+    color: #EC7600;
+}
+
+.hljs-comment,
+.java .hljs-annotation,
+.hljs-blockquote,
+.hljs-horizontal_rule,
+.python .hljs-decorator,
+.hljs-template_comment,
+.hljs-pi,
+.hljs-deletion,
+.hljs-shebang,
+.apache .hljs-sqbracket,
+.tex .hljs-formula {
+    color: #818E96;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.css .hljs-id,
+.hljs-phpdoc,
+.hljs-title,
+.hljs-header,
+.haskell .hljs-type,
+.vbscript .hljs-built_in,
+.sql .hljs-aggregate,
+.rsl .hljs-built_in,
+.smalltalk .hljs-class,
+.diff .hljs-header,
+.hljs-chunk,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.tex .hljs-special,
+.hljs-request,
+.hljs-at_rule .hljs-keyword,
+.hljs-status {
+    font-weight: bold;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+    opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/paraiso.dark.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/paraiso.dark.css
new file mode 100644
index 0000000..bbbccdd
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/paraiso.dark.css
@@ -0,0 +1,93 @@
+/*
+    Paraíso (dark)
+    Created by Jan T. Sott (http://github.com/idleberg)
+    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
+*/
+
+/* Paraíso Comment */
+.hljs-comment,
+.hljs-title {
+  color: #8d8687;
+}
+
+/* Paraíso Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #ef6155;
+}
+
+/* Paraíso Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #f99b15;
+}
+
+/* Paraíso Yellow */
+.ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #fec418;
+}
+
+/* Paraíso Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #48b685;
+}
+
+/* Paraíso Aqua */
+.css .hljs-hexcolor {
+  color: #5bc4bf;
+}
+
+/* Paraíso Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #06b6ef;
+}
+
+/* Paraíso Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #815ba4;
+}
+
+.hljs {
+  display: block;
+  background: #2f1e2e;
+  color: #a39e9b;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/paraiso.light.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/paraiso.light.css
new file mode 100644
index 0000000..494fcb4
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/paraiso.light.css
@@ -0,0 +1,93 @@
+/*
+    Paraíso (light)
+    Created by Jan T. Sott (http://github.com/idleberg)
+    Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
+*/
+
+/* Paraíso Comment */
+.hljs-comment,
+.hljs-title {
+  color: #776e71;
+}
+
+/* Paraíso Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #ef6155;
+}
+
+/* Paraíso Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #f99b15;
+}
+
+/* Paraíso Yellow */
+.ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #fec418;
+}
+
+/* Paraíso Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #48b685;
+}
+
+/* Paraíso Aqua */
+.css .hljs-hexcolor {
+  color: #5bc4bf;
+}
+
+/* Paraíso Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #06b6ef;
+}
+
+/* Paraíso Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #815ba4;
+}
+
+.hljs {
+  display: block;
+  background: #e7e9db;
+  color: #4f424c;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/pojoaque.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/pojoaque.css
new file mode 100644
index 0000000..6ee925d
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/pojoaque.css
@@ -0,0 +1,106 @@
+/*
+
+Pojoaque Style by Jason Tate
+http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
+Based on Solarized Style from http://ethanschoonover.com/solarized
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  color: #DCCF8F;
+  background: url(./pojoaque.jpg) repeat scroll left top #181914;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-doctype,
+.lisp .hljs-string,
+.hljs-javadoc {
+  color: #586e75;
+  font-style: italic;
+}
+
+.hljs-keyword,
+.css .rule .hljs-keyword,
+.hljs-winutils,
+.javascript .hljs-title,
+.method,
+.hljs-addition,
+.css .hljs-tag,
+.clojure .hljs-title,
+.nginx .hljs-title {
+  color: #B64926;
+}
+
+.hljs-number,
+.hljs-command,
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-phpdoc,
+.tex .hljs-formula,
+.hljs-regexp,
+.hljs-hexcolor {
+  color: #468966;
+}
+
+.hljs-title,
+.hljs-localvars,
+.hljs-function .hljs-title,
+.hljs-chunk,
+.hljs-decorator,
+.hljs-built_in,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.hljs-identifier,
+.hljs-id {
+  color: #FFB03B;
+}
+
+.hljs-attribute,
+.hljs-variable,
+.lisp .hljs-body,
+.smalltalk .hljs-number,
+.hljs-constant,
+.hljs-class .hljs-title,
+.hljs-parent,
+.haskell .hljs-type {
+  color: #b58900;
+}
+
+.css .hljs-attribute {
+  color: #b89859;
+}
+
+.css .hljs-number,
+.css .hljs-hexcolor {
+  color: #DCCF8F;
+}
+
+.css .hljs-class {
+  color: #d3a60c;
+}
+
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-pi,
+.hljs-shebang,
+.hljs-symbol,
+.hljs-symbol .hljs-string,
+.diff .hljs-change,
+.hljs-special,
+.hljs-attr_selector,
+.hljs-important,
+.hljs-subst,
+.hljs-cdata {
+  color: #cb4b16;
+}
+
+.hljs-deletion {
+  color: #dc322f;
+}
+
+.tex .hljs-formula {
+  background: #073642;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/pojoaque.jpg b/src/plugins/wiki/www/themes/default/highlight.js/styles/pojoaque.jpg
new file mode 100644
index 0000000..9c07d4a
Binary files /dev/null and b/src/plugins/wiki/www/themes/default/highlight.js/styles/pojoaque.jpg differ
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/railscasts.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/railscasts.css
new file mode 100644
index 0000000..6a38064
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/railscasts.css
@@ -0,0 +1,182 @@
+/*
+
+Railscasts-like style (c) Visoft, Inc. (Damien White)
+
+*/
+
+.hljs {
+  display: block;
+  padding: 0.5em;
+  background: #232323;
+  color: #E6E1DC;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.hljs-javadoc,
+.hljs-shebang {
+  color: #BC9458;
+  font-style: italic;
+}
+
+.hljs-keyword,
+.ruby .hljs-function .hljs-keyword,
+.hljs-request,
+.hljs-status,
+.nginx .hljs-title,
+.method,
+.hljs-list .hljs-title {
+  color: #C26230;
+}
+
+.hljs-string,
+.hljs-number,
+.hljs-regexp,
+.hljs-tag .hljs-value,
+.hljs-cdata,
+.hljs-filter .hljs-argument,
+.hljs-attr_selector,
+.apache .hljs-cbracket,
+.hljs-date,
+.tex .hljs-command,
+.markdown .hljs-link_label {
+  color: #A5C261;
+}
+
+.hljs-subst {
+  color: #519F50;
+}
+
+.hljs-tag,
+.hljs-tag .hljs-keyword,
+.hljs-tag .hljs-title,
+.hljs-doctype,
+.hljs-sub .hljs-identifier,
+.hljs-pi,
+.input_number {
+  color: #E8BF6A;
+}
+
+.hljs-identifier {
+  color: #D0D0FF;
+}
+
+.hljs-class .hljs-title,
+.haskell .hljs-type,
+.smalltalk .hljs-class,
+.hljs-javadoctag,
+.hljs-yardoctag,
+.hljs-phpdoc {
+  text-decoration: none;
+}
+
+.hljs-constant {
+  color: #DA4939;
+}
+
+
+.hljs-symbol,
+.hljs-built_in,
+.ruby .hljs-symbol .hljs-string,
+.ruby .hljs-symbol .hljs-identifier,
+.markdown .hljs-link_url,
+.hljs-attribute {
+  color: #6D9CBE;
+}
+
+.markdown .hljs-link_url {
+  text-decoration: underline;
+}
+
+
+
+.hljs-params,
+.hljs-variable,
+.clojure .hljs-attribute {
+  color: #D0D0FF;
+}
+
+.css .hljs-tag,
+.hljs-rules .hljs-property,
+.hljs-pseudo,
+.tex .hljs-special {
+  color: #CDA869;
+}
+
+.css .hljs-class {
+  color: #9B703F;
+}
+
+.hljs-rules .hljs-keyword {
+  color: #C5AF75;
+}
+
+.hljs-rules .hljs-value {
+  color: #CF6A4C;
+}
+
+.css .hljs-id {
+  color: #8B98AB;
+}
+
+.hljs-annotation,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in {
+  color: #9B859D;
+}
+
+.hljs-preprocessor,
+.hljs-preprocessor *,
+.hljs-pragma {
+  color: #8996A8 !important;
+}
+
+.hljs-hexcolor,
+.css .hljs-value .hljs-number {
+  color: #A5C261;
+}
+
+.hljs-title,
+.hljs-decorator,
+.css .hljs-function {
+  color: #FFC66D;
+}
+
+.diff .hljs-header,
+.hljs-chunk {
+  background-color: #2F33AB;
+  color: #E6E1DC;
+  display: inline-block;
+  width: 100%;
+}
+
+.diff .hljs-change {
+  background-color: #4A410D;
+  color: #F8F8F8;
+  display: inline-block;
+  width: 100%;
+}
+
+.hljs-addition {
+  background-color: #144212;
+  color: #E6E1DC;
+  display: inline-block;
+  width: 100%;
+}
+
+.hljs-deletion {
+  background-color: #600;
+  color: #E6E1DC;
+  display: inline-block;
+  width: 100%;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.7;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/rainbow.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/rainbow.css
new file mode 100644
index 0000000..d9ffef6
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/rainbow.css
@@ -0,0 +1,112 @@
+/*
+
+Style with support for rainbow parens
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #474949; color: #D1D9E1;
+}
+
+
+.hljs-body,
+.hljs-collection {
+   color: #D1D9E1;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-doctype,
+.lisp .hljs-string,
+.hljs-javadoc {
+  color: #969896;
+  font-style: italic;
+}
+
+.hljs-keyword,
+.clojure .hljs-attribute,
+.hljs-winutils,
+.javascript .hljs-title,
+.hljs-addition,
+.css .hljs-tag {
+  color: #cc99cc;
+}
+
+.hljs-number { color: #f99157; }
+
+.hljs-command,
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-phpdoc,
+.tex .hljs-formula,
+.hljs-regexp,
+.hljs-hexcolor {
+  color: #8abeb7;
+}
+
+.hljs-title,
+.hljs-localvars,
+.hljs-function .hljs-title,
+.hljs-chunk,
+.hljs-decorator,
+.hljs-built_in,
+.lisp .hljs-title,
+.hljs-identifier
+{
+  color: #b5bd68;
+}
+
+.hljs-class .hljs-keyword
+{
+  color: #f2777a;
+}
+
+.hljs-variable,
+.lisp .hljs-body,
+.smalltalk .hljs-number,
+.hljs-constant,
+.hljs-class .hljs-title,
+.hljs-parent,
+.haskell .hljs-label,
+.hljs-id,
+.lisp .hljs-title,
+.clojure .hljs-title .hljs-built_in {
+   color: #ffcc66;
+}
+
+.hljs-tag .hljs-title,
+.hljs-rules .hljs-property,
+.django .hljs-tag .hljs-keyword,
+.clojure .hljs-title .hljs-built_in {
+  font-weight: bold;
+}
+
+.hljs-attribute,
+.clojure .hljs-title {
+  color: #81a2be;
+}
+
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-pi,
+.hljs-shebang,
+.hljs-symbol,
+.hljs-symbol .hljs-string,
+.diff .hljs-change,
+.hljs-special,
+.hljs-attr_selector,
+.hljs-important,
+.hljs-subst,
+.hljs-cdata {
+  color: #f99157;
+}
+
+.hljs-deletion {
+  color: #dc322f;
+}
+
+.tex .hljs-formula {
+  background: #eee8d5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/school_book.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/school_book.css
new file mode 100644
index 0000000..98a3bd2
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/school_book.css
@@ -0,0 +1,113 @@
+/*
+
+School Book style from goldblog.com.ua (c) Zaripov Yura <yur4ik7 at ukr.net>
+
+*/
+
+.hljs {
+  display: block; padding: 15px 0.5em 0.5em 30px;
+  font-size: 11px !important;
+  line-height:16px !important;
+}
+
+pre{
+  background:#f6f6ae url(./school_book.png);
+  border-top: solid 2px #d2e8b9;
+  border-bottom: solid 1px #d2e8b9;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.hljs-change,
+.hljs-winutils,
+.hljs-flow,
+.lisp .hljs-title,
+.clojure .hljs-built_in,
+.nginx .hljs-title,
+.tex .hljs-special {
+  color:#005599;
+  font-weight:bold;
+}
+
+.hljs,
+.hljs-subst,
+.hljs-tag .hljs-keyword {
+  color: #3E5915;
+}
+
+.hljs-string,
+.hljs-title,
+.haskell .hljs-type,
+.hljs-tag .hljs-value,
+.css .hljs-rules .hljs-value,
+.hljs-preprocessor,
+.hljs-pragma,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.ruby .hljs-class .hljs-parent,
+.hljs-built_in,
+.sql .hljs-aggregate,
+.django .hljs-template_tag,
+.django .hljs-variable,
+.smalltalk .hljs-class,
+.hljs-javadoc,
+.ruby .hljs-string,
+.django .hljs-filter .hljs-argument,
+.smalltalk .hljs-localvars,
+.smalltalk .hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-addition,
+.hljs-stream,
+.hljs-envvar,
+.apache .hljs-tag,
+.apache .hljs-cbracket,
+.nginx .hljs-built_in,
+.tex .hljs-command,
+.coffeescript .hljs-attribute {
+  color: #2C009F;
+}
+
+.hljs-comment,
+.java .hljs-annotation,
+.python .hljs-decorator,
+.hljs-template_comment,
+.hljs-pi,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-shebang,
+.apache .hljs-sqbracket {
+  color: #E60415;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.css .hljs-id,
+.hljs-phpdoc,
+.hljs-title,
+.haskell .hljs-type,
+.vbscript .hljs-built_in,
+.sql .hljs-aggregate,
+.rsl .hljs-built_in,
+.smalltalk .hljs-class,
+.xml .hljs-tag .hljs-title,
+.diff .hljs-header,
+.hljs-chunk,
+.hljs-winutils,
+.bash .hljs-variable,
+.apache .hljs-tag,
+.tex .hljs-command,
+.hljs-request,
+.hljs-status {
+  font-weight: bold;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/school_book.png b/src/plugins/wiki/www/themes/default/highlight.js/styles/school_book.png
new file mode 100644
index 0000000..956e979
Binary files /dev/null and b/src/plugins/wiki/www/themes/default/highlight.js/styles/school_book.png differ
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/solarized_dark.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/solarized_dark.css
new file mode 100644
index 0000000..f520533
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/solarized_dark.css
@@ -0,0 +1,107 @@
+/*
+
+Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums at gmail.com>
+
+*/
+
+.hljs {
+  display: block;
+  padding: 0.5em;
+  background: #002b36;
+  color: #839496;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-doctype,
+.hljs-pi,
+.lisp .hljs-string,
+.hljs-javadoc {
+  color: #586e75;
+}
+
+/* Solarized Green */
+.hljs-keyword,
+.hljs-winutils,
+.method,
+.hljs-addition,
+.css .hljs-tag,
+.hljs-request,
+.hljs-status,
+.nginx .hljs-title {
+  color: #859900;
+}
+
+/* Solarized Cyan */
+.hljs-number,
+.hljs-command,
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-rules .hljs-value,
+.hljs-phpdoc,
+.tex .hljs-formula,
+.hljs-regexp,
+.hljs-hexcolor,
+.hljs-link_url {
+  color: #2aa198;
+}
+
+/* Solarized Blue */
+.hljs-title,
+.hljs-localvars,
+.hljs-chunk,
+.hljs-decorator,
+.hljs-built_in,
+.hljs-identifier,
+.vhdl .hljs-literal,
+.hljs-id,
+.css .hljs-function {
+  color: #268bd2;
+}
+
+/* Solarized Yellow */
+.hljs-attribute,
+.hljs-variable,
+.lisp .hljs-body,
+.smalltalk .hljs-number,
+.hljs-constant,
+.hljs-class .hljs-title,
+.hljs-parent,
+.haskell .hljs-type,
+.hljs-link_reference {
+  color: #b58900;
+}
+
+/* Solarized Orange */
+.hljs-preprocessor,
+.hljs-preprocessor .hljs-keyword,
+.hljs-pragma,
+.hljs-shebang,
+.hljs-symbol,
+.hljs-symbol .hljs-string,
+.diff .hljs-change,
+.hljs-special,
+.hljs-attr_selector,
+.hljs-subst,
+.hljs-cdata,
+.clojure .hljs-title,
+.css .hljs-pseudo,
+.hljs-header {
+  color: #cb4b16;
+}
+
+/* Solarized Red */
+.hljs-deletion,
+.hljs-important {
+  color: #dc322f;
+}
+
+/* Solarized Violet */
+.hljs-link_label {
+  color: #6c71c4;
+}
+
+.tex .hljs-formula {
+  background: #073642;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/solarized_light.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/solarized_light.css
new file mode 100644
index 0000000..ad70474
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/solarized_light.css
@@ -0,0 +1,107 @@
+/*
+
+Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums at gmail.com>
+
+*/
+
+.hljs {
+  display: block;
+  padding: 0.5em;
+  background: #fdf6e3;
+  color: #657b83;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-doctype,
+.hljs-pi,
+.lisp .hljs-string,
+.hljs-javadoc {
+  color: #93a1a1;
+}
+
+/* Solarized Green */
+.hljs-keyword,
+.hljs-winutils,
+.method,
+.hljs-addition,
+.css .hljs-tag,
+.hljs-request,
+.hljs-status,
+.nginx .hljs-title {
+  color: #859900;
+}
+
+/* Solarized Cyan */
+.hljs-number,
+.hljs-command,
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-rules .hljs-value,
+.hljs-phpdoc,
+.tex .hljs-formula,
+.hljs-regexp,
+.hljs-hexcolor,
+.hljs-link_url {
+  color: #2aa198;
+}
+
+/* Solarized Blue */
+.hljs-title,
+.hljs-localvars,
+.hljs-chunk,
+.hljs-decorator,
+.hljs-built_in,
+.hljs-identifier,
+.vhdl .hljs-literal,
+.hljs-id,
+.css .hljs-function {
+  color: #268bd2;
+}
+
+/* Solarized Yellow */
+.hljs-attribute,
+.hljs-variable,
+.lisp .hljs-body,
+.smalltalk .hljs-number,
+.hljs-constant,
+.hljs-class .hljs-title,
+.hljs-parent,
+.haskell .hljs-type,
+.hljs-link_reference {
+  color: #b58900;
+}
+
+/* Solarized Orange */
+.hljs-preprocessor,
+.hljs-preprocessor .hljs-keyword,
+.hljs-pragma,
+.hljs-shebang,
+.hljs-symbol,
+.hljs-symbol .hljs-string,
+.diff .hljs-change,
+.hljs-special,
+.hljs-attr_selector,
+.hljs-subst,
+.hljs-cdata,
+.clojure .hljs-title,
+.css .hljs-pseudo,
+.hljs-header {
+  color: #cb4b16;
+}
+
+/* Solarized Red */
+.hljs-deletion,
+.hljs-important {
+  color: #dc322f;
+}
+
+/* Solarized Violet */
+.hljs-link_label {
+  color: #6c71c4;
+}
+
+.tex .hljs-formula {
+  background: #eee8d5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/sunburst.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/sunburst.css
new file mode 100644
index 0000000..07b30c2
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/sunburst.css
@@ -0,0 +1,160 @@
+/*
+
+Sunburst-like style (c) Vasily Polovnyov <vast at whiteants.net>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #000; color: #f8f8f8;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.hljs-javadoc {
+  color: #aeaeae;
+  font-style: italic;
+}
+
+.hljs-keyword,
+.ruby .hljs-function .hljs-keyword,
+.hljs-request,
+.hljs-status,
+.nginx .hljs-title {
+  color: #E28964;
+}
+
+.hljs-function .hljs-keyword,
+.hljs-sub .hljs-keyword,
+.method,
+.hljs-list .hljs-title {
+  color: #99CF50;
+}
+
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-cdata,
+.hljs-filter .hljs-argument,
+.hljs-attr_selector,
+.apache .hljs-cbracket,
+.hljs-date,
+.tex .hljs-command,
+.coffeescript .hljs-attribute {
+  color: #65B042;
+}
+
+.hljs-subst {
+  color: #DAEFA3;
+}
+
+.hljs-regexp {
+  color: #E9C062;
+}
+
+.hljs-title,
+.hljs-sub .hljs-identifier,
+.hljs-pi,
+.hljs-tag,
+.hljs-tag .hljs-keyword,
+.hljs-decorator,
+.hljs-shebang,
+.hljs-prompt {
+  color: #89BDFF;
+}
+
+.hljs-class .hljs-title,
+.haskell .hljs-type,
+.smalltalk .hljs-class,
+.hljs-javadoctag,
+.hljs-yardoctag,
+.hljs-phpdoc {
+  text-decoration: underline;
+}
+
+.hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-number {
+  color: #3387CC;
+}
+
+.hljs-params,
+.hljs-variable,
+.clojure .hljs-attribute {
+  color: #3E87E3;
+}
+
+.css .hljs-tag,
+.hljs-rules .hljs-property,
+.hljs-pseudo,
+.tex .hljs-special {
+  color: #CDA869;
+}
+
+.css .hljs-class {
+  color: #9B703F;
+}
+
+.hljs-rules .hljs-keyword {
+  color: #C5AF75;
+}
+
+.hljs-rules .hljs-value {
+  color: #CF6A4C;
+}
+
+.css .hljs-id {
+  color: #8B98AB;
+}
+
+.hljs-annotation,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in {
+  color: #9B859D;
+}
+
+.hljs-preprocessor,
+.hljs-pragma {
+  color: #8996A8;
+}
+
+.hljs-hexcolor,
+.css .hljs-value .hljs-number {
+  color: #DD7B3B;
+}
+
+.css .hljs-function {
+  color: #DAD085;
+}
+
+.diff .hljs-header,
+.hljs-chunk,
+.tex .hljs-formula {
+  background-color: #0E2231;
+  color: #F8F8F8;
+  font-style: italic;
+}
+
+.diff .hljs-change {
+  background-color: #4A410D;
+  color: #F8F8F8;
+}
+
+.hljs-addition {
+  background-color: #253B22;
+  color: #F8F8F8;
+}
+
+.hljs-deletion {
+  background-color: #420E09;
+  color: #F8F8F8;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-blue.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-blue.css
new file mode 100644
index 0000000..dfe2675
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-blue.css
@@ -0,0 +1,93 @@
+/* Tomorrow Night Blue Theme */
+/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+/* Original theme - https://github.com/chriskempson/tomorrow-theme */
+/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+
+/* Tomorrow Comment */
+.hljs-comment,
+.hljs-title {
+  color: #7285b7;
+}
+
+/* Tomorrow Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #ff9da4;
+}
+
+/* Tomorrow Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #ffc58f;
+}
+
+/* Tomorrow Yellow */
+.ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #ffeead;
+}
+
+/* Tomorrow Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #d1f1a9;
+}
+
+/* Tomorrow Aqua */
+.css .hljs-hexcolor {
+  color: #99ffff;
+}
+
+/* Tomorrow Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #bbdaff;
+}
+
+/* Tomorrow Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #ebbbff;
+}
+
+.hljs {
+  display: block;
+  background: #002451;
+  color: white;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-bright.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-bright.css
new file mode 100644
index 0000000..4ad5d25
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-bright.css
@@ -0,0 +1,92 @@
+/* Tomorrow Night Bright Theme */
+/* Original theme - https://github.com/chriskempson/tomorrow-theme */
+/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+
+/* Tomorrow Comment */
+.hljs-comment,
+.hljs-title {
+  color: #969896;
+}
+
+/* Tomorrow Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #d54e53;
+}
+
+/* Tomorrow Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #e78c45;
+}
+
+/* Tomorrow Yellow */
+.ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #e7c547;
+}
+
+/* Tomorrow Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #b9ca4a;
+}
+
+/* Tomorrow Aqua */
+.css .hljs-hexcolor {
+  color: #70c0b1;
+}
+
+/* Tomorrow Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #7aa6da;
+}
+
+/* Tomorrow Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #c397d8;
+}
+
+.hljs {
+  display: block;
+  background: black;
+  color: #eaeaea;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-eighties.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-eighties.css
new file mode 100644
index 0000000..08b49c6
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-eighties.css
@@ -0,0 +1,92 @@
+/* Tomorrow Night Eighties Theme */
+/* Original theme - https://github.com/chriskempson/tomorrow-theme */
+/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+
+/* Tomorrow Comment */
+.hljs-comment,
+.hljs-title {
+  color: #999999;
+}
+
+/* Tomorrow Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #f2777a;
+}
+
+/* Tomorrow Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #f99157;
+}
+
+/* Tomorrow Yellow */
+.ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #ffcc66;
+}
+
+/* Tomorrow Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #99cc99;
+}
+
+/* Tomorrow Aqua */
+.css .hljs-hexcolor {
+  color: #66cccc;
+}
+
+/* Tomorrow Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #6699cc;
+}
+
+/* Tomorrow Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #cc99cc;
+}
+
+.hljs {
+  display: block;
+  background: #2d2d2d;
+  color: #cccccc;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night.css
new file mode 100644
index 0000000..c269b17
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night.css
@@ -0,0 +1,93 @@
+/* Tomorrow Night Theme */
+/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+/* Original theme - https://github.com/chriskempson/tomorrow-theme */
+/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+
+/* Tomorrow Comment */
+.hljs-comment,
+.hljs-title {
+  color: #969896;
+}
+
+/* Tomorrow Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #cc6666;
+}
+
+/* Tomorrow Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #de935f;
+}
+
+/* Tomorrow Yellow */
+.ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #f0c674;
+}
+
+/* Tomorrow Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #b5bd68;
+}
+
+/* Tomorrow Aqua */
+.css .hljs-hexcolor {
+  color: #8abeb7;
+}
+
+/* Tomorrow Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #81a2be;
+}
+
+/* Tomorrow Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #b294bb;
+}
+
+.hljs {
+  display: block;
+  background: #1d1f21;
+  color: #c5c8c6;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow.css
new file mode 100644
index 0000000..3bdead6
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow.css
@@ -0,0 +1,90 @@
+/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
+
+/* Tomorrow Comment */
+.hljs-comment,
+.hljs-title {
+  color: #8e908c;
+}
+
+/* Tomorrow Red */
+.hljs-variable,
+.hljs-attribute,
+.hljs-tag,
+.hljs-regexp,
+.ruby .hljs-constant,
+.xml .hljs-tag .hljs-title,
+.xml .hljs-pi,
+.xml .hljs-doctype,
+.html .hljs-doctype,
+.css .hljs-id,
+.css .hljs-class,
+.css .hljs-pseudo {
+  color: #c82829;
+}
+
+/* Tomorrow Orange */
+.hljs-number,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.hljs-literal,
+.hljs-params,
+.hljs-constant {
+  color: #f5871f;
+}
+
+/* Tomorrow Yellow */
+.ruby .hljs-class .hljs-title,
+.css .hljs-rules .hljs-attribute {
+  color: #eab700;
+}
+
+/* Tomorrow Green */
+.hljs-string,
+.hljs-value,
+.hljs-inheritance,
+.hljs-header,
+.ruby .hljs-symbol,
+.xml .hljs-cdata {
+  color: #718c00;
+}
+
+/* Tomorrow Aqua */
+.css .hljs-hexcolor {
+  color: #3e999f;
+}
+
+/* Tomorrow Blue */
+.hljs-function,
+.python .hljs-decorator,
+.python .hljs-title,
+.ruby .hljs-function .hljs-title,
+.ruby .hljs-title .hljs-keyword,
+.perl .hljs-sub,
+.javascript .hljs-title,
+.coffeescript .hljs-title {
+  color: #4271ae;
+}
+
+/* Tomorrow Purple */
+.hljs-keyword,
+.javascript .hljs-function {
+  color: #8959a8;
+}
+
+.hljs {
+  display: block;
+  background: white;
+  color: #4d4d4c;
+  padding: 0.5em;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/vs.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/vs.css
new file mode 100644
index 0000000..bf33f0f
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/vs.css
@@ -0,0 +1,89 @@
+/*
+
+Visual Studio-like style based on original C# coloring by Jason Diamond <jason at diamond.name>
+
+*/
+.hljs {
+  display: block; padding: 0.5em;
+  background: white; color: black;
+}
+
+.hljs-comment,
+.hljs-annotation,
+.hljs-template_comment,
+.diff .hljs-header,
+.hljs-chunk,
+.apache .hljs-cbracket {
+  color: #008000;
+}
+
+.hljs-keyword,
+.hljs-id,
+.hljs-built_in,
+.smalltalk .hljs-class,
+.hljs-winutils,
+.bash .hljs-variable,
+.tex .hljs-command,
+.hljs-request,
+.hljs-status,
+.nginx .hljs-title,
+.xml .hljs-tag,
+.xml .hljs-tag .hljs-value {
+  color: #00f;
+}
+
+.hljs-string,
+.hljs-title,
+.hljs-parent,
+.hljs-tag .hljs-value,
+.hljs-rules .hljs-value,
+.hljs-rules .hljs-value .hljs-number,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.hljs-aggregate,
+.hljs-template_tag,
+.django .hljs-variable,
+.hljs-addition,
+.hljs-flow,
+.hljs-stream,
+.apache .hljs-tag,
+.hljs-date,
+.tex .hljs-formula,
+.coffeescript .hljs-attribute {
+  color: #a31515;
+}
+
+.ruby .hljs-string,
+.hljs-decorator,
+.hljs-filter .hljs-argument,
+.hljs-localvars,
+.hljs-array,
+.hljs-attr_selector,
+.hljs-pseudo,
+.hljs-pi,
+.hljs-doctype,
+.hljs-deletion,
+.hljs-envvar,
+.hljs-shebang,
+.hljs-preprocessor,
+.hljs-pragma,
+.userType,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in,
+.tex .hljs-special,
+.hljs-prompt {
+  color: #2b91af;
+}
+
+.hljs-phpdoc,
+.hljs-javadoc,
+.hljs-xmlDocTag {
+  color: #808080;
+}
+
+.vhdl .hljs-typename { font-weight: bold; }
+.vhdl .hljs-string { color: #666666; }
+.vhdl .hljs-literal { color: #a31515; }
+.vhdl .hljs-attribute { color: #00B0E8; }
+
+.xml .hljs-attribute { color: #f00; }
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/xcode.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/xcode.css
new file mode 100644
index 0000000..57bd748
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/xcode.css
@@ -0,0 +1,158 @@
+/*
+
+XCode style (c) Angel Garcia <angelgarcia.mail at gmail.com>
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #fff; color: black;
+}
+
+.hljs-comment,
+.hljs-template_comment,
+.hljs-javadoc,
+.hljs-comment * {
+  color: #006a00;
+}
+
+.hljs-keyword,
+.hljs-literal,
+.nginx .hljs-title {
+  color: #aa0d91;
+}
+.method,
+.hljs-list .hljs-title,
+.hljs-tag .hljs-title,
+.setting .hljs-value,
+.hljs-winutils,
+.tex .hljs-command,
+.http .hljs-title,
+.hljs-request,
+.hljs-status {
+  color: #008;
+}
+
+.hljs-envvar,
+.tex .hljs-special {
+  color: #660;
+}
+
+.hljs-string {
+  color: #c41a16;
+}
+.hljs-tag .hljs-value,
+.hljs-cdata,
+.hljs-filter .hljs-argument,
+.hljs-attr_selector,
+.apache .hljs-cbracket,
+.hljs-date,
+.hljs-regexp {
+  color: #080;
+}
+
+.hljs-sub .hljs-identifier,
+.hljs-pi,
+.hljs-tag,
+.hljs-tag .hljs-keyword,
+.hljs-decorator,
+.ini .hljs-title,
+.hljs-shebang,
+.hljs-prompt,
+.hljs-hexcolor,
+.hljs-rules .hljs-value,
+.css .hljs-value .hljs-number,
+.hljs-symbol,
+.hljs-symbol .hljs-string,
+.hljs-number,
+.css .hljs-function,
+.clojure .hljs-title,
+.clojure .hljs-built_in,
+.hljs-function .hljs-title,
+.coffeescript .hljs-attribute {
+  color: #1c00cf;
+}
+
+.hljs-class .hljs-title,
+.haskell .hljs-type,
+.smalltalk .hljs-class,
+.hljs-javadoctag,
+.hljs-yardoctag,
+.hljs-phpdoc,
+.hljs-typename,
+.hljs-tag .hljs-attribute,
+.hljs-doctype,
+.hljs-class .hljs-id,
+.hljs-built_in,
+.setting,
+.hljs-params,
+.clojure .hljs-attribute {
+  color: #5c2699;
+}
+
+.hljs-variable {
+ color: #3f6e74;
+}
+.css .hljs-tag,
+.hljs-rules .hljs-property,
+.hljs-pseudo,
+.hljs-subst {
+  color: #000;
+}
+
+.css .hljs-class,
+.css .hljs-id {
+  color: #9B703F;
+}
+
+.hljs-value .hljs-important {
+  color: #ff7700;
+  font-weight: bold;
+}
+
+.hljs-rules .hljs-keyword {
+  color: #C5AF75;
+}
+
+.hljs-annotation,
+.apache .hljs-sqbracket,
+.nginx .hljs-built_in {
+  color: #9B859D;
+}
+
+.hljs-preprocessor,
+.hljs-preprocessor *,
+.hljs-pragma {
+  color: #643820;
+}
+
+.tex .hljs-formula {
+  background-color: #EEE;
+  font-style: italic;
+}
+
+.diff .hljs-header,
+.hljs-chunk {
+  color: #808080;
+  font-weight: bold;
+}
+
+.diff .hljs-change {
+  background-color: #BCCFF9;
+}
+
+.hljs-addition {
+  background-color: #BAEEBA;
+}
+
+.hljs-deletion {
+  background-color: #FFC8BD;
+}
+
+.hljs-comment .hljs-yardoctag {
+  font-weight: bold;
+}
+
+.method .hljs-id {
+  color: #000;
+}
diff --git a/src/plugins/wiki/www/themes/default/highlight.js/styles/zenburn.css b/src/plugins/wiki/www/themes/default/highlight.js/styles/zenburn.css
new file mode 100644
index 0000000..f6cb098
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/highlight.js/styles/zenburn.css
@@ -0,0 +1,117 @@
+/*
+
+Zenburn style from voldmar.ru (c) Vladimir Epifanov <voldmar at voldmar.ru>
+based on dark.css by Ivan Sagalaev
+
+*/
+
+.hljs {
+  display: block; padding: 0.5em;
+  background: #3F3F3F;
+  color: #DCDCDC;
+}
+
+.hljs-keyword,
+.hljs-tag,
+.css .hljs-class,
+.css .hljs-id,
+.lisp .hljs-title,
+.nginx .hljs-title,
+.hljs-request,
+.hljs-status,
+.clojure .hljs-attribute {
+  color: #E3CEAB;
+}
+
+.django .hljs-template_tag,
+.django .hljs-variable,
+.django .hljs-filter .hljs-argument {
+  color: #DCDCDC;
+}
+
+.hljs-number,
+.hljs-date {
+  color: #8CD0D3;
+}
+
+.dos .hljs-envvar,
+.dos .hljs-stream,
+.hljs-variable,
+.apache .hljs-sqbracket {
+  color: #EFDCBC;
+}
+
+.dos .hljs-flow,
+.diff .hljs-change,
+.python .exception,
+.python .hljs-built_in,
+.hljs-literal,
+.tex .hljs-special {
+  color: #EFEFAF;
+}
+
+.diff .hljs-chunk,
+.hljs-subst {
+  color: #8F8F8F;
+}
+
+.dos .hljs-keyword,
+.python .hljs-decorator,
+.hljs-title,
+.haskell .hljs-type,
+.diff .hljs-header,
+.ruby .hljs-class .hljs-parent,
+.apache .hljs-tag,
+.nginx .hljs-built_in,
+.tex .hljs-command,
+.hljs-prompt {
+    color: #efef8f;
+}
+
+.dos .hljs-winutils,
+.ruby .hljs-symbol,
+.ruby .hljs-symbol .hljs-string,
+.ruby .hljs-string {
+  color: #DCA3A3;
+}
+
+.diff .hljs-deletion,
+.hljs-string,
+.hljs-tag .hljs-value,
+.hljs-preprocessor,
+.hljs-pragma,
+.hljs-built_in,
+.sql .hljs-aggregate,
+.hljs-javadoc,
+.smalltalk .hljs-class,
+.smalltalk .hljs-localvars,
+.smalltalk .hljs-array,
+.css .hljs-rules .hljs-value,
+.hljs-attr_selector,
+.hljs-pseudo,
+.apache .hljs-cbracket,
+.tex .hljs-formula,
+.coffeescript .hljs-attribute {
+  color: #CC9393;
+}
+
+.hljs-shebang,
+.diff .hljs-addition,
+.hljs-comment,
+.java .hljs-annotation,
+.hljs-template_comment,
+.hljs-pi,
+.hljs-doctype {
+  color: #7F9F7F;
+}
+
+.coffeescript .javascript,
+.javascript .xml,
+.tex .hljs-formula,
+.xml .javascript,
+.xml .vbscript,
+.xml .css,
+.xml .hljs-cdata {
+  opacity: 0.5;
+}
+
diff --git a/src/plugins/wiki/www/themes/default/jquery-1.11.1.min.js b/src/plugins/wiki/www/themes/default/jquery-1.11.1.min.js
new file mode 100644
index 0000000..ab28a24
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/jquery-1.11.1.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.11.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.1",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="<div class='a'></div><div class='a i'></div>",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=lb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=mb(b);function pb(){}pb.prototype=d.filters=d.pseudos,d.setFilters=new pb,g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;
+if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e)}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")
+},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ac.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.ActiveXObject&&m(a).on("unload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/src/plugins/wiki/www/themes/default/jquery.tablesorter.min.js b/src/plugins/wiki/www/themes/default/jquery.tablesorter.min.js
new file mode 100644
index 0000000..d3ff430
--- /dev/null
+++ b/src/plugins/wiki/www/themes/default/jquery.tablesorter.min.js
@@ -0,0 +1,4 @@
+
+(function($){$.extend({tablesorter:new
+function(){var parsers=[],widgets=[];this.defaults={cssHeader:"header",cssAsc:"headerSortUp",cssDesc:"headerSortDown",cssChildRow:"expand-child",sortInitialOrder:"asc",sortMultiSortKey:"shiftKey",sortForce:null,sortAppend:null,sortLocaleCompare:true,textExtraction:"simple",parsers:{},widgets:[],widgetZebra:{css:["even","odd"]},headers:{},widthFixed:false,cancelSelection:true,sortList:[],headerList:[],dateFormat:"us",decimal:'/\.|\,/g',onRenderHeader:null,selectorHeaders:'thead th',debug:false};function benchmark(s,d){log(s+","+(new Date().getTime()-d.getTime())+"ms");}this.benchmark=benchmark;function log(s){if(typeof console!="undefined"&&typeof console.debug!="undefined"){console.log(s);}else{alert(s);}}function buildParserCache(table,$headers){if(table.config.debug){var parsersDebug="";}if(table.tBodies.length==0)return;var rows=table.tBodies[0].rows;if(rows[0]){var list=[],cells=rows[0].cells,l=cells.length;for(var i=0;i<l;i++){var p=false;if($.metadata&&($($headers[i]).metadata()&&$($headers[i]).metadata().sorter)){p=getParserById($($headers[i]).metadata().sorter);}else if((table.config.headers[i]&&table.config.headers[i].sorter)){p=getParserById(table.config.headers[i].sorter);}if(!p){p=detectParserForColumn(table,rows,-1,i);}if(table.config.debug){parsersDebug+="column:"+i+" parser:"+p.id+"\n";}list.push(p);}}if(table.config.debug){log(parsersDebug);}return list;};function detectParserForColumn(table,rows,rowIndex,cellIndex){var l=parsers.length,node=false,nodeValue=false,keepLooking=true;while(nodeValue==''&&keepLooking){rowIndex++;if(rows[rowIndex]){node=getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex);nodeValue=trimAndGetNodeText(table.config,node);if(table.config.debug){log('Checking if value was empty on row:'+rowIndex);}}else{keepLooking=false;}}for(var i=1;i<l;i++){if(parsers[i].is(nodeValue,table,node)){return parsers[i];}}return parsers[0];}function getNodeFromRowAndCellIndex(rows,rowIndex,cellIndex){return rows[rowIndex].cells[cellIndex];}function trimAndGetNodeText(config,node){return $.trim(getElementText(config,node));}function getParserById(name){var l=parsers.length;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==name.toLowerCase()){return parsers[i];}}return false;}function buildCache(table){if(table.config.debug){var cacheTime=new Date();}var totalRows=(table.tBodies[0]&&table.tBodies[0].rows.length)||0,totalCells=(table.tBodies[0].rows[0]&&table.tBodies[0].rows[0].cells.length)||0,parsers=table.config.parsers,cache={row:[],normalized:[]};for(var i=0;i<totalRows;++i){var c=$(table.tBodies[0].rows[i]),cols=[];if(c.hasClass(table.config.cssChildRow)){cache.row[cache.row.length-1]=cache.row[cache.row.length-1].add(c);continue;}cache.row.push(c);for(var j=0;j<totalCells;++j){cols.push(parsers[j].format(getElementText(table.config,c[0].cells[j]),table,c[0].cells[j]));}cols.push(cache.normalized.length);cache.normalized.push(cols);cols=null;};if(table.config.debug){benchmark("Building cache for "+totalRows+" rows:",cacheTime);}return cache;};function getElementText(config,node){var text="";if(!node)return"";if(!config.supportsTextContent)config.supportsTextContent=node.textContent||false;if(config.textExtraction=="simple"){if(config.supportsTextContent){text=node.textContent;}else{if(node.childNodes[0]&&node.childNodes[0].hasChildNodes()){text=node.childNodes[0].innerHTML;}else{text=node.innerHTML;}}}else{if(typeof(config.textExtraction)=="function"){text=config.textExtraction(node);}else{text=$(node).text();}}return text;}function appendToTable(table,cache){if(table.config.debug){var appendTime=new Date()}var c=cache,r=c.row,n=c.normalized,totalRows=n.length,checkCell=(n[0].length-1),tableBody=$(table.tBodies[0]),rows=[];for(var i=0;i<totalRows;i++){var pos=n[i][checkCell];rows.push(r[pos]);if(!table.config.appender){var l=r[pos].length;for(var j=0;j<l;j++){tableBody[0].appendChild(r[pos][j]);}}}if(table.config.appender){table.config.appender(table,rows);}rows=null;if(table.config.debug){benchmark("Rebuilt table:",appendTime);}applyWidget(table);setTimeout(function(){$(table).trigger("sortEnd");},0);};function buildHeaders(table){if(table.config.debug){var time=new Date();}var meta=($.metadata)?true:false;var header_index=computeTableHeaderCellIndexes(table);$tableHeaders=$(table.config.selectorHeaders,table).each(function(index){this.column=header_index[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=formatSortingOrder(table.config.sortInitialOrder);this.count=this.order;if(checkHeaderMetadata(this)||checkHeaderOptions(table,index))this.sortDisabled=true;if(checkHeaderOptionsSortingLocked(table,index))this.order=this.lockedOrder=checkHeaderOptionsSortingLocked(table,index);if(!this.sortDisabled){var $th=$(this).addClass(table.config.cssHeader);if(table.config.onRenderHeader)table.config.onRenderHeader.apply($th);}table.config.headerList[index]=this;});if(table.config.debug){benchmark("Built headers:",time);log($tableHeaders);}return $tableHeaders;};function computeTableHeaderCellIndexes(t){var matrix=[];var lookup={};var thead=t.getElementsByTagName('THEAD')[0];var trs=thead.getElementsByTagName('TR');for(var i=0;i<trs.length;i++){var cells=trs[i].cells;for(var j=0;j<cells.length;j++){var c=cells[j];var rowIndex=c.parentNode.rowIndex;var cellId=rowIndex+"-"+c.cellIndex;var rowSpan=c.rowSpan||1;var colSpan=c.colSpan||1
+var firstAvailCol;if(typeof(matrix[rowIndex])=="undefined"){matrix[rowIndex]=[];}for(var k=0;k<matrix[rowIndex].length+1;k++){if(typeof(matrix[rowIndex][k])=="undefined"){firstAvailCol=k;break;}}lookup[cellId]=firstAvailCol;for(var k=rowIndex;k<rowIndex+rowSpan;k++){if(typeof(matrix[k])=="undefined"){matrix[k]=[];}var matrixrow=matrix[k];for(var l=firstAvailCol;l<firstAvailCol+colSpan;l++){matrixrow[l]="x";}}}}return lookup;}function checkCellColSpan(table,rows,row){var arr=[],r=table.tHead.rows,c=r[row].cells;for(var i=0;i<c.length;i++){var cell=c[i];if(cell.colSpan>1){arr=arr.concat(checkCellColSpan(table,headerArr,row++));}else{if(table.tHead.length==1||(cell.rowSpan>1||!r[row+1])){arr.push(cell);}}}return arr;};function checkHeaderMetadata(cell){if(($.metadata)&&($(cell).metadata().sorter===false)){return true;};return false;}function checkHeaderOptions(table,i){if((table.config.headers[i])&&(table.config.headers[i].sorter===false)){return true;};return false;}function checkHeaderOptionsSortingLocked(table,i){if((table.config.headers[i])&&(table.config.headers[i].lockedOrder))return table.config.headers[i].lockedOrder;return false;}function applyWidget(table){var c=table.config.widgets;var l=c.length;for(var i=0;i<l;i++){getWidgetById(c[i]).format(table);}}function getWidgetById(name){var l=widgets.length;for(var i=0;i<l;i++){if(widgets[i].id.toLowerCase()==name.toLowerCase()){return widgets[i];}}};function formatSortingOrder(v){if(typeof(v)!="Number"){return(v.toLowerCase()=="desc")?1:0;}else{return(v==1)?1:0;}}function isValueInArray(v,a){var l=a.length;for(var i=0;i<l;i++){if(a[i][0]==v){return true;}}return false;}function setHeadersCss(table,$headers,list,css){$headers.removeClass(css[0]).removeClass(css[1]);var h=[];$headers.each(function(offset){if(!this.sortDisabled){h[this.column]=$(this);}});var l=list.length;for(var i=0;i<l;i++){h[list[i][0]].addClass(css[list[i][1]]);}}function fixColumnWidth(table,$headers){var c=table.config;if(c.widthFixed){var colgroup=$('<colgroup>');$("tr:first td",table.tBodies[0]).each(function(){colgroup.append($('<col>').css('width',$(this).width()));});$(table).prepend(colgroup);};}function updateHeaderSortCount(table,sortList){var c=table.config,l=sortList.length;for(var i=0;i<l;i++){var s=sortList[i],o=c.headerList[s[0]];o.count=s[1];o.count++;}}function multisort(table,sortList,cache){if(table.config.debug){var sortTime=new Date();}var dynamicExp="var sortWrapper = function(a,b) {",l=sortList.length;for(var i=0;i<l;i++){var c=sortList[i][0];var order=sortList[i][1];var s=(table.config.parsers[c].type=="text")?((order==0)?makeSortFunction("text","asc",c):makeSortFunction("text","desc",c)):((order==0)?makeSortFunction("numeric","asc",c):makeSortFunction("numeric","desc",c));var e="e"+i;dynamicExp+="var "+e+" = "+s;dynamicExp+="if("+e+") { return "+e+"; } ";dynamicExp+="else { ";}var orgOrderCol=cache.normalized[0].length-1;dynamicExp+="return a["+orgOrderCol+"]-b["+orgOrderCol+"];";for(var i=0;i<l;i++){dynamicExp+="}; ";}dynamicExp+="return 0; ";dynamicExp+="}; ";if(table.config.debug){benchmark("Evaling expression:"+dynamicExp,new Date());}eval(dynamicExp);cache.normalized.sort(sortWrapper);if(table.config.debug){benchmark("Sorting on "+sortList.toString()+" and dir "+order+" time:",sortTime);}return cache;};function makeSortFunction(type,direction,index){var a="a["+index+"]",b="b["+index+"]";if(type=='text'&&direction=='asc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+a+" < "+b+") ? -1 : 1 )));";}else if(type=='text'&&direction=='desc'){return"("+a+" == "+b+" ? 0 : ("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : ("+b+" < "+a+") ? -1 : 1 )));";}else if(type=='numeric'&&direction=='asc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+a+" - "+b+"));";}else if(type=='numeric'&&direction=='desc'){return"("+a+" === null && "+b+" === null) ? 0 :("+a+" === null ? Number.POSITIVE_INFINITY : ("+b+" === null ? Number.NEGATIVE_INFINITY : "+b+" - "+a+"));";}};function makeSortText(i){return"((a["+i+"] < b["+i+"]) ? -1 : ((a["+i+"] > b["+i+"]) ? 1 : 0));";};function makeSortTextDesc(i){return"((b["+i+"] < a["+i+"]) ? -1 : ((b["+i+"] > a["+i+"]) ? 1 : 0));";};function makeSortNumeric(i){return"a["+i+"]-b["+i+"];";};function makeSortNumericDesc(i){return"b["+i+"]-a["+i+"];";};function sortText(a,b){if(table.config.sortLocaleCompare)return a.localeCompare(b);return((a<b)?-1:((a>b)?1:0));};function sortTextDesc(a,b){if(table.config.sortLocaleCompare)return b.localeCompare(a);return((b<a)?-1:((b>a)?1:0));};function sortNumeric(a,b){return a-b;};function sortNumericDesc(a,b){return b-a;};function getCachedSortType(parsers,i){return parsers[i].type;};this.construct=function(settings){return this.each(function(){if(!this.tHead||!this.tBodies)return;var $this,$document,$headers,cache,config,shiftDown=0,sortOrder;this.config={};config=$.extend(this.config,$.tablesorter.defaults,settings);$this=$(this);$.data(this,"tablesorter",config);$headers=buildHeaders(this);this.config.parsers=buildParserCache(this,$headers);cache=buildCache(this);var sortCSS=[config.cssDesc,config.cssAsc];fixColumnWidth(this);$headers.click(function(e){var totalRows=($this[0].tBodies[0]&&$this[0].tBodies[0].rows.length)||0;if(!this.sortDisabled&&totalRows>0){$this.trigger("sortStart");var $cell=$(this);var i=this.column;this.order=this.count++%2;if(this.lockedOrder)this.order=this.lockedOrder;if(!e[config.sortMultiSortKey]){config.sortList=[];if(config.sortForce!=null){var a=config.sortForce;for(var j=0;j<a.length;j++){if(a[j][0]!=i){config.sortList.push(a[j]);}}}config.sortList.push([i,this.order]);}else{if(isValueInArray(i,config.sortList)){for(var j=0;j<config.sortList.length;j++){var s=config.sortList[j],o=config.headerList[s[0]];if(s[0]==i){o.count=s[1];o.count++;s[1]=o.count%2;}}}else{config.sortList.push([i,this.order]);}};setTimeout(function(){setHeadersCss($this[0],$headers,config.sortList,sortCSS);appendToTable($this[0],multisort($this[0],config.sortList,cache));},1);return false;}}).mousedown(function(){if(config.cancelSelection){this.onselectstart=function(){return false};return false;}});$this.bind("update",function(){var me=this;setTimeout(function(){me.config.parsers=buildParserCache(me,$headers);cache=buildCache(me);},1);}).bind("updateCell",function(e,cell){var config=this.config;var pos=[(cell.parentNode.rowIndex-1),cell.cellIndex];cache.normalized[pos[0]][pos[1]]=config.parsers[pos[1]].format(getElementText(config,cell),cell);}).bind("sorton",function(e,list){$(this).trigger("sortStart");config.sortList=list;var sortList=config.sortList;updateHeaderSortCount(this,sortList);setHeadersCss(this,$headers,sortList,sortCSS);appendToTable(this,multisort(this,sortList,cache));}).bind("appendCache",function(){appendToTable(this,cache);}).bind("applyWidgetId",function(e,id){getWidgetById(id).format(this);}).bind("applyWidgets",function(){applyWidget(this);});if($.metadata&&($(this).metadata()&&$(this).metadata().sortlist)){config.sortList=$(this).metadata().sortlist;}if(config.sortList.length>0){$this.trigger("sorton",[config.sortList]);}applyWidget(this);});};this.addParser=function(parser){var l=parsers.length,a=true;for(var i=0;i<l;i++){if(parsers[i].id.toLowerCase()==parser.id.toLowerCase()){a=false;}}if(a){parsers.push(parser);};};this.addWidget=function(widget){widgets.push(widget);};this.formatFloat=function(s){var i=parseFloat(s);return(isNaN(i))?0:i;};this.formatInt=function(s){var i=parseInt(s);return(isNaN(i))?0:i;};this.isDigit=function(s,config){return/^[-+]?\d*$/.test($.trim(s.replace(/[,.']/g,'')));};this.clearTableBody=function(table){if($.browser.msie){function empty(){while(this.firstChild)this.removeChild(this.firstChild);}empty.apply(table.tBodies[0]);}else{table.tBodies[0].innerHTML="";}};}});$.fn.extend({tablesorter:$.tablesorter.construct});var ts=$.tablesorter;ts.addParser({id:"text",is:function(s){return true;},format:function(s){return $.trim(s.toLocaleLowerCase());},type:"text"});ts.addParser({id:"digit",is:function(s,table){var c=table.config;return $.tablesorter.isDigit(s,c);},format:function(s){return $.tablesorter.formatFloat(s);},type:"numeric"});ts.addParser({id:"currency",is:function(s){return/^[£$€?.]/.test(s);},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/[£$€]/g),""));},type:"numeric"});ts.addParser({id:"ipAddress",is:function(s){return/^\d{2,3}[\.]\d{2,3}[\.]\d{2,3}[\.]\d{2,3}$/.test(s);},format:function(s){var a=s.split("."),r="",l=a.length;for(var i=0;i<l;i++){var item=a[i];if(item.length==2){r+="0"+item;}else{r+=item;}}return $.tablesorter.formatFloat(r);},type:"numeric"});ts.addParser({id:"url",is:function(s){return/^(https?|ftp|file):\/\/$/.test(s);},format:function(s){return jQuery.trim(s.replace(new RegExp(/(https?|ftp|file):\/\//),''));},type:"text"});ts.addParser({id:"isoDate",is:function(s){return/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(s);},format:function(s){return $.tablesorter.formatFloat((s!="")?new Date(s.replace(new RegExp(/-/g),"/")).getTime():"0");},type:"numeric"});ts.addParser({id:"percent",is:function(s){return/\%$/.test($.trim(s));},format:function(s){return $.tablesorter.formatFloat(s.replace(new RegExp(/%/g),""));},type:"numeric"});ts.addParser({id:"usLongDate",is:function(s){return s.match(new RegExp(/^[A-Za-z]{3,10}\.? [0-9]{1,2}, ([0-9]{4}|'?[0-9]{2}) (([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(AM|PM)))$/));},format:function(s){return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"shortDate",is:function(s){return/\d{1,2}[\/\-]\d{1,2}[\/\-]\d{2,4}/.test(s);},format:function(s,table){var c=table.config;s=s.replace(/\-/g,"/");if(c.dateFormat=="us"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$1/$2");}else if (c.dateFormat == "pt") {s = s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/, "$3/$2/$1");} else if(c.dateFormat=="uk"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{4})/,"$3/$2/$1");}else if(c.dateFormat=="dd/mm/yy"||c.dateFormat=="dd-mm-yy"){s=s.replace(/(\d{1,2})[\/\-](\d{1,2})[\/\-](\d{2})/,"$1/$2/$3");}return $.tablesorter.formatFloat(new Date(s).getTime());},type:"numeric"});ts.addParser({id:"time",is:function(s){return/^(([0-2]?[0-9]:[0-5][0-9])|([0-1]?[0-9]:[0-5][0-9]\s(am|pm)))$/.test(s);},format:function(s){return $.tablesorter.formatFloat(new Date("2000/01/01 "+s).getTime());},type:"numeric"});ts.addParser({id:"metadata",is:function(s){return false;},format:function(s,table,cell){var c=table.config,p=(!c.parserMetadataName)?'sortValue':c.parserMetadataName;return $(cell).metadata()[p];},type:"numeric"});ts.addWidget({id:"zebra",format:function(table){if(table.config.debug){var time=new Date();}var $tr,row=-1,odd;$("tr:visible",table.tBodies[0]).each(function(i){$tr=$(this);if(!$tr.hasClass(table.config.cssChildRow))row++;odd=(row%2==0);$tr.removeClass(table.config.widgetZebra.css[odd?0:1]).addClass(table.config.widgetZebra.css[odd?1:0])});if(table.config.debug){$.tablesorter.benchmark("Applying Zebra widget",time);}}});})(jQuery);
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown.js b/src/plugins/wiki/www/themes/default/moacdropdown.js
deleted file mode 100644
index 9da9447..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown.js
+++ /dev/null
@@ -1,1354 +0,0 @@
-
-function cBrowser(){var userAgent=navigator.userAgent.toLowerCase()
-this.version=parseInt(navigator.appVersion)
-this.subVersion=parseFloat(navigator.appVersion)
-this.ns=((userAgent.indexOf('mozilla')!=-1)&&((userAgent.indexOf('spoofer')==-1)&&(userAgent.indexOf('compatible')==-1)))
-this.ns2=(this.ns&&(this.version==2))
-this.ns3=(this.ns&&(this.version==3))
-this.ns4b=(this.ns&&(this.subVersion<4.04))
-this.ns4=(this.ns&&(this.version==4))
-this.ns5=(this.ns&&(this.version==5))
-this.ie=(userAgent.indexOf('msie')!=-1)
-this.ie3=(this.ie&&(this.version==2))
-this.ie4=(this.ie&&(this.version==4)&&(userAgent.indexOf('msie 4.')!=-1))
-this.ie5=(this.ie&&(this.version==4)&&(userAgent.indexOf('msie 5.0')!=-1))
-this.ie55=(this.ie&&(this.version==4)&&(userAgent.indexOf('msie 5.5')!=-1))
-this.ie6=(this.ie&&(this.version==4)&&(userAgent.indexOf('msie 6.0')!=-1))
-this.op3=(userAgent.indexOf('opera')!=-1)
-this.win=(userAgent.indexOf('win')!=-1)
-this.mac=(userAgent.indexOf('mac')!=-1)
-this.unix=(userAgent.indexOf('x11')!=-1)
-this.name=navigator.appName
-this.dom=this.ns5||this.ie5||this.ie55||this.ie6}
-var bw=new cBrowser()
-cDomEvent={e:null,type:'',button:0,key:0,x:0,y:0,pagex:0,pagey:0,target:null,from:null,to:null}
-cDomEvent.init=function(e)
-{if(window.event)e=window.event
-this.e=e
-this.type=e.type
-this.button=(e.which)?e.which:e.button
-this.key=(e.which)?e.which:e.keyCode
-this.target=(e.srcElement)?e.srcElement:e.originalTarget
-this.currentTarget=(e.currentTarget)?e.currentTarget:e.srcElement
-this.from=(e.originalTarget)?e.originalTarget:(e.fromElement)?e.fromElement:null
-this.to=(e.currentTarget)?e.currentTarget:(e.toElement)?e.toElement:null
-this.x=(e.layerX)?e.layerX:(e.offsetX)?e.offsetX:null
-this.y=(e.layerY)?e.layerY:(e.offsetY)?e.offsetY:null
-this.screenX=e.screenX
-this.screenY=e.screenY
-this.pageX=(e.pageX)?e.pageX:e.x+document.body.scrollLeft
-this.pageY=(e.pageY)?e.pageY:e.y+document.body.scrollTop}
-cDomEvent.getEvent=function(e)
-{if(window.event)e=window.event
-return{e:e,type:e.type,button:(e.which)?e.which:e.button,key:(e.which)?e.which:e.keyCode,target:(e.srcElement)?e.srcElement:e.originalTarget,currentTarget:(e.currentTarget)?e.currentTarget:e.srcElement,from:(e.originalTarget)?e.originalTarget:(e.fromElement)?e.fromElement:null,to:(e.currentTarget)?e.currentTarget:(e.toElement)?e.toElement:null,x:(e.layerX)?e.layerX:(e.offsetX)?e.offsetX:null,y:(e.layerY)?e.layerY:(e.offsetY)?e.offsetY:null,screenX:e.screenX,screenY:e.screenY,pageX:(e.pageX)?e.pageX:(e.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),pageY:(e.pageY)?e.pageY:(e.clientY+(document.documentElement.scrollTop||document.body.scrollTop))}}
-cDomEvent.cancelEvent=function(e)
-{if(e.preventDefault)
-{e.preventDefault()}
-e.returnValue=false
-e.cancelBubble=true
-return false}
-cDomEvent.addEvent=function(hElement,sEvent,handler,bCapture)
-{if(hElement.addEventListener)
-{hElement.addEventListener(sEvent,handler,bCapture)
-return true}
-else if(hElement.attachEvent)
-{return hElement.attachEvent('on'+sEvent,handler)}
-else if(document.all||hElement.captureEvents)
-{if(hElement.captureEvents)eval('hElement.captureEvents( Event.'+sEvent.toUpperCase()+' )')
-eval('hElement.on'+sEvent+' = '+handler)}
-else
-{alert('Not implemented yet!')}}
-cDomEvent.encapsulateEvent=function(hHandler)
-{return function(hEvent)
-{hEvent=cDomEvent.getEvent(hEvent)
-hHandler.call(hEvent.target,hEvent.e)}}
-cDomEvent.addEvent2=function(hElement,sEvent,handler,bCapture)
-{if(hElement)
-{if(hElement.addEventListener)
-{hElement.addEventListener(sEvent,cDomEvent.encapsulateEvent(handler),bCapture)
-return true}
-else if(hElement.attachEvent)
-{return hElement.attachEvent('on'+sEvent,cDomEvent.encapsulateEvent(handler))}
-else
-{alert('Not implemented yet!')}}
-else
-{}}
-cDomEvent.addCustomEvent2=function(hElement,sEvent,handler)
-{if(hElement)
-{hElement[sEvent]=handler}
-else
-{}}
-cDomEvent.removeEvent=function(hElement,sEvent,handler,bCapture)
-{if(hElement.addEventListener)
-{hElement.removeEventListener(sEvent,handler,bCapture)
-return true}
-else if(hElement.attachEvent)
-{return hElement.detachEvent('on'+sEvent,handler)}
-else if(document.all||hElement.captureEvents)
-{eval('hElement.on'+sEvent+' = null')}
-else
-{alert('Not implemented yet!')}}
-function MouseButton()
-{if(document.layers)
-{this.left=1
-this.middle=2
-this.right=3}
-else if(document.all)
-{this.left=1
-this.middle=4
-this.right=2}
-else
-{this.left=0
-this.middle=1
-this.right=2}}
-var MB=new MouseButton()
-if(document.ELEMENT_NODE==null)
-{document.ELEMENT_NODE=1
-document.TEXT_NODE=3}
-function getSubNodeByName(hNode,sNodeName)
-{if(hNode!=null)
-{var nNc=0
-var nC=0
-var hNodeChildren=hNode.childNodes
-var hCNode=null
-while(nC<hNodeChildren.length)
-{hCNode=hNodeChildren.item(nC++)
-if((hCNode.nodeType==1)&&(hCNode.nodeName.toLowerCase()==sNodeName))
-{return hCNode}}}
-return null}
-function getPrevNodeSibling(hNode)
-{if(hNode!=null)
-{do{hNode=hNode.previousSibling}while(hNode!=null&&hNode.nodeType!=1)
-return hNode}}
-function getNextNodeSibling(hNode)
-{if(hNode!=null)
-{do{hNode=hNode.nextSibling}while(hNode!=null&&hNode.nodeType!=1)
-return hNode}}
-function getLastSubNodeByName(hNode,sNodeName)
-{if(hNode!=null)
-{var nNc=0
-var nC=0
-var hNodeChildren=hNode.childNodes
-var hCNode=null
-var nLength=hNodeChildren.length-1
-while(nLength>=0)
-{hCNode=hNodeChildren.item(nLength)
-if((hCNode.nodeType==1)&&(hCNode.nodeName.toLowerCase()==sNodeName))
-{return hCNode}
-nLength--}}
-return null}
-function getSubNodeByProperty(hNode,sProperty,sPropValue)
-{if(hNode!=null)
-{var nNc=0
-var nC=0
-var hNodeChildren=hNode.childNodes
-var hCNode=null
-var sAttribute
-var hProp
-sPropValue=sPropValue.toLowerCase()
-while(nC<hNodeChildren.length)
-{hCNode=hNodeChildren.item(nC++)
-if(hCNode.nodeType==document.ELEMENT_NODE)
-{hProp=eval('hCNode.'+sProperty)
-if(typeof(sPropValue)!='undefined')
-{if(hProp.toLowerCase()==sPropValue)
-{return hCNode}}
-else
-{return hCNode}}
-nNc++}}
-return null}
-function findAttribute(hNode,sAtt)
-{sAtt=sAtt.toLowerCase()
-for(var nI=0;nI<hNode.attributes.length;nI++)
-{if(hNode.attributes.item(nI).nodeName.toLowerCase()==sAtt)
-{return hNode.attributes.item(nI).nodeValue}}
-return null}
-function getSubNodeByAttribute(hNode,sAtt,sAttValue)
-{if(hNode!=null)
-{var nNc=0
-var nC=0
-var hNodeChildren=hNode.childNodes
-var hCNode=null
-var sAttribute
-sAttValue=sAttValue.toLowerCase()
-while(nC<hNodeChildren.length)
-{hCNode=hNodeChildren.item(nC++)
-if(hCNode.nodeType==document.ELEMENT_NODE)
-{sAttribute=hCNode.getAttribute(sAtt)
-if(sAttribute&&sAttribute.toLowerCase()==sAttValue)
-return hCNode}
-nNc++}}
-return null}
-function getLastSubNodeByAttribute(hNode,sAtt,sAttValue)
-{if(hNode!=null)
-{var nNc=0
-var nC=0
-var hNodeChildren=hNode.childNodes
-var hCNode=null
-var nLength=hNodeChildren.length-1
-while(nLength>=0)
-{hCNode=hNodeChildren.item(nLength)
-if(hCNode.nodeType==document.ELEMENT_NODE)
-{sAttribute=hCNode.getAttribute(sAtt)
-if(sAttribute&&sAttribute.toLowerCase()==sAttValue)
-return hCNode}
-nLength--}}
-return null}
-function getParentByTagName(hNode,sParentTagName)
-{while((hNode.tagName)&&!(/(body|html)/i.test(hNode.tagName)))
-{if(hNode.tagName==sParentTagName)
-{return hNode}
-hNode=hNode.parentNode}
-return null}
-function getParentByAttribute(hNode,sAtt,sAttValue)
-{while((hNode.tagName)&&!(/(body|html)/i.test(hNode.tagName)))
-{var sAttr=hNode.getAttribute(sAtt)
-if(sAttr!=null&&sAttr.toString().length>0)
-{if(sAttValue!==null)
-{if(sAttr==sAttValue)
-{return hNode}}
-else
-{return hNode}}
-hNode=hNode.parentNode}
-return null}
-function getParentByProperty(hNode,sProperty,sPropValue)
-{while((hNode.tagName)&&!(/(body|html)/i.test(hNode.tagName)))
-{var hProp=eval('hNode.'+sProperty)
-if(hProp!=null&&hProp.toString().length>0)
-{if(sPropValue!==null)
-{if(hProp==sPropValue)
-{return hNode}}
-else
-{return hNode}}
-hNode=hNode.parentNode}
-return null}
-function getNodeText(hNode)
-{if(hNode==null)
-{return''}
-var sRes
-if(hNode.hasChildNodes())
-{sRes=hNode.childNodes.item(0).nodeValue}
-else
-{sRes=hNode.text}
-return sRes}
-function cDomExtension(hParent,aSelectors,hInitFunction)
-{this.hParent=hParent
-this.aSelectors=aSelectors
-this.hInitFunction=hInitFunction}
-cDomExtensionManager={aExtensions:new Array()}
-cDomExtensionManager.register=function(hDomExtension)
-{cDomExtensionManager.aExtensions.push(hDomExtension)}
-cDomExtensionManager.initSelector=function(hParent,sSelector,hInitFunction)
-{var hSelectorRegEx
-var hAttributeRegEx
-var aSelectorData
-var aAttributeData
-var sAttribute
-hSelectorRegEx=/([a-z0-9_]*)\[?([^\]]*)\]?/i
-hAttributeRegEx=/([a-z0-9_]*)([\*\^\$]?)(=?)(([a-z0-9_=]*))/i
-if(hSelectorRegEx.test(sSelector)&&!/[@#\.]/.test(sSelector))
-{aSelectorData=hSelectorRegEx.exec(sSelector)
-if(aSelectorData[1]!='')
-{hGroup=hParent.getElementsByTagName(aSelectorData[1].toLowerCase())
-for(nI=0;nI<hGroup.length;nI++)
-{hGroup[nI].markExt=true}
-for(nI=0;nI<hGroup.length;nI++)
-{if(!hGroup[nI].markExt)
-{continue}
-else
-{hGroup[nI].markExt=false}
-if(aSelectorData[2]=='')
-{if(hGroup[nI].tagName.toLowerCase()==aSelectorData[1].toLowerCase())
-{hInitFunction(hGroup[nI])}}
-else
-{aAttributeData=hAttributeRegEx.exec(aSelectorData[2])
-if(aAttributeData[1]=='class')
-{sAttribute=hGroup[nI].className}
-else
-{sAttribute=hGroup[nI].getAttribute(aAttributeData[1])}
-if(sAttribute!=null&&sAttribute.length>0)
-{if(aAttributeData[3]=='=')
-{if(aAttributeData[2]=='')
-{if(sAttribute==aAttributeData[4])
-{hInitFunction(hGroup[nI])}}
-else
-{switch(aAttributeData[2])
-{case'^':if(sAttribute.indexOf(aAttributeData[4])==0)
-{hInitFunction(hGroup[nI])}
-break
-case'$':if(sAttribute.lastIndexOf(aAttributeData[4])==sAttribute.length-aAttributeData[4].length)
-{hInitFunction(hGroup[nI])}
-break
-case'*':if(sAttribute.indexOf(aAttributeData[4])>=0)
-{hInitFunction(hGroup[nI])}
-break}}}
-else
-{hInitFunction(hGroup[nI])}}}}
-return}}
-hSelectorRegEx=/([a-z0-9_]*)([\.#@]?)([a-z0-9_=~]*)/i
-hAttributeRegEx=/([a-z0-9_]*)([=~])?([a-z0-9_]*)/i
-aSelectorData=hSelectorRegEx.exec(sSelector)
-if(aSelectorData[1]!='')
-{var hGroup=hParent.getElementsByTagName(aSelectorData[1])
-for(nI=0;nI<hGroup.length;nI++)
-{hGroup[nI].markExt=true}
-for(nI=0;nI<hGroup.length;nI++)
-{if(!hGroup[nI].markExt)
-{continue}
-else
-{hGroup[nI].markExt=false}
-if(aSelectorData[2]!='')
-{switch(aSelectorData[2])
-{case'.':if(hGroup[nI].className==aSelectorData[3])
-{hInitFunction(hGroup[nI])}
-break
-case'#':if(hGroup[nI].id==aSelectorData[3])
-{hInitFunction(hGroup[nI])}
-break
-case'@':aAttributeData=hAttributeRegEx.exec(aSelectorData[3])
-sAttribute=hGroup[nI].getAttribute(aAttributeData[1])
-if(sAttribute!=null&&sAttribute.length>0)
-{if(aAttributeData[3]!='')
-{if(aAttributeData[2]=='=')
-{if(sAttribute==aAttributeData[3])
-{hInitFunction(hGroup[nI])}}
-else
-{if(sAttribute.indexOf(aAttributeData[3])>=0)
-{hInitFunction(hGroup[nI])}}}
-else
-{hInitFunction(hGroup[nI])}}
-break}}}}}
-cDomExtensionManager.initialize=function()
-{var hDomExtension=null
-var aSelectors
-for(var nKey in cDomExtensionManager.aExtensions)
-{aSelectors=cDomExtensionManager.aExtensions[nKey].aSelectors
-for(var nKey2 in aSelectors)
-{cDomExtensionManager.initSelector(cDomExtensionManager.aExtensions[nKey].hParent,aSelectors[nKey2],cDomExtensionManager.aExtensions[nKey].hInitFunction)}}}
-if(window.addEventListener)
-{window.addEventListener('load',cDomExtensionManager.initialize,false)}
-else if(window.attachEvent)
-{window.attachEvent('onload',cDomExtensionManager.initialize)}
-function cDomObject(sId)
-{if(bw.dom||bw.ie)
-{this.hElement=document.getElementById(sId)
-this.hStyle=this.hElement.style}}
-cDomObject.prototype.getWidth=function()
-{return cDomObject.getWidth(this.hElement)}
-cDomObject.getWidth=function(hElement)
-{if(hElement.currentStyle)
-{var nWidth=parseInt(hElement.currentStyle.width)
-if(isNaN(nWidth))
-{return parseInt(hElement.offsetWidth)}
-else
-{return nWidth}}
-else
-{return parseInt(hElement.offsetWidth)}}
-cDomObject.prototype.getHeight=function()
-{return cDomObject.getHeight(this.hElement)}
-cDomObject.getHeight=function(hElement)
-{if(hElement.currentStyle)
-{var nHeight=parseInt(hElement.currentStyle.height)
-if(isNaN(nHeight))
-{return parseInt(hElement.offsetHeight)}
-else
-{return nHeight}}
-else
-{return parseInt(hElement.offsetHeight)}}
-cDomObject.prototype.getLeft=function()
-{return cDomObject.getLeft(this.hElement)}
-cDomObject.getLeft=function(hElement)
-{return parseInt(hElement.offsetLeft)}
-cDomObject.prototype.getTop=function()
-{return cDomObject.getTop(this.hElement)}
-cDomObject.getTop=function(hElement)
-{return parseInt(hElement.offsetTop)}
-cDomObject.getOffsetParam=function(hElement,sParam,hLimitParent)
-{var nRes=0
-if(hLimitParent==null)
-{hLimitParent=document.body.parentElement}
-while(hElement!=hLimitParent)
-{nRes+=eval('hElement.'+sParam)
-if(!hElement.offsetParent){break}
-hElement=hElement.offsetParent}
-return nRes}
-cDomObject.getScrollOffset=function(hElement,sParam,hLimitParent)
-{nRes=0
-if(hLimitParent==null)
-{hLimitParent=document.body.parentElement}
-while(hElement!=hLimitParent)
-{nRes+=eval('hElement.scroll'+sParam)
-if(!hElement.offsetParent){break}
-hElement=hElement.parentNode}
-return nRes}
-function getDomDocumentPrefix(){if(getDomDocumentPrefix.prefix)
-return getDomDocumentPrefix.prefix;var prefixes=["MSXML2","Microsoft","MSXML","MSXML3"];var o;for(var i=0;i<prefixes.length;i++){try{o=new ActiveXObject(prefixes[i]+".DomDocument");return getDomDocumentPrefix.prefix=prefixes[i];}
-catch(ex){};}
-throw new Error("Could not find an installed XML parser");}
-function getXmlHttpPrefix(){if(getXmlHttpPrefix.prefix)
-return getXmlHttpPrefix.prefix;var prefixes=["MSXML2","Microsoft","MSXML","MSXML3"];var o;for(var i=0;i<prefixes.length;i++){try{o=new ActiveXObject(prefixes[i]+".XmlHttp");return getXmlHttpPrefix.prefix=prefixes[i];}
-catch(ex){};}
-throw new Error("Could not find an installed XML parser");}
-function XmlHttp(){}
-XmlHttp.create=function(){try{if(window.XMLHttpRequest){var req=new XMLHttpRequest();if(req.readyState==null){req.readyState=1;req.addEventListener("load",function(){req.readyState=4;if(typeof req.onreadystatechange=="function")
-req.onreadystatechange();},false);}
-return req;}
-if(window.ActiveXObject){return new ActiveXObject(getXmlHttpPrefix()+".XmlHttp");}}
-catch(ex){}
-throw new Error("Your browser does not support XmlHttp objects");};function XmlDocument(){}
-XmlDocument.create=function(){try{if(document.implementation&&document.implementation.createDocument){var doc=document.implementation.createDocument("","",null);if(doc.readyState==null){doc.readyState=1;doc.addEventListener("load",function(){doc.readyState=4;if(typeof doc.onreadystatechange=="function")
-doc.onreadystatechange();},false);}
-return doc;}
-if(window.ActiveXObject)
-return new ActiveXObject(getDomDocumentPrefix()+".DomDocument");}
-catch(ex){}
-throw new Error("Your browser does not support XmlDocument objects");};if(window.DOMParser&&window.XMLSerializer&&window.Node&&Node.prototype&&Node.prototype.__defineGetter__){Document.prototype.loadXML=function(s){var doc2=(new DOMParser()).parseFromString(s,"text/xml");while(this.hasChildNodes())
-this.removeChild(this.lastChild);for(var i=0;i<doc2.childNodes.length;i++){this.appendChild(this.importNode(doc2.childNodes[i],true));}};Document.prototype.__defineGetter__("xml",function(){return(new XMLSerializer()).serializeToString(this);});}
-function cAutocomplete(sInputId)
-{this.init(sInputId)}
-var xmlrpc_url;cAutocomplete.CS_NAME='Autocomplete component'
-cAutocomplete.CS_OBJ_NAME='AC_COMPONENT'
-cAutocomplete.CS_LIST_PREFIX='ACL_'
-cAutocomplete.CS_BUTTON_PREFIX='ACB_'
-cAutocomplete.CS_INPUT_PREFIX='AC_'
-cAutocomplete.CS_HIDDEN_INPUT_PREFIX='ACH_'
-cAutocomplete.CS_INPUT_CLASSNAME='dropdown'
-cAutocomplete.CB_AUTOINIT=true
-cAutocomplete.CB_AUTOCOMPLETE=false
-cAutocomplete.CB_FORCECORRECT=false
-cAutocomplete.CB_MATCHSUBSTRING=false
-cAutocomplete.CS_SEPARATOR=','
-cAutocomplete.CS_ARRAY_SEPARATOR=','
-cAutocomplete.CB_MATCHSTRINGBEGIN=true
-cAutocomplete.CN_OFFSET_TOP=2
-cAutocomplete.CN_OFFSET_LEFT=-1
-cAutocomplete.CN_LINE_HEIGHT=19
-cAutocomplete.CN_NUMBER_OF_LINES=10
-cAutocomplete.CN_HEIGHT_FIX=2
-cAutocomplete.CN_CLEAR_TIMEOUT=300
-cAutocomplete.CN_SHOW_TIMEOUT=400
-cAutocomplete.CN_REMOTE_SHOW_TIMEOUT=1000
-cAutocomplete.CN_MARK_TIMEOUT=400
-cAutocomplete.hListDisplayed=null
-cAutocomplete.nCount=0
-cAutocomplete.autoInit=function()
-{var nI=0
-var hACE=null
-var sLangAtt
-var nInputsLength=document.getElementsByTagName('INPUT').length
-for(nI=0;nI<nInputsLength;nI++)
-{if(document.getElementsByTagName('INPUT')[nI].type.toLowerCase()=='text')
-{sLangAtt=document.getElementsByTagName('INPUT')[nI].getAttribute('acdropdown')
-if(sLangAtt!=null&&sLangAtt.length>0)
-{if(document.getElementsByTagName('INPUT')[nI].id==null||document.getElementsByTagName('INPUT')[nI].id.length==0)
-{document.getElementsByTagName('INPUT')[nI].id=cAutocomplete.CS_OBJ_NAME+cAutocomplete.nCount}
-hACE=new cAutocomplete(document.getElementsByTagName('INPUT')[nI].id)}}}
-var nTALength=document.getElementsByTagName('TEXTAREA').length
-for(nI=0;nI<nTALength;nI++)
-{sLangAtt=document.getElementsByTagName('TEXTAREA')[nI].getAttribute('acdropdown')
-if(sLangAtt!=null&&sLangAtt.length>0)
-{if(document.getElementsByTagName('TEXTAREA')[nI].id==null||document.getElementsByTagName('TEXTAREA')[nI].id.length==0)
-{document.getElementsByTagName('TEXTAREA')[nI].id=cAutocomplete.CS_OBJ_NAME+cAutocomplete.nCount}
-hACE=new cAutocomplete(document.getElementsByTagName('TEXTAREA')[nI].id)}}
-var nSelectsLength=document.getElementsByTagName('SELECT').length
-var aSelect=null
-for(nI=0;nI<nSelectsLength;nI++)
-{aSelect=document.getElementsByTagName('SELECT')[nI]
-sLangAtt=aSelect.getAttribute('acdropdown')
-if(sLangAtt!=null&&sLangAtt.length>0)
-{if(aSelect.id==null||aSelect.id.length==0)
-{aSelect.id=cAutocomplete.CS_OBJ_NAME+cAutocomplete.nCount}
-hACE=new cAutocomplete(aSelect.id)
-nSelectsLength--
-nI--}}}
-if(cAutocomplete.CB_AUTOINIT)
-{if(window.attachEvent)
-{window.attachEvent('onload',cAutocomplete.autoInit)}
-else if(window.addEventListener)
-{window.addEventListener('load',cAutocomplete.autoInit,false)}}
-cAutocomplete.prototype.init=function(sInputId)
-{this.bDebug=false
-this.sInputId=sInputId
-this.sListId=cAutocomplete.CS_LIST_PREFIX+sInputId
-this.sObjName=cAutocomplete.CS_OBJ_NAME+'_obj_'+(cAutocomplete.nCount++)
-this.hObj=this.sObjName
-this.hActiveSelection=null
-this.nSelectedItemIdx=-1
-this.sLastActiveValue=''
-this.sActiveValue=''
-this.bListDisplayed=false
-this.nItemsDisplayed=0
-this.bAssociative=true
-this.sHiddenInputId=null
-this.bHasButton=false
-this.aData=null
-this.aSearchData=new Array()
-this.bSorted=false
-this.nLastMatchLength=0
-this.bForceCorrect=cAutocomplete.CB_FORCECORRECT
-var sForceCorrect=document.getElementById(this.sInputId).getAttribute('autocomplete_forcecorrect')
-if(sForceCorrect!=null&&sForceCorrect.length>0)
-{this.bForceCorrect=eval(sForceCorrect)}
-this.bMatchBegin=cAutocomplete.CB_MATCHSTRINGBEGIN
-var sMatchBegin=document.getElementById(this.sInputId).getAttribute('autocomplete_matchbegin')
-if(sMatchBegin!=null&&sMatchBegin.length>0)
-{this.bMatchBegin=eval(sMatchBegin)}
-this.bMatchSubstring=cAutocomplete.CB_MATCHSUBSTRING
-var sMatchSubstring=document.getElementById(this.sInputId).getAttribute('autocomplete_matchsubstring')
-if(sMatchSubstring!=null&&sMatchSubstring.length>0)
-{this.bMatchSubstring=eval(sMatchSubstring)}
-this.bAutoComplete=cAutocomplete.CB_AUTOCOMPLETE
-this.bAutocompleted=false
-var sAutoComplete=document.getElementById(this.sInputId).getAttribute('autocomplete_complete')
-if(sAutoComplete!=null&&sAutoComplete.length>0)
-{this.bAutoComplete=eval(sAutoComplete)}
-this.formatOptions=null
-var sFormatFunction=document.getElementById(this.sInputId).getAttribute('autocomplete_format')
-if(sFormatFunction!=null&&sFormatFunction.length>0)
-{this.formatOptions=eval(sFormatFunction)}
-this.onSelect=null
-var sOnSelectFunction=document.getElementById(this.sInputId).getAttribute('autocomplete_onselect')
-if(sOnSelectFunction!=null&&sOnSelectFunction.length>0)
-{this.onSelect=eval(sOnSelectFunction)}
-if(this.getListArrayType()=='url'||this.getListArrayType()=='xmlrpc')
-{this.bAssociative=false
-this.bRemoteList=true
-this.sListURL=this.getListURL()
-this.hXMLHttp=XmlHttp.create()
-this.bXMLRPC=(this.getListArrayType()=='xmlrpc')}
-else
-{this.bRemoteList=false}
-var sAssociative=document.getElementById(this.sInputId).getAttribute('autocomplete_assoc')
-if(sAssociative!=null&&sAssociative.length>0)
-{this.bAssociative=eval(sAssociative)}
-this.initListArray()
-this.initListContainer()
-this.initInput()
-eval(this.hObj+'= this')}
-cAutocomplete.prototype.initInput=function()
-{var hInput=document.getElementById(this.sInputId)
-hInput.hAutocomplete=this
-var hContainer=document.getElementById(this.sListId)
-hContainer.hAutocomplete=this
-var nWidth=hInput.offsetWidth
-if(!nWidth||nWidth==0)
-{var hOWInput=hInput.cloneNode(true)
-hOWInput.style.position='absolute'
-hOWInput.style.top='-1000px'
-document.body.appendChild(hOWInput)
-var nWidth=hOWInput.offsetWidth
-document.body.removeChild(hOWInput)}
-var sInputName=hInput.name
-var hForm=hInput.form
-var bHasButton=false
-var sHiddenValue=hInput.value
-var sValue=hInput.type.toLowerCase()=='text'?hInput.value:''
-var sHasButton=hInput.getAttribute('autocomplete_button')
-if(sHasButton!=null&&sHasButton.length>0)
-{bHasButton=true}
-if(hInput.type.toLowerCase()=='select-one')
-{bHasButton=true
-if(hInput.selectedIndex>=0)
-{sHiddenValue=hInput.options[hInput.selectedIndex].value
-sValue=hInput.options[hInput.selectedIndex].text}}
-if(hForm)
-{var hHiddenInput=document.createElement('INPUT')
-hHiddenInput.id=cAutocomplete.CS_HIDDEN_INPUT_PREFIX+this.sInputId
-hHiddenInput.type='hidden'
-hForm.appendChild(hHiddenInput)
-if(this.bAssociative)
-{hHiddenInput.name=sInputName
-hInput.name=cAutocomplete.CS_INPUT_PREFIX+sInputName}
-else
-{hHiddenInput.name=cAutocomplete.CS_INPUT_PREFIX+sInputName}
-hHiddenInput.value=sHiddenValue
-this.sHiddenInputId=hHiddenInput.id}
-if(bHasButton)
-{this.bHasButton=true
-var hInputContainer=document.createElement('DIV')
-hInputContainer.className='acinputContainer'
-hInputContainer.style.width=nWidth
-var hInputButton=document.createElement('INPUT')
-hInputButton.id=cAutocomplete.CS_BUTTON_PREFIX+this.sInputId
-hInputButton.type='button'
-hInputButton.className='button'
-hInputButton.tabIndex=hInput.tabIndex+1
-hInputButton.hAutocomplete=this
-var hNewInput=document.createElement('INPUT')
-if(this.bAssociative)
-{hNewInput.name=cAutocomplete.CS_INPUT_PREFIX+sInputName}
-else
-{hNewInput.name=sInputName}
-hNewInput.type='text'
-hNewInput.value=sValue
-hNewInput.style.width=nWidth-22
-hNewInput.className=cAutocomplete.CS_INPUT_CLASSNAME
-hNewInput.tabIndex=hInput.tabIndex
-hNewInput.hAutocomplete=this
-hInputContainer.appendChild(hNewInput)
-hInputContainer.appendChild(hInputButton)
-hInput.parentNode.replaceChild(hInputContainer,hInput)
-hNewInput.id=this.sInputId
-hInput=hNewInput}
-if(hInput.attachEvent)
-{hInput.attachEvent('onkeyup',cAutocomplete.onInputKeyUp)
-hInput.attachEvent('onkeyup',cAutocomplete.saveCaretPosition)
-hInput.attachEvent('onkeydown',cAutocomplete.onInputKeyDown)
-hInput.attachEvent('onblur',cAutocomplete.onInputBlur)
-hInput.attachEvent('onfocus',cAutocomplete.onInputFocus)
-if(hInputButton)
-{hInputButton.attachEvent('onclick',cAutocomplete.onButtonClick)}}
-else if(hInput.addEventListener)
-{hInput.addEventListener('keyup',cAutocomplete.onInputKeyUp,false)
-hInput.addEventListener('keyup',cAutocomplete.saveCaretPosition,false)
-hInput.addEventListener('keydown',cAutocomplete.onInputKeyDown,false)
-hInput.addEventListener('keypress',cAutocomplete.onInputKeyPress,false)
-hInput.addEventListener('blur',cAutocomplete.onInputBlur,false)
-hInput.addEventListener('focus',cAutocomplete.onInputFocus,false)
-if(hInputButton)
-{hInputButton.addEventListener('click',cAutocomplete.onButtonClick,false)}}
-hInput.setAttribute('autocomplete','OFF')
-if(hForm)
-{if(hForm.attachEvent)
-{hForm.attachEvent('onsubmit',cAutocomplete.onFormSubmit)
-if(this.bDebug){this.debug("attachEvent added")}}
-else if(hForm.addEventListener)
-{hForm.addEventListener('submit',cAutocomplete.onFormSubmit,false)
-if(this.bDebug){this.debug("addEventListener")}}}}
-cAutocomplete.prototype.initListContainer=function()
-{var hInput=document.getElementById(this.sInputId)
-var hContainer=document.createElement('DIV')
-hContainer.className='autocomplete_holder'
-hContainer.id=this.sListId
-hContainer.style.zIndex=10000+cAutocomplete.nCount
-hContainer.hAutocomplete=this
-var hFirstBorder=document.createElement('DIV')
-hFirstBorder.className='autocomplete_firstborder'
-var hSecondBorder=document.createElement('DIV')
-hSecondBorder.className='autocomplete_secondborder'
-var hList=document.createElement('UL')
-hList.className='autocomplete'
-hSecondBorder.appendChild(hList)
-hFirstBorder.appendChild(hSecondBorder)
-hContainer.appendChild(hFirstBorder)
-document.body.appendChild(hContainer)
-if(hContainer.attachEvent)
-{hContainer.attachEvent('onblur',cAutocomplete.onListBlur)
-hContainer.attachEvent('onfocus',cAutocomplete.onListFocus)}
-else if(hInput.addEventListener)
-{hContainer.addEventListener('blur',cAutocomplete.onListBlur,false)
-hContainer.addEventListener('focus',cAutocomplete.onListFocus,false)}
-if(hContainer.attachEvent)
-{hContainer.attachEvent('onclick',cAutocomplete.onItemClick)}
-else if(hContainer.addEventListener)
-{hContainer.addEventListener('click',cAutocomplete.onItemClick,false)}}
-cAutocomplete.prototype.createList=function()
-{var hInput=document.getElementById(this.sInputId)
-var hContainer=document.getElementById(this.sListId)
-var hList=hContainer.getElementsByTagName('UL')[0]
-if(hList)
-{hList=hList.parentNode.removeChild(hList)
-while(hList.hasChildNodes())
-{hList.removeChild(hList.childNodes[0])}}
-var hListItem=null
-var hListItemLink=null
-var hArrKey=null
-var sArrEl=null
-var hArr=this.aData
-var nI=0
-var sRealText
-for(hArrKey in hArr)
-{sArrEl=hArr[hArrKey]
-hListItem=document.createElement('LI')
-hListItemLink=document.createElement('A')
-hListItemLink.setAttribute('itemvalue',hArrKey)
-var sArrData=sArrEl.split(cAutocomplete.CS_ARRAY_SEPARATOR)
-if(sArrData.length>1)
-{this.aData[hArrKey]=sArrData[0]
-hListItemLink.setAttribute('itemdata',sArrEl.substring(sArrEl.indexOf(cAutocomplete.CS_ARRAY_SEPARATOR)+1))
-sRealText=sArrData[0]}
-else
-{sRealText=sArrEl}
-hListItemLink.href='#'
-hListItemLink.appendChild(document.createTextNode(sRealText))
-hListItemLink.realText=sRealText
-if(nI==this.nSelectedItemIdx)
-{this.hActiveSelection=hListItemLink
-this.hActiveSelection.className='selected'}
-hListItem.appendChild(hListItemLink)
-hList.appendChild(hListItem)
-this.aSearchData[nI++]=sRealText.toLowerCase()}
-var hSecondBorder=hContainer.firstChild.firstChild
-hSecondBorder.appendChild(hList)
-this.bListUpdated=false}
-cAutocomplete.prototype.initListArray=function()
-{var hInput=document.getElementById(this.sInputId)
-var hArr=null
-if(hInput.type.toLowerCase()=='select-one')
-{hArr=new Object()
-for(var nI=0;nI<hInput.options.length;nI++)
-{hArrKey=hInput.options.item(nI).value
-sArrEl=hInput.options.item(nI).text
-hArr[hArrKey]=sArrEl
-if(hInput.options.item(nI).selected)
-{this.nSelectedItemIdx=nI}}}
-else
-{var sAA=hInput.getAttribute('autocomplete_list')
-var sAAS=hInput.getAttribute('autocomplete_list_sort')
-var sArrayType=this.getListArrayType()
-switch(sArrayType)
-{case'array':hArr=eval(sAA.substring(6))
-break
-case'list':hArr=new Array()
-var hTmpArray=sAA.substring(5).split('|')
-var aValueArr
-for(hKey in hTmpArray)
-{aValueArr=hTmpArray[hKey].split(cAutocomplete.CS_ARRAY_SEPARATOR)
-if(aValueArr.length==1)
-{hArr[hKey]=hTmpArray[hKey]
-this.bAssociative=false}
-else
-{hArr[aValueArr[0]]=aValueArr[1]}}
-break}
-if(sAAS!=null&&eval(sAAS))
-{this.bSorted=true
-this.aData=hArr.sort()
-hArr=hArr.sort()}}
-this.setArray(hArr)}
-cAutocomplete.prototype.setArray=function(sArray)
-{if(typeof sArray=='string')
-{this.aData=eval(sArray)}
-else
-{this.aData=sArray}
-this.bListUpdated=true}
-cAutocomplete.prototype.setListArray=function(sArray)
-{this.setArray(sArray)
-this.updateAndShowList()}
-cAutocomplete.prototype.getListArrayType=function()
-{var hInput=document.getElementById(this.sInputId)
-var sAA=hInput.getAttribute('autocomplete_list')
-if(sAA!=null&&sAA.length>0)
-{if(sAA.indexOf('array:')>=0)
-{return'array'}
-else if(sAA.indexOf('list:')>=0)
-{return'list'}
-else if(sAA.indexOf('url:')>=0)
-{return'url'}
-else if(sAA.indexOf('xmlrpc:')>=0)
-{return'xmlrpc'}}}
-cAutocomplete.prototype.getListURL=function()
-{var hInput=document.getElementById(this.sInputId)
-var sAA=hInput.getAttribute('autocomplete_list')
-if(sAA!=null&&sAA.length>0)
-{if(sAA.indexOf('url:')>=0)
-{return sAA.substring(4)}
-if(sAA.indexOf('xmlrpc:')>=0)
-{return sAA.substring(7)}}}
-cAutocomplete.prototype.setListURL=function(sURL)
-{this.sListURL=sURL;}
-cAutocomplete.prototype.onXmlHttpLoad=function()
-{if(this.hXMLHttp.readyState==4)
-{var hError=this.hXMLHttp.parseError
-if(hError&&hError.errorCode!=0)
-{alert(hError.reason)}
-else
-{this.afterRemoteLoad()}}}
-cAutocomplete.prototype.onXMLRPCHttpLoad=function()
-{if(this.hXMLHttp.readyState==4)
-{var hError=this.hXMLHttp.parseError
-if(hError&&hError.errorCode!=0)
-{alert(hError.reason)}
-else
-{this.afterRemoteLoadXMLRPC()}}}
-cAutocomplete.prototype.loadXMLRPCListArray=function()
-{var sURL=this.sListURL
-var xmlrpc_url=data_path+'/RPC2.php'
-var aMethodArgs=sURL.split(' ')
-var sMethodName=aMethodArgs[0]
-var sStartWith=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint)
-sStartWith=sStartWith.replace(/^\s/,'')
-sStartWith=sStartWith.replace(/\s$/,'')
-if(sMethodName.indexOf('?')>0)
-{sMethodName=sMethodName.replace('/^.+\?/','')
-sURL=sURL.replace('/\?.+$/','')}
-else
-{sURL=xmlrpc_url}
-if(sMethodName.length<1)
-{var hInput=document.getElementById(this.sInputId)
-hInput.value=this.sActiveValue
-return}
-var sRequest='<?xml version=\'1.0\' encoding="utf-8" ?>\n'
-sRequest+='<methodCall><methodName>'+sMethodName+'</methodName>\n'
-if(aMethodArgs.length<=1)
-{sRequest+='<params/>\n'}
-else
-{sRequest+='<params>\n'
-for(var nI=1;nI<aMethodArgs.length;nI++)
-{var sArg=aMethodArgs[nI];if(sArg.indexOf('[S]')>=0)
-{sArg=sArg.replace('[S]',sStartWith)}
-sRequest+='<param><value><string>'
-sRequest+=sArg
-sRequest+='</string></value></param>\n'}
-sRequest+='</params>\n'}
-sRequest+='</methodCall>'
-if(this.bDebug){this.debug('url: "'+sURL+'" sRequest: "'+sRequest.substring(20)+'"')}
-this.hXMLHttp.open('POST',sURL,true)
-var hAC=this
-this.hXMLHttp.onreadystatechange=function(){hAC.onXMLRPCHttpLoad()}
-this.hXMLHttp.send(sRequest)}
-cAutocomplete.prototype.loadListArray=function()
-{var sURL=this.sListURL
-var sStartWith=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint)
-sStartWith=sStartWith.replace(/^\s/,'')
-sStartWith=sStartWith.replace(/\s$/,'')
-if(sURL.indexOf('[S]')>=0)
-{sURL=sURL.replace('[S]',sStartWith)}
-else
-{sURL+=this.sActiveValue}
-this.hXMLHttp.open('GET',sURL,true)
-var hAC=this
-this.hXMLHttp.onreadystatechange=function(){hAC.onXmlHttpLoad()}
-this.hXMLHttp.send(null)}
-cAutocomplete.prototype.afterRemoteLoad=function()
-{var hInput=document.getElementById(this.sInputId)
-var hArr=new Array()
-var hTmpArray=this.hXMLHttp.responseText.split('|')
-var aValueArr
-for(hKey in hTmpArray)
-{aValueArr=hTmpArray[hKey].split(cAutocomplete.CS_ARRAY_SEPARATOR)
-if(aValueArr.length==1)
-{hArr[hKey]=hTmpArray[hKey]}
-else
-{hArr[aValueArr[0]]=hTmpArray[hKey].substr(hTmpArray[hKey].indexOf(cAutocomplete.CS_ARRAY_SEPARATOR)+1)}}
-hInput.className=''
-hInput.readonly=false
-hInput.value=this.sActiveValue
-this.setListArray(hArr)}
-cAutocomplete.prototype.afterRemoteLoadXMLRPC=function()
-{var hInput=document.getElementById(this.sInputId)
-var hArr=new Array()
-sResult=this.hXMLHttp.responseText
-if(this.bDebug){this.debug("response: "+sResult.substring(70,190))}
-sResult.replace('\n','');sResult.replace('\r','');var hKey=0
-var i=sResult.indexOf('<string>')
-while(i>=0){var j
-sResult=sResult.substring(i+8)
-j=sResult.indexOf('</string>')
-hArr[hKey]=sResult.substring(0,j)
-hKey+=1
-sResult=sResult.substring(j+9)
-i=sResult.indexOf('<string>')}
-hInput.className=''
-hInput.readonly=false
-hInput.value=this.sActiveValue
-this.setListArray(hArr)}
-cAutocomplete.prototype.prepareList=function(bFullList)
-{var hInput=document.getElementById(this.sInputId)
-this.sActiveValue=hInput.value
-var sST=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint)
-var sLST=this.getStringForAutocompletion(this.sLastActiveValue,this.nInsertPoint)
-if(sLST!=sST||bFullList||!this.bListDisplayed||this.bMatchSubstring)
-{if(this.bRemoteList)
-{hInput.className='search'
-this.bXMLRPC?this.loadXMLRPCListArray():this.loadListArray()
-return}
-this.updateAndShowList(bFullList)}}
-cAutocomplete.prototype.updateAndShowList=function(bFullList)
-{var hContainer=document.getElementById(this.sListId)
-var hList=hContainer.getElementsByTagName('UL')[0]
-var hInput=document.getElementById(this.sInputId)
-if(this.bListUpdated)
-{this.createList()}
-var sST=this.bMatchSubstring?this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint):this.sActiveValue
-var sLST=this.bMatchSubstring?this.getStringForAutocompletion(this.sLastActiveValue,this.nInsertPoint):this.sLastActiveValue
-if(sST==sLST)
-{if(!this.bMatchSubstring)
-{bFullList=true}}
-this.filterOptions(bFullList)
-if(this.nItemsDisplayed==0)
-{if(this.bForceCorrect)
-{var aPos=this.getInsertPos(this.sActiveValue,this.nInsertPoint,'')
-cAutocomplete.markInputRange(hInput,this.nLastMatchLength,aPos[0])}}
-this.sLastActiveValue=this.sActiveValue
-if(this.nItemsDisplayed>0)
-{if(!bFullList||this.bMatchSubstring)
-{this.deselectOption()}
-if(this.bAutoComplete&&this.nItemsDisplayed==1)
-{var sStartWith=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint)
-var sItemText=hList.getElementsByTagName('LI')[this.nFirstDisplayed].getElementsByTagName('A')[0].realText
-if(sStartWith.toLowerCase()==sItemText.toLowerCase())
-{this.selectOption(hList.getElementsByTagName('LI')[this.nFirstDisplayed].getElementsByTagName('A')[0])
-this.hideOptions()
-return}}
-if(this.bAutoComplete&&!bFullList)
-{this.selectOption(hList.getElementsByTagName('LI')[this.nFirstDisplayed].getElementsByTagName('A')[0])}
-this.showList()}
-else
-{this.clearList()}}
-cAutocomplete.prototype.showList=function()
-{if(cAutocomplete.hListDisplayed)
-{cAutocomplete.hListDisplayed.clearList()}
-var hInput=document.getElementById(this.sInputId)
-var nTop=cDomObject.getOffsetParam(hInput,'offsetTop')
-var nLeft=cDomObject.getOffsetParam(hInput,'offsetLeft')
-var hContainer=document.getElementById(this.sListId)
-var hList=hContainer.getElementsByTagName('UL')[0]
-if(this.bHasButton)
-{hContainer.style.width=document.getElementById(this.sInputId).parentNode.offsetWidth}
-else
-{hContainer.style.width=document.getElementById(this.sInputId).offsetWidth}
-var nNumLines=(this.nItemsDisplayed<cAutocomplete.CN_NUMBER_OF_LINES)?this.nItemsDisplayed:cAutocomplete.CN_NUMBER_OF_LINES;hList.style.height=nNumLines*cAutocomplete.CN_LINE_HEIGHT+cAutocomplete.CN_HEIGHT_FIX+'px'
-hContainer.style.top=nTop+hInput.offsetHeight+cAutocomplete.CN_OFFSET_TOP+'px'
-hContainer.style.left=nLeft+cAutocomplete.CN_OFFSET_LEFT+'px'
-hContainer.style.display='none'
-hContainer.style.visibility='visible'
-hContainer.style.display='block'
-cAutocomplete.hListDisplayed=this
-this.bListDisplayed=true}
-cAutocomplete.prototype.binarySearch=function(sFilter)
-{var nLow=0
-var nHigh=this.aSearchData.length-1
-var nMid
-var nTry,nLastTry
-var sData
-var nLen=sFilter.length
-var lastTry
-while(nLow<=nHigh)
-{nMid=(nLow+nHigh)/2
-nTry=(nMid<1)?0:parseInt(nMid)
-sData=this.aSearchData[nTry].substr(0,nLen)
-if(sData<sFilter)
-{nLow=nTry+1
-continue}
-if(sData>sFilter)
-{nHigh=nTry-1
-continue}
-if(sData==sFilter)
-{nHigh=nTry-1
-nLastTry=nTry
-continue}
-return nTry}
-if(typeof(nLastTry)!="undefined")
-{return nLastTry}
-else
-{return null}}
-cAutocomplete.prototype.getStringForAutocompletion=function(sString,nPos)
-{if(sString==null||sString.length==0)
-{return''}
-if(this.bMatchSubstring)
-{var nStartPos=sString.lastIndexOf(cAutocomplete.CS_SEPARATOR,nPos-1)
-nStartPos=nStartPos<0?0:nStartPos
-var nEndPos=sString.indexOf(cAutocomplete.CS_SEPARATOR,nPos)
-nEndPos=nEndPos<0?sString.length:nEndPos
-var sStr=sString.substr(nStartPos,nEndPos-nStartPos)
-sStr=sStr.replace(/^(\,?)(\s*)(\S*)(\s*)(\,?)$/g,'$3')
-return sStr}
-else
-{return sString}}
-cAutocomplete.prototype.insertString=function(sString,nPos,sInsert)
-{if(this.bMatchSubstring)
-{var nStartPos=sString.lastIndexOf(cAutocomplete.CS_SEPARATOR,nPos-1)
-nStartPos=nStartPos<0?0:nStartPos
-var nEndPos=sString.indexOf(cAutocomplete.CS_SEPARATOR,nPos)
-nEndPos=nEndPos<0?sString.length:nEndPos
-var sStr=sString.substr(nStartPos,nEndPos-nStartPos)
-sStr=sStr.replace(/^(\,?)(\s*)(\S?[\S\s]*\S?)(\s*)(\,?)$/g,'$1$2'+sInsert+'$4$5')
-sStr=sString.substr(0,nStartPos)+sStr+sString.substr(nEndPos)
-return sStr}
-else
-{return sInsert}}
-cAutocomplete.prototype.getInsertPos=function(sString,nPos,sInsert)
-{nPos=nPos==null?0:nPos
-var nStartPos=sString.lastIndexOf(cAutocomplete.CS_SEPARATOR,nPos-1)
-nStartPos=nStartPos<0?0:nStartPos
-var nEndPos=sString.indexOf(cAutocomplete.CS_SEPARATOR,nPos)
-nEndPos=nEndPos<0?sString.length:nEndPos
-var sStr=sString.substr(nStartPos,nEndPos-nStartPos)
-sStr=sStr.replace(/^(\,?)(\s*)(\S?[\S\s]*\S?)(\s*)(\,?)$/g,'$1$2'+sInsert)
-return[nPos,nStartPos+sStr.length]}
-cAutocomplete.prototype.filterOptions=function(bShowAll)
-{if(this.hActiveSelection&&!bShowAll)
-{this.hActiveSelection.className=''}
-if(typeof bShowAll=='undefined')
-{bShowAll=false}
-var hInput=document.getElementById(this.sInputId)
-var sStartWith=this.getStringForAutocompletion(this.sActiveValue,this.nInsertPoint)
-if(bShowAll)
-{sStartWith=''}
-var hContainer=document.getElementById(this.sListId)
-var hList=hContainer.getElementsByTagName('UL')[0]
-var nItemsLength=hList.childNodes.length
-var hLinkItem=null
-var nCount=0
-var hParent=hList.parentNode
-var hList=hList.parentNode.removeChild(hList)
-var hTItems=hList.childNodes
-this.nItemsDisplayed=0
-if(sStartWith.length==0)
-{for(var nI=0;nI<nItemsLength;nI++)
-{if(this.formatOptions)
-{hTItems[nI].childNodes[0].innerHTML=this.formatOptions(hTItems[nI].childNodes[0].realText,nI)}
-hTItems[nI].style.display='block'}
-nCount=nItemsLength
-if(nItemsLength>0)
-{this.nFirstDisplayed=0
-this.nLastDisplayed=nItemsLength-1}
-else
-{this.nFirstDisplayed=this.nLastDisplayed=-1}
-var aPos=this.getInsertPos(this.sActiveValue,this.nInsertPoint,sStartWith)
-this.nLastMatchLength=aPos[0]}
-else
-{this.nFirstDisplayed=this.nLastDisplayed=-1
-sStartWith=sStartWith.toLowerCase()
-var bEnd=false
-if(this.bSorted&&this.bMatchBegin)
-{var nStartAt=this.binarySearch(sStartWith)
-for(var nI=0;nI<nItemsLength;nI++)
-{hTItems[nI].style.display='none'
-if(nI>=nStartAt&&!bEnd)
-{if(!bEnd&&this.aSearchData[nI].indexOf(sStartWith)!=0)
-{bEnd=true
-continue}
-if(this.formatOptions)
-{hTItems[nI].childNodes[0].innerHTML=this.formatOptions(hTItems[nI].childNodes[0].realText,nI)}
-hTItems[nI].style.display='block'
-nCount++
-if(this.nFirstDisplayed<0)
-{this.nFirstDisplayed=nI}
-this.nLastDisplayed=nI}}}
-else
-{for(var nI=0;nI<nItemsLength;nI++)
-{hTItems[nI].style.display='none'
-if((this.bMatchBegin&&this.aSearchData[nI].indexOf(sStartWith)==0)||(!this.bMatchBegin&&this.aSearchData[nI].indexOf(sStartWith)>=0))
-{if(this.formatOptions)
-{hTItems[nI].childNodes[0].innerHTML=this.formatOptions(hTItems[nI].childNodes[0].realText,nI)}
-hTItems[nI].style.display='block'
-nCount++
-if(this.nFirstDisplayed<0)
-{this.nFirstDisplayed=nI}
-this.nLastDisplayed=nI}}}
-if(nCount>0)
-{var aPos=this.getInsertPos(this.sActiveValue,this.nInsertPoint,sStartWith)
-this.nLastMatchLength=aPos[0]}}
-hParent.appendChild(hList)
-this.nItemsDisplayed=nCount}
-cAutocomplete.prototype.hideOptions=function()
-{var hContainer=document.getElementById(this.sListId)
-hContainer.style.visibility='hidden'
-hContainer.style.display='none'
-this.hListDisplayed=null}
-cAutocomplete.prototype.markAutocompletedValue=function()
-{var hInput=document.getElementById(this.sInputId)
-var sValue=this.hActiveSelection.realText
-if(this.bMatchSubstring)
-{var aPos=this.getInsertPos(this.sLastActiveValue,this.nInsertPoint,sValue)
-var nStartPos=aPos[0]
-var nEndPos=aPos[1]}
-else
-{var nStartPos=this.nInsertPoint
-var nEndPos=sValue.length}
-this.nStartAC=nStartPos
-this.nEndAC=nEndPos
-if(this.hMarkRangeTimeout!=null)
-{clearTimeout(this.hMarkRangeTimeout)}
-this.hMarkRangeTimeout=setTimeout(function(){cAutocomplete.markInputRange2(hInput.id)},cAutocomplete.CN_MARK_TIMEOUT)}
-cAutocomplete.prototype.selectOptionByIndex=function(nOptionIndex)
-{if(this.bListUpdated)
-{this.createList()}
-var hContainer=document.getElementById(this.sListId)
-var hList=hContainer.getElementsByTagName('UL')[0]
-var nItemsLength=hList.childNodes.length
-if(nOptionIndex>=0&&nOptionIndex<nItemsLength)
-{this.selectOption(hList.childNodes[nOptionIndex].getElementsByTagName('A')[0])}}
-cAutocomplete.prototype.selectOptionByValue=function(sValue)
-{if(this.bListUpdated)
-{this.createList()}
-sValue=sValue.toLowerCase()
-var hContainer=document.getElementById(this.sListId)
-var hList=hContainer.getElementsByTagName('UL')[0]
-var nItemsLength=hList.childNodes.length
-var nSelectedIndex=-1
-for(var nI=0;nI<nItemsLength;nI++)
-{if(this.aSearchData[nI].indexOf(sValue)==0)
-{nSelectedIndex=nI}}
-if(nSelectedIndex>=0)
-{this.selectOption(hList.childNodes[nSelectedIndex].getElementsByTagName('A')[0])}}
-cAutocomplete.prototype.selectOption=function(hNewOption)
-{if(this.hActiveSelection)
-{if(this.hActiveSelection==hNewOption)
-{return}
-else
-{this.hActiveSelection.className=''}}
-this.hActiveSelection=hNewOption
-var hInput=document.getElementById(this.sInputId)
-if(this.hActiveSelection!=null)
-{if(this.sHiddenInputId!=null)
-{if(this.bMatchSubstring)
-{document.getElementById(this.sHiddenInputId).value=this.hActiveSelection.getAttribute('itemvalue')}
-else
-{document.getElementById(this.sHiddenInputId).value=this.hActiveSelection.getAttribute('itemvalue')}}
-this.hActiveSelection.className='selected'
-if(this.bAutoComplete)
-{hInput.value=this.insertString(this.sLastActiveValue,this.nInsertPoint,this.hActiveSelection.realText)
-this.bAutocompleted=true
-this.markAutocompletedValue()}
-else
-{var aPos=this.getInsertPos(this.sLastActiveValue,this.nInsertPoint,this.hActiveSelection.realText)
-hInput.value=this.insertString(this.sActiveValue,this.nInsertPoint,this.hActiveSelection.realText)
-cAutocomplete.setInputCaretPosition(hInput,aPos[1])}
-this.sActiveValue=hInput.value
-if(this.onSelect)
-{this.onSelect()}}
-else
-{hInput.value=this.sActiveValue
-cAutocomplete.setInputCaretPosition(hInput,this.nInsertPoint)}}
-cAutocomplete.prototype.deselectOption=function()
-{if(this.hActiveSelection!=null)
-{this.hActiveSelection.className=''
-this.hActiveSelection=null}}
-cAutocomplete.prototype.clearList=function()
-{this.hideOptions()
-this.bListDisplayed=false}
-cAutocomplete.prototype.getPrevDisplayedItem=function(hItem)
-{if(hItem==null)
-{var hContainer=document.getElementById(this.sListId)
-hItem=hContainer.getElementsByTagName('UL')[0].childNodes.item(hContainer.getElementsByTagName('UL')[0].childNodes.length-1)}
-else
-{hItem=getPrevNodeSibling(hItem.parentNode)}
-while(hItem!=null)
-{if(hItem.style.display=='block')
-{return hItem}
-hItem=hItem.previousSibling}
-return null}
-cAutocomplete.prototype.getNextDisplayedItem=function(hItem)
-{if(hItem==null)
-{var hContainer=document.getElementById(this.sListId)
-hItem=hContainer.getElementsByTagName('UL')[0].childNodes.item(0)}
-else
-{hItem=getNextNodeSibling(hItem.parentNode)}
-while(hItem!=null)
-{if(hItem.style.display=='block')
-{return hItem}
-hItem=hItem.nextSibling}
-return null}
-cAutocomplete.prototype.debug=function(s)
-{if(this.bDebug){var hInput=document.getElementById(this.sInputId)
-var hContainer=document.createElement('DIV')
-hContainer.className='debug'
-hContainer.innerHTML=s
-hInput.form.appendChild(hContainer)}}
-cAutocomplete.onInputKeyDown=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-var hAC=hElement.hAutocomplete
-var hContainer=document.getElementById(hAC.sListId)
-var hInput=document.getElementById(hAC.sInputId)
-var hList=hContainer.getElementsByTagName('UL')[0]
-var hEl=getParentByTagName(hElement,'A')
-if(hContainer!=null&&hAC.bListDisplayed)
-{var hLI=null
-var hLINext=null
-if((hEvent.keyCode==13)||(hEvent.keyCode==27))
-{var bItemSelected=hEvent.keyCode==13?true:false
-hAC.clearList()
-if(hAC.bDebug){hAC.debug("key "+hEvent.keyCode+" new active selection")}}
-if(hEvent.keyCode==38)
-{if(hAC.bDebug){hAC.debug("key "+hEvent.keyCode+" up")}
-hLINext=hAC.getPrevDisplayedItem(hAC.hActiveSelection)
-if(hLINext!=null)
-{hAC.selectOption(hLINext.childNodes.item(0))
-if(hAC.nItemsDisplayed>cAutocomplete.CN_NUMBER_OF_LINES)
-{if(hList.scrollTop<5&&hLINext.offsetTop>hList.offsetHeight)
-{hList.scrollTop=hList.scrollHeight-hList.offsetHeight}
-if(hLINext.offsetTop-hList.scrollTop<0)
-{hList.scrollTop-=hLINext.offsetHeight}}}
-else
-{hAC.selectOption(null)}}
-else if(hEvent.keyCode==40)
-{if(hAC.bDebug){hAC.debug("key "+hEvent.keyCode+" down")}
-hLINext=hAC.getNextDisplayedItem(hAC.hActiveSelection)
-if(hLINext!=null)
-{hAC.selectOption(hLINext.childNodes.item(0))
-if(hAC.nItemsDisplayed>cAutocomplete.CN_NUMBER_OF_LINES)
-{if(hList.scrollTop>0&&hList.scrollTop>hLINext.offsetTop)
-{hList.scrollTop=0}
-if(Math.abs(hLINext.offsetTop-hList.scrollTop-hList.offsetHeight)<5)
-{hList.scrollTop+=hLINext.offsetHeight}}}
-else
-{hAC.selectOption(null)}}}
-if(hInput.form)
-{hInput.form.bLocked=true
-if(hAC.bDebug){hAC.debug("onInputKeyDown form blocked")}}
-if(hEvent.keyCode==13||hEvent.keyCode==27||hEvent.keyCode==38||hEvent.keyCode==40)
-{if(hEvent.preventDefault)
-{hEvent.preventDefault()}else{if(hAC.bDebug){hAC.debug("no preventDefault return false")}}
-hEvent.cancelBubble=true
-hEvent.returnValue=false
-return false}}
-cAutocomplete.onInputKeyPress=function(hEvent)
-{if(hEvent.keyCode==13||hEvent.keyCode==38||hEvent.keyCode==40)
-{if(hEvent.preventDefault)
-{hEvent.preventDefault()}
-hEvent.cancelBubble=true
-hEvent.returnValue=false
-return false}}
-cAutocomplete.onInputKeyUp=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-var hAC=hElement.hAutocomplete
-var hInput=document.getElementById(hAC.sInputId)
-switch(hEvent.keyCode)
-{case 8:if(hAC.bAutoComplete&&hAC.bAutocompleted)
-{hAC.bAutocompleted=false
-return false}
-break
-case 38:case 40:if(hAC.bListDisplayed)
-{if(hEvent.preventDefault)
-{hEvent.preventDefault()}
-hEvent.cancelBubble=true
-hEvent.returnValue=false
-return false}
-break
-case 32:case 46:case 35:case 36:break;default:if(hEvent.keyCode<48)
-{if(hEvent.preventDefault)
-{hEvent.preventDefault()}
-if(hAC.bDebug){hAC.debug("keyUp: hEvent.returnValue = false")}
-hEvent.cancelBubble=true
-hEvent.returnValue=false
-return false}
-break}
-if(hAC.hMarkRangeTimeout!=null)
-{clearTimeout(hAC.hMarkRangeTimeout)}
-if(hAC.hShowTimeout)
-{clearTimeout(hAC.hShowTimeout)
-hAC.hShowTimeout=null}
-var nTimeout=hAC.bRemoteList?cAutocomplete.CN_REMOTE_SHOW_TIMEOUT:cAutocomplete.CN_SHOW_TIMEOUT
-hAC.hShowTimeout=setTimeout(function(){hAC.prepareList()},nTimeout)
-if(hAC.bDebug){hAC.debug("setTimeout "+nTimeout)}}
-cAutocomplete.onInputBlur=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-if(hElement.form)
-{hElement.form.bLocked=false}
-var hAC=hElement.hAutocomplete
-if(!hAC.hClearTimeout)
-{hAC.hClearTimeout=setTimeout(function(){hAC.clearList()},cAutocomplete.CN_CLEAR_TIMEOUT)}}
-cAutocomplete.onInputFocus=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-var hAC=hElement.hAutocomplete
-if(hAC.hClearTimeout)
-{clearTimeout(hAC.hClearTimeout)
-hAC.hClearTimeout=null}}
-cAutocomplete.saveCaretPosition=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-var hAC=hElement.hAutocomplete
-var hInput=document.getElementById(hAC.sInputId)
-if(hEvent.keyCode!=38&&hEvent.keyCode!=40)
-{hAC.nInsertPoint=cAutocomplete.getInputCaretPosition(hInput)}}
-cAutocomplete.getInputCaretPosition=function(hInput)
-{if(typeof hInput.selectionStart!='undefined')
-{if(hInput.selectionStart==hInput.selectionEnd)
-{return hInput.selectionStart}
-else
-{return hInput.selectionStart}}
-else if(hInput.createTextRange)
-{var hSelRange=document.selection.createRange()
-if(hInput.tagName.toLowerCase()=='textarea')
-{var hSelBefore=hSelRange.duplicate()
-var hSelAfter=hSelRange.duplicate()
-hSelRange.moveToElementText(hInput)
-hSelBefore.setEndPoint('StartToStart',hSelRange)
-return hSelBefore.text.length}
-else
-{hSelRange.moveStart('character',-1*hInput.value.length)
-var nLen=hSelRange.text.length
-return nLen}}
-return null}
-cAutocomplete.setInputCaretPosition=function(hInput,nPosition)
-{if(hInput.setSelectionRange)
-{hInput.setSelectionRange(nPosition,nPosition)}
-else if(hInput.createTextRange)
-{var hRange=hInput.createTextRange()
-hRange.moveStart('character',nPosition)
-hRange.moveEnd('character',nPosition)
-hRange.collapse(true)
-hRange.select()}}
-cAutocomplete.markInputRange=function(hInput,nStartPos,nEndPos)
-{if(hInput.setSelectionRange)
-{hInput.focus()
-hInput.setSelectionRange(nStartPos,nEndPos)}
-else if(hInput.createTextRange)
-{var hRange=hInput.createTextRange()
-hRange.collapse(true)
-hRange.moveStart('character',nStartPos)
-hRange.moveEnd('character',nEndPos-nStartPos)
-hRange.select()}}
-cAutocomplete.markInputRange2=function(sInputId)
-{var hInput=document.getElementById(sInputId)
-var nStartPos=hInput.hAutocomplete.nStartAC
-var nEndPos=hInput.hAutocomplete.nEndAC
-cAutocomplete.markInputRange(hInput,nStartPos,nEndPos)}
-cAutocomplete.onListBlur=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-hElement=getParentByProperty(hElement,'className','autocomplete_holder')
-var hAC=hElement.hAutocomplete
-if(!hAC.hClearTimeout)
-{hAC.hClearTimeout=setTimeout(function(){hAC.clearList()},cAutocomplete.CN_CLEAR_TIMEOUT)}}
-cAutocomplete.onListFocus=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-hElement=getParentByProperty(hElement,'className','autocomplete_holder')
-var hAC=hElement.hAutocomplete
-if(hAC.hClearTimeout)
-{clearTimeout(hAC.hClearTimeout)
-hAC.hClearTimeout=null}}
-cAutocomplete.onItemClick=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-var hContainer=getParentByProperty(hElement,'className','autocomplete_holder')
-var hEl=getParentByTagName(hElement,'A')
-if(hContainer!=null)
-{var hAC=hContainer.hAutocomplete
-hAC.selectOption(hEl)
-document.getElementById(hAC.sInputId).focus()
-hAC.clearList()}
-if(hEvent.preventDefault)
-{hEvent.preventDefault()}
-hEvent.cancelBubble=true
-hEvent.returnValue=false
-return false}
-cAutocomplete.onButtonClick=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-var hAC=hElement.hAutocomplete
-var hInput=document.getElementById(hAC.sInputId)
-if(hInput.disabled)
-{return}
-if(hAC.bDebug){hAC.debug("onButtonClick")}
-hAC.prepareList(true)
-var hInput=document.getElementById(hAC.sInputId)
-hInput.focus()}
-cAutocomplete.onFormSubmit=function(hEvent)
-{if(hEvent==null)
-{hEvent=window.event}
-var hElement=(hEvent.srcElement)?hEvent.srcElement:hEvent.originalTarget
-if(hElement.bLocked)
-{var hAC=hElement.hAutocomplete
-if(hAC.bDebug){hAC.debug("onSubmit: hElement.bLocked")}
-hElement.bLocked=false
-hEvent.returnValue=false
-if(hEvent.preventDefault)
-{hEvent.preventDefault()}
-return false}}
\ No newline at end of file
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/css/dropdown.css b/src/plugins/wiki/www/themes/default/moacdropdown/css/dropdown.css
deleted file mode 100644
index b090abe..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/css/dropdown.css
+++ /dev/null
@@ -1,180 +0,0 @@
-div.acinputContainer
-{
-	position: relative;
-	float: left;
-	/*width: 240px;*/
-	height: 20px;
-	margin:0px;
-	padding: 0px;
-	border-width: 1px;
-	border-style: solid;
-	border-color: #aaa #eee #eee #aaa;
-	background-color: ButtonFace;
-	/*overflow: show;*/
-	/*box-sizing: border-box;*/
-	-moz-box-sizing: border-box;
-}
-
-div.acinputContainer input
-{
-	position: relative;
-	float: left;
-	/*width: 220px;*/
-	height: 100%;
-	border-width: 1px;
-	margin:0px;
-	padding: 0px;
-	clear: none;
-	float: left;
-	/*box-sizing: border-box;*/
-	-moz-box-sizing: border-box;
-}
-
-/* this is set when the input is 'working' i.e. remote loading is in process */
-div.acinputContainer input.search
-{
-	background-color: #b41b00;
-	-moz-box-sizing: border-box;
-	/*box-sizing: border-box;*/
-}
-
-div.acinputContainer input.button
-{
-	position: relative;
-	float: left;
-	font-size: 2px;
-	width:18px; 
-	height: 100%;
-	border-width: 1px; 
-	background-image:url( ../i/arrowdown.gif ); 
-	background-repeat: no-repeat; 
-	background-position: 2px 2px;
-	-moz-box-sizing: border-box;
-	/*box-sizing: border-box;*/
-}
-
-input.dropdown
-{
-	/*width: 160px;*/
-	border: 1px solid #AAAAAA;
-	border-color: #888 #aaa #aaa #888;
-	margin-bottom: 2px;
-	-moz-box-sizing		: border-box;
-}
-
-div.autocomplete_holder
-{
-	position: absolute;
-/*width:160px;*/
-font-size: 95%;
-	visibility: hidden;
-	background-color: #fff;
-	/*background-image: url( ../i/bg.gif );*/
-	-moz-box-sizing		: border-box;
-}
-
-div.autocomplete_firstborder
-{
-	border-width: 1px;
-	border-style: solid;
-	border-color: ButtonShadow;
-	padding: 0px;
-        margin-left: 3px;
-        margin-bottom: 5px;
-	-moz-box-sizing		: border-box;
-}
-
-div.autocomplete_secondborder
-{
-	border-style: none;
-	padding: 2px;
-	-moz-box-sizing		: border-box;
-}
-
-ul.autocomplete
-{
-	width				: 100%;
-	height 				: 95px;
-	overflow-y			: auto;
-	overflow			: -moz-scrollbars-vertical;
-
-	font				: menu;
-	
-	margin				: 0px;
-	margin-left			: 0px;
-	padding-left		: 0px;
-	text-indent			: 0px;
-
-	list-style-type		: none;
-	vertical-align		: middle;
-	
-	background-repeat   : no-repeat;
-	-moz-box-sizing		: border-box;
-}
-
-ul.autocomplete li a, ul.autocomplete li a:hover,
-ul.autocomplete li a.selected, ul.autocomplete li a:hover.selected
-{
-	display				: block;
-	width				: 100%;
-	padding				: 2px;
-	text-decoration		: none;
-	color				: #333;
-	border				: 1px solid #fff;
-	-moz-box-sizing		: border-box;
-
-	margin-left			: -14px;
-	voice-family		: "\"}\"";
-	voice-family		: inherit;
-	margin-left			: 0px;
-}
-
-ul.autocomplete li
-{
-	padding				: 0px;
-	padding-left		: 5px;
-	background-position : 2px 0px;
-	background-repeat	: no-repeat;
-
-	line-height			: 13px;
-	vertical-align		: top;
-	margin				: 0px;
-	/*border-style		: none;*/
-	-moz-box-sizing		: border-box;
-}
-
-ul.autocomplete li a
-{
-}
-
-ul.autocomplete li a:hover
-{
-	color: HighlightText;
-	background-color: Highlight;
-	border-color: #e0e0e0;
-}
-
-ul.autocomplete li a.selected
-{
-	border				: 1px solid #444;
-	/*
-	background-color	: #fcbdb6;
-	color				: #fff;
-	background-color	: #0d94df;
-	*/
-	color				: #fff;
-
-	background-color: /*#f00;*/ #004ba6;
-/*	background-image: url( ../i/conf.gif );
-	background-position: center right;
-	background-repeat: no-repeat;
-*/
-}
-
-ul.autocomplete li a:hover.selected
-{
-	border				: 1px solid #e0e0e0;
-	color				: white;
-	background-color	: /*#f00;*/ #004ba6;
-	background-image: none;
-}
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/examples.html b/src/plugins/wiki/www/themes/default/moacdropdown/examples.html
deleted file mode 100644
index 39983ab..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/examples.html
+++ /dev/null
@@ -1,925 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-	<head>
-		<title>
-			autocomplete
-		</title>
-		<style>
-			@import url( css/page.css );
-			@import url( css/tabsexamples.css );
-			@import url( css/SyntaxHighlighter.css );
-			@import url( css/dropdown.css );
-		</style>
-<script src="js/mobrowser.js"></script>
-<script src="js/modomevent.js"></script>
-<script src="js/modomt.js"></script>
-<script src="js/modomext.js"></script>
-<script src="js/tabs2.js"></script>
-<script src="js/getobject2.js"></script>
-<script src="js/xmlextras.js"></script>
-<script src="js/acdropdown.js"></script>
-		<!-- syntax highlight -->
-<script language="javascript" src="js/shCore.js" ></script >
-<script language="javascript" src="js/shBrushXML.js" ></script >
-<!-- syntax highlight -->
-<script language="javascript">
-var emails = new Array( 'mircho.mirev at hotmail.com', 'michael.jordan at chicago.com', 'vin.diesel at paramaunt.com', 'steven.spielberg at darkside.com', 'family at pord.net', 'friends at hell.com', 'pizza at health.com', 'mc.donalds at mc-donalds.com', 'large.land.mass at finally.com' )
-var Food = new Array( 'Appolo', 'Arabella', 'Eggs', 'Meat', 'Chop', 'Salad', 'Pizza', 'Burger', 'Buratino', 'Beroka', 'Momoral', 'Momoral-1', 'Momoral-2' )
-var months = new Array( 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' )
-var days = new Array( 'Monday', 'Tuesday', 'Wendsday', 'Thursday', 'Fryday', 'Saturday', 'Sunday' )
-var aCountries = new Array( 'United States', 'Afghanistan', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Antigua', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Azores', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Barbuda', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda [U.K.]', 'Bhutan', 'Bolivia', 'Bosnia/Herzegovina', 'Botswana', 'Brazil', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Caicos', 'Cambodia', 'Cameroon', 'Canada', 'Canary Islands', 'Cape Verde islands', 'Cayman Islands', 'Central Africa', 'Chad', 'Chile', 'China', 'Christmas Island', 'Colombia', 'Comoros', 'Congo', 'Congo [Zaire]', 'Cook Island', 'Costa Rica', 'Cote dIvoire (Ivory Coast)', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'East Timor', 'Ecuador', 'Egypt', 'El Salvador', 'England', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands', 'Faroe Island', 'Fiji', 'Finland', 'France', 'French Guiana', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Grenadines', 'Guadeloupe', 'Guam', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Holland', 'Honduras', 'Hong Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea [North]', 'Korea [South]', 'Kuwait', 'Kyrgyzstan', 'Lao [Laos]', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Lybia', 'Macao', 'Macendonia', 'Madagascar', 'Madeira', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Mariana Islands', 'Marshall Islands', 'Martinique [France]', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montserrat [U.K.]', 'Morocco', 'Mozambique', 'Myanmar [Burma],', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'Netherlands Antilles', 'Nevis', 'New Caledonia', 'New Hebrides', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'North Ireland', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Panama', 'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn', 'Poland', 'Portugal', 'Principe', 'Puerto Rico [U.S.]', 'Qatar', 'Reunion Island', 'Romania', 'Russia', 'Rwanda', 'Ryukyu Islands', 'Samoa', 'San Marino', 'Sa~o Tome', 'Saudi Arabia', 'Scotland', 'Senegal', 'Serbia/Montenegro', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovak Republic', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'Spain', 'Sri Lanka', 'St. Helena', 'St. Kitts', 'St. Lucia', 'St. Vincent', 'Sudan', 'Suriname', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab', 'Tahiti', 'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand', 'Tobago', 'Togo', 'Tokelau', 'Tonga', 'Trinidad', 'Tunisia', 'Turkey', 'Turkmenistan', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United States', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Venezuela', 'Vietnam', 'Virgin Islands', 'Wake Island', 'Wales', 'Wallis', 'Yemen', 'Yugoslavia', 'Zaire', 'Zambia', 'Zimbabwe' )
-function formatCountries( sText )
-{
-return sText.substr( 0, sText.toLowerCase().indexOf( this.sActiveValue.toLowerCase() ) ) + sText.substr( sText.toLowerCase().indexOf( this.sActiveValue.toLowerCase() ), this.sActiveValue.length ).bold().fontcolor( '#ff0000' ) + sText.substr( sText.toLowerCase().indexOf( this.sActiveValue.toLowerCase() ) + this.sActiveValue.length )
-}
-function alertSelected()
-{
-document.getElementById( 'selectedCountry' ).innerHTML = this.sActiveValue
-}
-/* TOGGLE CODE */
-function toggleCode( hEvent )
-{
-cDomEvent.init( hEvent )
-var hLink = cDomEvent.target
-var hREX = new RegExp( 'codeblock:(.*)', 'ig' )
-hLink.getAttribute( 'target' ).match( hREX )
-var sBlockId = RegExp.$1
-var hCodeBlock = document.getElementById( sBlockId )
-hCodeBlock.style.display = hCodeBlock.style.display == 'block' ? 'none' : 'block'
-hLink.blur()
-return false
-}
-function attachToggleCode( hLink )
-{
-hLink.onclick = toggleCode
-hLink.className = 'codeToggle'
-}
-cDomExtensionManager.register( new cDomExtension( document, [ 'a[target*=codeblock]' ], attachToggleCode ) )
-function onLoadInit()
-{
-dp.SyntaxHighlighter.HighlightAll('code')
-}
-cDomEvent.addEvent( window, 'load', onLoadInit )
-</script>
-	</head>
-	<body>
-		<div id="content">
-			<div id="navcontainer">
-				<ul class="navlist">
-					<li class="tabactive" tabgroup="first" tabview="zero">
-						<a href="#">Autocomplete emails</a></li>
-					<li class="tab" tabgroup="first" tabview="one">
-						<a href="#">Autocomplete months or days</a></li>
-					<li class="tab" tabgroup="first" tabview="two">
-						<a href="#">Autocomplete countries</a></li>
-					<li class="tab" tabgroup="first" tabview="three">
-						<a href="#">GMail like examlpe</a></li>
-					<li class="tab" tabgroup="first" tabview="four">
-						<a href="#">remote (XMLHTTP) loading</a></li>
-				</ul>
-			</div>
-			<div id="zero" class="pages" style="display:block">
-				<div class="holder">
-					So what does this component do?
-					<br/>
-					<br/>
-					Here is the first examlpe:
-					<br/>
-					list of emails is being autocompleted in a simple input
-					<br/>
-					<br/>
-					<input class="dropdown" autocomplete="off" id="inputer2" style="width: 250px;" acdropdown="true" autocomplete_list="array:emails" autocomplete_list_sort="true" autocomplete_matchsubstring="true">
-					<br/>
-					<br/>
-<textarea name="code" language="xml" cols="60" rows="6">
-<input class="dropdown" autocomplete="off" id="inputer2" style="width: 250px;" <span class="hilite">acdropdown="true" autocomplete_list="array:emails" autocomplete_list_sort="true" autocomplete_matchsubstring="true"</span>>
-</textarea>
-					<br/>
-					<br/>
-					Or this examlpe with lots more details:
-					<br/>
-					In this example the typed text will be searched for anywhere in the strings in the list
-					<br/>
-					<br/>
-					<input class="dropdown" autocomplete="off" id="inputer16" style="width: 250px;" acdropdown="true" autocomplete_list="array:aCountries" autocomplete_format="formatCountries" autocomplete_onselect="alertSelected" autocomplete_matchbegin="false">
-					<span id="selectedCountry">
-					</span>
-					<br/>
-					<br/>
-<textarea name="code" language="xml" cols="60" rows="6">
-<input class="dropdown" autocomplete="off" id="inputer2" style="width: 250px;" acdropdown="true" autocomplete_list="array:emails" autocomplete_list_sort="true" autocomplete_matchsubstring="true">
-</textarea>
-				</div>
-			</div>
-			<div id="one" class="pages">
-				<div class="holder">
-					available autocomplete (depending on your selection):
-					<br/>
-					<br/>
-					'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'
-					<br/>
-					or days
-					<br/>
-					'Monday', 'Tuesday', 'Wendsday', 'Thursday', 'Fryday', 'Saturday', 'Sunday'
-					<br/>
-					<br/>
-					<input class="dropdown" autocomplete="off" id="inputer4" style="width: 250px;" acdropdown="true" autocomplete_list="array:months" autocomplete_complete="true">
-					<input value="set to days" onclick="document.getElementById('inputer4').hAutocomplete.setListArray( days ); document.getElementById('inputer4').focus()" type="button">
-					<input value="set to months" onclick="document.getElementById('inputer4').hAutocomplete.setListArray( 'months' );" type="button">
-					<br/>
-					<br/>
-					<a href="#" target="codeblock:monthDaysToggleCode">code</a>
-					<div id="monthDaysToggleCode" class="code">
-<textarea name="code" language="xml" cols="60" rows="6">
-<input class="dropdown" autocomplete="off" id="inputer4" style="width: 250px;" acdropdown="true" autocomplete_list="array:months">
-<br/>
-<input value="set to days" onclick="document.getElementById('inputer4').hAutocomplete.setListArray( days ); document.getElementById('inputer4').focus()" type="button">
-<br/>
-<input value="set to months" onclick="document.getElementById('inputer4').hAutocomplete.setListArray( 'months' );" type="button">
-</textarea>
-					</div>
-				</div>
-			</div>
-			<div id="two" class="pages" >
-				<div class="holder">
-					Countries with custom formatting function:
-					<br/>
-					<br/>
-					<input class="dropdown" autocomplete="off" style="width: 250px;" acdropdown="true" autocomplete_list="array:aCountries" autocomplete_format="formatCountries" autocomplete_complete="true">
-					<br/>
-					<br/>
-					<a href="#" target="codeblock:autocompleteCountriesCode">code</a>
-					<div id="autocompleteCountriesCode" class="code">
-<textarea name="code" language="xml" cols="60" rows="6">
-<input class="dropdown" autocomplete="off" style="width: 250px;" acdropdown="true" autocomplete_list="array:aCountries" autocomplete_format="formatCountries" autocomplete_complete="true">
-</textarea>
-					</div>
-					<br/>
-					<br/>...or you can turn a regular select with countries list to an autocompleted one:
-					<br/>
-					<br/>
-					<select acdropdown=true autocomplete_complete="true" name=country>
-						<option value="af" >
-						Afghanistan
-						</option>
-						<option value="al" >
-						Albania
-						</option>
-						<option value="dz" >
-						Algeria
-						</option>
-						<option value="as" >
-						American Samoa
-						</option>
-						<option value="ad" >
-						Andorra
-						</option>
-						<option value="ao" >
-						Angola
-						</option>
-						<option value="ai" >
-						Anguilla
-						</option>
-						<option value="aq" >
-						Antarctica
-						</option>
-						<option value="ag" >
-						Antigua And Barbuda
-						</option>
-						<option value="ar" >
-						Argentina
-						</option>
-						<option value="am" >
-						Armenia
-						</option>
-						<option value="aw" >
-						Aruba
-						</option>
-						<option value="au" >
-						Australia
-						</option>
-						<option value="at" >
-						Austria
-						</option>
-						<option value="az" >
-						Azerbaijan
-						</option>
-						<option value="bs" >
-						Bahamas
-						</option>
-						<option value="bh" >
-						Bahrain
-						</option>
-						<option value="bd" >
-						Bangladesh
-						</option>
-						<option value="bb" >
-						Barbados
-						</option>
-						<option value="by" >
-						Belarus
-						</option>
-						<option value="be" >
-						Belgium
-						</option>
-						<option value="bz" >
-						Belize
-						</option>
-						<option value="bj" >
-						Benin
-						</option>
-						<option value="bm" >
-						Bermuda
-						</option>
-						<option value="bt" >
-						Bhutan
-						</option>
-						<option value="bo" >
-						Bolivia
-						</option>
-						<option value="ba" >
-						Bosnia And Herzegovina
-						</option>
-						<option value="bw" >
-						Botswana
-						</option>
-						<option value="bv" >
-						Bouvet Island
-						</option>
-						<option value="br" >
-						Brazil
-						</option>
-						<option value="io" >
-						British Indian Ocean Territory
-						</option>
-						<option value="bn" >
-						Brunei Darussalam
-						</option>
-						<option value="bg" >
-						Bulgaria
-						</option>
-						<option value="bf" >
-						Burkina Faso
-						</option>
-						<option value="bi" >
-						Burundi
-						</option>
-						<option value="kh" >
-						Cambodia
-						</option>
-						<option value="cm" >
-						Cameroon
-						</option>
-						<option value="ca" >
-						Canada
-						</option>
-						<option value="cv" >
-						Cape Verde
-						</option>
-						<option value="ky" >
-						Cayman Islands
-						</option>
-						<option value="cf" >
-						Central African Republic
-						</option>
-						<option value="td" >
-						Chad
-						</option>
-						<option value="cl" >
-						Chile
-						</option>
-						<option value="cn" >
-						China
-						</option>
-						<option value="cx" >
-						Christmas Island
-						</option>
-						<option value="cc" >
-						Cocos (Keeling) Islands
-						</option>
-						<option value="co" >
-						Colombia
-						</option>
-						<option value="km" >
-						Comoros
-						</option>
-						<option value="cg" >
-						Congo
-						</option>
-						<option value="cd" >
-						Congo, The Democratic Republic Of The
-						</option>
-						<option value="ck" >
-						Cook Islands
-						</option>
-						<option value="cr" >
-						Costa Rica
-						</option>
-						<option value="ci" >
-						Co^te D'Ivoire
-						</option>
-						<option value="hr" >
-						Croatia
-						</option>
-						<option value="cu" >
-						Cuba
-						</option>
-						<option value="cy" >
-						Cyprus
-						</option>
-						<option value="cz" >
-						Czech Republic
-						</option>
-						<option value="dk" >
-						Denmark
-						</option>
-						<option value="dj" >
-						Djibouti
-						</option>
-						<option value="dm" >
-						Dominica
-						</option>
-						<option value="do" >
-						Dominican Republic
-						</option>
-						<option value="tp" >
-						East Timor
-						</option>
-						<option value="ec" >
-						Ecuador
-						</option>
-						<option value="eg" >
-						Egypt
-						</option>
-						<option value="gq" >
-						Equatorial Guinea
-						</option>
-						<option value="er" >
-						Eritrea
-						</option>
-						<option value="ee" >
-						Estonia
-						</option>
-						<option value="et" >
-						Ethiopia
-						</option>
-						<option value="fk" >
-						Falkland Islands (Malvinas)
-						</option>
-						<option value="fo" >
-						Faroe Islands
-						</option>
-						<option value="fj" >
-						Fiji
-						</option>
-						<option value="fi" >
-						Finland
-						</option>
-						<option value="fr" selected>
-						France
-						</option>
-						<option value="gf" >
-						French Guiana
-						</option>
-						<option value="pf" >
-						French Polynesia
-						</option>
-						<option value="tf" >
-						French Southern Territories
-						</option>
-						<option value="ga" >
-						Gabon
-						</option>
-						<option value="gm" >
-						Gambia
-						</option>
-						<option value="ge" >
-						Georgia
-						</option>
-						<option value="de" >
-						Germany
-						</option>
-						<option value="gh" >
-						Ghana
-						</option>
-						<option value="gi" >
-						Gibraltar
-						</option>
-						<option value="gr" >
-						Greece
-						</option>
-						<option value="gl" >
-						Greenland
-						</option>
-						<option value="gd" >
-						Grenada
-						</option>
-						<option value="gp" >
-						Guadeloupe
-						</option>
-						<option value="gu" >
-						Guam
-						</option>
-						<option value="gt" >
-						Guatemala
-						</option>
-						<option value="gn" >
-						Guinea
-						</option>
-						<option value="gw" >
-						Guinea-Bissau
-						</option>
-						<option value="gy" >
-						Guyana
-						</option>
-						<option value="ht" >
-						Haiti
-						</option>
-						<option value="hm" >
-						Heard Island And McDonald Islands
-						</option>
-						<option value="hn" >
-						Honduras
-						</option>
-						<option value="hk" >
-						Hong Kong
-						</option>
-						<option value="hu" >
-						Hungary
-						</option>
-						<option value="is" >
-						Iceland
-						</option>
-						<option value="in" >
-						India
-						</option>
-						<option value="id" >
-						Indonesia
-						</option>
-						<option value="ir" >
-						Iran, Islamic Republic Of
-						</option>
-						<option value="iq" >
-						Iraq
-						</option>
-						<option value="ie" >
-						Ireland
-						</option>
-						<option value="il" >
-						Israel
-						</option>
-						<option value="it" >
-						Italy
-						</option>
-						<option value="jm" >
-						Jamaica
-						</option>
-						<option value="jp" >
-						Japan
-						</option>
-						<option value="jo" >
-						Jordan
-						</option>
-						<option value="kz" >
-						Kazakstan
-						</option>
-						<option value="ke" >
-						Kenya
-						</option>
-						<option value="ki" >
-						Kiribati
-						</option>
-						<option value="kp" >
-						Korea, Democratic People's Republic Of
-						</option>
-						<option value="kr" >
-						Korea, Republic Of
-						</option>
-						<option value="kw" >
-						Kuwait
-						</option>
-						<option value="kg" >
-						Kyrgyzstan
-						</option>
-						<option value="la" >
-						Lao People's' Democratic Republic
-						</option>
-						<option value="lv" >
-						Latvia
-						</option>
-						<option value="lb" >
-						Lebanon
-						</option>
-						<option value="ls" >
-						Lesotho
-						</option>
-						<option value="lr" >
-						Liberia
-						</option>
-						<option value="ly" >
-						Libyan Arab Jamahiriya
-						</option>
-						<option value="li" >
-						Liechtenstein
-						</option>
-						<option value="lt" >
-						Lithuania
-						</option>
-						<option value="lu" >
-						Luxembourg
-						</option>
-						<option value="mo" >
-						Macau
-						</option>
-						<option value="mk" >
-						Macedonia, The Former Yugoslav Republic Of
-						</option>
-						<option value="mg" >
-						Madagascar
-						</option>
-						<option value="mw" >
-						Malawi
-						</option>
-						<option value="my" >
-						Malaysia
-						</option>
-						<option value="mv" >
-						Maldives
-						</option>
-						<option value="ml" >
-						Mali
-						</option>
-						<option value="mt" >
-						Malta
-						</option>
-						<option value="mh" >
-						Marshall Islands
-						</option>
-						<option value="mq" >
-						Martinique
-						</option>
-						<option value="mr" >
-						Mauritania
-						</option>
-						<option value="mu" >
-						Mauritius
-						</option>
-						<option value="yt" >
-						Mayotte
-						</option>
-						<option value="mx" >
-						Mexico
-						</option>
-						<option value="fm" >
-						Micronesia, Federated States Of
-						</option>
-						<option value="md" >
-						Moldova, Republic Of
-						</option>
-						<option value="mc" >
-						Monaco
-						</option>
-						<option value="mn" >
-						Mongolia
-						</option>
-						<option value="ms" >
-						Montserrat
-						</option>
-						<option value="ma" >
-						Morocco
-						</option>
-						<option value="mz" >
-						Mozambique
-						</option>
-						<option value="mm" >
-						Myanmar
-						</option>
-						<option value="na" >
-						Namibia
-						</option>
-						<option value="nr" >
-						Nauru
-						</option>
-						<option value="np" >
-						Nepal
-						</option>
-						<option value="nl" >
-						Netherlands
-						</option>
-						<option value="an" >
-						Netherlands Antilles
-						</option>
-						<option value="nc" >
-						New Caledonia
-						</option>
-						<option value="nz" >
-						New Zealand
-						</option>
-						<option value="ni" >
-						Nicaragua
-						</option>
-						<option value="ne" >
-						Niger
-						</option>
-						<option value="ng" >
-						Nigeria
-						</option>
-						<option value="nu" >
-						Niue
-						</option>
-						<option value="nf" >
-						Norfolk Island
-						</option>
-						<option value="mp" >
-						Northern Mariana Islands
-						</option>
-						<option value="no" >
-						Norway
-						</option>
-						<option value="om" >
-						Oman
-						</option>
-						<option value="pk" >
-						Pakistan
-						</option>
-						<option value="pw" >
-						Palau
-						</option>
-						<option value="ps" >
-						Palestinian Territory, Occupied
-						</option>
-						<option value="pa" >
-						Panama
-						</option>
-						<option value="pg" >
-						Papua New Guinea
-						</option>
-						<option value="py" >
-						Paraguay
-						</option>
-						<option value="pe" >
-						Peru
-						</option>
-						<option value="ph" >
-						Philippines
-						</option>
-						<option value="pn" >
-						Pitcairn
-						</option>
-						<option value="pl" >
-						Poland
-						</option>
-						<option value="pt" >
-						Portugal
-						</option>
-						<option value="pr" >
-						Puerto Rico
-						</option>
-						<option value="qa" >
-						Qatar
-						</option>
-						<option value="re" >
-						Re'union
-						</option>
-						<option value="ro" >
-						Romania
-						</option>
-						<option value="ru" >
-						Russian Federation
-						</option>
-						<option value="rw" >
-						Rwanda
-						</option>
-						<option value="sh" >
-						Saint Helena
-						</option>
-						<option value="kn" >
-						Saint Kitts And Nevis
-						</option>
-						<option value="lc" >
-						Saint Lucia
-						</option>
-						<option value="pm" >
-						Saint Pierre And Miquelon
-						</option>
-						<option value="vc" >
-						Saint Vincent And The Grenadines
-						</option>
-						<option value="sv" >
-						Salvador
-						</option>
-						<option value="ws" >
-						Samoa
-						</option>
-						<option value="sm" >
-						San Marino
-						</option>
-						<option value="st" >
-						Sao Tome And Principe
-						</option>
-						<option value="sa" >
-						Saudi Arabia
-						</option>
-						<option value="sn" >
-						Senegal
-						</option>
-						<option value="sc" >
-						Seychelles
-						</option>
-						<option value="sl" >
-						Sierra Leone
-						</option>
-						<option value="sg" >
-						Singapore
-						</option>
-						<option value="sk" >
-						Slovakia
-						</option>
-						<option value="si" >
-						Slovenia
-						</option>
-						<option value="sb" >
-						Solomon Islands
-						</option>
-						<option value="so" >
-						Somalia
-						</option>
-						<option value="za" >
-						South Africa
-						</option>
-						<option value="gs" >
-						South Georgia And The South Sandwich Islands
-						</option>
-						<option value="es" >
-						Spain
-						</option>
-						<option value="lk" >
-						Sri Lanka
-						</option>
-						<option value="sd" >
-						Sudan
-						</option>
-						<option value="sr" >
-						Suriname
-						</option>
-						<option value="sj" >
-						Svalbard And Jan Mayen
-						</option>
-						<option value="sz" >
-						Swaziland
-						</option>
-						<option value="se" >
-						Sweden
-						</option>
-						<option value="ch" >
-						Switzerland
-						</option>
-						<option value="sy" >
-						Syrian Arab Republic
-						</option>
-						<option value="tw" >
-						Taiwan
-						</option>
-						<option value="tj" >
-						Tajikistan
-						</option>
-						<option value="tz" >
-						Tanzania, United Republic Of
-						</option>
-						<option value="th" >
-						Thailand
-						</option>
-						<option value="tg" >
-						Togo
-						</option>
-						<option value="tk" >
-						Tokelau
-						</option>
-						<option value="to" >
-						Tonga
-						</option>
-						<option value="tt" >
-						Trinidad And Tobago
-						</option>
-						<option value="tn" >
-						Tunisia
-						</option>
-						<option value="tr" >
-						Turkey
-						</option>
-						<option value="tm" >
-						Turkmenistan
-						</option>
-						<option value="tc" >
-						Turks And Caicos Islands
-						</option>
-						<option value="tv" >
-						Tuvalu
-						</option>
-						<option value="ug" >
-						Uganda
-						</option>
-						<option value="ua" >
-						Ukraine
-						</option>
-						<option value="ae" >
-						United Arab Emirates
-						</option>
-						<option value="gb" >
-						United Kingdom
-						</option>
-						<option value="us" >
-						United States
-						</option>
-						<option value="um" >
-						United States Minor Outlying Islands
-						</option>
-						<option value="uy" >
-						Uruguay
-						</option>
-						<option value="uz" >
-						Uzbekistan
-						</option>
-						<option value="vu" >
-						Vanuatu
-						</option>
-						<option value="va" >
-						Vatican City State (Holy See)
-						</option>
-						<option value="ve" >
-						Venezuela
-						</option>
-						<option value="vn" >
-						Viet Nam
-						</option>
-						<option value="vg" >
-						Virgin Islands, British
-						</option>
-						<option value="vi" >
-						Virgin Islands, U.S.
-						</option>
-						<option value="wf" >
-						Wallis And Futuna
-						</option>
-						<option value="eh" >
-						Western Sahara
-						</option>
-						<option value="ye" >
-						Yemen
-						</option>
-						<option value="yu" >
-						Yugoslavia
-						</option>
-						<option value="zm" >
-						Zambia
-						</option>
-						<option value="zw" >
-						Zimbabwe
-						</option>
-					</select>
-					<br/>
-					<br/>
-					<a href="#" target="codeblock:autocompleteCountriesSelectCode">code</a>
-					<div id="autocompleteCountriesSelectCode" class="code">
-<textarea name="code" language="xml" cols="60" rows="6">
-<select acdropdown=true name=country>
-<option value="af" >Afghanistan
-...
-</select>
-</textarea>
-					</div>
-				</div>
-			</div>
-			<div id="three" class="pages" >
-				<div class="holder">
-					Gmail like autocomplete. You can separate the items by comma. The option autocomplete_forcecorrect="true" is used so if a text typed does not match any item the last typed characters (those which after adding them the list with suggestions was empty) are marked
-					<br/>
-					<br/>
-<textarea class="dropdown" cols="70" autocomplete="off" acdropdown="true" autocomplete_list="array:emails" autocomplete_complete="true" autocomplete_matchsubstring="true" autocomplete_forcecorrect="true"></textarea>
-					<a href="#" target="codeblock:gmailLikeCode">code</a>
-					<div id="gmailLikeCode" class="code">
-<textarea name="code" language="xml" cols="60" rows="6">
-<textarea class="dropdown" cols="70" autocomplete="off" acdropdown="true" autocomplete_list="array:emails" autocomplete_complete="true" autocomplete_matchsubstring="true" autocomplete_forcecorrect="true"></textarea>
-</textarea>
-					</div>
-				</div>
-			</div>
-			<div id="four" class="pages" >
-				<div class="holder">
-					And finally the remote loading functionality. The data is loaded from a url (the attribute autocomplete_list="url:") ).  The list returned is just a list of items separated by pipe - item1|item2|item3. In this example the url is <span style="color:#00f">get.php?s=[S]&l=10</span>.
-					The [S] will be replaced with the actual control value before submitting. The other option ( l=10 ) is an option to tell the script (get.php) to limit the result to only ten suggestions.
-					<br/>
-					<br/>
-					<input class="" id="autocomplete_remote" acdropdown="true" autocomplete_list="url:get.php?s=[S]&l=10" autocomplete_matchsubstring="true" tabindex="2" name="testURL">
-
-					<a href="#" target="codeblock:toggleRemoteLoadingCode">code</a>
-					<div id="toggleRemoteLoadingCode" class="code">
-<textarea name="code" language="xml" cols="60" rows="6">
-<input class="" id="autocomplete_remote" acdropdown="true" autocomplete_list="url:get.php?s=[S]&l=10" tabindex="2" name="testURL">
-</textarea>
-					</div>
-				</div>
-			</div>
-		</div>
-	</body>
-</html>
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/i/al.png b/src/plugins/wiki/www/themes/default/moacdropdown/i/al.png
deleted file mode 100644
index 0638ce2..0000000
Binary files a/src/plugins/wiki/www/themes/default/moacdropdown/i/al.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/i/ar.png b/src/plugins/wiki/www/themes/default/moacdropdown/i/ar.png
deleted file mode 100644
index 45efa4e..0000000
Binary files a/src/plugins/wiki/www/themes/default/moacdropdown/i/ar.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/i/arrowdown.gif b/src/plugins/wiki/www/themes/default/moacdropdown/i/arrowdown.gif
deleted file mode 100644
index b06803e..0000000
Binary files a/src/plugins/wiki/www/themes/default/moacdropdown/i/arrowdown.gif and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/i/code.png b/src/plugins/wiki/www/themes/default/moacdropdown/i/code.png
deleted file mode 100644
index eb4a98c..0000000
Binary files a/src/plugins/wiki/www/themes/default/moacdropdown/i/code.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/i/conf.gif b/src/plugins/wiki/www/themes/default/moacdropdown/i/conf.gif
deleted file mode 100644
index ebbfdb6..0000000
Binary files a/src/plugins/wiki/www/themes/default/moacdropdown/i/conf.gif and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/i/ial.png b/src/plugins/wiki/www/themes/default/moacdropdown/i/ial.png
deleted file mode 100644
index d075b6c..0000000
Binary files a/src/plugins/wiki/www/themes/default/moacdropdown/i/ial.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/i/iar.png b/src/plugins/wiki/www/themes/default/moacdropdown/i/iar.png
deleted file mode 100644
index e7282d8..0000000
Binary files a/src/plugins/wiki/www/themes/default/moacdropdown/i/iar.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/js/acdropdown.js b/src/plugins/wiki/www/themes/default/moacdropdown/js/acdropdown.js
deleted file mode 100644
index c37aefa..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/js/acdropdown.js
+++ /dev/null
@@ -1,1791 +0,0 @@
-//
-//  This script was created
-//  by Mircho Mirev
-//  mo /mo at momche.net/
-//	Copyright (c) 2004-2005 Mircho Mirev
-//
-//	:: feel free to use it BUT
-//	:: if you want to use this code PLEASE send me a note
-//	:: and please keep this disclaimer intact
-//
-//  xmlrpc support by Reini Urban for PhpWiki, 2006-12-29
-
-function cAutocomplete( sInputId )
-{
-	this.init( sInputId )
-}
-
-var xmlrpc_url;
-
-cAutocomplete.CS_NAME = 'Autocomplete component'
-cAutocomplete.CS_OBJ_NAME = 'AC_COMPONENT'
-cAutocomplete.CS_LIST_PREFIX = 'ACL_'
-cAutocomplete.CS_BUTTON_PREFIX = 'ACB_'
-cAutocomplete.CS_INPUT_PREFIX = 'AC_'
-cAutocomplete.CS_HIDDEN_INPUT_PREFIX = 'ACH_'
-cAutocomplete.CS_INPUT_CLASSNAME = 'dropdown'
-
-cAutocomplete.CB_AUTOINIT = true
-
-cAutocomplete.CB_AUTOCOMPLETE = false
-
-cAutocomplete.CB_FORCECORRECT = false
-
-//the separator when autocompleting multiple values
-cAutocomplete.CB_MATCHSUBSTRING = false
-cAutocomplete.CS_SEPARATOR = ','
-
-//the separator of associative arrays
-cAutocomplete.CS_ARRAY_SEPARATOR = ','
-
-//match the input string only against the begining of the strings
-//or anywhere in the string
-cAutocomplete.CB_MATCHSTRINGBEGIN = true
-
-cAutocomplete.CN_OFFSET_TOP = 2
-cAutocomplete.CN_OFFSET_LEFT = -1
-
-cAutocomplete.CN_LINE_HEIGHT = 19
-cAutocomplete.CN_NUMBER_OF_LINES = 10
-cAutocomplete.CN_HEIGHT_FIX = 2
-
-cAutocomplete.CN_CLEAR_TIMEOUT = 300
-cAutocomplete.CN_SHOW_TIMEOUT = 400
-cAutocomplete.CN_REMOTE_SHOW_TIMEOUT = 1000
-cAutocomplete.CN_MARK_TIMEOUT = 400
-
-cAutocomplete.hListDisplayed = null
-cAutocomplete.nCount = 0
-
-cAutocomplete.autoInit = function()
-{
-	var nI = 0
-	var hACE = null
-	var sLangAtt
-
-	var nInputsLength = document.getElementsByTagName( 'INPUT' ).length
-	for( nI = 0; nI < nInputsLength; nI++ )
-	{
-		if( document.getElementsByTagName( 'INPUT' )[ nI ].type.toLowerCase() == 'text' )
-		{
-		 	sLangAtt = document.getElementsByTagName( 'INPUT' )[ nI ].getAttribute( 'acdropdown' )
-			if( sLangAtt != null && sLangAtt.length > 0 )
-			{
-				if( document.getElementsByTagName( 'INPUT' )[ nI ].id == null || document.getElementsByTagName( 'INPUT' )[ nI ].id.length == 0 )
-				{
-					document.getElementsByTagName( 'INPUT' )[ nI ].id = cAutocomplete.CS_OBJ_NAME + cAutocomplete.nCount
-				}
-				hACE = new cAutocomplete( document.getElementsByTagName( 'INPUT' )[ nI ].id )
-			}
-		}
-	}
-
-	var nTALength = document.getElementsByTagName( 'TEXTAREA' ).length
-	for( nI = 0; nI < nTALength; nI++ )
-	{
-	 	sLangAtt = document.getElementsByTagName( 'TEXTAREA' )[ nI ].getAttribute( 'acdropdown' )
-		if( sLangAtt != null && sLangAtt.length > 0 )
-		{
-			if( document.getElementsByTagName( 'TEXTAREA' )[ nI ].id == null || document.getElementsByTagName( 'TEXTAREA' )[ nI ].id.length == 0 )
-			{
-				document.getElementsByTagName( 'TEXTAREA' )[ nI ].id = cAutocomplete.CS_OBJ_NAME + cAutocomplete.nCount
-			}
-			hACE = new cAutocomplete( document.getElementsByTagName( 'TEXTAREA' )[ nI ].id )
-		}
-	}
-
-
-	var nSelectsLength = document.getElementsByTagName( 'SELECT' ).length
-	var aSelect = null
-	for( nI = 0; nI < nSelectsLength; nI++ )
-	{
-		aSelect = document.getElementsByTagName( 'SELECT' )[ nI ]
-		sLangAtt = aSelect.getAttribute( 'acdropdown' )
-		if( sLangAtt != null && sLangAtt.length > 0 )
-		{
-			if( aSelect.id == null || aSelect.id.length == 0 )
-			{
-				aSelect.id = cAutocomplete.CS_OBJ_NAME + cAutocomplete.nCount
-			}
-			hACE = new cAutocomplete( aSelect.id )
-			nSelectsLength--
-			nI--
-		}
-	}
-}
-
-if( cAutocomplete.CB_AUTOINIT )
-{
-	if( window.attachEvent )
-	{
-		window.attachEvent( 'onload', cAutocomplete.autoInit )
-	}
-	else if( window.addEventListener )
-	{
-		window.addEventListener( 'load', cAutocomplete.autoInit, false )
-	}
-}
-
-cAutocomplete.prototype.init = function( sInputId )
-{
-  /*this.bDebug = false*/
-  /*this.bDebug = true*/
-  this.bDebug = true
-	this.sInputId = sInputId
-	this.sListId = cAutocomplete.CS_LIST_PREFIX + sInputId
-
-	this.sObjName = cAutocomplete.CS_OBJ_NAME + '_obj_' + (cAutocomplete.nCount++)
-	this.hObj = this.sObjName
-
-	this.hActiveSelection = null
-	this.nSelectedItemIdx = -1
-
-	//the value of the input before the list is displayed
-	this.sLastActiveValue = ''
-	this.sActiveValue = ''
-	this.bListDisplayed = false
-	this.nItemsDisplayed = 0
-
-	//if I transform a select option or the supplied array is associative I create a hidden input
-	//with the name of the original input and replace the original input's name
-	this.bAssociative = true
-	this.sHiddenInputId = null
-	this.bHasButton = false
-
-	//the actual data
-	this.aData = null
-	//the search array object
-	this.aSearchData = new Array()
-	this.bSorted = false
-
-	//the length of the last matched typed string
-	this.nLastMatchLength = 0
-
-	this.bForceCorrect = cAutocomplete.CB_FORCECORRECT
-	var sForceCorrect = document.getElementById( this.sInputId ).getAttribute( 'autocomplete_forcecorrect' )
-	if( sForceCorrect != null && sForceCorrect.length > 0 )
-	{
-		this.bForceCorrect = eval( sForceCorrect )
-	}
-
-	//match a only from the beginning or anywhere in the values
-	this.bMatchBegin = cAutocomplete.CB_MATCHSTRINGBEGIN
-	var sMatchBegin = document.getElementById( this.sInputId ).getAttribute( 'autocomplete_matchbegin' )
-	if( sMatchBegin != null && sMatchBegin.length > 0 )
-	{
-		this.bMatchBegin = eval( sMatchBegin )
-	}
-	//match substrings separated by cAutocomplete.CS_SEPARATOR
-	this.bMatchSubstring = cAutocomplete.CB_MATCHSUBSTRING
-	var sMatchSubstring = document.getElementById( this.sInputId ).getAttribute( 'autocomplete_matchsubstring' )
-	if( sMatchSubstring != null && sMatchSubstring.length > 0 )
-	{
-		this.bMatchSubstring = eval( sMatchSubstring )
-	}
-
-	//autocomplete with the first option from the list
-	this.bAutoComplete = cAutocomplete.CB_AUTOCOMPLETE
-	this.bAutocompleted = false
-	var sAutoComplete = document.getElementById( this.sInputId ).getAttribute( 'autocomplete_complete' )
-	if( sAutoComplete != null && sAutoComplete.length > 0 )
-	{
-		this.bAutoComplete = eval( sAutoComplete )
-	}
-	//format function
-	this.formatOptions = null
-	var sFormatFunction = document.getElementById( this.sInputId ).getAttribute( 'autocomplete_format' )
-	if( sFormatFunction != null && sFormatFunction.length > 0 )
-	{
-		this.formatOptions = eval( sFormatFunction )
-	}
-	//onselect callback function - get called when a new option is selected, either by changing the focus in the list by using the keyboard or by 
-	//clicking on it with the mouse
-	this.onSelect = null
-	var sOnSelectFunction = document.getElementById( this.sInputId ).getAttribute( 'autocomplete_onselect' )
-	if( sOnSelectFunction != null && sOnSelectFunction.length > 0 )
-	{
-		this.onSelect = eval( sOnSelectFunction )
-	}
-
-	//if we have remote list then we postpone the list creation and set associative off
-	if( this.getListArrayType() == 'url' || this.getListArrayType() == 'xmlrpc' )
-	{
-	        this.bAssociative = false
-		this.bRemoteList = true
-		this.sListURL = this.getListURL()
-		this.hXMLHttp = XmlHttp.create()
-		this.bXMLRPC = (this.getListArrayType() == 'xmlrpc')
-		    
-	}
-	else
-	{
-		this.bRemoteList = false
-	}
-
-	//you can turn associative type on or off (separate name-value pairs) 
-	//with the autocomplete_assoc="true" or "false" attribute.
-	//for remote search it is off
-	var sAssociative = document.getElementById( this.sInputId ).getAttribute( 'autocomplete_assoc' )
-	if( sAssociative != null && sAssociative.length > 0 )
-	{
-	    this.bAssociative = eval( sAssociative )
-	}
-
-	this.initListArray()
-	this.initListContainer()
-	//this.createList()
-	this.initInput()
-
-	eval( this.hObj + '= this' )
-}
-
-cAutocomplete.prototype.initInput = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-	hInput.hAutocomplete = this
-	var hContainer = document.getElementById( this.sListId )
-	hContainer.hAutocomplete = this
-
-	//any element ( and it's children ) with display:none have offset values of 0 ( in mozilla )
-	var nWidth = hInput.offsetWidth
-	if( !nWidth || nWidth == 0 )
-	{
-		//any element ( and it's children ) with display:none have offset values of 0 ( in mozilla )
-		var hOWInput = hInput.cloneNode( true )
-		hOWInput.style.position = 'absolute'
-		hOWInput.style.top = '-1000px'
-		document.body.appendChild( hOWInput )
-		var nWidth = hOWInput.offsetWidth
-		document.body.removeChild( hOWInput ) 
- 	}
-
-	var sInputName = hInput.name
-	var hForm = hInput.form
-	var bHasButton = false
-	var sHiddenValue = hInput.value
-	var sValue = hInput.type.toLowerCase() == 'text' ? hInput.value : ''
-
- 	var sHasButton = hInput.getAttribute( 'autocomplete_button' )
-	if( sHasButton != null && sHasButton.length > 0 )
-	{
-		bHasButton = true
-	}
-
-	//if it is a select - I unconditionally add a button
-	if( hInput.type.toLowerCase() == 'select-one' )
-	{
-		bHasButton = true
-		if( hInput.selectedIndex >= 0 )
-		{
-			sHiddenValue = hInput.options[ hInput.selectedIndex ].value
-			sValue = hInput.options[ hInput.selectedIndex ].text
-		}
-	}
-
-	//this is the case when the control is a transformed select or the list supplied is of the type - key,value not only values
-	if( hForm )
-	{
-		var hHiddenInput = document.createElement( 'INPUT' )
-		hHiddenInput.id = cAutocomplete.CS_HIDDEN_INPUT_PREFIX + this.sInputId
-		hHiddenInput.type = 'hidden'
-		hForm.appendChild( hHiddenInput )
-
-		if( this.bAssociative )
-		{
-			hHiddenInput.name = sInputName
-			hInput.name = cAutocomplete.CS_INPUT_PREFIX + sInputName
-		}
-		else
-		{
-			hHiddenInput.name = cAutocomplete.CS_INPUT_PREFIX + sInputName
-		}
-
-		hHiddenInput.value = sHiddenValue
-		this.sHiddenInputId = hHiddenInput.id
-	}
-
-	if( bHasButton )
-	{
-		this.bHasButton = true
-
-		var hInputContainer = document.createElement( 'DIV' )
-		hInputContainer.className = 'acinputContainer'
-		hInputContainer.style.width = nWidth
-
-		var hInputButton = document.createElement( 'INPUT' )
-		hInputButton.id = cAutocomplete.CS_BUTTON_PREFIX + this.sInputId
-		hInputButton.type = 'button'
-		hInputButton.className = 'button'
-		hInputButton.tabIndex = hInput.tabIndex + 1
-		hInputButton.hAutocomplete = this
-
-		var hNewInput = document.createElement( 'INPUT' )
-		if( this.bAssociative )
-		{
-			hNewInput.name = cAutocomplete.CS_INPUT_PREFIX + sInputName
-		}
-		else
-		{
-			hNewInput.name = sInputName
-		}
-
-		hNewInput.type = 'text'
-		hNewInput.value = sValue
-		hNewInput.style.width = nWidth-22
-		hNewInput.className = cAutocomplete.CS_INPUT_CLASSNAME
-		hNewInput.tabIndex = hInput.tabIndex
-		hNewInput.hAutocomplete = this
-
-		hInputContainer.appendChild( hNewInput )
-		hInputContainer.appendChild( hInputButton )
-
-		hInput.parentNode.replaceChild( hInputContainer, hInput )
-
-		hNewInput.id = this.sInputId
-		hInput = hNewInput
-	}
-
-	if( hInput.attachEvent )
-	{
-		hInput.attachEvent( 'onkeyup', cAutocomplete.onInputKeyUp )
-		hInput.attachEvent( 'onkeyup', cAutocomplete.saveCaretPosition )
-		hInput.attachEvent( 'onkeydown', cAutocomplete.onInputKeyDown )
-		hInput.attachEvent( 'onblur', cAutocomplete.onInputBlur )
-		hInput.attachEvent( 'onfocus', cAutocomplete.onInputFocus )
-
-		if( hInputButton )
-		{
-			hInputButton.attachEvent( 'onclick', cAutocomplete.onButtonClick )
-		}
-	}
-	else if( hInput.addEventListener )
-	{
-		hInput.addEventListener( 'keyup', cAutocomplete.onInputKeyUp, false )
-		hInput.addEventListener( 'keyup', cAutocomplete.saveCaretPosition, false )
-		hInput.addEventListener( 'keydown', cAutocomplete.onInputKeyDown, false )
-		hInput.addEventListener( 'keypress', cAutocomplete.onInputKeyPress, false )
-		hInput.addEventListener( 'blur', cAutocomplete.onInputBlur, false )
-		hInput.addEventListener( 'focus', cAutocomplete.onInputFocus, false )
-
-		if( hInputButton )
-		{
-			hInputButton.addEventListener( 'click', cAutocomplete.onButtonClick, false )
-		}
-	}
-
-	//I don't need the standard autocomplete
-	hInput.setAttribute( 'autocomplete', 'OFF' )
-
-	if( hForm )
-	{
-		if( hForm.attachEvent )
-		{
-			hForm.attachEvent( 'onsubmit', cAutocomplete.onFormSubmit )
-			if (this.bDebug) { this.debug ("attachEvent added") }
-		}
-		else if( hForm.addEventListener )
-		{
-			hForm.addEventListener( 'submit', cAutocomplete.onFormSubmit, false )
-			if (this.bDebug) { this.debug ("addEventListener") }
-		}
-	}
-}
-
-cAutocomplete.prototype.initListContainer = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-	var hContainer = document.createElement( 'DIV' )
-	hContainer.className = 'autocomplete_holder'
-	hContainer.id = this.sListId
-	hContainer.style.zIndex = 10000 + cAutocomplete.nCount
-	hContainer.hAutocomplete = this
-
-	var hFirstBorder =  document.createElement( 'DIV' )
-	hFirstBorder.className = 'autocomplete_firstborder'
-	var hSecondBorder =  document.createElement( 'DIV' )
-	hSecondBorder.className = 'autocomplete_secondborder'
-
-	var hList = document.createElement( 'UL' )
-	hList.className = 'autocomplete'
-
-	hSecondBorder.appendChild( hList )
-	hFirstBorder.appendChild( hSecondBorder )
-	hContainer.appendChild( hFirstBorder )
-	document.body.appendChild( hContainer )
-
-	if( hContainer.attachEvent )
-	{
-		hContainer.attachEvent( 'onblur', cAutocomplete.onListBlur )
-		hContainer.attachEvent( 'onfocus', cAutocomplete.onListFocus )
-	}
-	else if( hInput.addEventListener )
-	{
-		hContainer.addEventListener( 'blur', cAutocomplete.onListBlur, false )
-		hContainer.addEventListener( 'focus', cAutocomplete.onListFocus, false )
-	}
-
-
-	if( hContainer.attachEvent )
-	{
-		hContainer.attachEvent( 'onclick', cAutocomplete.onItemClick )
-	}
-	else if( hContainer.addEventListener )
-	{
-		hContainer.addEventListener( 'click', cAutocomplete.onItemClick, false )
-	}
-}
-
-cAutocomplete.prototype.createList = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-	var hContainer = document.getElementById( this.sListId )
-	var hList = hContainer.getElementsByTagName( 'UL' )[0]
-	if( hList )
-	{
-		hList = hList.parentNode.removeChild( hList )
-		while( hList.hasChildNodes() )
-		{
-			hList.removeChild( hList.childNodes[ 0 ] )
-		}
-	}
-
-	var hListItem = null
-	var hListItemLink = null
-	var hArrKey = null
-	var sArrEl = null
-
-	var hArr = this.aData
-	var nI = 0
-	var sRealText
-	for( hArrKey in hArr )
-	{
-		sArrEl = hArr[ hArrKey ]
-		hListItem = document.createElement( 'LI' )
-		hListItemLink = document.createElement( 'A' )
-		hListItemLink.setAttribute( 'itemvalue', hArrKey )
-
-		/* so you can attach data to the element */
-		/* it's a hack but seems to work */
-		var sArrData = sArrEl.split( cAutocomplete.CS_ARRAY_SEPARATOR )
-		if( sArrData.length > 1 )
-		{
-			this.aData[ hArrKey ] = sArrData[ 0 ]
-			hListItemLink.setAttribute( 'itemdata', sArrEl.substring( sArrEl.indexOf( cAutocomplete.CS_ARRAY_SEPARATOR ) + 1 ) )
-			sRealText = sArrData[ 0 ]
-		}
-		else
-		{
-			sRealText = sArrEl
-		}
-		/* end of attach data to the element */
-
-		hListItemLink.href = '#'
-		hListItemLink.appendChild( document.createTextNode( sRealText ) )
-		hListItemLink.realText = sRealText
-		if( nI == this.nSelectedItemIdx )
-		{
-			this.hActiveSelection = hListItemLink
-			this.hActiveSelection.className = 'selected'
-		}
-		hListItem.appendChild( hListItemLink )
-		hList.appendChild( hListItem )
-		this.aSearchData[ nI++ ] = sRealText.toLowerCase()
-	}
-	var hSecondBorder = hContainer.firstChild.firstChild
-	hSecondBorder.appendChild( hList )
-	this.bListUpdated = false
-}
-
-/* list array functions */
-
-cAutocomplete.prototype.initListArray = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-	var hArr = null
-
-	if( hInput.type.toLowerCase() == 'select-one' )
-	{
-		hArr = new Object()
-		for( var nI = 0; nI < hInput.options.length; nI++ )
-		{
-			hArrKey = hInput.options.item( nI ).value
-			sArrEl = hInput.options.item( nI ).text
-		    hArr[ hArrKey ] = sArrEl
-			if( hInput.options.item( nI ).selected )
-			{
-			    this.nSelectedItemIdx = nI
-			}
-		}
-	}
-	else
-	{
-		var sAA = hInput.getAttribute( 'autocomplete_list' )
-		var sAAS = hInput.getAttribute( 'autocomplete_list_sort' )
-
-		var sArrayType = this.getListArrayType()
-
-		switch( sArrayType )
-		{
-			case 'array'	:
-			hArr = eval( sAA.substring( 6 ) )
-			break
-
-			case 'list'	:
-			hArr = new Array()
-			var hTmpArray = sAA.substring( 5 ).split( '|' )
-			var aValueArr
-			for( hKey in hTmpArray )
-			    {
-				aValueArr = hTmpArray[ hKey ].split( cAutocomplete.CS_ARRAY_SEPARATOR )
-				if( aValueArr.length == 1 )
-				    {
-					hArr[ hKey ] = hTmpArray[ hKey ]
-					this.bAssociative = false
-				    }
-				else
-				    {
-					hArr[ aValueArr[ 0 ] ] = aValueArr[ 1 ]
-				    }
-			    }
-			break
-		}
-		if( sAAS != null && eval( sAAS ) )
-		{
-			this.bSorted = true
-			this.aData = hArr.sort()
-			hArr = hArr.sort()
-		}
-	}
-	this.setArray( hArr )
-}
-
-cAutocomplete.prototype.setArray = function( sArray )
-{
-	if( typeof sArray == 'string' )
-	{
-		this.aData = eval( sArray )
-	}
-	else
-	{
-		this.aData = sArray
-	}
-	this.bListUpdated = true
-}
-
-//use this function to change the list of autocomplete values to a new one
-//supply as an argument the name as a literal of an JS array object
-//well things changed - you can supply  an actual array too
-cAutocomplete.prototype.setListArray = function( sArray )
-{
-	this.setArray( sArray )
-	this.updateAndShowList()
-}
-
-cAutocomplete.prototype.getListArrayType = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-	var sAA = hInput.getAttribute( 'autocomplete_list' )
-	if( sAA != null && sAA.length > 0 )
-	{
-		if( sAA.indexOf( 'array:' ) >= 0 )
-		{
-			return 'array'
-		}
-		else if(  sAA.indexOf( 'list:' ) >= 0 )
-		{
-			return 'list'
-		}
-		else if(  sAA.indexOf( 'url:' ) >= 0 )
-		{
-			return 'url'
-		}
-		else if(  sAA.indexOf( 'xmlrpc:' ) >= 0 )
-		{
-			return 'xmlrpc'
-		}
-	}
-}
-
-cAutocomplete.prototype.getListURL = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-	var sAA = hInput.getAttribute( 'autocomplete_list' )
-	if( sAA != null && sAA.length > 0 )
-	{
-		if(  sAA.indexOf( 'url:' ) >= 0 )
-		{
-		    return sAA.substring( 4 )
-		}
-		if(  sAA.indexOf( 'xmlrpc:' ) >= 0 )
-		{
-		    return sAA.substring( 7 )
-		}
-	}
-}
-
-cAutocomplete.prototype.setListURL = function( sURL )
-{
-	this.sListURL = sURL;
-}
-
-cAutocomplete.prototype.onXmlHttpLoad = function( )
-{
-    if( this.hXMLHttp.readyState == 4 )
-	{
-	    var hError = this.hXMLHttp.parseError
-	    if( hError && hError.errorCode != 0 )
-		{
-		    alert( hError.reason )
-		}
-	    else
-		{
-		    this.afterRemoteLoad()
-		}
-	}
-}
-
-cAutocomplete.prototype.onXMLRPCHttpLoad = function( )
-{
-	if( this.hXMLHttp.readyState == 4 )
-	{
-		var hError = this.hXMLHttp.parseError
-		if( hError && hError.errorCode != 0 )
-		{
-			alert( hError.reason )
-		}
-		else
-		{
-			this.afterRemoteLoadXMLRPC()
-		}
-	}
-}
-
-cAutocomplete.prototype.loadXMLRPCListArray = function()
-{
-	// encoding: "xmlrpc:wiki.titleSearch [S] 4"
-	// or "xmlrpc:http://localhost/wiki/?wiki.titleSearch [S] 4"
-	//    encode the methodname as optional query_arg and the args space separated
-	var sURL = this.sListURL
-        var xmlrpc_url = data_path + '/RPC2.php'
-	var aMethodArgs = sURL.split( ' ' )
-	var sMethodName = aMethodArgs[ 0 ]
-	var sStartWith = this.getStringForAutocompletion( this.sActiveValue, this.nInsertPoint )
-	sStartWith = sStartWith.replace( /^\s/, '' )
-	sStartWith = sStartWith.replace( /\s$/, '' )
-
-	if( sMethodName.indexOf( '?' ) > 0 )
-        {
-		sMethodName = sMethodName.replace( '/^.+\?/', '' )
-		sURL = sURL.replace( '/\?.+$/', '' )
-	}
-	else
-        {
-		sURL = xmlrpc_url
-	}
-
-	if (sMethodName.length < 1) 
-	    { 
-		var hInput = document.getElementById( this.sInputId )
-		hInput.value = this.sActiveValue
-		return
-	    }
-
-	// Construct the xmlrpc request.
-	// Which charset to send? for sure we get back utf-8
-	var sRequest = '<?xml version=\'1.0\' encoding="utf-8" ?>\n'
-	sRequest += '<methodCall><methodName>'+sMethodName+'</methodName>\n'
-	if (aMethodArgs.length <= 1) // the first arg is the name
-	    {
-		sRequest += '<params/>\n'
-	    }
-	else
-	    {
-		sRequest += '<params>\n'
-		for( var nI = 1; nI < aMethodArgs.length; nI++ )
-		{
-			var sArg = aMethodArgs[ nI ];
-			//this.debug('sMethodName: "'+sMethodName+'" sArg['+nI+']: "'+sArg+'"')
-			if( sArg.indexOf( '[S]' ) >= 0 )
-                        {
-				//this.debug('sArg['+nI+']: "'+sArg+'" sStartWith: "'+sStartWith+'"')
-				sArg = sArg.replace( '[S]', sStartWith )
-                        }
-			// We could parse a prepended "(int)" cast.
-			// Can only do string args so far
-                        if (sArg == 'debug') {
-                          this.bDebug = true;
-                        } else {
-                          sRequest += '<param><value><string>'
-                          sRequest += sArg
-                          sRequest += '</string></value></param>\n'
-                        }
-		}
-		sRequest += '</params>\n'
-	    }
-	sRequest += '</methodCall>'
-	if (this.bDebug) {
-	    sURL += '?start_debug=1'
-	    this.debug('url: "'+sURL+'" sRequest: "'+sRequest.substring(20)+'"')
-	}
-	this.hXMLHttp.open( 'POST', sURL, true )
-	var hAC = this
-	this.hXMLHttp.onreadystatechange = function() { hAC.onXMLRPCHttpLoad() }
-	/*this.hXMLHttp.onreadystatechange = new Function( 'var sAC = "'+this.sObjName+'"; cAutocomplete.onXMLRPCHttpLoad( eval( sAC ) )' )*/
-	this.hXMLHttp.send( sRequest )
-}
-
-cAutocomplete.prototype.loadListArray = function()
-{
-	var sURL = this.sListURL
-	var sStartWith = this.getStringForAutocompletion( this.sActiveValue, this.nInsertPoint )
-	sStartWith = sStartWith.replace( /^\s/, '' )
-	sStartWith = sStartWith.replace( /\s$/, '' )
-	if( sURL.indexOf( '[S]' ) >= 0 )
-	{
-		sURL = sURL.replace( '[S]', sStartWith )
-	}
-	else
-	{
-		sURL += this.sActiveValue
-	}
-	this.hXMLHttp.open( 'GET', sURL, true )
-
-	var hAC = this
-	this.hXMLHttp.onreadystatechange = function() { hAC.onXmlHttpLoad() }
-	this.hXMLHttp.send( null )
-}
-
-cAutocomplete.prototype.afterRemoteLoad = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-
-	var hArr = new Array()
-	var hTmpArray = this.hXMLHttp.responseText.split( '|' )
-	var aValueArr
-	for( hKey in hTmpArray )
-	{
-	    aValueArr = hTmpArray[ hKey ].split( cAutocomplete.CS_ARRAY_SEPARATOR )
-	    if( aValueArr.length == 1 )
-	    {
-		hArr[ hKey ] = hTmpArray[ hKey ]
-	    }
-	    else
-	    {
-		hArr[ aValueArr[ 0 ] ] = hTmpArray[ hKey ].substr( hTmpArray[ hKey ].indexOf( cAutocomplete.CS_ARRAY_SEPARATOR ) + 1 )
-	    }
-	}
-
-	hInput.className = ''
-	hInput.readonly = false
-	hInput.value = this.sActiveValue
-	this.setListArray( hArr )
-}
-
-cAutocomplete.prototype.afterRemoteLoadXMLRPC = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-
-	var hArr = new Array()
-	sResult = this.hXMLHttp.responseText
-	if ( this.bDebug ) {
-	    this.debug( "response: "+sResult.substring(70,190) )
-	}
-	sResult.replace('\n','');
-	sResult.replace('\r','');
-        var hKey = 0
-	var i = sResult.indexOf('<string>')
-	while (i >= 0) {
-	    var j
-	    sResult = sResult.substring(i+8)
-	    j = sResult.indexOf('</string>')
-	    hArr[ hKey ] = sResult.substring(0, j)
-	    // TODO: convert it from utf-8 to result charset and encoding
-	    //this.debug( 'i:'+i+' j:'+j+' "'+hArr[ hKey ]+'"' )
-	    /*if( hArr[ hKey ] == hArr[ hKey-1 ] )
-	      return*/
-	    hKey += 1
-	    sResult = sResult.substring(j+9)
-	    i = sResult.indexOf('<string>')
-	}
-
-	hInput.className = ''
-	hInput.readonly = false
-	hInput.value = this.sActiveValue
-	this.setListArray( hArr )
-}
-
-/**/
-
-cAutocomplete.prototype.prepareList = function( bFullList )
-{
-	var hInput = document.getElementById( this.sInputId )
-	this.sActiveValue = hInput.value
-
-	// Check if this was invoked by a key that did not change the value
-	var sST = this.getStringForAutocompletion( this.sActiveValue, this.nInsertPoint )
-	var sLST = this.getStringForAutocompletion( this.sLastActiveValue, this.nInsertPoint )
-
-	if( sLST != sST || bFullList || !this.bListDisplayed || this.bMatchSubstring  )
-	{
-		if( this.bRemoteList )
-		{
-			hInput.className = 'search'
-			//hInput.readonly = true
-			// TODO: print please wait somewhere else
-			// hInput.value = 'please wait...'
-			// hInput.value = this.sListURL
-			this.bXMLRPC ? this.loadXMLRPCListArray() : this.loadListArray()
-			return
-		}
-		this.updateAndShowList( bFullList )
-	}
-}
-
-cAutocomplete.prototype.updateAndShowList = function( bFullList )
-{
-	var hContainer = document.getElementById( this.sListId )
-	var hList = hContainer.getElementsByTagName( 'UL' )[ 0 ]
-	var hInput = document.getElementById( this.sInputId )
-
-	if( this.bListUpdated )
-	{
-		this.createList()
-	}
-
-	//stupid hack just for speed
-	var sST = this.bMatchSubstring ? this.getStringForAutocompletion( this.sActiveValue, this.nInsertPoint ) : this.sActiveValue
-	var sLST = this.bMatchSubstring ? this.getStringForAutocompletion( this.sLastActiveValue, this.nInsertPoint ) : this.sLastActiveValue
-
-	//nothing changed since last type - maybe only function keys were pressed
-	//this is the case when for example the down key was pressed
-	if( sST == sLST )
-	{
-		if( !this.bMatchSubstring )
-		{
-			bFullList = true
-		}
-	}
-	this.filterOptions( bFullList )
-
-	if( this.nItemsDisplayed == 0 )
-	{
-		if( this.bForceCorrect )
-		{
-			var aPos = this.getInsertPos( this.sActiveValue, this.nInsertPoint, '' )
-			cAutocomplete.markInputRange( hInput, this.nLastMatchLength, aPos[0] )
-		}
-	}
-
-	this.sLastActiveValue = this.sActiveValue
-
-	if( this.nItemsDisplayed > 0 )
-	{
-		if( !bFullList || this.bMatchSubstring )
-		{
-			this.deselectOption()
-		}
-		if( this.bAutoComplete && this.nItemsDisplayed == 1 )
-		{
-			//test if we have a full match i.e. the user typed the entire value
-			var sStartWith = this.getStringForAutocompletion( this.sActiveValue, this.nInsertPoint )
-			var sItemText = hList.getElementsByTagName( 'LI' )[ this.nFirstDisplayed ].getElementsByTagName( 'A' )[ 0 ].realText
-			if( sStartWith.toLowerCase() == sItemText.toLowerCase() )
-			{
-				this.selectOption( hList.getElementsByTagName( 'LI' )[ this.nFirstDisplayed ].getElementsByTagName( 'A' )[ 0 ] )
-				this.hideOptions()
-				//and do not show the list
-				return
-			}
-		}
-		if( this.bAutoComplete && !bFullList )
-		{
-			this.selectOption( hList.getElementsByTagName( 'LI' )[ this.nFirstDisplayed ].getElementsByTagName( 'A' )[ 0 ] )
-		}
-		this.showList()
-	}
-	else
-	{
-		this.clearList()
-	}
-}
-
-cAutocomplete.prototype.showList = function()
-{
-	if( cAutocomplete.hListDisplayed )
-	{
-		cAutocomplete.hListDisplayed.clearList()
-	}
-	var hInput = document.getElementById( this.sInputId )
-	var nTop = cDomObject.getOffsetParam( hInput, 'offsetTop' )
-	var nLeft = cDomObject.getOffsetParam( hInput, 'offsetLeft' )
-	var hContainer = document.getElementById( this.sListId )
-
-	var hList = hContainer.getElementsByTagName( 'UL' )[ 0 ]
-	if( this.bHasButton )
-	{
-		hContainer.style.width = document.getElementById( this.sInputId ).parentNode.offsetWidth
-	}
-	else
-	{
-		hContainer.style.width = document.getElementById( this.sInputId ).offsetWidth
-	}
-	var nNumLines = ( this.nItemsDisplayed < cAutocomplete.CN_NUMBER_OF_LINES ) ? this.nItemsDisplayed : cAutocomplete.CN_NUMBER_OF_LINES;
-	hList.style.height = nNumLines * cAutocomplete.CN_LINE_HEIGHT + cAutocomplete.CN_HEIGHT_FIX + 'px'
-
-	hContainer.style.top = nTop + hInput.offsetHeight + cAutocomplete.CN_OFFSET_TOP + 'px'
-	hContainer.style.left = nLeft + cAutocomplete.CN_OFFSET_LEFT + 'px'
-
-	hContainer.style.display = 'none'
-	hContainer.style.visibility = 'visible'
-	hContainer.style.display = 'block'
-
-	cAutocomplete.hListDisplayed = this
-	this.bListDisplayed = true
-}
-
-cAutocomplete.prototype.binarySearch = function( sFilter )
-{
-	var nLow = 0
-	var nHigh = this.aSearchData.length - 1
-	var nMid
-	var nTry, nLastTry
-	var sData
-	var nLen = sFilter.length
-
-	var lastTry
-
-	while ( nLow <= nHigh )
-	{
-		nMid = ( nLow + nHigh ) / 2
-		nTry = ( nMid < 1 ) ? 0 : parseInt( nMid )
-
-		sData = this.aSearchData[ nTry ].substr( 0, nLen )
-
-		if ( sData < sFilter )
-		{
-			nLow = nTry + 1
-			continue
-		}
-		if ( sData > sFilter )
-		{
-			nHigh = nTry - 1
-			continue
-		}
-		if ( sData == sFilter )
-		{
-			nHigh = nTry - 1
-			nLastTry = nTry
-			continue
-		}
-		return nTry
-	}
-
-	if ( typeof ( nLastTry ) != "undefined" )
-	{
-		return nLastTry
-	}
-	else
-	{
-		return null
-	}
-}
-
-cAutocomplete.prototype.getStringForAutocompletion = function( sString, nPos )
-{
-	if( sString == null || sString.length == 0 )
-	{
-		return ''
-	}
-	if( this.bMatchSubstring )
-	{
-		var nStartPos = sString.lastIndexOf( cAutocomplete.CS_SEPARATOR, nPos - 1 )
-		nStartPos = nStartPos < 0 ? 0 : nStartPos
-		var nEndPos = sString.indexOf( cAutocomplete.CS_SEPARATOR, nPos )
-		nEndPos = nEndPos < 0 ? sString.length : nEndPos
-		var sStr = sString.substr( nStartPos, nEndPos - nStartPos )
-		sStr = sStr.replace( /^(\,?)(\s*)(\S*)(\s*)(\,?)$/g, '$3' )
-		return sStr
-	}
-	else
-	{
-		return sString
-	}
-}
-
-cAutocomplete.prototype.insertString = function( sString, nPos, sInsert )
-{
-	if( this.bMatchSubstring )
-	{
-		var nStartPos = sString.lastIndexOf( cAutocomplete.CS_SEPARATOR, nPos - 1 )
-		nStartPos = nStartPos < 0 ? 0 : nStartPos
-		var nEndPos = sString.indexOf( cAutocomplete.CS_SEPARATOR, nPos )
-		nEndPos = nEndPos < 0 ? sString.length : nEndPos
-		var sStr = sString.substr( nStartPos, nEndPos - nStartPos )
-		sStr = sStr.replace( /^(\,?)(\s*)(\S?[\S\s]*\S?)(\s*)(\,?)$/g, '$1$2'+sInsert+'$4$5' )
-		sStr = sString.substr( 0, nStartPos ) + sStr + sString.substr( nEndPos )
-		return sStr
-	}
-	else
-	{
-		return sInsert
-	}
-}
-
-cAutocomplete.prototype.getInsertPos = function( sString, nPos, sInsert )
-{
-	nPos = nPos == null ? 0 : nPos
-	var nStartPos = sString.lastIndexOf( cAutocomplete.CS_SEPARATOR, nPos - 1 )
-	nStartPos = nStartPos < 0 ? 0 : nStartPos
-	var nEndPos = sString.indexOf( cAutocomplete.CS_SEPARATOR, nPos )
-	nEndPos = nEndPos < 0 ? sString.length : nEndPos
-	var sStr = sString.substr( nStartPos, nEndPos - nStartPos )
-	sStr = sStr.replace( /^(\,?)(\s*)(\S?[\S\s]*\S?)(\s*)(\,?)$/g, '$1$2'+sInsert )
-	return [ nPos, nStartPos + sStr.length ]
-}
-
-cAutocomplete.prototype.filterOptions = function( bShowAll )
-{
-	if( this.hActiveSelection && !bShowAll )
-	{
-		this.hActiveSelection.className = ''
-	}
-	if( typeof bShowAll == 'undefined' )
-	{
-		bShowAll = false
-	}
-
-	var hInput = document.getElementById( this.sInputId )
-
-	var sStartWith = this.getStringForAutocompletion( this.sActiveValue, this.nInsertPoint )
-	if( bShowAll )
-	{
-		sStartWith = ''
-	}
-
-	var hContainer = document.getElementById( this.sListId )
-	var hList = hContainer.getElementsByTagName( 'UL' )[ 0 ]
-	var nItemsLength = hList.childNodes.length
-	var hLinkItem = null
-	var nCount = 0
-
-	var hParent = hList.parentNode
-	var hList = hList.parentNode.removeChild( hList )
-	var hTItems = hList.childNodes
-
-	this.nItemsDisplayed = 0
-
-	if( sStartWith.length == 0 )
-	{
-		for( var nI = 0; nI < nItemsLength; nI++ )
-		{
-			if( this.formatOptions )
-			{
-				hTItems[ nI ].childNodes[0].innerHTML = this.formatOptions( hTItems[ nI ].childNodes[0].realText, nI )
-			}
-			hTItems[ nI ].style.display = 'block'
-		}
-
-		nCount = nItemsLength
-
-		if( nItemsLength > 0 )
-		{
-			this.nFirstDisplayed = 0
-			this.nLastDisplayed = nItemsLength - 1
-		}
-		else
-		{
-			this.nFirstDisplayed = this.nLastDisplayed = -1
-		}
-
-		//this.nLastMatchLength = 0
-		var aPos = this.getInsertPos( this.sActiveValue, this.nInsertPoint, sStartWith )
-		this.nLastMatchLength = aPos[0]
-	}
-	else
-	{
-		this.nFirstDisplayed = this.nLastDisplayed = -1
-		sStartWith = sStartWith.toLowerCase()
-		var bEnd = false
-		if( this.bSorted && this.bMatchBegin )
-		{
-			var nStartAt = this.binarySearch( sStartWith )
-			for( var nI = 0; nI < nItemsLength; nI++ )
-			{
-				hTItems[ nI ].style.display = 'none'
-				if( nI >= nStartAt && !bEnd )
-				{
-					if( !bEnd && this.aSearchData[ nI ].indexOf( sStartWith ) != 0 )
-					{
-						bEnd = true
-						continue
-					}
-					if( this.formatOptions )
-					{
-						hTItems[ nI ].childNodes[0].innerHTML = this.formatOptions( hTItems[ nI ].childNodes[0].realText, nI )
-					}
-					hTItems[ nI ].style.display = 'block'
-					nCount++
-					if( this.nFirstDisplayed < 0 )
-					{
-						this.nFirstDisplayed = nI
-					}
-					this.nLastDisplayed = nI
-				}
-			}
-		}
-		else
-		{
-			for( var nI = 0; nI < nItemsLength; nI++ )
-			{
-				hTItems[ nI ].style.display = 'none'
-				if( ( this.bMatchBegin && this.aSearchData[ nI ].indexOf( sStartWith ) == 0 ) || ( !this.bMatchBegin && this.aSearchData[ nI ].indexOf( sStartWith ) >= 0 ) )
-				{
-					if( this.formatOptions )
-					{
-						hTItems[ nI ].childNodes[0].innerHTML = this.formatOptions( hTItems[ nI ].childNodes[0].realText, nI )
-					}
-					hTItems[ nI ].style.display = 'block'
-					nCount++
-					if( this.nFirstDisplayed < 0 )
-					{
-						this.nFirstDisplayed = nI
-					}
-					this.nLastDisplayed = nI
-				}
-			}
-		}
-
-		if( nCount > 0 )
-		{
-			//this.nLastMatchLength = this.sActiveValue.length
-			var aPos = this.getInsertPos( this.sActiveValue, this.nInsertPoint, sStartWith )
-			this.nLastMatchLength = aPos[0]
-		}
-	}
-	hParent.appendChild( hList )
-	this.nItemsDisplayed = nCount
-}
-
-cAutocomplete.prototype.hideOptions = function()
-{
-	var hContainer = document.getElementById( this.sListId )
-	hContainer.style.visibility = 'hidden'
-	hContainer.style.display = 'none'
-	this.hListDisplayed = null
-}
-
-cAutocomplete.prototype.markAutocompletedValue = function()
-{
-	var hInput = document.getElementById( this.sInputId )
-	var sValue = this.hActiveSelection.realText
-	if( this.bMatchSubstring )
-	{
-		var aPos = this.getInsertPos( this.sLastActiveValue, this.nInsertPoint, sValue )
-		var nStartPos = aPos[ 0 ]
-		var nEndPos = aPos[ 1 ]
-	}
-	else
-	{
-		var nStartPos = this.nInsertPoint
-		var nEndPos = sValue.length
-	}
-	this.nStartAC = nStartPos
-	this.nEndAC = nEndPos
-
-	if( this.hMarkRangeTimeout != null )
-	{
-		clearTimeout( this.hMarkRangeTimeout )
-	}
-	this.hMarkRangeTimeout = setTimeout( function() { 
-						 cAutocomplete.markInputRange2( hInput.id ) 
-						     }
-					     , cAutocomplete.CN_MARK_TIMEOUT )
-	//cAutocomplete.markInputRange( hInput, nStartPos, nEndPos )
-}
-
-cAutocomplete.prototype.selectOptionByIndex = function( nOptionIndex )
-{
-	if( this.bListUpdated )
-	{
-		this.createList()
-	}
-
-	var hContainer = document.getElementById( this.sListId )
-	var hList = hContainer.getElementsByTagName( 'UL' )[ 0 ]
-	var nItemsLength = hList.childNodes.length
-	if( nOptionIndex >=0 && nOptionIndex < nItemsLength )
-	{
-		this.selectOption( hList.childNodes[ nOptionIndex ].getElementsByTagName( 'A' )[ 0 ] )
-	}
-}
-
-cAutocomplete.prototype.selectOptionByValue = function( sValue )
-{
-	if( this.bListUpdated )
-	{
-		this.createList()
-	}
-
-	sValue = sValue.toLowerCase()
-	
-	var hContainer = document.getElementById( this.sListId )
-	var hList = hContainer.getElementsByTagName( 'UL' )[ 0 ]
-	var nItemsLength = hList.childNodes.length
-
-	var nSelectedIndex = -1
-	for( var nI = 0; nI < nItemsLength; nI++ )
-	{
-		if( this.aSearchData[ nI ].indexOf( sValue ) == 0 )
-		{
-			nSelectedIndex = nI
-		}
-	}
-	if( nSelectedIndex >=0 )
-	{
-		this.selectOption( hList.childNodes[ nSelectedIndex ].getElementsByTagName( 'A' )[ 0 ] )
-	}
-}
-
-cAutocomplete.prototype.selectOption = function( hNewOption )
-{
-	if( this.hActiveSelection )
-	{
-		if( this.hActiveSelection == hNewOption )
-		{
-			return
-		}
-		else
-		{
-			this.hActiveSelection.className = ''
-		}
-	}
-	this.hActiveSelection = hNewOption
-	var hInput = document.getElementById( this.sInputId )
-	if( this.hActiveSelection != null )
-	{
-		if( this.sHiddenInputId != null )
-		{
-			if( this.bMatchSubstring )
-			{
-				document.getElementById( this.sHiddenInputId ).value = this.hActiveSelection.getAttribute( 'itemvalue' )
-			}
-			else
-			{
-				document.getElementById( this.sHiddenInputId ).value = this.hActiveSelection.getAttribute( 'itemvalue' )
-			}
-		}
-
-		this.hActiveSelection.className = 'selected'
-		if( this.bAutoComplete )
-		{
-			hInput.value = this.insertString( this.sLastActiveValue, this.nInsertPoint, this.hActiveSelection.realText )
-			this.bAutocompleted = true
-			this.markAutocompletedValue()
-		}
-		else
-		{
-		    var aPos = this.getInsertPos( this.sLastActiveValue, this.nInsertPoint, this.hActiveSelection.realText )
-			hInput.value = this.insertString( this.sActiveValue, this.nInsertPoint, this.hActiveSelection.realText )
-			//cAutocomplete.setInputCaretPosition( hInput, this.nInsertPoint )
-			cAutocomplete.setInputCaretPosition( hInput, aPos[ 1 ] )
-		}
-
-		this.sActiveValue = hInput.value
-
-		if( this.onSelect )
-		{
-			this.onSelect()
-		}
-	}
-	else
-	{
-		hInput.value = this.sActiveValue
-		cAutocomplete.setInputCaretPosition( hInput, this.nInsertPoint )
-	}
-}
-
-cAutocomplete.prototype.deselectOption = function( )
-{
-	if( this.hActiveSelection != null )
-	{
-		this.hActiveSelection.className = ''
-		this.hActiveSelection = null
-	}
-}
-
-cAutocomplete.prototype.clearList = function()
-{
-	//this.deselectOption()
-	this.hideOptions()
-	this.bListDisplayed = false
-}
-
-cAutocomplete.prototype.getPrevDisplayedItem = function( hItem )
-{
-	if( hItem == null )
-	{
-		var hContainer = document.getElementById( this.sListId )
-		hItem = hContainer.getElementsByTagName( 'UL' )[ 0 ].childNodes.item( hContainer.getElementsByTagName( 'UL' )[ 0 ].childNodes.length - 1 )
-	}
-	else
-	{
-		hItem = getPrevNodeSibling( hItem.parentNode )
-	}
-	while( hItem != null )
-	{
-		if( hItem.style.display == 'block' )
-		{
-			return hItem
-		}
-		hItem = hItem.previousSibling
-	}
-	return null
-}
-
-cAutocomplete.prototype.getNextDisplayedItem = function( hItem )
-{
-	if( hItem == null )
-	{
-		var hContainer = document.getElementById( this.sListId )
-		hItem = hContainer.getElementsByTagName( 'UL' )[ 0 ].childNodes.item( 0 )
-	}
-	else
-	{
-		hItem =  getNextNodeSibling( hItem.parentNode )
-	}
-	while( hItem != null )
-	{
-		if( hItem.style.display == 'block' )
-		{
-			return hItem
-		}
-		hItem = hItem.nextSibling
-	}
-	return null
-}
-
-cAutocomplete.prototype.debug = function(s)
-{
-    if (this.bDebug) {
-	var hInput = document.getElementById( this.sInputId )
-	var hContainer = document.createElement( 'DIV' )
-	hContainer.className = 'debug'
-	hContainer.innerHTML = s
-        var hDiv = hInput.form.parentNode
-        /*if (hDiv.childNodes[1] && hDiv.childNodes[1].className == 'debug')
-          hDiv.insertBefore( hContainer, hDiv.childNodes[1] )
-          else*/
-          hDiv.appendChild( hContainer )
-	/*alert(s)*/
-    }
-}
-
-cAutocomplete.onInputKeyDown = function ( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	var hAC = hElement.hAutocomplete
-	var hContainer = document.getElementById( hAC.sListId )
-	var hInput = document.getElementById( hAC.sInputId )
-	var hList = hContainer.getElementsByTagName( 'UL' )[ 0 ]
-	var hEl = getParentByTagName( hElement, 'A' )
-	if( hContainer != null && hAC.bListDisplayed )
-	{
-		var hLI = null
-		var hLINext = null
-		// The new active selection
-		if( ( hEvent.keyCode == 13 ) || ( hEvent.keyCode == 27 ) )
-		{
-			var bItemSelected = hEvent.keyCode == 13 ? true : false
-			hAC.clearList()
-			if (hAC.bDebug) { hAC.debug ("key "+hEvent.keyCode+" new active selection") }
-		}
-		if( hEvent.keyCode == 38 )
-		{
-			//up key pressed
-			if (hAC.bDebug) { hAC.debug ("key "+hEvent.keyCode+" up") }
-			hLINext = hAC.getPrevDisplayedItem( hAC.hActiveSelection )
-			if( hLINext != null )
-			{
-				hAC.selectOption( hLINext.childNodes.item(0) )
-				if( hAC.nItemsDisplayed > cAutocomplete.CN_NUMBER_OF_LINES )
-				{
-					if( hList.scrollTop < 5 && hLINext.offsetTop > hList.offsetHeight )
-					{
-						hList.scrollTop = hList.scrollHeight - hList.offsetHeight
-					}
-					if( hLINext.offsetTop - hList.scrollTop < 0 )
-					{
-						hList.scrollTop -= hLINext.offsetHeight
-					}
-				}
-			}
-			else
-			{
-				hAC.selectOption( null )
-			}
-		}
-		else if ( hEvent.keyCode == 40 )
-		{
-			//down key pressed
-			if (hAC.bDebug) { hAC.debug ("key "+hEvent.keyCode+" down") }
-			hLINext = hAC.getNextDisplayedItem( hAC.hActiveSelection )
-			if( hLINext != null )
-			{
-				hAC.selectOption( hLINext.childNodes.item(0) )
-				if( hAC.nItemsDisplayed > cAutocomplete.CN_NUMBER_OF_LINES )
-				{
-					if( hList.scrollTop > 0 && hList.scrollTop > hLINext.offsetTop )
-					{
-						hList.scrollTop = 0
-					}
-					if( Math.abs( hLINext.offsetTop - hList.scrollTop - hList.offsetHeight ) < 5 )
-					{
-						hList.scrollTop += hLINext.offsetHeight
-					}
-				}
-			}
-			else
-			{
-				hAC.selectOption( null )
-			}
-		}
-	}
-	if( hInput.form )
-	{
-		hInput.form.bLocked = true
-		//if (hAC.bDebug) { hAC.debug ("onInputKeyDown form blocked") }
-	}
-	if ( hEvent.keyCode == 13 || hEvent.keyCode == 27 || hEvent.keyCode == 38 || hEvent.keyCode == 40 )
-	{
-		if( hEvent.preventDefault )
-		{
-		    hEvent.preventDefault()
-		} else {
-		    if (hAC.bDebug) { hAC.debug ("no preventDefault return false") }
-		}
-                if (hEvent.keyCode == 13) {
-                  /*if (hAC.bDebug) { hAC.debug ("Enter") }*/
-                  hEvent.cancelBubble = true
-                  hEvent.returnValue = true
-                  return true
-                }
-		hEvent.cancelBubble = true
-		hEvent.returnValue = false
-		return false
-	}
-}
-
-cAutocomplete.onInputKeyPress = function ( hEvent )
-{
-	if ( hEvent.keyCode == 13 || hEvent.keyCode == 38 || hEvent.keyCode == 40 )
-	{
-		if( hEvent.preventDefault )
-		{
-			hEvent.preventDefault()
-		}
-		hEvent.cancelBubble = true
-		hEvent.returnValue = false
-		return false
-	}
-}
-
-cAutocomplete.onInputKeyUp = function ( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	var hAC = hElement.hAutocomplete
-	var hInput = document.getElementById( hAC.sInputId )
-	//if we press the keys for up down enter or escape skip showing the list
-	switch( hEvent.keyCode )
-	{
-		case 8	:	if( hAC.bAutoComplete && hAC.bAutocompleted )
-					{
-						hAC.bAutocompleted = false
-						return false
-					}
-					break
-		case 38	:
-		case 40	:	if( hAC.bListDisplayed )
-					{
-						if( hEvent.preventDefault )
-						{
-							hEvent.preventDefault()
-						}
-						hEvent.cancelBubble = true
-						hEvent.returnValue = false
-						return false
-					}
-					break
-		case 32	:
-		case 46	:
-		//case 37	:
-		//case 39	:
-		case 35	:
-		case 36	:	break;
-		default	:	
-		if( hEvent.keyCode < 48 )
-		{
-		    if( hEvent.preventDefault )
-		    {
-			hEvent.preventDefault()
-		    }
-                    if (hEvent.keyCode == 13) {
-                      if (hAC.bDebug) { hAC.debug ("Enter KeyUp: returnValue = true") }
-                      hEvent.cancelBubble = true
-                      hEvent.returnValue = true
-                      hInput.form.submit;  
-                      return true
-                    }
-		    if (hAC.bDebug) { hAC.debug ("keyUp: hEvent.returnValue = false") }
-		    hEvent.cancelBubble = true
-		    hEvent.returnValue = false
-		    return false
-		}
-		break
-	}
-
-	if( hAC.hMarkRangeTimeout != null )
-	{
-		clearTimeout( hAC.hMarkRangeTimeout )
-	}
-
-	if( hAC.hShowTimeout )
-	{
-		clearTimeout( hAC.hShowTimeout )
-		hAC.hShowTimeout = null
-	}
-	var nTimeout = hAC.bRemoteList ? cAutocomplete.CN_REMOTE_SHOW_TIMEOUT : cAutocomplete.CN_SHOW_TIMEOUT
-	hAC.hShowTimeout = setTimeout( function(){ hAC.prepareList() }, nTimeout )
-	if (hAC.bDebug) { hAC.debug ("setTimeout "+nTimeout) }
-}
-
-cAutocomplete.onInputBlur = function( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	if( hElement.form )
-	{
-		hElement.form.bLocked = false
-	}
-	var hAC = hElement.hAutocomplete
-	if( !hAC.hClearTimeout )
-	{
-		hAC.hClearTimeout = setTimeout( function(){ hAC.clearList() }, cAutocomplete.CN_CLEAR_TIMEOUT )
-	}
-}
-
-cAutocomplete.onInputFocus = function( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	var hAC = hElement.hAutocomplete
-	if( hAC.hClearTimeout )
-	{
-		clearTimeout( hAC.hClearTimeout )
-		hAC.hClearTimeout = null
-	}
-}
-
-cAutocomplete.saveCaretPosition = function( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	var hAC = hElement.hAutocomplete
-	var hInput = document.getElementById( hAC.sInputId )
-
-	//there is something weird about hitting up and down keys in a textarea
-	if( hEvent.keyCode != 38 && hEvent.keyCode != 40 )
-	{
-		hAC.nInsertPoint = cAutocomplete.getInputCaretPosition( hInput )
-	}
-}
-
-cAutocomplete.getInputCaretPosition = function( hInput )
-{
-	if( typeof hInput.selectionStart != 'undefined' )
-	{
-		if( hInput.selectionStart == hInput.selectionEnd )
-		{
-			return hInput.selectionStart
-		}
-		else
-		{
-			return hInput.selectionStart
-		}
-	}
-	else if( hInput.createTextRange )
-	{
-		var hSelRange = document.selection.createRange()
-		if( hInput.tagName.toLowerCase() == 'textarea' )
-		{
-			var hSelBefore = hSelRange.duplicate()
-			var hSelAfter = hSelRange.duplicate()
-			hSelRange.moveToElementText( hInput )
-			hSelBefore.setEndPoint( 'StartToStart', hSelRange )
-			return hSelBefore.text.length
-		}
-		else
-		{
-			hSelRange.moveStart( 'character', -1*hInput.value.length )
-			var nLen = hSelRange.text.length
-			return nLen
-		}
-	}
-	return null
-}
-
-cAutocomplete.setInputCaretPosition = function( hInput, nPosition )
-{
-	if ( hInput.setSelectionRange )
-	{
-		hInput.setSelectionRange( nPosition ,nPosition )
-	}
-	else if ( hInput.createTextRange )
-	{
-		var hRange = hInput.createTextRange()
-		hRange.moveStart( 'character', nPosition )
-		hRange.moveEnd( 'character', nPosition )
-		hRange.collapse(true)
-		hRange.select()
-	}
-}
-
-cAutocomplete.markInputRange = function( hInput, nStartPos, nEndPos )
-{
-	if( hInput.setSelectionRange )
-	{
-		hInput.focus()
-		hInput.setSelectionRange( nStartPos, nEndPos )
-	}
-	else if( hInput.createTextRange )
-	{
-		var hRange = hInput.createTextRange()
-		hRange.collapse(true)
-		hRange.moveStart( 'character', nStartPos )
-		hRange.moveEnd( 'character', nEndPos - nStartPos )
-		hRange.select()
-	}
-}
-
-cAutocomplete.markInputRange2 = function( sInputId )
-{
-	var hInput = document.getElementById( sInputId )
-	var nStartPos = hInput.hAutocomplete.nStartAC
-	var nEndPos = hInput.hAutocomplete.nEndAC
-	cAutocomplete.markInputRange( hInput, nStartPos, nEndPos )
-}
-
-
-cAutocomplete.onListBlur = function( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	hElement = getParentByProperty( hElement, 'className', 'autocomplete_holder' )
-	var hAC = hElement.hAutocomplete
-	if( !hAC.hClearTimeout )
-	{
-		hAC.hClearTimeout = setTimeout( function() { hAC.clearList() }, cAutocomplete.CN_CLEAR_TIMEOUT )
-	}
-}
-
-cAutocomplete.onListFocus = function( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	hElement = getParentByProperty( hElement, 'className', 'autocomplete_holder' )
-	var hAC = hElement.hAutocomplete
-	if( hAC.hClearTimeout )
-	{
-		clearTimeout( hAC.hClearTimeout )
-		hAC.hClearTimeout = null
-	}
-}
-
-cAutocomplete.onItemClick = function( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	var hContainer = getParentByProperty( hElement, 'className', 'autocomplete_holder' )
-	var hEl = getParentByTagName( hElement, 'A' )
-	if( hContainer != null )
-	{
-		var hAC = hContainer.hAutocomplete
-		hAC.selectOption( hEl )
-		document.getElementById( hAC.sInputId ).focus()
-		hAC.clearList()
-	}
-	if( hEvent.preventDefault )
-	{
-		hEvent.preventDefault()
-	}
-	/*var hAC = hElement.hAutocomplete
-	  if (hAC.bDebug) { hAC.debug ("onItemClick") }*/
-	hEvent.cancelBubble = true
-	hEvent.returnValue = false
-	return false
-}
-
-cAutocomplete.onButtonClick = function ( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	var hAC = hElement.hAutocomplete
-	var hInput = document.getElementById( hAC.sInputId )
-	if( hInput.disabled )
-	{
-		return
-	}
-	if (hAC.bDebug) { hAC.debug ("onButtonClick") }
-	hAC.prepareList( true )
-	var hInput = document.getElementById( hAC.sInputId )
-	hInput.focus()
-}
-
-cAutocomplete.onFormSubmit = function ( hEvent )
-{
-	if( hEvent == null )
-	{
-		hEvent = window.event
-	}
-	var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget
-	if( hElement.bLocked )
-	{
-	    var hAC = hElement.hAutocomplete
-	    if (hAC.bDebug) { hAC.debug ("onSubmit: hElement.bLocked") }
-		hElement.bLocked = false
-		hEvent.returnValue = false
-		if( hEvent.preventDefault )
-		{
-			hEvent.preventDefault()
-		}
-		return false
-	}
-}
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/js/getobject2.js b/src/plugins/wiki/www/themes/default/moacdropdown/js/getobject2.js
deleted file mode 100644
index d8125c5..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/js/getobject2.js
+++ /dev/null
@@ -1,126 +0,0 @@
-//misc objects
-//a simple encapsulation object
-//used to query widths and heights
-
-function cDomObject( sId )
-{
-	if( bw.dom || bw.ie )
-	{
-		this.hElement = document.getElementById( sId )
-		this.hStyle = this.hElement.style
-	}
-}
-
-cDomObject.prototype.getWidth = function( )
-{
-	return  cDomObject.getWidth( this.hElement )
-}
-
-cDomObject.getWidth = function( hElement )
-{
-	if( hElement.currentStyle )
-	{
-		var nWidth = parseInt( hElement.currentStyle.width )
-		if( isNaN( nWidth ) )
-		{
-			return parseInt( hElement.offsetWidth )
-		}
-		else
-		{
-			return nWidth
-		}
-	}
-	else
-	{
-		return parseInt( hElement.offsetWidth )
-	}
-}
-
-cDomObject.prototype.getHeight = function( )
-{
-	return  cDomObject.getHeight( this.hElement )
-}
-
-cDomObject.getHeight = function( hElement )
-{
-	if( hElement.currentStyle )
-	{
-		var nHeight = parseInt( hElement.currentStyle.height )
-		if( isNaN( nHeight ) )
-		{
-			return parseInt( hElement.offsetHeight )
-		}
-		else
-		{
-			return nHeight
-		}
-	}
-	else
-	{
-		return parseInt( hElement.offsetHeight )
-	}
-}
-
-cDomObject.prototype.getLeft = function()
-{
-	return cDomObject.getLeft( this.hElement )
-}
-
-cDomObject.getLeft = function( hElement )
-{
-	return parseInt( hElement.offsetLeft )
-}
-
-cDomObject.prototype.getTop = function( )
-{
-	return cDomObject.getTop( this.hElement )
-}
-
-cDomObject.getTop = function( hElement )
-{
-	return parseInt( hElement.offsetTop )
-}
-
-
-// used to get the absolute position of an relativeli position element
-// by accumulating the offset parameters
-// example
-// cDomObject.getOffsetParam( hElement,'offsetLeft' )
-
-cDomObject.getOffsetParam = function( hElement, sParam, hLimitParent )
-{
-	var nRes = 0
-	if( hLimitParent == null )
-	{
-		hLimitParent = document.body.parentElement
-	}
-	while( hElement != hLimitParent )
-	{
-		nRes += eval( 'hElement.' + sParam )
-		if( !hElement.offsetParent ) { break }
-		hElement = hElement.offsetParent
-	}
-	return nRes
-}
-
-
-// used to get the absolute position of an relativeli position element
-// by accumulating the scroll offset parameters
-// example
-// cDomObject.getScrollOffset( hElement,'Left' )
-
-cDomObject.getScrollOffset = function( hElement, sParam, hLimitParent  )
-{
-	nRes = 0
-	if( hLimitParent == null )
-	{
-		hLimitParent = document.body.parentElement
-	}
-	while( hElement != hLimitParent )
-	{
-		nRes += eval( 'hElement.scroll' + sParam )
-		if( !hElement.offsetParent ) { break }
-		hElement = hElement.parentNode
-	}
-	return nRes
-}
\ No newline at end of file
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/js/mobrowser.js b/src/plugins/wiki/www/themes/default/moacdropdown/js/mobrowser.js
deleted file mode 100644
index 5a5850e..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/js/mobrowser.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-*	mo's browser checker
-*	heavily based on the v1 library
-*	mo / mircho at hotmail.com
-*	please keep this note here
-*/
-
-//make a browser checker object
-function cBrowser() {
-	var userAgent = navigator.userAgent.toLowerCase()
-	this.version = parseInt(navigator.appVersion)
-	this.subVersion = parseFloat(navigator.appVersion)
-	this.ns  = ((userAgent.indexOf('mozilla')!=-1) && ((userAgent.indexOf('spoofer')==-1) && (userAgent.indexOf('compatible') == -1)))
-	this.ns2 = (this.ns && (this.version == 2))
-	this.ns3 = (this.ns && (this.version == 3))
-	this.ns4b = (this.ns && (this.subVersion < 4.04))
-	this.ns4 = (this.ns && (this.version == 4))
-	this.ns5 = (this.ns && (this.version == 5))
-	this.ie   = (userAgent.indexOf('msie') != -1)
-	this.ie3  = (this.ie && (this.version == 2))
-	this.ie4  = (this.ie && (this.version == 4) && (userAgent.indexOf('msie 4.')!=-1))
-	this.ie5  = (this.ie && (this.version == 4) && (userAgent.indexOf('msie 5.0')!=-1))
-	this.ie55 = (this.ie && (this.version == 4) && (userAgent.indexOf('msie 5.5')!=-1))
-	this.ie6 = (this.ie && (this.version == 4) && (userAgent.indexOf('msie 6.0')!=-1))
-	this.op3 = (userAgent.indexOf('opera') != -1)
-	this.win   = (userAgent.indexOf('win')!=-1)
-	this.mac   = (userAgent.indexOf('mac')!=-1)
-	this.unix  = (userAgent.indexOf('x11')!=-1)
-	this.name = navigator.appName
-	this.dom = this.ns5 || this.ie5 || this.ie55 || this.ie6
-}
-
-var bw = new cBrowser()
\ No newline at end of file
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/js/modomevent.js b/src/plugins/wiki/www/themes/default/moacdropdown/js/modomevent.js
deleted file mode 100644
index 8dc9623..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/js/modomevent.js
+++ /dev/null
@@ -1,111 +0,0 @@
-//
-//  This script was created
-//  by Mircho Mirev
-//  mo /mo at momche.net/
-//
-//	:: feel free to use it BUT
-//	:: if you want to use this code PLEASE send me a note
-//	:: and please keep this disclaimer intact
-//
-
-//define the cEvent object
-cDomEvent = {
-	e 		: null,
-	type	: '',
-	button	: 0,
-	key		: 0,
-	x		: 0,
-	y		: 0,
-	pagex	: 0,
-	pagey	: 0,
-	target	: null,
-	from	: null,
-	to		: null
-}
-
-cDomEvent.init = function( e )
-{
-	if( bw.ie ) e = window.event
-	this.e = e
-	this.type = e.type
-	this.button = ( bw.ns4 ) ? e.which : e.button
-	this.key = ( bw.ns4 ) ? e.which : e.keyCode
-	this.target = ( e.srcElement ) ? e.srcElement : e.originalTarget 
-	this.from = ( bw.ns5 ) ? e.originalTarget : ( bw.ie ) ? e.fromElement : null
-	this.to  = ( bw.ns5 ) ? e.currentTarget : ( bw.ie ) ? e.toElement : null
-	this.x = ( bw.ns ) ? e.layerX : e.offsetX
-	this.y = ( bw.ns ) ? e.layerY : e.offsetY
-	this.screenX = e.screenX
-	this.screenY = e.screenY
-	this.pageX = ( bw.ns ) ? e.pageX : e.x + document.body.scrollLeft
-	this.pageY = ( bw.ns ) ? e.pageY : e.y + document.body.scrollTop
-}
-
-cDomEvent.addEvent = function( hElement, sEvent, handler, bCapture )
-{
-	if( hElement.addEventListener )
-	{
-		hElement.addEventListener( sEvent, handler, bCapture )
-		return true
-	}
-	else if( hElement.attachEvent )
-	{
-		return hElement.attachEvent( 'on'+sEvent, handler )
-	}
-	else if( bw.ie4 || bw.ns4 )
-	{
-		if( bw.ns4 ) eval( 'hElement.captureEvents( Event.'+sEvent.toUpperCase()+' )' )
-		eval( 'hElement.on'+sEvent+' = '+handler )
-	}
-	else
-	{
-		alert('Not implemented yet!')
-	}
-}
-
-cDomEvent.removeEvent = function( hElement, sEvent, handler, bCapture )
-{
-	if( hElement.addEventListener )
-	{
-		hElement.removeEventListener( sEvent, handler, bCapture )
-		return true
-	}
-	else if( hElement.attachEvent )
-	{
-		return hElement.detachEvent( 'on'+sEvent, handler )
-	}
-	else if( bw.ie4 || bw.ns4 )
-	{
-		eval( 'hElement.on'+sEvent+' = null' )
-	}
-	else
-	{
-		alert('Not implemented yet!')
-	}
-}
-
-
-//Mouse button mapper object
-function MouseButton()
-{
-	if( bw.ns4 )
-	{
-		this.left = 1
-		this.middle = 2
-		this.right = 3
-	}
-	else if( bw.ns5 )
-	{
-		this.left = 0
-		this.middle = 1
-		this.right = 2
-	}
-	else if( bw.ie )
-	{
-		this.left = 1
-		this.middle = 4
-		this.right = 2
-	}
-}
-
-var MB = new MouseButton()
\ No newline at end of file
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/js/modomevent3.js b/src/plugins/wiki/www/themes/default/moacdropdown/js/modomevent3.js
deleted file mode 100644
index 0319853..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/js/modomevent3.js
+++ /dev/null
@@ -1,189 +0,0 @@
-//
-//  This script was created
-//  by Mircho Mirev
-//  mo /mo at momche.net/
-//
-//	:: feel free to use it BUT
-//	:: if you want to use this code PLEASE send me a note
-//	:: and please keep this disclaimer intact
-//
-
-//define the cEvent object
-var cDomEvent = {
-	e 		: null,
-	type	: '',
-	button	: 0,
-	key		: 0,
-	x		: 0,
-	y		: 0,
-	pagex	: 0,
-	pagey	: 0,
-	target	: null,
-	from	: null,
-	to		: null
-}
-
-cDomEvent.init = function( e )
-{
-	if( window.event ) e = window.event
-	this.e = e
-	this.type = e.type
-	this.button = ( e.which ) ? e.which : e.button
-	this.key = ( e.which ) ? e.which : e.keyCode
-	this.target = ( e.srcElement ) ? e.srcElement : e.originalTarget
-	this.currentTarget = ( e.currentTarget ) ? e.currentTarget : e.srcElement
-	this.from = ( e.originalTarget ) ? e.originalTarget : ( e.fromElement ) ? e.fromElement : null
-	this.to  = ( e.currentTarget ) ? e.currentTarget : ( e.toElement ) ? e.toElement : null
-	this.x = ( e.layerX ) ? e.layerX : ( e.offsetX ) ? e.offsetX : null
-	this.y = ( e.layerY ) ? e.layerY : ( e.offsetY ) ? e.offsetY : null
-	this.screenX = e.screenX
-	this.screenY = e.screenY
-	this.pageX = ( e.pageX ) ? e.pageX : e.x + document.body.scrollLeft
-	this.pageY = ( e.pageY ) ? e.pageY : e.y + document.body.scrollTop
-}
-
-cDomEvent.getEvent = function( e )
-{
-	if( window.event ) e = window.event
-	return 	{
-				e: e,
-				type: e.type,
-				button: ( e.which ) ? e.which : e.button,
-				key: ( e.which ) ? e.which : e.keyCode,
-				target: ( e.srcElement ) ? e.srcElement : e.originalTarget,
-				currentTarget: ( e.currentTarget ) ? e.currentTarget : e.srcElement,
-				from: ( e.originalTarget ) ? e.originalTarget : ( e.fromElement ) ? e.fromElement : null,
-				to: ( e.currentTarget ) ? e.currentTarget : ( e.toElement ) ? e.toElement : null,
-				x: ( e.layerX ) ? e.layerX : ( e.offsetX ) ? e.offsetX : null,
-				y: ( e.layerY ) ? e.layerY : ( e.offsetY ) ? e.offsetY : null,
-				screenX: e.screenX,
-				screenY: e.screenY,
-				pageX: ( e.pageX ) ? e.pageX : ( e.clientX + ( document.documentElement.scrollLeft || document.body.scrollLeft ) ),
-				pageY: ( e.pageY ) ? e.pageY : ( e.clientY + ( document.documentElement.scrollTop || document.body.scrollTop ) )
-			}
-}
-
-cDomEvent.cancelEvent = function( e )
-{
-	if( e.preventDefault )
-	{
-		e.preventDefault()
-	}
-	e.returnValue = false
-	e.cancelBubble = true
-	return false
-}
-
-cDomEvent.addEvent = function( hElement, sEvent, handler, bCapture )
-{
-	if( hElement.addEventListener )
-	{
-		hElement.addEventListener( sEvent, handler, bCapture )
-		return true
-	}
-	else if( hElement.attachEvent )
-	{
-		return hElement.attachEvent( 'on'+sEvent, handler )
-	}
-	else if( document.all || hElement.captureEvents )
-	{
-		if( hElement.captureEvents ) eval( 'hElement.captureEvents( Event.'+sEvent.toUpperCase()+' )' )
-		eval( 'hElement.on'+sEvent+' = '+handler )
-	}
-	else
-	{
-		alert('Not implemented yet!')
-	}
-}
-
-cDomEvent.encapsulateEvent = function( hHandler )
-{
-	return function ( hEvent )
-	{
-		hEvent = cDomEvent.getEvent( hEvent )
-		hHandler.call( hEvent.target, hEvent.e )
-	}
-}
-
-cDomEvent.addEvent2 = function( hElement, sEvent, handler, bCapture )
-{
-	if( hElement )
-	{
-		if( hElement.addEventListener )
-		{
-			hElement.addEventListener( sEvent, cDomEvent.encapsulateEvent( handler ), bCapture )
-			return true
-		}
-		else if( hElement.attachEvent )
-		{
-			return hElement.attachEvent( 'on'+sEvent, cDomEvent.encapsulateEvent( handler ) )
-		}
-		else
-		{
-			alert('Not implemented yet!')
-		}
-	}
-	else
-	{
-		//alert( 'wrong' )
-	}
-}
-
-cDomEvent.addCustomEvent2 = function( hElement, sEvent, handler )
-{
-	if( hElement )
-	{
-		hElement[ sEvent ] = handler
-	}
-	else
-	{
-		//alert( 'wrong' )
-	}
-}
-
-cDomEvent.removeEvent = function( hElement, sEvent, handler, bCapture )
-{
-	if( hElement.addEventListener )
-	{
-		hElement.removeEventListener( sEvent, handler, bCapture )
-		return true
-	}
-	else if( hElement.attachEvent )
-	{
-		return hElement.detachEvent( 'on'+sEvent, handler )
-	}
-	else if( document.all || hElement.captureEvents )
-	{
-		eval( 'hElement.on'+sEvent+' = null' )
-	}
-	else
-	{
-		alert('Not implemented yet!')
-	}
-}
-
-
-//Mouse button mapper object
-function MouseButton()
-{
-	if( document.layers )
-	{
-		this.left = 1
-		this.middle = 2
-		this.right = 3
-	}
-	else if( document.all )
-	{
-		this.left = 1
-		this.middle = 4
-		this.right = 2
-	}
-	else //hopefully this is mozilla case
-	{
-		this.left = 0
-		this.middle = 1
-		this.right = 2
-	}
-}
-
-var MB = new MouseButton()
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/js/modomext.js b/src/plugins/wiki/www/themes/default/moacdropdown/js/modomext.js
deleted file mode 100644
index 6e05299..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/js/modomext.js
+++ /dev/null
@@ -1,219 +0,0 @@
-//
-//  This script was created
-//  by Mircho Mirev
-//  mo /mo at momche.net/
-//
-//	:: feel free to use it BUT
-//	:: if you want to use this code PLEASE send me a note
-//	:: and please keep this disclaimer intact
-//
-
-//	This in fact is a simple dom iterator
-//	requires: mobrowser.js
-
-function cDomExtension( hParent, aSelectors, hInitFunction )
-{
-	this.hParent = hParent
-	this.aSelectors = aSelectors
-	this.hInitFunction = hInitFunction
-}
-
-var cDomExtensionManager = 
-{
-	aExtensions : new Array()
-}
-
-cDomExtensionManager.register = function( hDomExtension )
-{
-	cDomExtensionManager.aExtensions.push( hDomExtension )
-}
-
-cDomExtensionManager.initSelector = function( hParent, sSelector, hInitFunction )
-{
-	var hSelectorRegEx
-	var hAttributeRegEx
-	var aSelectorData
-	var aAttributeData
-	var sAttribute 
-
-	hSelectorRegEx = /([a-z0-9_]*)\[?([^\]]*)\]?/i
-	hAttributeRegEx = /([a-z0-9_]*)([\*\^\$]?)(=?)(([a-z0-9_=]*))/i
-
-	if( hSelectorRegEx.test( sSelector ) && !/[@#\.]/.test( sSelector ) )
-	{
-		aSelectorData = hSelectorRegEx.exec( sSelector )
-		if( aSelectorData[ 1 ] != '' )
-		{
-			hGroup  = hParent.getElementsByTagName( aSelectorData[ 1 ].toLowerCase() )
-			for( nI = 0; nI < hGroup.length; nI ++ )
-			{
-				hGroup[ nI ].markExt = true
-			}
-			for( nI = 0; nI < hGroup.length; nI ++ )
-			{
-				if( !hGroup[ nI ].markExt )
-				{
-					continue
-				}
-				else
-				{
-					hGroup[ nI ].markExt = false
-				}
-				if( aSelectorData[ 2 ] == '' )
-				{
-					if( hGroup[ nI ].tagName.toLowerCase() == aSelectorData[ 1 ].toLowerCase()  )
-					{
-						hInitFunction( hGroup[ nI ] )
-					}
-				}
-				else
-				{
-					aAttributeData = hAttributeRegEx.exec( aSelectorData[ 2 ] )
-					if( aAttributeData[ 1 ] == 'class' )
-					{
-						sAttribute = hGroup[ nI ].className
-					}
-					else
-					{
-						sAttribute = hGroup[ nI ].getAttribute( aAttributeData[ 1 ] )
-					}
-					if( sAttribute != null && sAttribute.length > 0 )
-					{
-						if( aAttributeData[ 3 ] == '=' )
-						{
-							if( aAttributeData[ 2 ] == '' )
-							{
-								if( sAttribute == aAttributeData[4] )
-								{
-									hInitFunction( hGroup[ nI ] )
-								}
-							}
-							else
-							{
-								switch( aAttributeData[ 2 ] )
-								{
-									case '^' :	if( sAttribute.indexOf( aAttributeData[ 4 ] ) == 0 )
-												{
-													hInitFunction( hGroup[ nI ] )
-												}
-												break
-									case '$' :	if( sAttribute.lastIndexOf( aAttributeData[ 4 ] ) == sAttribute.length - aAttributeData[ 4 ].length )
-												{
-													hInitFunction( hGroup[ nI ] )
-												}
-												break
-									case '*' :	if( sAttribute.indexOf( aAttributeData[ 4 ] ) >= 0 )
-												{
-													hInitFunction( hGroup[ nI ] )
-												}
-												break
-								}
-							}
-						}
-						else
-						{
-							hInitFunction( hGroup[ nI ] )
-						}
-					}
-				}
-			}
-			//we have the new implementation - css3 style selectors, so return
-			return
-		}
-	}
-
-
-	hSelectorRegEx = /([a-z0-9_]*)([\.#@]?)([a-z0-9_=~]*)/i
-	hAttributeRegEx = /([a-z0-9_]*)([=~])?([a-z0-9_]*)/i
-	aSelectorData = hSelectorRegEx.exec( sSelector )
-	
-	if( aSelectorData[ 1 ] != '' )
-	{
-		var hGroup  = hParent.getElementsByTagName( aSelectorData[ 1 ] )
-		for( nI = 0; nI < hGroup.length; nI ++ )
-		{
-			hGroup[ nI ].markExt = true
-		}
-		for( nI = 0; nI < hGroup.length; nI ++ )
-		{
-			if( !hGroup[ nI ].markExt )
-			{
-				continue
-			}
-			else
-			{
-				hGroup[ nI ].markExt = false
-			}
-			if( aSelectorData[ 2 ] != '' )
-			{
-				switch( aSelectorData[ 2 ] )
-				{
-					case '.' : 	if( hGroup[ nI ].className == aSelectorData[ 3 ] )
-							{
-								hInitFunction( hGroup[ nI ] )
-							}
-							break
-								
-					case '#' : 	if( hGroup[ nI ].id == aSelectorData[ 3 ] )
-							{
-								hInitFunction( hGroup[ nI ] )
-							}
-							break
-								
-					case '@' : 	aAttributeData = hAttributeRegEx.exec( aSelectorData[ 3 ] )
-							sAttribute = hGroup[ nI ].getAttribute( aAttributeData[ 1 ] )
-							if(  sAttribute != null && sAttribute.length > 0  )
-							{					
-								if( aAttributeData[ 3 ] != '' )
-								{
-									if( aAttributeData[ 2 ] == '=' )
-									{
-										if( sAttribute == aAttributeData[ 3 ] )
-										{
-											hInitFunction( hGroup[ nI ] )
-										}
-									}
-									else /* the case is like ~ */
-									{
-										if( sAttribute.indexOf( aAttributeData[ 3 ] ) >= 0 )
-										{
-											hInitFunction( hGroup[ nI ] )
-										}
-									}
-								}
-								else
-								{
-									hInitFunction( hGroup[ nI ] )
-								}
-							}
-							break
-				}
-			}
-		}
-	}
-
-}
-
-cDomExtensionManager.initialize = function()
-{
-	var hDomExtension = null
-	var aSelectors
-	
-	for( var nKey in cDomExtensionManager.aExtensions )
-	{
-		aSelectors = cDomExtensionManager.aExtensions[ nKey ].aSelectors
-		for( var nKey2 in aSelectors )
-		{
-			cDomExtensionManager.initSelector( cDomExtensionManager.aExtensions[ nKey ].hParent, aSelectors[ nKey2 ], cDomExtensionManager.aExtensions[ nKey ].hInitFunction )
-		}
-	}
-}
-
-if( window.addEventListener )
-{
-	window.addEventListener( 'load', cDomExtensionManager.initialize, false )
-}
-else if( window.attachEvent )
-{
-	window.attachEvent( 'onload', cDomExtensionManager.initialize )
-}
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/js/modomt.js b/src/plugins/wiki/www/themes/default/moacdropdown/js/modomt.js
deleted file mode 100644
index 9ee593b..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/js/modomt.js
+++ /dev/null
@@ -1,259 +0,0 @@
-//
-//  This script was created
-//  by Mircho Mirev
-//  mo /mo at momche.net/
-//
-//	:: feel free to use it BUT
-//	:: if you want to use this code PLEASE send me a note
-//	:: and please keep this disclaimer intact
-//
-
-if ( document.ELEMENT_NODE == null )
-{
-	document.ELEMENT_NODE = 1
-	document.TEXT_NODE = 3
-}
-
-
-function getSubNodeByName( hNode, sNodeName )
-{
-	if( hNode != null )
-	{
-		var nNc = 0
-		var nC	= 0
-		var hNodeChildren = hNode.childNodes
-		var hCNode = null
-		while( nC < hNodeChildren.length )
-		{
-			hCNode = hNodeChildren.item( nC++ )
-			if( ( hCNode.nodeType == 1 ) && ( hCNode.nodeName.toLowerCase() == sNodeName ) )
-			{
-				return hCNode
-			}
-		}
-	}
-	return null
-}
-
-function getPrevNodeSibling( hNode )
-{
-	if( hNode != null )
-	{
-		do {
-			hNode = hNode.previousSibling
-		} while( hNode != null && hNode.nodeType != 1 )
-		return hNode
-	}
-}
-
-function getNextNodeSibling( hNode )
-{
-	if( hNode != null )
-	{
-		do {
-			hNode = hNode.nextSibling
-		} while( hNode != null && hNode.nodeType != 1 )
-		return hNode
-	}
-}
-
-function getLastSubNodeByName( hNode, sNodeName )
-{
-	if( hNode != null )
-	{
-		var nNc = 0
-		var nC	= 0
-		var hNodeChildren = hNode.childNodes
-		var hCNode = null
-		var nLength = hNodeChildren.length - 1
-		while( nLength >=0  )
-		{
-			hCNode = hNodeChildren.item( nLength )
-			if( ( hCNode.nodeType == 1 ) && ( hCNode.nodeName.toLowerCase() == sNodeName ) )
-			{
-				return hCNode
-			}
-			nLength--
-		}
-	}
-	return null
-}
-
-function getSubNodeByProperty( hNode, sProperty, sPropValue )
-{
-	if( hNode != null )
-	{
-		var nNc = 0
-		var nC	= 0
-		var hNodeChildren = hNode.childNodes
-		var hCNode = null
-		var sAttribute
-		var hProp 
-		sPropValue = sPropValue.toLowerCase()
-		while( nC < hNodeChildren.length )
-		{
-			hCNode = hNodeChildren.item( nC++ )
-			if( hCNode.nodeType == document.ELEMENT_NODE )
-			{
-				hProp = eval( 'hCNode.'+sProperty )
-				if( typeof( sPropValue ) != 'undefined' )
-				{
-					if( hProp.toLowerCase() == sPropValue )
-					{
-						return hCNode
-					}
-				}
-				else
-				{
-					return hCNode
-				}
-			}
-			nNc++
-		}
-	}
-	return null
-}
-
-function findAttribute( hNode, sAtt )
-{
-	sAtt = sAtt.toLowerCase()
-	for( var nI = 0; nI < hNode.attributes.length; nI++ )
-	{
-		if( hNode.attributes.item( nI ).nodeName.toLowerCase() == sAtt )
-		{
-			return hNode.attributes.item( nI ).nodeValue
-		}
-	}
-	return null
-}
-
-function getSubNodeByAttribute( hNode, sAtt, sAttValue )
-{
-	if( hNode != null )
-	{
-		var nNc = 0
-		var nC	= 0
-		var hNodeChildren = hNode.childNodes
-		var hCNode = null
-		var sAttribute
-		sAttValue = sAttValue.toLowerCase()
-		while( nC < hNodeChildren.length )
-		{
-			hCNode = hNodeChildren.item( nC++ )
-			if( hCNode.nodeType == document.ELEMENT_NODE )
-			{
-				sAttribute = hCNode.getAttribute( sAtt )
-				if( sAttribute && sAttribute.toLowerCase() == sAttValue )
-				return hCNode
-			}
-			nNc++
-		}
-	}
-	return null
-}
-
-function getLastSubNodeByAttribute( hNode, sAtt, sAttValue )
-{
-	if( hNode != null )
-	{
-		var nNc = 0
-		var nC	= 0
-		var hNodeChildren = hNode.childNodes
-		var hCNode = null
-		var nLength = hNodeChildren.length - 1
-		while( nLength >= 0 )
-		{
-			hCNode = hNodeChildren.item( nLength )
-			if( hCNode.nodeType == document.ELEMENT_NODE )
-			{
-				sAttribute = hCNode.getAttribute( sAtt )
-				if( sAttribute && sAttribute.toLowerCase() == sAttValue )
-				return hCNode
-			}
-			nLength--
-		}
-	}
-	return null
-}
-
-function getParentByTagName( hNode, sParentTagName )
-{
-	while( ( hNode.tagName ) && !( /(body|html)/i.test( hNode.tagName ) ) )
-	{
-		if( hNode.tagName == sParentTagName )
-		{
-			return hNode
-		}
-		hNode = hNode.parentNode
-	}
-	return null
-}
-
-function getParentByAttribute( hNode, sAtt, sAttValue )
-{
-	while( ( hNode.tagName ) && !( /(body|html)/i.test( hNode.tagName ) ) )
-	{
-		//opera strangely returns non null result sometimes
-		var sAttr = hNode.getAttribute( sAtt )
-		if( sAttr != null && sAttr.toString().length > 0 )
-		{	
-			if( sAttValue !== null )
-			{
-				if( sAttr == sAttValue )
-				{
-					return hNode
-				}
-			}
-			else
-			{
-				return hNode
-			}
-		}
-		hNode = hNode.parentNode
-	}
-	return null
-}
-
-function getParentByProperty( hNode, sProperty, sPropValue )
-{
-	while( ( hNode.tagName ) && !( /(body|html)/i.test( hNode.tagName ) ) )
-	{
-		//opera strangely returns non null result sometimes
-		var hProp = eval( 'hNode.'+sProperty )
-		if( hProp != null && hProp.toString().length > 0 )
-		{	
-			if( sPropValue !== null )
-			{
-				if( hProp == sPropValue )
-				{
-					return hNode
-				}
-			}
-			else
-			{
-				return hNode
-			}
-		}
-		hNode = hNode.parentNode
-	}
-	return null
-}
-
-
-function getNodeText( hNode )
-{
-	if( hNode == null )
-	{
-		return ''
-	}
-	var sRes
-	if( hNode.hasChildNodes() )
-	{
-		sRes = hNode.childNodes.item(0).nodeValue
-	}
-	else
-	{
-		sRes = hNode.text
-	}
-	return sRes
-}
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/js/xmlextras.js b/src/plugins/wiki/www/themes/default/moacdropdown/js/xmlextras.js
deleted file mode 100644
index fac3f74..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/js/xmlextras.js
+++ /dev/null
@@ -1,149 +0,0 @@
-//<script>
-//////////////////
-// Helper Stuff //
-//////////////////
-
-// used to find the Automation server name
-function getDomDocumentPrefix() {
-	if (getDomDocumentPrefix.prefix)
-		return getDomDocumentPrefix.prefix;
-	
-	var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
-	var o;
-	for (var i = 0; i < prefixes.length; i++) {
-		try {
-			// try to create the objects
-			o = new ActiveXObject(prefixes[i] + ".DomDocument");
-			return getDomDocumentPrefix.prefix = prefixes[i];
-		}
-		catch (ex) {};
-	}
-	
-	throw new Error("Could not find an installed XML parser");
-}
-
-function getXmlHttpPrefix() {
-	if (getXmlHttpPrefix.prefix)
-		return getXmlHttpPrefix.prefix;
-	
-	var prefixes = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
-	var o;
-	for (var i = 0; i < prefixes.length; i++) {
-		try {
-			// try to create the objects
-			o = new ActiveXObject(prefixes[i] + ".XmlHttp");
-			return getXmlHttpPrefix.prefix = prefixes[i];
-		}
-		catch (ex) {};
-	}
-	
-	throw new Error("Could not find an installed XML parser");
-}
-
-//////////////////////////
-// Start the Real stuff //
-//////////////////////////
-
-
-// XmlHttp factory
-function XmlHttp() {}
-
-XmlHttp.create = function () {
-	try {
-		if (window.XMLHttpRequest) {
-			var req = new XMLHttpRequest();
-			
-			// some versions of Moz do not support the readyState property
-			// and the onreadystate event so we patch it!
-			if (req.readyState == null) {
-				req.readyState = 1;
-				req.addEventListener("load", function () {
-					req.readyState = 4;
-					if (typeof req.onreadystatechange == "function")
-						req.onreadystatechange();
-				}, false);
-			}
-			
-			return req;
-		}
-		if (window.ActiveXObject) {
-			return new ActiveXObject(getXmlHttpPrefix() + ".XmlHttp");
-		}
-	}
-	catch (ex) {}
-	// fell through
-	throw new Error("Your browser does not support XmlHttp objects");
-};
-
-// XmlDocument factory
-function XmlDocument() {}
-
-XmlDocument.create = function () {
-	try {
-		// DOM2
-		if (document.implementation && document.implementation.createDocument) {
-			var doc = document.implementation.createDocument("", "", null);
-			
-			// some versions of Moz do not support the readyState property
-			// and the onreadystate event so we patch it!
-			if (doc.readyState == null) {
-				doc.readyState = 1;
-				doc.addEventListener("load", function () {
-					doc.readyState = 4;
-					if (typeof doc.onreadystatechange == "function")
-						doc.onreadystatechange();
-				}, false);
-			}
-			
-			return doc;
-		}
-		if (window.ActiveXObject)
-			return new ActiveXObject(getDomDocumentPrefix() + ".DomDocument");
-	}
-	catch (ex) {}
-	throw new Error("Your browser does not support XmlDocument objects");
-};
-
-// Create the loadXML method and xml getter for Mozilla
-if (window.DOMParser &&
-	window.XMLSerializer &&
-	window.Node && Node.prototype && Node.prototype.__defineGetter__) {
-
-	// XMLDocument did not extend the Document interface in some versions
-	// of Mozilla. Extend both!
-	//XMLDocument.prototype.loadXML = 
-	Document.prototype.loadXML = function (s) {
-		
-		// parse the string to a new doc	
-		var doc2 = (new DOMParser()).parseFromString(s, "text/xml");
-		
-		// remove all initial children
-		while (this.hasChildNodes())
-			this.removeChild(this.lastChild);
-			
-		// insert and import nodes
-		for (var i = 0; i < doc2.childNodes.length; i++) {
-			this.appendChild(this.importNode(doc2.childNodes[i], true));
-		}
-	};
-	
-	
-	/*
-	 * xml getter
-	 *
-	 * This serializes the DOM tree to an XML String
-	 *
-	 * Usage: var sXml = oNode.xml
-	 *
-	 */
-	// XMLDocument did not extend the Document interface in some versions
-	// of Mozilla. Extend both!
-	/*
-	XMLDocument.prototype.__defineGetter__("xml", function () {
-		return (new XMLSerializer()).serializeToString(this);
-	});
-	*/
-	Document.prototype.__defineGetter__("xml", function () {
-		return (new XMLSerializer()).serializeToString(this);
-	});
-}
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/license.txt b/src/plugins/wiki/www/themes/default/moacdropdown/license.txt
deleted file mode 100644
index 7653c68..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/license.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-Copyright (c) 2004-2005, Mircho Mirev
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-    * Neither the name of Mircho Mirev nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/src/plugins/wiki/www/themes/default/moacdropdown/xmlrpc.txt b/src/plugins/wiki/www/themes/default/moacdropdown/xmlrpc.txt
deleted file mode 100755
index 2911f86..0000000
--- a/src/plugins/wiki/www/themes/default/moacdropdown/xmlrpc.txt
+++ /dev/null
@@ -1,58 +0,0 @@
-How to encode the xmlrpc request in acdropdown?
- 
-short form (local server):
-  "xmlrpc:wiki.titleSearch [S] 4"
-
-long form (remote server):
-  "xmlrpc:http://localhost/wiki/?wiki.titleSearch [S] 4"
-
-encode the methodname as optional query_arg and the args space separated
-args can only be strings
-
-
-The xmlrpc request looks like:
-
-POST url
-
-<?xml version='1.0' encoding="iso-8859-1" ?>
-<methodCall>
-<methodName>wiki.titleSearch</methodName>
-<params>
- <param>
-  <value>
-   <string>^Page</string>
-  </value>
- </param>
- <param>
-  <value>
-    <string>4</string>
-  </value>
- </param>
-</params>
-</methodCall>
-
-
-The xmlrpc response XML looks like this:
-
-Content-Type: application/xml
-
-<?xml version='1.0' encoding="iso-8859-1" ?>
-<methodResponse>
-<params>
- <param>
-  <value>
-   <array>
-    <data>
-     <value>
-      <string>Page 1</string>
-     </value>
-     <value>
-      <string>Page 2</string>
-     </value>
-    </data>
-   </array>
-  </value>
- </param>
-</params>
-</methodResponse>
-
diff --git a/src/plugins/wiki/www/themes/default/sortable.js b/src/plugins/wiki/www/themes/default/sortable.js
deleted file mode 100644
index c3badb0..0000000
--- a/src/plugins/wiki/www/themes/default/sortable.js
+++ /dev/null
@@ -1,326 +0,0 @@
-/*
-Table sorting script  by Joost de Valk, check it out at http://www.joostdevalk.nl/code/sortable-table/.
-Based on a script from http://www.kryogenix.org/code/browser/sorttable/.
-Distributed under the MIT license: http://www.kryogenix.org/code/browser/licence.html .
-
-Copyright (c) 1997-2007 Stuart Langridge, Joost de Valk.
-
-Version 1.5.7
-*/
-
-/* You can change these values */
-var image_path = "/images/";
-var image_up = "sort_up.gif";
-var image_down = "sort_down.gif";
-var image_none = "sort_none.gif";
-var europeandate = true;
-var alternate_row_colors = true;
-
-/* Don't change anything below this unless you know what you're doing */
-addEvent(window, "load", sortables_init);
-
-var SORT_COLUMN_INDEX;
-var thead = false;
-
-function sortables_init() {
-	// Find all tables with class sortable and make them sortable
-	if (!document.getElementsByTagName) return;
-	tbls = document.getElementsByTagName("table");
-	for (ti=0;ti<tbls.length;ti++) {
-		thisTbl = tbls[ti];
-		if (((' '+thisTbl.className+' ').indexOf("sortable") != -1) && (thisTbl.id)) {
-			ts_makeSortable(thisTbl);
-		}
-	}
-}
-
-function ts_makeSortable(t) {
-	if (t.rows && t.rows.length > 0) {
-		if (t.tHead && t.tHead.rows.length > 0) {
-			var firstRow = t.tHead.rows[t.tHead.rows.length-1];
-			thead = true;
-		} else {
-			var firstRow = t.rows[0];
-		}
-	}
-	if (!firstRow) return;
-	
-	// We have a first row: assume it's the header, and make its contents clickable links
-	for (var i=0;i<firstRow.cells.length;i++) {
-		var cell = firstRow.cells[i];
-		var txt = ts_getInnerText(cell);
-		if (cell.className != "unsortable" && cell.className.indexOf("unsortable") == -1) {
-			cell.innerHTML = '<a href="#" class="sortheader" onclick="ts_resortTable(this, '+i+');return false;">'+txt+'<span class="sortarrow">  <img src="'+ image_path + image_none + '" alt="↓"/></span></a>';
-		}
-	}
-	if (alternate_row_colors) {
-		alternate(t);
-	}
-}
-
-function ts_getInnerText(el) {
-	if (typeof el == "string") return el;
-	if (typeof el == "undefined") { return el };
-	if (el.innerText) return el.innerText;	//Not needed but it is faster
-	var str = "";
-	
-	var cs = el.childNodes;
-	var l = cs.length;
-	for (var i = 0; i < l; i++) {
-		switch (cs[i].nodeType) {
-			case 1: //ELEMENT_NODE
-				str += ts_getInnerText(cs[i]);
-				break;
-			case 3:	//TEXT_NODE
-				str += cs[i].nodeValue;
-				break;
-		}
-	}
-	return str;
-}
-
-function ts_resortTable(lnk, clid) {
-	var span;
-	for (var ci=0;ci<lnk.childNodes.length;ci++) {
-		if (lnk.childNodes[ci].tagName && lnk.childNodes[ci].tagName.toLowerCase() == 'span') span = lnk.childNodes[ci];
-	}
-	var spantext = ts_getInnerText(span);
-	var td = lnk.parentNode;
-	var column = clid || td.cellIndex;
-	var t = getParent(td,'TABLE');
-	// Work out a type for the column
-	if (t.rows.length <= 1) return;
-	var itm = "";
-	var i = 0;
-	while (itm == "" && i < t.tBodies[0].rows.length) {
-		var itm = ts_getInnerText(t.tBodies[0].rows[i].cells[column]);
-		itm = trim(itm);
-		if (itm.substr(0,4) == "<!--" || itm.length == 0) {
-			itm = "";
-		}
-		i++;
-	}
-	if (itm == "") return; 
-	sortfn = ts_sort_caseinsensitive;
-	if (itm.match(/^\d\d[\/\.-][a-zA-z][a-zA-Z][a-zA-Z][\/\.-]\d\d\d\d$/)) sortfn = ts_sort_date;
-	if (itm.match(/^\d\d[\/\.-]\d\d[\/\.-]\d\d\d{2}?$/)) sortfn = ts_sort_date;
-	if (itm.match(/^-?[£$€Û¢´]\d/)) sortfn = ts_sort_numeric;
-	// ape: added to provide numeric sort on size for the docs tools.
-	if (itm.match(/^\d+ *(B|KB|MB)$/)) sortfn = ts_sort_numeric;
-	if (itm.match(/^-?(\d+[,\.]?)+(E[-+][\d]+)?%?$/)) sortfn = ts_sort_numeric;
-	SORT_COLUMN_INDEX = column;
-	var firstRow = new Array();
-	var newRows = new Array();
-	for (k=0;k<t.tBodies.length;k++) {
-		for (i=0;i<t.tBodies[k].rows[0].length;i++) { 
-			firstRow[i] = t.tBodies[k].rows[0][i]; 
-		}
-	}
-	for (k=0;k<t.tBodies.length;k++) {
-		if (!thead) {
-			// Skip the first row
-			for (j=1;j<t.tBodies[k].rows.length;j++) { 
-				newRows[j-1] = t.tBodies[k].rows[j];
-			}
-		} else {
-			// Do NOT skip the first row
-			for (j=0;j<t.tBodies[k].rows.length;j++) { 
-				newRows[j] = t.tBodies[k].rows[j];
-			}
-		}
-	}
-	newRows.sort(sortfn);
-	if (span.getAttribute("sortdir") == 'down') {
-			ARROW = '  <img src="'+ image_path + image_down + '" alt="↓"/>';
-			newRows.reverse();
-			span.setAttribute('sortdir','up');
-	} else {
-			ARROW = '  <img src="'+ image_path + image_up + '" alt="↑"/>';
-			span.setAttribute('sortdir','down');
-	} 
-    // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
-    // don't do sortbottom rows
-    for (i=0; i<newRows.length; i++) { 
-		if (!newRows[i].className || (newRows[i].className && (newRows[i].className.indexOf('sortbottom') == -1))) {
-			t.tBodies[0].appendChild(newRows[i]);
-		}
-	}
-    // do sortbottom rows only
-    for (i=0; i<newRows.length; i++) {
-		if (newRows[i].className && (newRows[i].className.indexOf('sortbottom') != -1)) 
-			t.tBodies[0].appendChild(newRows[i]);
-	}
-	// Delete any other arrows there may be showing
-	var allspans = document.getElementsByTagName("span");
-	for (var ci=0;ci<allspans.length;ci++) {
-		if (allspans[ci].className == 'sortarrow') {
-			if (getParent(allspans[ci],"table") == getParent(lnk,"table")) { // in the same table as us?
-				allspans[ci].innerHTML = '  <img src="'+ image_path + image_none + '" alt="↓"/>';
-			}
-		}
-	}		
-	span.innerHTML = ARROW;
-	alternate(t);
-}
-
-function getParent(el, pTagName) {
-	if (el == null) {
-		return null;
-	} else if (el.nodeType == 1 && el.tagName.toLowerCase() == pTagName.toLowerCase()) {
-		return el;
-	} else {
-		return getParent(el.parentNode, pTagName);
-	}
-}
-
-function sort_date(date) {	
-	// y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX
-	dt = "00000000";
-	if (date.length == 11) {
-		mtstr = date.substr(3,3);
-		mtstr = mtstr.toLowerCase();
-		switch(mtstr) {
-			case "jan": var mt = "01"; break;
-			case "feb": var mt = "02"; break;
-			case "mar": var mt = "03"; break;
-			case "apr": var mt = "04"; break;
-			case "may": var mt = "05"; break;
-			case "jun": var mt = "06"; break;
-			case "jul": var mt = "07"; break;
-			case "aug": var mt = "08"; break;
-			case "sep": var mt = "09"; break;
-			case "oct": var mt = "10"; break;
-			case "nov": var mt = "11"; break;
-			case "dec": var mt = "12"; break;
-			// default: var mt = "00";
-		}
-		dt = date.substr(7,4)+mt+date.substr(0,2);
-		return dt;
-	} else if (date.length == 10) {
-		if (europeandate == false) {
-			dt = date.substr(6,4)+date.substr(0,2)+date.substr(3,2);
-			return dt;
-		} else {
-			dt = date.substr(6,4)+date.substr(3,2)+date.substr(0,2);
-			return dt;
-		}
-	} else if (date.length == 8) {
-		yr = date.substr(6,2);
-		if (parseInt(yr) < 50) { 
-			yr = '20'+yr; 
-		} else { 
-			yr = '19'+yr; 
-		}
-		if (europeandate == true) {
-			dt = yr+date.substr(3,2)+date.substr(0,2);
-			return dt;
-		} else {
-			dt = yr+date.substr(0,2)+date.substr(3,2);
-			return dt;
-		}
-	}
-	return dt;
-}
-
-function ts_sort_date(a,b) {
-	dt1 = sort_date(ts_getInnerText(a.cells[SORT_COLUMN_INDEX]));
-	dt2 = sort_date(ts_getInnerText(b.cells[SORT_COLUMN_INDEX]));
-	
-	if (dt1==dt2) {
-		return 0;
-	}
-	if (dt1<dt2) { 
-		return -1;
-	}
-	return 1;
-}
-function ts_sort_numeric(a,b) {
-	var aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
-	aa = clean_num(aa);
-	var bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
-	bb = clean_num(bb);
-	return compare_numeric(aa,bb);
-}
-function compare_numeric(a,b) {
-  var aa = parseFloat(a);
-  aa = (isNaN(aa) ? 0 : aa);
-  var bb = parseFloat(b);
-  bb = (isNaN(bb) ? 0 : bb);
-  return aa - bb;
-}
-function ts_sort_caseinsensitive(a,b) {
-	var aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]).toLowerCase();
-	var bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]).toLowerCase();
-	if (aa==bb) {
-		return 0;
-	}
-	if (aa<bb) {
-		return -1;
-	}
-	return 1;
-}
-function ts_sort_default(a,b) {
-	var aa = ts_getInnerText(a.cells[SORT_COLUMN_INDEX]);
-	var bb = ts_getInnerText(b.cells[SORT_COLUMN_INDEX]);
-	if (aa==bb) {
-		return 0;
-	}
-	if (aa<bb) {
-		return -1;
-	}
-	return 1;
-}
-function addEvent(elm, evType, fn, useCapture)
-// addEvent and removeEvent
-// cross-browser event handling for IE5+,	NS6 and Mozilla
-// By Scott Andrew
-{
-	if (elm.addEventListener){
-		elm.addEventListener(evType, fn, useCapture);
-		return true;
-	} else if (elm.attachEvent){
-		var r = elm.attachEvent("on"+evType, fn);
-		return r;
-	} else {
-		alert("Handler could not be removed");
-		return false;
-	}
-}
-function clean_num(str) {
-	str = str.replace(new RegExp(/[^-?0-9.]/g),"");
-	return str;
-}
-function trim(s) {
-	return s.replace(/^\s+|\s+$/g, "");
-}
-function alternate(table) {
-	// Take object table and get all it's tbodies.
-	var tableBodies = table.getElementsByTagName("tbody");
-	// Loop through these tbodies
-	for (var i = 0; i < tableBodies.length; i++) {
-		// Take the tbody, and get all it's rows
-		var tableRows = tableBodies[i].getElementsByTagName("tr");
-		// Loop through these rows
-		// Start at 1 because we want to leave the heading row untouched
-		for (var j = 0; j < tableRows.length; j++) {
-			// Check if j is even, and apply classes for both possible results
-			if ( (j % 2) == 0  ) {
-				if ( !(tableRows[j].className.indexOf('odd') == -1) ) {
-					tableRows[j].className = tableRows[j].className.replace('odd', 'even');
-				} else {
-					if ( tableRows[j].className.indexOf('even') == -1 ) {
-						tableRows[j].className += " even";
-					}
-				}
-			} else {
-				if ( !(tableRows[j].className.indexOf('even') == -1) ) {
-					tableRows[j].className = tableRows[j].className.replace('even', 'odd');
-				} else {
-					if ( tableRows[j].className.indexOf('odd') == -1 ) {
-						tableRows[j].className += " odd";
-					}
-				}
-			} 
-		}
-	}
-}
diff --git a/src/plugins/wiki/www/themes/default/templates/frameset.tmpl b/src/plugins/wiki/www/themes/default/templates/frameset.tmpl
deleted file mode 100644
index 985f1cc..0000000
--- a/src/plugins/wiki/www/themes/default/templates/frameset.tmpl
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-/*
- * This template is used for the FrameInclude plugin.
- */
-
-$topurl = $request->getURLtoSelf(array('frame' => 'header'));
-$boturl = $request->getURLtoSelf(array('frame' => 'footer'));
-
-printf("<?xml version=\"1.0\" encoding=\"%s\"?>\n", CHARSET);
-?>
-<!DOCTYPE html   PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
-  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<?php echo Template('head') ?>
-
-<frameset rows="<?php echo $ROWS?>">
-  <frame name="header" src="<?php echo $topurl?>" <?php echo $FRAMEARGS ?> />
-  <?php echo $CONTENT_FRAME ?>
-  <frame name="footer" src="<?php echo $boturl?>" <?php echo $FRAMEARGS ?> />
-  <noframes><?php echo Template('body') ?></noframes>
-</frameset>
-</html>
diff --git a/src/plugins/wiki/www/themes/fusionforge/buttons/asc_order.png b/src/plugins/wiki/www/themes/fusionforge/buttons/asc_order.png
deleted file mode 100644
index 718a12a..0000000
Binary files a/src/plugins/wiki/www/themes/fusionforge/buttons/asc_order.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/fusionforge/buttons/desc_order.png b/src/plugins/wiki/www/themes/fusionforge/buttons/desc_order.png
deleted file mode 100644
index 0812a2e..0000000
Binary files a/src/plugins/wiki/www/themes/fusionforge/buttons/desc_order.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/fusionforge/buttons/no_order.png b/src/plugins/wiki/www/themes/fusionforge/buttons/no_order.png
deleted file mode 100644
index 204dcf3..0000000
Binary files a/src/plugins/wiki/www/themes/fusionforge/buttons/no_order.png and /dev/null differ
diff --git a/src/plugins/wiki/www/themes/fusionforge/images/error.png b/src/plugins/wiki/www/themes/fusionforge/images/error.png
new file mode 100644
index 0000000..296415e
Binary files /dev/null and b/src/plugins/wiki/www/themes/fusionforge/images/error.png differ
diff --git a/src/plugins/wiki/www/themes/fusionforge/images/info.png b/src/plugins/wiki/www/themes/fusionforge/images/info.png
new file mode 100644
index 0000000..83de654
Binary files /dev/null and b/src/plugins/wiki/www/themes/fusionforge/images/info.png differ
diff --git a/src/plugins/wiki/www/themes/fusionforge/images/success.png b/src/plugins/wiki/www/themes/fusionforge/images/success.png
new file mode 100644
index 0000000..743ef89
Binary files /dev/null and b/src/plugins/wiki/www/themes/fusionforge/images/success.png differ
diff --git a/src/plugins/wiki/www/themes/fusionforge/images/warning.png b/src/plugins/wiki/www/themes/fusionforge/images/warning.png
new file mode 100644
index 0000000..1c6b8eb
Binary files /dev/null and b/src/plugins/wiki/www/themes/fusionforge/images/warning.png differ
diff --git a/src/plugins/wiki/www/themes/fusionforge/pgsrc/FullTextSearch b/src/plugins/wiki/www/themes/fusionforge/pgsrc/FullTextSearch
new file mode 100644
index 0000000..e3c3276
--- /dev/null
+++ b/src/plugins/wiki/www/themes/fusionforge/pgsrc/FullTextSearch
@@ -0,0 +1,31 @@
+Date: Wed,  4 Mar 2015 14:19:56 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=FullTextSearch;
+  flags=PAGE_LOCKED;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+<<FullTextSearch>>
+
+----
+
+Additional Searches:
+
+<<WikiFormRich action=TitleSearch method=GET nobr=1 class=wikiaction editbox[] name=s text="" submit[] >>
+
+<<WikiFormRich action=FullTextSearch method=GET nobr=1 class=wikiaction editbox[] name=s text="" submit[] >>
+
+<<WikiFormRich action=FuzzyPages method=GET nobr=1 class=wikiaction editbox[] name=s text="" submit[] >>
+----
+
+Create or edit page:
+
+<?plugin-form CreatePage ?>
+
+----
+
+<<IncludePage page=FindPage quiet=1 section=Tips sectionhead=1>>
+
+----
+[[CategoryActionPage]]
diff --git a/src/plugins/wiki/www/themes/fusionforge/pgsrc/TitleSearch b/src/plugins/wiki/www/themes/fusionforge/pgsrc/TitleSearch
new file mode 100644
index 0000000..3716516
--- /dev/null
+++ b/src/plugins/wiki/www/themes/fusionforge/pgsrc/TitleSearch
@@ -0,0 +1,26 @@
+Date: Wed,  4 Mar 2015 14:19:56 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.5.3)
+Content-Type: application/x-phpwiki;
+  pagename=TitleSearch;
+  flags=PAGE_LOCKED%2CEXTERNAL_PAGE;
+  charset=UTF-8
+Content-Transfer-Encoding: binary
+
+<<TitleSearch>>
+
+----
+
+Additional Searches:
+
+<<WikiFormRich action=TitleSearch method=GET nobr=1 class=wikiaction editbox[] name=s text="" submit[] >>
+
+<<WikiFormRich action=FullTextSearch method=GET nobr=1 class=wikiaction editbox[] name=s text="" submit[] >>
+
+<<WikiFormRich action=FuzzyPages method=GET nobr=1 class=wikiaction editbox[] name=s text="" submit[] >>
+
+----
+
+<<IncludePage page=FindPage quiet=1 section=Tips sectionhead=1>>
+
+----
+[[CategoryActionPage]]

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/wiki/www/Makefile                      |   16 +
 src/plugins/wiki/www/config/phpwiki.spec           |  132 +
 src/plugins/wiki/www/doc/README.fpdf               |    4 -
 src/plugins/wiki/www/lib/AccessLog.php             |  766 --
 src/plugins/wiki/www/lib/WikiDB/backend/cvs.php    | 1028 ---
 src/plugins/wiki/www/lib/WikiDB/cvs.php            |   27 -
 src/plugins/wiki/www/lib/WikiUser/EMailConfirm.php |   67 -
 src/plugins/wiki/www/lib/WikiUserNew.php           | 2291 ------
 .../WysiwygEdit/{FCKeditor.php => CKeditor.php}    |    0
 src/plugins/wiki/www/lib/font/chinese.php          |  464 --
 src/plugins/wiki/www/lib/font/courier.php          |    8 -
 src/plugins/wiki/www/lib/font/courierb.php         |    8 -
 src/plugins/wiki/www/lib/font/courierbi.php        |    8 -
 src/plugins/wiki/www/lib/font/courieri.php         |    8 -
 src/plugins/wiki/www/lib/font/helvetica.php        |   19 -
 src/plugins/wiki/www/lib/font/helveticab.php       |   19 -
 src/plugins/wiki/www/lib/font/helveticabi.php      |   19 -
 src/plugins/wiki/www/lib/font/helveticai.php       |   19 -
 src/plugins/wiki/www/lib/font/japanese.php         |  433 --
 src/plugins/wiki/www/lib/font/symbol.php           |   19 -
 src/plugins/wiki/www/lib/font/times.php            |   19 -
 src/plugins/wiki/www/lib/font/timesb.php           |   19 -
 src/plugins/wiki/www/lib/font/timesbi.php          |   19 -
 src/plugins/wiki/www/lib/font/timesi.php           |   19 -
 src/plugins/wiki/www/lib/font/zapfdingbats.php     |   19 -
 src/plugins/wiki/www/lib/fpdf.php                  | 1804 -----
 src/plugins/wiki/www/lib/gif.php                   |  987 ---
 .../wiki/www/lib/{ziplib.php => mimelib.php}       |    0
 src/plugins/wiki/www/lib/nusoap/README.txt         |   96 -
 src/plugins/wiki/www/lib/nusoap/lgpl.txt           |  502 --
 src/plugins/wiki/www/lib/nusoap/nusoap.php         | 8148 --------------------
 src/plugins/wiki/www/lib/pear/DB/Pager.php         |  253 -
 src/plugins/wiki/www/lib/pear/DB/ldap.php          |  912 ---
 src/plugins/wiki/www/lib/pear/LICENSE              |   27 +
 src/plugins/wiki/www/lib/plugin/FrameInclude.php   |  153 -
 .../wiki/www/lib/plugin/SyntaxHighlighter.php      |   83 +
 src/plugins/wiki/www/lib/plugin/Video.php          |  157 +
 ...AdministrationDePhpWiki%2FD%C3%A9finirAclSimple |   23 +
 .../fr/pgsrc/AdministrationDePhpWiki%2FPurger      |   12 +
 .../pgsrc/AdministrationDePhpWiki%2FSupprimerAcl   |   12 +
 .../locale/fr/pgsrc/Aide%2FPluginInclureUnCadre    |   36 -
 .../www/locale/fr/pgsrc/Aide%2FPluginListeDePages  |   66 +
 .../www/locale/fr/pgsrc/D%C3%A9bogageDePhpWiki     |   53 +
 .../wiki/www/locale/fr/pgsrc/DerniersVisiteurs     |   13 -
 src/plugins/wiki/www/locale/fr/pgsrc/ListeDePages  |   15 -
 src/plugins/wiki/www/pgsrc/Copyrights              |   13 +
 src/plugins/wiki/www/pgsrc/GeneralDisclaimer       |   12 +
 src/plugins/wiki/www/pgsrc/Help%2FAdobe%20Flash    |   76 +
 .../wiki/www/pgsrc/Help%2FFrameIncludePlugin       |   32 -
 .../wiki/www/pgsrc/Help%2FSyntaxHighlighterPlugin  |   95 +
 src/plugins/wiki/www/pgsrc/Help%2FVideoPlugin      |   75 +
 .../wiki/www/pgsrc/Help%2FWikisUsingPhpWiki        |   42 +
 src/plugins/wiki/www/soapscripts/README            |   19 +
 src/plugins/wiki/www/soapscripts/createpage        |   38 +
 .../wiki/www/soapscripts/createpagefromfile        |   48 +
 src/plugins/wiki/www/soapscripts/fulltextsearch    |   40 +
 src/plugins/wiki/www/soapscripts/getallpagenames   |   41 +
 .../wiki/www/soapscripts/getcurrentrevision        |   38 +
 src/plugins/wiki/www/soapscripts/getpage           |   38 +
 src/plugins/wiki/www/soapscripts/getpagemeta       |   40 +
 src/plugins/wiki/www/soapscripts/getpagerevision   |   42 +
 src/plugins/wiki/www/soapscripts/getpluginsynopsis |   38 +
 src/plugins/wiki/www/soapscripts/listlinks         |   40 +
 src/plugins/wiki/www/soapscripts/listplugins       |   41 +
 src/plugins/wiki/www/soapscripts/listrelations     |   41 +
 src/plugins/wiki/www/soapscripts/recentchanges     |   50 +
 src/plugins/wiki/www/soapscripts/replacestring     |   42 +
 src/plugins/wiki/www/soapscripts/titlesearch       |   40 +
 .../wiki/www/themes/MacOSX/images/index.php        |   36 -
 .../www/themes/Sidebar/images/bulletLoading.gif    |  Bin 0 -> 51 bytes
 .../images/discussionitem_icon.png                 |  Bin 406 -> 406 bytes
 .../{MonoBook => Sidebar}/images/file_icon.png     |  Bin 297 -> 297 bytes
 .../{MonoBook => Sidebar}/images/lock_icon.png     |  Bin 313 -> 313 bytes
 .../{MonoBook => Sidebar}/images/mail_icon.png     |  Bin 281 -> 281 bytes
 .../{MonoBook => Sidebar}/images/news_icon.png     |  Bin 292 -> 292 bytes
 .../themes/{MonoBook => Sidebar}/images/url.png    |  Bin 154 -> 154 bytes
 .../wiki/www/themes/Sidebar/jscalendar/README      |   33 +
 .../themes/Sidebar/jscalendar/calendar-phpwiki.css |  272 +
 .../themes/Sidebar/jscalendar/calendar-setup.js    |  400 +
 .../Sidebar/jscalendar/calendar-setup_stripped.js  |   21 +
 .../themes/Sidebar/jscalendar/calendar-win2k-1.css |  295 +
 .../Sidebar/jscalendar/calendar-win2k-cold-1.css   |  289 +
 .../wiki/www/themes/Sidebar/jscalendar/calendar.js | 3612 +++++++++
 .../themes/Sidebar/jscalendar/calendar_stripped.js |   14 +
 .../themes/Sidebar/jscalendar/lang/calendar-af.js  |   39 +
 .../themes/Sidebar/jscalendar/lang/calendar-br.js  |   45 +
 .../themes/Sidebar/jscalendar/lang/calendar-ca.js  |   45 +
 .../Sidebar/jscalendar/lang/calendar-cs-win.js     |   34 +
 .../themes/Sidebar/jscalendar/lang/calendar-da.js  |   63 +
 .../themes/Sidebar/jscalendar/lang/calendar-de.js  |  124 +
 .../themes/Sidebar/jscalendar/lang/calendar-du.js  |   45 +
 .../themes/Sidebar/jscalendar/lang/calendar-el.js  |   89 +
 .../themes/Sidebar/jscalendar/lang/calendar-en.js  |  127 +
 .../themes/Sidebar/jscalendar/lang/calendar-es.js  |  114 +
 .../themes/Sidebar/jscalendar/lang/calendar-fi.js  |   98 +
 .../themes/Sidebar/jscalendar/lang/calendar-fr.js  |   86 +
 .../Sidebar/jscalendar/lang/calendar-hr-utf8.js    |   49 +
 .../themes/Sidebar/jscalendar/lang/calendar-hr.js  |  Bin 0 -> 3038 bytes
 .../themes/Sidebar/jscalendar/lang/calendar-hu.js  |   45 +
 .../themes/Sidebar/jscalendar/lang/calendar-it.js  |   79 +
 .../themes/Sidebar/jscalendar/lang/calendar-jp.js  |   45 +
 .../Sidebar/jscalendar/lang/calendar-ko-utf8.js    |  120 +
 .../themes/Sidebar/jscalendar/lang/calendar-ko.js  |  120 +
 .../Sidebar/jscalendar/lang/calendar-lt-utf8.js    |  114 +
 .../themes/Sidebar/jscalendar/lang/calendar-lt.js  |  114 +
 .../themes/Sidebar/jscalendar/lang/calendar-nl.js  |   45 +
 .../themes/Sidebar/jscalendar/lang/calendar-no.js  |   45 +
 .../Sidebar/jscalendar/lang/calendar-pl-utf8.js    |   93 +
 .../themes/Sidebar/jscalendar/lang/calendar-pl.js  |   56 +
 .../themes/Sidebar/jscalendar/lang/calendar-pt.js  |   45 +
 .../themes/Sidebar/jscalendar/lang/calendar-ro.js  |   66 +
 .../themes/Sidebar/jscalendar/lang/calendar-ru.js  |   45 +
 .../themes/Sidebar/jscalendar/lang/calendar-si.js  |   94 +
 .../themes/Sidebar/jscalendar/lang/calendar-sk.js  |   99 +
 .../themes/Sidebar/jscalendar/lang/calendar-sp.js  |   63 +
 .../themes/Sidebar/jscalendar/lang/calendar-sv.js  |   93 +
 .../themes/Sidebar/jscalendar/lang/calendar-tr.js  |   58 +
 .../themes/Sidebar/jscalendar/lang/calendar-zh.js  |   45 +
 .../www/themes/Sidebar/jscalendar/menuarrow.png    |  Bin 0 -> 114 bytes
 src/plugins/wiki/www/themes/Sidebar/ora.swf        |  Bin 0 -> 950 bytes
 .../www/themes/Sidebar/templates/frame-left.tmpl   |   14 -
 .../www/themes/Sidebar/templates/frameset.tmpl     |   26 -
 .../wiki/www/themes/blog/templates/blogform.tmpl   |   26 -
 .../wiki/www/themes/default/buttons/asc_order.png  |  Bin 137 -> 0 bytes
 .../wiki/www/themes/default/buttons/desc_order.png |  Bin 137 -> 0 bytes
 .../wiki/www/themes/default/buttons/no_order.png   |  Bin 105 -> 0 bytes
 .../wiki/www/themes/default/buttons/sort_down.gif  |  Bin 0 -> 80 bytes
 .../wiki/www/themes/default/buttons/sort_none.gif  |  Bin 0 -> 64 bytes
 .../wiki/www/themes/default/buttons/sort_up.gif    |  Bin 0 -> 80 bytes
 .../wiki/www/themes/default/flowplayer-3.2.4.swf   |  Bin 0 -> 118731 bytes
 .../themes/default/flowplayer.controls-3.2.2.swf   |  Bin 0 -> 35514 bytes
 .../www/themes/default/highlight.js/CHANGES.md     |  827 ++
 .../wiki/www/themes/default/highlight.js/LICENSE   |   24 +
 .../wiki/www/themes/default/highlight.js/README.md |  167 +
 .../www/themes/default/highlight.js/README.ru.md   |  171 +
 .../themes/default/highlight.js/highlight.pack.js  |    1 +
 .../themes/default/highlight.js/styles/arta.css    |  160 +
 .../themes/default/highlight.js/styles/ascetic.css |   50 +
 .../highlight.js/styles/atelier-dune.dark.css      |   93 +
 .../highlight.js/styles/atelier-dune.light.css     |   93 +
 .../highlight.js/styles/atelier-forest.dark.css    |   93 +
 .../highlight.js/styles/atelier-forest.light.css   |   93 +
 .../highlight.js/styles/atelier-heath.dark.css     |   93 +
 .../highlight.js/styles/atelier-heath.light.css    |   93 +
 .../highlight.js/styles/atelier-lakeside.dark.css  |   93 +
 .../highlight.js/styles/atelier-lakeside.light.css |   93 +
 .../highlight.js/styles/atelier-seaside.dark.css   |   93 +
 .../highlight.js/styles/atelier-seaside.light.css  |   93 +
 .../default/highlight.js/styles/brown_paper.css    |  105 +
 .../default/highlight.js/styles/brown_papersq.png  |  Bin 0 -> 18198 bytes
 .../themes/default/highlight.js/styles/dark.css    |  105 +
 .../themes/default/highlight.js/styles/default.css |  153 +
 .../themes/default/highlight.js/styles/docco.css   |  132 +
 .../www/themes/default/highlight.js/styles/far.css |  113 +
 .../default/highlight.js/styles/foundation.css     |  133 +
 .../themes/default/highlight.js/styles/github.css  |  125 +
 .../default/highlight.js/styles/googlecode.css     |  147 +
 .../themes/default/highlight.js/styles/idea.css    |  122 +
 .../default/highlight.js/styles/ir_black.css       |  105 +
 .../themes/default/highlight.js/styles/magula.css  |  123 +
 .../default/highlight.js/styles/mono-blue.css      |   62 +
 .../themes/default/highlight.js/styles/monokai.css |  127 +
 .../highlight.js/styles/monokai_sublime.css        |  149 +
 .../default/highlight.js/styles/obsidian.css       |  154 +
 .../default/highlight.js/styles/paraiso.dark.css   |   93 +
 .../default/highlight.js/styles/paraiso.light.css  |   93 +
 .../default/highlight.js/styles/pojoaque.css       |  106 +
 .../default/highlight.js/styles/pojoaque.jpg       |  Bin 0 -> 1186 bytes
 .../default/highlight.js/styles/railscasts.css     |  182 +
 .../themes/default/highlight.js/styles/rainbow.css |  112 +
 .../default/highlight.js/styles/school_book.css    |  113 +
 .../default/highlight.js/styles/school_book.png    |  Bin 0 -> 486 bytes
 .../default/highlight.js/styles/solarized_dark.css |  107 +
 .../highlight.js/styles/solarized_light.css        |  107 +
 .../default/highlight.js/styles/sunburst.css       |  160 +
 .../highlight.js/styles/tomorrow-night-blue.css    |   93 +
 .../highlight.js/styles/tomorrow-night-bright.css  |   92 +
 .../styles/tomorrow-night-eighties.css             |   92 +
 .../default/highlight.js/styles/tomorrow-night.css |   93 +
 .../default/highlight.js/styles/tomorrow.css       |   90 +
 .../www/themes/default/highlight.js/styles/vs.css  |   89 +
 .../themes/default/highlight.js/styles/xcode.css   |  158 +
 .../themes/default/highlight.js/styles/zenburn.css |  117 +
 .../wiki/www/themes/default/jquery-1.11.1.min.js   |    4 +
 .../www/themes/default/jquery.tablesorter.min.js   |    4 +
 .../wiki/www/themes/default/moacdropdown.js        | 1354 ----
 .../themes/default/moacdropdown/css/dropdown.css   |  180 -
 .../www/themes/default/moacdropdown/examples.html  |  925 ---
 .../wiki/www/themes/default/moacdropdown/i/al.png  |  Bin 465 -> 0 bytes
 .../wiki/www/themes/default/moacdropdown/i/ar.png  |  Bin 607 -> 0 bytes
 .../themes/default/moacdropdown/i/arrowdown.gif    |  Bin 56 -> 0 bytes
 .../www/themes/default/moacdropdown/i/code.png     |  Bin 691 -> 0 bytes
 .../www/themes/default/moacdropdown/i/conf.gif     |  Bin 81 -> 0 bytes
 .../wiki/www/themes/default/moacdropdown/i/ial.png |  Bin 481 -> 0 bytes
 .../wiki/www/themes/default/moacdropdown/i/iar.png |  Bin 618 -> 0 bytes
 .../themes/default/moacdropdown/js/acdropdown.js   | 1791 -----
 .../themes/default/moacdropdown/js/getobject2.js   |  126 -
 .../themes/default/moacdropdown/js/mobrowser.js    |   33 -
 .../themes/default/moacdropdown/js/modomevent.js   |  111 -
 .../themes/default/moacdropdown/js/modomevent3.js  |  189 -
 .../www/themes/default/moacdropdown/js/modomext.js |  219 -
 .../www/themes/default/moacdropdown/js/modomt.js   |  259 -
 .../themes/default/moacdropdown/js/xmlextras.js    |  149 -
 .../www/themes/default/moacdropdown/license.txt    |   10 -
 .../www/themes/default/moacdropdown/xmlrpc.txt     |   58 -
 src/plugins/wiki/www/themes/default/sortable.js    |  326 -
 .../www/themes/default/templates/frameset.tmpl     |   22 -
 .../www/themes/fusionforge/buttons/asc_order.png   |  Bin 571 -> 0 bytes
 .../www/themes/fusionforge/buttons/desc_order.png  |  Bin 567 -> 0 bytes
 .../www/themes/fusionforge/buttons/no_order.png    |  Bin 576 -> 0 bytes
 .../wiki/www/themes/fusionforge/images/error.png   |  Bin 0 -> 4340 bytes
 .../wiki/www/themes/fusionforge/images/info.png    |  Bin 0 -> 4403 bytes
 .../wiki/www/themes/fusionforge/images/success.png |  Bin 0 -> 4447 bytes
 .../wiki/www/themes/fusionforge/images/warning.png |  Bin 0 -> 4567 bytes
 .../www/themes/fusionforge/pgsrc/FullTextSearch    |   31 +
 .../wiki/www/themes/fusionforge/pgsrc/TitleSearch  |   26 +
 216 files changed, 15055 insertions(+), 24107 deletions(-)
 create mode 100644 src/plugins/wiki/www/Makefile
 create mode 100755 src/plugins/wiki/www/config/phpwiki.spec
 delete mode 100644 src/plugins/wiki/www/doc/README.fpdf
 delete mode 100644 src/plugins/wiki/www/lib/AccessLog.php
 delete mode 100644 src/plugins/wiki/www/lib/WikiDB/backend/cvs.php
 delete mode 100644 src/plugins/wiki/www/lib/WikiDB/cvs.php
 delete mode 100644 src/plugins/wiki/www/lib/WikiUser/EMailConfirm.php
 delete mode 100644 src/plugins/wiki/www/lib/WikiUserNew.php
 rename src/plugins/wiki/www/lib/WysiwygEdit/{FCKeditor.php => CKeditor.php} (100%)
 delete mode 100644 src/plugins/wiki/www/lib/font/chinese.php
 delete mode 100644 src/plugins/wiki/www/lib/font/courier.php
 delete mode 100644 src/plugins/wiki/www/lib/font/courierb.php
 delete mode 100644 src/plugins/wiki/www/lib/font/courierbi.php
 delete mode 100644 src/plugins/wiki/www/lib/font/courieri.php
 delete mode 100644 src/plugins/wiki/www/lib/font/helvetica.php
 delete mode 100644 src/plugins/wiki/www/lib/font/helveticab.php
 delete mode 100644 src/plugins/wiki/www/lib/font/helveticabi.php
 delete mode 100644 src/plugins/wiki/www/lib/font/helveticai.php
 delete mode 100644 src/plugins/wiki/www/lib/font/japanese.php
 delete mode 100644 src/plugins/wiki/www/lib/font/symbol.php
 delete mode 100644 src/plugins/wiki/www/lib/font/times.php
 delete mode 100644 src/plugins/wiki/www/lib/font/timesb.php
 delete mode 100644 src/plugins/wiki/www/lib/font/timesbi.php
 delete mode 100644 src/plugins/wiki/www/lib/font/timesi.php
 delete mode 100644 src/plugins/wiki/www/lib/font/zapfdingbats.php
 delete mode 100644 src/plugins/wiki/www/lib/fpdf.php
 delete mode 100644 src/plugins/wiki/www/lib/gif.php
 rename src/plugins/wiki/www/lib/{ziplib.php => mimelib.php} (100%)
 delete mode 100644 src/plugins/wiki/www/lib/nusoap/README.txt
 delete mode 100644 src/plugins/wiki/www/lib/nusoap/lgpl.txt
 delete mode 100644 src/plugins/wiki/www/lib/nusoap/nusoap.php
 delete mode 100644 src/plugins/wiki/www/lib/pear/DB/Pager.php
 delete mode 100644 src/plugins/wiki/www/lib/pear/DB/ldap.php
 create mode 100644 src/plugins/wiki/www/lib/pear/LICENSE
 delete mode 100644 src/plugins/wiki/www/lib/plugin/FrameInclude.php
 create mode 100644 src/plugins/wiki/www/lib/plugin/SyntaxHighlighter.php
 create mode 100644 src/plugins/wiki/www/lib/plugin/Video.php
 create mode 100644 src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FD%C3%A9finirAclSimple
 create mode 100644 src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FPurger
 create mode 100644 src/plugins/wiki/www/locale/fr/pgsrc/AdministrationDePhpWiki%2FSupprimerAcl
 delete mode 100644 src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginInclureUnCadre
 create mode 100644 src/plugins/wiki/www/locale/fr/pgsrc/Aide%2FPluginListeDePages
 create mode 100644 src/plugins/wiki/www/locale/fr/pgsrc/D%C3%A9bogageDePhpWiki
 delete mode 100644 src/plugins/wiki/www/locale/fr/pgsrc/DerniersVisiteurs
 delete mode 100644 src/plugins/wiki/www/locale/fr/pgsrc/ListeDePages
 create mode 100644 src/plugins/wiki/www/pgsrc/Copyrights
 create mode 100644 src/plugins/wiki/www/pgsrc/GeneralDisclaimer
 create mode 100644 src/plugins/wiki/www/pgsrc/Help%2FAdobe%20Flash
 delete mode 100644 src/plugins/wiki/www/pgsrc/Help%2FFrameIncludePlugin
 create mode 100644 src/plugins/wiki/www/pgsrc/Help%2FSyntaxHighlighterPlugin
 create mode 100644 src/plugins/wiki/www/pgsrc/Help%2FVideoPlugin
 create mode 100644 src/plugins/wiki/www/pgsrc/Help%2FWikisUsingPhpWiki
 create mode 100644 src/plugins/wiki/www/soapscripts/README
 create mode 100755 src/plugins/wiki/www/soapscripts/createpage
 create mode 100755 src/plugins/wiki/www/soapscripts/createpagefromfile
 create mode 100755 src/plugins/wiki/www/soapscripts/fulltextsearch
 create mode 100755 src/plugins/wiki/www/soapscripts/getallpagenames
 create mode 100755 src/plugins/wiki/www/soapscripts/getcurrentrevision
 create mode 100755 src/plugins/wiki/www/soapscripts/getpage
 create mode 100755 src/plugins/wiki/www/soapscripts/getpagemeta
 create mode 100755 src/plugins/wiki/www/soapscripts/getpagerevision
 create mode 100755 src/plugins/wiki/www/soapscripts/getpluginsynopsis
 create mode 100755 src/plugins/wiki/www/soapscripts/listlinks
 create mode 100755 src/plugins/wiki/www/soapscripts/listplugins
 create mode 100755 src/plugins/wiki/www/soapscripts/listrelations
 create mode 100755 src/plugins/wiki/www/soapscripts/recentchanges
 create mode 100755 src/plugins/wiki/www/soapscripts/replacestring
 create mode 100755 src/plugins/wiki/www/soapscripts/titlesearch
 delete mode 100644 src/plugins/wiki/www/themes/MacOSX/images/index.php
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/images/bulletLoading.gif
 copy src/plugins/wiki/www/themes/{MonoBook => Sidebar}/images/discussionitem_icon.png (100%)
 copy src/plugins/wiki/www/themes/{MonoBook => Sidebar}/images/file_icon.png (100%)
 copy src/plugins/wiki/www/themes/{MonoBook => Sidebar}/images/lock_icon.png (100%)
 copy src/plugins/wiki/www/themes/{MonoBook => Sidebar}/images/mail_icon.png (100%)
 copy src/plugins/wiki/www/themes/{MonoBook => Sidebar}/images/news_icon.png (100%)
 copy src/plugins/wiki/www/themes/{MonoBook => Sidebar}/images/url.png (100%)
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/README
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-phpwiki.css
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-setup.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-setup_stripped.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-win2k-1.css
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar-win2k-cold-1.css
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/calendar_stripped.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-af.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-br.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ca.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-cs-win.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-da.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-de.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-du.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-el.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-en.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-es.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-fi.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-fr.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hr-utf8.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hr.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-hu.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-it.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-jp.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ko-utf8.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ko.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-lt-utf8.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-lt.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-nl.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-no.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pl-utf8.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pl.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-pt.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ro.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-ru.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-si.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sk.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sp.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-sv.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-tr.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/lang/calendar-zh.js
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/jscalendar/menuarrow.png
 create mode 100644 src/plugins/wiki/www/themes/Sidebar/ora.swf
 delete mode 100644 src/plugins/wiki/www/themes/Sidebar/templates/frame-left.tmpl
 delete mode 100644 src/plugins/wiki/www/themes/Sidebar/templates/frameset.tmpl
 delete mode 100644 src/plugins/wiki/www/themes/blog/templates/blogform.tmpl
 delete mode 100644 src/plugins/wiki/www/themes/default/buttons/asc_order.png
 delete mode 100644 src/plugins/wiki/www/themes/default/buttons/desc_order.png
 delete mode 100644 src/plugins/wiki/www/themes/default/buttons/no_order.png
 create mode 100644 src/plugins/wiki/www/themes/default/buttons/sort_down.gif
 create mode 100644 src/plugins/wiki/www/themes/default/buttons/sort_none.gif
 create mode 100644 src/plugins/wiki/www/themes/default/buttons/sort_up.gif
 create mode 100644 src/plugins/wiki/www/themes/default/flowplayer-3.2.4.swf
 create mode 100644 src/plugins/wiki/www/themes/default/flowplayer.controls-3.2.2.swf
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/CHANGES.md
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/LICENSE
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/README.md
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/README.ru.md
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/highlight.pack.js
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/arta.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/ascetic.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-dune.dark.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-dune.light.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-forest.dark.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-forest.light.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-heath.dark.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-heath.light.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-lakeside.dark.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-lakeside.light.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-seaside.dark.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/atelier-seaside.light.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/brown_paper.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/brown_papersq.png
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/dark.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/default.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/docco.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/far.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/foundation.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/github.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/googlecode.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/idea.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/ir_black.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/magula.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/mono-blue.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/monokai.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/monokai_sublime.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/obsidian.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/paraiso.dark.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/paraiso.light.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/pojoaque.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/pojoaque.jpg
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/railscasts.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/rainbow.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/school_book.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/school_book.png
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/solarized_dark.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/solarized_light.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/sunburst.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-blue.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-bright.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night-eighties.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow-night.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/tomorrow.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/vs.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/xcode.css
 create mode 100644 src/plugins/wiki/www/themes/default/highlight.js/styles/zenburn.css
 create mode 100644 src/plugins/wiki/www/themes/default/jquery-1.11.1.min.js
 create mode 100644 src/plugins/wiki/www/themes/default/jquery.tablesorter.min.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/css/dropdown.css
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/examples.html
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/i/al.png
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/i/ar.png
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/i/arrowdown.gif
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/i/code.png
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/i/conf.gif
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/i/ial.png
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/i/iar.png
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/js/acdropdown.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/js/getobject2.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/js/mobrowser.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/js/modomevent.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/js/modomevent3.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/js/modomext.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/js/modomt.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/js/xmlextras.js
 delete mode 100644 src/plugins/wiki/www/themes/default/moacdropdown/license.txt
 delete mode 100755 src/plugins/wiki/www/themes/default/moacdropdown/xmlrpc.txt
 delete mode 100644 src/plugins/wiki/www/themes/default/sortable.js
 delete mode 100644 src/plugins/wiki/www/themes/default/templates/frameset.tmpl
 delete mode 100644 src/plugins/wiki/www/themes/fusionforge/buttons/asc_order.png
 delete mode 100644 src/plugins/wiki/www/themes/fusionforge/buttons/desc_order.png
 delete mode 100644 src/plugins/wiki/www/themes/fusionforge/buttons/no_order.png
 create mode 100644 src/plugins/wiki/www/themes/fusionforge/images/error.png
 create mode 100644 src/plugins/wiki/www/themes/fusionforge/images/info.png
 create mode 100644 src/plugins/wiki/www/themes/fusionforge/images/success.png
 create mode 100644 src/plugins/wiki/www/themes/fusionforge/images/warning.png
 create mode 100644 src/plugins/wiki/www/themes/fusionforge/pgsrc/FullTextSearch
 create mode 100644 src/plugins/wiki/www/themes/fusionforge/pgsrc/TitleSearch


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list