Most base libraries now loaded from googleapis. Changes to the way LiveGridForms...
authorMatt Brown <dowdybrown@yahoo.com>
Thu, 10 Feb 2011 17:29:26 +0000 (17:29 +0000)
committerMatt Brown <dowdybrown@yahoo.com>
Thu, 10 Feb 2011 17:29:26 +0000 (17:29 +0000)
git-svn-id: svn://svn.code.sf.net/p/openrico/code/trunk/rico3@68 53df2df2-7ab5-4331-af62-ea79255fa4e2

133 files changed:
documentation/GridStyles.html
documentation/GridStyles_ja.html [deleted file]
documentation/InstallNotes.html
documentation/InstallNotes_ja.html [deleted file]
documentation/LiveGrid.html
documentation/LiveGridAjax.html
documentation/LiveGridAjax_ja.html [deleted file]
documentation/LiveGridForms.html
documentation/LiveGridForms_ja.html [deleted file]
documentation/LiveGrid_ja.html [deleted file]
documentation/SimpleGrid.html
documentation/SimpleGrid_ja.html [deleted file]
documentation/browsers.html
documentation/browsers_ja.html [deleted file]
documentation/grids.html
documentation/grids_ja.html [deleted file]
documentation/menu.html
documentation/translations.html
documentation/translations_ja.html [deleted file]
documentation/welcome.html
documentation/welcome_ja.html [deleted file]
documentation/welcome_zh.html [deleted file]
examples/asp/LoadRicoClient.asp
examples/asp/ShipperEdit.asp
examples/asp/ex1.asp
examples/asp/ex2editfilter.asp
examples/asp/ex2editfilterKW.asp
examples/asp/ex2json.asp
examples/asp/ex2nosession.asp
examples/asp/ex2xml.asp
examples/asp/menu.html
examples/asp/simplegrid.asp
examples/asp/tree1.asp
examples/asp/widgets.asp
examples/demo.css
examples/dotnet/LoadRicoClient.ascx
examples/dotnet/ShipperEdit.aspx
examples/dotnet/dbConnect.ascx
examples/dotnet/employees.aspx
examples/dotnet/ex1.aspx
examples/dotnet/ex2editfilter.aspx
examples/dotnet/ex2json.aspx
examples/dotnet/ex2nosession.aspx
examples/dotnet/ex2xml.aspx
examples/dotnet/menu.html
examples/dotnet/simplegrid.aspx
examples/dotnet/tree1.aspx
examples/dotnet/widgets.aspx
examples/html/LoadRicoClient.js
examples/html/animate-rico.html
examples/html/classTest.html
examples/html/controls.html
examples/html/cssSelect.html
examples/html/drag-and-drop-grid.html
examples/html/events.html
examples/html/menu.html
examples/html/popups.html
examples/html/shadow.html
examples/menu.js
examples/php/LoadRicoClient.php
examples/php/ShipperEdit.php
examples/php/dbConnect.php
examples/php/ex1.php
examples/php/ex2editfilter.php
examples/php/ex2json.php
examples/php/ex2nosession.php
examples/php/ex2xml.php
examples/php/menu.html
examples/php/photos.php
examples/php/simplegrid.php
examples/php/tree1.php
examples/php/widgets.php
plugins/asp/SimpleGrid.vbs
plugins/dotnet/LiveGrid.ascx.vb
plugins/dotnet/SimpleGrid.ascx.vb
plugins/dotnet/sqlParse.ascx.vb
plugins/php/dbClass3.php
ricoClient/css/coffee-with-milk.css
ricoClient/css/grayedout.css
ricoClient/css/greenHdg.css
ricoClient/css/jquery-base/images/ui-bg_flat_0_aaaaaa_40x100.png [deleted file]
ricoClient/css/jquery-base/images/ui-bg_flat_75_ffffff_40x100.png [deleted file]
ricoClient/css/jquery-base/images/ui-bg_glass_55_fbf9ee_1x400.png [deleted file]
ricoClient/css/jquery-base/images/ui-bg_glass_65_ffffff_1x400.png [deleted file]
ricoClient/css/jquery-base/images/ui-bg_glass_75_dadada_1x400.png [deleted file]
ricoClient/css/jquery-base/images/ui-bg_glass_75_e6e6e6_1x400.png [deleted file]
ricoClient/css/jquery-base/images/ui-bg_glass_95_fef1ec_1x400.png [deleted file]
ricoClient/css/jquery-base/images/ui-bg_highlight-soft_75_cccccc_1x100.png [deleted file]
ricoClient/css/jquery-base/images/ui-icons_222222_256x240.png [deleted file]
ricoClient/css/jquery-base/images/ui-icons_2e83ff_256x240.png [deleted file]
ricoClient/css/jquery-base/images/ui-icons_454545_256x240.png [deleted file]
ricoClient/css/jquery-base/images/ui-icons_888888_256x240.png [deleted file]
ricoClient/css/jquery-base/images/ui-icons_cd0a0a_256x240.png [deleted file]
ricoClient/css/jquery-base/ui.accordion.css [deleted file]
ricoClient/css/jquery-base/ui.base.css [deleted file]
ricoClient/css/jquery-base/ui.core.css [deleted file]
ricoClient/css/jquery-base/ui.datepicker.css [deleted file]
ricoClient/css/jquery-base/ui.dialog.css [deleted file]
ricoClient/css/jquery-base/ui.tabs.css [deleted file]
ricoClient/css/rico.css
ricoClient/css/warmfall.css
ricoClient/js/baselibs/README.TXT [new file with mode: 0644]
ricoClient/js/baselibs/dojo.debug.js [deleted file]
ricoClient/js/baselibs/dojo.js [deleted file]
ricoClient/js/baselibs/ext-core.js [deleted file]
ricoClient/js/baselibs/glow.core-1.7.js [new file with mode: 0644]
ricoClient/js/baselibs/glow.core.debug.js [deleted file]
ricoClient/js/baselibs/jquery-1.3.js [deleted file]
ricoClient/js/baselibs/jquery-1.4.js [deleted file]
ricoClient/js/baselibs/jquery.js [deleted file]
ricoClient/js/baselibs/mootools.js [deleted file]
ricoClient/js/baselibs/prototype-1.6.js [new file with mode: 0644]
ricoClient/js/baselibs/prototype.js [deleted file]
ricoClient/js/rico.js
ricoClient/js/rico2Dojo.js [deleted file]
ricoClient/js/rico2Ext.js [deleted file]
ricoClient/js/rico2Glow.js [deleted file]
ricoClient/js/rico2Moo.js [deleted file]
ricoClient/js/rico2Proto.js [deleted file]
ricoClient/js/rico2doj.js [new file with mode: 0644]
ricoClient/js/rico2ext.js [new file with mode: 0644]
ricoClient/js/rico2glo.js [new file with mode: 0644]
ricoClient/js/rico2jQuery.js [deleted file]
ricoClient/js/rico2jqu.js [new file with mode: 0644]
ricoClient/js/rico2moo.js [new file with mode: 0644]
ricoClient/js/rico2pro.js [new file with mode: 0644]
ricoClient/js/ricoGridCommon.js
ricoClient/js/ricoLiveGrid.js
ricoClient/js/ricoLiveGridAjax.js
ricoClient/js/ricoLiveGridControls.js
ricoClient/js/ricoLiveGridForms.js
ricoClient/js/ricoSimpleGrid.js
ricoClient/js/ricoUI.js

index 1afb233..8cf2932 100644 (file)
@@ -8,9 +8,6 @@
 <body>\r
 <h1>Grid Styles</h1>\r
 \r
 <body>\r
 <h1>Grid Styles</h1>\r
 \r
-<p><a href='GridStyles_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>\r
-<a href='GridStyles_ja.html'>View this page in Japanese</a></p>\r
-\r
 <p>It is very easy to customize the style of Rico LiveGrids and SimpleGrids.\r
 In fact, LiveGrids and SimpleGrids share many of the same class names\r
 and DOM structures, so styles that apply to one can be applied to the other.\r
 <p>It is very easy to customize the style of Rico LiveGrids and SimpleGrids.\r
 In fact, LiveGrids and SimpleGrids share many of the same class names\r
 and DOM structures, so styles that apply to one can be applied to the other.\r
@@ -29,8 +26,8 @@ in the src/css directory.
 <p><strong>greenHdg.css</strong>\r
 <br><img src='images/gridsamples/greenHdg.png'>\r
 \r
 <p><strong>greenHdg.css</strong>\r
 <br><img src='images/gridsamples/greenHdg.png'>\r
 \r
-<p><strong>tanChisel.css</strong>\r
-<br><img src='images/gridsamples/tanChisel.png'>\r
+<p><strong>seaglass.css</strong>\r
+<br><img src='images/gridsamples/seaglass.png'>\r
 \r
 <p><strong>grayedout.css</strong>\r
 <br><img src='images/gridsamples/grayedout.png'>\r
 \r
 <p><strong>grayedout.css</strong>\r
 <br><img src='images/gridsamples/grayedout.png'>\r
@@ -41,9 +38,6 @@ in the src/css directory.
 <p><strong>warmfall.css</strong>\r
 <br><img src='images/gridsamples/warmfall.png'>\r
 \r
 <p><strong>warmfall.css</strong>\r
 <br><img src='images/gridsamples/warmfall.png'>\r
 \r
-<p><strong>iegradient.css</strong> <em>(only works in Internet Explorer)</em>\r
-<br><img src='images/gridsamples/iegradient.png'>\r
-\r
 <p>Several of these styles are adapted from the\r
 <a href="http://icant.co.uk/csstablegallery/index.php">CSS Table Gallery</a>.\r
 The gallery can serve as an inspiration for styling LiveGrids, however,\r
 <p>Several of these styles are adapted from the\r
 <a href="http://icant.co.uk/csstablegallery/index.php">CSS Table Gallery</a>.\r
 The gallery can serve as an inspiration for styling LiveGrids, however,\r
diff --git a/documentation/GridStyles_ja.html b/documentation/GridStyles_ja.html
deleted file mode 100644 (file)
index 432f1f9..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<title>Rico Grid Styles</title>
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>グリッドスタイル</h1>
-
-<p>Rico LiveGrid と SimpleGrid のスタイルをカスタマイズすることは、非常に簡単です。
-実際に、LiveGrid と SimpleGrid は同じクラス名と DOM 構造の多くを共有するので、
-一方にあてはまるスタイルは他方に適用されることが出来ます。
-
-<h2>あらかじめ構成されたスタイル</h2>
-
-<p>Rico には、LiveGrid のためのいろいろなスタイルシートが付属します。
-PHP、ASP、.net または Perl のセクションの、最初の LiveGrid の実例を選択する事によって、
-それらがどのように見えるのかを知る事が出来ます。
-実例のページのトップで、あなたの気に入るものを見つけるために、
-それぞれの "style" セレクションを試して下さい。
-実際のスタイルシートは src/css ディレクトリにあります。
-
-<p>ここに、"Cursor Row" が設定される "highlight" を持つ、それぞれのスタイルのスクリーンショットがあります。
-
-<p><strong>greenHdg.css</strong>
-<br><img src='images/gridsamples/greenHdg.png'>
-
-<p><strong>tanChisel.css</strong>
-<br><img src='images/gridsamples/tanChisel.png'>
-
-<p><strong>grayedout.css</strong>
-<br><img src='images/gridsamples/grayedout.png'>
-
-<p><strong>coffee-with-milk.css</strong>
-<br><img src='images/gridsamples/coffee-with-milk.png'>
-
-<p><strong>warmfall.css</strong>
-<br><img src='images/gridsamples/warmfall.png'>
-
-<p><strong>iegradient.css</strong> <em>(Internet Explorer のみで動作します)</em>
-<br><img src='images/gridsamples/iegradient.png'>
-
-<p>これらのスタイルのいくつかは、<a href="http://icant.co.uk/csstablegallery/index.php">CSS Table Gallery</a> 
-から変更して作成されました。
-そのギャラリーは LiveGrid のスタイルのためのインスピレーションとして用いる事が出来ますが、
-ギャラリーの CSS は直接 LiveGrid に適用する事は出来ません。
-
-<h2>スタイルのカスタマイズ</h2>
-
-<p>利用出来るあらかじめ構成されたスタイルの種類でさえ、
-望む方法でデータを表示するためには、
-必然的にいくつかのスタイル宣言がオーバーライドされる必要があります。
-以下は、スタイルがオーバーライドされる事を必要とするいくつかの一般的な状況と、
-その問題を解決するために提案される CSS スタイルです。
-
-<h3>列見出しの行の高さ</h3>
-
-<p>列見出しが長すぎる時、
-一般的に 2 または 3 行のテキストとして語句を送る事を認めたいです。
-
-<p>2 行のテキストによる見出しの表示。
-<pre>
-.ricoLG_top div.ricoLG_cell {
-  height:2.5em;
-}
-</pre>
-
-<p>3 行のテキストによる見出しの表示。
-<pre>
-.ricoLG_top div.ricoLG_cell {
-  height:3.5em;
-}
-</pre>
-
-<h3>グリッドボディの行の高さ</h3>
-
-<p>同様に、長い内容を表示するために、グリッドボディのそれぞれの行を、
-より高くする必要があるかも知れません。
-
-<p>2 行のテキストによるボディ行の表示。
-<pre>
-.ricoLG_bottom div.ricoLG_cell {
-  height:2.5em;
-}
-</pre>
-
-<h3>ワードラップ</h3>
-
-<p>デフォルトで、ワードラップはそれぞれのグリッドセルで利用可能にされます。
-しかし、時にはワードラップをオフにする事は意味をなします。
-
-<p>見出しとボディでワードラップをオフにする。
-<pre>
-div.ricoLG_cell {
-  white-space:nowrap;
-}
-</pre>
-
-<p>ボディのみでワードラップをオフにする。
-<pre>
-.ricoLG_bottom div.ricoLG_cell {
-  white-space:nowrap;
-}
-</pre>
-
-<h3>グリッド全体への参照</h3>
-
-<p>時々、あなたはスタイルをグリッド全体に適用したいかもしれません。
-それぞれのグリッドは "ricoLG_outerDiv" クラスと共に &lt;div&gt; で囲まれ、
-id は "_outerDiv" を追加された LiveGrid コンストラクタに渡した id と等しい id です。
-(すなわち、最初の実例のグリッド id は "ex1_outerDiv" です)。
-このように、ページ上ですべてのグリッドにスタイルを適用する時はセレクタとして ".ricoLG_outerDiv" を、
-ex1 グリッドにのみスタイルを適用する時は "#ex1_outerDiv" 利用する事が出来ます。
-
-<p>グリッドの背景色を設定する。
-<pre>
-div.ricoLG_outerDiv {
-  background-color:aqua;
-}
-</pre>
-
-</body>
-</html>
index f7475ea..e75fad2 100644 (file)
@@ -19,17 +19,14 @@ p.comment {
 <body>\r
 <h1>Installing the Rico Examples</h1>\r
 \r
 <body>\r
 <h1>Installing the Rico Examples</h1>\r
 \r
-<p><a href='InstallNotes_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>\r
-<a href='InstallNotes_ja.html'>View this page in Japanese</a></p>\r
-\r
 <p>Simply unzipping the Rico distribution file and copying the resulting\r
 directory structure into your web service's path should be sufficient to get\r
 most, if not all, of the examples running. If you have installed it into a\r
 directory called "rico" under the web service root, then you should be able\r
 <p>Simply unzipping the Rico distribution file and copying the resulting\r
 directory structure into your web service's path should be sufficient to get\r
 most, if not all, of the examples running. If you have installed it into a\r
 directory called "rico" under the web service root, then you should be able\r
-to point your browser to the following address to access the examples:\r
-<blockquote><p>http://myserver.mydomain.com/rico/examples/</blockquote>\r
+to point your browser to the following address to access the examples and documentation:\r
+<blockquote><p>http://myserver.mydomain.com/rico/</blockquote>\r
 <p>Or if you installed it on your personal computer, then access it as:\r
 <p>Or if you installed it on your personal computer, then access it as:\r
-<blockquote><p>http://localhost/rico/examples/</blockquote>\r
+<blockquote><p>http://localhost/rico/</blockquote>\r
 \r
 <h2>File Locations</h2>\r
 \r
 \r
 <h2>File Locations</h2>\r
 \r
diff --git a/documentation/InstallNotes_ja.html b/documentation/InstallNotes_ja.html
deleted file mode 100644 (file)
index f5deca1..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-<title>Installing the Rico Examples</title>
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css" />
-<style type="text/css">
-tbody td {
-  font-size: 8pt;
-  vertical-align: top;
-}
-p.comment {
-  color: #888;
-}
-</style>
-</head>
-
-<body>
-<h1>Rico の実例のインストール</h1>
-
-<p>単にディストリビューションファイルを解凍し、
-その結果のディレクトリ構成をあなたのウェブサービスのパスへコピーすれば、
-すべてではありませんが実例を動作させる上でほとんど十分でしょう。
-あなたがウェブサービスのルートに "rico" と呼ばれているディレクトリをインストールしたならば、
-実例にアクセスするためにブラウザを以下のアドレスに向けることができるはずです。
-<blockquote>http://myserver.mydomain.com/rico/examples/</blockquote>
-<p>または、それをあなたのパソコン上にインストールしたならば、次のアドレスにアクセスして下さい。
-<blockquote>http://localhost/rico/examples/</blockquote>
-
-<p>IIS6 を実行しているサーバーでは、
-あなたは ASP の実例を走らせるためにセキュリティセッティングを変更する必要があります。
-特に、親ディレクトリでインクルードファイルを参照し、ASPファイルを利用可能にする必要があります。
-そうするために、以下のステップに従ってください。
-<ol>
-<li>ISS Manager を開いて下さい
-<li>"Default Web Site" で右クリックして、"Properties" をコンテキストメニューから選択して下さい。
-<li>"Home Directory" タブをクリックして下さい
-<li>"Configuration" ボタンをクリックしてください
-<li>新しいウィンドウの "Options" タブをクリックします。
-<li>"Enable parent paths" とラベルされたボックスをクリックして下さい
-</ol>
-
-<h2>LiveGrid の実例</h2>
-
-<p>LiveGrid の実例の多くが Northwind サンプルデータベースからのデータをフェッチします。
-これらの実例に動かすために、あなたは 2 つのことをする必要があります。
-<ol>
-<li>Northwindデータベースを作成してください
-<li>applib.* ファイルにあるデータベース接続設定を変更して下さい
-</ol>
-
-<h2>Northwindデータベースの作成</h2>
-
-<p>examples/data ディレクトリは、 Rico LiveGrid ASP、.net、および PHP の実例を実行するために必要な、
-いくつかの異なるフォーマットのデータベースを含みます。
-
-<p>データはこれらのフォーマットを提供します。
-
-<ol>
-<li>northwind.mdb - これはマイクロソフトによって提供された、標準の Northwind データベースで、
-例外として [Order Details] は Order_Details に改名されました。
-あなたが ASP または .net の実例にアクセスしているならば、データベース構成の変更は必要ではありません。
- -- それらの実例は Microsoft Jet driver を利用して、このデータベースに直接アクセスするでしょう。
-
-<li>mysql-northwind.sql - MySQLのためのバックアップファイル( MySQL version 4.1 によって作られました)
-
-<li>mysql-northwind-dblquote.sql - すべての \' インスタンスが '' に替えられた事以外は
-上記と同じです(バージョン 5 以上の MySQL に推奨されます)
-
-<li>ORA-EXPDAT.DMP - Northwind スキーマのための Oracle エクスポートファイル
- -- <a href='http://www.oracle.com/technology/products/database/xe/index.html'>Oracle XE</a> の "exp" ユーティリティによって生成されました。
- このスキーマのパスワードは "password" です。
-
-</ol>
-
-<p>MS SQL Server 2000 と 2005 用のバージョンは <a href='http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en'>msdn.microsoft.com</a> から
-自由にダウンロード出来ます。
-ダウンロードしたら、<a href='http://msdn2.microsoft.com/en-us/library/ms227484.aspx'>それをインストールするためのマイクロソフトのインストラクション</a>に従うべきです。
-最後に、[Order Details] テーブルを Order_Details に改名するか、Order_Details と言う名前のビューを次の SQL 文を利用して生成するかのどちらかを行う必要があるでしょう。
-<pre>
-
-create view Order_Details as select * from [Order Details]
-
-</pre>
-
-<h2>データベース接続設定</h2>
-
-<p>特定の命令はあなたの環境に依存します。
-<table border='1' cellspacing='0' cellpadding='3'>
-<thead><tr>
-<th>Database</th>
-<th>PHP</th>
-<th>ASP</th>
-<th>.net</th>
-<th>Perl</th>
-</tr></thead>
-<tbody>
-<tr><td>接続の設定は次の場所です。</td>
-<td>examples/php/applib.php</td>
-<td>examples/asp/applib.asp</td>
-<td>examples/dotnet/applib.ascx</td>
-<td>examples/perl/ricoXMLquery.pl</td>
-
-<tr><th>MySQL</th>
-<td>return $GLOBALS['oDB']->MySqlLogon( "northwind", "userid", "password");</td>
-<td>
-<p>oDB.Use_MySQL
-<p>oDB.SqlSvr="localhost"
-<p class='comment'>SqlLogon() の記述の中に、ユーザIDとパスワードを設定して下さい。
-<p class='comment'>MySQL 3.51 ODBC ドライバもインストールされていなければなりません。
-</td>
-<td>Public const dbDialect = "MySQL"
-<p class='comment'>サーバ名、ユーザIDとパスワードを OpenDB() に設定して下さい。
-<p class='comment'>MySQL 3.51 ODBC ドライバもインストールされていなければなりません。
-</td>
-<td>$dbh = DBI->connect( "dbi:mysql:northwind", "userid", "password");</td>
-
-<tr><th>SQL Server</th>
-<td>
-$oDB->Dialect="TSQL";
-<p>return $GLOBALS['oDB']->MSSqlLogon( "ServerName\InstanceName", "Northwind", "userid", "password");
-<p class='comment'>デフォルトインスタンスに接続するとき、InstanceName を省略してください。
-</td>
-<td>oDB.SqlSvr= "ServerName\InstanceName"
-<p class='comment'>デフォルトインスタンスに接続するとき、InstanceName を省略してください。
-<p class='comment'>SqlLogon() の記述の中に、ユーザIDとパスワードを設定して下さい。
-</td>
-<td>Public const dbDialect = "TSQL"
-<p class='comment'>サーバ名、ユーザIDとパスワードを OpenDB() に設定して下さい。</td>
-<td></td>
-
-<tr><th>MS Access</th>
-<td>
-$oDB->Dialect="Access";
-<p>return $GLOBALS['oDB']->OdbcLogon( "northwindDSN", "Northwind", "Admin", "");</td>
-<td>oDB.Use_Access Server.Mappath( "../data/northwind.mdb")
-<p class='comment'>これはデフォルトですので、変更は必要ありません。</td>
-<td>Public const dbDialect = "Access"
-<p class='comment'>これはデフォルトですので、変更は必要ありません。</td>
-<td></td>
-
-<tr><th>Oracle</th>
-<td>
-$oDB->Dialect="Oracle";
-<p>return $GLOBALS['oDB']->OracleLogon( "XE", "northwind", "password");</td>
-<td>oDB.Use_Oracle "XE"</td>
-<td>Public const dbDialect = "Oracle"
-<p class='comment'>サーバ名とパスワードを OpenDB() に設定して下さい。
-<td></td>
-
-<tr><th>DB2</th>
-<td><p class='comment'>サポート外です。</td>
-<td></td>
-<td>Public const dbDialect = "DB2"
-<p class='comment'>サーバ名、ユーザIDとパスワードを OpenDB() に設定して下さい。</td>
-<td></td>
-</tbody>
-</table>
-
-</body>
-</html>
index b750abe..471a2fb 100644 (file)
@@ -9,9 +9,6 @@
 <body>\r
 <h1>Creating a Rico LiveGrid</h1>\r
 \r
 <body>\r
 <h1>Creating a Rico LiveGrid</h1>\r
 \r
-<p><a href='LiveGrid_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>\r
-<a href='LiveGrid_ja.html'>View this page in Japanese</a></p>\r
-\r
 <p>Rico LiveGrid displays data in a scrolling table, with the data buffered in a \r
 2-dimensional JavaScript array. As the user scrolls\r
 vertically through the grid, data is dynamically copied from the array onto the grid.\r
 <p>Rico LiveGrid displays data in a scrolling table, with the data buffered in a \r
 2-dimensional JavaScript array. As the user scrolls\r
 vertically through the grid, data is dynamically copied from the array onto the grid.\r
index d677819..0e78c68 100644 (file)
@@ -21,9 +21,6 @@ dt span {
 <body>
 <h1>Rico LiveGrid AJAX</h1>
 
 <body>
 <h1>Rico LiveGrid AJAX</h1>
 
-<p><a href='LiveGridAjax_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>\r
-<a href='LiveGridAjax_ja.html'>View this page in Japanese</a></p>\r
-\r
 <p>One of the key features of the Rico LiveGrid is its ability to load data dynamically
 via AJAX. This document focuses on the format of the LiveGrid AJAX requests and responses. 
 More specifically, it is the LiveGrid <strong>Buffer</strong> object that is
 <p>One of the key features of the Rico LiveGrid is its ability to load data dynamically
 via AJAX. This document focuses on the format of the LiveGrid AJAX requests and responses. 
 More specifically, it is the LiveGrid <strong>Buffer</strong> object that is
diff --git a/documentation/LiveGridAjax_ja.html b/documentation/LiveGridAjax_ja.html
deleted file mode 100644 (file)
index 2ad1776..0000000
+++ /dev/null
@@ -1,424 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
-<html>\r
-<head>\r
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
-<title>Rico LiveGrid AJAX</title>\r
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">\r
-\r
-<style type="text/css">\r
-.request, .response {\r
-  border: 1px solid black;\r
-  background-color: #FFF8DC;\r
-  padding: 4px;\r
-}\r
-dt span {\r
-  font-weight:normal;\r
-  font-style:italic;\r
-}\r
-</style>\r
-</head>\r
-\r
-<body>\r
-<h1>Rico LiveGrid AJAX</h1>\r
-\r
-<p>Rico LiveGrid の鍵となる特徴の一つは AJAX を通して動的にデータをロードするその能力です。\r
-このドキュメントは、LiveGrid AJAX のリクエストとレスポンスのフォーマットに焦点を合わせます。\r
-より明確には、LiveGrid <strong>バッファ</strong>オブジェクトがリクエストを生成し、レスポンスを処理します。\r
-それで、もし支配外のウェブサービスからデータが来る状況下にいるなら、ウェブサービスと LiveGrid \r
-の間のインタフェースとして用いられるカスタム LiveGrid バッファクラスを作成して下さい。\r
-しかし、このドキュメントでは Rico ディストリビューションに付属するバッファクラスのリクエストと\r
-レスポンスのフォーマットに焦点を合わせます。\r
-\r
-<p>Rico ディストリビューションは 4 つの異なるバッファクラスを含みます。\r
-<dl>\r
-<dt>Rico.Buffer.Base\r
-<dd>AJAX では無い(すなわち XMLHttpRequest の呼び出しの無い)静的なデータセットの利用。\r
-データは HTML テーブル又は javascript 配列からロードされる事が出来ます。\r
-このバッファは AJAX を利用しないので、このドキュメントでこれ以上議論されません。\r
-<dt><a href='#AjaxXML'>Rico.Buffer.AjaxXML</a>\r
-<dd>すべての LiveGrid データは一回の AJAX の呼び出しでロードされ、データは XML フォーマットで返されます\r
-<dt><a href='#AjaxSQL'>Rico.Buffer.AjaxSQL</a>\r
-<dd>LiveGrid のデータは、ユーザがグリッドを通してスクロールすることにより、塊でロードされます\r
-<dt><a href='#AjaxJSON'>Rico.Buffer.AjaxJSON</a>\r
-<dd>レスポンスが JSON フォーマットである事を除いては AjaxSQL と同じです\r
-</dl>\r
-\r
-<h2><a name='AjaxXML'>Rico.Buffer.AjaxXML</a></h2>\r
-\r
-<p>AjaxXML バッファは、LiveGrid でユーザが行うスクロールの量を考慮しないで、\r
-一回の XMLHttpRequest の実行だけを行います。\r
-AjaxXML バッファは以下の javascript を利用して生成されます。\r
-\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxXML(url,options,ajaxOptions)\r
-</pre>\r
-\r
-<dl>\r
-<dt>url\r
-<dd>データプロバイダへの url を含んでいる文字列。\r
-<dt>options\r
-<dd>以下のどれかを含む Rico バッファオプションオブジェクト。\r
-\r
-<dl>\r
-<dt>bufferTimeout\r
-<dd>タイムアウトを示す前に待ちメッセージをユーザに表示すべきミリ秒の数を指定する整数\r
-デフォルトは 20000 (20 秒)。\r
-\r
-<dt>requestParameters\r
-<dd>XMLHttpRequest の検索文字列に加えられる "parm=value" の形の文字列の配列。\r
-\r
-<dt>isEncoded\r
-<dd>レスポンスが HTML エンコードされるかどうかを指定します。デフォルトは true です。\r
-Rico と共に提供されるすべてのプラグインは、レスポンスをエンコードします。\r
-\r
-<dt>waitMsg\r
-<dd>XMLHttpRequest レスポンスを待つ間ユーザに表示されるメッセージ。\r
-デフォルトは RicoTranslate.getPhraseById("waitForData")。\r
-これがイメージタグである事が出来る点に注意して下さい、例えば。\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxXML(\r
-  url,\r
-  {waitMsg: "&lt;img src='MySpinner.gif'&gt;"},\r
-  ajaxOptions);\r
-</pre>\r
-\r
-<dt>canFilter\r
-<dd>バッファがフィルタリングをサポートするかどうかを示す真偽値。デフォルトは true です。\r
-</dl>\r
-\r
-<dt>ajaxOptions\r
-<dd>Prototype の Ajax.Request メソッドに渡す \r
-<a href='http://prototypejs.org/api/ajax/options'>Ajax オプションオブジェクト</a>。\r
-"parameters" と "onComplete" オプションが指定されるならば、Rico によって利用され、\r
-エフェクトを持ちません。\r
-"method" オプションはデフォルトで "get" ですが、オーバーライドされる事が出来ます。\r
-</dl>\r
-\r
-ここに ex3livegridxml.php から取った実例があります。\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxXML('ricoXMLquery.php');\r
-ex3=new Rico.LiveGrid ('ex3', buffer, grid_options);\r
-</pre>\r
-\r
-<h3>AjaxXML リクエスト</h3>\r
-\r
-<p>grid_options.prefetchBuffer が true (それはデフォルトです)なら、グリッドの初期化の間に、\r
-ricoXMLquery.php からデータをフェッチする、一つの XMLHttpRequest が生成されます。\r
-この URL は、以下のクエリーストリング(検索)パラメータを含みます。\r
-\r
-<dl>\r
-<dt>id\r
-<dd>以前の実例 "ex3" の Rico.LiveGrid() の呼び出しで、\r
-最初のパラメータとして指定されたグリッドの id。\r
-<dt>offset\r
-<dd>返さなければならないデータセットの最初のレコード。 AjaxXML では常に "0" です。\r
-<dt>page_size\r
-<dd>データセットで返されなければならないレコードの数。\r
-AjaxXML では常に "-1" で、すべてのレコードが返されなければならない事を意味します。\r
-</dl>\r
-\r
-<p>加えて、options.requestParameters が指定されるならば、それらもまた含まれる事になります。\r
-そして、ex3 のためのデータのフェッチに利用される完全な URL は、次の通りです。\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex3&amp;offset=0&amp;page_size=-1\r
-</pre>\r
-\r
-<h3><a name='AjaxXMLresponse'>AjaxXML レスポンス</a></h3>\r
-\r
-<p>ここに ex3 の LiveGrid を実装するサンプルのレスポンスがあります。\r
-\r
-<pre class='response'>\r
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;\r
-&lt;ajax-response&gt;\r
-  &lt;response type='object' id='ex3_updater'&gt;\r
-    &lt;rows update_ui='true' offset='0'&gt;\r
-    &lt;tr&gt;&lt;td&gt;Data for row 1, cell 1&lt;/td&gt;&lt;td&gt;Data for row 1, cell 2&lt;/td&gt;&lt;/tr&gt;\r
-    &lt;tr&gt;&lt;td&gt;Data for row 2, cell 1&lt;/td&gt;&lt;td&gt;Data for row 2, cell 2&lt;/td&gt;&lt;/tr&gt;\r
-    &lt;/rows&gt;\r
-    &lt;rowcount&gt;2&lt;/rowcount&gt;\r
-    &lt;debug&gt;Generated by test server&lt;/debug&gt;\r
-  &lt;/response&gt;\r
-&lt;/ajax-response&gt;\r
-</pre>\r
-\r
-<p>リクエストハンドラでレスポンスを作成する時に、レスポンスヘッダの content-type に \r
-text/xml を設定しなければなりません。\r
-xml バージョンと<a href='http://www.opentag.com/xfaq_enc.htm'>文字エンコーディング</a>も指定する必要があります。\r
-エンコーディングの値は非常に重要で、環境に依存します。\r
-二つの一般的な値は "UTF-8" と "iso-8859-1" です。\r
-Java Server Pages (JSP) で、最初の 2、3 行がどのように見えるかは、ここにあります。\r
-<pre>\r
-&lt;% response.setHeader(“Content-Type”, “text/xml”); %&gt;\r
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;\r
-</pre>\r
-\r
-そして、これは PHP ではそれらがどのように見えるかです。\r
-<pre>\r
-header("Content-type: text/xml");\r
-echo "&lt;?xml version='1.0' encoding='UTF-8'?"."&gt;\n";\r
-</pre>\r
-\r
-<p>Ajax レスポンスについての、いくつかの重要なアイテムに注意して下さい。\r
-\r
-<p>最初に、レスポンスは &lt;ajax-response&gt;&lt;/ajax-response&gt; タグで囲まれます。\r
-すべての Rico Ajax レスポンスは、返す XML の root に、この要素を持たなければなりません。\r
-第二に、レスポンスは ajax-response の範囲内に含まれる事に注意して下さい。\r
-レスポンスタグ(&lt;response&gt;&lt;/response&gt;)はレスポンスの内容を囲みます。\r
-&lt;response&gt; タグの type と id 属性は、Rico 1.1 では必要とされていましたが、Rico 2.0 では無視されます。\r
-最後に、&lt;rowcount&gt; 要素に注意して下さい。\r
-これはデータセットの総行数を指定します。\r
-AjaxXML レスポンスにおいて、これは &lt;tr&gt; 要素の数と一致するはずです。\r
-\r
-<p>デバッグタグ(&lt;debug&gt;&lt;/debug&gt;)は任意です。\r
-レスポンスはそれらを 0、1、またはそれ以上含むかもしれません。\r
-それぞれのデバッグタグの内容は、Rico の<a href='LiveGrid.html#debug'>メッセージログ機能</a>へ送られます。\r
-Rico プラグインは、ricoXMLquery.php/asp/aspx で ricoXmlResponse.sendDebugMsgs を true に設定することにより、\r
-実行された実際の SQL クエリを返す事が出来ます。\r
-これは、開発の間はとても役に立ちますが、セキュリティーリスク(ユーザに実際のテーブルと列の名前を見せる)\r
-となるので、製品においては削除しなければなりません。\r
-\r
-<p>リクエストの進行中にサーバでエラーが発生するなら、サーバはエラーメッセージを &lt;error&gt;&lt;/error&gt; \r
-タグで囲んでユーザにエラー情報を返す事が出来ます。\r
-例えば。\r
-\r
-<pre class='response'>\r
-&lt;?xml version="1.0" encoding="UTF-8"?&gt;\r
-&lt;ajax-response&gt;\r
-  &lt;response type='object' id='ex3_updater'&gt;\r
-    &lt;rows update_ui='true' offset='0'&gt;\r
-    &lt;/rows&gt;\r
-    &lt;rowcount&gt;0&lt;/rowcount&gt;\r
-    &lt;error&gt;Unable to retrieve the data&lt;/error&gt;\r
-  &lt;/response&gt;\r
-&lt;/ajax-response&gt;\r
-</pre>\r
-\r
-<p>&lt;error&gt; タグが存在すると、いかなる行データや rowcount も無視されます。\r
-このように、エラーを返す時には &lt;rows&gt; と &lt;rowcount&gt; は含まれる事や省略される事が出来ます。\r
-エラーが発生する時、Rico プラグインはデータベース生成エラーを送ります。\r
-\r
-<h2><a name='AjaxSQL'>Rico.Buffer.AjaxSQL</a></h2>\r
-\r
-<p>AjaxSQL バッファは、AjaxXML バッファにより提供される能力を拡張します。\r
-コンセプトの多くは同じですが、AjaxSQL バッファはより複雑です。\r
-クエリ結果は、一回のレスポンスですべての行を返すのでは無く、塊でバッファに返されます。\r
-また、AjaxSQL バッファはサーバ上でフィルタとソートが発生すると考えられます。\r
-そして、フィルタとソートのパラメータはそれぞれのリクエストに送られなくてはならず、\r
-サーバはそれらのパラメータを正しく処理しなければなりません。\r
-幸いにも、Rico プラグインは、あなたのためにこの複雑さを解決します。\r
-\r
-<p>AjaxSQL バッファは以下の javascript を利用して作成されます。\r
-\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxSQL(url,options,ajaxOptions)\r
-</pre>\r
-\r
-ここに ex2simple.php から取った実例があります。\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxSQL(\r
-  'ricoXMLquery.php', \r
-  {TimeOut:&lt;? print array_shift(session_get_cookie_params())/60 ?&gt;});\r
-orderGrid=new Rico.LiveGrid ('ex2', buffer, opts);\r
-</pre>\r
-\r
-<dl>\r
-<dt>url\r
-<dd>データプロバイダへの url を含んでいる文字列。\r
-<dt><a name='AjaxSQLoptions'>options</a>\r
-<dd>以下のどれかを含む Rico バッファオプションオブジェクト。\r
-\r
-<dl>\r
-<dt>bufferTimeout\r
-<dd>タイムアウトを示す前に待ちメッセージをユーザに表示すべきミリ秒の数を指定する整数。\r
-デフォルトは 20000 (20 秒)。\r
-\r
-<dt>requestParameters\r
-<dd>XMLHttpRequest の検索文字列に加えられる "parm=value" の形の文字列の配列。\r
-\r
-<dt>isEncoded\r
-<dd>レスポンスが HTML エンコードされるかどうかを指定します。デフォルトは true です。\r
-Rico と共に提供されるすべてのプラグインは、レスポンスをエンコードします。\r
-\r
-<dt>waitMsg\r
-<dd>XMLHttpRequest レスポンスを待つ間ユーザに表示されるメッセージ。\r
-デフォルトは RicoTranslate.getPhraseById("waitForData")。\r
-これがイメージタグである事が出来る点に注意して下さい、例えば。\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxXML(\r
-  url,\r
-  {waitMsg: "&lt;img src='MySpinner.gif'&gt;"},\r
-  ajaxOptions);\r
-</pre>\r
-\r
-<dt>canFilter\r
-<dd>バッファがフィルタリングをサポートするかどうかを示す真偽値。デフォルトは true です。\r
-\r
-<dt>largeBufferSize\r
-<dd>バッファのサイズを設定するために利用されます。デフォルトは 7 です。\r
-実際のバッファサイズは「(グリッドの表示行数)* largeBufferSize」に設定されますが、少なくとも 50 です。\r
-そして、4 行を表示するグリッドは 50 のサイズの最小のバッファを手にいれますが、\r
-一方 30 行を表示するグリッドは 210 のサイズを持ちます。\r
-\r
-<dt>nearLimitFactor\r
-<dd>ユーザがバッファの最後付近にスクロールした時、データの新しいリクエストのトリガーを決定するのに利用されます。\r
-デフォルトは 1 です。\r
-nearLimit の値は「(グリッドの表示行数)* nearLimitFactor」に設定されます。\r
-\r
-<dt>TimeOut\r
-<dd>Rico プラグインは SQL クエリを\r
-<a href='http://www.talkphp.com/general/1077-understanding-life-session.html'>セッション変数</a>に保管します。\r
-サーバはセッションが有効な間だけはデータのリクエストに返答する事が出来ます。\r
-TimeOut オプションはセッションが存続する時間を測るために利用されます。\r
-option.TimeOut が指定され、document に id が "MyGridId_timer" の html 要素があるなら、\r
-その要素の innerHTML はセッションが存続する時間で実装されます。\r
-TimeOut の値は分で指定され、デフォルトを持ちません。\r
-\r
-<dt><a name='sortParmFmt'>sortParmFmt</a>\r
-<dd>セットされるならば、sortParmFmt は Rico 列オブジェクトの属性の名前でなければなりません。\r
-Rico 1.1 互換のフォーマットでリクエストを生成するために、"displayName" を設定して下さい。\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;...&amp;sort_col=Column0&amp;sort_dir=ASC\r
-</pre>\r
-リクエストをこのフォーマットで生成するために、"index" を設定して下さい。\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;...&amp;sort_col=0&amp;sort_dir=ASC\r
-</pre>\r
-指定しない(デフォルト)時、ソートパラメータは、このフォーマットで送信されます('s' に続く列番号)。\r
-これは、Rico プラグインが期待するものです。\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;...&amp;s0=ASC\r
-</pre>\r
-</dl>\r
-\r
-<dt>ajaxOptions\r
-<dd>Prototype の Ajax.Request メソッドへ渡される <a href='http://prototypejs.org/api/ajax/options'>Ajax オプションオブジェクト</a>。\r
-"parameters" と "onComplete" オプションは Rico によって利用され、指定されたとしても効果がありません。\r
-"method" オプションのデフォルトは "get" ですが、オーバーライドされる事が出来ます。\r
-</dl>\r
-\r
-\r
-\r
-<h3><a name='AjaxSQLrequests'>AjaxSQL リクエスト</a></h3>\r
-\r
-<p>AjaxSQL バッファがより多くのデータを必要とするたびに XMLHttpRequest は生成されます。\r
-offset と page_size パラメータによって指定されるように、データは塊でリクエストされます。\r
-これは、LiveGrid が効率的に何十万ものレコードを表示する事を可能にします。\r
-なぜなら、どんな時でもクライアントサイドバッファに、それらのレコードの小さな部分だけが記録されているからです。\r
-この URL は以下のクエリーストリング(検索)パラメータを含みます。\r
-\r
-<dl>\r
-<dt>id\r
-<dd>以前の実例 "ex2" の Rico.LiveGrid() の呼び出しで、最初のパラメータとして指定されたグリッドの id。\r
-\r
-<dt>offset\r
-<dd>返さなければならないデータセットの最初のレコード。 AjaxXML では常に "0" です。\r
-\r
-<dt>page_size\r
-<dd>データセットで返されなければならないレコードの数。\r
-AjaxXML では常に "-1" で、すべてのレコードが返されなければならない事を意味します。\r
-\r
-<dt>get_total\r
-<dd>true なら、そのレスポンスは、指定されたフィルタと共に(リクエストされた塊だけで無く)\r
-データセットの総行数を含む &lt;rowcount&gt; 要素を含むはずです。\r
-"get_total=true" は、どんな時にユーザがフィルタを変更しても、\r
-グリッドを実装するための最初のリクエストの間に送られます。\r
-\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;...&amp;get_total=true\r
-</pre>\r
-\r
-<dt>sX <span>( X は列の数です)</span>\r
-<dd>列 X によってソートされるべき結果を指定します。\r
-パラメータは ASC または DESC です。\r
-<a href='#sortParmFmt'>options.sortParmFmt</a> も見て下さい。\r
-たとえ、このパラメータのフォーマットが一度に複数列をソートする事を理論的に許すとしても、\r
-それは現在の LiveGrid UI では不可能です。\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;...&amp;s0=ASC\r
-</pre>\r
-\r
-<dt>f[X][op] <span>( X は列の数です)</span>\r
-<dd>列 X に適応されているフィルタオペレータを指定します。\r
-パラメータは以下の内の一つです。EQ(等しい)、NE(等しく無い)、GE(以上)、LE(以下)、LIKE、NULL、NOTNULL\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;...&amp;f[0][op]=EQ\r
-</pre>\r
-\r
-<dt>f[X][len] <span>( X は列の数です)</span>\r
-<dd>供給されているフィルタの値の数を指定します。\r
-これは EQ、GE、LE、そして LIKE フィルタオペレータでは 1 です。\r
-これは NULL そして NOTNULL オペレータでは 0 です。\r
-これは NE では 1 またはそれ以上です。\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;...&amp;f[0][op]=EQ&amp;f[0][len]=1\r
-</pre>\r
-\r
-<dt>f[X][Y] <span>( X は列の数です)</span>\r
-<dd>EQ、NE、GE、LE、そして LIKE フィルタオペレータのフィルタの(複数の)値を指定します。\r
-Y は 0 から f[X][len]-1 の範囲です。\r
-LIKE オペレータでの '*' は ワイルドカードとして扱われ、\r
-それは Rico プラグインによって多くのデータベースのために '%' に変換されます。\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;...&amp;f[0][op]=EQ&amp;f[0][len]=1&amp;f[0][0]=Column0Value\r
-</pre>\r
-</dl>\r
-\r
-<p>加えて、options.requestParameters が指定されるならば、それらもまた含まれる事になります。\r
-そして、ex2 のためのデータのフェッチに利用される完全な URL は、次の通りでしょう。\r
-<pre class='request'>\r
-ricoXMLquery.php?id=ex2&amp;offset=0&amp;page_size=28\r
-</pre>\r
-\r
-\r
-<h3>AjaxSQL レスポンス</h3>\r
-\r
-<p>AjaxSQL レスポンスのフォーマットは、<a href='#AjaxXMLresponse'>AjaxXML レスポンス</a>と全く同じです。\r
-\r
-<h2><a name='AjaxJSON'>Rico.Buffer.AjaxJSON</a></h2>\r
-\r
-<p>AjaxJSON バッファは Jeremy Green により作成された AjaxSQL バッファの拡張です。\r
-AjaxJSON バッファは、以下の javascript を利用して作成されます。\r
-\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxJSON(jsonUrl,options)\r
-</pre>\r
-\r
-<dl>\r
-<dt>url\r
-<dd>JSON データプロバイダへの url を含んでいる文字列。\r
-\r
-<dt>options\r
-<dd>Rico バッファオプションオブジェクト。\r
-AjaxJSON で利用出来る値は <a href='#AjaxSQLoptions'>AjaxSQL</a> のそれらと同じです。\r
-</dl>\r
-\r
-\r
-<h3>AjaxJSON リクエスト</h3>\r
-\r
-<p>AjaxJSON リクエストのフォーマットは、<a href='#AjaxSQLrequests'>AjaxSQL リクエスト</a>と全く同じです。\r
-\r
-\r
-<h3>AjaxJSON レスポンス</h3>\r
-\r
-<p>ここに JSON フォーマットによる LiveGrid レスポンスの実例があります。\r
-\r
-<pre class='response'>\r
-{\r
-  "update_ui":"true",\r
-  "offset":"0",\r
-  "rowCount":"20",\r
-  "rows":[\r
-            {"id":"1","name":"Bob"},\r
-            {"id":"2","name":"Bill"}\r
-         ]\r
-}\r
-</pre>\r
-\r
-<p>そのフォーマットは Rico.Buffer.AjaxSQL バッファによって消費される XML に基づくデータに密接に従い、\r
-そしてそれによってすべての値は返されるべきです。\r
-データオブジェクトの 'rows' の値オブジェクトは、行を表す JS ハッシュであるそれぞれの要素による通常の JS 配列です。\r
-ハッシュの key/value の組み合わせは colName/colValue であるべきです。\r
-\r
-\r
-</body>\r
-</html>\r
index f1f0762..c26bfbb 100644 (file)
@@ -9,9 +9,6 @@
 <body>\r
 <h1>Using Rico LiveGrid Forms</h1>\r
 \r
 <body>\r
 <h1>Using Rico LiveGrid Forms</h1>\r
 \r
-<p><a href='LiveGridForms_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>\r
-<a href='LiveGridForms_ja.html'>View this page in Japanese</a></p>\r
-\r
 <h2>OVERVIEW</h2>\r
 \r
 <p>While this document just refers to ASP, identical functionality is provided\r
 <h2>OVERVIEW</h2>\r
 \r
 <p>While this document just refers to ASP, identical functionality is provided\r
diff --git a/documentation/LiveGridForms_ja.html b/documentation/LiveGridForms_ja.html
deleted file mode 100644 (file)
index 95801fc..0000000
+++ /dev/null
@@ -1,449 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
-<html>\r
-<head>\r
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
-<title>Rico LiveGrid Forms</title>\r
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">\r
-</head>\r
-\r
-<body>\r
-<h1>Rico LiveGrid フォームの利用</h1>\r
-\r
-<h2>概要</h2>\r
-\r
-<p>このドキュメントがちょうど ASP に言及すると同時に、同一の機能が PHP と .net プラグインによって提供されます。\r
-\r
-<ol>\r
-<li>ricoLiveGridForms.vbs を含む、新しい ASP ファイルを作成して下さい。\r
-\r
-<li>新しい ASP で、編集されるテーブルのそれぞれのフィールドを定義して下さい - 通常はフィールドごとに 1-3 行。\r
-\r
-<li>結果として ASP は、適当なグリッドを作成するだけで無く、隠された div に入力フォームを生成します。\r
-\r
-<li>その ASP は "レコードの追加/編集/削除" のエントリもポップアップメニューに追加します。\r
-\r
-<li>追加または編集が選択された時、そのフォームは表示されます(編集が選択されれば、項目が満たされます)\r
-\r
-<li>ユーザが保存ボタンをクリックする時、そのフォームは元の ASP に黙ってポストバックします。\r
-\r
-<li>ASP はデータベースにデータを保存し、クライアントにレスポンスを送り返します。\r
-\r
-<li>クライアントは、成功または失敗のメッセージをブックマークエリアに表示します\r
-</ol>\r
-\r
-<p>以下の二つの図解は、LiveGrid フォームページで、そしてフォームの無い LiveGrid ページで、\r
-どのようにリクエストとレスポンスが流れるかについて表示します。\r
-その二つの図解は ASP/PHP とラベルされていますが、.net にも適用されます(.net には dbClass2 が無い事を除いて)。\r
-<p><img src='images/asp-php-structure1.jpg'>\r
-<p><img src='images/asp-php-structure2.jpg'>\r
-\r
-<h2>使い方</h2>\r
-\r
-<p>このクラスは、一つのテーブルのレコードの表示、挿入、更新そして削除をするのに、\r
-必要なすべての機能を提供します。ASP スクリプトは、次の手順に従わなければなりません。\r
-\r
-\r
-<ol>\r
-<li>クラスのインスタンスを一つ作成して下さい\r
-<pre>set oForm=new TableEditClass</pre>\r
-\r
-<li>SetTableName メソッドを呼んで下さい\r
-<pre>oForm.SetTableName "customer"</pre>\r
-\r
-<li>任意に CanAdd、CanEdit、CanDelete、ConfirmDelete および/または 必要に応じて RecordName プロパティを設定して下さい\r
-<pre>\r
-oForm.options("canAdd")=CanAdd\r
-oForm.options("canEdit")=CanModify\r
-oForm.options("canDelete")=CanDelete\r
-</pre>\r
-<li>TableName がビューであるか、またはプライマリーキーが定義されていない場合、編集は利用不能です\r
-<li>テーブルとフォームビューに見えるフィールドを、次の例外と共に、フィールドおよび列に表示するために、 \r
-      AddEntryField または AddCalculatedField を呼んで下さい。\r
-<ul>\r
-<li>エントリタイプ H は、決してクライアントへ送信されません。定義されたデフォルト値を取得してデータベースへ書き込みます。\r
-<li>FormView フィールドプロパティに "exclude" がセットされていれば、そのフィールドはテーブルだけに表示されます。\r
-<li>FormView フィールドプロパティに "hidden" がセットされていれば、そのデータは隠れたフォームフィールドに設定されます。\r
-<li>計算されたフィールドはテーブルビューにだけ表示されます(FormView=exclude と同じです)\r
-</ul>\r
-\r
-<li>AddEntryField または AddCalculatedField のそれぞれの呼び出しの後、他のメソッドとプロパティは、\r
-      どのようにしてユーザにフィールドを表示するかを、コントロールするために起動する事が出来ます(例えば SortAsc)\r
-      これらのプロパティおよびメソッドの呼び出しは、最も最近追加されたフィールドのみに適用されます。\r
-<li>DisplayPage を呼び出します - これはグリッドを表示するか、データベースの更新を実行します。\r
-<pre>oForm.DisplayPage</pre>\r
-</ol>\r
-\r
-\r
-<h2>タブフォーム</h2>\r
-\r
-<p>複数パネルや複数タブを持つフォームは Rico アコーディオンクラスを利用して、完全にサポートされます。\r
- そのパネルのフィールドを定義するために、AddEntryField を呼ぶ前に、単に AddPanel を呼ぶだけです。\r
- 例えば。\r
-<pre>\r
-' these fields appear on the first panel\r
-oForm.AddPanel "Panel #1"\r
-oForm.AddEntryField "field1", "Field #1", "T", ""\r
-oForm.AddEntryField "field2", "Field #2", "T", ""\r
-oForm.AddEntryField "field3", "Field #3", "T", ""\r
-\r
-' these fields appear on the second panel\r
-oForm.AddPanel "Panel #2"\r
-oForm.AddEntryField "field4", "Field #4", "T", ""\r
-oForm.AddEntryField "field5", "Field #5", "T", ""\r
-oForm.AddEntryField "field6", "Field #6", "T", ""\r
-</pre>\r
-\r
-<p>あるいは panelIdx プロパティは、それが定義されるように、それぞれのフィールドにセットされる事が出来ます。\r
-この場合、DisplayPage の前にいつでも AddPanel は呼ばれる事が出来ます。\r
-<pre>\r
-' these fields appear on the first panel\r
-oForm.AddEntryField "field1", "Field #1", "T", ""\r
-oForm.CurrentField("panelIdx")=0\r
-oForm.AddEntryField "field2", "Field #2", "T", ""\r
-oForm.CurrentField("panelIdx")=0\r
-oForm.AddEntryField "field3", "Field #3", "T", ""\r
-oForm.CurrentField("panelIdx")=0\r
-\r
-' these fields appear on the second panel\r
-oForm.AddEntryField "field4", "Field #4", "T", ""\r
-oForm.CurrentField("panelIdx")=1\r
-oForm.AddEntryField "field5", "Field #5", "T", ""\r
-oForm.CurrentField("panelIdx")=1\r
-oForm.AddEntryField "field6", "Field #6", "T", ""\r
-oForm.CurrentField("panelIdx")=1\r
-\r
-oForm.AddPanel "Panel #1"\r
-oForm.AddPanel "Panel #2"\r
-</pre>\r
-\r
-\r
-<h2>フォームメソッド</h2>\r
-<dl>\r
-  <dt>AddPanel "パネルの見出し"\r
-  <dd>入力フォーム上で、タブパネルのための見出しを定義します。\r
-\r
-  <dt>DisplayPage\r
-  <dd>グリッドを表示するか、"action" の値に応じてデータベースを更新します。\r
-\r
-  <dt><a name='DefineAltTable'></a>DefineAltTable (TableName, FieldList, FieldData, Delim)\r
-  <dd>次の <a href='#AltTable'>AltTable</a> の呼び出しで利用される TabId を返す関数。\r
-  関連のあるフィールドの追加を記録するために、二番目のテーブルを定義して下さい。\r
-  メインテーブルのキーフィールド(達)も、 AltTable に存在べきです。\r
-  FieldList と FieldData は、二番目のテーブルに記録される定数や固定された関数を、\r
-  追加で定義する区切られた文字列です。\r
-  Delim は、FieldList と FieldData で利用されるデリミタキャラクタを定義します。\r
-  FieldList と FieldData は、同じ数の区切られたエントリを含まなければなりません。\r
-\r
-  <dt>genXHTML\r
-  <dd>純粋な XHTML アウトプットを生成するために呼び出して下さい。\r
-\r
-  <dt>SetDbConn (dbcls)\r
-  <dd>dbClass を利用するためのインスタンスを定義します\r
-  oDB と言う名前のグローバルインスタンスが存在するのなら、このメソッドの呼び出しをしないでも利用する事が出来るでしょう。\r
-</dl>\r
-\r
-\r
-<h2>フォームプロパティ</h2>\r
-\r
-<p>これら LiveGrid フォーム特有のものに加えて、すべての <a href="LiveGrid.html#options">LiveGrid</a> のオプションはプロパティとしてサポートされています。\r
-\r
-<dl>\r
-\r
-<dt>action (read only)\r
-<dd>実行されているカレントアクションを指定します。table、ins、upd、del\r
-\r
-<dt>gridVar (read only)\r
-<dd>クライアントサイドの LiveGrid オブジェクトの名前を返します\r
-\r
-<dt>bufferVar (read only)\r
-<dd>クライアントサイドの LiveGrid バッファオブジェクトの名前を返します\r
-\r
-<dt>AutoInit\r
-<dd>自動的にグリッドを初期化します(データの行を作成)\r
-    デフォルトは true です\r
-\r
-<dt>InitScript (read only)\r
-<dd>グリッドを初期化するための javascript コードを(文字列として)返します(AutoInit が false の時に利用する)\r
-\r
-<dt>TableFilter\r
-<dd>テーブルビューで利用される節がどこかを指定します(オプションの)\r
-<pre>\r
-// only show records for the logged in user\r
-$oForm->TableFilter = "userid=$myuserid";\r
-</pre>\r
-\r
-<dt>canAdd\r
-<dd>ユーザが新しいレコードを追加する事を許可する、デフォルトは true\r
-<dt>canEdit\r
-<dd>ユーザがレコードを編集する事を許可する、デフォルトは true\r
-<dt>canDelete\r
-<dd>ユーザがレコードを削除する事を許可する、デフォルトは true\r
-<dt>canClone\r
-<dd>ユーザがレコードを複製する事を許可する(既存のレコードの編集するが、新規で保存する)デフォルトは false\r
-\r
-<dt>updateURL\r
-<dd>この位置へのポストアップデートを行います、デフォルトはグリッドを生成したページ\r
-\r
-<dt>ConfirmDelete\r
-<dd>ユーザが削除ボタンをクリックした後で、確認のポップアップを表示するかどうかを指定するフラグ、\r
-    デフォルトは true \r
-    (<a href='#ConfirmDeleteCol'>ConfirmDeleteCol</a> も見て下さい)\r
-\r
-<dt>DebugFlag\r
-<dd>デバッグメッセージを表示します、デフォルトは false\r
-\r
-<dt>RecordName\r
-<dd>追加、編集および削除タイトルタグのカスタマイズ用の文字列、\r
-    デフォルトは "Record"\r
-\r
-<dt>SelectMaxLen\r
-<dd>セレクトボックスの文字数の最大値、デフォルトは 50。\r
-\r
-<dt>TableName (write only)\r
-<dd>表示/編集されるテーブルまたはビュー(必須)\r
-\r
-<dt>TableSelectNew\r
-<dd>EntryType が N のフィールドの、新しい値を作成するためにユーザが選択した時に、\r
-識別するために用いる文字列。デフォルトは "___new___"。\r
-\r
-<dt>showSaveMsg\r
-<dd>データベースの更新レスポンスの処理。\r
-<ul>\r
-<li>full - すべてのレスポンスを表示する\r
-<li>errors - エラーに関するすべてのレスポンスか、そうで無い場合は短いレスポンスを表示する(デフォルト)\r
-</ul>\r
-</dd>\r
-\r
-<dt style='color:navy;'><em>入力フォームで、タブパネルを利用する時。</em>\r
-\r
-<dt>panelWidth\r
-<dd>タブパネルのピクセル単位の幅。デフォルトは 500。\r
-\r
-<dt>panelHeight\r
-<dd>タブパネルのピクセル単位の高さ。デフォルトは 200。\r
-\r
-<dt>hoverClass\r
-<dd>タブパネルの上をホバーする時の CSS クラス。デフォルトは "tabHover"。\r
-\r
-<dt>selectedClass\r
-<dd>タブパネルを選択する時の CSS クラス。デフォルトは "tabHover"。\r
-\r
-</dl>\r
-\r
-\r
-<h2>フォームイベント</h2>\r
-\r
-<p>いくつかのフォームイベントをフックする事が可能です。\r
-\r
-<dl>\r
-<dt>formOpen\r
-<dd>入力フォームが表示される時、始動します。\r
-<pre>\r
-oForm.options("formOpen")=\r
-  "alert('Questions? Please call the support desk.');"\r
-</pre>\r
-\r
-<dt>formClose\r
-<dd>入力フォームが閉じられてすぐに、始動します。\r
-\r
-<dt>onSubmitResponse\r
-<dd>フォームがサーバに送信され、レスポンスを受け取って処理された後で、起動されます。\r
-\r
-</dl>\r
-\r
-\r
-<h2>フィールド定義メソッド</h2>\r
-<dl>\r
-<dt>AddEntryField (ColumnName, Heading, EntryTypeCode, DefaultValue)\r
-<dd>グリッドへ新しい列と、ASP と PHP でのポップアップフォームにより新しいエントリフィールドを追加します。\r
-  <dl>\r
-\r
-  <dt>ColumnName\r
-  <dd>データベーステーブルの列名(空白や角括弧を含む SQL をサポートしません、例えば [Apr 2005] )\r
-\r
-  <dt>Heading\r
-  <dd>グリッドの列見出しやポップアップフォーム上に現れる名前\r
-\r
-  <dt>EntryTypeCode\r
-  <dd>どのように入力フォーム上に列が表示されるかについて、コントロールするコードを含む文字列\r
-\r
-    <ul>\r
-    <li><strong>S</strong>:\r
-    データエントリ中のドロップダウンセレクトリストとして、この列を表示します。\r
-    "SelectValues" または "SelectSql" オプションを利用して指定された値です。\r
-    どちらも指定されなければ、列の値は "select distinct" クエリを利用して得られます。\r
-    <li><strong>R</strong>: ラジオボタンを利用してアイテムが表示される以外は "S" と同じです。\r
-    <li><strong>SL,RL</strong>: \r
-    テーブルビューに検索された値を表示する以外は、S & R と同じです\r
-    (SelectSql により指定されたクエリを利用して)。\r
-    外部キーの列で典型的に利用されます。\r
-    表示する値を取得するための SQL は "SelectSql" オプションを利用して指定します。\r
-    <li><strong>CL</strong>: \r
-    カスタムコントロールを利用して値が選択される以外は "SL" と同じです\r
-    (Rico ツリーコントロールのような)。\r
-    SelectCtl オプションは、カスタムコントロールの id を割り当てられるべきです。\r
-    <li><strong>N</strong>:\r
-    "S" と同じですが、ユーザが新しい値を作成する事を許します。\r
-    典型的には "SelectValues" または "SelectSql" オプション <em>無し</em> で利用されます。\r
-    <li><strong>H</strong>:   列はユーザから隠されます(DefaultValue が、追加と編集でテーブルに保管されます)\r
-    <li><strong>D</strong>:   これはデータフィールドです(列が null を許していたら、空白が許されます)\r
-    <li><strong>DT</strong>:  時間も含む以外は D と同じです\r
-    <li><strong>I</strong>:   整数値(列が null を許していて、false が必要とされるなら、空白が許されます)\r
-    <li><strong>F</strong>:   浮動小数点数(列が null を許していて、false が必要とされるなら、空白が許されます)\r
-    <li><strong>B</strong>:   空白の無いテキストフィールド(フィールドが空で保存をクリックするとき、ユーザはフォームビューでのポップアップメッセージを取得します)\r
-    <li><strong>T</strong>:   標準テキストフィールド(空白が許されます)\r
-    <li><strong>TA</strong>:  テキストエリアフィールド\r
-    <li><strong>tinyMCE</strong>:  <a href="http://tinymce.moxiecode.com/">tinyMCE</a> \r
-    ライブラリを利用するリッチテキスト編集フィールド。\r
-    </ul>\r
-\r
-  <dt>DefaultValue\r
-  <dd>フォームビューでの列のデフォルト値\r
-  </dl>\r
-\r
-  <p>.net で AddEntryField() と同等なのは、マークアップの一部として列フィールドを宣言する事です。\r
-  "ColData" 属性はデフォルト値を含みます。\r
-  ex2edit.aspx からの例は、ここにあります。\r
-<pre>\r
-&lt;Rico:Column runat='server' heading='Order#' width='60' \r
-             ColName='OrderID' EntryType='B' ColData='&lt;auto&gt;' /&gt;\r
-</pre>\r
-\r
-<dt>AddEntryFieldW (ColumnName, Heading, EntryTypeCode, DefaultValue, ColWidth)\r
-<dd>列の(ピクセルでの)幅のためのエクストラパラメータが追加される以外は AddEntryField と同じです。\r
-\r
-<dt>AddCalculatedField (ColumnFormula, Heading)\r
-<dd>ColumnFormula は、どれも妥当な SQL 式またはサブクエリです。\r
-    サブクエリが表示されているテーブルの列への参照を必要としているなら、\r
-    列名はエイリアス "t." で始まらなくてはなりません\r
-    計算されたフィールドは、フォームビューでは無く、テーブルビューに表示されます。\r
-\r
-<dt>AddFilterField (ColumnName, FilterValue)\r
-<dd>ColumnName=FilterValue の内容のレコードを表示するだけです。\r
-    隠れたフィールドになります(エントリタイプ H)。\r
-\r
-<dt><a name='ConfirmDeleteCol'></a>ConfirmDeleteCol\r
-<dd>最も最近追加された列の内容は、削除確認メッセージに含まれます\r
-\r
-<dt>SortAsc\r
-<dd>テーブルビューにて昇順で列をソートします(最も最近追加されたフィールドに適応されます)\r
-\r
-<dt>SortDesc\r
-<dd>テーブルビューにて降順で列をソートします(最も最近追加されたフィールドに適応されます)\r
-\r
-</dl>\r
-\r
-\r
-<h2>フィールド定義プロパティ</h2>\r
-\r
-<p>これらの LiveGrid フォーム特有のものに加えて、すべての <a href="LiveGrid.html#column">LiveGrid</a> 列プロパティはサポートされます。\r
-\r
-<dl>\r
-\r
-<dt>AddQuotes\r
-<dd>false で、データベースに挿入するか更新する時は、列の値はバッククォートで囲まれません\r
-    (デフォルト=true)\r
-    これは SQL 関数呼び出しで、列を実装する事を可能にします。例えば。\r
-<pre>\r
-oForm.AddEntryField "LastEditUser","","H","suser_sname()"\r
-oForm.CurrentField("AddQuotes")=false\r
-oForm.AddEntryField "LastEditDate","","H","getdate()"\r
-oForm.CurrentField("AddQuotes")=false\r
-</pre>\r
-\r
-<dt>required\r
-<dd>入力フィールドが空のままにしてもよいかどうかを指定する真偽値です\r
-(デフォルトは、 列が null を許して EntryType が "B" で無ければ false 、そうで無い場合は true です)。\r
-  \r
-<dt><a name='AltTable'></a>AltTable (TabId)\r
-<dd>代わりのテーブルにフィールドは保存されるべきである事を指定し、\r
-    TabId は以前の <a href='#DefineAltTable'>DefineAltTable</a> の呼び出しによって返される値でなければなりません。\r
-\r
-<dt>TxtAreaRows\r
-<dd>エントリタイプが "TA" の列のための、フォームビューの時に\r
-    テキストエリアに表示する行数です(デフォルト 4)\r
-\r
-<dt>FilterFlag\r
-<dd>true なら、グリッドはその列のデフォルト値によってフィルタされます(デフォルト = false)\r
-\r
-<dt>TxtAreaCols\r
-<dd>エントリタイプが "TA" の列のための、フォームビューの時に\r
-    テキストエリアに表示する列数です(デフォルト 80)\r
-\r
-<dt>Help\r
-<dd>指定されたテキストを含んでいるタイトルタグを作成します(フォームビューのみ)。\r
-そして、ユーザがフィールドラベルの上をホバーするなら、バルーンヘルプとしてこのテキストを見るでしょう。例えば。\r
-<pre>\r
-oForm.CurrentField("Help")="Date must be entered in mm/dd/yyyy format"\r
-</pre>\r
-\r
-<dt>pattern\r
-<dd>正規表現を含んでいる文字列。\r
-ユーザエントリは、その指定されたパターンにマッチする事を確実にするためにチェックされます。\r
-少しの特別な値があります。\r
-<ul>\r
-<li>"email" - メールアドレスを検証するためのテスト\r
-<li>"float-unsigned" - 符号無し浮動小数点(実)数を検証するためのテスト\r
-<li>"float-signed" - 符号付き浮動小数点(実)数を検証するためのテスト(EntryType が "F" の時、これがデフォルトです)\r
-<li>"int-unsigned" - 符号無し整数を検証するためのテスト\r
-<li>"int-signed" - 符号付き整数を検証するためのテスト(EntryType が "I" の時、これがデフォルトです)\r
-</ul>\r
-<br>いつでも、パターンを指定するヘルプエントリが含まれる事が推薦されます。\r
-フィールドが検証に失敗したなら、そのヘルプテキストは、ユーザに表示されるエラーメッセージに含まれます。\r
-例えば。\r
-<pre>\r
-oForm.CurrentField("Help")="Enter date as mm/dd/yyyy"\r
-oForm.CurrentField("pattern")="^\\d{1,2}/\\d{1,2}/\\d{4}$"\r
-</pre>\r
-\r
-<dt>min/max\r
-<dd>EntryType が "I" 、"F" 、そして "D" のフィールドの、最大/最少の許される値を指定します。\r
-例えば。\r
-<pre>\r
-oForm.AddEntryField "field1", "Field #1", "I", "0"\r
-oForm.CurrentField("min")=1\r
-oForm.CurrentField("max")=10\r
-oForm.CurrentField("Help")="Enter a value between 1 and 10"\r
-\r
-oForm.AddEntryField "field2", "Field #2", "D", Date()\r
-oForm.CurrentField("min")="2000-01-01"\r
-oForm.CurrentField("max")="2099-12-31"\r
-oForm.CurrentField("Help")="Enter a value in the 21st century!"\r
-</pre>\r
-\r
-<dt>InsertOnly\r
-<dd>挿入を実行する時は、データベースに単にこのフィールドを書いて下さい(デフォルト=false)。\r
-<pre>\r
-oForm.AddEntryField "CreateDate","","H","getdate()"\r
-oForm.CurrentField("AddQuotes")=false\r
-oForm.CurrentField("InsertOnly")=true\r
-</pre>\r
-\r
-<dt>UpdateOnly\r
-<dd>更新を実行する時は、データベースに単にこのフィールドを書いて下さい(デフォルト=false)。\r
-<pre>\r
-oForm.CurrentField("UpdateOnly")=true\r
-</pre>\r
-\r
-<dt>ReadOnly\r
-<dd>true なら、データはエントリフォームで表示されますが、変更は出来ず、テキストは灰色です(デフォルト = false)。\r
-\r
-<dt>SelectValues\r
-<dd>N、S、そして R の EntryType  のために、ユーザをフォームビューに案内する選択を指定して下さい。\r
-    供給されるなら、カンマで区切られた値の文字列で無ければなりません。例えば。\r
-<pre>\r
-oForm.CurrentField("SelectValues")="Y,N"\r
-</pre>\r
-\r
-<dt>SelectSql\r
-<dd>SL 、CL 、そして RL の EntryType のために、SQL 検索ステートメントを指定します。\r
-    その検索ステートメントは 2 つの列を返さなければなりません。\r
-    一つ目はコードで、そして二つ目は値または説明のテキストです。例えば。\r
-<pre>\r
-oForm.CurrentField("SelectSql")="select ID,Name from Customers"\r
-</pre>\r
-\r
-</dl>\r
-\r
-</body>\r
-</html>\r
diff --git a/documentation/LiveGrid_ja.html b/documentation/LiveGrid_ja.html
deleted file mode 100644 (file)
index 2c8fba1..0000000
+++ /dev/null
@@ -1,1156 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
-<html>\r
-<head>\r
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">\r
-<title>Rico LiveGrid</title>\r
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css" />\r
-</head>\r
-\r
-<body>\r
-<h1>Rico LiveGrid の作成</h1>\r
-\r
-<p>Rico LiveGrid は 2 次元の JavaScript 配列でデータをバッファリングして、スクロールするテーブルにデータを表示します。\r
-ユーザがグリッドを垂直にスクロールする事によって、データは配列からグリッド上へ動的にコピーされます。\r
-バッファは次の項目からロードされる事が出来ます。\r
-<ol>\r
-<li><a href='#model1'>javascript 配列</a>\r
-<li><a href='#model2'>HTML テーブル</a>\r
-<li><a href='#model3'>XML ファイル</a>\r
-<li><a href='#model4'>SQL データベースクエリ</a>\r
-<li><a href='#model5'>カスタム javascript コールバック関数</a>\r
-</ol>\r
-\r
-\r
-<h2><a name='model1'>利用モデル 1: javascript 配列からのデータのロード</a></h2>\r
-\r
-<ul><li>javascript 配列へ表示されるデータをロードして下さい。\r
-<pre>\r
-  var myData = [\r
-    [1,'Cell 1:2','Cell 1:3','Cell 1:4','Cell 1:5'],\r
-    [2,'Cell 2:2','Cell 2:3','Cell 2:4','Cell 2:5'],\r
-    [3,'Cell 3:2','Cell 3:3','Cell 3:4','Cell 3:5'],\r
-    [4,'Cell 4:2','Cell 4:3','Cell 4:4','Cell 4:5']\r
-  ];\r
-</pre>\r
-\r
-<li>グリッドを表示するのに必要な Rico javascript と css ファイルをロードして下さい。\r
-<pre>\r
-Rico.loadModule('LiveGrid','LiveGridMenu','greenHdg.css');\r
-</pre>\r
-<dl>\r
-<dt>LiveGrid\r
-<dd>これは、静的なバッファ( AJAX では無い)で LiveGrid を表示するのに必要な Rico javascript と css ファイルをロードします。\r
-<dt>LiveGridMenu\r
-<dd>これは、デフォルトのグリッドメニューをロードします。\r
-このメニューは、LiveGrid で出来る事の全てにアクセスする方法を提供します。\r
-それは選択された列と使用されるバッファのタイプに基づく、ユーザに提示された選択項目を調整します。\r
-メニュー無しでグリッドを使用するか、またはアプリケーションの必要性によりカスタマイズされた独自のメニューを作成するかを、選ぶことが出来ます。\r
-<dt>greenHdg.css\r
-<dd>Rico は、いくつかのサンプルグリッドスタイルを持っています。\r
-coffee-with-milk、grayedout、greenHdg、iegradient (Internet Explorer 専用)、tanChisel、そして warmfall。\r
-あなたは、含まれているスタイルの 1 つを選ぶか、独自の物を作成するかを選ぶでしょう。\r
-</dl>\r
-\r
-<li>テーブルのデータ列を Rico バッファオブジェクトにロードして下さい。\r
-<pre>\r
-  var buffer=new Rico.Buffer.Base();\r
-  buffer.loadRowsFromArray(myData);\r
-</pre>\r
-\r
-<li>グリッドの見出しを含む、グリッドのオプションを定義して下さい。\r
-<pre>\r
-  var opts = {  \r
-    useUnformattedColWidth: false,\r
-    defaultWidth : 90,\r
-    visibleRows  : 'data',\r
-    frozenColumns: 1,\r
-    columnSpecs  : [{Hdg:'Column 1',type:'number', ClassName:'alignright'},\r
-                    {Hdg:'Column 2'},\r
-                    {Hdg:'Column 3'},\r
-                    {Hdg:'Column 4'},\r
-                    {Hdg:'Column 5'}]\r
-  };\r
-</pre>\r
-\r
-<li>グリッド、Rico.Buffer インスタンス、およびグリッドオプションのためにベース id を渡して、LiveGrid をインスタンス化してください。\r
-\r
-<pre>\r
-  var ex1=new Rico.LiveGrid ('ex1', buffer, opts);\r
-</pre>\r
-\r
-<li>グリッドのためのデフォルトポップアップメニューを利用可能にするために、グリッドのメニューのプロパティを Rico.GridMenu のインスタンスに割り当てて下さい。\r
-\r
-<pre>\r
-  ex1.menu=new Rico.GridMenu();\r
-</pre>\r
-\r
-<li>Rico.loadModule は、window.onload イベントの終了<em>後</em>に実行されると思います。\r
-あなたは Rico.onLoad メソッドに初期化関数を渡さなければなりません、なぜなら、Rico モジュールがロードされた後で、グリッドの初期化が実行される事を確実なものにするためです。\r
-javascript のすべてをまとめると、このようになります。\r
-<pre>\r
-&lt;script type='text/javascript'&gt;\r
-Rico.loadModule('LiveGrid','LiveGridMenu','greenHdg.css');\r
-\r
-Rico.onLoad( function() {\r
-  var myData = [\r
-    [1,'Cell 1:2','Cell 1:3','Cell 1:4','Cell 1:5'],\r
-    [2,'Cell 2:2','Cell 2:3','Cell 2:4','Cell 2:5'],\r
-    [3,'Cell 3:2','Cell 3:3','Cell 3:4','Cell 3:5'],\r
-    [4,'Cell 4:2','Cell 4:3','Cell 4:4','Cell 4:5']\r
-  ];\r
-  var opts = {  \r
-    useUnformattedColWidth: false,\r
-    defaultWidth : 90,\r
-    visibleRows  : 'data',\r
-    frozenColumns: 1,\r
-    columnSpecs  : [{Hdg:'Column 1',type:'number', ClassName:'alignright'},\r
-                    {Hdg:'Column 2'},\r
-                    {Hdg:'Column 3'},\r
-                    {Hdg:'Column 4'},\r
-                    {Hdg:'Column 5'}]\r
-  };\r
-  var buffer=new Rico.Buffer.Base();\r
-  buffer.loadRowsFromArray(myData);\r
-  var ex1=new Rico.LiveGrid ('ex1', buffer, opts);\r
-  ex1.menu=new Rico.GridMenu();\r
-});\r
-&lt;/script&gt;\r
-</pre>\r
-\r
-<li>最後に、グリッドを実行すべき位置に、HTML マークアップ に div 要素を配置して下さい。\r
-ブックマークのためのマークアップを含む事により、グリッドのスクロール位置が表示されます。\r
-<pre>\r
-&lt;p class="ricoBookmark"&gt;&lt;span id="ex1_bookmark"&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;\r
-&lt;div id="ex1"&gt;&lt;/div&gt;\r
-</pre>\r
-\r
-\r
-\r
-</ul>\r
-\r
-\r
-<h2><a name='model2'>利用モデル 2: HTML テーブルからのデータのロード</a></h2>\r
-\r
-<ul><li>見出しは <code>&lt;thead&gt;</code> セクションにより、データは <code>&lt;tbody&gt;</code> セクションにより、HTML テーブルを定義して下さい。\r
-ブックマークのためのマークアップを含む事により、グリッドのスクロール位置が表示されます。\r
-<pre>\r
-&lt;p class="ricoBookmark"&gt;&lt;span id="data_grid_bookmark"&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;\r
-&lt;table id="data_grid"&gt;\r
-  &lt;thead&gt;\r
-\r
-  &lt;tr&gt;\r
-    &lt;th&gt;First column name&lt;/th&gt;\r
-    &lt;th&gt;Second column name&lt;/th&gt;\r
-    ...\r
-    &lt;th&gt;Last column name&lt;/th&gt;\r
-  &lt;/tr&gt;\r
-\r
-  &lt;/thead&gt;\r
-\r
-  &lt;tbody&gt;\r
-\r
-  &lt;tr&gt;\r
-    &lt;td&gt;Row 1, column 1 data&lt;/td&gt;\r
-    &lt;td&gt;Row 1, column 2 data&lt;/td&gt;\r
-    ...\r
-    &lt;td&gt;Row 1, last column data&lt;/td&gt;\r
-  &lt;/tr&gt;\r
-\r
-  &lt;tr&gt;\r
-    &lt;td&gt;Row 2, column 1 data&lt;/td&gt;\r
-    &lt;td&gt;Row 2, column 2 data&lt;/td&gt;\r
-    ...\r
-    &lt;td&gt;Row 2, last column data&lt;/td&gt;\r
-  &lt;/tr&gt;\r
-\r
-  ...\r
-\r
-  &lt;tr&gt;\r
-    &lt;td&gt;Row n, column 1 data&lt;/td&gt;\r
-    &lt;td&gt;Row n, column 2 data&lt;/td&gt;\r
-    ...\r
-    &lt;td&gt;Row n, last column data&lt;/td&gt;\r
-  &lt;/tr&gt;\r
-\r
-  &lt;/tbody&gt;\r
-&lt;/table&gt;\r
-</pre>\r
-\r
-<li>グリッドを表示するために必要な Rico javascript と css ファイルをロードして下さい。\r
-<pre>\r
-Rico.loadModule('LiveGrid','LiveGridMenu','greenHdg.css');\r
-</pre>\r
-<dl>\r
-<dt>LiveGrid\r
-<dd>これは、静的なバッファ( AJAX では無い)で LiveGrid を表示するのに必要な Rico javascript と css ファイルをロードします。\r
-<dt>LiveGridMenu\r
-<dd>これは、デフォルトのグリッドメニューをロードします。\r
-このメニューは、LiveGrid で出来る事の全てにアクセスする方法を提供します。\r
-それは選択された列と使用されるバッファのタイプに基づく、ユーザに提示された選択項目を調整します。\r
-メニュー無しでグリッドを使用するか、またはアプリケーションの必要性によりカスタマイズされた独自のメニューを作成するかを、選ぶことが出来ます。\r
-<dt>greenHdg.css\r
-<dd>Rico は、いくつかのサンプルグリッドスタイルを持っています。\r
-coffee-with-milk、grayedout、greenHdg、iegradient (Internet Explorer 専用)、tanChisel、そして warmfall。\r
-あなたは、含まれているスタイルの 1 つを選ぶか、独自の物を作成するかを選ぶでしょう。\r
-</dl>\r
-\r
-<li>テーブルのデータ列を Rico バッファオブジェクトにロードして下さい。\r
-<pre>\r
-var buffer = new Rico.Buffer.Base($('data_grid').tBodies[0]);\r
-</pre>\r
-\r
-<li>最後に、HTML テーブルの DOM の id とオプションを Rico.Buffer インスタンス に渡して\r
-(これは、 LiveGrid がテーブルの thead セクションから列の見出しをロードするのを許可します)、\r
-LiveGrid を初期化します\r
-(この場合、最初の列の幅は 50 ピクセル、2 番目の列は 80 ピクセルの幅となります)。\r
-\r
-<pre>\r
-var grid_options = { columnSpecs: [ {width:50}, {width:80} ] };\r
-var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);\r
-</pre>\r
-\r
-<li>Rico.loadModule は、window.onload イベントの終了<em>後</em>に実行されると思います。\r
-あなたは Rico.onLoad メソッドに初期化関数を渡さなければなりません、\r
-なぜなら、Rico モジュールがロードされた後で、グリッドの初期化が実行される事を確実なものにするためです。\r
-javascript のすべてをまとめると、このようになります。\r
-\r
-<pre>\r
-&lt;script type='text/javascript'&gt;\r
-Rico.loadModule('LiveGrid','LiveGridMenu','greenHdg.css');\r
-\r
-Rico.onLoad( function() {\r
-  var buffer = new Rico.Buffer.Base($('data_grid').tBodies[0]);\r
-  var grid_options = { columnSpecs: [width:50, width:80] };\r
-  var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);\r
-});\r
-&lt;/script&gt;\r
-</pre>\r
-\r
-</ul>\r
-\r
-\r
-<h2><a name='model3'>利用モデル 3: XML ファイルからのデータのロード</a></h2>\r
-\r
-<ul><li>テーブルのヘッダセルを持ち、テーブルのボディセルは持たない、HTML テーブルを定義して下さい。\r
-ブックマークのためのマークアップを含む事により、グリッドのスクロール位置が表示されます。\r
-<pre>\r
-&lt;p class="ricoBookmark"&gt;&lt;span id="data_grid_bookmark"&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;\r
-&lt;table id="data_grid"&gt;\r
-  &lt;tr&gt;\r
-\r
-    &lt;th&gt;First column name&lt;/th&gt;\r
-    &lt;th&gt;Second column name&lt;/th&gt;\r
-\r
-  &lt;/tr&gt;\r
-&lt;/table&gt;\r
-</pre>\r
-\r
-<li>グリッドを表示するために必要な Rico javascript と css ファイルをロードして下さい。\r
-<pre>\r
-Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');\r
-</pre>\r
-<dl>\r
-<dt>LiveGridAjax\r
-<dd>これは、AJAX 対応のバッファで LiveGrid を表示するのに必要な Rico javascript と css ファイルをロードします。\r
-<dt>LiveGridMenu\r
-<dd>これは、デフォルトのグリッドメニューをロードします。\r
-このメニューは、LiveGrid で出来る事の全てにアクセスする方法を提供します。\r
-それは選択された列と使用されるバッファのタイプに基づく、ユーザに提示された選択項目を調整します。\r
-メニュー無しでグリッドを使用するか、またはアプリケーションの必要性によりカスタマイズされた独自のメニューを作成するかを、選ぶことが出来ます。\r
-<dt>greenHdg.css\r
-<dd>Rico は、いくつかのサンプルグリッドスタイルを持っています。\r
-coffee-with-milk、grayedout、greenHdg、iegradient (Internet Explorer 専用)、tanChisel、そして warmfall。\r
-あなたは、含まれているスタイルの 1 つを選ぶか、独自の物を作成するかを選ぶでしょう。\r
-</dl>\r
-\r
-<li>データをフェッチしてテーブルを実装するために、Rico バッファを作成して下さい。\r
-AjaxXML バッファは、グリッドのスタートアップで提供された URL に、一つだけのデータのリクエストを行います。\r
-<pre>\r
-var buffer = new Rico.Buffer.AjaxXML('/controller/action?format=xml');\r
-</pre>\r
-\r
-この URL(実例の中にある "/controller/action?format=xml")は、次のフォーマットでデータを返さなければなりません。\r
-<pre>\r
-&lt;ajax-response&gt;\r
-&lt;response type='object' id='data_grid_updater'&gt;\r
-&lt;rows update_ui='true' offset='0'&gt;\r
-&lt;tr&gt;&lt;td&gt;Data for row 1, cell 1&lt;/td&gt;&lt;td&gt;Data for row 1, cell 2&lt;/td&gt;&lt;/tr&gt;\r
-&lt;tr&gt;&lt;td&gt;Data for row 2, cell 1&lt;/td&gt;&lt;td&gt;Data for row 2, cell 2&lt;/td&gt;&lt;/tr&gt;\r
-&lt;/rows&gt;\r
-&lt;/response&gt;\r
-&lt;/ajax-response&gt;\r
-</pre>\r
-\r
-<li>最後に、HTML テーブルの DOM の ID とオプションを Rico.Buffer インスタンス に渡して、LiveGrid を初期化します\r
-(columnSpecs は必要ではありませんが、列のカスタム化のためのプレースホルダーとして、ここに表示されます)。\r
-<pre>\r
-var grid_options = { columnSpecs: [,] };\r
-var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);\r
-</pre>\r
-\r
-<li>Rico.loadModule は、window.onload イベントの終了<em>後</em>に実行されると思います。\r
-あなたは Rico.onLoad メソッドに初期化関数を渡さなければなりません、\r
-なぜなら、Rico モジュールがロードされた後で、グリッドの初期化が実行される事を確実なものにするためです。\r
-javascript のすべてをまとめると、このようになります。\r
-\r
-<pre>\r
-&lt;script type='text/javascript'&gt;\r
-Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');\r
-\r
-Rico.onLoad( function() {\r
-  var buffer = new Rico.Buffer.AjaxXML('/controller/action?format=xml');\r
-  var grid_options = { columnSpecs: [,] };\r
-  var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);\r
-});\r
-&lt;/script&gt;\r
-</pre>\r
-</ul>\r
-\r
-\r
-<h2><a name='model4'>利用モデル 4: SQL データベースクエリからデータをロードする</a></h2>\r
-\r
-<p>下記の説明は、Rico LiveGrid プラグインにおける ASP と PHP の実装に直接当てはまります。\r
-概念は .net の同じですが、実装方法は全く異なります\r
-(これがどのように .net で実装されるかについては、"ex2simple.aspx" を調べて下さい)。\r
-\r
-<ul>\r
-<li>実行するためにクエリを含むセッション変数を定義して下さい。\r
-変数名は、下の表の ID に適合しなければなりません。\r
-データを要求するとき、グリッドは ricoXMLquery にそのIDを渡します、そして、ricoXMLquery はセッションからクエリテキストを取得するためにそれを利用するでしょう。\r
-<ul>\r
-<li>ASP:\r
-<pre>\r
-&lt;%\r
-session.contents("data_grid")="select ID,Name,City from customers"\r
-%&gt;\r
-</pre>\r
-\r
-<li>PHP:\r
-<pre>\r
-&lt;? \r
-$_SESSION['data_grid']="select ID,Name,City from customers";\r
-?&gt;\r
-</pre>\r
-\r
-<li>.net:\r
-<pre>\r
-Sub Page_Load(Sender As object, e As EventArgs)\r
-  data_grid.sqlQuery="select ID,Name,City from customers"\r
-  ' session variable is set by the control\r
-End Sub\r
-</pre>\r
-</ul>\r
-\r
-\r
-<li>テーブルのボディセルでは無く、ヘッダセルを供給して、HTML テーブルを定義して下さい。\r
-ブックマークのためのマークアップを含む事により、グリッドのスクロール位置が表示されます。\r
-<pre>\r
-&lt;p class="ricoBookmark"&gt;&lt;span id="data_grid_bookmark"&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;\r
-&lt;table id="data_grid"&gt;\r
-  &lt;tr&gt;\r
-\r
-    &lt;th&gt;Customer #&lt;/th&gt;\r
-    &lt;th&gt;Customer Name&lt;/th&gt;\r
-    &lt;th&gt;City&lt;/th&gt;\r
-\r
-  &lt;/tr&gt;\r
-&lt;/table&gt;\r
-</pre>\r
-\r
-<li>グリッドを表示するために必要な Rico javascript と css ファイルをロードして下さい。\r
-<pre>\r
-Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');\r
-</pre>\r
-<dl>\r
-<dt>LiveGridAjax\r
-<dd>これは、AJAX 対応バッファで LiveGrid を表示するのに必要な Rico javascript と css ファイルをロードします。\r
-<dt>LiveGridMenu\r
-<dd>これは、デフォルトのグリッドメニューをロードします。\r
-このメニューは、LiveGrid で出来る事の全てにアクセスする方法を提供します。\r
-それは選択された列と使用されるバッファのタイプに基づく、ユーザに提示された選択項目を調整します。\r
-メニュー無しでグリッドを使用するか、またはアプリケーションの必要性によりカスタマイズされた独自のメニューを作成するかを、選ぶことが出来ます。\r
-<dt>greenHdg.css\r
-<dd>Rico は、いくつかのサンプルグリッドスタイルを持っています。\r
-coffee-with-milk、grayedout、greenHdg、iegradient (Internet Explorer 専用)、tanChisel、そして warmfall。\r
-あなたは、含まれているスタイルの 1 つを選ぶか、独自の物を作成するかを選ぶでしょう。\r
-</dl>\r
-\r
-<li>データをフェッチしてテーブルを実装するために、Rico バッファを作成して下さい。\r
-一度にすべてのデータをグリッドにフェッチする AjaxXML バッファと異なり、 AjaxSQL バッファは、塊でデータをフェッチします。\r
-これは、LiveGrid が能率的に数千または何十万の列を含んでいるクエリ結果を表示する事を可能にします。\r
-\r
-<pre>\r
-var buffer = new Rico.Buffer.AjaxSQL('ricoXMLquery.asp');\r
-</pre>\r
-\r
-この URL ("ricoXMLquery.asp" の実例で)は、データベースからデータをフェッチして、\r
-この XML フォーマットでグリッドにそれを戻すために、含まれるプラグインの内の 1 つを利用します。\r
-\r
-<pre>\r
-&lt;ajax-response&gt;\r
-&lt;response type='object' id='data_grid_updater'&gt;\r
-&lt;rows update_ui='true' offset='0'&gt;\r
-&lt;tr&gt;&lt;td&gt;Data for row 1, cell 1&lt;/td&gt;&lt;td&gt;Data for row 1, cell 2&lt;/td&gt;&lt;/tr&gt;\r
-&lt;tr&gt;&lt;td&gt;Data for row 2, cell 1&lt;/td&gt;&lt;td&gt;Data for row 2, cell 2&lt;/td&gt;&lt;/tr&gt;\r
-&lt;/rows&gt;\r
-&lt;rowcount&gt;99&lt;/rowcount&gt;\r
-&lt;/response&gt;\r
-&lt;/ajax-response&gt;\r
-</pre>\r
-\r
-&lt;rowcount&gt; タグはオプションですが、リクエストに "get_total" クエリーストリングパラメータが存在する場合は、\r
-いつでも返されなければなりません。\r
-\r
-<li>最後に、HTML テーブルの DOM の ID とオプションを Rico.Buffer インスタンス に渡して、LiveGrid を初期化します\r
-(columnSpecs は必要ではありませんが、列のカスタム化のためのプレースホルダーとして、ここに表示されます)。\r
-<pre>\r
-var grid_options = { columnSpecs: [,,] };\r
-var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);\r
-</pre>\r
-\r
-<li>Rico.loadModule は、window.onload イベントの終了<em>後</em>に実行されると思います。\r
-あなたは Rico.onLoad メソッドに初期化関数を渡さなければなりません、\r
-なぜなら、Rico モジュールがロードされた後で、グリッドの初期化が実行される事を確実なものにするためです。\r
-javascript のすべてをまとめると、このようになります。\r
-<pre>\r
-&lt;script type='text/javascript'&gt;\r
-Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');\r
-\r
-Rico.onLoad( function() {\r
-  var buffer = new Rico.Buffer.AjaxSQL('ricoXMLquery.asp');\r
-  var grid_options = { columnSpecs: [,,] };\r
-  var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);\r
-});\r
-&lt;/script&gt;\r
-</pre>\r
-</ul>\r
-\r
-\r
-<h2><a name='model5'>利用モデル 5: カスタムコールバック関数を利用してデータをロードする</a></h2>\r
-\r
-<p>このモデルは、 xmlHTTPrequest を利用してデータをフェッチするのでは無く、 javascript コールバック関数を\r
-利用してデータをフェッチする事以外はモデル 3 や 4 と同じ方法で動作します。\r
-これにより、コールバック関数で Google Gears を呼ぶような創造的な事をすることが出来ます。\r
-コールバックをセットアップする事は、非常に簡単です。\r
-データプロバイダの URL の文字列を含むデータを AjaxXML または AjaxSQL コンストラクタに渡すのでは無く、\r
-その代りにコールバック関数を渡すだけです。\r
-\r
-<p>以下の AjaxXML バッファを利用するコードは <a href='client/gridJSbuffer.html'>examples/client/gridJSbuffer.html</a> から取得出来ます。\r
-"jsfetch" コールバック関数は 100 行の長さで 5 列の幅の二次元配列を返します。\r
-AjaxXML は、そのバッファを(グリッドのスタートアップで)一度だけロードするので、 jsfetch は一度だけ呼ばれます。\r
-このオプションのハッシュは、Prototype の Ajax.Request メソッドで利用されるオプションのハッシュと構造が同じです。\r
-\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxXML(<strong>jsfetch</strong>);\r
-\r
-function <strong>jsfetch</strong>(options) {\r
-  Rico.writeDebugMsg("jsfetch");\r
-  var newRows=[], offset=options.parameters.offset;\r
-  for (var r=0; r<100; r++) {\r
-    var row=[];\r
-    row.push(offset.toString());\r
-    row.push(new Date().toString());\r
-    for (var c=2; c<5; c++) row.push('cell '+r+':'+c);\r
-    newRows.push(row);\r
-  }\r
-  options.onComplete(newRows);\r
-}\r
-</pre>\r
-\r
-<p>以下の AjaxSQL バッファを利用するコードは <a href='client/gridJSbuffer2.html'>examples/client/gridJSbuffer2.html</a> から取得出来ます。\r
-"jsfetch" コールバック関数は、500 行の長さで 5 列の幅の二次元配列をシミュレーションします。\r
-しかし、どんなコールバック中でも、その配列の <code>options.parameters.offset</code> 行から \r
-<code>options.parameters.offset + options.parameters.page_size</code> 行までのセクションが返されます。\r
-\r
-<pre>\r
-buffer=new Rico.Buffer.AjaxSQL(<strong>jsfetch</strong>);\r
-\r
-function <strong>jsfetch</strong>(options) {\r
-  var newRows=[], totrows=500;\r
-  var offset=options.parameters.offset;\r
-  var limit=Math.min(totrows-offset,options.parameters.page_size)\r
-  for (var r=0; r&lt;limit; r++) {\r
-    var row=[];\r
-    row.push(new Date().toString());\r
-    row.push(offset.toString());\r
-    for (var c=2; c&lt;5; c++) row.push('cell '+(r+offset)+':'+c);\r
-    newRows.push(row);\r
-  }\r
-  options.onComplete(newRows,false,totrows);\r
-}\r
-</pre>\r
-\r
-<p>options.onComplete は、次のパラメータをとります。\r
-<ul>\r
-<li>newRows - それぞれのアイテムが文字列の二次元配列\r
-<li>newAttr - それぞれのアイテムが、セルの acceptAttr の値、または acceptAttr が利用されていないなら false を含むオブジェクトの二次元配列\r
-<li>totalRows - データセット内の行の総数を表す整数\r
-<li>errMsg - エラーが起こったとき、ユーザに表示されるメッセージテキスト\r
-</ul>\r
-\r
-</ul>\r
-\r
-\r
-<h2><a name='debug'></a>デバッグ</h2>\r
-<p>Rico 2.0 はメッセージログにタイムスタンプデバッグメッセージを配達する能力を持っています。\r
-そのログは、HTML のテキストエリアか、ブラウザの javascript コンソールに表示されるでしょう。\r
-<ul>\r
-<li>もし、テキストエリアが '_debugmsgs' を加えたライブグリッドテーブルの ID と共に存在するならば、例えば\r
-<pre style='margin:3px;'>&lt;textarea cols="100" rows="5" id="data_grid_debugmsgs" /&gt;</pre>\r
-そして、このテキストエリアがメッセージログのために使われます。\r
-<li>あるいは、テキストエリアは Rico.setDebugArea() の呼び出しによって指定されるかもしれません。\r
-\r
-<pre>\r
-&lt;textarea id='debug' rows='5' cols='80'&gt;&lt;/textarea&gt;\r
-&lt;script type='text/javascript'&gt;\r
-Rico.setDebugArea('debug');\r
-&lt;/script&gt;\r
-</pre>\r
-\r
-<li>テキストエリアが指定されないならば、Rico はブラウザのビルトイン javascript コンソールを使おうとします。\r
-以下のコンソールで動作する事が知られています:\r
-  <ul>\r
-  <li>Firefox の <a href='http://www.getfirebug.com/' target='_blank'>Firebug</a> アドオンコンソール\r
-  <li>Opera javascript コンソール\r
-  <li>Safari javascript コンソール\r
-  </ul>\r
-</ul>\r
-\r
-<h2>グリッドメニュー</h2>\r
-\r
-<p>Rico LiveGrid は、多くの機能的なビルトインが付属します\r
-その機能にアクセスするために、Rico はメニューのデフォルトの設定を含みます -- \r
-ricoLiveGridMenu.js で定義されています。\r
-デフォルトメニューを使うために、単に 'LiveGridMenu' モジュールをロードして、\r
-そのグリッドメニュープロパティを Rico.GridMenu クラスのインスタンスに割り当てて下さい。\r
-<pre>\r
-  Rico.loadModule('LiveGridMenu');\r
-  ...\r
-  var ex1=new Rico.LiveGrid ('ex1', buffer, grid_options);\r
-  ex1.menu=new Rico.GridMenu();\r
-</pre>\r
-<p>デフォルトでは、ユーザがグリッドセルをダブルクリックする時メニューが開きます。\r
-メニューを開くイベントを変更するために、グリッドの <a href='#menuEvent'>menuEvent</a> \r
-オプションに値を割り当てて下さい。\r
-以下のコードは、右クリックでメニューを開きます。\r
-<pre>\r
-  Rico.loadModule('LiveGridMenu');\r
-  ...\r
-  var grid_options = {\r
-    menuEvent: 'contextmenu'\r
-  }\r
-  var ex1=new Rico.LiveGrid ('ex1', buffer, grid_options);\r
-  ex1.menu=new Rico.GridMenu();\r
-</pre>\r
-<p>Rico.GridMenu は、更なるメニューアイテムを追加するために、コールバック(dataMenuHandler)を提供します。\r
-グリッドメニューは常に動的に構築されます -- ユーザーがクリックした行と列のためにカスタマイズされます。\r
-コールバック関数が毎回呼ばれるように、メニューは起動されて、\r
-それぞれの起動で要求されるメニューアイテムを加えなければなりません。\r
-<pre>\r
-  Rico.loadModule('LiveGridMenu');\r
-  ...\r
-  var ex1=new Rico.LiveGrid ('ex1', buffer, grid_options);\r
-  ex1.menu=new Rico.GridMenu();\r
-  ex1.menu.options.dataMenuHandler=myCustomMenuItems;\r
-  ...\r
-function myCustomMenuItems(grid,r,c,onBlankRow) {\r
-  if (buffer.getWindowValue(r,c)=='Special Value')\r
-    grid.menu.addMenuItem("Special menu item", specialAction);\r
-}\r
-function specialAction() {\r
-  ...\r
-}\r
-</pre>\r
-\r
-<p>完全なカスタムメニューを作成する事も可能です。\r
-例えば、ex5.php/asp/aspx を見て下さい。\r
-\r
-\r
-<h2>注意</h2>\r
-<ul>\r
-<li>もし、ライブグリッドテーブル名に '_bookmark' が追加された名前に、DOM の ID が一致する要素を作成するなら、\r
-グリッドに表示されいるレコードの数を示しているテキストが更新されるでしょう。\r
-LiveGrid の実例は、一般的にこのマークアップを使います。\r
-<pre>\r
-&lt;p class="ricoBookmark"&gt;&lt;span id="data_grid_bookmark"&gt;&nbsp;&lt;/span&gt;&lt;/p&gt;\r
-</pre>\r
-<li>ライブグリッドを表示するブラウザは、<a href="http://www.quirksmode.org/css/quirksmode.html">strict (別名 "標準" )モード</a> で実行されていなければなりません。\r
-したがって、あなたは <code> &lt;html&gt; </code> タグの直前に doctype の宣言を含めなければなりません。例えば\r
-\r
-<pre>\r
-&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" \r
- "http://www.w3.org/TR/html4/strict.dtd"&gt;\r
-</pre>\r
-</ul>\r
-\r
-<h2>リファレンス</h2>\r
-<h3>コンストラクタ</h3>\r
-<pre>\r
-\r
-  var grid = new Rico.LiveGrid (table_id, rico_buffer, grid_options);\r
-\r
-</pre>\r
-\r
-<ul>\r
-<li><strong>table_id</strong> はライブグリッドによって実装される、テーブルの DOM id です\r
-<li><strong>rico_buffer</strong> は Rico のバッファです、例えば\r
-  <ul>\r
-  <li>Rico.Buffer.Base (AJAX 対応では無いテーブルのために)\r
-  <li>Rico.Buffer.AjaxXML\r
-  <li>Rico.Buffer.AjaxSQL\r
-  </ul>\r
-<li><strong>grid_options</strong> (下記参照)\r
-</ul>\r
-\r
-<h3><a name="options"></a>オプション</h3>\r
-\r
-<h4>グリッドサイズ</h4>\r
-<dl>\r
-<dt>visibleRows (.net の行)\r
-<dd>グリッドに何行表示しますか?\r
-正の整数は、グリッドが正確に多くの行を常に含まなければならないことを示しています。\r
-負の値は、以下の意味を持ちます。\r
-  <ul>\r
-  <li>-1: クライアントウィンドウに合わせたグリッドサイズ(デフォルト)\r
-  <li>-2: クライアントウィンドウとデータの小さい方のグリッドサイズ\r
-  <li>-3: ページのボディにスクロールバーを持たないためのグリッドサイズ\r
-  <li>-4: DOM の親ノードによるグリッドサイズ\r
-  </ul>\r
-  \r
-<dt>minPageRows\r
-<dd>表示される行数の最小値。visibleRows が 0 以下の時のみ利用される。(Rico 2b3 からはデフォルトが 2 で、Rico 2b3 までは 1)\r
-\r
-<dt>maxPageRows\r
-<dd>表示される行数の最大値。visibleRows が 0 以下の時のみ利用される。(デフォルトは 50)\r
-\r
-<dt>defaultWidth\r
-<dd>列の初期幅を設定する際に使われる整数。\r
-説明については <a href='#width'>列幅オプション</a> を見て下さい。\r
-(デフォルトは 100)\r
-\r
-<dt>useUnformattedColWidth\r
-<dd>列の初期幅を設定する際に使われる真偽値。\r
-説明については <a href='#width'>列幅オプション</a> を見て下さい。\r
-(デフォルトは true)\r
-\r
-<dt>scrollBarWidth\r
-<dd>いくらかの計算のために、LiveGrid はページ上のスクロールバーの幅を知っている必要があります。(デフォルトは 19)\r
-\r
-<dt>minScrollWidth\r
-<dd>固定された列の幅がウィンドウ幅を上回る時の、スクロールエリアのピクセル幅の最小値。(デフォルトは 100)\r
-</dl>\r
-\r
-\r
-<h4>グリッドデータ</h4>\r
-<dl>\r
-<dt>offset<dd>表示されるデータの最初の行(デフォルトは 0)\r
-<dt>prefetchBuffer<dd>ページのロード時にバッファの(そして、その結果グリッドの)ロードを行いますか?\r
-<dt>sortCol<dd>初期ソートのための、列の名前かインデックス\r
-<dt>sortDir<dd>初期ソートの方向\r
-  <br>取り得る値は 'ASC'、'DESC'\r
-<dt>getQueryParms<dd>もし true なら、フィルタパラメータのための、そのウェブページのクエリ文字列をチェックし、そして見つかるどんなフィルタでも適用します。\r
-フィルタパラメータは "f[x]=" の形でなければならず、"x" は列のインデックスです。(デフォルトは false )\r
-</dl>\r
-\r
-<h4>ヘッダ構成</h4>\r
-<dl>\r
-<dt>frozenColumns\r
-<dd>グリッドの左側の固定された列の数(Excel のように)\r
-\r
-<dt>headingSort\r
-<dd>ソートを容易にするために、どのように見出しが表示されるかを定義する文字列。\r
-  <ul>\r
-  <li>'link' -- 見出しに列をソートしてくれるリンクを作成します(デフォルト)\r
-  <li>'hover' -- ユーザは、ソートするために、見出しのセルのどんな部分でもクリックする事が出来ます。カーソルがセル上でホバーする時、見出しは背景色を変えます。\r
-  <li>'none' -- 見出し上のイベントは利用不能です。\r
-  </ul>\r
-\r
-<dt>hdrIconsFirst<dd>見出しの前後に、ソートとフィルタのアイコンを置きます(デフォルトは true)\r
-\r
-<dt><a name='allowColResize'>allowColResize</a><dd>ユーザによる列のリサイズを許しますか?\r
-true なら、個々の列のリサイズを利用不能にするために columnSpecs の <a href='#noResize'>noResize</a> を利用します。\r
-\r
-<dt>panels<dd>第二の見出しとして用いる事が出来る文字列の配列です。\r
-LiveGrid Forms で、入力フォーム上のタブを付けられたパネルのための見出しを提供します。\r
-\r
-<dt>PanelNamesOnTabHdr<dd>panels[] の文字列を第二の見出しとして利用するために 'true' を設定します。\r
-LiveGrid Forms では、 panels[] は入力フォームとしてのみ利用されるので、'false' が設定されるでしょう。\r
-\r
-<dt><a name='FilterLocation'></a>FilterLocation\r
-<dd>フィルタを設置する見出しの行を指定します。\r
--1 は、新しい行をヘッダに追加し、新しい行がフィルタリングのために利用されるようにします。\r
-<a href='#filterUI'>filterUI</a> のオプションも見て下さい。\r
-\r
-<dt>FilterAllToken\r
-<dd>選択フィルタで "show all values" を示すトークン(デフォルトは "___ALL___")。\r
-</dl>\r
-\r
-<h4>画像</h4>\r
-<dl>\r
-<dt>resizeBackground\r
-<dd>列のリサイズハンドルに利用される画像(デフォルトは 'resize.gif')\r
-\r
-<dt>sortAscendImg\r
-<dd>列を昇順でソートする事を示すために使われる画像(デフォルトは 'sort_asc.gif')\r
-\r
-<dt>sortDescendImg\r
-<dd>列を降順でソートする事を示すために使われる画像(デフォルトは 'sort_desc.gif')\r
-\r
-<dt>filterImg\r
-<dd>列に対し現在利用中のフィルタを示すために使われる画像(デフォルトは 'filtercol.gif')\r
-</dl>\r
-\r
-\r
-<h4>クッキーオプション</h4>\r
-<dl>\r
-\r
-<dt>saveColumnInfo\r
-<dd>グリッドのクッキーに、どの詳細設定を保存するかを指定します。\r
-一つのクッキーだけが、それぞれのグリッドのために利用されます。\r
-幅の設定が、列の非表示/表示の状態を含む事に注意して下さい。\r
-(デフォルトは {width:true, filter:false, sort:false})\r
-<br>.netプラグインでは、このオプションは、3 つの別々のプロパティによって表現されます。\r
-saveColumnWidth、saveColumnFilter、saveColumnSort。\r
-\r
-<dt>cookiePrefix\r
-<dd>クッキー名の先頭に付け加えられる文字列(デフォルトは 'RicoGrid.')\r
-\r
-<dt>cookieDays\r
-<dd>数字の日数前のクッキーは期限切れになります。\r
-指定しなければ、クッキーは現在のセッションの間だけ維持されます。(デフォルトは null)\r
-\r
-<dt>cookiePath\r
-<dd>グリッドのクッキーを読む事が出来るトップレベルディレクトリを設定します。\r
-指定しなければ、それはクッキーを設定するページのパスになります。(デフォルトは null)\r
-\r
-<dt>cookieDomain\r
-<dd>クッキーがどのドメインに送られなければならないかについて、ブラウザに知らせます。\r
-指定しなければ、それはクッキーを設定するページのドメインになります。(デフォルトは null)\r
-\r
-</dl>\r
-\r
-<h4>ハイライティングとセレクション</h4>\r
-<dl>\r
-\r
-<dt>highlightElem\r
-<dd>何がハイライトまたは選択されるかについて指定する文字列。\r
-  <ul>\r
-  <li>'cursorRow' -- the grid row under the cursor\r
-  <li>'cursorCell' -- the grid cell under the cursor\r
-  <li>'menuRow' -- the grid row where the menu is displayed\r
-  <li>'menuCell' -- the grid cell where the menu is displayed\r
-  <li>'selection' -- allow the user to select cells\r
-  <li>'none' -- never highlight\r
-  </ul>\r
-\r
-<dt>highlightSection\r
-<dd>テーブルのどのセレクションがハイライトされるかについて指定する整数\r
-  <ul>\r
-  <li>1 -- 固定された部分\r
-  <li>2 -- スクロールする部分\r
-  <li>3 -- すべて(デフォルト)\r
-  <li>0 -- 無し\r
-  </ul>\r
-<dt>highlightMethod\r
-<dd>セルや行がハイライトされる方法。取り得る値は\r
-  <ul>\r
-  <li>'outline' -- クライアント側で、最も CPU 集約型では無い\r
-  <li>'class' -- ハイライトされた セル/行 のCSS クラスを追加(デフォルト)\r
-  <li>'both' -- アウトラインとクラスの両方を利用するハイライト\r
-  </ul>\r
-<dt>highlightClass\r
-<dd>クラスによってハイライトされる時、クラス名として利用されます(デフォルトは 'ricoLG_selection')\r
-</dl>\r
-\r
-<h4>エクスポートと印刷</h4>\r
-<dl>\r
-<dt>maxPrint\r
-<dd>ユーザに 印刷/エクスポート を許す最大行数。\r
-印刷/エクスポート を利用不能にするには 0 を設定します。(デフォルトは 1000)\r
-\r
-<dt>exportWindow\r
-<dd>エクスポートウィンドウが生成される時に、\r
-<a href='http://www.w3schools.com/htmldom/met_win_open.asp'>window.open()</a> に渡されるオプション文字列。\r
-(デフォルトは "height=400,width=500,scrollbars=1,menubar=1,resizable=1")\r
-</dl>\r
-\r
-<h4>イベントコントロール</h4>\r
-<dl>\r
-<dt><a name='menuEvent'></a>menuEvent\r
-<dd>グリッドメニューがいつ呼び出されるべきかを指定する文字列\r
-  <ul>\r
-  <li>'click' -- シングルクリックでメニューを呼び出す\r
-  <li>'dblclick' -- ダブルクリックでメニューを呼び出す(デフォルト)\r
-  <li>'contextmenu' -- 右クリックでメニューを呼び出す\r
-  <li>'none' -- メニューをポップアップしない\r
-  </ul>\r
-\r
-<dt>windowResize\r
-<dd>window.resize イベントの間にグリッドの大きさを変更するかどうかを指定する真偽値?\r
-グリッドがアコーディオンに組み込まれる時に、これに false が設定されなくてはなりません。(デフォルトは true)\r
-</dl>\r
-\r
-<h4>イベントハンドル</h4>\r
-<dl>\r
-<p>コンストラクタにオプションでイベントハンドラを渡す事は出来ませんが、LiveGrid が生成された後なら、設定されるかも知れません。</p>\r
-<dt>sortHandler<dd> (デフォルトは Rico.LiveGridMethods.sortHandler -- バインドされた)\r
-<dt>filterHandler<dd> (デフォルトは Rico.LiveGridMethods.filterHandler -- バインドされた)\r
-<dt>onRefreshComplete<dd> (デフォルトは Rico.LiveGridMethods.bookmarkHandler -- バインドされた)\r
-<dt>rowOverHandler<dd> (デフォルトは Rico.LiveGridMethods.rowMouseOver -- イベントリスナーとしてバインドされた)\r
-<dt>mouseDownHandler<dd> (デフォルトは Rico.LiveGridMethods.selectMouseDown -- イベントリスナーとしてバインドされた)\r
-<dt>mouseOverHandler<dd>(デフォルトは Rico.LiveGridMethods.selectMouseOver -- イベントリスナーとしてバインドされた)\r
-<dt>mouseUpHandler<dd> (デフォルトは Rico.LiveGridMethods.selectMouseUp -- イベントリスナーとしてバインドされた)\r
-<dt>onscroll<dd> グリッドが垂直にスクロールされる時は、いつでも呼ばれます。(デフォルトは null)\r
-<dt>onscrollidle<dd> グリッドが垂直にスクロールされた 1、2 秒後に呼ばれます。(デフォルトは null)\r
-<dt>click<dd> グリッドセルがクリックされた時に呼ばれます。(デフォルトは menuEvent='click' で無ければ null)\r
-<dt>dblclick<dd> グリッドセルがダブルクリックされた時に呼ばれます。(デフォルトは menuEvent='dblclick' で無ければ null)\r
-<dt>contextmenu<dd> グリッドセルが右クリックされた時に呼ばれます。(デフォルトは menuEvent='contextmenu' で無ければ null)\r
-</dl>\r
-\r
-<h4><a name="column"></a>列ごとの構成</h4>\r
-<dl>\r
-<p>各々の列のためのオプションは、columnSpecs オプションに含まれます。\r
-columnSpecs は、各々の列のためのエントリに関する配列です。\r
-各々の列のエントリは、以下のいずれかで行う事が出来ます。\r
-<ul>\r
-\r
-<li>null (デフォルト) -- その場合、Rico.TableColumn.DEFAULT. の仕様によって列はフォーマットされます。\r
-グリッドの多くの列が共通のフォーマットを共有するならば、グリッドのデフォルト列仕様をオーバーライドする事は意味があるかもしれません。\r
-<pre>\r
-Rico.TableColumn.DEFAULT = {ClassName:'aligncenter', width:50};\r
-</pre>\r
-この場合は、仕様の無いどんな列でも、整列は中央で幅は 50 ピクセルの内容を持ちます。\r
-\r
-<li>a string -- 列のフォーマットを指定する単純な方法を提供します。\r
-DOLLAR、EURO、PERCENT、QTY、DEFAULT の値がビルトインされています。\r
-独自のものを定めることも可能です。\r
-温度フォーマットを定義したこの例は、weather.php から取得されます\r
-\r
-<pre>\r
-Rico.TableColumn.TEMP = {type:'number', decPlaces:0, \r
-  ClassName:'alignright', suffix:'&amp;deg;C', width:50};\r
-var opts = {  \r
-  frozenColumns : 1,\r
-  columnSpecs   : [{width:120},{width:70},{width:70},{width:100},\r
-                   'TEMP','TEMP','TEMP',\r
-                   {width:150},{width:200},{width:60}]\r
-};\r
-</pre>\r
-\r
-<li>an object -- 下記の表にあるプロパティの一つ以上のエントリを含む。\r
-ここに、列 0、1 と 3 が仕様を含む例を挙げます。\r
-列 2 はデフォルトの仕様を取得します。\r
-<pre>\r
-columnSpecs : [{canSort:false, noResize:true, ClassName:'alignright'},\r
-               {ClassName:'aligncenter'},\r
-               ,\r
-               {visible:false}]\r
-</pre>\r
-</ul>\r
-\r
-<dt>Hdg\r
-<dd>列の見出しテキストを指定する代わりの方法。\r
-グリッド ID が、html テーブルの代わりに &lt;div&gt; を参照するなら、LiveGrid によってのみ利用されます。\r
-\r
-<dt>canSort\r
-<dd>列をソートする事が出来ます。(デフォルトは grid.options.canSortDefault)\r
-\r
-<dt>canFilter\r
-<dd>列をフィルタする事が出来ます。(デフォルトは grid.options.canFilterDefault)\r
-\r
-<dt>canDrag\r
-<dd>列のセルは、ドラッグアンドドロップオペレーションのソースとして用いられる事が出来ます。\r
-"DragAndDrop" モジュールはロードされなければなりません。\r
-一時的なドラッグオブジェクトは "LiveGridDraggable" クラスが持ちます。\r
-実例として、<a href='client/drag_and_drop_grid.html'>drag_and_drop_grid.html</a> を見て下さい。(デフォルトは false)\r
-\r
-<dt>canHide\r
-<dd>列を 表示/非表示 する事が出来ます。(デフォルトは grid.options.canHideDefault)\r
-\r
-<dt>visible\r
-<dd>列は、初めは隠されていません。\r
-grid.options.saveColumnInfo.width が true で、列のためのクッキーに値があるなら、クッキーの値が優先されます。\r
-(デフォルトは true)\r
-\r
-<dt><a name='width'></a>width\r
-<dd>列の初期幅(ピクセルで)を指定する整数。\r
-ここに、それぞれの列の初期幅を設定するために LiveGrid が利用するアルゴリズムがあります。\r
-<ol>\r
-<li>options.saveColumnInfo.width が true で、列情報がグリッドのクッキーに存在する場合は\r
-(以前にグリッドの列の上でリサイズを実行したユーザのために)\r
-クッキーのその幅が利用されます。\r
-そうでない場合は、、、\r
-\r
-<li>options.columnSpecs に列の幅仕様があれば、その幅仕様が利用されます。一例として、 ex3.php/asp/aspx を見て下さい。そうでない場合は、、、\r
-\r
-<li>options.useUnformattedColWidth が true で(デフォルト)、グリッドヘッダが html テーブルから初期化されるならば、htmlテーブルの列の幅が利用されます。\r
-通常 col タグを用いて初期テーブルの列幅をコントロールする事が出来ます。(例えば &lt;col style='width:40px;' &gt;)。\r
-\r
-テーブル幅全体がブラウザー幅より小さいならば、これは動作します。\r
-しかし、それがより大きいならば、ブラウザはしばしば "col width" を無視して、全ての列を利用できるウインドウ幅の中に押し込もうとします。\r
-このように、列幅を設定するためにこの方法を使用することは信頼出来ません。\r
-そうでない場合は、、、\r
-\r
-<li>options.useUnformattedColWidth が false ならば、列の幅は options.defaultWidth により設定されます。(デフォルトは 100)\r
-</ol>\r
-したがって、列幅を LiveGrid と SimpleGrid で設定する最も信頼できる方法は、options.columnSpecs[] ですべての列に幅を指定することになります。 \r
-多くの列が共通の幅を共有するならば、options.useUnformattedColWidth=false を設定して、options.defaultWidth を共通の幅に設定する事によって、\r
-いくらかの近道をする事が出来ます。\r
-\r
-<dt><a name='noResize'>noResize</a>\r
-<dd>列のリサイズを許しますか?(デフォルトは <a href='#allowColResize'>grid.options.allowColResize</a>)\r
-\r
-<dt>ClassName\r
-<dd>デフォルトでは、LiveGrid はユニークな CSS クラス名を、table_id + '_col' + column_index の命名規約に従い、それぞれの列に割り当てます。\r
-例えば、グリッド 'mygrid' の第 4 列は、クラス名 'mygrid_col3' を持ちます。\r
-ClassName オプションの値は、このデフォルト名をオーバーライドします。\r
-ClassName オプションは、Rico が提供する 'alignright' と 'aligncenter' クラスによって列の整列を指定するために、最も一般的に用いられます。\r
-なので、グリッドの最初の 3 つの列が赤い背景色に白いテキストで表示されることを望むならば、あなたは以下のどちらでもすることが出来ます。\r
-\r
-<pre>\r
-In CSS:\r
-.mygrid_col0 div.ricoLG_cell, \r
-.mygrid_col1 div.ricoLG_cell, \r
-.mygrid_col2 div.ricoLG_cell {\r
-  color: white;\r
-  background-color: red;\r
-}\r
-</pre>\r
-\r
-または\r
-\r
-<pre>\r
-In CSS:\r
-.WhiteOnRed div.ricoLG_cell {\r
-  color: white;\r
-  background-color: red;\r
-}\r
-\r
-In javascript:\r
-columnSpecs : [{ClassName:'WhiteOnRed'},\r
-               {ClassName:'WhiteOnRed'},\r
-               {ClassName:'WhiteOnRed'},\r
-               ...\r
-</pre>\r
-\r
-最後に、この ClassName がグリッドの見出しに適用されない点に注意してください - \r
-ヘッダの整列を達成するためには、&lt;th&gt; タグで align="right" を利用して下さい。\r
-\r
-<dt>type\r
-<dd>これらの値の内の一つを含む文字列。\r
-<ul>\r
-<li>text - 列の値のどんなタグでも、ユーザに表示される前に取り除かれます。\r
-<li>showTags - 列の値のどんなタグでも、ユーザにテキストとして表示されます。\r
-<li>number - 列の値は数として扱われ、列仕様で与えられるどんな <a href='#NumberFormatting'>number formatting options</a> でも適用されます。\r
-<li>datetime - 列の値は 日付 &amp; 時間 として扱われ、列仕様で与えられるどんな <a href='#DateFormatting'>date formatting options</a> でも適用されます。\r
-<li>UTCasLocalTime - 列やデータベースの値は GMT/UTC 日付 &amp; 時間 として扱われ、列仕様で与えられるどんな <a href='#DateFormatting'>date formatting options</a> でも適用されます。\r
-表示される前に、その値はユーザのローカルタイムゾーンに変換されます。\r
-<li>date - 列の値は日付として扱われ、列仕様で与えられるどんな <a href='#DateFormatting'>date formatting options</a> でも適用されます。\r
-<li>raw (default) - 列の値は、グリッドのセルに直接表示されます。どんなHTMLマークアップでもセルにコピーされます。\r
-</ul>\r
-</dd>\r
-\r
-<dt><a name='control'></a>コントロール\r
-<dd>特別なフォーマットを列に提供するのに用いられるオブジェクト。\r
-いくつかの列コントロールは LiveGrid により提供されます。\r
-それらのためのコードは、 ricoLiveGridControls.js にあります。\r
-ここに、提供されるコントロールの簡潔な記述があります。\r
-\r
-<dl style='font-size:smaller;'>\r
-<dt>Rico.TableColumn.checkboxKey(showKey)\r
-<dd> &lt;checkbox&gt; &lt;key value&gt; として列のユニークキーを表示し、どのキーがユーザによって選択されているかを見逃しません。\r
-キーの値は &lt;、 &gt;、 または &amp; を含むべきではありません。\r
-\r
-<dt>Rico.TableColumn.checkbox(checkedValue, uncheckedValue, defaultValue, readOnly)\r
-<dd>チェックボックスとして列を表示します。データベースの列は、二つの値のみを含まなければなりません(例えば yes/no)。\r
-以下のコードは、ex7 から取得されます(列の値は 1 と 0)。\r
-<pre>\r
-columnSpecs: [{canHide:false,\r
-               control:new Rico.TableColumn.checkbox('1','0'),\r
-               ClassName:'aligncenter'},\r
-              'specQty'],\r
-</pre>\r
-\r
-<dt>Rico.TableColumn.textbox(boxSize, boxMaxLen, readOnly)\r
-<dd>テキストボックス内に列の値を表示します。\r
-\r
-<dt>Rico.TableColumn.HighlightCell(chkcol,chkval,highlightColor,highlightBackground)\r
-<dd>特定の値が指定された列に存在する時、グリッドのセルをハイライトします。\r
-以下のコードは ex2highlight から取得され、列 1 が "HANAR" を含む時、行全体をハイライトします。\r
-<pre>\r
-var CustId='HANAR';\r
-var CustIdCol=1;\r
-var highlight=Rico.TableColumn.HighlightCell;\r
-...\r
-columnSpecs: [\r
-{ control:new highlight(CustIdCol,CustId,'red','yellow') },\r
-{ control:new highlight(CustIdCol,CustId,'red','yellow') },\r
-{ control:new highlight(CustIdCol,CustId,'red','yellow') },\r
-{ control:new highlight(CustIdCol,CustId,'red','yellow') },\r
-{ control:new highlight(CustIdCol,CustId,'red','yellow') },\r
-{ type:'date', control:new highlight(CustIdCol,CustId,'red','yellow') },\r
-{ type:'date', control:new highlight(CustIdCol,CustId,'red','yellow') }]\r
-</pre>\r
-\r
-<dt>Rico.TableColumn.bgColor()\r
-<dd>データベースの値が css カラーの名前や値を含みます。\r
-\r
-<dt>Rico.TableColumn.link(href,target)\r
-<dd>データベースの値が、他のページへの URL を含みます。\r
-href パラメータは、文字列に "{x}" を含む事により、グリッドの値への参照を含むかもしれません。 x は列の番号です。\r
-以下のコードは ex6 から取得されます。\r
-<pre>\r
-columnSpecs: [,\r
-{control:new Rico.TableColumn.link('ex2.asp?id={0}','_blank'),\r
- width:250},\r
-,'specQty']\r
-</pre>\r
-\r
-<dt>Rico.TableColumn.image()\r
-<dd>データベースの値が画像への url を含みます。\r
-以下のコードは photos.php から取得されます。\r
-<pre>\r
-imgctl=new Rico.TableColumn.image();\r
-...\r
-columnSpecs: [\r
-{control:imgctl,width:90},,,\r
-{type:'datetime'},{width:200}]\r
-</pre>\r
-\r
-<dt>Rico.TableColumn.lookup(map, defaultCode, defaultDesc)\r
-<dd>データベースの値を表示される値にマップします。\r
-</dl>\r
-\r
-<br>アプリケーション特有のロジックを実装する、独自の列コントロールを書く事も可能です。\r
-ここに例があります。\r
-<pre>\r
-// Display values white on black if\r
-//   first column contains the value "reverse"\r
-// Usage: { control:new MyCustomColumn() }\r
-MyCustomColumn = Class.create();\r
-\r
-MyCustomColumn.prototype = {\r
-  initialize: function() {},\r
-\r
-  _clear: function(gridCell,windowRow) {\r
-    gridCell.style.color='';\r
-    gridCell.style.backgroundColor='';\r
-    gridCell.innerHTML='&amp;nbsp;';\r
-  },\r
-\r
-  _display: function(v,gridCell,windowRow) {\r
-    var col0=this.liveGrid.buffer.getWindowValue(windowRow,0);\r
-    if (col0=="reverse") {\r
-      gridCell.style.color='white';\r
-      gridCell.style.backgroundColor='black';\r
-    } else {\r
-      gridCell.style.color='';\r
-      gridCell.style.backgroundColor='';\r
-    }\r
-    gridCell.innerHTML=this._format(v);\r
-  }\r
-}\r
-</pre>\r
-\r
-<dt><a name='filterUI'></a>filterUI\r
-<dd><a href='#FilterLocation'>FilterLocation</a> オプションがグリッドに指定されるならば、filterUI はそれぞれの列がどのようにフィルタされるかについてコントロールします。\r
-もし filterUI が、\r
-<ul>\r
-<li>null または省略されたら、列にはフィルタが表示されません。\r
-<li>'t' - テキストボックスフィルタを生成し、レコードはユーザのキーボードからの入力によってフィルタされて表示されます。\r
-<br>任意に後につくキャレット(^)は、テキストボックスの値が列の値の始めに一致すべき事を示します。\r
-そうでない場合は、列の値のどこにでも一致します。\r
-<br>任意に後につく数値はテキストボックスの数値を意味します(デフォルトのサイズは 10)\r
-<pre>\r
-filterUI:'t^20' \r
-// will create a text box that is 20 characters wide\r
-// text typed into the box will be compared to\r
-//    the beginning of each column value\r
-</pre>\r
-<li>'s' - リストに含む事の出来るすべての列の値と共にセレクトリストフィルタを生成します。\r
-グリッドのソースが SQL クエリなら、'select distinct' クエリを利用して実装されます。\r
-<ul>\r
-</dl>\r
-\r
-<dl>\r
-<a name='NumberFormatting'></a>\r
-<p><em>数値フォーマット:</em></p>\r
-\r
-<dt>multiplier\r
-<dd>表示される前に、その値はこの数値によって乗算されます。(デフォルトは 1)\r
-\r
-<dt>decPlaces\r
-<dd>小数点より右側の桁数(デフォルトは 0)\r
-\r
-<dt>decPoint\r
-<dd>小数点のシンボル(翻訳ファイルでオーバーライドされなければ、デフォルトは '.')\r
-\r
-<dt>thouSep\r
-<dd>千桁区切りのためのシンボル。(翻訳ファイルでオーバーライドされなければ、デフォルトは ',')\r
-\r
-<dt>negSign\r
-<dd>負数がどのように表示されるべきかを指定します。取り得る値は\r
-<ul>\r
-<li>L= 先頭にマイナスをつける(デフォルト)\r
-<li>T= 後ろにマイナスをつける\r
-<li>P= 括弧で囲む\r
-</ul>\r
-\r
-<dt>prefix\r
-<dd>数に始まりの文字列を付加します。一般的に通貨シンボルです。\r
-\r
-<dt>suffix\r
-<dd>数値の終わりに付加される文字列。例えば、 "%" シンボル。</dd>\r
-</dl>\r
-\r
-<dl>\r
-<a name='DateFormatting'></a>\r
-<p><em>日付フォーマット:</em></p>\r
-\r
-<dt>dateFmt\r
-<dd>date または datetime をどのように表示するのかを指定する文字列。\r
-デフォルトは "translateDate" であり、RicoTranslate オブジェクトで利用される dateFmt と timeFmt 文字列を意味します。\r
-(各種言語の翻訳ファイルでオーバーライドされなければ、、date のデフォルトは "mm/dd/yyyy" であり、datetime は "mm/dd/yyyy hh:mm:ss a/pm" です。)\r
-dateFmt="localeDate" ならば、その値は javascript のビルトイン関数である toLocaleDateString() を利用してフォーマットされる。\r
-dateFmt="localeDateTime" ならば、その値は javascript のビルトイン関数である toLocaleString() を利用してフォーマットされる。\r
-dateFmt 文字列は、以下の特殊文字シーケンスを含むでしょう。\r
-\r
-<ul>\r
-<li>yyyy - 4 桁の年\r
-<li>yy - 2 桁の年\r
-<li>mmmm - 月名\r
-<li>mmm - 3 文字の月名省略形。アジアの言語では、これはしばしば意味をなしません - これらの場合、それは完全な月の名前(mmmm と同じ)を返します。\r
-<li>mm - 2 桁の月数(ゼロで埋められた)\r
-<li>m - 1 または 2 桁の月数\r
-<li>dddd - 曜日\r
-<li>ddd - 3 文字の曜日省略形\r
-<li>dd - 2 桁の日数(ゼロで埋められた)\r
-<li>d - 1 または 2 桁の日数\r
-<li>hh - 2 桁の時、 12 時間時計(ゼロで埋められた)\r
-<li>h - 1 または 2 桁の時、 12 時間時計\r
-<li>HH - 2 桁の分、 24 時間時計(ゼロで埋められた)\r
-<li>H - 1 または 2 桁の時間、 24 時間時計\r
-<li>nn - 2 桁の分(ゼロで埋められた)\r
-<li>ss - 2 桁の秒(ゼロで埋められた)\r
-<li>a/p - a または p (am または pm のための)\r
-</ul>\r
-\r
-<pre>\r
-// display first column as "month year"\r
-columnSpecs : [{type:date, dateFmt:'mmm yyyy'}]\r
-</pre>\r
-</dd>\r
-\r
-<dt>prefix\r
-<dd>日付の先頭に付け加えられる文字列\r
-\r
-<dt>suffix\r
-<dd>日付の終わりに付加される文字列。例えば、タイムゾーンを含めるために利用出来ます。\r
-<pre>\r
-// indicate that times are GMT/UTC\r
-columnSpecs : [{type:datetime, suffix:' UTC'}]\r
-</pre>\r
-</dl>\r
-\r
-</body>\r
-</html>\r
index 16ab95f..d9942eb 100644 (file)
@@ -9,9 +9,6 @@
 <body>\r
 <h1>Creating a Rico SimpleGrid</h1>\r
 \r
 <body>\r
 <h1>Creating a Rico SimpleGrid</h1>\r
 \r
-<p><a href='SimpleGrid_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>\r
-<a href='SimpleGrid_ja.html'>View this page in Japanese</a></p>\r
-\r
 <p>SimpleGrid's are new to Rico 2.0 and share some of the same functionality as LiveGrids - \r
 resizable columns, frozen columns, and frozen headings. \r
 However, unlike a LiveGrid, the data is static and resides in the DOM -\r
 <p>SimpleGrid's are new to Rico 2.0 and share some of the same functionality as LiveGrids - \r
 resizable columns, frozen columns, and frozen headings. \r
 However, unlike a LiveGrid, the data is static and resides in the DOM -\r
diff --git a/documentation/SimpleGrid_ja.html b/documentation/SimpleGrid_ja.html
deleted file mode 100644 (file)
index c69870f..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-<title>Rico SimpleGrid</title>
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>Rico SimpleGrid の作成</h1>
-
-<p>SimpleGrid は Rico 2.0 で追加され、LiveGrids と同じ機能のいくらかを共有します - 
-リサイズ可能な列、固定された列と固定された見出し。
-しかしながら、LiveGrid と異なり、データは静的であり DOM に存在します - 
-それゆえに、バッファリング、AJAX リフレッシュ、ソート、フィルタリングの機能がありません。
-なぜ、SimpleGrid を使うのでしょうか?
-<ul>
-<li>それぞれのセルが含むことが出来るものが、より柔軟であるので - 
-列内のセルがすべて同じタイプである必要はありません。
-<li>状況によって、それは LiveGrid よりクライアント上で、より良く実行することができます。
-特にグリッドに多くの列を表示している遅いクライアントで。
-<li>最後に、SimpleGrid は入力要素である(チェックボックス、セレクトリスト、その他)を含むことができます。 
-LiveGrid も入力要素を含むことができますが、要素の値が LiveGrid のバッファに保存されるので、
-サーバに値をサブミットするには扱いにくいです。
-SimpleGrids は、この問題で苦しみません。
-あなたが単に標準的な <code>&lt;form&gt;...&lt;/form&gt;</code> タグでグリッド全体を囲めば、
-グリッド中のどんな入力要素でもサーバーへサブミットされます。
-</ul>
-
-<p>SimpleGrids は、次の 2 つの方法で作成する事が出来ます。
-<ol>
-<li>SimpleGrid プラグインの中の 1 つを用いて。PHP、ASP と .net のためのプラグインが存在します。
-<li>XSLTを用いて。Rico は、標準的なHTMLテーブルを SimpleGrid に変換する XSL ファイルを持っています。
-</ol>
-
-<h2>利用モデル 1: SimpleGrid プラグインの利用</h2>
-<p>このセクションは、Rico ディストリビューションに含まれる 
-simplegrid.php/asp/aspx の実例について記述します
-<ul>
-<li>PHP では。
-<ul>
-<li>最初に、SimpleGrid プラグインへの参照を作成して下さい。
-<pre>
-require "../../plugins/php/SimpleGrid.php";
-</pre>
-<li>SimpleGrid プラグインクラスのインスタンスを作成して下さい(サーバサイド)。
-<pre>
-$grid=new SimpleGrid();
-</pre>
-
-<li>グリッドの見出しを作成して下さい。
-AddHeadingRow に 'true' を渡して、これがメインの見出し行である事を示します - 
-それはリサイザを得ます。
-メインの見出し行の列数は、データの列数と <em>必ず</em> 同じでなければなりません。
-他の見出し行は、複合列を扱うために "colspan" タグを含むかも知れません。
-複合見出し行を持つならば、唯一無二の一行だけが、メインの行として指定されるかもしれません。
-<pre>
-$grid->AddHeadingRow(true);
-for ($c=1; $c<=$numcol; $c++) {
-  $grid->AddCell("Column $c");
-}
-</pre>
-
-<li>グリッドデータセクションを実装して下さい。
-どこででも AddDataRow() を呼んで、通常は、標準的な html テーブルに <code>&lt;tr&gt;</code> タグを配置します。
-どこででも AddCell() を呼んで、 <code>&lt;td&gt;</code> タグを配置します。
-<pre>
-for ($r=1; $r<=100; $r++) {
-  $grid->AddDataRow();
-  $grid->AddCell($r);
-  for ($c=2; $c<=$numcol; $c++) {
-    $grid->AddCell("Cell $r:$c");
-  }
-}
-</pre>
-
-<li>テーブルをレンダリングして下さい(html 出力を生成します)。
-最初のパラメータはグリッド id で、第二のパラメータは、固定された列の数です。
-<pre>
-$grid->Render("ex1", 1);
-</pre>
-
-</ul>
-
-<li>ASP では。
-<ul>
-<li>最初に、SimpleGrid プラグインへの参照を作成して下さい。
-<pre>
-&lt;!-- #INCLUDE FILE = "../../plugins/asp/SimpleGrid.vbs" --&gt;
-</pre>
-
-<li>SimpleGrid プラグインクラスのインスタンスを作成して下さい(サーバサイド)。
-<pre>
-set grid=new SimpleGrid
-</pre>
-
-<li>グリッドの見出しを作成して下さい。
-AddHeadingRow に 'true' を渡して、これがメインの見出し行である事を示します - 
-それはリサイザを得ます。
-メインの見出し行の列数は、データの列数と <em>必ず</em> 同じでなければなりません。
-他の見出し行は、複合列を扱うために "colspan" タグを含むかも知れません。
-複合見出し行を持つならば、唯一無二の一行だけが、メインの行として指定されるかもしれません。
-<pre>
-grid.AddHeadingRow true
-for c=1 to numcol
-  grid.AddCell "Column " & c
-next
-</pre>
-
-<li>グリッドデータセクションを実装して下さい。
-どこででも AddDataRow() を呼んで、通常は、標準的な html テーブルに <code>&lt;tr&gt;</code> タグを配置します。
-どこででも AddCell() を呼んで、<code>&lt;td&gt;</code> タグを配置します。
-<pre>
-for r=1 to 100
-  grid.AddDataRow
-  grid.AddCell r
-  for c=2 to numcol
-    grid.AddCell "Cell " & r & ":" & c
-  next
-next
-</pre>
-
-<li>テーブルをレンダリングして下さい(html 出力を生成します)。
-最初のパラメータはグリッド id で、第二のパラメータは、固定された列の数です。
-<pre>
-grid.Render "ex1", 1
-</pre>
-</ul>
-
-<li>.net では。
-<ul>
-<li>最初に、SimpleGrid プラグインへの参照を作成して下さい。
-<pre>
-&lt;%@ Register TagPrefix="Rico" TagName="SimpleGrid" 
-    Src="../../plugins/dotnet/SimpleGrid.ascx" %&gt;
-</pre>
-
-<li>SimpleGrid プラグインクラスのインスタンスを作成して下さい(サーバサイド)。
-<pre>
-&lt;Rico:SimpleGrid runat='server' id='ex1' FrozenCols='1' /&gt;
-</pre>
-
-<li>グリッドの見出しを作成して下さい - 通常は Page_Load イベント内で。
-AddHeadingRow に 'true' を渡して、これがメインの見出し行である事を示します - 
-それはリサイザを得ます。
-メインの見出し行の列数は、データの列数と <em>必ず</em> 同じでなければなりません。
-他の見出し行は、複合列を扱うために "colspan" タグを含むかも知れません。
-複合見出し行を持つならば、唯一無二の一行だけが、メインの行として指定されるかもしれません。
-<pre>
-  ex1.AddHeadingRow(true)
-  for c=1 to numcol
-    ex1.AddCell("Column " & c)
-  next
-</pre>
-
-<li>グリッドデータセクションを実装して下さい。
-どこででも AddDataRow() を呼んで、通常は、標準的な html テーブルに <code>&lt;tr&gt;</code> タグを配置します。
-どこででも AddCell() を呼んで、<code>&lt;td&gt;</code> タグを配置します。
-<pre>
-  for r=1 to 100
-    ex1.AddDataRow()
-    ex1.AddCell(r)
-    for c=2 to numcol
-      ex1.AddCell("Cell " & r & ":" & c)
-    next
-  next
-</pre>
-
-<li>他のプラグインと違い、.net コントロールにより自動的にレンダリングされます。
-</ul>
-
-<li>最後に、利用されるプラグインに関係なく javascript SimpleGrid オブジェクトを
-初期化する必要があります(クライアントサイド):
-<pre>
-&lt;script type='text/javascript'&gt;
-Rico.loadModule('SimpleGrid','greenHdg.css');
-
-Rico.onLoad( function() {
-  var opts = {  
-    columnSpecs: ['specQty']  // display first column as a numeric quantity
-  };
-  var ex1=new Rico.SimpleGrid ('ex1', opts);
-});
-&lt;/script&gt;
-</pre>
-
-</ul>
-
-
-<h2>利用モデル 2: XSLT 変換の利用</h2>
-
-<p>ウェブページが XHTML 対応であるなら、ページ上の標準的な html テーブルを、
-"ricoSimpleGrid.xsl" XSL スタイルシートを利用した SimpleGrid にする事が可能です。
-一時、Rico はクライアントでこの変換をする事をサポートしていました。
-しかし、Prototype ライブラリの変化により、これは既に可能でありません。
-したがって、このアプローチを使う方を選ぶなら、XSLT 変換は <em>必ず</em> サーバで実行されなければなりません。
-サーバサイド変換を行うインストラクション。
-<ul>
-<li><a href="http://www.php.net/manual/en/ref.xsl.php">PHP5 を利用して</a>
-<li><a href="http://www.topxml.com/dotnet/articles/xslt/default.asp">.net を利用して</a>
-</ul>
-
-<p>この変換は "ricoSimpleGrid" クラスでテーブルをコンバートするだけです。
-<pre>
-&lt;table id='test1' class='ricoSimpleGrid'&gt;
-</pre>
-
-<p>固定された列の見出しは、 <code>&lt;th&gt;</code> タグに class="ricoFrozen" を持たなければなりません。
-複合見出し行があるならば、メインの見出し行は "_main" で終わる id を持たなければなりません
-(これは、リサイズハンドルを表示する行です)。
-その変換は、テーブルの <code>&lt;thead&gt;</code> セクションでグリッドの見出しを探します。
-thead セクションが存在しないなら、その変換はテーブルの最初の行が見出し列であると仮定します。
-<pre>
-&lt;table id="test1" class="ricoSimpleGrid"&gt;
-
-  &lt;thead&gt;
-     &lt;tr id="customer_livegrid_main"&gt;
-        &lt;th class="ricoFrozen"&gt;ID&lt;/th&gt;
-        &lt;th&gt;Customer&lt;/th&gt;
-        &lt;th&gt;Address&lt;/th&gt;
-        &lt;th&gt;City&lt;/th&gt;
-     &lt;/tr&gt;
-  &lt;/thead&gt;
-
-  &lt;tbody&gt;
-    &lt;!-- grid data --&gt;
-  &lt;/tbody&gt;
-&lt;/table&gt;
-</pre>
-
-<p>最後に、SimpleGrid javascript オブジェクトは、CDATA セクションで宣言と初期化が行われなければなりません。
-ricoInit() の呼び出しは、XSLT 変換によって生成されます。
-<pre>
-&lt;script type="text/javascript"&gt;
-//&lt;![CDATA[
-
-function ricoInit() {
-  try {
-  Rico.loadModule('SimpleGrid');
-  Rico.onLoad(ricoInit2);
-  } catch(e) { alert(e.message); }
-}
-
-var grid1
-function ricoInit2() {
-  try {
-  grid1=new Rico.SimpleGrid ('test1',{maxHt:180});
-  } catch(e) { alert(e.message); }
-}
-//]]&gt;
-&lt;/script&gt;
-</pre>
-
-
-
-<h2>リファレンス</h2>
-
-<h3>コンストラクタ</h3>
-<pre>
-
-  var grid = new Rico.SimpleGrid (table_id, grid_options);
-
-</pre>
-<ul><li><strong>table_id</strong> は、LiveGrid によって実装されるテーブルの DOM id です
-<li><strong>grid_options</strong>(下記参照)
-</ul>
-
-<h3>オプション</h3>
-<h4>一般的なオプション</h4>
-<dl>
-
-<dt>frozenColumns
-<dd>グリッドの左側の固定された列の数(デフォルトは 0)
-
-<dt>maxHt
-<dd>SimpleGrid の高さの最大ピクセル(デフォルトは null)
-
-<dt>windowResize
-<dd>window.resize イベントでグリッドをリサイズしますか?
-アコーディオンに埋め込まれる時は false を設定して下さい(デフォルトは true)
-
-<dt>useUnformattedColWidth
-<dd>グリッドの構成時に、html テーブルの列幅を利用しますか?(デフォルトは true)
-
-<dt>scrollBarWidth
-<dd>実際にはスクロールバーの幅を変えず、位置決めで使用されます。(デフォルトは 19)
-
-<dt>minScrollWidth
-<dd>固定された列の幅がクライアントウィンドウの幅を上回る時、
-スクロールしている列の幅の合計がどのくらい広がるべきですか?
-
-<dt>highlightElem
-<dd>グリッドで何がハイライトされますか。取り得る値は。
-<ul>
-<li>cursorRow - カーソルの下のグリッドの行
-<li>cursorCell - カーソルの下のグリッドのセル
-<li>menuRow - ユーザがグリッドのコンテキストメニューを開く時に関連のある行
-<li>menuCell - ユーザがグリッドのコンテキストメニューを開く時に関連のあるセル
-<li>selection - ユーザによって選択されるセル
-<li>none - 何もハイライトされない(デフォルト)
-</ul>
-
-<dt>exportWindow
-<dd>ユーザがグリッドからデータをエクスポートする時 window.open() に渡されるオプション文字列。
-(デフォルトは "height=300,width=500,scrollbars=1,menubar=1,resizable=1")
-</dl>
-
-
-<h4>画像</h4>
-<dl>
-<dt>resizeBackground
-<dd>列のリサイズハンドルに利用される画像(デフォルトは 'resize.gif')
-
-<dt>sortAscendImg
-<dd>列を昇順でソートする事を示すために使われる画像(デフォルトは 'sort_asc.gif')
-
-<dt>sortDescendImg
-<dd>列を降順でソートする事を示すために使われる画像(デフォルトは 'sort_desc.gif')
-</dl>
-
-
-<h4>メニューとイベントハンドリングオプション</h4>
-<dl>
-
-<dt>contextmenu
-<dd>ユーザがグリッドのセル上で右クリックした時に取る行動(デフォルトは null)
-
-<dt>menuEvent
-<dd>メニューのトリガーイベント。取り得る値は。
-<ul>
-<li>click
-<li>dblclick (デフォルト)
-<li>contextmenu
-<li>none
-</ul>
-
-<dt>click
-<dd>ユーザがグリッドのセル上でシングルクリックした時に取る行動(デフォルトは null)
-
-<dt>dblclick
-<dd>ユーザがグリッドのセル上でダブルクリックした時に取る行動(デフォルトは null)
-
-</dl>
-
-<h4>クッキーオプション</h4>
-<dl>
-
-<dt>saveColumnInfo
-<dd>グリッドのクッキーに、どの詳細設定を保存するかを指定します。
-一つのクッキーだけが、それぞれのグリッドのために利用されます。
-幅の設定が、列の非表示/表示の状態を含む事に注意して下さい。(デフォルトは {width:true, filter:false, sort:false}) 
-
-<dt>cookiePrefix
-<dd>クッキー名の先頭に付け加えられる文字列(デフォルトは 'RicoGrid.')
-
-<dt>cookieDays
-<dd>数字の日数前のクッキーは期限切れになります。
-指定しなければ、クッキーは現在のセッションの間だけ維持されます。(デフォルトは null)
-
-<dt>cookiePath
-<dd>グリッドのクッキーを読む事が出来るトップレベルディレクトリを設定します。
-指定しなければ、それはクッキーを設定するページのパスになります。(デフォルトは null)
-
-<dt>cookieDomain
-<dd>クッキーがどのドメインに送られなければならないかについて、ブラウザに知らせます。
-指定しなければ、それはクッキーを設定するページのドメインになります。(デフォルトは null)
-
-</dl>
-
-<h4>デフォルトの列</h4>
-<dl>
-<dt style='font-weight:normal;'>これらのアイテムはそれぞれ、
-columnSpecs  オプションによって、列ごとのベースにオーバーライドする事が出来ます。
-
-<dt>canSortDefault
-<dd>列はデフォルトでソート可能ですか?(LiveGrid のデフォルトは true、SimpleGrid のデフォルトは false)
-
-<dt>canFilterDefault
-<dd>列をフィルタする事が出来ますか?
-(LiveGrid のデフォルトは RicoBuffer.options.canFilter、SimpleGrid のデフォルトは false)
-
-<dt>canHideDefault
-<dd>列を 表示/非表示 する事が出来ますか?(デフォルトは true)
-
-<dt>allowColResize
-<dd>ユーザによる列のリサイズを許しますか? (デフォルトは true)
-
-<dt>defaultWidth
-<dd>それぞれの列のデフォルトのピクセル幅
-
-</dl>
-
-<h4>列ごとの構成</h4>
-<dl>
-<dt style='font-weight:normal;'>各々の列のためのオプションは、columnSpecs オプションに含まれます。
-columnSpecs は、各々の列のためのエントリに関する配列です。
-各々の列のエントリは、以下のいずれかで行う事が出来ます。
-<ul>
-<li>null (デフォルト) --  その場合、Rico.TableColumn.DEFAULT. の仕様によって列はフォーマットされます。
-<li>a string -- あらかじめ定義されたフォーマットの内の一つを定義します:QTY、PERCENT、DOLLAR、または EURO
-<li>an object -- 下記の表にあるプロパティの一つ以上のエントリを含みます。
-</ul>
-<p>ここに、列 0、1 と 3 が仕様を含む例を挙げます。
-<pre>
-columnSpecs : [{noResize:true, ClassName:'alignright'},
-               {ClassName:'aligncenter'},
-               ,
-               {visible:false}]
-</pre>
-
-<dt>canHide
-<dd>列を 表示/非表示 する事が出来ます。(デフォルトは grid.options.canHideDefault)
-
-<dt>visible
-<dd>列は、初めは隠されていません。
-grid.options.saveColumnInfo.width が true で、列のためのクッキーに値があるなら、クッキーの値が優先されます。
-(デフォルトは true)
-
-<dt>width
-<dd>列の初期幅。
-grid.options.saveColumnInfo.width が true で、列のためのクッキーに値があるなら、クッキーの値が優先されます。
-(デフォルトは grid.options.defaultWidth)
-
-<dt>noResize
-<dd>列のリサイズを許しますか?(デフォルトは grid.options.allowColResize)
-
-<dt>ClassName
-<dd>必要に応じて、これを 'alignright' または 'aligncenter' にセットして下さい - 例を見て下さい。
-これが見出しを整列しない事に注意して下さい - ヘッダの整列を達成するためには、&lt;th&gt; タグで align="right" を利用して下さい。
-(デフォルトは table_id + '_col' + column_index)
-
-</dl>
-
-</body>
-</html>
index fda2349..8f0c339 100644 (file)
@@ -2,21 +2,18 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-<title>Grid Browser Compatibility</title>
+<title>Rico Browser Compatibility</title>
 <link href="ricoDocs.css" rel="Stylesheet" type="text/css">
 </head>
 
 <body>
 <link href="ricoDocs.css" rel="Stylesheet" type="text/css">
 </head>
 
 <body>
-<h1>Rico Grid Browser Compatibility</h1>
+<h1>Rico Browser Compatibility</h1>
 
 
-<p><a href='browsers_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>
-<a href='browsers_ja.html'>View this page in Japanese</a></p>
-
-<p>Rico 2.x grid examples have been tested on the following browsers and operating systems.
-LiveGrid and SimpleGrid likely work in other environments 
+<p>Rico 3.0 examples have been tested on the following browsers and operating systems.
+Rico likely works in other environments 
 (e.g. Opera on the Mac, etc); this list
 just indicates where developer testing has been completed.
 (e.g. Opera on the Mac, etc); this list
 just indicates where developer testing has been completed.
-Except where noted below, all aspects of the grid are fully functional.
+Except where noted below, all aspects of the Rico are fully functional.
 <p><table border="1" cellpadding='4' cellspacing='0' class="compat">
        <thead><tr>
          <th>&nbsp;</th>
 <p><table border="1" cellpadding='4' cellspacing='0' class="compat">
        <thead><tr>
          <th>&nbsp;</th>
@@ -53,7 +50,7 @@ Except where noted below, all aspects of the grid are fully functional.
          <td><img src='images/checkmark.gif' alt='checkmark'></td>
        </tr>
        <tr>
          <td><img src='images/checkmark.gif' alt='checkmark'></td>
        </tr>
        <tr>
-         <th>FF 3.0</th>
+         <th>FF 3.x</th>
          <td><img src='images/checkmark.gif' alt='checkmark'></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><img src='images/checkmark.gif' alt='checkmark'></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
@@ -95,7 +92,7 @@ Except where noted below, all aspects of the grid are fully functional.
          <td><img src='images/checkmark.gif' alt='checkmark'></td>
        </tr>
        <tr>
          <td><img src='images/checkmark.gif' alt='checkmark'></td>
        </tr>
        <tr>
-         <th>Google Chrome (beta)</th>
+         <th>Google Chrome</th>
          <td><img src='images/checkmark.gif' alt='checkmark'></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td><img src='images/checkmark.gif' alt='checkmark'></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
diff --git a/documentation/browsers_ja.html b/documentation/browsers_ja.html
deleted file mode 100644 (file)
index 1cc291b..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-<title>Grid Browser Compatibility</title>
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>Rico Grid のブラウザ互換性</h1>
-
-<p>Rico 2.0 グリッドの実例は、以下のブラウザとオペレーティングシステム上でテストされました。
-LiveGrid と SimpleGrid は、他の環境でも、おそらく動きます。
-(例えば、MS Vista、Mac 上の Opera、その他)
-この表は、単に開発者のテストがどの環境で行われ、完了したかについて示します。
-下で注意される場合を除き、グリッドのすべての側面は完全に機能的です。
-<p><table border="1" cellpadding='4' cellspacing='0' class="compat">
-       <thead><tr>
-         <th>&nbsp;</th>
-         <th colspan="3">オペレーティングシステム</th>
-       </tr>
-       <tr>
-         <th>ブラウザ</th>
-         <th>Windows XP</th>
-         <th>Macintosh 10.4</th>
-         <th>Linux (Knoppix 5)</th>
-       </tr></thead>
-       <tbody><tr>
-         <th>IE6</th>
-         <td><img src='images/checkmark.gif'></td>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-       </tr>
-       <tr>
-         <th>IE7</th>
-         <td><img src='images/checkmark.gif'></td>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-       </tr>
-       <tr>
-         <th>FF 1.5/2.0</th>
-         <td><img src='images/checkmark.gif'></td>
-         <td><img src='images/checkmark.gif'><sup>1</sup></td>
-         <td><img src='images/checkmark.gif'></td>
-       </tr>
-       <tr>\r
-         <th>FF 3.0</th>\r
-         <td><img src='images/checkmark.gif' alt='checkmark'></td>\r
-         <td>&nbsp;</td>\r
-         <td>&nbsp;</td>\r
-       </tr>\r
-       <tr>\r
-         <th>Opera 9.0 - 9.2</th>\r
-         <td><img src='images/checkmark.gif' alt='checkmark'><sup>1,2,3</sup></td>\r
-         <td>&nbsp;</td>\r
-         <td><img src='images/checkmark.gif' alt='checkmark'><sup>1,2,3</sup></td>\r
-       </tr>\r
-       <tr>\r
-         <th>Opera 9.5+</th>\r
-         <td><img src='images/checkmark.gif' alt='checkmark'><sup>2</sup></td>\r
-         <td>&nbsp;</td>\r
-         <td>&nbsp;</td>\r
-       </tr>\r
-       <tr>
-         <th>Safari 2.0</th>
-         <td>&nbsp;</td>
-         <td><img src='images/checkmark.gif'></td>
-         <td>&nbsp;</td>
-       </tr>
-       <tr>
-         <th>Safari 3.0 (beta)</th>
-         <td><img src='images/checkmark.gif'></td>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-       </tr>
-       <tr>
-         <th>Camino</th>
-         <td>&nbsp;</td>
-         <td><img src='images/checkmark.gif'><sup>1</sup></td>
-         <td>&nbsp;</td>
-       </tr>
-       <tr>
-         <th>Konqueror 3.5</th>
-         <td>&nbsp;</td>
-         <td>&nbsp;</td>
-         <td><img src='images/checkmark.gif'></td>
-       </tr></tbody>
-</table>
-<p>注意
-<ol>
-<li>1. これらの構成では、メニューが表示される時、スクロールバーは隠されます
-(スクロールバーはメニューに干渉しました)。
-<li>Operaでは、ダブルクリックを使用してメニューを呼び出す場合、
-"Tools -> Preferences -> Advanced tab -> Toolbars" へ行き、
-Opera の "Double click text to display context menu" をオフにするべきです。
-<li>LiveGridForms は、
-選んだボックスを扱う方法に関する <a href="http://dowdybrown.com/dbprod/testselect.htm">バグ</a> のため Opera で利用する事は
-推薦されません。<em>朗報です! このバグはバージョン9.5で直されるようです。</em>
-</ol>
-
-<p><a href="http://laptop.org">OLPC</a> は Gecko レイアウトエンジンに基づくカスタムブラウザを含んでいます。
-Rico は、このシステム上で問題無く実行出来ます。
-
-<p>Firefox のバージョンが 1.x と 2.x で、ポップアップメニューがスクロールバーの上に来た場合、
-minor artifacts を表示しました。これは、バージョン3で改善されるようです。
-
-<p>IE8 ベータ 1 は、IE7 互換モードで操作する時だけ動作します。
-
-</body>
-</html>
index 9102090..b38df24 100644 (file)
@@ -9,9 +9,6 @@
 <body>\r
 <h1>Rico Grids</h1>\r
 \r
 <body>\r
 <h1>Rico Grids</h1>\r
 \r
-<p><a href='grids_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>\r
-<a href='grids_ja.html'>View this page in Japanese</a></p>\r
-\r
 <p>The Rico library supports 2 different types of grids: \r
 <strong>LiveGrid</strong> and <strong>SimpleGrid</strong>. \r
 LiveGrid data is always buffered in a 2-dimensional JavaScript array. As the user scrolls\r
 <p>The Rico library supports 2 different types of grids: \r
 <strong>LiveGrid</strong> and <strong>SimpleGrid</strong>. \r
 LiveGrid data is always buffered in a 2-dimensional JavaScript array. As the user scrolls\r
diff --git a/documentation/grids_ja.html b/documentation/grids_ja.html
deleted file mode 100644 (file)
index 5563947..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
-<title>Rico Grid Overview</title>
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>Rico のグリッド</h1>
-<p>Rico ライブラリは 2 つの異なったタイプのグリッドをサポートします。
-<strong>LiveGrid</strong> と <strong>SimpleGrid</strong>. 
-LiveGrid のデータは、2次元の JavaScript 配列で、常にバッファリングされます。
-ユーザがグリッドを通して垂直にスクロールするとき、データは配列からグリッドに動的にコピーされます。
-一方、SimpleGrids はバッファリングを行いません。
--- グリッドのためのすべてのデータは JavaScript のデータ構造では無く、
-<a href="http://en.wikipedia.org/wiki/Document_Object_Model">DOM</a> に存在しています。
-
-<p>どちらのタイプのグリッドも、次のようないくつかの共通点を持っています。
-<ul>
-<li>画面上部で切り離されてスクロールしない、固定された列見出し
-<li>グリッドの左端で固定された列
-<li>リサイズ可能な列
-<li>共通の css スタイリング - LiveGrids 用に開発されたスタイルは、SimpleGrids でも同様に機能します
-<li>右から左に読む言語(rtl)との互換性 - 
-<a href="asp/rtl/ex1.asp" target="_top">ASP</a> と <a href="php/rtl/ex1.php" target="_top">PHP</a> の実例に含まれます</a>
-<li>Rico のポップアップ(コンテキスト)メニューとの互換性
-</ul>
-
-<hr>
-<h2>LiveGrid</h2>
-<p>Rico は、LiveGrid バッファをロードするために多くのサポートを提供します。
-バッファは次の項目からロードする事が出来ます。
-<ul>
-<li>SQL データベースクエリ
-<li>XML ファイル
-<li>HTML テーブル
-<li>javascript 配列
-</ul>
-
-<h3>LiveGrid のデータベース接続</h3>
-<p>SQL クエリの実行結果を LiveGrid にロードするタスクを簡素化するために、
-Rico にはデータベースと LiveGrid を接続する "plug-ins" のセットが付属しています。
-Rico プラグインは次のデータベースでテストされました。
-
-<p><table border='1' cellspacing='0' cellpadding='4' class='compat' style='margin-bottom:0px'>
-<thead>
-<tr bgcolor='#DDD'>
-<th>&nbsp;</th>
-<th>MySQL</th>
-<th>Oracle</th>
-<th>DB2</th>
-<th>SQL Server</th>
-<th>MS Access</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<th>PHP</th>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-<td>&nbsp;</td>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-</tr>
-<tr>
-<th>ASP</th>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-</tr>
-<tr>
-<th>.net</th>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-<td><img src='images/checkmark.gif'></td>
-</tr>
-</tbody>
-</table>
-<p style='font-size:8pt; margin:0px;'>2007 年 11 月における Rico プラグイン/データベース の互換性
-<br>
-<br>* ASP プラグインは ADO を、.netプラグインは ADO.net を使用するので、
-<br>ADO と互換性があるどんなデータソースにも接続することができるはずです。</p>
-
-<p>LiveGrid は <a href="http://en.wikipedia.org/wiki/Ajax_%28programming%29">AJAX</a> テクノロジーを使うので、
-一度にクライアントへ送る SQL クエリの実行結果は一部だけです。
-ユーザーが格子をスクロールすると、
-JavaScript コードはクエリの結果のどの部分が必要とされているかについて決定し、
-AJAX リクエストをプラグインに送り返します。
-プラグインはそれらの結果をデータベースから検索して、それらをクライアントに返します。
-なので、クエリが返す結果が 10 行か 100,000 行かに関係なく、
-LiveGrid はインタラクティブなユーザインタフェースで迅速かつ容易に結果を表示する事ができます。
-
-<p>最後に、もしユーザーがデータの変更を許されているならば、Rico プラグインは、それさえも簡単にします。
-単に <strong>LiveGrid Forms</strong> を使っているグリッドを定義して下さい 
--- レコードセレクションの追加、編集、そして削除は、グリッドのコンテキスト(ポップアップ)メニューから追加されます。
-
-<ul>
-<li>追加や編集が選ばれるとき、ポップアップフォームはユーザに提示されます。
-<li>ユーザーがフォームを "保存する" とき、データはオリジナルスクリプトへポストバックされ、
-それはデータベースへ結果を書きます。
-</ul>
-
-それが複雑に聞こえるならば、心配しないでください!
-この仕事の全ては、プラグインによって取り扱われます。
-それがユーザーとプログラマーの両方にとって、
-どれくらい簡単かという実証については、 "ex2edit" の実例を見て下さい。
-"ex4edit" は、一つのページ内で複数のグリッドを編集可能にする方法を示します。
-
-<h3>LiveGrid の XML 実装</h3>
-
-<p>LiveGrid にデータをロードするのがプラグインで簡単になっている間は、それらは必要ではありません。
-データがこの形式に従う限り、どんなソースからも LiveGrid のバッファを XML データにロードする事が出来ます。
-
-<pre>
-&lt;ajax-response&gt;
-&lt;response type='object' id='MyGridId_updater'&gt;
-&lt;rows update_ui='true' offset='0'&gt;
-&lt;tr&gt;&lt;td&gt;Data for row 1, cell 1&lt;/td&gt;&lt;td&gt;Data for row 1, cell 2&lt;/td&gt;&lt;/tr&gt;
-&lt;tr&gt;&lt;td&gt;Data for row 2, cell 1&lt;/td&gt;&lt;td&gt;Data for row 2, cell 2&lt;/td&gt;&lt;/tr&gt;
-&lt;/rows&gt;
-&lt;/response&gt;
-&lt;/ajax-response&gt;
-</pre>
-
-天気と写真の実例を見てください、それぞれ Yahoo 天気情報と Flickr からデータを検索して、上記のデータ構造に再フォーマットしています。
-これらの実例は、現在、、ASP では無く PHP と .net のバージョンで利用できます。
-
-<h3>HTML テーブルデータによる LiveGrid 実装</h3>
-
-<p>LiveGrid は伝統的な HTML テーブルを持つウェブページの上で簡単に作る事も出来ます。
-単に ID をテーブルに割り当てて、LiveGrid の初期化中に、そのIDを渡してください。
-テーブルの thead セレクションと tbody のデータから見出しは取得する事が出来ます。
-この場合 AJAX は実行されませんが、データは JavaScript 配列でまだバッファリングされます。
-いくつかの実例は Rico ディストリビューションに含まれますので、
-"LiveGrid-Static Buffer" と印されている物を探して下さい。
-</p>
-
-<hr>
-<h2>SimpleGrid</h2>
-
-<p>SimpleGrid は Rico 2.0 にとって新しく、LiveGrids と同じ機能のいくらかを共有します
- - リサイズ可能な列、固定された列と固定された見出し。
-しかしながら、LiveGrid と異なり、データは静的であり DOM に存在します
- - それゆえに、バッファリング、AJAX リフレッシュ、ソート、フィルタリングの機能がありません。
-なぜ、SimpleGrid を使うのでしょうか?
-<ol>
-<li>それぞれのセルが含むことが出来るものが、より柔軟であるので - 
-列内のセルがすべて同じタイプである必要はありません。
-<li>状況によって、それは LiveGrid よりクライアント上で、より良く実行することができます。
-特にグリッドに多くの列を表示している遅いクライアントで。
-<li>最後に、SimpleGrid は入力要素である(チェックボックス、セレクトリスト、その他)を含むことができます。
-LiveGrid も入力要素を含むことができますが、要素の値が LiveGrid のバッファに保存されるので、
-サーバに値をサブミットするには扱いにくいです。
-SimpleGrids は、この問題で苦しみません。
-あなたが単に標準的な &lt;form&gt;&lt;/form&gt; タグでグリッド全体を囲めば、
-グリッド中のどんな入力要素でもサーバーへサブミットされます。
-</ol>
-
-<p>SimpleGrid の最も洗練された例は、ディストリビューションに含まれているスプレッドシートです。
-式を入力する事ができ、入力値を変更すると、それは再計算されるでしょう - 
-まさしく商業スプレッドシートのように。
-実例のメニューの "HTML Examples" のセクションでスプレッドシートへのリンクを見つけることができます。
-スプレッドシートで、 <img alt="help" src="images/sheet/help.gif"> ボタンをクリックして、それができるすべてを見て下さい。
-
-<p>SimpleGrids は、次の 2 つの方法で作成する事が出来ます。
-<ul>
-<li>SimpleGrid プラグインの中の 1 つを用いて。PHP、ASP と .net のためのプラグインが存在します。
-<li>XSLTを用いて。Rico は、標準的なHTMLテーブルを SimpleGrid に変換する XSL ファイルを持っています。
-</ul>
-
-<h3>プラグインを利用しての SimpleGrid の作成</h3>
-
-<p>各プラグインは SimpleGrid のクラスを定義します。
-クラスの中に、ヘッダ行とデータ行を始めるメソッドがあります。 - 
-HTML テーブル内のどこかに &lt;tr&gt; タブを置いて、それらのメソッドの内の一つを呼ぶだけです。
-また、セルを作成するメソッドもあります。 - 
-HTML テーブル内のどこかに &lt;th&gt; タブか &lt;td&gt; タブを置いて、それを呼ぶだけです。
-テーブルの内容を定義し終わったら、描画メソッドを呼ぶだけです。
-(.net プラグイン以外では描画は自動的に行われます)
-それは、とても簡単です!
-
-<h3>XSLT を利用しての SimpleGrid の作成</h3>
-
-<p>ウェブページが XHTML 対応であるならば、SimpleGrid を生成するもう一つの方法があります。
-ページ上のテーブルを SimpleGrids に変換するために、XSL スタイルシートである "ricoSimpleGrid.xsl" を使うだけです。
-スタイルシートは "ricoSimpleGrid" のクラス名でテーブルを探して、それから変換を行います。
-一時は、Rico はクライアント上でこの変換をサポートしていました。
-しかしながら、Prototype ライブラリの変更のために、すでに出来なくなりました。
-したがって、このアプローチで行う方を選ぶならば、 XSLT 変換はサーバーで実行されなければなりません。
-
-</body>
-</html>
index 238fec0..195b567 100644 (file)
@@ -41,8 +41,8 @@ ul li {
 <ul>\r
 <li><a href="welcome.html">Welcome to Rico!</a>\r
 <li><a href="InstallNotes.html">Installing the examples</a>\r
 <ul>\r
 <li><a href="welcome.html">Welcome to Rico!</a>\r
 <li><a href="InstallNotes.html">Installing the examples</a>\r
+<li><a href="browsers.html">Browser compatibility</a>\r
 <li><a href="grids.html">Grid overview</a>\r
 <li><a href="grids.html">Grid overview</a>\r
-<li><a href="browsers.html">LiveGrid browser compatibility</a>\r
 <li><a href="LiveGrid.html">Creating a LiveGrid</a>\r
 <li><a href="SimpleGrid.html">Creating a SimpleGrid</a>\r
 <li><a href="GridStyles.html">Grid Styles</a>\r
 <li><a href="LiveGrid.html">Creating a LiveGrid</a>\r
 <li><a href="SimpleGrid.html">Creating a SimpleGrid</a>\r
 <li><a href="GridStyles.html">Grid Styles</a>\r
index 3198d99..2471e10 100644 (file)
@@ -9,9 +9,6 @@
 <body>
 <h1>Rico Translation</h1>
 
 <body>
 <h1>Rico Translation</h1>
 
-<p><a href='translations_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>
-<a href='translations_ja.html'>View this page in Japanese</a></p>
-
 <p>The Rico library contains a translation object (RicoTranslate) so that
 applications can be written using Rico that support multiple languages.
 The translation object also stores the default date and number
 <p>The Rico library contains a translation object (RicoTranslate) so that
 applications can be written using Rico that support multiple languages.
 The translation object also stores the default date and number
diff --git a/documentation/translations_ja.html b/documentation/translations_ja.html
deleted file mode 100644 (file)
index 2cf6ff4..0000000
+++ /dev/null
@@ -1,192 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-<title>Rico Translation</title>
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">
-</head>
-
-<body>
-<h1>Rico の翻訳</h1>
-
-<p>Rico ライブラリは翻訳オブジェクト(RicoTranslate)を含むので、
-複数の言語をサポートするアプリケーションを、 Rico を利用して書く事が出来ます。
-翻訳オブジェクトは、異なるデフォルト値を言語ごとに指定する事が出来、
-デフォルトの日付および数値フォーマットも保持しています。
-Rico ディストリビューションは、デフォルトグリッドメニューと Rico カレンダーを表示するために
-必要なフレーズと共に、翻訳オブジェクトをロードする言語ファイルを含みます。
-
-<h2>翻訳ステータス</h2>
-
-<p>言語ファイルは "src/translations/ricoLocale_xx.js" に保持されており、
-xx は 2 文字の言語コードです。
-現在、Rico は以下の翻訳と共に配布されています。
-
-<table border='1' cellspacing='0' cellpadding='3'>
-<thead>
-<tr><th>言語</th><th>コード</th><th>ステータス</th></tr>
-</thead>
-<tbody>
-
-<tr>
-<td>英語</td>
-<td>en</td>
-<td>ベースライン</td>
-</tr>
-
-<tr>
-<td>フランス語</td>
-<td>fr</td>
-<td>完了して検査された</td>
-</tr>
-
-<tr>
-<td>スペイン語</td>
-<td>es</td>
-<td>完了して検査された</td>
-</tr>
-
-<tr>
-<td>日本語</td>
-<td>ja</td>
-<td>完了して検査された</td>
-</tr>
-
-<tr>
-<td>中国語(単純化された)</td>
-<td>zh</td>
-<td>完了して検査された</td>
-</tr>
-
-<tr>
-<td>韓国語</td>
-<td>ko</td>
-<td>完了して検査された</td>
-</tr>
-
-<tr>
-<td>ドイツ語</td>
-<td>de</td>
-<td>完了して検査を必要としている</td>
-</tr>
-
-<tr>
-<td>ポルトガル語</td>
-<td>pt</td>
-<td>完了して検査を必要としている</td>
-</tr>
-
-<tr>
-<td>イタリア語</td>
-<td>it</td>
-<td>完了して検査を必要としている</td>
-</tr>
-
-<tr>
-<td>ロシア語</td>
-<td>ru</td>
-<td>新しい ricoLocale フォーマットへの更新を必要としている</td>
-</tr>
-
-<tr>
-<td>ウクライナ語</td>
-<td>ua</td>
-<td>新しい ricoLocale フォーマットへの更新を必要としている</td>
-</tr>
-
-</tbody>
-</table>
-
-<h2>複数言語のサポート</h2>
-
-<p>Rico が進化するにつれ、翻訳ファイルに追加のフレーズが必要とされます。
-英語のフレーズが最初に追加され、そして Rico コミュニティのメンバーが
-新しいフレーズを他の翻訳ファイルに加えます。
-私達は全ての翻訳を同期し続けようとしますが、
-これは必ずしも可能ではありません。
-そのため、rico.js がロードされる時、
-最初に英語の言語ファイルをロードします。
-それから、それはユーザの OS またはブラウザの言語に一致する Rico 翻訳を探します。
-見つかったなら、それは次にロードされます。
-これは、フレーズが翻訳ファイルやそれらの言語用の翻訳が利用出来ない場合に、
-(空白メッセージの代わりに)少なくとも英語でのフレーズを見る事を確実にします。
-
-<p>追加のコーディング無しで、Rico は多くの場合、
-ユーザにふさわしいローカライズされたメニューやカレンダーを表示するはずです。
-しかし、全ての最新のブラウザは、ユーザに OS の言語をオーバライドする方法を与えます。
-例えば、Firefox では ツールメニュー > オプション > 詳細 > 一般タブ > 言語設定ボタン へ進みます。
-Internet Explorer では ツールメニュー > インターネットオプション > 全般タブ > 言語ボタン へ進みます
-この設定は 
-<a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4">accept language</a> 
-から呼ばれ、javascript を通して直接アクセスする事は出来ません。
-しかし、Rico は適切な言語に基づく翻訳ファイルをロードする方法を提供します。
-この設定を構成したユーザーにとって、このアプローチを利用して解析される言語は、
-彼らの本当の選択により近いかもしれません。
-その適切な言語は "Rico.acceptLanguage()" javascript メソッドに、
-適切な言語のヘッダを返すサーバサイドスクリプトを持つ事により Rico で解析されます。
-これは、ASP と PHP のための LiveGrid フォームプラグインと、
-.net のための LiveGrid プラグインを利用する時に、自動的に行われます。
-他の状況では、サーバサイドインクルードファイルは Rico ディストリビューションで提供されます。
-
-<p>PHP では。
-<pre>
-&lt;? 
-// ricoLiveGridForms.php を利用する時は必要ありません
-// rico.js をインクルードする行の後に置かれなければなりません
-
-require "chklang2.php";
-?&gt;
-</pre>
-
-<p>ASP では。
-<pre>
-' ricoLiveGridForms.asp を利用する時は必要ありません
-' rico.js をインクルードする行の後に置かれなければなりません
-
-&lt;!-- #INCLUDE FILE = "chklang2.vbs" --&gt;
-</pre>
-
-<p>.net では。
-<pre>
-' ricoLiveGridForms.ascx を利用する時は必要ありません
-' rico.js をインクルードする行の後に置かれなければなりません
-
-&lt;%@ Register TagPrefix="Rico" TagName="ChkLang" Src="chklang.ascx" %&gt;
-&lt;Rico:ChkLang runat='server' id='translation' /&gt;
-</pre>
-
-<h2>RicoTranslate オブジェクトリファレンス</h2>
-
-<p>RicoTranslate オブジェクトは以下のプロパティとメソッドを含みます。
-<dl>
-<dt>monthNames[]
-<dd>それぞれの月の翻訳された名前を含む 12 アイテムの配列(1 月はアイテム 0)
-<dt>dayNames[]
-<dd>それぞれの曜日の翻訳された名前を含む 7 アイテムの配列(日曜はアイテム 0)
-<dt>monthAbbr()
-<dd>月の数字(0-11)を受け取り、月の省略名を返す関数(デフォルトは monthNames[] の始めの 3 文字ですが、翻訳によってオーバーライドされます)
-<dt>dayAbbr()
-<dd>曜日の数字(0-6)を受け取り、曜日の省略名を返す関数(デフォルトは dayNames[] の始めの 3 文字ですが、翻訳によってオーバーライドされます)
-<dt>langCode
-<dd>現在ロードされた 2 文字の言語コードを含みます(デフォルトは "en")
-<dt>thouSep
-<dd>数値をフォーマットする時に千桁区切りのセパレータとして利用する文字を含みます(デフォルトは ",")
-<dt>decPoint
-<dd>数値をフォーマットする時に小数点として利用する文字を含みます(デフォルトは ".")
-<dt>dateFmt
-<dd>デフォルトの日付フォーマットを含みます(デフォルトは "mm/dd/yyyy")
-<dt>timeFmt
-<dd>デフォルトの時間フォーマットを含みます(デフォルトは "hh:nn:ss a/pm")
-<dt>addPhraseId (phraseId, phrase)
-<dd>指定されたフレーズを加えて、それを phraseId に割り当てます。フレーズの文字列は、任意の置き換えパラメータの参照を含むかもしれず、$1、$2、等を利用して指定されます。
-<dt>getPhraseById (phraseId)
-<dd>phraseId によって指定されたフレーズを返します。任意の置き換えパラメータは phraseId に続くかもしれません。
-</dl>
-
-<h2>最新情報の提出</h2>
-
-<p>質問と訂正は <a href='http://sourceforge.net/forum/forum.php?forum_id=470997'>SourceForge の Open Discussion フォーラム</a> にポストされるかもしれません。
-あるいは、 dowdybrown at yahoo dot com に直接送信する事も出来ます。
-
-</body>
-</html>
index 44bee13..824da41 100644 (file)
@@ -36,6 +36,7 @@ used to create rich, highly interactive web applications.
 Rico is released under the Apache Licence, Version 2.0.
 This allows you to use Rico in nearly all circumstances, commercial and non-commercial, and to modify it as you see fit.
 Read the full license description at <a href="http://www.apache.org/licenses/LICENSE-2.0">the Apache web site</a>. 
 Rico is released under the Apache Licence, Version 2.0.
 This allows you to use Rico in nearly all circumstances, commercial and non-commercial, and to modify it as you see fit.
 Read the full license description at <a href="http://www.apache.org/licenses/LICENSE-2.0">the Apache web site</a>. 
+</p>
 
 <p>Previous versions of Rico have relied on the excellent 
 <a href="http://www.prototypejs.org" target="_top">Prototype</a>
 
 <p>Previous versions of Rico have relied on the excellent 
 <a href="http://www.prototypejs.org" target="_top">Prototype</a>
@@ -48,8 +49,14 @@ Of course you can if you choose to, but you can also run it with
 <a href="http://jquery.com" target="_top">jQuery</a> instead,
 or <a href="http://mootools.net" target="_top">MooTools</a>, 
 or <a href="http://www.dojotoolkit.org/" target="_top">dojo</a>, 
 <a href="http://jquery.com" target="_top">jQuery</a> instead,
 or <a href="http://mootools.net" target="_top">MooTools</a>, 
 or <a href="http://www.dojotoolkit.org/" target="_top">dojo</a>, 
-or <a href="http://extjs.com/products/extcore/" target="_top">ext</a>, 
+or <a href="http://www.sencha.com/products/core/" target="_top">ext</a>, 
 or <a href="http://www.bbc.co.uk/glow/" target="_top">BBC Glow</a>.
 or <a href="http://www.bbc.co.uk/glow/" target="_top">BBC Glow</a>.
+
+<p>Please note that a copy of each of these libraries is included in the Rico distribution
+for the purpose of demonstrating the examples. However, each of these libraries has
+licensing terms that are different from Rico itself. You can read the terms at
+each library's respective web site using the links above. Make sure you
+understand the terms before deploying any library into a production environment.
 </p>
 
 
 </p>
 
 
diff --git a/documentation/welcome_ja.html b/documentation/welcome_ja.html
deleted file mode 100644 (file)
index fcab8c0..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-<title>Rico 2.0</title>
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">
-<style type="text/css">\r
-#translations { clear:both; }\r
-#translations td { font-size:smaller; }\r
-#welcome img {\r
-  vertical-align: middle; \r
-  float: left; \r
-  margin: 0px 8px 8px 0px;\r
-}\r
-#welcome span {\r
-  font-family: Trebuchet MS, Arial, Tahoma, Verdana, Helvetica, sans-serif; \r
-  font-size: 60px;\r
-  font-weight: bold;\r
-  margin: 0px; \r
-  padding-top: 5px;\r
-}\r
-</style>
-</head>
-
-<body>
-
-<div id='welcome'><img alt="Rico Logo" src="images/ricologo.gif"><span>Rico へようこそ!</span></div>\r
-
-<p style="clear:both;">Rico は、多機能で対話的なウェブアプリケーションを作成するために利用される、
-オープンソース JavaScript フレームワークです。
-Rico は、<a href="http://www.prototypejs.org/">Prototype Javascript フレームワーク</a>に基づき、
-<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache ライセンス</a>の下で公開されます。
-
-<p>それは、次の機能をサポートします
-<ul>
-<li>ドラッグアンドドロップ
-<li>丸みのある HTML 要素
-<li>アニメーション効果
-<li>アコーディオンとタブパネル
-<li>カレンダー、カラーピッカー、そしてツリーコントロール
-<li>数値と日付のフォーマッティング
-<li>ポップアップ "ウィンドウ"(div's)と影付きのメニュー
-<li>内容の編集が可能なサポートを加えた、
-静的な内容や AJAX を通して動的にロードされた内容を保持し、
-固定された列や見出しを持ちスクロール出来るグリッド
-<li>グリッドメニューとカレンダーのための複数の言語 - 
-フランス語、ドイツ語、イタリア語、ポルトガル語、スペイン語、日本語、中国語、韓国語、ロシア語とウクライナ語への翻訳が含まれます
-</ul>
-
-<p>Rico ディストリビューションは、次の3つのサブディレクトリに分割されます
-<ul>
-<li><strong>src</strong> - javascript、cssと画像ファイルを含む、 Rico の中心部を含みます。
-<li><strong>plugins</strong> - LiveGridsとSimpleGridsをサポートするためにサーバで動くコードを含んでいます。
-現在のところ、プラグインを ASP (PHP) と .net に提供します。限られた機能を持つ Perl プラグインも含まれています。
-<li><strong>examples</strong> - ASP、PHP、.net、Perl、およびHTMLのためのサンプルコードを含んでいます。
-examples/data ディレクトリは LiveGrid に関係する実例のためのサンプルデータベースを含んでいます。
-データベースは MS Access、Oracle、および MySQL のために提供されます。また、データを SQL Server にインストールするための指示も含まれています。
-</ul>
-
-</body>
-</html>
diff --git a/documentation/welcome_zh.html b/documentation/welcome_zh.html
deleted file mode 100644 (file)
index e5ca665..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
-<title>Rico 2.0</title>
-<link href="ricoDocs.css" rel="Stylesheet" type="text/css">
-<style type="text/css">\r
-#translations { clear:both; }\r
-#translations td { font-size:smaller; }\r
-#welcome img {\r
-  vertical-align: middle; \r
-  float: left; \r
-  margin: 0px 8px 8px 0px;\r
-}\r
-#welcome span {\r
-  font-family: Trebuchet MS, Arial, Tahoma, Verdana, Helvetica, sans-serif; \r
-  font-size: 60px;\r
-  font-weight: bold;\r
-  margin: 0px; \r
-  padding-top: 5px;\r
-}\r
-</style>
-</head>
-
-<body>
-
-<div id='welcome'><img alt="Rico Logo" src="images/ricologo.gif"><span>Rico 欢迎你!</span></div>\r
-
-<p style="clear:both;">\r
-Rico是开源的JavaScript类库, 用来创建丰富的, 高度交互性的internet应用. \r
-\r
-Rico是基于 <a href="http://www.prototypejs.org/">Prototype Javascript 类库</a> 之上的,
-\r
- 它的发行是根据<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License</a>\r
-
-
-<p>Rico 支持以下功能:
-<ul>
-<li>拖放操作
-<li>圆角的HTML元素
-<li>动画效果
-<li>可折叠的TAB面板
-<li>日历, 色彩选择, 和树的控件
-<li>数据和日期的格式化
-<li>带有阴影的弹出式”windows”(div’s)和菜单
-<li>静态或动态内容可由AJAX殖入有固定的列和标题的滚动数据网格, 并支持网格内容编辑
-<li>具有多种语言的网格菜单和日历 – 包括法语, 德语, 意大利语, 葡萄牙语, 西班牙语, 中文, 日文, 朝鲜文, 俄文和乌克兰文的翻译
-</ul>
-
-<p>Rico的发布版本分为3个部分:
-<ul>
-<li><strong>src</strong> - 含有Rico核心, 包括javascript, css和图像文件.
-<li><strong>plugins</strong> - 含有在服务器上运行的, 支持LiveGrids和SimpleGrids的程序. Plug-ins 可供ASP, PHP, .net使用. 还包括Perl plug-in有限的功能.
-<li><strong>examples</strong> - 含有ASP, PHP, .net, Perl 和HTML的样本程序. examples 和data目录中含有与LiveGrid有关的例子的样本数据库. 数据库可供MS Access, Oracle 和MySQL使用. 还包括安装数据到SQL Server上的说明.
-</ul>
-
-</body>
-</html>
index 21a9dd9..8e405f5 100644 (file)
@@ -9,7 +9,7 @@ Dim ricoLib,ricoTheme,ricoLogging
 const grid_striping = true     ' apply row striping to LiveGrids?\r
 const checkQueryString = true  ' load settings from QueryString? true for demo, false for production\r
 const LoadBaseLib = true       ' load base Javascript library (prototype, jQuery, etc) from Rico directory?\r
 const grid_striping = true     ' apply row striping to LiveGrids?\r
 const checkQueryString = true  ' load settings from QueryString? true for demo, false for production\r
 const LoadBaseLib = true       ' load base Javascript library (prototype, jQuery, etc) from Rico directory?\r
-const jQuery_theme_path = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/"\r
+const jQuery_theme_path = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/"\r
 \r
 \r
 jsDir="../../ricoClient/js/"       ' directory containing Rico's javascript files\r
 \r
 \r
 jsDir="../../ricoClient/js/"       ' directory containing Rico's javascript files\r
@@ -25,7 +25,7 @@ if checkQueryString then
   ricoLogging=CBool(trim(Request.QueryString("log")) <> "")\r
 else\r
   ' set your production values here\r
   ricoLogging=CBool(trim(Request.QueryString("log")) <> "")\r
 else\r
   ' set your production values here\r
-  ricoLib="proto"    ' base library (proto, jquery, moo, dojo, ext, or glow)\r
+  ricoLib="prototype-1.6"     ' base library\r
   ricoTheme="j-ui-lightness"  ' jquery themes start with j-, rico themes start with r-\r
   ricoLogging=false\r
 end if\r
   ricoTheme="j-ui-lightness"  ' jquery themes start with j-, rico themes start with r-\r
   ricoLogging=false\r
 end if\r
@@ -52,33 +52,15 @@ end sub
 \r
 \r
 sub LoadLib(baseLib, baseLoadFlag)\r
 \r
 \r
 sub LoadLib(baseLib, baseLoadFlag)\r
-  dim baseFile,adapter\r
-  select case baseLib\r
-    case "proto":\r
-      baseFile="prototype"\r
-      adapter="2Proto"\r
-    case "jquery":\r
-      baseFile="jquery"\r
-      adapter="2jQuery"\r
-    case "moo":\r
-      baseFile="mootools"\r
-      adapter="2Moo"\r
-    case "dojo":\r
-      baseFile="dojo"\r
-      adapter="2Dojo"\r
-    case "ext":\r
-      baseFile="ext-core"\r
-      adapter="2Ext"\r
-    case "glow":\r
-      baseFile="glow.core"\r
-      adapter="2Glow"\r
-    case else:\r
-      Response.End\r
-  end select\r
-\r
-  if baseLoadFlag then Response.Write vbLf & "<script src='" & baselibsDir & baseFile & ".js' type='text/javascript'></script>"\r
+  if baseLoadFlag then\r
+    if InStr(baseLib,"/") > 0 then\r
+      Response.Write vbLf & "<script src='http://ajax.googleapis.com/ajax/libs/" & baseLib & "' type='text/javascript'></script>"\r
+    else\r
+      Response.Write vbLf & "<script src='" & baselibsDir & baseLib & ".js' type='text/javascript'></script>"\r
+    end if\r
+  end if\r
   requireRicoJS ""\r
   requireRicoJS ""\r
-  requireRicoJS adapter\r
+  requireRicoJS "2" & left(baseLib,3)\r
   Response.Write vbLf & "<script src='" & transDir & "ricoLocale_en.js' type='text/javascript'></script>"\r
   requireRicoCSS "rico"\r
   requireRicoJS "UI"\r
   Response.Write vbLf & "<script src='" & transDir & "ricoLocale_en.js' type='text/javascript'></script>"\r
   requireRicoCSS "rico"\r
   requireRicoJS "UI"\r
@@ -119,7 +101,7 @@ sub LoadTheme(theme)
   select case prefix\r
     case "j":\r
       requireRicoJS "Themeroller"\r
   select case prefix\r
     case "j":\r
       requireRicoJS "Themeroller"\r
-      Response.Write vbLf & "<link type='text/css' rel='stylesheet' href='" & cssDir & "jquery-base/ui.base.css' />"\r
+      'Response.Write vbLf & "<link type='text/css' rel='stylesheet' href='" & cssDir & "jquery-base/ui.base.css' />"\r
       Response.Write vbLf & "<link type='text/css' rel='Stylesheet' href='" & jQuery_theme_path & themeFile & "/jquery-ui.css' />"\r
     case "r":\r
       requireRicoCSS themeFile\r
       Response.Write vbLf & "<link type='text/css' rel='Stylesheet' href='" & jQuery_theme_path & themeFile & "/jquery-ui.css' />"\r
     case "r":\r
       requireRicoCSS themeFile\r
index d251a30..5c4eab1 100644 (file)
@@ -44,23 +44,13 @@ CloseApp
 \r
 \r
 sub DisplayTable()\r
 \r
 \r
 sub DisplayTable()\r
-  response.write vbLf & "<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>"\r
+  response.write vbLf & "<div id='explanation'>"\r
   response.write vbLf & "Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>"\r
   response.write vbLf & "<hr>The data on this grid can be edited using pop-up forms. "\r
   response.write vbLf & "Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. "\r
   response.write vbLf & "The Add and Edit forms are automatically generated by LiveGrid. "\r
   response.write vbLf & "Updates are disabled on the database, so you will get an error message if you try to save."\r
   response.write vbLf & "Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>"\r
   response.write vbLf & "<hr>The data on this grid can be edited using pop-up forms. "\r
   response.write vbLf & "Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. "\r
   response.write vbLf & "The Add and Edit forms are automatically generated by LiveGrid. "\r
   response.write vbLf & "Updates are disabled on the database, so you will get an error message if you try to save."\r
-  response.write vbLf & "</td><td>"\r
-  response.write vbLf & "<script type='text/javascript'><!--"\r
-  response.write vbLf & "google_ad_client = 'pub-7218597156507462';"\r
-  response.write vbLf & "/* 125x125, created 5/11/09 */"\r
-  response.write vbLf & "google_ad_slot = '9298106441';"\r
-  response.write vbLf & "google_ad_width = 125;"\r
-  response.write vbLf & "google_ad_height = 125;"\r
-  response.write vbLf & "//-->"\r
-  response.write vbLf & "</script>"\r
-  response.write vbLf & "<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>"\r
-  response.write vbLf & "</td></tr></table>"\r
+  response.write vbLf & "</div>"\r
 \r
   response.write "<p><strong>Shippers Table</strong></p>"
 \r
 \r
   response.write "<p><strong>Shippers Table</strong></p>"
 \r
index 4695e73..e4a96dc 100644 (file)
@@ -30,7 +30,7 @@ Rico.onLoad( function() {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -43,21 +43,7 @@ Click on a cell to see available actions.
 <p style='font-size:smaller;'>Data source: <a href="http://www.un.org/esa/population/unpop.htm">Population Division of the \r
 Department of Economic and Social Affairs of the United Nations Secretariat</a> (2009). \r
 <em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations.  </p>                            \r
 <p style='font-size:smaller;'>Data source: <a href="http://www.un.org/esa/population/unpop.htm">Population Division of the \r
 Department of Economic and Social Affairs of the United Nations Secretariat</a> (2009). \r
 <em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations.  </p>                            \r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 <p class="ricoBookmark"><span id="population_bookmark">&nbsp;</span></p>\r
 <table class="ricoLiveGrid" id="population">\r
 \r
 <p class="ricoBookmark"><span id="population_bookmark">&nbsp;</span></p>\r
 <table class="ricoLiveGrid" id="population">\r
index 90a9c51..52bcdbb 100644 (file)
@@ -53,7 +53,7 @@ CloseApp
 \r
 \r
 sub DisplayHeading()\r
 \r
 \r
 sub DisplayHeading()\r
-  response.write vbLf & "<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>"\r
+  response.write vbLf & "<div id='explanation'>"\r
   response.write vbLf & "Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>"\r
   response.write vbLf & "<hr>The data on this grid can be edited using pop-up forms. "\r
   response.write vbLf & "Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. "\r
   response.write vbLf & "Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>"\r
   response.write vbLf & "<hr>The data on this grid can be edited using pop-up forms. "\r
   response.write vbLf & "Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. "\r
@@ -61,17 +61,7 @@ sub DisplayHeading()
   response.write vbLf & "Notice on the Add form how you use the Rico Tree control to select the customer. "\r
   response.write vbLf & "Notice on the Edit form how the Rico Calendar is used to change dates. "\r
   response.write vbLf & "Updates are disabled on the database, so you will get an error message if you try to save."\r
   response.write vbLf & "Notice on the Add form how you use the Rico Tree control to select the customer. "\r
   response.write vbLf & "Notice on the Edit form how the Rico Calendar is used to change dates. "\r
   response.write vbLf & "Updates are disabled on the database, so you will get an error message if you try to save."\r
-  response.write vbLf & "</td><td>"\r
-  response.write vbLf & "<script type='text/javascript'><!--"\r
-  response.write vbLf & "google_ad_client = 'pub-7218597156507462';"\r
-  response.write vbLf & "/* 125x125, created 5/11/09 */"\r
-  response.write vbLf & "google_ad_slot = '9298106441';"\r
-  response.write vbLf & "google_ad_width = 125;"\r
-  response.write vbLf & "google_ad_height = 125;"\r
-  response.write vbLf & "//-->"\r
-  response.write vbLf & "</script>"\r
-  response.write vbLf & "<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>"\r
-  response.write vbLf & "</td></tr></table>"\r
+  response.write vbLf & "</div>"\r
   response.write vbLf & "<p><strong>Orders Table</strong></p>"\r
 end sub\r
 \r
   response.write vbLf & "<p><strong>Orders Table</strong></p>"\r
 end sub\r
 \r
index f63d8cc..3bc2f1c 100644 (file)
@@ -53,7 +53,7 @@ CloseApp
 \r
 \r
 sub DisplayHeading()\r
 \r
 \r
 sub DisplayHeading()\r
-  response.write vbLf & "<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>"\r
+  response.write vbLf & "<div id='explanation'>"\r
   response.write vbLf & "Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>"\r
   response.write vbLf & "<hr>The data on this grid can be edited using pop-up forms. "\r
   response.write vbLf & "Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. "\r
   response.write vbLf & "Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>"\r
   response.write vbLf & "<hr>The data on this grid can be edited using pop-up forms. "\r
   response.write vbLf & "Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. "\r
@@ -61,17 +61,7 @@ sub DisplayHeading()
   response.write vbLf & "Notice on the Add form how you use the Rico Tree control to select the customer. "\r
   response.write vbLf & "Notice on the Edit form how the Rico Calendar is used to change dates. "\r
   response.write vbLf & "Updates are disabled on the database, so you will get an error message if you try to save."\r
   response.write vbLf & "Notice on the Add form how you use the Rico Tree control to select the customer. "\r
   response.write vbLf & "Notice on the Edit form how the Rico Calendar is used to change dates. "\r
   response.write vbLf & "Updates are disabled on the database, so you will get an error message if you try to save."\r
-  response.write vbLf & "</td><td>"\r
-  response.write vbLf & "<script type='text/javascript'><!--"\r
-  response.write vbLf & "google_ad_client = 'pub-7218597156507462';"\r
-  response.write vbLf & "/* 125x125, created 5/11/09 */"\r
-  response.write vbLf & "google_ad_slot = '9298106441';"\r
-  response.write vbLf & "google_ad_width = 125;"\r
-  response.write vbLf & "google_ad_height = 125;"\r
-  response.write vbLf & "//-->"\r
-  response.write vbLf & "</script>"\r
-  response.write vbLf & "<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>"\r
-  response.write vbLf & "</td></tr></table>"\r
+  response.write vbLf & "</div>"\r
   response.write vbLf & "<p><strong>Orders Table</strong></p>"\r
 end sub\r
 \r
   response.write vbLf & "<p><strong>Orders Table</strong></p>"\r
 end sub\r
 \r
index bd8ecd5..ce2f704 100644 (file)
@@ -44,7 +44,7 @@ div.ricoLG_cell {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -57,21 +57,7 @@ are available.
 Click on a cell to see available actions.\r
 <a href='ricoQuery.asp?id=ex2&offset=0&page_size=10&_fmt=json'>View the AJAX response (JSON)</a>\r
 (requires JSONview or similar extension in FF).\r
 Click on a cell to see available actions.\r
 <a href='ricoQuery.asp?id=ex2&offset=0&page_size=10&_fmt=json'>View the AJAX response (JSON)</a>\r
 (requires JSONview or similar extension in FF).\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 <p class="ricoBookmark"><span id='ex2_timer' class='ricoSessionTimer'></span><span id="ex2_bookmark">&nbsp;</span></p>\r
 <table id="ex2" class="ricoLiveGrid" cellspacing="0" cellpadding="0">\r
 \r
 <p class="ricoBookmark"><span id='ex2_timer' class='ricoSessionTimer'></span><span id="ex2_bookmark">&nbsp;</span></p>\r
 <table id="ex2" class="ricoLiveGrid" cellspacing="0" cellpadding="0">\r
index 7144bd0..975a1d0 100644 (file)
@@ -67,7 +67,7 @@ div.ricoLG_cell {
 <body>\r
 \r
 \r
 <body>\r
 \r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
@@ -75,17 +75,7 @@ The Add and Edit forms are automatically generated by LiveGrid.
 Notice on the Add form how you use the Rico Tree control to select the customer. \r
 Notice on the Edit form how the Rico Calendar is used to change dates. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
 Notice on the Add form how you use the Rico Tree control to select the customer. \r
 Notice on the Edit form how the Rico Calendar is used to change dates. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
-</td><td>\r
-<script type='text/javascript'><!--\r
-google_ad_client = 'pub-7218597156507462';\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = '9298106441';\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>\r
-</td></tr></table>\r
+</div>\r
 \r
 <p><strong>Orders Table</strong></p>\r
 \r
 \r
 <p><strong>Orders Table</strong></p>\r
 \r
index ac60039..0c2e198 100644 (file)
@@ -44,7 +44,7 @@ div.ricoLG_cell {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -56,21 +56,7 @@ on the size of the window. Try the different grid styles that
 are available. \r
 Click on a cell to see available actions.\r
 <a href='ricoQuery.asp?id=ex2&offset=0&page_size=10&get_total=true'>View the AJAX response (XML)</a>.\r
 are available. \r
 Click on a cell to see available actions.\r
 <a href='ricoQuery.asp?id=ex2&offset=0&page_size=10&get_total=true'>View the AJAX response (XML)</a>.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 <p class="ricoBookmark"><span id='ex2_timer' class='ricoSessionTimer'></span><span id="ex2_bookmark">&nbsp;</span></p>\r
 <table id="ex2" class="ricoLiveGrid" cellspacing="0" cellpadding="0">\r
 \r
 <p class="ricoBookmark"><span id='ex2_timer' class='ricoSessionTimer'></span><span id="ex2_bookmark">&nbsp;</span></p>\r
 <table id="ex2" class="ricoLiveGrid" cellspacing="0" cellpadding="0">\r
index 912856e..90b3f2f 100644 (file)
@@ -5,9 +5,9 @@
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
 <base target="content">\r
 \r
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
 <base target="content">\r
 \r
-<script src="../../ricoClient/js/baselibs/prototype.js" type="text/javascript"></script>\r
+<script src="../../ricoClient/js/baselibs/prototype-1.6.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/rico.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/rico.js" type="text/javascript"></script>\r
-<script src="../../ricoClient/js/rico2Proto.js" type="text/javascript"></script>\r
+<script src="../../ricoClient/js/rico2pro.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/ricoUI.js" type="text/javascript"></script>\r
 <link href="../../ricoClient/css/rico.css" type="text/css" rel="stylesheet" />\r
 \r
 <script src="../../ricoClient/js/ricoUI.js" type="text/javascript"></script>\r
 <link href="../../ricoClient/css/rico.css" type="text/css" rel="stylesheet" />\r
 \r
@@ -174,12 +174,18 @@ ul li {
   <div>Choose the Base Library</div>\r
   <div>\r
 <ul>\r
   <div>Choose the Base Library</div>\r
   <div>\r
 <ul>\r
-<li><a id='lib_proto'>Prototype</a>\r
-<li><a id='lib_jquery'>jQuery</a>\r
-<li><a id='lib_moo'>MooTools</a>\r
-<li><a id='lib_dojo'>dojo</a>\r
-<li><a id='lib_ext'>Ext</a>\r
-<li><a id='lib_glow'>Glow</a>\r
+<li><a id='lib_prototype-1.6'>Prototype 1.6</a>\r
+<li><a id='lib_prototype/1.7/prototype.js'>Prototype 1.7</a>\r
+<li><a id='lib_jquery/1.3/jquery.min.js'>jQuery 1.3</a>\r
+<li><a id='lib_jquery/1.4/jquery.min.js'>jQuery 1.4</a>\r
+<li><a id='lib_jquery/1.5/jquery.min.js'>jQuery 1.5</a>\r
+<li><a id='lib_mootools/1.2/mootools-yui-compressed.js'>MooTools 1.2</a>\r
+<li><a id='lib_mootools/1.3/mootools-yui-compressed.js'>MooTools 1.3</a>\r
+<li><a id='lib_dojo/1.4/dojo/dojo.xd.js'>dojo 1.4</a>\r
+<li><a id='lib_dojo/1.5/dojo/dojo.xd.js'>dojo 1.5</a>\r
+<li><a id='lib_ext-core/3.0/ext-core.js'>Ext 3.0</a>\r
+<li><a id='lib_ext-core/3.1/ext-core.js'>Ext 3.1</a>\r
+<li><a id='lib_glow.core-1.7'>Glow 1.7</a>\r
 </ul>\r
   </div>\r
 </div>\r
 </ul>\r
   </div>\r
 </div>\r
index cc69d50..0716139 100644 (file)
@@ -62,7 +62,7 @@ div.ricoLG_cell {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -75,21 +75,7 @@ SimpleGrids have resizable columns, frozen columns on the left, and can use the
 same CSS styling as LiveGrids. Sorting and filtering can also be enabled\r
 at the developer's discretion. Unlike LiveGrids, each cell in a SimpleGrid\r
 can be formatted individually.\r
 same CSS styling as LiveGrids. Sorting and filtering can also be enabled\r
 at the developer's discretion. Unlike LiveGrids, each cell in a SimpleGrid\r
 can be formatted individually.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 \r
 <div>\r
 \r
 \r
 <div>\r
index 5d0bd1c..ba3d6dd 100644 (file)
@@ -35,7 +35,7 @@ function TreeClick1(e) {
 \r
 <body>
 \r
 \r
 <body>
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -44,21 +44,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <p>This example demonstrates a basic, pop-up tree control where the tree nodes are loaded via AJAX.\r
 Only one item is selected from the tree at a time.\r
 Data is from the Northwind customer table.\r
 <p>This example demonstrates a basic, pop-up tree control where the tree nodes are loaded via AJAX.\r
 Only one item is selected from the tree at a time.\r
 Data is from the Northwind customer table.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 \r
 <p><button id='TreeButton1'>Show Tree</button>\r
 \r
 \r
 <p><button id='TreeButton1'>Show Tree</button>\r
index 0574830..b9de437 100644 (file)
@@ -60,7 +60,7 @@ div.ricoLG_cell {
 \r
 <body style="font-size:80%;">\r
   \r
 \r
 <body style="font-size:80%;">\r
   \r
-<table id='explanation' border='0' cellpadding='5' cellspacing='0' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -68,21 +68,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <hr>\r
 This example displays some of the widgets that come with Rico. \r
 The widgets are compatible with all base libraries and themes.\r
 <hr>\r
 This example displays some of the widgets that come with Rico. \r
 The widgets are compatible with all base libraries and themes.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 \r
 <p>&nbsp;</p>\r
 \r
 \r
 <p>&nbsp;</p>\r
index 6ccf9dc..22f32bf 100644 (file)
@@ -9,11 +9,19 @@ h1 {
        font-size: 16pt;\r
 }\r
 \r
        font-size: 16pt;\r
 }\r
 \r
+table#explanation {\r
+  width: 100%;\r
+}\r
+\r
+div#explanation {\r
+  padding: 4px;\r
+}\r
+\r
 #explanation {\r
   background-color:#EEEEFF;\r
   font-size:small;\r
   margin-bottom:0.5em;\r
 #explanation {\r
   background-color:#EEEEFF;\r
   font-size:small;\r
   margin-bottom:0.5em;\r
-  padding: 2px;\r
+  border: 1px solid #CFCFFF;\r
 }\r
 \r
 #libinfo {\r
 }\r
 \r
 #libinfo {\r
index 73221f4..f3bb9fd 100644 (file)
@@ -8,14 +8,14 @@ Public imgDir as String ="../../ricoClient/images/"  ' directory containing Rico
 Public transDir as String =jsDir & "translations/"\r
 Public baselibsDir as String =jsDir & "baselibs/"\r
 \r
 Public transDir as String =jsDir & "translations/"\r
 Public baselibsDir as String =jsDir & "baselibs/"\r
 \r
-Public jslib as String = "proto"           ' base library (proto, jquery, moo, dojo, ext, or glow)\r
+Public jslib as String = "prototype-1.6"   ' base library\r
 Public modules as String                   ' comma separated list of Rico modules to load\r
 Public ricoLogging as Boolean = false      ' enable javascript console logging?\r
 Public language as String                  ' if left unset, language will be set automatically based on request's HTTP_ACCEPT_LANGUAGE\r
 Public checkQueryString as Boolean = true  ' load settings from QueryString?  true for demo, false for production\r
 Public LoadBaseLib as Boolean = true       ' load base Javascript library (prototype, jQuery, etc) from Rico directory?\r
 Public grid_striping as Boolean = true     ' apply row striping to LiveGrids?\r
 Public modules as String                   ' comma separated list of Rico modules to load\r
 Public ricoLogging as Boolean = false      ' enable javascript console logging?\r
 Public language as String                  ' if left unset, language will be set automatically based on request's HTTP_ACCEPT_LANGUAGE\r
 Public checkQueryString as Boolean = true  ' load settings from QueryString?  true for demo, false for production\r
 Public LoadBaseLib as Boolean = true       ' load base Javascript library (prototype, jQuery, etc) from Rico directory?\r
 Public grid_striping as Boolean = true     ' apply row striping to LiveGrids?\r
-Public jQuery_theme_path as String = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/"\r
+Public jQuery_theme_path as String = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/"\r
 \r
 Protected theme as String = "j-ui-lightness"  ' jquery themes start with j-, rico themes start with r-\r
 \r
 \r
 Protected theme as String = "j-ui-lightness"  ' jquery themes start with j-, rico themes start with r-\r
 \r
@@ -86,6 +86,16 @@ Public WriteOnly Property ricoTheme() As String
 End Property\r
 \r
 \r
 End Property\r
 \r
 \r
+' -------------------------------------------------------------\r
+' disable themes\r
+' -------------------------------------------------------------\r
+Public WriteOnly Property noTheme() As String\r
+  Set(ByVal ThemeName As String)\r
+    theme=""\r
+  End Set\r
+End Property\r
+\r
+\r
 ' -------------------------------------------------------------\r
 ' Check specifed languages and see if there is a ricoLocale file to match\r
 ' -------------------------------------------------------------\r
 ' -------------------------------------------------------------\r
 ' Check specifed languages and see if there is a ricoLocale file to match\r
 ' -------------------------------------------------------------\r
@@ -106,33 +116,15 @@ end sub
 \r
 \r
 Protected sub LoadLib(writer as HTMLTextWriter, baseLib as String)\r
 \r
 \r
 Protected sub LoadLib(writer as HTMLTextWriter, baseLib as String)\r
-  dim baseFile,adapter\r
-  select case baseLib\r
-    case "proto":\r
-      baseFile="prototype"\r
-      adapter="2Proto"\r
-    case "jquery":\r
-      baseFile="jquery"\r
-      adapter="2jQuery"\r
-    case "moo":\r
-      baseFile="mootools"\r
-      adapter="2Moo"\r
-    case "dojo":\r
-      baseFile="dojo"\r
-      adapter="2Dojo"\r
-    case "ext":\r
-      baseFile="ext-core"\r
-      adapter="2Ext"\r
-    case "glow":\r
-      baseFile="glow.core"\r
-      adapter="2Glow"\r
-    case else:\r
-      Response.End\r
-  end select\r
-\r
-  if LoadBaseLib then writer.Write(vbLf & "<script src='" & baselibsDir & baseFile & ".js' type='text/javascript'></" & "script>")\r
+  if LoadBaseLib then\r
+    if InStr(baseLib,"/") > 0 then\r
+      writer.Write(vbLf & "<script src='http://ajax.googleapis.com/ajax/libs/" & baseLib & "' type='text/javascript'></" & "script>")\r
+    else\r
+      writer.Write(vbLf & "<script src='" & baselibsDir & baseLib & ".js' type='text/javascript'></" & "script>")\r
+    end if\r
+  end if\r
   requireRicoJS(writer, "")\r
   requireRicoJS(writer, "")\r
-  requireRicoJS(writer, adapter)\r
+  requireRicoJS(writer, "2" & left(baseLib,3))\r
   writer.Write(vbLf & "<script src='" & transDir & "ricoLocale_en.js' type='text/javascript'></" & "script>")\r
   requireRicoCSS(writer, "rico")\r
   requireRicoJS(writer, "UI")\r
   writer.Write(vbLf & "<script src='" & transDir & "ricoLocale_en.js' type='text/javascript'></" & "script>")\r
   requireRicoCSS(writer, "rico")\r
   requireRicoJS(writer, "UI")\r
@@ -152,7 +144,7 @@ Protected sub LoadTheme(writer as HTMLTextWriter, theme as String)
   select case prefix\r
     case "j":\r
       requireRicoJS(writer, "Themeroller")\r
   select case prefix\r
     case "j":\r
       requireRicoJS(writer, "Themeroller")\r
-      writer.Write(vbLf & "<link type='text/css' rel='stylesheet' href='" & cssDir & "jquery-base/ui.base.css' />")\r
+      'writer.Write(vbLf & "<link type='text/css' rel='stylesheet' href='" & cssDir & "jquery-base/ui.base.css' />")\r
       writer.Write(vbLf & "<link type='text/css' rel='Stylesheet' href='" & jQuery_theme_path & themeFile & "/jquery-ui.css' />")\r
     case "r":\r
       requireRicoCSS(writer, themeFile)\r
       writer.Write(vbLf & "<link type='text/css' rel='Stylesheet' href='" & jQuery_theme_path & themeFile & "/jquery-ui.css' />")\r
     case "r":\r
       requireRicoCSS(writer, themeFile)\r
index 131b92a..2031182 100644 (file)
@@ -43,24 +43,14 @@ div.ricoLG_cell {
 \r
 \r
 <body>\r
 \r
 \r
 <body>\r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>\r
 The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
 The Add and Edit forms are automatically generated by LiveGrid. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>\r
 The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
 The Add and Edit forms are automatically generated by LiveGrid. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
-</td><td>\r
-<script type='text/javascript'><!--\r
-google_ad_client = 'pub-7218597156507462';\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = '9298106441';\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>\r
-</td></tr></table>\r
+</div>\r
 \r
 <p><strong>Shippers Table</strong></p>
 \r
 \r
 <p><strong>Shippers Table</strong></p>
 \r
index e3f0fa4..a495930 100644 (file)
@@ -9,7 +9,7 @@
 Public dbConnection as object, accessRights as string\r
 Public LastErrorMsg as String\r
 Public defaultDB as String = "Northwind"\r
 Public dbConnection as object, accessRights as string\r
 Public LastErrorMsg as String\r
 Public defaultDB as String = "Northwind"\r
-Public const dbDialect     = "TSQL"   ' What kind of database are we connecting to?\r
+Public const dbDialect     = "Access"   ' What kind of database are we connecting to?\r
 \r
 \r
 Public Function OpenDB()\r
 \r
 \r
 Public Function OpenDB()\r
index 2c19734..094f609 100644 (file)
@@ -54,7 +54,7 @@ div.ricoLG_cell {
 </head>\r
 <body>\r
 \r
 </head>\r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -65,21 +65,7 @@ The Add and Edit forms are automatically generated by LiveGrid.
 Notice on the Edit form how the Rico Calendar is used to change dates. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
 <a href='ricoQuery.aspx?id=ex2x&offset=0&page_size=10&get_total=true'>View the AJAX response (XML)</a>.\r
 Notice on the Edit form how the Rico Calendar is used to change dates. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
 <a href='ricoQuery.aspx?id=ex2x&offset=0&page_size=10&get_total=true'>View the AJAX response (XML)</a>.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 <p><strong>Employees Table</strong></p>\r
 \r
 <Rico:LiveGrid runat='server' id='emp' TableName='employees' formView='true' DefaultSort='t.LastName,t.FirstName' menuEvent='click' frozenColumns='2' highlightElem='cursorRow'>\r
 <p><strong>Employees Table</strong></p>\r
 \r
 <Rico:LiveGrid runat='server' id='emp' TableName='employees' formView='true' DefaultSort='t.LastName,t.FirstName' menuEvent='click' frozenColumns='2' highlightElem='cursorRow'>\r
index 375a377..ec90684 100644 (file)
@@ -29,7 +29,7 @@ Rico.onLoad( function() {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -42,21 +42,7 @@ Click on a cell to see available actions.
 <p style='font-size:smaller;'>Data source: <a href="http://www.un.org/esa/population/unpop.htm">Population Division of the \r
 Department of Economic and Social Affairs of the United Nations Secretariat</a> (2009). \r
 <em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations.  </p>                            \r
 <p style='font-size:smaller;'>Data source: <a href="http://www.un.org/esa/population/unpop.htm">Population Division of the \r
 Department of Economic and Social Affairs of the United Nations Secretariat</a> (2009). \r
 <em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations.  </p>                            \r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 <p class="ricoBookmark"><span id="population_bookmark">&nbsp;</span></p>\r
 <table class="ricoLiveGrid" id="population">\r
 \r
 <p class="ricoBookmark"><span id="population_bookmark">&nbsp;</span></p>\r
 <table class="ricoLiveGrid" id="population">\r
index 855b10f..137777a 100644 (file)
@@ -63,7 +63,7 @@ div.ricoLG_cell {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
@@ -71,17 +71,7 @@ The Add and Edit forms are automatically generated by LiveGrid.
 Notice on the Add form how you use the Rico Tree control to select the customer. \r
 Notice on the Edit form how the Rico Calendar is used to change dates. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
 Notice on the Add form how you use the Rico Tree control to select the customer. \r
 Notice on the Edit form how the Rico Calendar is used to change dates. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
-</td><td>\r
-<script type='text/javascript'><!--\r
-google_ad_client = 'pub-7218597156507462';\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = '9298106441';\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>\r
-</td></tr></table>\r
+</div>\r
 <p><strong>Orders Table</strong></p>\r
 \r
 \r
 <p><strong>Orders Table</strong></p>\r
 \r
 \r
index 9bd4f83..9e16648 100644 (file)
@@ -22,7 +22,7 @@ div.ricoLG_cell {
 </head>\r
 <body>\r
 \r
 </head>\r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -34,22 +34,8 @@ on the size of the window. Try the different grid styles that
 are available. \r
 Click on a cell to see available actions.\r
 <a href='ricoQuery.aspx?id=ex2j&offset=0&page_size=10&_fmt=json'>View the AJAX response (JSON)</a>\r
 are available. \r
 Click on a cell to see available actions.\r
 <a href='ricoQuery.aspx?id=ex2j&offset=0&page_size=10&_fmt=json'>View the AJAX response (JSON)</a>\r
-(requires JSONview or similar extension in FF).\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+(displays directly in Chrome and Safari, requires JSONview or similar extension in Firefox).\r
+</div>\r
 \r
 <Rico:LiveGrid runat='server' id='ex2j' fmt="json" TableName='orders' DefaultSort='OrderID' menuEvent='click' frozenColumns='1' highlightElem='cursorRow'>\r
 <GridColumns>\r
 \r
 <Rico:LiveGrid runat='server' id='ex2j' fmt="json" TableName='orders' DefaultSort='OrderID' menuEvent='click' frozenColumns='1' highlightElem='cursorRow'>\r
 <GridColumns>\r
index 1a3ae1f..f0ad536 100644 (file)
@@ -74,24 +74,14 @@ div.ricoLG_cell {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
 <p>Rather than requesting data from RicoQuery, this page is able to process the AJAX\r
 data requests itself. No session variables are used.\r
 Base Library: <script type='text/javascript'>document.write(Rico.Lib+' '+Rico.LibVersion);</script>\r
 <hr>The data on this grid can be edited using pop-up forms. \r
 Just click on a grid cell and then select Edit, Delete, or Add from the pop-up menu. \r
 Updates are disabled on the database, so you will get an error message if you try to save.\r
 <p>Rather than requesting data from RicoQuery, this page is able to process the AJAX\r
 data requests itself. No session variables are used.\r
-</td><td>\r
-<script type='text/javascript'><!--\r
-google_ad_client = 'pub-7218597156507462';\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = '9298106441';\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>\r
-</td></tr></table>\r
+</div>\r
 <p><strong>Orders Table (without sessions)</strong></p>\r
 \r
 \r
 <p><strong>Orders Table (without sessions)</strong></p>\r
 \r
 \r
index 645abdf..93b9f07 100644 (file)
@@ -21,7 +21,7 @@ div.ricoLG_cell {
 </head>\r
 <body>\r
 \r
 </head>\r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -33,21 +33,7 @@ on the size of the window. Try the different grid styles that
 are available. \r
 Click on a cell to see available actions.\r
 <a href='ricoQuery.aspx?id=ex2x&offset=0&page_size=10&get_total=true'>View the AJAX response (XML)</a>.\r
 are available. \r
 Click on a cell to see available actions.\r
 <a href='ricoQuery.aspx?id=ex2x&offset=0&page_size=10&get_total=true'>View the AJAX response (XML)</a>.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 <Rico:LiveGrid runat='server' id='ex2x' TableName='orders' DefaultSort='OrderID' menuEvent='click' frozenColumns='1' highlightElem='cursorRow'>\r
 <GridColumns>\r
 \r
 <Rico:LiveGrid runat='server' id='ex2x' TableName='orders' DefaultSort='OrderID' menuEvent='click' frozenColumns='1' highlightElem='cursorRow'>\r
 <GridColumns>\r
index f242df4..dc3ca1b 100644 (file)
@@ -5,9 +5,9 @@
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
 <base target="content">\r
 \r
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
 <base target="content">\r
 \r
-<script src="../../ricoClient/js/baselibs/prototype.js" type="text/javascript"></script>\r
+<script src="../../ricoClient/js/baselibs/prototype-1.6.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/rico.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/rico.js" type="text/javascript"></script>\r
-<script src="../../ricoClient/js/rico2Proto.js" type="text/javascript"></script>\r
+<script src="../../ricoClient/js/rico2pro.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/ricoUI.js" type="text/javascript"></script>\r
 <link href="../../ricoClient/css/rico.css" type="text/css" rel="stylesheet">\r
 \r
 <script src="../../ricoClient/js/ricoUI.js" type="text/javascript"></script>\r
 <link href="../../ricoClient/css/rico.css" type="text/css" rel="stylesheet">\r
 \r
@@ -172,12 +172,18 @@ ul li {
   <div>Choose the Base Library</div>\r
   <div>\r
 <ul>\r
   <div>Choose the Base Library</div>\r
   <div>\r
 <ul>\r
-<li><a id='lib_proto'>Prototype</a>\r
-<li><a id='lib_jquery'>jQuery</a>\r
-<li><a id='lib_moo'>MooTools</a>\r
-<li><a id='lib_dojo'>dojo</a>\r
-<li><a id='lib_ext'>Ext</a>\r
-<li><a id='lib_glow'>Glow</a>\r
+<li><a id='lib_prototype-1.6'>Prototype 1.6</a>\r
+<li><a id='lib_prototype/1.7/prototype.js'>Prototype 1.7</a>\r
+<li><a id='lib_jquery/1.3/jquery.min.js'>jQuery 1.3</a>\r
+<li><a id='lib_jquery/1.4/jquery.min.js'>jQuery 1.4</a>\r
+<li><a id='lib_jquery/1.5/jquery.min.js'>jQuery 1.5</a>\r
+<li><a id='lib_mootools/1.2/mootools-yui-compressed.js'>MooTools 1.2</a>\r
+<li><a id='lib_mootools/1.3/mootools-yui-compressed.js'>MooTools 1.3</a>\r
+<li><a id='lib_dojo/1.4/dojo/dojo.xd.js'>dojo 1.4</a>\r
+<li><a id='lib_dojo/1.5/dojo/dojo.xd.js'>dojo 1.5</a>\r
+<li><a id='lib_ext-core/3.0/ext-core.js'>Ext 3.0</a>\r
+<li><a id='lib_ext-core/3.1/ext-core.js'>Ext 3.1</a>\r
+<li><a id='lib_glow.core-1.7'>Glow 1.7</a>\r
 </ul>\r
   </div>\r
 </div>\r
 </ul>\r
   </div>\r
 </div>\r
index afd1156..427002a 100644 (file)
@@ -146,7 +146,7 @@ div.ricoLG_cell {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -159,21 +159,7 @@ SimpleGrids have resizable columns, frozen columns on the left, and can use the
 same CSS styling as LiveGrids. Sorting and filtering can also be enabled\r
 at the developer's discretion. Unlike LiveGrids, each cell in a SimpleGrid\r
 can be formatted individually.\r
 same CSS styling as LiveGrids. Sorting and filtering can also be enabled\r
 at the developer's discretion. Unlike LiveGrids, each cell in a SimpleGrid\r
 can be formatted individually.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 \r
 <div>\r
 \r
 \r
 <div>\r
index d415982..d1f405f 100644 (file)
@@ -35,7 +35,7 @@ function TreeClick1(e) {
 \r
 <body>
 \r
 \r
 <body>
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -44,21 +44,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <p>This example demonstrates a basic, pop-up tree control where the tree nodes are loaded via AJAX.\r
 Only one item is selected from the tree at a time.\r
 Data is from the Northwind customer table.\r
 <p>This example demonstrates a basic, pop-up tree control where the tree nodes are loaded via AJAX.\r
 Only one item is selected from the tree at a time.\r
 Data is from the Northwind customer table.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 \r
 <p><button id='TreeButton1'>Show Tree</button>\r
 \r
 \r
 <p><button id='TreeButton1'>Show Tree</button>\r
index a82f1e9..6b0542b 100644 (file)
@@ -61,7 +61,7 @@ div.ricoLG_cell {
 \r
 <body style="font-size:80%;">\r
   \r
 \r
 <body style="font-size:80%;">\r
   \r
-<table id='explanation' border='0' cellpadding='5' cellspacing='0' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -69,21 +69,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <hr>\r
 This example displays some of the widgets that come with Rico. \r
 The widgets are compatible with all base libraries and themes.\r
 <hr>\r
 This example displays some of the widgets that come with Rico. \r
 The widgets are compatible with all base libraries and themes.\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 \r
 <p>&nbsp;</p>\r
 \r
 \r
 <p>&nbsp;</p>\r
index b1f5ab4..c2d0306 100644 (file)
@@ -4,8 +4,8 @@ Rico_CONFIG = {
   imgDir: "../../ricoClient/images/",  // directory containing Rico's image files\r
   enableLogging: false,    // enable console logging\r
   grid_striping: true,     // apply row striping to LiveGrids?\r
   imgDir: "../../ricoClient/images/",  // directory containing Rico's image files\r
   enableLogging: false,    // enable console logging\r
   grid_striping: true,     // apply row striping to LiveGrids?\r
-  LoadBaseLib: true,       // load base Javascript library (prototype, jQuery, etc) from Rico directory?\r
-  jQuery_theme_path: "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/",\r
+  LoadBaseLib: true,       // load base Javascript library (prototype, jQuery, etc)?\r
+  jQuery_theme_path: "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/",\r
 \r
   initialize: function(checkQueryString) {\r
     this.transDir=this.jsDir+"translations/";\r
 \r
   initialize: function(checkQueryString) {\r
     this.transDir=this.jsDir+"translations/";\r
@@ -19,13 +19,13 @@ Rico_CONFIG = {
         aParm=aSearch[i].split(/=/);\r
         switch (aParm[0]) {\r
           case 'theme': theme=aParm[1]; break;\r
         aParm=aSearch[i].split(/=/);\r
         switch (aParm[0]) {\r
           case 'theme': theme=aParm[1]; break;\r
-          case 'lib':   lib=aParm[1]; break;\r
+          case 'lib':   lib=unescape(aParm[1]); break;\r
           case 'log':   this.enableLogging=true; break;\r
         }\r
       }\r
     } else {\r
       // set your production values here\r
           case 'log':   this.enableLogging=true; break;\r
         }\r
       }\r
     } else {\r
       // set your production values here\r
-      lib="proto";    // base library (proto, jquery, moo, dojo, ext, or glow)\r
+      lib="prototype-1.6";    // base library\r
       theme="j-ui-lightness";  // jquery themes start with j-, rico themes start with r-\r
     }\r
     if (lib) this.LoadLib(lib);\r
       theme="j-ui-lightness";  // jquery themes start with j-, rico themes start with r-\r
     }\r
     if (lib) this.LoadLib(lib);\r
@@ -33,39 +33,17 @@ Rico_CONFIG = {
   },\r
 \r
   LoadLib: function(baseLib) {\r
   },\r
 \r
   LoadLib: function(baseLib) {\r
-    var baseFile,adapter;\r
-    switch (baseLib) {\r
-      case "proto":\r
-        baseFile="prototype"\r
-        adapter="2Proto"\r
-        break;\r
-      case "jquery":\r
-        baseFile="jquery"\r
-        adapter="2jQuery"\r
-        break;\r
-      case "moo":\r
-        baseFile="mootools"\r
-        adapter="2Moo"\r
-        break;\r
-      case "dojo":\r
-        baseFile="dojo"\r
-        adapter="2Dojo"\r
-        break;\r
-      case "ext":\r
-        baseFile="ext-core"\r
-        adapter="2Ext"\r
-        break;\r
-      case "glow":\r
-        baseFile="glow.core"\r
-        adapter="2Glow"\r
-        break;\r
-      default:\r
-        return;\r
+    if (this.LoadBaseLib) {\r
+      if (baseLib.indexOf('/') > -1) {\r
+        // load from googleapis\r
+        document.write("<script src='http://ajax.googleapis.com/ajax/libs/"+baseLib+"' type='text/javascript'></script>");\r
+      } else {\r
+        // load from Rico baselibs dir\r
+        document.write("<script src='"+this.baselibsDir+baseLib+".js' type='text/javascript'></script>");\r
+      }\r
     }\r
     }\r
-    //alert(baseFile+' '+adapter);\r
-    if (this.LoadBaseLib) document.write("<script src='"+this.baselibsDir+baseFile+".js' type='text/javascript'></script>");\r
     this.requireRicoJS("");\r
     this.requireRicoJS("");\r
-    this.requireRicoJS(adapter);\r
+    this.requireRicoJS("2" + baseLib.substr(0,3));\r
     document.write("<script src='"+this.transDir+"ricoLocale_en.js' type='text/javascript'></script>");\r
     this.requireRicoCSS("rico");\r
     this.requireRicoJS("UI");\r
     document.write("<script src='"+this.transDir+"ricoLocale_en.js' type='text/javascript'></script>");\r
     this.requireRicoCSS("rico");\r
     this.requireRicoJS("UI");\r
@@ -80,7 +58,6 @@ Rico_CONFIG = {
     switch (prefix) {\r
       case 'j':\r
         this.requireRicoJS("Themeroller");\r
     switch (prefix) {\r
       case 'j':\r
         this.requireRicoJS("Themeroller");\r
-        document.write("<link type='text/css' rel='stylesheet' href='"+this.cssDir+"jquery-base/ui.base.css'>");\r
         document.write("<link type='text/css' rel='Stylesheet' href='"+this.jQuery_theme_path+theme+"/jquery-ui.css'>");\r
         break;\r
       case 'r':\r
         document.write("<link type='text/css' rel='Stylesheet' href='"+this.jQuery_theme_path+theme+"/jquery-ui.css'>");\r
         break;\r
       case 'r':\r
index b342f72..e6386d2 100644 (file)
@@ -103,28 +103,14 @@ function StartFadeIn() {
 
 <body>
 
 
 <body>
 
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>
+<div id='explanation'>
 Base Library: 
 <script type='text/javascript'>
 document.write(Rico.Lib+' '+Rico.LibVersion);
 </script>
 <hr><p>This example demonstrates Rico's 
 ability to animate elements.
 Base Library: 
 <script type='text/javascript'>
 document.write(Rico.Lib+' '+Rico.LibVersion);
 </script>
 <hr><p>This example demonstrates Rico's 
 ability to animate elements.
-</td>
-<td>
-<script type="text/javascript"><!--
-google_ad_client = "pub-7218597156507462";
-/* 125x125, created 5/11/09 */
-google_ad_slot = "9298106441";
-google_ad_width = 125;
-google_ad_height = 125;
-//-->
-</script>
-<script type="text/javascript"
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script>
-</td>
-</tr></table>
+</div>
 
 
 <div id='animContainer'>
 
 
 <div id='animContainer'>
index 22677f8..3797d6d 100644 (file)
@@ -28,7 +28,7 @@
 
 <body>
 
 
 <body>
 
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>
+<div id='explanation'>
 Base Library: 
 <script type='text/javascript'>
 document.write(Rico.Lib+' '+Rico.LibVersion);
 Base Library: 
 <script type='text/javascript'>
 document.write(Rico.Lib+' '+Rico.LibVersion);
@@ -36,21 +36,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <hr>
 <h1>Rico: Classes and Dimensions</h1>
 <p>This example adds and removes classes from the test element.
 <hr>
 <h1>Rico: Classes and Dimensions</h1>
 <p>This example adds and removes classes from the test element.
-</td>
-<td>
-<script type="text/javascript"><!--
-google_ad_client = "pub-7218597156507462";
-/* 125x125, created 5/11/09 */
-google_ad_slot = "9298106441";
-google_ad_width = 125;
-google_ad_height = 125;
-//-->
-</script>
-<script type="text/javascript"
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script>
-</td>
-</tr></table>
+</div>
 
 
 <p>
 
 
 <p>
index f08e3ec..b589433 100644 (file)
@@ -162,7 +162,7 @@ body {font-family: Arial, Tahoma, Verdana;}
 \r
 <body>
 \r
 \r
 <body>
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -172,21 +172,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <p>This example displays the Rico Calendar in various formats and the Rico Color Picker,\r
 as well a displaying a dialog window.\r
 </p>\r
 <p>This example displays the Rico Calendar in various formats and the Rico Color Picker,\r
 as well a displaying a dialog window.\r
 </p>\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 \r
 <table border='1' cellspacing='0' cellpadding='7'>\r
 \r
 \r
 <table border='1' cellspacing='0' cellpadding='7'>\r
index b9abd16..3637557 100644 (file)
@@ -23,7 +23,7 @@ function ToggleElements(id,cssSelect) {
 
 <body>
 
 
 <body>
 
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>
+<div id='explanation'>
 Base Library: 
 <script type='text/javascript'>
 document.write(Rico.Lib+' '+Rico.LibVersion);
 Base Library: 
 <script type='text/javascript'>
 document.write(Rico.Lib+' '+Rico.LibVersion);
@@ -33,21 +33,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <p>This example demonstrates the library's CSS selector engine.
 Click on a button to toggle the visibility of the specified items.
 </p>
 <p>This example demonstrates the library's CSS selector engine.
 Click on a button to toggle the visibility of the specified items.
 </p>
-</td>
-<td>
-<script type="text/javascript"><!--
-google_ad_client = "pub-7218597156507462";
-/* 125x125, created 5/11/09 */
-google_ad_slot = "9298106441";
-google_ad_width = 125;
-google_ad_height = 125;
-//-->
-</script>
-<script type="text/javascript"
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script>
-</td>
-</tr></table>
+</div>
 
 
 <p>
 
 
 <p>
index fc4612f..ffde2f4 100644 (file)
@@ -20,8 +20,8 @@ Rico.onLoad( function() {
   var opts = {  \r
     useUnformattedColWidth: false,\r
     visibleRows  : 'parent',\r
   var opts = {  \r
     useUnformattedColWidth: false,\r
     visibleRows  : 'parent',\r
-    columnSpecs  : [{Hdg:'Last Name', canDrag:true},\r
-                    {Hdg:'First Name', canDrag:true}]\r
+    columnSpecs  : [{Hdg:'Last Name', canDrag:true,width:100},\r
+                    {Hdg:'First Name', canDrag:true,width:100}]\r
   };\r
   for (var i=0; i<4; i++) {\r
     buffer[i]=new Rico.Buffer.Base();\r
   };\r
   for (var i=0; i<4; i++) {\r
     buffer[i]=new Rico.Buffer.Base();\r
index e2730e3..98a9ab2 100644 (file)
@@ -56,7 +56,7 @@ Rico.onLoad(function() {
 
 <body>
 
 
 <body>
 
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>
+<div id='explanation'>
 Base Library: 
 <script type='text/javascript'>
 document.write(Rico.Lib+' '+Rico.LibVersion);
 Base Library: 
 <script type='text/javascript'>
 document.write(Rico.Lib+' '+Rico.LibVersion);
@@ -66,21 +66,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <p>In this example, the "Add" button adds an event to the "Test" button. 
 Conversely, the "Remove" button removes that event from the "Test" button.
 </p>
 <p>In this example, the "Add" button adds an event to the "Test" button. 
 Conversely, the "Remove" button removes that event from the "Test" button.
 </p>
-</td>
-<td>
-<script type="text/javascript"><!--
-google_ad_client = "pub-7218597156507462";
-/* 125x125, created 5/11/09 */
-google_ad_slot = "9298106441";
-google_ad_width = 125;
-google_ad_height = 125;
-//-->
-</script>
-<script type="text/javascript"
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
-</script>
-</td>
-</tr></table>
+</div>
 
 <p>
 <button id='addA'>Add event to A</button>
 
 <p>
 <button id='addA'>Add event to A</button>
index b0e015b..036c93e 100644 (file)
@@ -5,9 +5,9 @@
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
 <base target="content">\r
 \r
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
 <base target="content">\r
 \r
-<script src="../../ricoClient/js/baselibs/prototype.js" type="text/javascript"></script>\r
+<script src="../../ricoClient/js/baselibs/prototype-1.6.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/rico.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/rico.js" type="text/javascript"></script>\r
-<script src="../../ricoClient/js/rico2Proto.js" type="text/javascript"></script>\r
+<script src="../../ricoClient/js/rico2pro.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/ricoUI.js" type="text/javascript"></script>\r
 <link href="../../ricoClient/css/rico.css" type="text/css" rel="stylesheet" />\r
 \r
 <script src="../../ricoClient/js/ricoUI.js" type="text/javascript"></script>\r
 <link href="../../ricoClient/css/rico.css" type="text/css" rel="stylesheet" />\r
 \r
@@ -204,12 +204,18 @@ ul li {
   <div>Choose the Base Library</div>\r
   <div>\r
 <ul>\r
   <div>Choose the Base Library</div>\r
   <div>\r
 <ul>\r
-<li><a id='lib_proto'>Prototype</a>\r
-<li><a id='lib_jquery'>jQuery</a>\r
-<li><a id='lib_moo'>MooTools</a>\r
-<li><a id='lib_dojo'>dojo</a>\r
-<li><a id='lib_ext'>Ext</a>\r
-<li><a id='lib_glow'>Glow</a>\r
+<li><a id='lib_prototype-1.6'>Prototype 1.6</a>\r
+<li><a id='lib_prototype/1.7/prototype.js'>Prototype 1.7</a>\r
+<li><a id='lib_jquery/1.3/jquery.min.js'>jQuery 1.3</a>\r
+<li><a id='lib_jquery/1.4/jquery.min.js'>jQuery 1.4</a>\r
+<li><a id='lib_jquery/1.5/jquery.min.js'>jQuery 1.5</a>\r
+<li><a id='lib_mootools/1.2/mootools-yui-compressed.js'>MooTools 1.2</a>\r
+<li><a id='lib_mootools/1.3/mootools-yui-compressed.js'>MooTools 1.3</a>\r
+<li><a id='lib_dojo/1.4/dojo/dojo.xd.js'>dojo 1.4</a>\r
+<li><a id='lib_dojo/1.5/dojo/dojo.xd.js'>dojo 1.5</a>\r
+<li><a id='lib_ext-core/3.0/ext-core.js'>Ext 3.0</a>\r
+<li><a id='lib_ext-core/3.1/ext-core.js'>Ext 3.1</a>\r
+<li><a id='lib_glow.core-1.7'>Glow 1.7</a>\r
 </ul>\r
   </div>\r
 </div>\r
 </ul>\r
   </div>\r
 </div>\r
index 2c54498..3fa2e11 100644 (file)
@@ -54,7 +54,7 @@ function DisplayText(e) {
 \r
 <body>
 \r
 \r
 <body>
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -62,21 +62,7 @@ document.write(Rico.Lib+' '+Rico.LibVersion);
 <hr>\r
 <p>This example displays an dialog window, then allows you to change the window contents - demonstrating how the window automatically resizes.\r
 </p>\r
 <hr>\r
 <p>This example displays an dialog window, then allows you to change the window contents - demonstrating how the window automatically resizes.\r
 </p>\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 \r
 <button id='btnWinCreate'>Display popup window</button>\r
 \r
 \r
 <button id='btnWinCreate'>Display popup window</button>\r
index ec37139..2357ff0 100644 (file)
@@ -30,7 +30,7 @@ Rico.onLoad( function() {
 \r
 <body>\r
 \r
 \r
 <body>\r
 \r
-<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>\r
+<div id='explanation'>\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
 Base Library: \r
 <script type='text/javascript'>\r
 document.write(Rico.Lib+' '+Rico.LibVersion);\r
@@ -47,21 +47,7 @@ Rico.onLoad( function() {
 });\r
 </pre>\r
 </p>\r
 });\r
 </pre>\r
 </p>\r
-</td>\r
-<td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
-</td>\r
-</tr></table>\r
+</div>\r
 \r
 <table id='thumbnails' border='0' cellspacing='0' cellpadding='10'>\r
 \r
 \r
 <table id='thumbnails' border='0' cellspacing='0' cellpadding='10'>\r
 \r
index 99efcce..d2786ad 100644 (file)
@@ -7,7 +7,7 @@ Rico.onLoad( function() {
   acc=new Rico.Accordion( 'accordion1', {panelHeight:100} );\r
   //WinResize();\r
   setLinks(Rico.select('#accordion1 ul a'));\r
   acc=new Rico.Accordion( 'accordion1', {panelHeight:100} );\r
   //WinResize();\r
   setLinks(Rico.select('#accordion1 ul a'));\r
-  setParm(Rico.$('lib_proto'));\r
+  setParm(Rico.$('lib_prototype-1.6'));\r
   setParm(Rico.$('theme_j-ui-lightness'));\r
   setTimeout(WinResize,5);\r
   setTimeout(function() {Event.observe(top, "resize", WinResize, false);},100);\r
   setParm(Rico.$('theme_j-ui-lightness'));\r
   setTimeout(WinResize,5);\r
   setTimeout(function() {Event.observe(top, "resize", WinResize, false);},100);\r
index c2969db..add8257 100644 (file)
@@ -8,7 +8,7 @@ $baselibsDir=$jsDir."baselibs/";
 $grid_striping=true;       // apply row striping to LiveGrids?\r
 $checkQueryString = true;  // load settings from QueryString? true for demo, false for production\r
 $LoadBaseLib = true;       // load base Javascript library (prototype, jQuery, etc) from Rico directory?\r
 $grid_striping=true;       // apply row striping to LiveGrids?\r
 $checkQueryString = true;  // load settings from QueryString? true for demo, false for production\r
 $LoadBaseLib = true;       // load base Javascript library (prototype, jQuery, etc) from Rico directory?\r
-$jQuery_theme_path = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/";\r
+$jQuery_theme_path = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/themes/";\r
 \r
 if ($checkQueryString) {\r
   $ricoLib=$_GET['lib'];\r
 \r
 if ($checkQueryString) {\r
   $ricoLib=$_GET['lib'];\r
@@ -16,7 +16,7 @@ if ($checkQueryString) {
   $ricoLogging=isset($_GET["log"]);\r
 } else {\r
   // set your production values here\r
   $ricoLogging=isset($_GET["log"]);\r
 } else {\r
   // set your production values here\r
-  $ricoLib="proto";    // base library (proto, jquery, moo, dojo, ext, or glow)\r
+  $ricoLib="prototype-1.6";     // base library\r
   $ricoTheme="j-ui-lightness";  // jquery themes start with j-, rico themes start with r-\r
   $ricoLogging=false;\r
 }\r
   $ricoTheme="j-ui-lightness";  // jquery themes start with j-, rico themes start with r-\r
   $ricoLogging=false;\r
 }\r
@@ -43,37 +43,15 @@ function SetConfig() {
 \r
 function LoadLib($baseLib, $baseLoadFlag) {\r
   global $baselibsDir,$transDir;\r
 \r
 function LoadLib($baseLib, $baseLoadFlag) {\r
   global $baselibsDir,$transDir;\r
-  switch ($baseLib) {\r
-    case 'proto':\r
-      $baselib='prototype';\r
-      $adapter='2Proto';\r
-      break;\r
-    case 'jquery':\r
-      $baselib='jquery';\r
-      $adapter='2jQuery';\r
-      break;\r
-    case 'moo':\r
-      $baselib='mootools';\r
-      $adapter='2Moo';\r
-      break;\r
-    case 'dojo':\r
-      $baselib='dojo';\r
-      $adapter='2Dojo';\r
-      break;\r
-    case 'ext':\r
-      $baselib='ext-core';\r
-      $adapter='2Ext';\r
-      break;\r
-    case 'glow':\r
-      $baselib='glow.core';\r
-      $adapter='2Glow';\r
-      break;\r
-    default:\r
-      exit();\r
+  if ($baseLoadFlag) {\r
+    if (strpos($baseLib,"/") === false) {\r
+      echo "<script src='".$baselibsDir.$baseLib.".js' type='text/javascript'></script>\n";\r
+    } else {\r
+      echo "<script src='http://ajax.googleapis.com/ajax/libs/".$baseLib."' type='text/javascript'></script>\n";\r
+    }\r
   }\r
   }\r
-  if ($baseLoadFlag) echo "<script src='".$baselibsDir.$baselib.".js' type='text/javascript'></script>\n";\r
   requireRicoJS("");\r
   requireRicoJS("");\r
-  requireRicoJS($adapter);\r
+  requireRicoJS("2" . substr($baseLib,0,3));\r
   echo "<script src='".$transDir."ricoLocale_en.js' type='text/javascript'></script>\n";\r
   requireRicoCSS("rico");\r
   requireRicoJS("UI");\r
   echo "<script src='".$transDir."ricoLocale_en.js' type='text/javascript'></script>\n";\r
   requireRicoCSS("rico");\r
   requireRicoJS("UI");\r
@@ -110,7 +88,7 @@ function LoadTheme($theme) {
   switch ($prefix) {\r
     case 'j':\r
       requireRicoJS("Themeroller");\r
   switch ($prefix) {\r
     case 'j':\r
       requireRicoJS("Themeroller");\r
-      echo "<link type='text/css' rel='stylesheet' href='".$cssDir."jquery-base/ui.base.css' />";\r
+      //echo "<link type='text/css' rel='stylesheet' href='".$cssDir."jquery-base/ui.base.css' />";\r
       echo "<link type='text/css' rel='Stylesheet' href='" . $jQuery_theme_path . $theme."/jquery-ui.css' />";\r
       break;\r
     case 'r':\r
       echo "<link type='text/css' rel='Stylesheet' href='" . $jQuery_theme_path . $theme."/jquery-ui.css' />";\r
       break;\r
     case 'r':\r
index 137ad91..ad57326 100644 (file)
@@ -58,15 +58,7 @@ function DisplayTable() {
   echo "The Add and Edit forms are automatically generated by LiveGrid. ";
   echo "Updates are disabled on the database, so you will get an error message if you try to save.";
   echo "</td><td>";
   echo "The Add and Edit forms are automatically generated by LiveGrid. ";
   echo "Updates are disabled on the database, so you will get an error message if you try to save.";
   echo "</td><td>";
-  echo "<script type='text/javascript'><!--\n";
-  echo "google_ad_client = 'pub-7218597156507462';\n";
-  echo "/* 125x125, created 5/11/09 */\n";
-  echo "google_ad_slot = '9298106441';\n";
-  echo "google_ad_width = 125;\n";
-  echo "google_ad_height = 125;\n";
-  echo "//-->\n";
-  echo "</script>\n";
-  echo "<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>\n";
+  require "info.php";
   echo "</td></tr></table>";
 
   echo "<p><strong>Shippers Table</strong></p>";
   echo "</td></tr></table>";
 
   echo "<p><strong>Shippers Table</strong></p>";
index a525c9f..2edccda 100644 (file)
@@ -17,7 +17,7 @@ function OpenDB() {
 \r
   // MS SQL\r
   //$oDB->Dialect="TSQL";\r
 \r
   // MS SQL\r
   //$oDB->Dialect="TSQL";\r
-  //return $oDB->MSSqlLogon("mbrown27", $appDB, "userid", "password");\r
+  //return $oDB->MSSqlLogon("computer/instance", $appDB, "userid", "password");\r
 \r
   // ODBC - MS Access\r
   //$oDB->Dialect="Access";\r
 \r
   // ODBC - MS Access\r
   //$oDB->Dialect="Access";\r
index 614b78d..4ea7d55 100644 (file)
@@ -46,17 +46,9 @@ Department of Economic and Social Affairs of the United Nations Secretariat</a>
 <em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations.  </p>                            \r
 </td>\r
 <td>\r
 <em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations.  </p>                            \r
 </td>\r
 <td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
+<?php\r
+require "info.php";\r
+?>\r
 </td>\r
 </tr></table>\r
 \r
 </td>\r
 </tr></table>\r
 \r
index 6f20ab5..4654f51 100644 (file)
@@ -71,15 +71,7 @@ function DisplayTable() {
   echo "Notice on the Edit form how the Rico Calendar is used to change dates. ";
   echo "Updates are disabled on the database, so you will get an error message if you try to save.";
   echo "</td><td>";
   echo "Notice on the Edit form how the Rico Calendar is used to change dates. ";
   echo "Updates are disabled on the database, so you will get an error message if you try to save.";
   echo "</td><td>";
-  echo "<script type='text/javascript'><!--\n";
-  echo "google_ad_client = 'pub-7218597156507462';\n";
-  echo "/* 125x125, created 5/11/09 */\n";
-  echo "google_ad_slot = '9298106441';\n";
-  echo "google_ad_width = 125;\n";
-  echo "google_ad_height = 125;\n";
-  echo "//-->\n";
-  echo "</script>\n";
-  echo "<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>\n";
+  require "info.php";
   echo "</td></tr></table>";
   echo "<p><strong>Orders Table</strong></p>";
 
   echo "</td></tr></table>";
   echo "<p><strong>Orders Table</strong></p>";
 
index 0605da3..b0c0dce 100644 (file)
@@ -65,17 +65,9 @@ Click on a cell to see available actions.
 (requires JSONview or similar extension in FF).\r
 </td>\r
 <td>\r
 (requires JSONview or similar extension in FF).\r
 </td>\r
 <td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
+<?php\r
+require "info.php";\r
+?>\r
 </td>\r
 </tr></table>\r
 \r
 </td>\r
 </tr></table>\r
 \r
index 1cffedc..564f6ed 100644 (file)
@@ -82,15 +82,9 @@ Notice on the Add form how you use the Rico Tree control to select the customer.
 Notice on the Edit form how the Rico Calendar is used to change dates. 
 Updates are disabled on the database, so you will get an error message if you try to save.
 </td><td>
 Notice on the Edit form how the Rico Calendar is used to change dates. 
 Updates are disabled on the database, so you will get an error message if you try to save.
 </td><td>
-<script type='text/javascript'><!--
-google_ad_client = 'pub-7218597156507462';
-/* 125x125, created 5/11/09 */
-google_ad_slot = '9298106441';
-google_ad_width = 125;
-google_ad_height = 125;
-//-->
-</script>
-<script type='text/javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js'></script>
+<?php
+require "info.php";
+?>
 </td></tr></table>
 
 <p><strong>Orders Table</strong></p>
 </td></tr></table>
 
 <p><strong>Orders Table</strong></p>
index 0835b95..1893ed2 100644 (file)
@@ -64,17 +64,9 @@ Click on a cell to see available actions.
 <a href='ricoQuery.php?id=ex2&offset=0&page_size=10&get_total=true'>View the AJAX response (XML)</a>.\r
 </td>\r
 <td>\r
 <a href='ricoQuery.php?id=ex2&offset=0&page_size=10&get_total=true'>View the AJAX response (XML)</a>.\r
 </td>\r
 <td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
+<?php\r
+require "info.php";\r
+?>\r
 </td>\r
 </tr></table>\r
 \r
 </td>\r
 </tr></table>\r
 \r
index 1457d8b..9ee1dbc 100644 (file)
@@ -5,9 +5,9 @@
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
 <base target="content">\r
 \r
 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">\r
 <base target="content">\r
 \r
-<script src="../../ricoClient/js/baselibs/prototype.js" type="text/javascript"></script>\r
+<script src="../../ricoClient/js/baselibs/prototype-1.6.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/rico.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/rico.js" type="text/javascript"></script>\r
-<script src="../../ricoClient/js/rico2Proto.js" type="text/javascript"></script>\r
+<script src="../../ricoClient/js/rico2pro.js" type="text/javascript"></script>\r
 <script src="../../ricoClient/js/ricoUI.js" type="text/javascript"></script>\r
 <link href="../../ricoClient/css/rico.css" type="text/css" rel="stylesheet" />\r
 \r
 <script src="../../ricoClient/js/ricoUI.js" type="text/javascript"></script>\r
 <link href="../../ricoClient/css/rico.css" type="text/css" rel="stylesheet" />\r
 \r
@@ -169,12 +169,18 @@ ul li {
   <div>Choose the Base Library</div>\r
   <div>\r
 <ul>\r
   <div>Choose the Base Library</div>\r
   <div>\r
 <ul>\r
-<li><a id='lib_proto'>Prototype</a>\r
-<li><a id='lib_jquery'>jQuery</a>\r
-<li><a id='lib_moo'>MooTools</a>\r
-<li><a id='lib_dojo'>dojo</a>\r
-<li><a id='lib_ext'>Ext</a>\r
-<li><a id='lib_glow'>Glow</a>\r
+<li><a id='lib_prototype-1.6'>Prototype 1.6</a>\r
+<li><a id='lib_prototype/1.7/prototype.js'>Prototype 1.7</a>\r
+<li><a id='lib_jquery/1.3/jquery.min.js'>jQuery 1.3</a>\r
+<li><a id='lib_jquery/1.4/jquery.min.js'>jQuery 1.4</a>\r
+<li><a id='lib_jquery/1.5/jquery.min.js'>jQuery 1.5</a>\r
+<li><a id='lib_mootools/1.2/mootools-yui-compressed.js'>MooTools 1.2</a>\r
+<li><a id='lib_mootools/1.3/mootools-yui-compressed.js'>MooTools 1.3</a>\r
+<li><a id='lib_dojo/1.4/dojo/dojo.xd.js'>dojo 1.4</a>\r
+<li><a id='lib_dojo/1.5/dojo/dojo.xd.js'>dojo 1.5</a>\r
+<li><a id='lib_ext-core/3.0/ext-core.js'>Ext 3.0</a>\r
+<li><a id='lib_ext-core/3.1/ext-core.js'>Ext 3.1</a>\r
+<li><a id='lib_glow.core-1.7'>Glow 1.7</a>\r
 </ul>\r
   </div>\r
 </div>\r
 </ul>\r
   </div>\r
 </div>\r
index ba5316e..c74f62e 100644 (file)
@@ -97,17 +97,9 @@ to process the query and format the response in the Rico LiveGrid XML format.
 <p>Try moving your cursor over each photo...\r
 </td>\r
 <td>\r
 <p>Try moving your cursor over each photo...\r
 </td>\r
 <td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
+<?php\r
+require "info.php";\r
+?>\r
 </td>\r
 </tr></table>\r
 \r
 </td>\r
 </tr></table>\r
 \r
index 9db57e3..ef85bd3 100644 (file)
@@ -80,17 +80,9 @@ at the developer's discretion. Unlike LiveGrids, each cell in a SimpleGrid
 can be formatted individually.\r
 </td>\r
 <td>\r
 can be formatted individually.\r
 </td>\r
 <td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
+<?php\r
+require "info.php";\r
+?>\r
 </td>\r
 </tr></table>\r
 \r
 </td>\r
 </tr></table>\r
 \r
index edf5932..cf293ab 100644 (file)
@@ -48,17 +48,9 @@ Only one item is selected from the tree at a time.
 Data is from the Northwind customer table.\r
 </td>\r
 <td>\r
 Data is from the Northwind customer table.\r
 </td>\r
 <td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
+<?php\r
+require "info.php";\r
+?>\r
 </td>\r
 </tr></table>\r
 \r
 </td>\r
 </tr></table>\r
 \r
index 6546256..034e45d 100644 (file)
@@ -71,17 +71,9 @@ This example displays some of the widgets that come with Rico.
 The widgets are compatible with all base libraries and themes.\r
 </td>\r
 <td>\r
 The widgets are compatible with all base libraries and themes.\r
 </td>\r
 <td>\r
-<script type="text/javascript"><!--\r
-google_ad_client = "pub-7218597156507462";\r
-/* 125x125, created 5/11/09 */\r
-google_ad_slot = "9298106441";\r
-google_ad_width = 125;\r
-google_ad_height = 125;\r
-//-->\r
-</script>\r
-<script type="text/javascript"\r
-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">\r
-</script>\r
+<?php\r
+require "info.php";\r
+?>\r
 </td>\r
 </tr></table>\r
 \r
 </td>\r
 </tr></table>\r
 \r
index c508ef0..0e956ab 100644 (file)
@@ -221,13 +221,11 @@ class SimpleGrid
     dim colcnt,r,c\r
     if IsEmpty(ResizeRowIdx) then exit sub\r
     colcnt=rows(ResizeRowIdx).CellCount\r
     dim colcnt,r,c\r
     if IsEmpty(ResizeRowIdx) then exit sub\r
     colcnt=rows(ResizeRowIdx).CellCount\r
-    response.write vbLf & "<div id='" & id & "_outerDiv'>"\r
+    response.write vbLf & "<div id='" & id & "_outerDiv'><table id='" & id & "' border='0' cellspacing='0' cellpadding='0'><tr valign='top'><td rowspan='2'>"\r
 \r
     '-------------------\r
     ' frozen columns\r
     '-------------------\r
 \r
     '-------------------\r
     ' frozen columns\r
     '-------------------\r
-    response.write vbLf & "<div id='" & id & "_frozenTabsDiv'>"\r
-\r
     ' upper left\r
     response.write vbLf & "<table id='" & id & "_tab0h' class='ricoLG_table ricoLG_top ricoLG_left' cellspacing='0' cellpadding='0'><thead>"\r
     for r=0 to LastHeadingRow\r
     ' upper left\r
     response.write vbLf & "<table id='" & id & "_tab0h' class='ricoLG_table ricoLG_top ricoLG_left' cellspacing='0' cellpadding='0'><thead>"\r
     for r=0 to LastHeadingRow\r
@@ -240,13 +238,14 @@ class SimpleGrid
     response.write vbLf & "</thead></table>"\r
 \r
     ' lower left\r
     response.write vbLf & "</thead></table>"\r
 \r
     ' lower left\r
+    response.write vbLf & "<div id='" & id & "_frozenTabsDiv'>"\r
     response.write "<table id='" & id & "_tab0' class='ricoLG_table ricoLG_bottom ricoLG_left' cellspacing='0' cellpadding='0'>"\r
     response.write vbLf & "<tr>"\r
     RenderColumns 0,FrozenCols-1\r
     response.write vbLf & "</tr>"\r
     response.write vbLf & "</table>"\r
 \r
     response.write "<table id='" & id & "_tab0' class='ricoLG_table ricoLG_bottom ricoLG_left' cellspacing='0' cellpadding='0'>"\r
     response.write vbLf & "<tr>"\r
     RenderColumns 0,FrozenCols-1\r
     response.write vbLf & "</tr>"\r
     response.write vbLf & "</table>"\r
 \r
-    response.write vbLf & "</div>"\r
+    response.write vbLf & "</div></td>"\r
 \r
 \r
     '-------------------\r
 \r
 \r
     '-------------------\r
@@ -254,7 +253,7 @@ class SimpleGrid
     '-------------------\r
 \r
     ' upper right\r
     '-------------------\r
 \r
     ' upper right\r
-    response.write vbLf & "<div id='" & id & "_innerDiv'>"\r
+    response.write vbLf & "<td><div id='" & id & "_innerDiv'>"\r
     response.write vbLf & "<div id='" & id & "_scrollTabsDiv'>"\r
     response.write vbLf & "<table id='" & id & "_tab1h' class='ricoLG_table ricoLG_top ricoLG_right' cellspacing='0' cellpadding='0'><thead>"\r
     for r=0 to LastHeadingRow\r
     response.write vbLf & "<div id='" & id & "_scrollTabsDiv'>"\r
     response.write vbLf & "<table id='" & id & "_tab1h' class='ricoLG_table ricoLG_top ricoLG_right' cellspacing='0' cellpadding='0'><thead>"\r
     for r=0 to LastHeadingRow\r
@@ -269,15 +268,15 @@ class SimpleGrid
     response.write vbLf & "</div>"\r
 \r
     ' lower right\r
     response.write vbLf & "</div>"\r
 \r
     ' lower right\r
-    response.write vbLf & "<div id='" & id & "_scrollDiv'>"\r
+    response.write vbLf & "<tr valign='top'><td><div id='" & id & "_scrollDiv'>"\r
     response.write vbLf & "<table id='" & id & "_tab1' class='ricoLG_table ricoLG_bottom ricoLG_right' cellspacing='0' cellpadding='0'>"\r
     response.write vbLf & "<tr>"\r
     RenderColumns FrozenCols,colcnt-1\r
     response.write vbLf & "</tr>"\r
     response.write vbLf & "</table>"\r
     response.write vbLf & "<table id='" & id & "_tab1' class='ricoLG_table ricoLG_bottom ricoLG_right' cellspacing='0' cellpadding='0'>"\r
     response.write vbLf & "<tr>"\r
     RenderColumns FrozenCols,colcnt-1\r
     response.write vbLf & "</tr>"\r
     response.write vbLf & "</table>"\r
-    response.write vbLf & "</div>"\r
+    response.write vbLf & "</div></td></tr>"\r
 \r
 \r
-    response.write vbLf & "</div>"\r
+    response.write vbLf & "</table></div>"\r
   End Sub\r
 end class\r
 \r
   End Sub\r
 end class\r
 \r
index 55a1fdc..293ab15 100644 (file)
@@ -16,7 +16,7 @@ Public Const sizeToParent=-4
 ' Private Properties\r
 ' ----------------------------------------------------\r
 \r
 ' Private Properties\r
 ' ----------------------------------------------------\r
 \r
-Private _rows As Integer = sizeToWindow\r
+Private _rows As Integer = sizeToBody\r
 Private _sqlFilters as New ArrayList()\r
 Private _gridHeading As ITemplate = Nothing\r
 Private _headingTop As ITemplate = Nothing\r
 Private _sqlFilters as New ArrayList()\r
 Private _gridHeading As ITemplate = Nothing\r
 Private _headingTop As ITemplate = Nothing\r
@@ -56,16 +56,13 @@ Public FilterLocation as Integer = -2
 Public FilterAllToken as String\r
 Public FilterBoxMaxLen as Integer = -1\r
 Public FilterAnchorLeft as Boolean = false  ' when matching text box values, should they match beginning of string (true) or anywhere in string (false)?
 Public FilterAllToken as String\r
 Public FilterBoxMaxLen as Integer = -1\r
 Public FilterAnchorLeft as Boolean = false  ' when matching text box values, should they match beginning of string (true) or anywhere in string (false)?
-Public requestParameters as New Hashtable()\r
 Public saveColumnWidth as Boolean = True\r
 Public saveColumnFilter as Boolean = False\r
 Public saveColumnSort as Boolean = False\r
 Public cookieDays as Integer\r
 Public DefaultSort as String\r
 Public saveColumnWidth as Boolean = True\r
 Public saveColumnFilter as Boolean = False\r
 Public saveColumnSort as Boolean = False\r
 Public cookieDays as Integer\r
 Public DefaultSort as String\r
-Public BufferType as String = "AjaxSQL"  ' can be overridden to AjaxXML\r
 Public maxPrint as Integer = -1\r
 Public dndMgrIdx as Integer = -1\r
 Public maxPrint as Integer = -1\r
 Public dndMgrIdx as Integer = -1\r
-Public fmt as String = "xml"\r
 Public UsingMinRico as Boolean = False   ' using minified version of Rico?\r
 Public sessions as Boolean = True\r
 Public minPageRows as Integer = -1\r
 Public UsingMinRico as Boolean = False   ' using minified version of Rico?\r
 Public sessions as Boolean = True\r
 Public minPageRows as Integer = -1\r
@@ -74,6 +71,13 @@ Public defaultWidth as Integer = -1  ' if -1, then use unformatted column width,
 Public debug as Boolean = False\r
 Public LogSqlOnError as Boolean = false   ' include sql statement in results if an error occurs (true/false)\r
 \r
 Public debug as Boolean = False\r
 Public LogSqlOnError as Boolean = false   ' include sql statement in results if an error occurs (true/false)\r
 \r
+' ----------------------------------------------------\r
+' Public Properties for buffer\r
+' ----------------------------------------------------\r
+Public BufferType as String = "AjaxSQL"  ' can be overridden to AjaxXML\r
+Public fmt as String = "xml"\r
+Public largeBufferSize as Integer = -1   ' controls size of client buffer and AJAX fetch size\r
+Public requestParameters as New Hashtable()\r
 \r
 \r
 Public Property rows() As Integer\r
 \r
 \r
 Public Property rows() As Integer\r
@@ -292,6 +296,7 @@ Protected ReadOnly Property init_Script() As String
     if BufferType="AjaxSQL" then\r
       if a.Count > 0 then script.Append(",")\r
       script.Append(vbCrLf & "    TimeOut: " & Session.Timeout & ",")\r
     if BufferType="AjaxSQL" then\r
       if a.Count > 0 then script.Append(",")\r
       script.Append(vbCrLf & "    TimeOut: " & Session.Timeout & ",")\r
+      if largeBufferSize > 0 then script.Append(vbCrLf & "    largeBufferSize: " & largeBufferSize & ",")\r
       script.Append(vbCrLf & "    fmt: '" & fmt & "'")\r
     end if\r
     script.Append(vbCrLf & "  }" & vbCrLf)\r
       script.Append(vbCrLf & "    fmt: '" & fmt & "'")\r
     end if\r
     script.Append(vbCrLf & "  }" & vbCrLf)\r
@@ -585,6 +590,19 @@ Public Sub AddCondition(ByRef WhereClause as String, ByVal NewCondition as Strin
 End Sub\r
 \r
 \r
 End Sub\r
 \r
 \r
+' -------------------------------------------------------------\r
+' Return the form value of a column based on its column name (insert or update action)\r
+' -------------------------------------------------------------\r
+Public Function FormValue(ByVal SearchName as String) as String\r
+  Dim idx as Integer = ColIndex(SearchName)\r
+  if idx < 0 then\r
+    FormValue = ""\r
+  else\r
+    FormValue = FormatFormValue(idx)\r
+  end if\r
+End Function\r
+\r
+\r
 ' -------------------------------------------------------------\r
 ' Return the index of a column based on its column name, or -1 if not found\r
 ' -------------------------------------------------------------\r
 ' -------------------------------------------------------------\r
 ' Return the index of a column based on its column name, or -1 if not found\r
 ' -------------------------------------------------------------\r
@@ -614,6 +632,20 @@ Public Function getColumnByName(ByVal SearchName as String) as GridColumn
 End Function\r
 \r
 \r
 End Function\r
 \r
 \r
+' -------------------------------------------------------------\r
+' Return the a column object based on its heading, or Nothing if not found\r
+' -------------------------------------------------------------\r
+Public Function getColumnByHeading(ByVal SearchName as String) as GridColumn\r
+  dim i as Integer\r
+  for i=0 to columns.Count-1\r
+    if columns(i).Heading=SearchName then\r
+      getColumnByHeading=columns(i)\r
+      Exit Function\r
+    end if\r
+  next\r
+End Function\r
+\r
+\r
 ' -------------------------------------------------------------\r
 ' Return the index of a table based on its table name\r
 ' -------------------------------------------------------------\r
 ' -------------------------------------------------------------\r
 ' Return the index of a table based on its table name\r
 ' -------------------------------------------------------------\r
@@ -637,6 +669,12 @@ Public Function AddFilter(ByVal newfilter as String)
 End Function\r
 \r
 \r
 End Function\r
 \r
 \r
+' form where clause based on table's primary key\r
+Public function MainTableKeyWhereClause() as String\r
+  MainTableKeyWhereClause = TableKeyWhereClause(MainTbl)\r
+End Function\r
+\r
+\r
 ' form where clause based on table's primary key\r
 Private function TableKeyWhereClause(TabIdx as Integer) as String\r
   dim i as Integer, w as String\r
 ' form where clause based on table's primary key\r
 Private function TableKeyWhereClause(TabIdx as Integer) as String\r
   dim i as Integer, w as String\r
index c742f03..e3d5eb4 100644 (file)
@@ -13,8 +13,9 @@ Public FilterLocation as Integer = -2
 Public FilterAllToken as String\r
 Public FilterBoxMaxLen as Integer = -1\r
 Public FilterAnchorLeft as Boolean = false  ' when matching text box values, should they match beginning of string (true) or anywhere in string (false)?
 Public FilterAllToken as String\r
 Public FilterBoxMaxLen as Integer = -1\r
 Public FilterAnchorLeft as Boolean = false  ' when matching text box values, should they match beginning of string (true) or anywhere in string (false)?
-Public UsingMinRico as Boolean = True       ' using minified version of Rico?\r
+Public UsingMinRico as Boolean = False      ' using minified version of Rico?\r
 Public defaultWidth as Integer = -1         ' if -1, then use unformatted column width, otherwise this is the default width in pixels\r
 Public defaultWidth as Integer = -1         ' if -1, then use unformatted column width, otherwise this is the default width in pixels\r
+Public allowColResize as Boolean = True\r
 Public menuEvent as String\r
 public rows as New ArrayList()\r
 public FrozenCols as Integer\r
 Public menuEvent as String\r
 public rows as New ArrayList()\r
 public FrozenCols as Integer\r
@@ -189,7 +190,7 @@ Public Sub SetCellAttr(ByVal name as String, ByVal value as String)
   rows(LastRow).SetCellAttr(name,value)\r
 End Sub\r
 \r
   rows(LastRow).SetCellAttr(name,value)\r
 End Sub\r
 \r
-Private Function RenderColumns(writer as HTMLTextWriter, c1 as Integer, c2 as Integer)\r
+Private Sub RenderColumns(writer as HTMLTextWriter, c1 as Integer, c2 as Integer)\r
   dim r as Integer, c as Integer\r
   for c=c1 to c2\r
     writer.Write("<td><div class='ricoLG_col'>")\r
   dim r as Integer, c as Integer\r
   for c=c1 to c2\r
     writer.Write("<td><div class='ricoLG_col'>")\r
@@ -198,7 +199,7 @@ Private Function RenderColumns(writer as HTMLTextWriter, c1 as Integer, c2 as In
     next\r
     writer.WriteLine("</div></td>")\r
   next\r
     next\r
     writer.WriteLine("</div></td>")\r
   next\r
-End Function\r
+End Sub\r
 \r
 <TemplateContainer(GetType(GridContainer))> _\r
 Public Property GridColumns() As ITemplate\r
 \r
 <TemplateContainer(GetType(GridContainer))> _\r
 Public Property GridColumns() As ITemplate\r
@@ -210,9 +211,25 @@ Public Property GridColumns() As ITemplate
   End Set\r
 End Property\r
 \r
   End Set\r
 End Property\r
 \r
+' returns true if there is a valid heading\r
+Private Sub CheckHeading()\r
+  if not IsNothing(ResizeRowIdx) then exit sub\r
+  rows.Insert(0, new SimpleGridRow())\r
+  LastHeadingRow=0\r
+  ResizeRowIdx=0\r
+  Dim c as Integer\r
+  for c=0 to columns.count-1\r
+    rows(0).AddCell( CType(columns(c),GridColumn).heading )\r
+  next\r
+End Sub\r
+\r
+Private function FmtBool(b)\r
+  if b then FmtBool="true" else FmtBool="false"\r
+end function\r
+\r
 Protected Overrides Sub Render(writer as HTMLTextWriter)\r
   dim colcnt as Integer, r as Integer, c as Integer\r
 Protected Overrides Sub Render(writer as HTMLTextWriter)\r
   dim colcnt as Integer, r as Integer, c as Integer\r
-  if IsNothing(ResizeRowIdx) then exit sub\r
+  CheckHeading\r
   colcnt=rows(ResizeRowIdx).CellCount\r
   \r
   writer.WriteLine("<script type='text/javascript'>")\r
   colcnt=rows(ResizeRowIdx).CellCount\r
   \r
   writer.WriteLine("<script type='text/javascript'>")\r
@@ -226,6 +243,7 @@ Protected Overrides Sub Render(writer as HTMLTextWriter)
   if FilterAnchorLeft           then writer.WriteLine("    FilterAnchorLeft: " & lcase(FilterAnchorLeft) & ",")\r
   if defaultWidth > 0           then writer.WriteLine("    defaultWidth: " & defaultWidth & ",")\r
   if not IsNothing(menuEvent)   then writer.WriteLine("    menuEvent: '" & menuEvent & "',")\r
   if FilterAnchorLeft           then writer.WriteLine("    FilterAnchorLeft: " & lcase(FilterAnchorLeft) & ",")\r
   if defaultWidth > 0           then writer.WriteLine("    defaultWidth: " & defaultWidth & ",")\r
   if not IsNothing(menuEvent)   then writer.WriteLine("    menuEvent: '" & menuEvent & "',")\r
+  writer.WriteLine("    allowColResize: " & FmtBool(allowColResize) & "," & vbCrLf)\r
   writer.WriteLine("    columnSpecs: [")\r
   for c=0 to columns.count-1\r
     if c > 0 then writer.WriteLine(",")\r
   writer.WriteLine("    columnSpecs: [")\r
   for c=0 to columns.count-1\r
     if c > 0 then writer.WriteLine(",")\r
@@ -238,12 +256,11 @@ Protected Overrides Sub Render(writer as HTMLTextWriter)
   writer.WriteLine("});")\r
   writer.WriteLine("</script>")\r
   \r
   writer.WriteLine("});")\r
   writer.WriteLine("</script>")\r
   \r
-  writer.Write("<div id='" & Me.UniqueId & "_outerDiv'>")\r
+  writer.Write("<div id='" & Me.UniqueId & "_outerDiv'><table id='" & Me.UniqueId & "' border='0' cellspacing='0' cellpadding='0'><tr valign='top'><td rowspan='2'>")\r
 \r
   '-------------------\r
   ' frozen columns\r
   '-------------------\r
 \r
   '-------------------\r
   ' frozen columns\r
   '-------------------\r
-  writer.WriteLine("<div id='" & Me.UniqueId & "_frozenTabsDiv'>")\r
 \r
   ' upper left\r
   writer.WriteLine("<table id='" & Me.UniqueId & "_tab0h' class='ricoLG_table ricoLG_top ricoLG_left' cellspacing='0' cellpadding='0'><thead>")\r
 \r
   ' upper left\r
   writer.WriteLine("<table id='" & Me.UniqueId & "_tab0h' class='ricoLG_table ricoLG_top ricoLG_left' cellspacing='0' cellpadding='0'><thead>")\r
@@ -251,19 +268,21 @@ Protected Overrides Sub Render(writer as HTMLTextWriter)
     writer.Write("<tr class='" & rows(r).HeadingClass() & "'")\r
     if r=ResizeRowIdx then writer.Write(" id='" & Me.UniqueId & "_tab0h_main'")\r
     writer.WriteLine(">")\r
     writer.Write("<tr class='" & rows(r).HeadingClass() & "'")\r
     if r=ResizeRowIdx then writer.Write(" id='" & Me.UniqueId & "_tab0h_main'")\r
     writer.WriteLine(">")\r
-    writer.Write(rows(r).HeadingRow(0,FrozenCols-1))\r
+    if FrozenCols > 0 then writer.Write(rows(r).HeadingRow(0,FrozenCols-1))\r
     writer.Write("</tr>")\r
   next\r
   writer.WriteLine("</thead></table>")\r
 \r
     writer.Write("</tr>")\r
   next\r
   writer.WriteLine("</thead></table>")\r
 \r
+  writer.WriteLine("<div id='" & Me.UniqueId & "_frozenTabsDiv'>")\r
+\r
   ' lower left\r
   writer.Write("<table id='" & Me.UniqueId & "_tab0' class='ricoLG_table ricoLG_bottom ricoLG_left' cellspacing='0' cellpadding='0'>")\r
   writer.WriteLine("<tr>")\r
   ' lower left\r
   writer.Write("<table id='" & Me.UniqueId & "_tab0' class='ricoLG_table ricoLG_bottom ricoLG_left' cellspacing='0' cellpadding='0'>")\r
   writer.WriteLine("<tr>")\r
-  RenderColumns(writer,0,FrozenCols-1)\r
+  if FrozenCols > 0 then RenderColumns(writer,0,FrozenCols-1)\r
   writer.Write("</tr>")\r
   writer.WriteLine("</table>")\r
 \r
   writer.Write("</tr>")\r
   writer.WriteLine("</table>")\r
 \r
-  writer.WriteLine("</div>")\r
+  writer.WriteLine("</div></td>")\r
 \r
 \r
   '-------------------\r
 \r
 \r
   '-------------------\r
@@ -271,8 +290,8 @@ Protected Overrides Sub Render(writer as HTMLTextWriter)
   '-------------------\r
 \r
   ' upper right\r
   '-------------------\r
 \r
   ' upper right\r
-  writer.Write("<div id='" & Me.UniqueId & "_innerDiv'>")\r
-  writer.Write("<div id='" & Me.UniqueId & "_scrollTabsDiv'>")\r
+  writer.Write("<td><div id='" & Me.UniqueId & "_innerDiv'>")\r
+  'writer.Write("<div id='" & Me.UniqueId & "_scrollTabsDiv'>")\r
   writer.WriteLine("<table id='" & Me.UniqueId & "_tab1h' class='ricoLG_table ricoLG_top ricoLG_right' cellspacing='0' cellpadding='0'><thead>")\r
   for r=0 to LastHeadingRow\r
     writer.Write("<tr class='" & rows(r).HeadingClass & "'")\r
   writer.WriteLine("<table id='" & Me.UniqueId & "_tab1h' class='ricoLG_table ricoLG_top ricoLG_right' cellspacing='0' cellpadding='0'><thead>")\r
   for r=0 to LastHeadingRow\r
     writer.Write("<tr class='" & rows(r).HeadingClass & "'")\r
@@ -282,19 +301,19 @@ Protected Overrides Sub Render(writer as HTMLTextWriter)
     writer.Write("</tr>")\r
   next\r
   writer.Write("</thead></table>")\r
     writer.Write("</tr>")\r
   next\r
   writer.Write("</thead></table>")\r
-  writer.Write("</div>")\r
-  writer.WriteLine("</div>")\r
+  'writer.Write("</div>")\r
+  writer.WriteLine("</div></td></tr>")\r
 \r
   ' lower right\r
 \r
   ' lower right\r
-  writer.Write("<div id='" & Me.UniqueId & "_scrollDiv'>")\r
+  writer.Write("<tr valign='top'><td><div id='" & Me.UniqueId & "_scrollDiv'>")\r
   writer.Write("<table id='" & Me.UniqueId & "_tab1' class='ricoLG_table ricoLG_bottom ricoLG_right' cellspacing='0' cellpadding='0'>")\r
   writer.WriteLine("<tr>")\r
   RenderColumns(writer,FrozenCols,colcnt-1)\r
   writer.Write("</tr>")\r
   writer.Write("</table>")\r
   writer.Write("<table id='" & Me.UniqueId & "_tab1' class='ricoLG_table ricoLG_bottom ricoLG_right' cellspacing='0' cellpadding='0'>")\r
   writer.WriteLine("<tr>")\r
   RenderColumns(writer,FrozenCols,colcnt-1)\r
   writer.Write("</tr>")\r
   writer.Write("</table>")\r
-  writer.Write("</div>")\r
+  writer.Write("</div></td></tr>")\r
 \r
 \r
-  writer.WriteLine("</div>")\r
+  writer.WriteLine("</table></div>")\r
 End Sub\r
 \r
 ' Response.Buffer must be true\r
 End Sub\r
 \r
 ' Response.Buffer must be true\r
@@ -306,6 +325,7 @@ Public Sub RenderExcel(fileName)
   if fileName<>"" then HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" & fileName)\r
   HttpContext.Current.Response.ContentType = "application/ms-excel"\r
 \r
   if fileName<>"" then HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" & fileName)\r
   HttpContext.Current.Response.ContentType = "application/ms-excel"\r
 \r
+  CheckHeading\r
   sw.WriteLine("<table>")\r
   for r=0 to rows.count-1\r
     sw.WriteLine("<tr>")\r
   sw.WriteLine("<table>")\r
   for r=0 to rows.count-1\r
     sw.WriteLine("<tr>")\r
@@ -314,7 +334,7 @@ Public Sub RenderExcel(fileName)
     next\r
     sw.WriteLine("</tr>")\r
   next\r
     next\r
     sw.WriteLine("</tr>")\r
   next\r
-  sw.WriteLine("</table>")\r
+  sw.WriteLine("</table></div>")\r
   HttpContext.Current.Response.Write(sw.ToString)\r
   HttpContext.Current.Response.End()\r
 End Sub\r
   HttpContext.Current.Response.Write(sw.ToString)\r
   HttpContext.Current.Response.End()\r
 End Sub\r
@@ -328,6 +348,7 @@ Public Sub RenderDelimited(fileName,delim,SubstituteChar)
   if fileName<>"" then HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" & fileName)\r
   HttpContext.Current.Response.ContentType = "text/csv"\r
 \r
   if fileName<>"" then HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=" & fileName)\r
   HttpContext.Current.Response.ContentType = "text/csv"\r
 \r
+  CheckHeading\r
   for r=0 to rows.count-1\r
     for c=0 to rows(r).CellCount()-1\r
       if c > 0 then sw.Write(delim)\r
   for r=0 to rows.count-1\r
     for c=0 to rows(r).CellCount()-1\r
       if c > 0 then sw.Write(delim)\r
index e525624..819eeb6 100644 (file)
@@ -76,13 +76,24 @@ Public Function UnparseSelectDistinct() As String
 end Function\r
 \r
 \r
 end Function\r
 \r
 \r
-Public Function UnparseDistinctColumn(colnum as integer) As String\r
+' MS Access does not support ordering by column name\r
+Public Function UnparseDistinctColumnAccess(colnum as integer) As String\r
   dim sqltext As String\r
   sqltext="SELECT DISTINCT " & SelectList(colnum).sql & " FROM " & FromClause\r
   if not IsNothing(WhereClause) then sqltext &= " WHERE " & WhereClause\r
   Headings.Clear()\r
   Headings.Add(SelectList(colnum).name)\r
   dim sqltext As String\r
   sqltext="SELECT DISTINCT " & SelectList(colnum).sql & " FROM " & FromClause\r
   if not IsNothing(WhereClause) then sqltext &= " WHERE " & WhereClause\r
   Headings.Clear()\r
   Headings.Add(SelectList(colnum).name)\r
-  UnparseDistinctColumn=sqltext\r
+  UnparseDistinctColumnAccess=sqltext & " ORDER BY " & SelectList(colnum).sql\r
+end Function\r
+\r
+\r
+Public Function UnparseDistinctColumn(colnum as integer) As String\r
+  dim sqltext As String\r
+  sqltext="SELECT DISTINCT " & SelectList(colnum).sql & " as col1 FROM " & FromClause\r
+  if not IsNothing(WhereClause) then sqltext &= " WHERE " & WhereClause\r
+  Headings.Clear()\r
+  Headings.Add(SelectList(colnum).name)\r
+  UnparseDistinctColumn=sqltext & " ORDER BY col1"\r
 end Function\r
 \r
 \r
 end Function\r
 \r
 \r
index 14ccc3f..9dce42b 100644 (file)
@@ -855,7 +855,7 @@ class dbClass
 // -------------------------------------------------------------\r
   function dbClass()\r
   {\r
 // -------------------------------------------------------------\r
   function dbClass()\r
   {\r
-    $this->Provider="localhost";\r
+    $this->Provider="127.0.0.1";\r
     $this->debug=false;\r
     $this->ConnTimeout=30; // seconds\r
     $this->LockTimeout=5000; // milliseconds\r
     $this->debug=false;\r
     $this->ConnTimeout=30; // seconds\r
     $this->LockTimeout=5000; // milliseconds\r
@@ -932,9 +932,10 @@ class dbClass
     $this->Dialect="MySQL";\r
     $this->dbDefault = $DefDB;\r
     $this->dbMain = mysql_connect($this->Provider,$userid,$pw);\r
     $this->Dialect="MySQL";\r
     $this->dbDefault = $DefDB;\r
     $this->dbMain = mysql_connect($this->Provider,$userid,$pw);\r
-    mysql_select_db($DefDB,$this->dbMain);\r
     $this->db =& new dbClass_mysql($this->dbMain);\r
     $this->db =& new dbClass_mysql($this->dbMain);\r
-    if ($this->CheckForError("opening connection")) return false;\r
+    if ($this->CheckForError("opening connection to " . $this->Provider)) return false;\r
+    mysql_select_db($DefDB,$this->dbMain);\r
+    if ($this->CheckForError("selecting database " . $DefDB)) return false;\r
     return true;\r
   }\r
 \r
     return true;\r
   }\r
 \r
index f14d371..4a02c77 100644 (file)
@@ -7,14 +7,25 @@ www.456bereastreet.com
   font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;\r
 }\r
 \r
   font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;\r
 }\r
 \r
-.ricoLG_table {\r
+div.ricoLG_outerDiv div.ricoLG_cell, div.ricoLG_outerDiv div.ricoLG_cell *, div.ricoLG_keywordDiv *, table.ricoLiveGrid td, table.ricoLiveGrid th  {\r
+  font-size: 11px;\r
+  color:#000;\r
+}\r
+\r
+.ricoLG_top {\r
   border-top:1px solid #523A0B !important;\r
   border-top:1px solid #523A0B !important;\r
+}\r
+\r
+.ricoLG_table thead tr:last-child   td {\r
+  border-bottom:1px solid #523A0B !important;\r
+}\r
+\r
+.ricoLG_table thead * {\r
   border-right:none;\r
   border-right:none;\r
-  color:#000;\r
 }\r
 tr.ricoLG_hdg .ricoLG_cell, tr.ricoLG_hdg th, tr.ricoLG_hdg td {  /* td/th required for IE */\r
   background:#EBE5D9 !important;\r
 }\r
 tr.ricoLG_hdg .ricoLG_cell, tr.ricoLG_hdg th, tr.ricoLG_hdg td {  /* td/th required for IE */\r
   background:#EBE5D9 !important;\r
-  line-height:normal;\r
+  height:1.5em;\r
   text-align:left;\r
 }\r
 \r
   text-align:left;\r
 }\r
 \r
@@ -34,9 +45,11 @@ tr.ricoLG_hdg th, tr.ricoLG_hdg td {
 tr.ricoLG_hdg div.ricoLG_cell {\r
   background:#EBE5D9;\r
   font-weight:bold;\r
 tr.ricoLG_hdg div.ricoLG_cell {\r
   background:#EBE5D9;\r
   font-weight:bold;\r
-  padding:0.5em 0 0.5em 0.5em;\r
 }\r
 }\r
-div.ricoLG_outerDiv table a {\r
+div.ricoLG_cell {\r
+  padding:0.25em 0.5em;\r
+}\r
+div.ricoLG_outerDiv a {\r
   color:#523A0B;\r
   text-decoration:none;\r
   border-bottom:1px dotted;\r
   color:#523A0B;\r
   text-decoration:none;\r
   border-bottom:1px dotted;\r
@@ -74,13 +87,13 @@ a.RicoButton.hover {
 \r
 .ricoWindow {\r
   border: 1px solid #523A0B;\r
 \r
 .ricoWindow {\r
   border: 1px solid #523A0B;\r
-  background-color: #ffffee;\r
+  background-color: #fffff8;\r
 }\r
 .ricoTitle  {\r
   background-color: #EBE5D9;\r
   border-bottom: 1px solid #523A0B;\r
   color: #000;\r
 }\r
 .ricoTitle  {\r
   background-color: #EBE5D9;\r
   border-bottom: 1px solid #523A0B;\r
   color: #000;\r
-  font-weight: normal;\r
+  font-weight: bold;\r
   font-size:11pt;\r
 }\r
 \r
   font-size:11pt;\r
 }\r
 \r
index 5d67fa9..05916ee 100644 (file)
@@ -9,29 +9,20 @@ div.ricoLG_outerDiv *, div.ricoLG_outerDiv div.ricoLG_cell, div.ricoLG_editDiv *
 \r
 div.ricoLG_outerDiv div.ricoLG_cell, div.ricoLG_outerDiv div.ricoLG_cell *, div.ricoLG_keywordDiv *, table.ricoLiveGrid td, table.ricoLiveGrid th  {\r
   font-size: 11px;\r
 \r
 div.ricoLG_outerDiv div.ricoLG_cell, div.ricoLG_outerDiv div.ricoLG_cell *, div.ricoLG_keywordDiv *, table.ricoLiveGrid td, table.ricoLiveGrid th  {\r
   font-size: 11px;\r
-}\r
-\r
-.ricoLG_table {\r
-       border-top: 1px solid #CCC;\r
-       border-right: 1px solid #CCC;\r
+  font-weight: normal;\r
 }\r
 \r
 tr.ricoLG_hdg th, tr.ricoLG_hdg td, table.ricoLiveGrid thead td, table.ricoLiveGrid thead th {\r
 }\r
 \r
 tr.ricoLG_hdg th, tr.ricoLG_hdg td, table.ricoLiveGrid thead td, table.ricoLiveGrid thead th {\r
-       background-color: #FFF !important;\r
+  background-color: #FFF !important;\r
   background: url(../images/grayedout.gif) #FFF repeat-x scroll center left;\r
   background: url(../images/grayedout.gif) #FFF repeat-x scroll center left;\r
-  border-bottom: 1px solid #CCC;\r
-}\r
-\r
-.ricoLG_table th, .ricoLG_table td {\r
-       border-left: 1px solid #CCC;\r
 }\r
 \r
 }\r
 \r
-.ricoLG_bottom th, .ricoLG_bottom td {\r
-       border-bottom: 1px solid #CCC;\r
+.ricoLG_bottom div.ricoLG_cell, table.ricoLG_top, table.ricoLG_top thead th, table.ricoLG_top thead td, table.ricoLiveGrid td, table.ricoLiveGrid th, .ricoLG_bottom th, .ricoLG_bottom td {\r
+  border-color: #CCC !important;\r
 }\r
 \r
 div.ricoLG_outerDiv .ricoLG_bottom div.ricoLG_cell {\r
 }\r
 \r
 div.ricoLG_outerDiv .ricoLG_bottom div.ricoLG_cell {\r
-  border-bottom: none;\r
+/*  border-bottom: none; */\r
   padding: 5px;\r
 }\r
 \r
   padding: 5px;\r
 }\r
 \r
@@ -40,18 +31,18 @@ tr.ricoLG_hdg .ricoLG_cell {
 }\r
 \r
 div.ricoLG_outerDiv a:visited, div.ricoLG_outerDiv a:link {\r
 }\r
 \r
 div.ricoLG_outerDiv a:visited, div.ricoLG_outerDiv a:link {\r
-       color: #009;\r
-       text-decoration: none;\r
+  color: #009;\r
+  text-decoration: none;\r
 }\r
 \r
 div.ricoLG_outerDiv a:hover {\r
 }\r
 \r
 div.ricoLG_outerDiv a:hover {\r
-       color: #009;\r
-       text-decoration: underline;\r
+  color: #009;\r
+  text-decoration: underline;\r
 }\r
 \r
 div.ricoLG_selection {\r
 }\r
 \r
 div.ricoLG_selection {\r
-       background-color: #999;\r
-       color: #FFF;\r
+  background-color: #999;\r
+  color: #FFF;\r
 }\r
 \r
 div.ricoLG_messageDiv {\r
 }\r
 \r
 div.ricoLG_messageDiv {\r
@@ -61,9 +52,9 @@ div.ricoLG_messageDiv {
 }\r
 \r
 div.ricoLG_highlightDiv {\r
 }\r
 \r
 div.ricoLG_highlightDiv {\r
-       border-color: #999;\r
+  border-color: #999;\r
 }\r
 }\r
-       \r
+\r
 a.RicoButton {\r
   background-color: #999;\r
   color: #FFF;\r
 a.RicoButton {\r
   background-color: #999;\r
   color: #FFF;\r
@@ -73,21 +64,21 @@ a.RicoButton.hover {
 }\r
 \r
 caption {\r
 }\r
 \r
 caption {\r
-       text-align: left;\r
-       font-size: 100%;\r
-       padding: .75em;\r
-       color: #000;\r
+  text-align: left;\r
+  font-size: 100%;\r
+  padding: .75em;\r
+  color: #000;\r
 }\r
 \r
 .ricoWindow {\r
   border: 1px solid #CCC;\r
   font-size: 11px;\r
 }\r
 \r
 .ricoWindow {\r
   border: 1px solid #CCC;\r
   font-size: 11px;\r
-       background-color: #F8F8F8;\r
+  background-color: #FCFCFC;\r
 }\r
 .ricoTitle  {\r
   background: url(../images/grayedout.gif) #FFF repeat-x scroll center left;\r
   border-bottom: 1px solid #CCC;\r
 }\r
 .ricoTitle  {\r
   background: url(../images/grayedout.gif) #FFF repeat-x scroll center left;\r
   border-bottom: 1px solid #CCC;\r
-       color: #000;\r
+  color: #000;\r
   font-weight: bold;\r
   font-size: 11px;\r
 }\r
   font-weight: bold;\r
   font-size: 11px;\r
 }\r
@@ -96,11 +87,11 @@ caption {
   background: #999;\r
   cursor: auto;\r
 }\r
   background: #999;\r
   cursor: auto;\r
 }\r
-.Rico_tabContent {\r
-  background: #FFF;\r
+.Rico_tabContent, .noTabContent {\r
+  background: #F8F8F8;\r
 }\r
 \r
 }\r
 \r
-.Rico_tabContentContainer {\r
+.Rico_tabContentContainer, .noTabContent {\r
   border : 1px solid #999;\r
 }\r
 .Rico_tabTitle {\r
   border : 1px solid #999;\r
 }\r
 .Rico_tabTitle {\r
index 3856b8e..3e241f3 100644 (file)
@@ -48,11 +48,11 @@ a.RicoButton.hover {
   background: #cedebd;\r
   cursor: auto;\r
 }\r
   background: #cedebd;\r
   cursor: auto;\r
 }\r
-.Rico_tabContent {\r
-    background: #f8f8f8;\r
+.Rico_tabContent, .noTabContent {\r
+    background: #e7efde;\r
 }\r
 \r
 }\r
 \r
-.Rico_tabContentContainer {\r
+.Rico_tabContentContainer, .noTabContent {\r
   border : 1px solid #4f4f4f;\r
 }\r
 .Rico_tabTitle {\r
   border : 1px solid #4f4f4f;\r
 }\r
 .Rico_tabTitle {\r
diff --git a/ricoClient/css/jquery-base/images/ui-bg_flat_0_aaaaaa_40x100.png b/ricoClient/css/jquery-base/images/ui-bg_flat_0_aaaaaa_40x100.png
deleted file mode 100644 (file)
index 5b5dab2..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-bg_flat_0_aaaaaa_40x100.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-bg_flat_75_ffffff_40x100.png b/ricoClient/css/jquery-base/images/ui-bg_flat_75_ffffff_40x100.png
deleted file mode 100644 (file)
index ac8b229..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-bg_flat_75_ffffff_40x100.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-bg_glass_55_fbf9ee_1x400.png b/ricoClient/css/jquery-base/images/ui-bg_glass_55_fbf9ee_1x400.png
deleted file mode 100644 (file)
index ad3d634..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-bg_glass_55_fbf9ee_1x400.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-bg_glass_65_ffffff_1x400.png b/ricoClient/css/jquery-base/images/ui-bg_glass_65_ffffff_1x400.png
deleted file mode 100644 (file)
index 42ccba2..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-bg_glass_75_dadada_1x400.png b/ricoClient/css/jquery-base/images/ui-bg_glass_75_dadada_1x400.png
deleted file mode 100644 (file)
index 5a46b47..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-bg_glass_75_dadada_1x400.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-bg_glass_75_e6e6e6_1x400.png b/ricoClient/css/jquery-base/images/ui-bg_glass_75_e6e6e6_1x400.png
deleted file mode 100644 (file)
index 86c2baa..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-bg_glass_75_e6e6e6_1x400.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-bg_glass_95_fef1ec_1x400.png b/ricoClient/css/jquery-base/images/ui-bg_glass_95_fef1ec_1x400.png
deleted file mode 100644 (file)
index 4443fdc..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-bg_glass_95_fef1ec_1x400.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/ricoClient/css/jquery-base/images/ui-bg_highlight-soft_75_cccccc_1x100.png
deleted file mode 100644 (file)
index 7c9fa6c..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-bg_highlight-soft_75_cccccc_1x100.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-icons_222222_256x240.png b/ricoClient/css/jquery-base/images/ui-icons_222222_256x240.png
deleted file mode 100644 (file)
index ee039dc..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-icons_222222_256x240.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-icons_2e83ff_256x240.png b/ricoClient/css/jquery-base/images/ui-icons_2e83ff_256x240.png
deleted file mode 100644 (file)
index 45e8928..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-icons_2e83ff_256x240.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-icons_454545_256x240.png b/ricoClient/css/jquery-base/images/ui-icons_454545_256x240.png
deleted file mode 100644 (file)
index 7ec70d1..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-icons_454545_256x240.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-icons_888888_256x240.png b/ricoClient/css/jquery-base/images/ui-icons_888888_256x240.png
deleted file mode 100644 (file)
index 5ba708c..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-icons_888888_256x240.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/images/ui-icons_cd0a0a_256x240.png b/ricoClient/css/jquery-base/images/ui-icons_cd0a0a_256x240.png
deleted file mode 100644 (file)
index 7930a55..0000000
Binary files a/ricoClient/css/jquery-base/images/ui-icons_cd0a0a_256x240.png and /dev/null differ
diff --git a/ricoClient/css/jquery-base/ui.accordion.css b/ricoClient/css/jquery-base/ui.accordion.css
deleted file mode 100644 (file)
index ee1b1b6..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Accordion
-----------------------------------*/
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
-.ui-accordion .ui-accordion-li-fix { display: inline; }
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; }
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; }
-.ui-accordion .ui-accordion-content-active { display: block; }
\ No newline at end of file
diff --git a/ricoClient/css/jquery-base/ui.base.css b/ricoClient/css/jquery-base/ui.base.css
deleted file mode 100644 (file)
index 58f5587..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-@import url("ui.core.css");
-@import url("ui.accordion.css");
-@import url("ui.dialog.css");
-@import url("ui.tabs.css");
-@import url("ui.datepicker.css");
\ No newline at end of file
diff --git a/ricoClient/css/jquery-base/ui.core.css b/ricoClient/css/jquery-base/ui.core.css
deleted file mode 100644 (file)
index c2f18f2..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-* jQuery UI CSS Framework
-* Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about)
-* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
-*/
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
\ No newline at end of file
diff --git a/ricoClient/css/jquery-base/ui.datepicker.css b/ricoClient/css/jquery-base/ui.datepicker.css
deleted file mode 100644 (file)
index 567f8c9..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/* Datepicker
-----------------------------------*/
-.ui-datepicker { width: 17em; padding: .2em .2em 0; }
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
-.ui-datepicker .ui-datepicker-next-hover { right:1px; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px;  }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
-.ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month, 
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; }
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
-    display: none; /*sorry for IE5*/
-    display/**/: block; /*sorry for IE5*/
-    position: absolute; /*must have*/
-    z-index: -1; /*must have*/
-    filter: mask(); /*must have*/
-    top: -4px; /*must have*/
-    left: -4px; /*must have*/
-    width: 200px; /*must have*/
-    height: 200px; /*must have*/
-}
\ No newline at end of file
diff --git a/ricoClient/css/jquery-base/ui.dialog.css b/ricoClient/css/jquery-base/ui.dialog.css
deleted file mode 100644 (file)
index 2997595..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Dialog
-----------------------------------*/
-.ui-dialog { position: relative; padding: .2em; width: 300px; }
-.ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative;  }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } 
-.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
-.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
-.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
-.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
diff --git a/ricoClient/css/jquery-base/ui.tabs.css b/ricoClient/css/jquery-base/ui.tabs.css
deleted file mode 100644 (file)
index 3ca6b9a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Tabs
-----------------------------------*/
-.ui-tabs { padding: .2em; zoom: 1; }
-.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; }
-.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; }
-.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
-.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
index 66c93a7..46586ed 100644 (file)
@@ -4,7 +4,7 @@
 \r
 /* LiveGrid & SimpleGrid */\r
  \r
 \r
 /* LiveGrid & SimpleGrid */\r
  \r
-div.ricoLG_outerDiv {\r
+.ricoLG_outerDiv {\r
   position:relative;\r
 }\r
 \r
   position:relative;\r
 }\r
 \r
@@ -12,8 +12,7 @@ div.ricoLG_innerDiv, div.ricoLG_frozenTabsDiv {
   overflow:hidden;\r
   margin:0px;\r
   padding:0px;\r
   overflow:hidden;\r
   margin:0px;\r
   padding:0px;\r
-  position:absolute;\r
-  top:0px;\r
+  position:relative;\r
 }\r
 \r
 div.ricoLG_scrollDiv {\r
 }\r
 \r
 div.ricoLG_scrollDiv {\r
@@ -21,9 +20,15 @@ div.ricoLG_scrollDiv {
   position:relative;\r
 }\r
 \r
   position:relative;\r
 }\r
 \r
-div.ricoLG_scrollTabsDiv {\r
+div.ricoLG_scrollContainerDiv {\r
+  position:relative;\r
+}\r
+\r
+div.ricoLG_scrollTabDiv {\r
   position:absolute;\r
   position:absolute;\r
+  left:0px;\r
   top:0px;\r
   top:0px;\r
+  overflow:hidden;\r
 }\r
 \r
 div.ricoLG_resizeDiv {\r
 }\r
 \r
 div.ricoLG_resizeDiv {\r
@@ -43,13 +48,13 @@ div.ricoLG_highlightDiv {
   margin: 0px;\r
   padding: 0px;\r
   border-right: 1px solid silver;\r
   margin: 0px;\r
   padding: 0px;\r
   border-right: 1px solid silver;\r
-  border-top: 1px solid silver;\r
   border-left-width: 0px;  /* for dojo */\r
 }\r
 \r
 .ricoLG_FilterRow  div.ricoLG_cell {\r
   height:1.6em;\r
   line-height: 1.6em;\r
   border-left-width: 0px;  /* for dojo */\r
 }\r
 \r
 .ricoLG_FilterRow  div.ricoLG_cell {\r
   height:1.6em;\r
   line-height: 1.6em;\r
+  white-space: nowrap;\r
 }\r
 \r
 .ricoLG_FilterRow  div.ricoLG_cell {\r
 }\r
 \r
 .ricoLG_FilterRow  div.ricoLG_cell {\r
@@ -82,7 +87,7 @@ tr.ricoLG_mFilter_oddrow {
   background-color: #EEE;\r
 }\r
 \r
   background-color: #EEE;\r
 }\r
 \r
-table.ricoLG_bottom, table.ricoLiveGrid td, table.ricoLiveGrid th {\r
+table.ricoLG_bottom {\r
   border-top-style: none;\r
 }\r
 \r
   border-top-style: none;\r
 }\r
 \r
@@ -93,11 +98,11 @@ div.ricoLG_col {
   width:100px;\r
 }\r
 \r
   width:100px;\r
 }\r
 \r
-.ricoLG_top div.ricoLG_col {\r
+table.ricoLG_top thead div.ricoLG_col {\r
   position:relative;\r
 }\r
 \r
   position:relative;\r
 }\r
 \r
-.ricoLG_top div.ricoLG_Resize {\r
+table.ricoLG_top thead div.ricoLG_Resize {\r
   position:absolute;\r
   width:5px;\r
   height:100%;\r
   position:absolute;\r
   width:5px;\r
   height:100%;\r
@@ -141,12 +146,20 @@ div.ricoLG_col {
   border-width: 0px 0px 1px 0px;\r
 }\r
 \r
   border-width: 0px 0px 1px 0px;\r
 }\r
 \r
-.ricoLG_top th, .ricoLG_top td, table.ricoLiveGrid td, table.ricoLiveGrid th {\r
+table.ricoLG_top, table.ricoLiveGrid  {\r
+  border-top: 1px solid silver;\r
+}\r
+\r
+table.ricoLG_top thead th, table.ricoLG_top thead td, table.ricoLiveGrid td, table.ricoLiveGrid th {\r
   border-style: solid;\r
   border-color: silver;\r
   border-width: 0px 0px 1px 1px;\r
 }\r
 \r
   border-style: solid;\r
   border-color: silver;\r
   border-width: 0px 0px 1px 1px;\r
 }\r
 \r
+* html table.ricoLG_top thead th, * html table.ricoLG_top thead td, * html table.ricoLiveGrid td, * html table.ricoLiveGrid th {\r
+  position: relative; /* IE6  only */\r
+}\r
+\r
 .ricoLG_bottom th, .ricoLG_bottom td {\r
   border-style: solid;\r
   border-color: silver;\r
 .ricoLG_bottom th, .ricoLG_bottom td {\r
   border-style: solid;\r
   border-color: silver;\r
@@ -203,12 +216,12 @@ span.ricoSessionTimer {
   color:white;\r
 }\r
 \r
   color:white;\r
 }\r
 \r
-.ricoLG_top input {\r
+table.ricoLG_top thead input {\r
   font-weight: normal;\r
   font-size: 8pt !important;\r
 }\r
 \r
   font-weight: normal;\r
   font-size: 8pt !important;\r
 }\r
 \r
-.ricoLG_top option, .ricoLG_top select {\r
+table.ricoLG_top thead option, table.ricoLG_top thead select {\r
   font-weight: normal;\r
   font-size: 9pt !important;\r
 }\r
   font-weight: normal;\r
   font-size: 9pt !important;\r
 }\r
@@ -430,6 +443,7 @@ a.RicoButton {
   position: absolute;\r
   top: 1px;\r
   right: 2px;\r
   position: absolute;\r
   top: 1px;\r
   right: 2px;\r
+  border: 0px none !important;\r
 }\r
 \r
 span.RicoCloseW {\r
 }\r
 \r
 span.RicoCloseW {\r
index 20d526d..51ae738 100644 (file)
@@ -8,7 +8,7 @@ div.ricoLG_outerDiv *, div.ricoLG_outerDiv div.ricoLG_cell, div.ricoLG_editDiv *
   font-family: Verdana, Arial, Helvetica, sans-serif;\r
 }\r
 \r
   font-family: Verdana, Arial, Helvetica, sans-serif;\r
 }\r
 \r
-.ricoLG_table {\r
+.ricoLG_table thead {\r
        border-top: 1px solid #84785e;\r
        border-right: 1px solid #84785e;\r
 }\r
        border-top: 1px solid #84785e;\r
        border-right: 1px solid #84785e;\r
 }\r
@@ -24,7 +24,7 @@ tr.ricoLG_hdg .ricoLG_cell, tr.ricoLG_hdg .ricoLG_cell a, tr.ricoLG_hdg .ricoLG_
 }\r
 \r
 .ricoLG_bottom div.ricoLG_cell, .ricoLG_top th, .ricoLG_top td {\r
 }\r
 \r
 .ricoLG_bottom div.ricoLG_cell, .ricoLG_top th, .ricoLG_top td {\r
-  border-bottom: 1px solid #84785e;\r
+  border-color: #84785e !important;\r
 }\r
 \r
 tr.ricoLG_hdg .ricoLG_cell {\r
 }\r
 \r
 tr.ricoLG_hdg .ricoLG_cell {\r
diff --git a/ricoClient/js/baselibs/README.TXT b/ricoClient/js/baselibs/README.TXT
new file mode 100644 (file)
index 0000000..32689cb
--- /dev/null
@@ -0,0 +1,5 @@
+The files in this directory are included in the Rico distribution\r
+for the purpose of demonstrating the examples. Each of these libraries \r
+has licensing terms that are different from Rico itself. Make sure you\r
+understand the terms before deploying any library into a production \r
+environment.
\ No newline at end of file
diff --git a/ricoClient/js/baselibs/dojo.debug.js b/ricoClient/js/baselibs/dojo.debug.js
deleted file mode 100644 (file)
index 7e0ae91..0000000
+++ /dev/null
@@ -1,11239 +0,0 @@
-/*
-       Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
-       Available via Academic Free License >= 2.1 OR the modified BSD license.
-       see: http://dojotoolkit.org/license for details
-*/
-
-/*
-       This is a compiled version of Dojo, built for deployment and not for
-       development. To get an editable version, please visit:
-
-               http://dojotoolkit.org
-
-       for documentation and information on getting the source.
-*/
-
-;(function(){
-
-       /*
-       dojo, dijit, and dojox must always be the first three, and in that order.
-       djConfig.scopeMap = [
-               ["dojo", "fojo"],
-               ["dijit", "fijit"],
-               ["dojox", "fojox"]
-       
-       ]
-       */
-
-       /**Build will replace this comment with a scoped djConfig **/
-
-       //The null below can be relaced by a build-time value used instead of djConfig.scopeMap.
-       var sMap = null;
-
-       //See if new scopes need to be defined.
-       if((sMap || (typeof djConfig != "undefined" && djConfig.scopeMap)) && (typeof window != "undefined")){
-               var scopeDef = "", scopePrefix = "", scopeSuffix = "", scopeMap = {}, scopeMapRev = {};
-               sMap = sMap || djConfig.scopeMap;
-               for(var i = 0; i < sMap.length; i++){
-                       //Make local variables, then global variables that use the locals.
-                       var newScope = sMap[i];
-                       scopeDef += "var " + newScope[0] + " = {}; " + newScope[1] + " = " + newScope[0] + ";" + newScope[1] + "._scopeName = '" + newScope[1] + "';";
-                       scopePrefix += (i == 0 ? "" : ",") + newScope[0];
-                       scopeSuffix += (i == 0 ? "" : ",") + newScope[1];
-                       scopeMap[newScope[0]] = newScope[1];
-                       scopeMapRev[newScope[1]] = newScope[0];
-               }
-
-               eval(scopeDef + "dojo._scopeArgs = [" + scopeSuffix + "];");
-
-               dojo._scopePrefixArgs = scopePrefix;
-               dojo._scopePrefix = "(function(" + scopePrefix + "){";
-               dojo._scopeSuffix = "})(" + scopeSuffix + ")";
-               dojo._scopeMap = scopeMap;
-               dojo._scopeMapRev = scopeMapRev;
-       }
-
-/*=====
-// note:
-//             'djConfig' does not exist under 'dojo.*' so that it can be set before the
-//             'dojo' variable exists.
-// note:
-//             Setting any of these variables *after* the library has loaded does
-//             nothing at all.
-
-djConfig = {
-       // summary:
-       //              Application code can set the global 'djConfig' prior to loading
-       //              the library to override certain global settings for how dojo works.
-       //
-       // isDebug: Boolean
-       //              Defaults to `false`. If set to `true`, ensures that Dojo provides
-       //              extended debugging feedback via Firebug. If Firebug is not available
-       //              on your platform, setting `isDebug` to `true` will force Dojo to
-       //              pull in (and display) the version of Firebug Lite which is
-       //              integrated into the Dojo distribution, thereby always providing a
-       //              debugging/logging console when `isDebug` is enabled. Note that
-       //              Firebug's `console.*` methods are ALWAYS defined by Dojo. If
-       //              `isDebug` is false and you are on a platform without Firebug, these
-       //              methods will be defined as no-ops.
-       isDebug: false,
-       // debugAtAllCosts: Boolean
-       //              Defaults to `false`. If set to `true`, this triggers an alternate
-       //              mode of the package system in which dependencies are detected and
-       //              only then are resources evaluated in dependency order via
-       //              `<script>` tag inclusion. This may double-request resources and
-       //              cause problems with scripts which expect `dojo.require()` to
-       //              preform synchronously. `debugAtAllCosts` can be an invaluable
-       //              debugging aid, but when using it, ensure that all code which
-       //              depends on Dojo modules is wrapped in `dojo.addOnLoad()` handlers.
-       //              Due to the somewhat unpredictable side-effects of using
-       //              `debugAtAllCosts`, it is strongly recommended that you enable this
-       //              flag as a last resort. `debugAtAllCosts` has no effect when loading
-       //              resources across domains. For usage information, see the
-       //              [Dojo Book](http://dojotoolkit.org/book/book-dojo/part-4-meta-dojo-making-your-dojo-code-run-faster-and-better/debugging-facilities/deb)
-       debugAtAllCosts: false,
-       // locale: String
-       //              The locale to assume for loading localized resources in this page,
-       //              specified according to [RFC 3066](http://www.ietf.org/rfc/rfc3066.txt).
-       //              Must be specified entirely in lowercase, e.g. `en-us` and `zh-cn`.
-       //              See the documentation for `dojo.i18n` and `dojo.requireLocalization`
-       //              for details on loading localized resources. If no locale is specified,
-       //              Dojo assumes the locale of the user agent, according to `navigator.userLanguage`
-       //              or `navigator.language` properties.
-       locale: undefined,
-       // extraLocale: Array
-       //              No default value. Specifies additional locales whose
-       //              resources should also be loaded alongside the default locale when
-       //              calls to `dojo.requireLocalization()` are processed.
-       extraLocale: undefined,
-       // baseUrl: String
-       //              The directory in which `dojo.js` is located. Under normal
-       //              conditions, Dojo auto-detects the correct location from which it
-       //              was loaded. You may need to manually configure `baseUrl` in cases
-       //              where you have renamed `dojo.js` or in which `<base>` tags confuse
-       //              some browsers (e.g. IE 6). The variable `dojo.baseUrl` is assigned
-       //              either the value of `djConfig.baseUrl` if one is provided or the
-       //              auto-detected root if not. Other modules are located relative to
-       //              this path. The path should end in a slash.
-       baseUrl: undefined,
-       // modulePaths: Object
-       //              A map of module names to paths relative to `dojo.baseUrl`. The
-       //              key/value pairs correspond directly to the arguments which
-       //              `dojo.registerModulePath` accepts. Specifiying
-       //              `djConfig.modulePaths = { "foo": "../../bar" }` is the equivalent
-       //              of calling `dojo.registerModulePath("foo", "../../bar");`. Multiple
-       //              modules may be configured via `djConfig.modulePaths`.
-       modulePaths: {},
-       // afterOnLoad: Boolean 
-       //              Indicates Dojo was added to the page after the page load. In this case
-       //              Dojo will not wait for the page DOMContentLoad/load events and fire
-       //              its dojo.addOnLoad callbacks after making sure all outstanding
-       //              dojo.required modules have loaded. Only works with a built dojo.js,
-       //              it does not work the dojo.js directly from source control.
-       afterOnLoad: false,
-       // addOnLoad: Function or Array
-       //              Adds a callback via dojo.addOnLoad. Useful when Dojo is added after
-       //              the page loads and djConfig.afterOnLoad is true. Supports the same
-       //              arguments as dojo.addOnLoad. When using a function reference, use
-       //              `djConfig.addOnLoad = function(){};`. For object with function name use
-       //              `djConfig.addOnLoad = [myObject, "functionName"];` and for object with
-       //              function reference use
-       //              `djConfig.addOnLoad = [myObject, function(){}];`
-       addOnLoad: null,
-       // require: Array
-       //              An array of module names to be loaded immediately after dojo.js has been included
-       //              in a page.
-       require: [],
-       // defaultDuration: Array
-       //              Default duration, in milliseconds, for wipe and fade animations within dijits.
-       //              Assigned to dijit.defaultDuration.
-       defaultDuration: 200,
-       // dojoBlankHtmlUrl: String
-       //              Used by some modules to configure an empty iframe. Used by dojo.io.iframe and
-       //              dojo.back, and dijit popup support in IE where an iframe is needed to make sure native
-       //              controls do not bleed through the popups. Normally this configuration variable 
-       //              does not need to be set, except when using cross-domain/CDN Dojo builds.
-       //              Save dojo/resources/blank.html to your domain and set `djConfig.dojoBlankHtmlUrl`
-       //              to the path on your domain your copy of blank.html.
-       dojoBlankHtmlUrl: undefined,
-       //      ioPublish: Boolean?
-       //              Set this to true to enable publishing of topics for the different phases of
-       //              IO operations. Publishing is done via dojo.publish. See dojo.__IoPublish for a list
-       //              of topics that are published.
-       ioPublish: false,
-       //  useCustomLogger: Anything?
-       //              If set to a value that evaluates to true such as a string or array and
-       //              isDebug is true and Firebug is not available or running, then it bypasses
-       //              the creation of Firebug Lite allowing you to define your own console object.
-       useCustomLogger: undefined,
-       // transparentColor: Array
-       //              Array containing the r, g, b components used as transparent color in dojo.Color;
-       //              if undefined, [255,255,255] (white) will be used.
-       transparentColor: undefined,
-       // skipIeDomLoaded: Boolean
-       //              For IE only, skip the DOMContentLoaded hack used. Sometimes it can cause an Operation
-       //              Aborted error if the rest of the page triggers script defers before the DOM is ready.
-       //              If this is config value is set to true, then dojo.addOnLoad callbacks will not be
-       //              triggered until the page load event, which is after images and iframes load. If you
-       //              want to trigger the callbacks sooner, you can put a script block in the bottom of
-       //              your HTML that calls dojo._loadInit();. If you are using multiversion support, change
-       //              "dojo." to the appropriate scope name for dojo.
-       skipIeDomLoaded: false
-}
-=====*/
-
-(function(){
-       // firebug stubs
-
-       if(typeof this["loadFirebugConsole"] == "function"){
-               // for Firebug 1.2
-               this["loadFirebugConsole"]();
-       }else{
-               this.console = this.console || {};
-
-               //      Be careful to leave 'log' always at the end
-               var cn = [
-                       "assert", "count", "debug", "dir", "dirxml", "error", "group",
-                       "groupEnd", "info", "profile", "profileEnd", "time", "timeEnd",
-                       "trace", "warn", "log"
-               ];
-               var i=0, tn;
-               while((tn=cn[i++])){
-                       if(!console[tn]){
-                               (function(){
-                                       var tcn = tn+"";
-                                       console[tcn] = ('log' in console) ? function(){
-                                               var a = Array.apply({}, arguments);
-                                               a.unshift(tcn+":");
-                                               console["log"](a.join(" "));
-                                       } : function(){}
-                                       console[tcn]._fake = true;
-                               })();
-                       }
-               }
-       }
-
-       //TODOC:  HOW TO DOC THIS?
-       // dojo is the root variable of (almost all) our public symbols -- make sure it is defined.
-       if(typeof dojo == "undefined"){
-               dojo = {
-                       _scopeName: "dojo",
-                       _scopePrefix: "",
-                       _scopePrefixArgs: "",
-                       _scopeSuffix: "",
-                       _scopeMap: {},
-                       _scopeMapRev: {}
-               };
-       }
-
-       var d = dojo;
-
-       //Need placeholders for dijit and dojox for scoping code.
-       if(typeof dijit == "undefined"){
-               dijit = {_scopeName: "dijit"};
-       }
-       if(typeof dojox == "undefined"){
-               dojox = {_scopeName: "dojox"};
-       }
-
-       if(!d._scopeArgs){
-               d._scopeArgs = [dojo, dijit, dojox];
-       }
-
-/*=====
-dojo.global = {
-       //      summary:
-       //              Alias for the global scope
-       //              (e.g. the window object in a browser).
-       //      description:
-       //              Refer to 'dojo.global' rather than referring to window to ensure your
-       //              code runs correctly in contexts other than web browsers (e.g. Rhino on a server).
-}
-=====*/
-       d.global = this;
-
-       d.config =/*===== djConfig = =====*/{
-               isDebug: false,
-               debugAtAllCosts: false
-       };
-
-       if(typeof djConfig != "undefined"){
-               for(var opt in djConfig){
-                       d.config[opt] = djConfig[opt];
-               }
-       }
-
-/*=====
-       // Override locale setting, if specified
-       dojo.locale = {
-               // summary: the locale as defined by Dojo (read-only)
-       };
-=====*/
-       dojo.locale = d.config.locale;
-
-       var rev = "$Rev: 20973 $".match(/\d+/);
-
-/*=====
-       dojo.version = function(){
-               // summary:
-               //              Version number of the Dojo Toolkit
-               // major: Integer
-               //              Major version. If total version is "1.2.0beta1", will be 1
-               // minor: Integer
-               //              Minor version. If total version is "1.2.0beta1", will be 2
-               // patch: Integer
-               //              Patch version. If total version is "1.2.0beta1", will be 0
-               // flag: String
-               //              Descriptor flag. If total version is "1.2.0beta1", will be "beta1"
-               // revision: Number
-               //              The SVN rev from which dojo was pulled
-               this.major = 0;
-               this.minor = 0;
-               this.patch = 0;
-               this.flag = "";
-               this.revision = 0;
-       }
-=====*/
-       dojo.version = {
-               major: 1, minor: 4, patch: 0, flag: "",
-               revision: rev ? +rev[0] : NaN,
-               toString: function(){
-                       with(d.version){
-                               return major + "." + minor + "." + patch + flag + " (" + revision + ")";        // String
-                       }
-               }
-       }
-
-               // Register with the OpenAjax hub
-       if(typeof OpenAjax != "undefined"){
-               OpenAjax.hub.registerLibrary(dojo._scopeName, "http://dojotoolkit.org", d.version.toString());
-       }
-       
-       var extraNames, extraLen, empty = {};
-       for(var i in {toString: 1}){ extraNames = []; break; }
-       dojo._extraNames = extraNames = extraNames || ["hasOwnProperty", "valueOf", "isPrototypeOf",
-               "propertyIsEnumerable", "toLocaleString", "toString", "constructor"];
-       extraLen = extraNames.length;
-
-       dojo._mixin = function(/*Object*/ target, /*Object*/ source){
-               // summary:
-               //              Adds all properties and methods of source to target. This addition
-               //              is "prototype extension safe", so that instances of objects
-               //              will not pass along prototype defaults.
-               var name, s, i;
-               for(name in source){
-                       // the "tobj" condition avoid copying properties in "source"
-                       // inherited from Object.prototype.  For example, if target has a custom
-                       // toString() method, don't overwrite it with the toString() method
-                       // that source inherited from Object.prototype
-                       s = source[name];
-                       if(!(name in target) || (target[name] !== s && (!(name in empty) || empty[name] !== s))){
-                               target[name] = s;
-                       }
-               }
-                               // IE doesn't recognize some custom functions in for..in
-               if(extraLen && source){
-                       for(i = 0; i < extraLen; ++i){
-                               name = extraNames[i];
-                               s = source[name];
-                               if(!(name in target) || (target[name] !== s && (!(name in empty) || empty[name] !== s))){
-                                       target[name] = s;
-                               }
-                       }
-               }
-                               return target; // Object
-       }
-
-       dojo.mixin = function(/*Object*/obj, /*Object...*/props){
-               // summary:
-               //              Adds all properties and methods of props to obj and returns the
-               //              (now modified) obj.
-               //      description:
-               //              `dojo.mixin` can mix multiple source objects into a
-               //              destination object which is then returned. Unlike regular
-               //              `for...in` iteration, `dojo.mixin` is also smart about avoiding
-               //              extensions which other toolkits may unwisely add to the root
-               //              object prototype
-               //      obj:
-               //              The object to mix properties into. Also the return value.
-               //      props:
-               //              One or more objects whose values are successively copied into
-               //              obj. If more than one of these objects contain the same value,
-               //              the one specified last in the function call will "win".
-               //      example:
-               //              make a shallow copy of an object
-               //      |       var copy = dojo.mixin({}, source);
-               //      example:
-               //              many class constructors often take an object which specifies
-               //              values to be configured on the object. In this case, it is
-               //              often simplest to call `dojo.mixin` on the `this` object:
-               //      |       dojo.declare("acme.Base", null, {
-               //      |               constructor: function(properties){
-               //      |                       // property configuration:
-               //      |                       dojo.mixin(this, properties);
-               //      |       
-               //      |                       console.log(this.quip);
-               //      |                       //  ...
-               //      |               },
-               //      |               quip: "I wasn't born yesterday, you know - I've seen movies.",
-               //      |               // ...
-               //      |       });
-               //      |
-               //      |       // create an instance of the class and configure it
-               //      |       var b = new acme.Base({quip: "That's what it does!" });
-               //      example:
-               //              copy in properties from multiple objects
-               //      |       var flattened = dojo.mixin(
-               //      |               {
-               //      |                       name: "Frylock",
-               //      |                       braces: true
-               //      |               },
-               //      |               {
-               //      |                       name: "Carl Brutanananadilewski"
-               //      |               }
-               //      |       );
-               //      |       
-               //      |       // will print "Carl Brutanananadilewski"
-               //      |       console.log(flattened.name);
-               //      |       // will print "true"
-               //      |       console.log(flattened.braces);
-               if(!obj){ obj = {}; }
-               for(var i=1, l=arguments.length; i<l; i++){
-                       d._mixin(obj, arguments[i]);
-               }
-               return obj; // Object
-       }
-
-       dojo._getProp = function(/*Array*/parts, /*Boolean*/create, /*Object*/context){
-               var obj=context || d.global;
-               for(var i=0, p; obj && (p=parts[i]); i++){
-                       if(i == 0 && d._scopeMap[p]){
-                               p = d._scopeMap[p];
-                       }
-                       obj = (p in obj ? obj[p] : (create ? obj[p]={} : undefined));
-               }
-               return obj; // mixed
-       }
-
-       dojo.setObject = function(/*String*/name, /*Object*/value, /*Object?*/context){
-               // summary:
-               //              Set a property from a dot-separated string, such as "A.B.C"
-               //      description:
-               //              Useful for longer api chains where you have to test each object in
-               //              the chain, or when you have an object reference in string format.
-               //              Objects are created as needed along `path`. Returns the passed
-               //              value if setting is successful or `undefined` if not.
-               //      name:
-               //              Path to a property, in the form "A.B.C".
-               //      context:
-               //              Optional. Object to use as root of path. Defaults to
-               //              `dojo.global`.
-               //      example:
-               //              set the value of `foo.bar.baz`, regardless of whether
-               //              intermediate objects already exist:
-               //      |       dojo.setObject("foo.bar.baz", value);
-               //      example:
-               //              without `dojo.setObject`, we often see code like this:
-               //      |       // ensure that intermediate objects are available
-               //      |       if(!obj["parent"]){ obj.parent = {}; }
-               //      |       if(!obj.parent["child"]){ obj.parent.child= {}; }
-               //      |       // now we can safely set the property
-               //      |       obj.parent.child.prop = "some value";
-               //              wheras with `dojo.setObject`, we can shorten that to:
-               //      |       dojo.setObject("parent.child.prop", "some value", obj);
-               var parts=name.split("."), p=parts.pop(), obj=d._getProp(parts, true, context);
-               return obj && p ? (obj[p]=value) : undefined; // Object
-       }
-
-       dojo.getObject = function(/*String*/name, /*Boolean?*/create, /*Object?*/context){
-               // summary:
-               //              Get a property from a dot-separated string, such as "A.B.C"
-               //      description:
-               //              Useful for longer api chains where you have to test each object in
-               //              the chain, or when you have an object reference in string format.
-               //      name:
-               //              Path to an property, in the form "A.B.C".
-               //      create:
-               //              Optional. Defaults to `false`. If `true`, Objects will be
-               //              created at any point along the 'path' that is undefined.
-               //      context:
-               //              Optional. Object to use as root of path. Defaults to
-               //              'dojo.global'. Null may be passed.
-               return d._getProp(name.split("."), create, context); // Object
-       }
-
-       dojo.exists = function(/*String*/name, /*Object?*/obj){
-               //      summary:
-               //              determine if an object supports a given method
-               //      description:
-               //              useful for longer api chains where you have to test each object in
-               //              the chain. Useful only for object and method detection.
-               //              Not useful for testing generic properties on an object.
-               //              In particular, dojo.exists("foo.bar") when foo.bar = ""
-               //              will return false. Use ("bar" in foo) to test for those cases.
-               //      name:
-               //              Path to an object, in the form "A.B.C".
-               //      obj:
-               //              Object to use as root of path. Defaults to
-               //              'dojo.global'. Null may be passed.
-               //      example:
-               //      |       // define an object
-               //      |       var foo = {
-               //      |               bar: { }
-               //      |       };
-               //      |
-               //      |       // search the global scope
-               //      |       dojo.exists("foo.bar"); // true
-               //      |       dojo.exists("foo.bar.baz"); // false
-               //      |
-               //      |       // search from a particular scope
-               //      |       dojo.exists("bar", foo); // true
-               //      |       dojo.exists("bar.baz", foo); // false
-               return !!d.getObject(name, false, obj); // Boolean
-       }
-
-
-       dojo["eval"] = function(/*String*/ scriptFragment){
-               //      summary:
-               //              Perform an evaluation in the global scope. Use this rather than
-               //              calling 'eval()' directly.
-               //      description:
-               //              Placed in a separate function to minimize size of trapped
-               //              exceptions. Calling eval() directly from some other scope may
-               //              complicate tracebacks on some platforms.
-               //      returns:
-               //              The result of the evaluation. Often `undefined`
-
-
-               // note:
-               //       - JSC eval() takes an optional second argument which can be 'unsafe'.
-               //       - Mozilla/SpiderMonkey eval() takes an optional second argument which is the
-               //       scope object for new symbols.
-
-               // FIXME: investigate Joseph Smarr's technique for IE:
-               //              http://josephsmarr.com/2007/01/31/fixing-eval-to-use-global-scope-in-ie/
-               //      see also:
-               //              http://trac.dojotoolkit.org/ticket/744
-               return d.global.eval ? d.global.eval(scriptFragment) : eval(scriptFragment);    // Object
-       }
-
-       /*=====
-               dojo.deprecated = function(behaviour, extra, removal){
-                       //      summary:
-                       //              Log a debug message to indicate that a behavior has been
-                       //              deprecated.
-                       //      behaviour: String
-                       //              The API or behavior being deprecated. Usually in the form
-                       //              of "myApp.someFunction()".
-                       //      extra: String?
-                       //              Text to append to the message. Often provides advice on a
-                       //              new function or facility to achieve the same goal during
-                       //              the deprecation period.
-                       //      removal: String?
-                       //              Text to indicate when in the future the behavior will be
-                       //              removed. Usually a version number.
-                       //      example:
-                       //      |       dojo.deprecated("myApp.getTemp()", "use myApp.getLocaleTemp() instead", "1.0");
-               }
-
-               dojo.experimental = function(moduleName, extra){
-                       //      summary: Marks code as experimental.
-                       //      description:
-                       //              This can be used to mark a function, file, or module as
-                       //              experimental.  Experimental code is not ready to be used, and the
-                       //              APIs are subject to change without notice.  Experimental code may be
-                       //              completed deleted without going through the normal deprecation
-                       //              process.
-                       //      moduleName: String
-                       //              The name of a module, or the name of a module file or a specific
-                       //              function
-                       //      extra: String?
-                       //              some additional message for the user
-                       //      example:
-                       //      |       dojo.experimental("dojo.data.Result");
-                       //      example:
-                       //      |       dojo.experimental("dojo.weather.toKelvin()", "PENDING approval from NOAA");
-               }
-       =====*/
-
-       //Real functions declared in dojo._firebug.firebug.
-       d.deprecated = d.experimental = function(){};
-
-})();
-// vim:ai:ts=4:noet
-
-/*
- * loader.js - A bootstrap module.  Runs before the hostenv_*.js file. Contains
- * all of the package loading methods.
- */
-
-(function(){
-       var d = dojo;
-
-       d.mixin(d, {
-               _loadedModules: {},
-               _inFlightCount: 0,
-               _hasResource: {},
-
-               _modulePrefixes: {
-                       dojo:   {       name: "dojo", value: "." },
-                       // dojox:       {       name: "dojox", value: "../dojox" },
-                       // dijit:       {       name: "dijit", value: "../dijit" },
-                       doh:    {       name: "doh", value: "../util/doh" },
-                       tests:  {       name: "tests", value: "tests" }
-               },
-
-               _moduleHasPrefix: function(/*String*/module){
-                       // summary: checks to see if module has been established
-                       var mp = d._modulePrefixes;
-                       return !!(mp[module] && mp[module].value); // Boolean
-               },
-
-               _getModulePrefix: function(/*String*/module){
-                       // summary: gets the prefix associated with module
-                       var mp = d._modulePrefixes;
-                       if(d._moduleHasPrefix(module)){
-                               return mp[module].value; // String
-                       }
-                       return module; // String
-               },
-
-               _loadedUrls: [],
-
-               //WARNING: 
-               //              This variable is referenced by packages outside of bootstrap:
-               //              FloatingPane.js and undo/browser.js
-               _postLoad: false,
-               
-               //Egad! Lots of test files push on this directly instead of using dojo.addOnLoad.
-               _loaders: [],
-               _unloaders: [],
-               _loadNotifying: false
-       });
-
-
-               dojo._loadPath = function(/*String*/relpath, /*String?*/module, /*Function?*/cb){
-               //      summary:
-               //              Load a Javascript module given a relative path
-               //
-               //      description:
-               //              Loads and interprets the script located at relpath, which is
-               //              relative to the script root directory.  If the script is found but
-               //              its interpretation causes a runtime exception, that exception is
-               //              not caught by us, so the caller will see it.  We return a true
-               //              value if and only if the script is found.
-               //
-               // relpath: 
-               //              A relative path to a script (no leading '/', and typically ending
-               //              in '.js').
-               // module: 
-               //              A module whose existance to check for after loading a path.  Can be
-               //              used to determine success or failure of the load.
-               // cb: 
-               //              a callback function to pass the result of evaluating the script
-
-               var uri = ((relpath.charAt(0) == '/' || relpath.match(/^\w+:/)) ? "" : d.baseUrl) + relpath;
-               try{
-                       return !module ? d._loadUri(uri, cb) : d._loadUriAndCheck(uri, module, cb); // Boolean
-               }catch(e){
-                       console.error(e);
-                       return false; // Boolean
-               }
-       }
-
-       dojo._loadUri = function(/*String*/uri, /*Function?*/cb){
-               //      summary:
-               //              Loads JavaScript from a URI
-               //      description:
-               //              Reads the contents of the URI, and evaluates the contents.  This is
-               //              used to load modules as well as resource bundles. Returns true if
-               //              it succeeded. Returns false if the URI reading failed.  Throws if
-               //              the evaluation throws.
-               //      uri: a uri which points at the script to be loaded
-               //      cb: 
-               //              a callback function to process the result of evaluating the script
-               //              as an expression, typically used by the resource bundle loader to
-               //              load JSON-style resources
-
-               if(d._loadedUrls[uri]){
-                       return true; // Boolean
-               }
-               d._inFlightCount++; // block addOnLoad calls that arrive while we're busy downloading
-               var contents = d._getText(uri, true);
-               if(contents){ // not 404, et al
-                       d._loadedUrls[uri] = true;
-                       d._loadedUrls.push(uri);
-                       if(cb){
-                               contents = '('+contents+')';
-                       }else{
-                               //Only do the scoping if no callback. If a callback is specified,
-                               //it is most likely the i18n bundle stuff.
-                               contents = d._scopePrefix + contents + d._scopeSuffix;
-                       }
-                       if(!d.isIE){ contents += "\r\n//@ sourceURL=" + uri; } // debugging assist for Firebug
-                       var value = d["eval"](contents);
-                       if(cb){ cb(value); }
-               }
-               // Check to see if we need to call _callLoaded() due to an addOnLoad() that arrived while we were busy downloading
-               if(--d._inFlightCount == 0 && d._postLoad && d._loaders.length){
-                       // We shouldn't be allowed to get here but Firefox allows an event 
-                       // (mouse, keybd, async xhrGet) to interrupt a synchronous xhrGet. 
-                       // If the current script block contains multiple require() statements, then after each
-                       // require() returns, inFlightCount == 0, but we want to hold the _callLoaded() until
-                       // all require()s are done since the out-of-sequence addOnLoad() presumably needs them all.
-                       // setTimeout allows the next require() to start (if needed), and then we check this again.
-                       setTimeout(function(){ 
-                               // If inFlightCount > 0, then multiple require()s are running sequentially and 
-                               // the next require() started after setTimeout() was executed but before we got here.
-                               if(d._inFlightCount == 0){ 
-                                       d._callLoaded();
-                               }
-                       }, 0);
-               }
-               return !!contents; // Boolean: contents? true : false
-       }
-       
-       // FIXME: probably need to add logging to this method
-       dojo._loadUriAndCheck = function(/*String*/uri, /*String*/moduleName, /*Function?*/cb){
-               // summary: calls loadUri then findModule and returns true if both succeed
-               var ok = false;
-               try{
-                       ok = d._loadUri(uri, cb);
-               }catch(e){
-                       console.error("failed loading " + uri + " with error: " + e);
-               }
-               return !!(ok && d._loadedModules[moduleName]); // Boolean
-       }
-
-       dojo.loaded = function(){
-               // summary:
-               //              signal fired when initial environment and package loading is
-               //              complete. You should use dojo.addOnLoad() instead of doing a 
-               //              direct dojo.connect() to this method in order to handle
-               //              initialization tasks that require the environment to be
-               //              initialized. In a browser host, declarative widgets will 
-               //              be constructed when this function finishes runing.
-               d._loadNotifying = true;
-               d._postLoad = true;
-               var mll = d._loaders;
-
-               //Clear listeners so new ones can be added
-               //For other xdomain package loads after the initial load.
-               d._loaders = [];
-
-               for(var x = 0; x < mll.length; x++){
-                       mll[x]();
-               }
-
-               d._loadNotifying = false;
-               
-               //Make sure nothing else got added to the onload queue
-               //after this first run. If something did, and we are not waiting for any
-               //more inflight resources, run again.
-               if(d._postLoad && d._inFlightCount == 0 && mll.length){
-                       d._callLoaded();
-               }
-       }
-
-       dojo.unloaded = function(){
-               // summary:
-               //              signal fired by impending environment destruction. You should use
-               //              dojo.addOnUnload() instead of doing a direct dojo.connect() to this 
-               //              method to perform page/application cleanup methods. See 
-               //              dojo.addOnUnload for more info.
-               var mll = d._unloaders;
-               while(mll.length){
-                       (mll.pop())();
-               }
-       }
-
-       d._onto = function(arr, obj, fn){
-               if(!fn){
-                       arr.push(obj);
-               }else if(fn){
-                       var func = (typeof fn == "string") ? obj[fn] : fn;
-                       arr.push(function(){ func.call(obj); });
-               }
-       }
-
-       dojo.ready = dojo.addOnLoad = function(/*Object*/obj, /*String|Function?*/functionName){
-               // summary:
-               //              Registers a function to be triggered after the DOM and dojo.require() calls 
-               //              have finished loading.
-               //
-               // description:
-               //              Registers a function to be triggered after the DOM has finished
-               //              loading and `dojo.require` modules have loaded. Widgets declared in markup 
-               //              have been instantiated if `djConfig.parseOnLoad` is true when this fires. 
-               //
-               //              Images and CSS files may or may not have finished downloading when
-               //              the specified function is called.  (Note that widgets' CSS and HTML
-               //              code is guaranteed to be downloaded before said widgets are
-               //              instantiated, though including css resouces BEFORE any script elements
-               //              is highly recommended).
-               //
-               // example:
-               //      Register an anonymous function to run when everything is ready
-               //      |       dojo.addOnLoad(function(){ doStuff(); });
-               //
-               // example:
-               //      Register a function to run when everything is ready by pointer:
-               //      |       var init = function(){ doStuff(); }
-               //      |       dojo.addOnLoad(init);
-               //
-               // example:
-               //      Register a function to run scoped to `object`, either by name or anonymously:
-               //      |       dojo.addOnLoad(object, "functionName");
-               //      |       dojo.addOnLoad(object, function(){ doStuff(); });
-
-               d._onto(d._loaders, obj, functionName);
-
-               //Added for xdomain loading. dojo.addOnLoad is used to
-               //indicate callbacks after doing some dojo.require() statements.
-               //In the xdomain case, if all the requires are loaded (after initial
-               //page load), then immediately call any listeners.
-               if(d._postLoad && d._inFlightCount == 0 && !d._loadNotifying){
-                       d._callLoaded();
-               }
-       }
-
-       //Support calling dojo.addOnLoad via djConfig.addOnLoad. Support all the
-       //call permutations of dojo.addOnLoad. Mainly useful when dojo is added
-       //to the page after the page has loaded.
-       var dca = d.config.addOnLoad;
-       if(dca){
-               d.addOnLoad[(dca instanceof Array ? "apply" : "call")](d, dca);
-       }
-
-       dojo._modulesLoaded = function(){
-               if(d._postLoad){ return; }
-               if(d._inFlightCount > 0){ 
-                       console.warn("files still in flight!");
-                       return;
-               }
-               d._callLoaded();
-       }
-
-       dojo._callLoaded = function(){
-
-               // The "object" check is for IE, and the other opera check fixes an
-               // issue in Opera where it could not find the body element in some
-               // widget test cases.  For 0.9, maybe route all browsers through the
-               // setTimeout (need protection still for non-browser environments
-               // though). This might also help the issue with FF 2.0 and freezing
-               // issues where we try to do sync xhr while background css images are
-               // being loaded (trac #2572)? Consider for 0.9.
-               if(typeof setTimeout == "object" || (d.config.useXDomain && d.isOpera)){
-                       setTimeout(
-                               d.isAIR ? function(){ d.loaded(); } : d._scopeName + ".loaded();",
-                               0);
-               }else{
-                       d.loaded();
-               }
-       }
-
-       dojo._getModuleSymbols = function(/*String*/modulename){
-               // summary:
-               //              Converts a module name in dotted JS notation to an array
-               //              representing the path in the source tree
-               var syms = modulename.split(".");
-               for(var i = syms.length; i>0; i--){
-                       var parentModule = syms.slice(0, i).join(".");
-                       if(i == 1 && !d._moduleHasPrefix(parentModule)){                
-                               // Support default module directory (sibling of dojo) for top-level modules 
-                               syms[0] = "../" + syms[0];
-                       }else{
-                               var parentModulePath = d._getModulePrefix(parentModule);
-                               if(parentModulePath != parentModule){
-                                       syms.splice(0, i, parentModulePath);
-                                       break;
-                               }
-                       }
-               }
-               return syms; // Array
-       }
-
-       dojo._global_omit_module_check = false;
-
-       dojo.loadInit = function(/*Function*/init){
-               //      summary:
-               //              Executes a function that needs to be executed for the loader's dojo.requireIf
-               //              resolutions to work. This is needed mostly for the xdomain loader case where
-               //              a function needs to be executed to set up the possible values for a dojo.requireIf
-               //              call.
-               //      init:
-               //              a function reference. Executed immediately.
-               //      description: This function is mainly a marker for the xdomain loader to know parts of
-               //              code that needs be executed outside the function wrappper that is placed around modules.
-               //              The init function could be executed more than once, and it should make no assumptions
-               //              on what is loaded, or what modules are available. Only the functionality in Dojo Base
-               //              is allowed to be used. Avoid using this method. For a valid use case,
-               //              see the source for dojox.gfx.
-               init();
-       }
-
-       dojo._loadModule = dojo.require = function(/*String*/moduleName, /*Boolean?*/omitModuleCheck){
-               //      summary:
-               //              loads a Javascript module from the appropriate URI
-               //      moduleName:
-               //              module name to load, using periods for separators,
-               //               e.g. "dojo.date.locale".  Module paths are de-referenced by dojo's
-               //              internal mapping of locations to names and are disambiguated by
-               //              longest prefix. See `dojo.registerModulePath()` for details on
-               //              registering new modules.
-               //      omitModuleCheck:
-               //              if `true`, omitModuleCheck skips the step of ensuring that the
-               //              loaded file actually defines the symbol it is referenced by.
-               //              For example if it called as `dojo.require("a.b.c")` and the
-               //              file located at `a/b/c.js` does not define an object `a.b.c`,
-               //              and exception will be throws whereas no exception is raised
-               //              when called as `dojo.require("a.b.c", true)`
-               //      description:
-               //              Modules are loaded via dojo.require by using one of two loaders: the normal loader
-               //              and the xdomain loader. The xdomain loader is used when dojo was built with a
-               //              custom build that specified loader=xdomain and the module lives on a modulePath
-               //              that is a whole URL, with protocol and a domain. The versions of Dojo that are on
-               //              the Google and AOL CDNs use the xdomain loader.
-               // 
-               //              If the module is loaded via the xdomain loader, it is an asynchronous load, since
-               //              the module is added via a dynamically created script tag. This
-               //              means that dojo.require() can return before the module has loaded. However, this 
-               //              should only happen in the case where you do dojo.require calls in the top-level
-               //              HTML page, or if you purposely avoid the loader checking for dojo.require
-               //              dependencies in your module by using a syntax like dojo["require"] to load the module.
-               // 
-               //              Sometimes it is useful to not have the loader detect the dojo.require calls in the
-               //              module so that you can dynamically load the modules as a result of an action on the
-               //              page, instead of right at module load time.
-               // 
-               //              Also, for script blocks in an HTML page, the loader does not pre-process them, so
-               //              it does not know to download the modules before the dojo.require calls occur.
-               // 
-               //              So, in those two cases, when you want on-the-fly module loading or for script blocks
-               //              in the HTML page, special care must be taken if the dojo.required code is loaded
-               //              asynchronously. To make sure you can execute code that depends on the dojo.required
-               //              modules, be sure to add the code that depends on the modules in a dojo.addOnLoad()
-               //              callback. dojo.addOnLoad waits for all outstanding modules to finish loading before
-               //              executing. Example:
-               // 
-               //              |       <script type="text/javascript">
-               //              |       dojo.require("foo");
-               //              |       dojo.require("bar");
-               //              |       dojo.addOnLoad(function(){
-               //              |               //you can now safely do something with foo and bar
-               //              |       });
-               //              |       </script>
-               // 
-               //              This type of syntax works with both xdomain and normal loaders, so it is good
-               //              practice to always use this idiom for on-the-fly code loading and in HTML script
-               //              blocks. If at some point you change loaders and where the code is loaded from,
-               //              it will all still work.
-               // 
-               //              More on how dojo.require
-               //              `dojo.require("A.B")` first checks to see if symbol A.B is
-               //              defined. If it is, it is simply returned (nothing to do).
-               //      
-               //              If it is not defined, it will look for `A/B.js` in the script root
-               //              directory.
-               //      
-               //              `dojo.require` throws an excpetion if it cannot find a file
-               //              to load, or if the symbol `A.B` is not defined after loading.
-               //      
-               //              It returns the object `A.B`, but note the caveats above about on-the-fly loading and
-               //              HTML script blocks when the xdomain loader is loading a module.
-               //      
-               //              `dojo.require()` does nothing about importing symbols into
-               //              the current namespace.  It is presumed that the caller will
-               //              take care of that. For example, to import all symbols into a
-               //              local block, you might write:
-               //      
-               //              |       with (dojo.require("A.B")) {
-               //              |               ...
-               //              |       }
-               //      
-               //              And to import just the leaf symbol to a local variable:
-               //      
-               //              |       var B = dojo.require("A.B");
-               //              |       ...
-               //      returns: the required namespace object
-               omitModuleCheck = d._global_omit_module_check || omitModuleCheck;
-
-               //Check if it is already loaded.
-               var module = d._loadedModules[moduleName];
-               if(module){
-                       return module;
-               }
-
-               // convert periods to slashes
-               var relpath = d._getModuleSymbols(moduleName).join("/") + '.js';
-
-               var modArg = !omitModuleCheck ? moduleName : null;
-               var ok = d._loadPath(relpath, modArg);
-
-               if(!ok && !omitModuleCheck){
-                       throw new Error("Could not load '" + moduleName + "'; last tried '" + relpath + "'");
-               }
-
-               // check that the symbol was defined
-               // Don't bother if we're doing xdomain (asynchronous) loading.
-               if(!omitModuleCheck && !d._isXDomain){
-                       // pass in false so we can give better error
-                       module = d._loadedModules[moduleName];
-                       if(!module){
-                               throw new Error("symbol '" + moduleName + "' is not defined after loading '" + relpath + "'"); 
-                       }
-               }
-
-               return module;
-       }
-
-       dojo.provide = function(/*String*/ resourceName){
-               //      summary:
-               //              Register a resource with the package system. Works in conjunction with `dojo.require`
-               //
-               //      description:
-               //              Each javascript source file is called a resource.  When a
-               //              resource is loaded by the browser, `dojo.provide()` registers
-               //              that it has been loaded.
-               //
-               //              Each javascript source file must have at least one
-               //              `dojo.provide()` call at the top of the file, corresponding to
-               //              the file name.  For example, `js/dojo/foo.js` must have
-               //              `dojo.provide("dojo.foo");` before any calls to
-               //              `dojo.require()` are made.
-               //      
-               //              For backwards compatibility reasons, in addition to registering
-               //              the resource, `dojo.provide()` also ensures that the javascript
-               //              object for the module exists.  For example,
-               //              `dojo.provide("dojox.data.FlickrStore")`, in addition to
-               //              registering that `FlickrStore.js` is a resource for the
-               //              `dojox.data` module, will ensure that the `dojox.data`
-               //              javascript object exists, so that calls like 
-               //              `dojo.data.foo = function(){ ... }` don't fail.
-               //
-               //              In the case of a build where multiple javascript source files
-               //              are combined into one bigger file (similar to a .lib or .jar
-               //              file), that file may contain multiple dojo.provide() calls, to
-               //              note that it includes multiple resources.
-               //
-               // resourceName: String
-               //              A dot-sperated string identifying a resource. 
-               //
-               // example:
-               //      Safely create a `my` object, and make dojo.require("my.CustomModule") work
-               //      |       dojo.provide("my.CustomModule"); 
-
-               //Make sure we have a string.
-               resourceName = resourceName + "";
-               return (d._loadedModules[resourceName] = d.getObject(resourceName, true)); // Object
-       }
-
-       //Start of old bootstrap2:
-
-       dojo.platformRequire = function(/*Object*/modMap){
-               //      summary:
-               //              require one or more modules based on which host environment
-               //              Dojo is currently operating in
-               //      description:
-               //              This method takes a "map" of arrays which one can use to
-               //              optionally load dojo modules. The map is indexed by the
-               //              possible dojo.name_ values, with two additional values:
-               //              "default" and "common". The items in the "default" array will
-               //              be loaded if none of the other items have been choosen based on
-               //              dojo.name_, set by your host environment. The items in the
-               //              "common" array will *always* be loaded, regardless of which
-               //              list is chosen.
-               //      example:
-               //              |       dojo.platformRequire({
-               //              |               browser: [
-               //              |                       "foo.sample", // simple module
-               //              |                       "foo.test",
-               //              |                       ["foo.bar.baz", true] // skip object check in _loadModule (dojo.require)
-               //              |               ],
-               //              |               default: [ "foo.sample._base" ],
-               //              |               common: [ "important.module.common" ]
-               //              |       });
-
-               var common = modMap.common || [];
-               var result = common.concat(modMap[d._name] || modMap["default"] || []);
-
-               for(var x=0; x<result.length; x++){
-                       var curr = result[x];
-                       if(curr.constructor == Array){
-                               d._loadModule.apply(d, curr);
-                       }else{
-                               d._loadModule(curr);
-                       }
-               }
-       }
-
-       dojo.requireIf = function(/*Boolean*/ condition, /*String*/ resourceName){
-               // summary:
-               //              If the condition is true then call `dojo.require()` for the specified
-               //              resource
-               //
-               // example:
-               //      |       dojo.requireIf(dojo.isBrowser, "my.special.Module");
-               
-               if(condition === true){
-                       // FIXME: why do we support chained require()'s here? does the build system?
-                       var args = [];
-                       for(var i = 1; i < arguments.length; i++){ 
-                               args.push(arguments[i]);
-                       }
-                       d.require.apply(d, args);
-               }
-       }
-
-       dojo.requireAfterIf = d.requireIf;
-
-       dojo.registerModulePath = function(/*String*/module, /*String*/prefix){
-               //      summary: 
-               //              Maps a module name to a path
-               //      description: 
-               //              An unregistered module is given the default path of ../[module],
-               //              relative to Dojo root. For example, module acme is mapped to
-               //              ../acme.  If you want to use a different module name, use
-               //              dojo.registerModulePath. 
-               //      example:
-               //              If your dojo.js is located at this location in the web root:
-               //      |       /myapp/js/dojo/dojo/dojo.js
-               //              and your modules are located at:
-               //      |       /myapp/js/foo/bar.js
-               //      |       /myapp/js/foo/baz.js
-               //      |       /myapp/js/foo/thud/xyzzy.js
-               //              Your application can tell Dojo to locate the "foo" namespace by calling:
-               //      |       dojo.registerModulePath("foo", "../../foo");
-               //              At which point you can then use dojo.require() to load the
-               //              modules (assuming they provide() the same things which are
-               //              required). The full code might be:
-               //      |       <script type="text/javascript" 
-               //      |               src="/myapp/js/dojo/dojo/dojo.js"></script>
-               //      |       <script type="text/javascript">
-               //      |               dojo.registerModulePath("foo", "../../foo");
-               //      |               dojo.require("foo.bar");
-               //      |               dojo.require("foo.baz");
-               //      |               dojo.require("foo.thud.xyzzy");
-               //      |       </script>
-               d._modulePrefixes[module] = { name: module, value: prefix };
-       }
-
-       dojo.requireLocalization = function(/*String*/moduleName, /*String*/bundleName, /*String?*/locale, /*String?*/availableFlatLocales){
-               // summary:
-               //              Declares translated resources and loads them if necessary, in the
-               //              same style as dojo.require.  Contents of the resource bundle are
-               //              typically strings, but may be any name/value pair, represented in
-               //              JSON format.  See also `dojo.i18n.getLocalization`.
-               //
-               // description:
-               //              Load translated resource bundles provided underneath the "nls"
-               //              directory within a package.  Translated resources may be located in
-               //              different packages throughout the source tree.  
-               //
-               //              Each directory is named for a locale as specified by RFC 3066,
-               //              (http://www.ietf.org/rfc/rfc3066.txt), normalized in lowercase.
-               //              Note that the two bundles in the example do not define all the
-               //              same variants.  For a given locale, bundles will be loaded for
-               //              that locale and all more general locales above it, including a
-               //              fallback at the root directory.  For example, a declaration for
-               //              the "de-at" locale will first load `nls/de-at/bundleone.js`,
-               //              then `nls/de/bundleone.js` and finally `nls/bundleone.js`.  The
-               //              data will be flattened into a single Object so that lookups
-               //              will follow this cascading pattern.  An optional build step can
-               //              preload the bundles to avoid data redundancy and the multiple
-               //              network hits normally required to load these resources.
-               //
-               // moduleName: 
-               //              name of the package containing the "nls" directory in which the
-               //              bundle is found
-               //
-               // bundleName: 
-               //              bundle name, i.e. the filename without the '.js' suffix. Using "nls" as a
-               //              a bundle name is not supported, since "nls" is the name of the folder
-               //              that holds bundles. Using "nls" as the bundle name will cause problems
-               //              with the custom build.
-               //
-               // locale: 
-               //              the locale to load (optional)  By default, the browser's user
-               //              locale as defined by dojo.locale
-               //
-               // availableFlatLocales: 
-               //              A comma-separated list of the available, flattened locales for this
-               //              bundle. This argument should only be set by the build process.
-               //
-               //      example:
-               //              A particular widget may define one or more resource bundles,
-               //              structured in a program as follows, where moduleName is
-               //              mycode.mywidget and bundleNames available include bundleone and
-               //              bundletwo:
-               //      |               ...
-               //      |       mycode/
-               //      |               mywidget/
-               //      |                       nls/
-               //      |                               bundleone.js (the fallback translation, English in this example)
-               //      |                               bundletwo.js (also a fallback translation)
-               //      |                               de/
-               //      |                                       bundleone.js
-               //      |                                       bundletwo.js
-               //      |                               de-at/
-               //      |                                       bundleone.js
-               //      |                               en/
-               //      |                                       (empty; use the fallback translation)
-               //      |                               en-us/
-               //      |                                       bundleone.js
-               //      |                               en-gb/
-               //      |                                       bundleone.js
-               //      |                               es/
-               //      |                                       bundleone.js
-               //      |                                       bundletwo.js
-               //      |                                 ...etc
-               //      |                               ...
-               //
-
-               d.require("dojo.i18n");
-               d.i18n._requireLocalization.apply(d.hostenv, arguments);
-       };
-
-
-       var ore = new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),
-               ire = new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");
-
-       dojo._Url = function(/*dojo._Url|String...*/){
-               // summary: 
-               //              Constructor to create an object representing a URL.
-               //              It is marked as private, since we might consider removing
-               //              or simplifying it.
-               // description: 
-               //              Each argument is evaluated in order relative to the next until
-               //              a canonical uri is produced. To get an absolute Uri relative to
-               //              the current document use:
-               //              new dojo._Url(document.baseURI, url)
-
-               var n = null,
-                       _a = arguments,
-                       uri = [_a[0]];
-               // resolve uri components relative to each other
-               for(var i = 1; i<_a.length; i++){
-                       if(!_a[i]){ continue; }
-
-                       // Safari doesn't support this.constructor so we have to be explicit
-                       // FIXME: Tracked (and fixed) in Webkit bug 3537.
-                       //              http://bugs.webkit.org/show_bug.cgi?id=3537
-                       var relobj = new d._Url(_a[i]+""),
-                               uriobj = new d._Url(uri[0]+"");
-
-                       if(
-                               relobj.path == "" &&
-                               !relobj.scheme &&
-                               !relobj.authority &&
-                               !relobj.query
-                       ){
-                               if(relobj.fragment != n){
-                                       uriobj.fragment = relobj.fragment;
-                               }
-                               relobj = uriobj;
-                       }else if(!relobj.scheme){
-                               relobj.scheme = uriobj.scheme;
-
-                               if(!relobj.authority){
-                                       relobj.authority = uriobj.authority;
-
-                                       if(relobj.path.charAt(0) != "/"){
-                                               var path = uriobj.path.substring(0,
-                                                       uriobj.path.lastIndexOf("/") + 1) + relobj.path;
-
-                                               var segs = path.split("/");
-                                               for(var j = 0; j < segs.length; j++){
-                                                       if(segs[j] == "."){
-                                                               // flatten "./" references
-                                                               if(j == segs.length - 1){
-                                                                       segs[j] = "";
-                                                               }else{
-                                                                       segs.splice(j, 1);
-                                                                       j--;
-                                                               }
-                                                       }else if(j > 0 && !(j == 1 && segs[0] == "") &&
-                                                               segs[j] == ".." && segs[j-1] != ".."){
-                                                               // flatten "../" references
-                                                               if(j == (segs.length - 1)){
-                                                                       segs.splice(j, 1);
-                                                                       segs[j - 1] = "";
-                                                               }else{
-                                                                       segs.splice(j - 1, 2);
-                                                                       j -= 2;
-                                                               }
-                                                       }
-                                               }
-                                               relobj.path = segs.join("/");
-                                       }
-                               }
-                       }
-
-                       uri = [];
-                       if(relobj.scheme){ 
-                               uri.push(relobj.scheme, ":");
-                       }
-                       if(relobj.authority){
-                               uri.push("//", relobj.authority);
-                       }
-                       uri.push(relobj.path);
-                       if(relobj.query){
-                               uri.push("?", relobj.query);
-                       }
-                       if(relobj.fragment){
-                               uri.push("#", relobj.fragment);
-                       }
-               }
-
-               this.uri = uri.join("");
-
-               // break the uri into its main components
-               var r = this.uri.match(ore);
-
-               this.scheme = r[2] || (r[1] ? "" : n);
-               this.authority = r[4] || (r[3] ? "" : n);
-               this.path = r[5]; // can never be undefined
-               this.query = r[7] || (r[6] ? "" : n);
-               this.fragment  = r[9] || (r[8] ? "" : n);
-
-               if(this.authority != n){
-                       // server based naming authority
-                       r = this.authority.match(ire);
-
-                       this.user = r[3] || n;
-                       this.password = r[4] || n;
-                       this.host = r[6] || r[7]; // ipv6 || ipv4
-                       this.port = r[9] || n;
-               }
-       }
-
-       dojo._Url.prototype.toString = function(){ return this.uri; };
-
-       dojo.moduleUrl = function(/*String*/module, /*dojo._Url||String*/url){
-               //      summary: 
-               //              Returns a `dojo._Url` object relative to a module.
-               //      example:
-               //      |       var pngPath = dojo.moduleUrl("acme","images/small.png");
-               //      |       console.dir(pngPath); // list the object properties
-               //      |       // create an image and set it's source to pngPath's value:
-               //      |       var img = document.createElement("img");
-               //      |       // NOTE: we assign the string representation of the url object
-               //      |       img.src = pngPath.toString(); 
-               //      |       // add our image to the document
-               //      |       dojo.body().appendChild(img);
-               //      example: 
-               //              you may de-reference as far as you like down the package
-               //              hierarchy.  This is sometimes handy to avoid lenghty relative
-               //              urls or for building portable sub-packages. In this example,
-               //              the `acme.widget` and `acme.util` directories may be located
-               //              under different roots (see `dojo.registerModulePath`) but the
-               //              the modules which reference them can be unaware of their
-               //              relative locations on the filesystem:
-               //      |       // somewhere in a configuration block
-               //      |       dojo.registerModulePath("acme.widget", "../../acme/widget");
-               //      |       dojo.registerModulePath("acme.util", "../../util");
-               //      |       
-               //      |       // ...
-               //      |       
-               //      |       // code in a module using acme resources
-               //      |       var tmpltPath = dojo.moduleUrl("acme.widget","templates/template.html");
-               //      |       var dataPath = dojo.moduleUrl("acme.util","resources/data.json");
-
-               var loc = d._getModuleSymbols(module).join('/');
-               if(!loc){ return null; }
-               if(loc.lastIndexOf("/") != loc.length-1){
-                       loc += "/";
-               }
-               
-               //If the path is an absolute path (starts with a / or is on another
-               //domain/xdomain) then don't add the baseUrl.
-               var colonIndex = loc.indexOf(":");
-               if(loc.charAt(0) != "/" && (colonIndex == -1 || colonIndex > loc.indexOf("/"))){
-                       loc = d.baseUrl + loc;
-               }
-
-               return new d._Url(loc, url); // dojo._Url
-       }
-})();
-
-/*=====
-dojo.isBrowser = {
-       //      example:
-       //      |       if(dojo.isBrowser){ ... }
-};
-
-dojo.isFF = {
-       //      example:
-       //      |       if(dojo.isFF > 1){ ... }
-};
-
-dojo.isIE = {
-       // example:
-       //      |       if(dojo.isIE > 6){
-       //      |               // we are IE7
-       //      |       }
-};
-
-dojo.isSafari = {
-       //      example:
-       //      |       if(dojo.isSafari){ ... }
-       //      example: 
-       //              Detect iPhone:
-       //      |       if(dojo.isSafari && navigator.userAgent.indexOf("iPhone") != -1){ 
-       //      |               // we are iPhone. Note, iPod touch reports "iPod" above and fails this test.
-       //      |       }
-};
-
-dojo = {
-       // isBrowser: Boolean
-       //              True if the client is a web-browser
-       isBrowser: true,
-       //      isFF: Number | undefined
-       //              Version as a Number if client is FireFox. undefined otherwise. Corresponds to
-       //              major detected FireFox version (1.5, 2, 3, etc.)
-       isFF: 2,
-       //      isIE: Number | undefined
-       //              Version as a Number if client is MSIE(PC). undefined otherwise. Corresponds to
-       //              major detected IE version (6, 7, 8, etc.)
-       isIE: 6,
-       //      isKhtml: Number | undefined
-       //              Version as a Number if client is a KHTML browser. undefined otherwise. Corresponds to major
-       //              detected version.
-       isKhtml: 0,
-       //      isWebKit: Number | undefined
-       //              Version as a Number if client is a WebKit-derived browser (Konqueror,
-       //              Safari, Chrome, etc.). undefined otherwise.
-       isWebKit: 0,
-       //      isMozilla: Number | undefined
-       //              Version as a Number if client is a Mozilla-based browser (Firefox,
-       //              SeaMonkey). undefined otherwise. Corresponds to major detected version.
-       isMozilla: 0,
-       //      isOpera: Number | undefined
-       //              Version as a Number if client is Opera. undefined otherwise. Corresponds to
-       //              major detected version.
-       isOpera: 0,
-       //      isSafari: Number | undefined
-       //              Version as a Number if client is Safari or iPhone. undefined otherwise.
-       isSafari: 0,
-       //      isChrome: Number | undefined
-       //              Version as a Number if client is Chrome browser. undefined otherwise.
-       isChrome: 0
-       //      isMac: Boolean
-       //              True if the client runs on Mac
-}
-=====*/
-
-if(typeof window != 'undefined'){
-       dojo.isBrowser = true;
-       dojo._name = "browser";
-
-
-       // attempt to figure out the path to dojo if it isn't set in the config
-       (function(){
-               var d = dojo;
-
-               // this is a scope protection closure. We set browser versions and grab
-               // the URL we were loaded from here.
-
-               // grab the node we were loaded from
-               if(document && document.getElementsByTagName){
-                       var scripts = document.getElementsByTagName("script");
-                       var rePkg = /dojo(\.xd)?\.js(\W|$)/i;
-                       for(var i = 0; i < scripts.length; i++){
-                               var src = scripts[i].getAttribute("src");
-                               if(!src){ continue; }
-                               var m = src.match(rePkg);
-                               if(m){
-                                       // find out where we came from
-                                       if(!d.config.baseUrl){
-                                               d.config.baseUrl = src.substring(0, m.index);
-                                       }
-                                       // and find out if we need to modify our behavior
-                                       var cfg = scripts[i].getAttribute("djConfig");
-                                       if(cfg){
-                                               var cfgo = eval("({ "+cfg+" })");
-                                               for(var x in cfgo){
-                                                       dojo.config[x] = cfgo[x];
-                                               }
-                                       }
-                                       break; // "first Dojo wins"
-                               }
-                       }
-               }
-               d.baseUrl = d.config.baseUrl;
-
-               // fill in the rendering support information in dojo.render.*
-               var n = navigator;
-               var dua = n.userAgent,
-                       dav = n.appVersion,
-                       tv = parseFloat(dav);
-
-               if(dua.indexOf("Opera") >= 0){ d.isOpera = tv; }
-               if(dua.indexOf("AdobeAIR") >= 0){ d.isAIR = 1; }
-               d.isKhtml = (dav.indexOf("Konqueror") >= 0) ? tv : 0;
-               d.isWebKit = parseFloat(dua.split("WebKit/")[1]) || undefined;
-               d.isChrome = parseFloat(dua.split("Chrome/")[1]) || undefined;
-               d.isMac = dav.indexOf("Macintosh") >= 0;
-
-               // safari detection derived from:
-               //              http://developer.apple.com/internet/safari/faq.html#anchor2
-               //              http://developer.apple.com/internet/safari/uamatrix.html
-               var index = Math.max(dav.indexOf("WebKit"), dav.indexOf("Safari"), 0);
-               if(index && !dojo.isChrome){
-                       // try to grab the explicit Safari version first. If we don't get
-                       // one, look for less than 419.3 as the indication that we're on something
-                       // "Safari 2-ish".
-                       d.isSafari = parseFloat(dav.split("Version/")[1]);
-                       if(!d.isSafari || parseFloat(dav.substr(index + 7)) <= 419.3){
-                               d.isSafari = 2;
-                       }
-               }
-
-                               if(dua.indexOf("Gecko") >= 0 && !d.isKhtml && !d.isWebKit){ d.isMozilla = d.isMoz = tv; }
-               if(d.isMoz){
-                       //We really need to get away from this. Consider a sane isGecko approach for the future.
-                       d.isFF = parseFloat(dua.split("Firefox/")[1] || dua.split("Minefield/")[1]) || undefined;
-               }
-               if(document.all && !d.isOpera){
-                       d.isIE = parseFloat(dav.split("MSIE ")[1]) || undefined;
-                       //In cases where the page has an HTTP header or META tag with
-                       //X-UA-Compatible, then it is in emulation mode.
-                       //Make sure isIE reflects the desired version.
-                       //document.documentMode of 5 means quirks mode.
-                       //Only switch the value if documentMode's major version
-                       //is different from isIE's major version.
-                       var mode = document.documentMode;
-                       if(mode && mode != 5 && Math.floor(d.isIE) != mode){
-                               d.isIE = mode;
-                       }
-               }
-
-               //Workaround to get local file loads of dojo to work on IE 7
-               //by forcing to not use native xhr.
-               if(dojo.isIE && window.location.protocol === "file:"){
-                       dojo.config.ieForceActiveXXhr=true;
-               }
-               
-               d.isQuirks = document.compatMode == "BackCompat";
-
-               // TODO: is the HTML LANG attribute relevant?
-               d.locale = dojo.config.locale || (d.isIE ? n.userLanguage : n.language).toLowerCase();
-
-               // These are in order of decreasing likelihood; this will change in time.
-                               d._XMLHTTP_PROGIDS = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];
-               
-               d._xhrObj = function(){
-                       // summary: 
-                       //              does the work of portably generating a new XMLHTTPRequest object.
-                       var http, last_e;
-                                               if(!dojo.isIE || !dojo.config.ieForceActiveXXhr){
-                                                       try{ http = new XMLHttpRequest(); }catch(e){}
-                                               }
-                       if(!http){
-                               for(var i=0; i<3; ++i){
-                                       var progid = d._XMLHTTP_PROGIDS[i];
-                                       try{
-                                               http = new ActiveXObject(progid);
-                                       }catch(e){
-                                               last_e = e;
-                                       }
-
-                                       if(http){
-                                               d._XMLHTTP_PROGIDS = [progid];  // so faster next time
-                                               break;
-                                       }
-                               }
-                       }
-                       
-                       if(!http){
-                               throw new Error("XMLHTTP not available: "+last_e);
-                       }
-
-                       return http; // XMLHTTPRequest instance
-               }
-
-               d._isDocumentOk = function(http){
-                       var stat = http.status || 0,
-                               lp = location.protocol;
-                       return (stat >= 200 && stat < 300) ||   // Boolean
-                               stat == 304 ||                                          // allow any 2XX response code
-                               stat == 1223 ||                                                 // get it out of the cache
-                               (!stat && (lp == "file:" || lp == "chrome:" || lp == "app:") ); // Internet Explorer mangled the status code OR we're Titanium requesting a local file
-               }
-
-               //See if base tag is in use.
-               //This is to fix http://trac.dojotoolkit.org/ticket/3973,
-               //but really, we need to find out how to get rid of the dojo._Url reference
-               //below and still have DOH work with the dojo.i18n test following some other
-               //test that uses the test frame to load a document (trac #2757).
-               //Opera still has problems, but perhaps a larger issue of base tag support
-               //with XHR requests (hasBase is true, but the request is still made to document
-               //path, not base path).
-               var owloc = window.location+"";
-               var base = document.getElementsByTagName("base");
-               var hasBase = (base && base.length > 0);
-
-               d._getText = function(/*URI*/ uri, /*Boolean*/ fail_ok){
-                       // summary: Read the contents of the specified uri and return those contents.
-                       // uri:
-                       //              A relative or absolute uri. If absolute, it still must be in
-                       //              the same "domain" as we are.
-                       // fail_ok:
-                       //              Default false. If fail_ok and loading fails, return null
-                       //              instead of throwing.
-                       // returns: The response text. null is returned when there is a
-                       //              failure and failure is okay (an exception otherwise)
-
-                       // NOTE: must be declared before scope switches ie. this._xhrObj()
-                       var http = d._xhrObj();
-
-                       if(!hasBase && dojo._Url){
-                               uri = (new dojo._Url(owloc, uri)).toString();
-                       }
-
-                       if(d.config.cacheBust){
-                               //Make sure we have a string before string methods are used on uri
-                               uri += "";
-                               uri += (uri.indexOf("?") == -1 ? "?" : "&") + String(d.config.cacheBust).replace(/\W+/g,"");
-                       }
-
-                       http.open('GET', uri, false);
-                       try{
-                               http.send(null);
-                               if(!d._isDocumentOk(http)){
-                                       var err = Error("Unable to load "+uri+" status:"+ http.status);
-                                       err.status = http.status;
-                                       err.responseText = http.responseText;
-                                       throw err;
-                               }
-                       }catch(e){
-                               if(fail_ok){ return null; } // null
-                               // rethrow the exception
-                               throw e;
-                       }
-                       return http.responseText; // String
-               }
-               
-
-               var _w = window;
-               var _handleNodeEvent = function(/*String*/evtName, /*Function*/fp){
-                       // summary:
-                       //              non-destructively adds the specified function to the node's
-                       //              evtName handler.
-                       // evtName: should be in the form "onclick" for "onclick" handlers.
-                       // Make sure you pass in the "on" part.
-                       var _a = _w.attachEvent || _w.addEventListener;
-                       evtName = _w.attachEvent ? evtName : evtName.substring(2);
-                       _a(evtName, function(){
-                               fp.apply(_w, arguments);
-                       }, false);
-               };
-
-
-               d._windowUnloaders = [];
-               
-               d.windowUnloaded = function(){
-                       // summary:
-                       //              signal fired by impending window destruction. You may use
-                       //              dojo.addOnWindowUnload() to register a listener for this
-                       //              event. NOTE: if you wish to dojo.connect() to this method
-                       //              to perform page/application cleanup, be aware that this
-                       //              event WILL NOT fire if no handler has been registered with
-                       //              dojo.addOnWindowUnload. This behavior started in Dojo 1.3.
-                       //              Previous versions always triggered dojo.windowUnloaded. See
-                       //              dojo.addOnWindowUnload for more info.
-                       var mll = d._windowUnloaders;
-                       while(mll.length){
-                               (mll.pop())();
-                       }
-               };
-
-               var _onWindowUnloadAttached = 0;
-               d.addOnWindowUnload = function(/*Object?|Function?*/obj, /*String|Function?*/functionName){
-                       // summary:
-                       //              registers a function to be triggered when window.onunload
-                       //              fires. 
-                       //      description:
-                       //              The first time that addOnWindowUnload is called Dojo
-                       //              will register a page listener to trigger your unload
-                       //              handler with. Note that registering these handlers may
-                       //              destory "fastback" page caching in browsers that support
-                       //              it. Be careful trying to modify the DOM or access
-                       //              JavaScript properties during this phase of page unloading:
-                       //              they may not always be available. Consider
-                       //              dojo.addOnUnload() if you need to modify the DOM or do
-                       //              heavy JavaScript work since it fires at the eqivalent of
-                       //              the page's "onbeforeunload" event.
-                       // example:
-                       //      |       dojo.addOnWindowUnload(functionPointer)
-                       //      |       dojo.addOnWindowUnload(object, "functionName");
-                       //      |       dojo.addOnWindowUnload(object, function(){ /* ... */});
-
-                       d._onto(d._windowUnloaders, obj, functionName);
-                       if(!_onWindowUnloadAttached){
-                               _onWindowUnloadAttached = 1;
-                               _handleNodeEvent("onunload", d.windowUnloaded);
-                       }
-               };
-
-               var _onUnloadAttached = 0;
-               d.addOnUnload = function(/*Object?|Function?*/obj, /*String|Function?*/functionName){
-                       // summary:
-                       //              registers a function to be triggered when the page unloads.
-                       //      description:
-                       //              The first time that addOnUnload is called Dojo will
-                       //              register a page listener to trigger your unload handler
-                       //              with. 
-                       //
-                       //              In a browser enviroment, the functions will be triggered
-                       //              during the window.onbeforeunload event. Be careful of doing
-                       //              too much work in an unload handler. onbeforeunload can be
-                       //              triggered if a link to download a file is clicked, or if
-                       //              the link is a javascript: link. In these cases, the
-                       //              onbeforeunload event fires, but the document is not
-                       //              actually destroyed. So be careful about doing destructive
-                       //              operations in a dojo.addOnUnload callback.
-                       //
-                       //              Further note that calling dojo.addOnUnload will prevent
-                       //              browsers from using a "fast back" cache to make page
-                       //              loading via back button instantaneous. 
-                       // example:
-                       //      |       dojo.addOnUnload(functionPointer)
-                       //      |       dojo.addOnUnload(object, "functionName")
-                       //      |       dojo.addOnUnload(object, function(){ /* ... */});
-
-                       d._onto(d._unloaders, obj, functionName);
-                       if(!_onUnloadAttached){
-                               _onUnloadAttached = 1;
-                               _handleNodeEvent("onbeforeunload", dojo.unloaded);
-                       }
-               };
-
-       })();
-
-       //START DOMContentLoaded
-       dojo._initFired = false;
-       dojo._loadInit = function(e){
-               if(!dojo._initFired){
-                       dojo._initFired = true;
-
-                       //Help out IE to avoid memory leak.
-                       if(!dojo.config.afterOnLoad && window.detachEvent){
-                               window.detachEvent("onload", dojo._loadInit);
-                       }
-
-                       if(dojo._inFlightCount == 0){
-                               dojo._modulesLoaded();
-                       }
-               }
-       }
-
-       if(!dojo.config.afterOnLoad){
-               if(document.addEventListener){
-                       //Standards. Hooray! Assumption here that if standards based,
-                       //it knows about DOMContentLoaded. It is OK if it does not, the fall through
-                       //to window onload should be good enough.
-                       document.addEventListener("DOMContentLoaded", dojo._loadInit, false);
-                       window.addEventListener("load", dojo._loadInit, false);
-               }else if(window.attachEvent){
-                       window.attachEvent("onload", dojo._loadInit);
-               }
-       }
-
-               if(dojo.isIE){
-               //      for Internet Explorer. readyState will not be achieved on init
-               //      call, but dojo doesn't need it however, we'll include it
-               //      because we don't know if there are other functions added that
-               //      might.  Note that this has changed because the build process
-               //      strips all comments -- including conditional ones.
-               if(!dojo.config.afterOnLoad && !dojo.config.skipIeDomLoaded){
-                       document.write('<scr'+'ipt defer src="//:" '
-                               + 'onreadystatechange="if(this.readyState==\'complete\'){' + dojo._scopeName + '._loadInit();}">'
-                               + '</scr'+'ipt>'
-                       );
-               }
-
-               try{
-                       document.namespaces.add("v","urn:schemas-microsoft-com:vml");
-                       var vmlElems = ["*", "group", "roundrect", "oval", "shape", "rect", "imagedata"],
-                               i = 0, l = 1, s = document.createStyleSheet();
-                       if(dojo.isIE >= 8){
-                               i = 1;
-                               l = vmlElems.length;
-                       }
-                       for(; i < l; ++i){
-                               s.addRule("v\\:" + vmlElems[i], "behavior:url(#default#VML); display:inline-block");
-                       }
-               }catch(e){}
-       }
-               //END DOMContentLoaded
-
-
-       /*
-       OpenAjax.subscribe("OpenAjax", "onload", function(){
-               if(dojo._inFlightCount == 0){
-                       dojo._modulesLoaded();
-               }
-       });
-
-       OpenAjax.subscribe("OpenAjax", "onunload", function(){
-               dojo.unloaded();
-       });
-       */
-} //if (typeof window != 'undefined')
-
-//Register any module paths set up in djConfig. Need to do this
-//in the hostenvs since hostenv_browser can read djConfig from a
-//script tag's attribute.
-(function(){
-       var mp = dojo.config["modulePaths"];
-       if(mp){
-               for(var param in mp){
-                       dojo.registerModulePath(param, mp[param]);
-               }
-       }
-})();
-
-//Load debug code if necessary.
-if(dojo.config.isDebug){
-       dojo.require("dojo._firebug.firebug");
-}
-
-if(dojo.config.debugAtAllCosts){
-       dojo.config.useXDomain = true;
-       dojo.require("dojo._base._loader.loader_xd");
-       dojo.require("dojo._base._loader.loader_debug");
-       dojo.require("dojo.i18n");
-}
-
-if(!dojo._hasResource["dojo._base.lang"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.lang"] = true;
-dojo.provide("dojo._base.lang");
-
-(function(){
-       var d = dojo, opts = Object.prototype.toString;
-
-       // Crockford (ish) functions
-
-       dojo.isString = function(/*anything*/ it){
-               //      summary:
-               //              Return true if it is a String
-               return (typeof it == "string" || it instanceof String); // Boolean
-       }
-
-       dojo.isArray = function(/*anything*/ it){
-               //      summary:
-               //              Return true if it is an Array.
-               //              Does not work on Arrays created in other windows.
-               return it && (it instanceof Array || typeof it == "array"); // Boolean
-       }
-
-       dojo.isFunction = function(/*anything*/ it){
-               // summary:
-               //              Return true if it is a Function
-               return opts.call(it) === "[object Function]";
-       };
-
-       dojo.isObject = function(/*anything*/ it){
-               // summary:
-               //              Returns true if it is a JavaScript object (or an Array, a Function
-               //              or null)
-               return it !== undefined &&
-                       (it === null || typeof it == "object" || d.isArray(it) || d.isFunction(it)); // Boolean
-       }
-
-       dojo.isArrayLike = function(/*anything*/ it){
-               //      summary:
-               //              similar to dojo.isArray() but more permissive
-               //      description:
-               //              Doesn't strongly test for "arrayness".  Instead, settles for "isn't
-               //              a string or number and has a length property". Arguments objects
-               //              and DOM collections will return true when passed to
-               //              dojo.isArrayLike(), but will return false when passed to
-               //              dojo.isArray().
-               //      returns:
-               //              If it walks like a duck and quacks like a duck, return `true`
-               return it && it !== undefined && // Boolean
-                       // keep out built-in constructors (Number, String, ...) which have length
-                       // properties
-                       !d.isString(it) && !d.isFunction(it) &&
-                       !(it.tagName && it.tagName.toLowerCase() == 'form') &&
-                       (d.isArray(it) || isFinite(it.length));
-       }
-
-       dojo.isAlien = function(/*anything*/ it){
-               // summary:
-               //              Returns true if it is a built-in function or some other kind of
-               //              oddball that *should* report as a function but doesn't
-               return it && !d.isFunction(it) && /\{\s*\[native code\]\s*\}/.test(String(it)); // Boolean
-       }
-
-       dojo.extend = function(/*Object*/ constructor, /*Object...*/ props){
-               // summary:
-               //              Adds all properties and methods of props to constructor's
-               //              prototype, making them available to all instances created with
-               //              constructor.
-               for(var i=1, l=arguments.length; i<l; i++){
-                       d._mixin(constructor.prototype, arguments[i]);
-               }
-               return constructor; // Object
-       }
-
-       dojo._hitchArgs = function(scope, method /*,...*/){
-               var pre = d._toArray(arguments, 2);
-               var named = d.isString(method);
-               return function(){
-                       // arrayify arguments
-                       var args = d._toArray(arguments);
-                       // locate our method
-                       var f = named ? (scope||d.global)[method] : method;
-                       // invoke with collected args
-                       return f && f.apply(scope || this, pre.concat(args)); // mixed
-               } // Function
-       }
-
-       dojo.hitch = function(/*Object*/scope, /*Function|String*/method /*,...*/){
-               //      summary:
-               //              Returns a function that will only ever execute in the a given scope.
-               //              This allows for easy use of object member functions
-               //              in callbacks and other places in which the "this" keyword may
-               //              otherwise not reference the expected scope.
-               //              Any number of default positional arguments may be passed as parameters 
-               //              beyond "method".
-               //              Each of these values will be used to "placehold" (similar to curry)
-               //              for the hitched function.
-               //      scope:
-               //              The scope to use when method executes. If method is a string,
-               //              scope is also the object containing method.
-               //      method:
-               //              A function to be hitched to scope, or the name of the method in
-               //              scope to be hitched.
-               //      example:
-               //      |       dojo.hitch(foo, "bar")();
-               //              runs foo.bar() in the scope of foo
-               //      example:
-               //      |       dojo.hitch(foo, myFunction);
-               //              returns a function that runs myFunction in the scope of foo
-               //      example:
-               //              Expansion on the default positional arguments passed along from
-               //              hitch. Passed args are mixed first, additional args after.
-               //      |       var foo = { bar: function(a, b, c){ console.log(a, b, c); } };
-               //      |       var fn = dojo.hitch(foo, "bar", 1, 2);
-               //      |       fn(3); // logs "1, 2, 3"
-               //      example:
-               //      |       var foo = { bar: 2 };
-               //      |       dojo.hitch(foo, function(){ this.bar = 10; })();
-               //              execute an anonymous function in scope of foo
-               
-               if(arguments.length > 2){
-                       return d._hitchArgs.apply(d, arguments); // Function
-               }
-               if(!method){
-                       method = scope;
-                       scope = null;
-               }
-               if(d.isString(method)){
-                       scope = scope || d.global;
-                       if(!scope[method]){ throw(['dojo.hitch: scope["', method, '"] is null (scope="', scope, '")'].join('')); }
-                       return function(){ return scope[method].apply(scope, arguments || []); }; // Function
-               }
-               return !scope ? method : function(){ return method.apply(scope, arguments || []); }; // Function
-       }
-
-       /*=====
-       dojo.delegate = function(obj, props){
-               //      summary:
-               //              Returns a new object which "looks" to obj for properties which it
-               //              does not have a value for. Optionally takes a bag of properties to
-               //              seed the returned object with initially.
-               //      description:
-               //              This is a small implementaton of the Boodman/Crockford delegation
-               //              pattern in JavaScript. An intermediate object constructor mediates
-               //              the prototype chain for the returned object, using it to delegate
-               //              down to obj for property lookup when object-local lookup fails.
-               //              This can be thought of similarly to ES4's "wrap", save that it does
-               //              not act on types but rather on pure objects.
-               //      obj:
-               //              The object to delegate to for properties not found directly on the
-               //              return object or in props.
-               //      props:
-               //              an object containing properties to assign to the returned object
-               //      returns:
-               //              an Object of anonymous type
-               //      example:
-               //      |       var foo = { bar: "baz" };
-               //      |       var thinger = dojo.delegate(foo, { thud: "xyzzy"});
-               //      |       thinger.bar == "baz"; // delegated to foo
-               //      |       foo.thud == undefined; // by definition
-               //      |       thinger.thud == "xyzzy"; // mixed in from props
-               //      |       foo.bar = "thonk";
-               //      |       thinger.bar == "thonk"; // still delegated to foo's bar
-       }
-       =====*/
-
-       dojo.delegate = dojo._delegate = (function(){
-               // boodman/crockford delegation w/ cornford optimization
-               function TMP(){}
-               return function(obj, props){
-                       TMP.prototype = obj;
-                       var tmp = new TMP();
-                       TMP.prototype = null;
-                       if(props){
-                               d._mixin(tmp, props);
-                       }
-                       return tmp; // Object
-               }
-       })();
-
-       /*=====
-       dojo._toArray = function(obj, offset, startWith){
-               //      summary:
-               //              Converts an array-like object (i.e. arguments, DOMCollection) to an
-               //              array. Returns a new Array with the elements of obj.
-               //      obj: Object
-               //              the object to "arrayify". We expect the object to have, at a
-               //              minimum, a length property which corresponds to integer-indexed
-               //              properties.
-               //      offset: Number?
-               //              the location in obj to start iterating from. Defaults to 0.
-               //              Optional.
-               //      startWith: Array?
-               //              An array to pack with the properties of obj. If provided,
-               //              properties in obj are appended at the end of startWith and
-               //              startWith is the returned array.
-       }
-       =====*/
-
-       var efficient = function(obj, offset, startWith){
-               return (startWith||[]).concat(Array.prototype.slice.call(obj, offset||0));
-       };
-
-               var slow = function(obj, offset, startWith){
-               var arr = startWith||[];
-               for(var x = offset || 0; x < obj.length; x++){
-                       arr.push(obj[x]);
-               }
-               return arr;
-       };
-       
-       dojo._toArray =
-                               d.isIE ?  function(obj){
-                       return ((obj.item) ? slow : efficient).apply(this, arguments);
-               } :
-                               efficient;
-
-       dojo.partial = function(/*Function|String*/method /*, ...*/){
-               //      summary:
-               //              similar to hitch() except that the scope object is left to be
-               //              whatever the execution context eventually becomes.
-               //      description:
-               //              Calling dojo.partial is the functional equivalent of calling:
-               //              |       dojo.hitch(null, funcName, ...);
-               var arr = [ null ];
-               return d.hitch.apply(d, arr.concat(d._toArray(arguments))); // Function
-       }
-
-       var extraNames = d._extraNames, extraLen = extraNames.length, empty = {};
-
-       dojo.clone = function(/*anything*/ o){
-               // summary:
-               //              Clones objects (including DOM nodes) and all children.
-               //              Warning: do not clone cyclic structures.
-               if(!o || typeof o != "object" || d.isFunction(o)){
-                       // null, undefined, any non-object, or function
-                       return o;       // anything
-               }
-               if(o.nodeType && o.cloneNode){
-                       // DOM Node
-                       return o.cloneNode(true); // Node
-               }
-               if(o instanceof Date){
-                       // Date
-                       return new Date(o.getTime());   // Date
-               }
-               var r, i, l, s, name;
-               if(d.isArray(o)){
-                       // array
-                       r = [];
-                       for(i = 0, l = o.length; i < l; ++i){
-                               if(i in o){
-                                       r.push(d.clone(o[i]));
-                               }
-                       }
-// we don't clone functions for performance reasons
-//             }else if(d.isFunction(o)){
-//                     // function
-//                     r = function(){ return o.apply(this, arguments); };
-               }else{
-                       // generic objects
-                       r = o.constructor ? new o.constructor() : {};
-               }
-               for(name in o){
-                       // the "tobj" condition avoid copying properties in "source"
-                       // inherited from Object.prototype.  For example, if target has a custom
-                       // toString() method, don't overwrite it with the toString() method
-                       // that source inherited from Object.prototype
-                       s = o[name];
-                       if(!(name in r) || (r[name] !== s && (!(name in empty) || empty[name] !== s))){
-                               r[name] = d.clone(s);
-                       }
-               }
-                               // IE doesn't recognize some custom functions in for..in
-               if(extraLen){
-                       for(i = 0; i < extraLen; ++i){
-                               name = extraNames[i];
-                               s = o[name];
-                               if(!(name in r) || (r[name] !== s && (!(name in empty) || empty[name] !== s))){
-                                       r[name] = s; // functions only, we don't clone them
-                               }
-                       }
-               }
-                               return r; // Object
-       }
-
-       /*=====
-       dojo.trim = function(str){
-               //      summary:
-               //              Trims whitespace from both sides of the string
-               //      str: String
-               //              String to be trimmed
-               //      returns: String
-               //              Returns the trimmed string
-               //      description:
-               //              This version of trim() was selected for inclusion into the base due
-               //              to its compact size and relatively good performance
-               //              (see [Steven Levithan's blog](http://blog.stevenlevithan.com/archives/faster-trim-javascript)
-               //              Uses String.prototype.trim instead, if available.
-               //              The fastest but longest version of this function is located at
-               //              dojo.string.trim()
-               return "";      // String
-       }
-       =====*/
-
-       dojo.trim = String.prototype.trim ?
-               function(str){ return str.trim(); } :
-               function(str){ return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); };
-
-       /*=====
-       dojo.replace = function(tmpl, map, pattern){
-               //      summary:
-               //              Performs parameterized substitutions on a string. Throws an
-               //              exception if any parameter is unmatched. 
-               //      tmpl: String
-               //              String to be used as a template.
-               //      map: Object|Function
-               //              If an object, it is used as a dictionary to look up substitutions.
-               //              If a function, it is called for every substitution with following
-               //              parameters: a whole match, a name, an offset, and the whole template
-               //              string (see https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String/replace
-               //              for more details).
-               //      pattern: RegEx?
-               //              Optional regular expression objects that overrides the default pattern.
-               //              Must be global and match one item. The default is: /\{([^\}]+)\}/g,
-               //              which matches patterns like that: "{xxx}", where "xxx" is any sequence
-               //              of characters, which doesn't include "}".
-               //      returns: String
-               //              Returns the substituted string.
-               //      example:
-               //      |       // uses a dictionary for substitutions:
-               //      |       dojo.replace("Hello, {name.first} {name.last} AKA {nick}!",
-               //      |         {
-               //      |           nick: "Bob",
-               //      |           name: {
-               //      |             first:  "Robert",
-               //      |             middle: "X",
-               //      |             last:   "Cringely"
-               //      |           }
-               //      |         });
-               //      |       // returns: Hello, Robert Cringely AKA Bob!
-               //      example:
-               //      |       // uses an array for substitutions:
-               //      |       dojo.replace("Hello, {0} {2}!",
-               //      |         ["Robert", "X", "Cringely"]);
-               //      |       // returns: Hello, Robert Cringely!
-               //      example:
-               //      |       // uses a function for substitutions:
-               //      |       function sum(a){
-               //      |         var t = 0;
-               //      |         dojo.forEach(a, function(x){ t += x; });
-               //      |         return t;
-               //      |       }
-               //      |       dojo.replace(
-               //      |         "{count} payments averaging {avg} USD per payment.",
-               //      |         dojo.hitch(
-               //      |           { payments: [11, 16, 12] },
-               //      |           function(_, key){
-               //      |             switch(key){
-               //      |               case "count": return this.payments.length;
-               //      |               case "min":   return Math.min.apply(Math, this.payments);
-               //      |               case "max":   return Math.max.apply(Math, this.payments);
-               //      |               case "sum":   return sum(this.payments);
-               //      |               case "avg":   return sum(this.payments) / this.payments.length;
-               //      |             }
-               //      |           }
-               //      |         )
-               //      |       );
-               //      |       // prints: 3 payments averaging 13 USD per payment.
-               //      example:
-               //      |       // uses an alternative PHP-like pattern for substitutions:
-               //      |       dojo.replace("Hello, ${0} ${2}!",
-               //      |         ["Robert", "X", "Cringely"], /\$\{([^\}]+)\}/g);
-               //      |       // returns: Hello, Robert Cringely!
-               return "";      // String
-       }
-       =====*/
-
-       var _pattern = /\{([^\}]+)\}/g;
-       dojo.replace = function(tmpl, map, pattern){
-               return tmpl.replace(pattern || _pattern, d.isFunction(map) ?
-                       map : function(_, k){ return d.getObject(k, false, map); });
-       };
-})();
-
-}
-
-if(!dojo._hasResource["dojo._base.array"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.array"] = true;
-
-dojo.provide("dojo._base.array");
-
-(function(){
-       var _getParts = function(arr, obj, cb){
-               return [ 
-                       (typeof arr == "string") ? arr.split("") : arr, 
-                       obj || dojo.global,
-                       // FIXME: cache the anonymous functions we create here?
-                       (typeof cb == "string") ? new Function("item", "index", "array", cb) : cb
-               ];
-       };
-
-       var everyOrSome = function(/*Boolean*/every, /*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
-               var _p = _getParts(arr, thisObject, callback); arr = _p[0];
-               for(var i=0,l=arr.length; i<l; ++i){
-                       var result = !!_p[2].call(_p[1], arr[i], i, arr);
-                       if(every ^ result){
-                               return result; // Boolean
-                       }
-               }
-               return every; // Boolean
-       };
-
-       dojo.mixin(dojo, {
-               indexOf: function(      /*Array*/               array, 
-                                                       /*Object*/              value,
-                                                       /*Integer?*/    fromIndex,
-                                                       /*Boolean?*/    findLast){
-                       // summary:
-                       //              locates the first index of the provided value in the
-                       //              passed array. If the value is not found, -1 is returned.
-                       // description:
-                       //              This method corresponds to the JavaScript 1.6 Array.indexOf method, with one difference: when
-                       //              run over sparse arrays, the Dojo function invokes the callback for every index whereas JavaScript 
-                       //              1.6's indexOf skips the holes in the sparse array.
-                       //              For details on this method, see:
-                       //                      https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/indexOf
-
-                       var step = 1, end = array.length || 0, i = 0;
-                       if(findLast){
-                               i = end - 1;
-                               step = end = -1;
-                       }
-                       if(fromIndex != undefined){ i = fromIndex; }
-                       if((findLast && i > end) || i < end){
-                               for(; i != end; i += step){
-                                       if(array[i] == value){ return i; }
-                               }
-                       }
-                       return -1;      // Number
-               },
-
-               lastIndexOf: function(/*Array*/array, /*Object*/value, /*Integer?*/fromIndex){
-                       // summary:
-                       //              locates the last index of the provided value in the passed
-                       //              array. If the value is not found, -1 is returned.
-                       // description:
-                       //              This method corresponds to the JavaScript 1.6 Array.lastIndexOf method, with one difference: when
-                       //              run over sparse arrays, the Dojo function invokes the callback for every index whereas JavaScript 
-                       //              1.6's lastIndexOf skips the holes in the sparse array.
-                       //              For details on this method, see:
-                       //                      https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/lastIndexOf
-                       return dojo.indexOf(array, value, fromIndex, true); // Number
-               },
-
-               forEach: function(/*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
-                       //      summary:
-                       //              for every item in arr, callback is invoked. Return values are ignored.
-                       //              If you want to break out of the loop, consider using dojo.every() or dojo.some().
-                       //              forEach does not allow breaking out of the loop over the items in arr.
-                       //      arr:
-                       //              the array to iterate over. If a string, operates on individual characters.
-                       //      callback:
-                       //              a function is invoked with three arguments: item, index, and array
-                       //      thisObject:
-                       //              may be used to scope the call to callback
-                       //      description:
-                       //              This function corresponds to the JavaScript 1.6 Array.forEach() method, with one difference: when 
-                       //              run over sparse arrays, this implemenation passes the "holes" in the sparse array to
-                       //              the callback function with a value of undefined. JavaScript 1.6's forEach skips the holes in the sparse array.
-                       //              For more details, see:
-                       //                      https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/forEach
-                       //      example:
-                       //      |       // log out all members of the array:
-                       //      |       dojo.forEach(
-                       //      |               [ "thinger", "blah", "howdy", 10 ],
-                       //      |               function(item){
-                       //      |                       console.log(item);
-                       //      |               }
-                       //      |       );
-                       //      example:
-                       //      |       // log out the members and their indexes
-                       //      |       dojo.forEach(
-                       //      |               [ "thinger", "blah", "howdy", 10 ],
-                       //      |               function(item, idx, arr){
-                       //      |                       console.log(item, "at index:", idx);
-                       //      |               }
-                       //      |       );
-                       //      example:
-                       //      |       // use a scoped object member as the callback
-                       //      |       
-                       //      |       var obj = {
-                       //      |               prefix: "logged via obj.callback:", 
-                       //      |               callback: function(item){
-                       //      |                       console.log(this.prefix, item);
-                       //      |               }
-                       //      |       };
-                       //      |       
-                       //      |       // specifying the scope function executes the callback in that scope
-                       //      |       dojo.forEach(
-                       //      |               [ "thinger", "blah", "howdy", 10 ],
-                       //      |               obj.callback,
-                       //      |               obj
-                       //      |       );
-                       //      |       
-                       //      |       // alternately, we can accomplish the same thing with dojo.hitch()
-                       //      |       dojo.forEach(
-                       //      |               [ "thinger", "blah", "howdy", 10 ],
-                       //      |               dojo.hitch(obj, "callback")
-                       //      |       );
-
-                       // match the behavior of the built-in forEach WRT empty arrs
-                       if(!arr || !arr.length){ return; }
-
-                       // FIXME: there are several ways of handilng thisObject. Is
-                       // dojo.global always the default context?
-                       var _p = _getParts(arr, thisObject, callback); arr = _p[0];
-                       for(var i=0,l=arr.length; i<l; ++i){ 
-                               _p[2].call(_p[1], arr[i], i, arr);
-                       }
-               },
-
-               every: function(/*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
-                       // summary:
-                       //              Determines whether or not every item in arr satisfies the
-                       //              condition implemented by callback.
-                       // arr:
-                       //              the array to iterate on. If a string, operates on individual characters.
-                       // callback:
-                       //              a function is invoked with three arguments: item, index,
-                       //              and array and returns true if the condition is met.
-                       // thisObject:
-                       //              may be used to scope the call to callback
-                       // description:
-                       //              This function corresponds to the JavaScript 1.6 Array.every() method, with one difference: when 
-                       //              run over sparse arrays, this implemenation passes the "holes" in the sparse array to
-                       //              the callback function with a value of undefined. JavaScript 1.6's every skips the holes in the sparse array.
-                       //              For more details, see:
-                       //                      https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/every
-                       // example:
-                       //      |       // returns false
-                       //      |       dojo.every([1, 2, 3, 4], function(item){ return item>1; });
-                       // example:
-                       //      |       // returns true 
-                       //      |       dojo.every([1, 2, 3, 4], function(item){ return item>0; });
-                       return everyOrSome(true, arr, callback, thisObject); // Boolean
-               },
-
-               some: function(/*Array|String*/arr, /*Function|String*/callback, /*Object?*/thisObject){
-                       // summary:
-                       //              Determines whether or not any item in arr satisfies the
-                       //              condition implemented by callback.
-                       // arr:
-                       //              the array to iterate over. If a string, operates on individual characters.
-                       // callback:
-                       //              a function is invoked with three arguments: item, index,
-                       //              and array and returns true if the condition is met.
-                       // thisObject:
-                       //              may be used to scope the call to callback
-                       // description:
-                       //              This function corresponds to the JavaScript 1.6 Array.some() method, with one difference: when 
-                       //              run over sparse arrays, this implemenation passes the "holes" in the sparse array to
-                       //              the callback function with a value of undefined. JavaScript 1.6's some skips the holes in the sparse array.
-                       //              For more details, see:
-                       //                      https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/some
-                       // example:
-                       //      |       // is true
-                       //      |       dojo.some([1, 2, 3, 4], function(item){ return item>1; });
-                       // example:
-                       //      |       // is false
-                       //      |       dojo.some([1, 2, 3, 4], function(item){ return item<1; });
-                       return everyOrSome(false, arr, callback, thisObject); // Boolean
-               },
-
-               map: function(/*Array|String*/arr, /*Function|String*/callback, /*Function?*/thisObject){
-                       // summary:
-                       //              applies callback to each element of arr and returns
-                       //              an Array with the results
-                       // arr:
-                       //              the array to iterate on. If a string, operates on
-                       //              individual characters.
-                       // callback:
-                       //              a function is invoked with three arguments, (item, index,
-                       //              array),  and returns a value
-                       // thisObject:
-                       //              may be used to scope the call to callback
-                       // description:
-                       //              This function corresponds to the JavaScript 1.6 Array.map() method, with one difference: when 
-                       //              run over sparse arrays, this implemenation passes the "holes" in the sparse array to
-                       //              the callback function with a value of undefined. JavaScript 1.6's map skips the holes in the sparse array.
-                       //              For more details, see:
-                       //                      https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map
-                       // example:
-                       //      |       // returns [2, 3, 4, 5]
-                       //      |       dojo.map([1, 2, 3, 4], function(item){ return item+1 });
-
-                       var _p = _getParts(arr, thisObject, callback); arr = _p[0];
-                       var outArr = (arguments[3] ? (new arguments[3]()) : []);
-                       for(var i=0,l=arr.length; i<l; ++i){
-                               outArr.push(_p[2].call(_p[1], arr[i], i, arr));
-                       }
-                       return outArr; // Array
-               },
-
-               filter: function(/*Array*/arr, /*Function|String*/callback, /*Object?*/thisObject){
-                       // summary:
-                       //              Returns a new Array with those items from arr that match the
-                       //              condition implemented by callback.
-                       // arr:
-                       //              the array to iterate over.
-                       // callback:
-                       //              a function that is invoked with three arguments (item,
-                       //              index, array). The return of this function is expected to
-                       //              be a boolean which determines whether the passed-in item
-                       //              will be included in the returned array.
-                       // thisObject:
-                       //              may be used to scope the call to callback
-                       // description:
-                       //              This function corresponds to the JavaScript 1.6 Array.filter() method, with one difference: when 
-                       //              run over sparse arrays, this implemenation passes the "holes" in the sparse array to
-                       //              the callback function with a value of undefined. JavaScript 1.6's filter skips the holes in the sparse array. 
-                       //              For more details, see:
-                       //                      https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter
-                       // example:
-                       //      |       // returns [2, 3, 4]
-                       //      |       dojo.filter([1, 2, 3, 4], function(item){ return item>1; });
-
-                       var _p = _getParts(arr, thisObject, callback); arr = _p[0];
-                       var outArr = [];
-                       for(var i=0,l=arr.length; i<l; ++i){
-                               if(_p[2].call(_p[1], arr[i], i, arr)){
-                                       outArr.push(arr[i]);
-                               }
-                       }
-                       return outArr; // Array
-               }
-       });
-})();
-/*
-*/
-
-}
-
-if(!dojo._hasResource["dojo._base.declare"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.declare"] = true;
-dojo.provide("dojo._base.declare");
-
-
-
-
-(function(){
-       var d = dojo, mix = d._mixin, op = Object.prototype, opts = op.toString,
-               xtor = new Function, counter = 0, cname = "constructor";
-
-       function err(msg){ throw new Error("declare: " + msg); }
-
-       // C3 Method Resolution Order (see http://www.python.org/download/releases/2.3/mro/)
-       function c3mro(bases){
-               var result = [], roots = [{cls: 0, refs: []}], nameMap = {}, clsCount = 1,
-                       l = bases.length, i = 0, j, lin, base, top, proto, rec, name, refs;
-
-               // build a list of bases naming them if needed
-               for(; i < l; ++i){
-                       base = bases[i];
-                       if(!base){
-                               err("mixin #" + i + " is null");
-                       }
-                       lin = base._meta ? base._meta.bases : [base];
-                       top = 0;
-                       // add bases to the name map
-                       for(j = lin.length - 1; j >= 0; --j){
-                               proto = lin[j].prototype;
-                               if(!proto.hasOwnProperty("declaredClass")){
-                                       proto.declaredClass = "uniqName_" + (counter++);
-                               }
-                               name = proto.declaredClass;
-                               if(!nameMap.hasOwnProperty(name)){
-                                       nameMap[name] = {count: 0, refs: [], cls: lin[j]};
-                                       ++clsCount;
-                               }
-                               rec = nameMap[name];
-                               if(top && top !== rec){
-                                       rec.refs.push(top);
-                                       ++top.count;
-                               }
-                               top = rec;
-                       }
-                       ++top.count;
-                       roots[0].refs.push(top);
-               }
-
-               // remove classes without external references recursively
-               while(roots.length){
-                       top = roots.pop();
-                       result.push(top.cls);
-                       --clsCount;
-                       // optimization: follow a single-linked chain
-                       while(refs = top.refs, refs.length == 1){
-                               top = refs[0];
-                               if(!top || --top.count){
-                                       // branch or end of chain => do not end to roots
-                                       top = 0;
-                                       break;
-                               }
-                               result.push(top.cls);
-                               --clsCount;
-                       }
-                       if(top){
-                               // branch
-                               for(i = 0, l = refs.length; i < l; ++i){
-                                       top = refs[i];
-                                       if(!--top.count){
-                                               roots.push(top);
-                                       }
-                               }
-                       }
-               }
-               if(clsCount){
-                       err("can't build consistent linearization");
-               }
-
-               // calculate the superclass offset
-               base = bases[0];
-               result[0] = base ?
-                       base._meta && base === result[result.length - base._meta.bases.length] ?
-                               base._meta.bases.length : 1 : 0;
-
-               return result;
-       }
-
-       function inherited(args, a, f){
-               var name, chains, bases, caller, meta, base, proto, opf, pos,
-                       cache = this._inherited = this._inherited || {};
-
-               // crack arguments
-               if(typeof args == "string"){
-                       name = args;
-                       args = a;
-                       a = f;
-               }
-               f = 0;
-
-               caller = args.callee;
-               name = name || caller.nom;
-               if(!name){
-                       err("can't deduce a name to call inherited()");
-               }
-
-               meta = this.constructor._meta;
-               bases = meta.bases;
-
-               pos = cache.p;
-               if(name != cname){
-                       // method
-                       if(cache.c !== caller){
-                               // cache bust
-                               pos = 0;
-                               base = bases[0];
-                               meta = base._meta;
-                               if(meta.hidden[name] !== caller){
-                                       // error detection
-                                       chains = meta.chains;
-                                       if(chains && typeof chains[name] == "string"){
-                                               err("calling chained method with inherited: " + name);
-                                       }
-                                       // find caller
-                                       do{
-                                               meta = base._meta;
-                                               proto = base.prototype;
-                                               if(meta && (proto[name] === caller && proto.hasOwnProperty(name) || meta.hidden[name] === caller)){
-                                                       break;
-                                               }
-                                       }while(base = bases[++pos]); // intentional assignment
-                                       pos = base ? pos : -1;
-                               }
-                       }
-                       // find next
-                       base = bases[++pos];
-                       if(base){
-                               proto = base.prototype;
-                               if(base._meta && proto.hasOwnProperty(name)){
-                                       f = proto[name];
-                               }else{
-                                       opf = op[name];
-                                       do{
-                                               proto = base.prototype;
-                                               f = proto[name];
-                                               if(f && (base._meta ? proto.hasOwnProperty(name) : f !== opf)){
-                                                       break;
-                                               }
-                                       }while(base = bases[++pos]); // intentional assignment
-                               }
-                       }
-                       f = base && f || op[name];
-               }else{
-                       // constructor
-                       if(cache.c !== caller){
-                               // cache bust
-                               pos = 0;
-                               meta = bases[0]._meta;
-                               if(meta && meta.ctor !== caller){
-                                       // error detection
-                                       chains = meta.chains;
-                                       if(!chains || chains.constructor !== "manual"){
-                                               err("calling chained constructor with inherited");
-                                       }
-                                       // find caller
-                                       while(base = bases[++pos]){ // intentional assignment
-                                               meta = base._meta;
-                                               if(meta && meta.ctor === caller){
-                                                       break;
-                                               }
-                                       };
-                                       pos = base ? pos : -1;
-                               }
-                       }
-                       // find next
-                       while(base = bases[++pos]){     // intentional assignment
-                               meta = base._meta;
-                               f = meta ? meta.ctor : base;
-                               if(f){
-                                       break;
-                               }
-                       }
-                       f = base && f;
-               }
-
-               // cache the found super method
-               cache.c = f;
-               cache.p = pos;
-
-               // now we have the result
-               if(f){
-                       return a === true ? f : f.apply(this, a || args);
-               }
-               // intentionally if a super method was not found
-       }
-
-       function getInherited(name, args){
-               if(typeof name == "string"){
-                       return this.inherited(name, args, true);
-               }
-               return this.inherited(name, true);
-       }
-
-       // emulation of "instanceof"
-       function isInstanceOf(cls){
-               var bases = this.constructor._meta.bases;
-               for(var i = 0, l = bases.length; i < l; ++i){
-                       if(bases[i] === cls){
-                               return true;
-                       }
-               }
-               return this instanceof cls;
-       }
-
-       // imlementation of safe mixin function
-       function safeMixin(target, source){
-               var name, t, i = 0, l = d._extraNames.length;
-               // add props adding metadata for incoming functions skipping a constructor
-               for(name in source){
-                       t = source[name];
-                       if((t !== op[name] || !(name in op)) && name != cname){
-                               if(opts.call(t) == "[object Function]"){
-                                       // non-trivial function method => attach its name
-                                       t.nom = name;
-                               }
-                               target[name] = t;
-                       }
-               }
-               // process unenumerable methods on IE
-               for(; i < l; ++i){
-                       name = d._extraNames[i];
-                       t = source[name];
-                       if((t !== op[name] || !(name in op)) && name != cname){
-                               if(opts.call(t) == "[object Function]"){
-                                       // non-trivial function method => attach its name
-                                       t.nom = name;
-                               }
-                               target[name] = t;
-                       }
-               }
-               return target;
-       }
-
-       function extend(source){
-               safeMixin(this.prototype, source);
-               return this;
-       }
-
-       // chained constructor compatible with the legacy dojo.declare()
-       function chainedConstructor(bases, ctorSpecial){
-               return function(){
-                       var a = arguments, args = a, a0 = a[0], f, i, m,
-                               l = bases.length, preArgs;
-                       //this._inherited = {};
-                       // perform the shaman's rituals of the original dojo.declare()
-                       // 1) call two types of the preamble
-                       if(ctorSpecial && (a0 && a0.preamble || this.preamble)){
-                               // full blown ritual
-                               preArgs = new Array(bases.length);
-                               // prepare parameters
-                               preArgs[0] = a;
-                               for(i = 0;;){
-                                       // process the preamble of the 1st argument
-                                       a0 = a[0];
-                                       if(a0){
-                                               f = a0.preamble;
-                                               if(f){
-                                                       a = f.apply(this, a) || a;
-                                               }
-                                       }
-                                       // process the preamble of this class
-                                       f = bases[i].prototype;
-                                       f = f.hasOwnProperty("preamble") && f.preamble;
-                                       if(f){
-                                               a = f.apply(this, a) || a;
-                                       }
-                                       // one pecularity of the preamble:
-                                       // it is called if it is not needed,
-                                       // e.g., there is no constructor to call
-                                       // let's watch for the last constructor
-                                       // (see ticket #9795)
-                                       if(++i == l){
-                                               break;
-                                       }
-                                       preArgs[i] = a;
-                               }
-                       }
-                       // 2) call all non-trivial constructors using prepared arguments
-                       for(i = l - 1; i >= 0; --i){
-                               f = bases[i];
-                               m = f._meta;
-                               f = m ? m.ctor : f;
-                               if(f){
-                                       f.apply(this, preArgs ? preArgs[i] : a);
-                               }
-                       }
-                       // 3) continue the original ritual: call the postscript
-                       f = this.postscript;
-                       if(f){
-                               f.apply(this, args);
-                       }
-               };
-       }
-
-
-       // chained constructor compatible with the legacy dojo.declare()
-       function singleConstructor(ctor, ctorSpecial){
-               return function(){
-                       var a = arguments, t = a, a0 = a[0], f;
-                       //this._inherited = {};
-                       // perform the shaman's rituals of the original dojo.declare()
-                       // 1) call two types of the preamble
-                       if(ctorSpecial){
-                               // full blown ritual
-                               if(a0){
-                                       // process the preamble of the 1st argument
-                                       f = a0.preamble;
-                                       if(f){
-                                               t = f.apply(this, t) || t;
-                                       }
-                               }
-                               f = this.preamble;
-                               if(f){
-                                       // process the preamble of this class
-                                       f.apply(this, t);
-                                       // one pecularity of the preamble:
-                                       // it is called even if it is not needed,
-                                       // e.g., there is no constructor to call
-                                       // let's watch for the last constructor
-                                       // (see ticket #9795)
-                               }
-                       }
-                       // 2) call a constructor
-                       if(ctor){
-                               ctor.apply(this, a);
-                       }
-                       // 3) continue the original ritual: call the postscript
-                       f = this.postscript;
-                       if(f){
-                               f.apply(this, a);
-                       }
-               };
-       }
-
-       // plain vanilla constructor (can use inherited() to call its base constructor)
-       function simpleConstructor(bases){
-               return function(){
-                       var a = arguments, i = 0, f;
-                       //this._inherited = {};
-                       // perform the shaman's rituals of the original dojo.declare()
-                       // 1) do not call the preamble
-                       // 2) call the top constructor (it can use this.inherited())
-                       for(; f = bases[i]; ++i){ // intentional assignment
-                               m = f._meta;
-                               f = m ? m.ctor : f;
-                               if(f){
-                                       f.apply(this, a);
-                                       break;
-                               }
-                       }
-                       // 3) call the postscript
-                       f = this.postscript;
-                       if(f){
-                               f.apply(this, a);
-                       }
-               };
-       }
-
-       function chain(name, bases, reversed){
-               return function(){
-                       var b, m, f, i = 0, step = 1;
-                       if(reversed){
-                               i = bases.length - 1;
-                               step = -1;
-                       }
-                       for(; b = bases[i]; i += step){ // intentional assignment
-                               m = b._meta;
-                               f = (m ? m.hidden : b.prototype)[name];
-                               if(f){
-                                       f.apply(this, arguments);
-                               }
-                       }
-               };
-       }
-
-       d.declare = function(className, superclass, props){
-               var proto, i, t, ctor, name, bases, chains, mixins = 1, parents = superclass;
-
-               // crack parameters
-               if(typeof className != "string"){
-                       props = superclass;
-                       superclass = className;
-                       className = "";
-               }
-               props = props || {};
-
-               // build a prototype
-               if(opts.call(superclass) == "[object Array]"){
-                       // C3 MRO
-                       bases = c3mro(superclass);
-                       t = bases[0];
-                       mixins = bases.length - t;
-                       superclass = bases[mixins];
-               }else{
-                       bases = [0];
-                       if(superclass){
-                               t = superclass._meta;
-                               bases = bases.concat(t ? t.bases : superclass);
-                       }
-               }
-               if(superclass){
-                       for(i = mixins - 1;; --i){
-                               // delegation
-                               xtor.prototype = superclass.prototype;
-                               proto = new xtor;
-                               if(!i){
-                                       // stop if nothing to add (the last base)
-                                       break;
-                               }
-                               // mix in properties
-                               t = bases[i];
-                               mix(proto, t._meta ? t._meta.hidden : t.prototype);
-                               // chain in new constructor
-                               ctor = new Function;
-                               ctor.superclass = superclass;
-                               ctor.prototype = proto;
-                               superclass = proto.constructor = ctor;
-                       }
-               }else{
-                       proto = {};
-               }
-               // add all properties
-               safeMixin(proto, props);
-               // add constructor
-               t = props.constructor;
-               if(t !== op.constructor){
-                       t.nom = cname;
-                       proto.constructor = t;
-               }
-               xtor.prototype = 0;     // cleanup
-
-               // collect chains and flags
-               for(i = mixins - 1; i; --i){ // intentional assignment
-                       t = bases[i]._meta;
-                       if(t && t.chains){
-                               chains = mix(chains || {}, t.chains);
-                       }
-               }
-               if(proto["-chains-"]){
-                       chains = mix(chains || {}, proto["-chains-"]);
-               }
-
-               // build ctor
-               t = !chains || !chains.hasOwnProperty(cname);
-               bases[0] = ctor = (chains && chains.constructor === "manual") ? simpleConstructor(bases) :
-                       (bases.length == 1 ? singleConstructor(props.constructor, t) : chainedConstructor(bases, t));
-
-               // add meta information to the constructor
-               ctor._meta  = {bases: bases, hidden: props, chains: chains,
-                       parents: parents, ctor: props.constructor};
-               ctor.superclass = superclass && superclass.prototype;
-               ctor.extend = extend;
-               ctor.prototype = proto;
-               proto.constructor = ctor;
-
-               // add "standard" methods to the ptototype
-               proto.getInherited = getInherited;
-               proto.inherited = inherited;
-               proto.isInstanceOf = isInstanceOf;
-
-               // add name if specified
-               if(className){
-                       proto.declaredClass = className;
-                       d.setObject(className, ctor);
-               }
-
-               // build chains and add them to the prototype
-               if(chains){
-                       for(name in chains){
-                               if(proto[name] && typeof chains[name] == "string" && name != cname){
-                                       t = proto[name] = chain(name, bases, chains[name] === "after");
-                                       t.nom = name;
-                               }
-                       }
-               }
-               // chained methods do not return values
-               // no need to chain "invisible" functions
-
-               return ctor;    // Function
-       };
-
-       d.safeMixin = safeMixin;
-
-       /*=====
-       dojo.declare = function(className, superclass, props){
-               //      summary:
-               //              Create a feature-rich constructor from compact notation.
-               //      className: String?:
-               //              The optional name of the constructor (loosely, a "class")
-               //              stored in the "declaredClass" property in the created prototype.
-               //              It will be used as a global name for a created constructor.
-               //      superclass: Function|Function[]:
-               //              May be null, a Function, or an Array of Functions. This argument
-               //              specifies a list of bases (the left-most one is the most deepest
-               //              base).
-               //      props: Object:
-               //              An object whose properties are copied to the created prototype.
-               //              Add an instance-initialization function by making it a property
-               //              named "constructor".
-               //      returns:
-               //              New constructor function.
-               //      description:
-               //              Create a constructor using a compact notation for inheritance and
-               //              prototype extension.
-               //
-               //              Mixin ancestors provide a type of multiple inheritance.
-               //              Prototypes of mixin ancestors are copied to the new class:
-               //              changes to mixin prototypes will not affect classes to which
-               //              they have been mixed in.
-               //
-               //              Ancestors can be compound classes created by this version of
-               //              dojo.declare. In complex cases all base classes are going to be
-               //              linearized according to C3 MRO algorithm
-               //              (see http://www.python.org/download/releases/2.3/mro/ for more
-               //              details).
-               //
-               //              "className" is cached in "declaredClass" property of the new class,
-               //              if it was supplied. The immediate super class will be cached in
-               //              "superclass" property of the new class.
-               //
-               //              Methods in "props" will be copied and modified: "nom" property
-               //              (the declared name of the method) will be added to all copied
-               //              functions to help identify them for the internal machinery. Be
-               //              very careful, while reusing methods: if you use the same
-               //              function under different names, it can produce errors in some
-               //              cases.
-               //
-               //              It is possible to use constructors created "manually" (without
-               //              dojo.declare) as bases. They will be called as usual during the
-               //              creation of an instance, their methods will be chained, and even
-               //              called by "this.inherited()".
-               //
-               //              Special property "-chains-" governs how to chain methods. It is
-               //              a dictionary, which uses method names as keys, and hint strings
-               //              as values. If a hint string is "after", this method will be
-               //              called after methods of its base classes. If a hint string is
-               //              "before", this method will be called before methods of its base
-               //              classes.
-               //
-               //              If "constructor" is not mentioned in "-chains-" property, it will
-               //              be chained using the legacy mode: using "after" chaining,
-               //              calling preamble() method before each constructor, if available,
-               //              and calling postscript() after all constructors were executed.
-               //              If the hint is "after", it is chained as a regular method, but
-               //              postscript() will be called after the chain of constructors.
-               //              "constructor" cannot be chained "before", but it allows
-               //              a special hint string: "manual", which means that constructors
-               //              are not going to be chained in any way, and programmer will call
-               //              them manually using this.inherited(). In the latter case
-               //              postscript() will be called after the construction.
-               //
-               //              All chaining hints are "inherited" from base classes and
-               //              potentially can be overridden. Be very careful when overriding
-               //              hints! Make sure that all chained methods can work in a proposed
-               //              manner of chaining.
-               //
-               //              Once a method was chained, it is impossible to unchain it. The
-               //              only exception is "constructor". You don't need to define a
-               //              method in order to supply a chaining hint.
-               //
-               //              If a method is chained, it cannot use this.inherited() because
-               //              all other methods in the hierarchy will be called automatically.
-               //
-               //              Usually constructors and initializers of any kind are chained
-               //              using "after" and destructors of any kind are chained as
-               //              "before". Note that chaining assumes that chained methods do not
-               //              return any value: any returned value will be discarded.
-               //
-               //      example:
-               //      |       dojo.declare("my.classes.bar", my.classes.foo, {
-               //      |               // properties to be added to the class prototype
-               //      |               someValue: 2,
-               //      |               // initialization function
-               //      |               constructor: function(){
-               //      |                       this.myComplicatedObject = new ReallyComplicatedObject();
-               //      |               },
-               //      |               // other functions
-               //      |               someMethod: function(){
-               //      |                       doStuff();
-               //      |               }
-               //      |       });
-               //
-               //      example:
-               //      |       var MyBase = dojo.declare(null, {
-               //      |               // constructor, properties, and methods go here
-               //      |               // ...
-               //      |       });
-               //      |       var MyClass1 = dojo.declare(MyBase, {
-               //      |               // constructor, properties, and methods go here
-               //      |               // ...
-               //      |       });
-               //      |       var MyClass2 = dojo.declare(MyBase, {
-               //      |               // constructor, properties, and methods go here
-               //      |               // ...
-               //      |       });
-               //      |       var MyDiamond = dojo.declare([MyClass1, MyClass2], {
-               //      |               // constructor, properties, and methods go here
-               //      |               // ...
-               //      |       });
-               //
-               //      example:
-               //      |       var F = function(){ console.log("raw constructor"); };
-               //      |       F.prototype.method = function(){
-               //      |               console.log("raw method");
-               //      |       };
-               //      |       var A = dojo.declare(F, {
-               //      |               constructor: function(){
-               //      |                       console.log("A.constructor");
-               //      |               },
-               //      |               method: function(){
-               //      |                       console.log("before calling F.method...");
-               //      |                       this.inherited(arguments);
-               //      |                       console.log("...back in A");
-               //      |               }
-               //      |       });
-               //      |       new A().method();
-               //      |       // will print:
-               //      |       // raw constructor
-               //      |       // A.constructor
-               //      |       // before calling F.method...
-               //      |       // raw method
-               //      |       // ...back in A
-               //
-               //      example:
-               //      |       var A = dojo.declare(null, {
-               //      |               "-chains-": {
-               //      |                       destroy: "before"
-               //      |               }
-               //      |       });
-               //      |       var B = dojo.declare(A, {
-               //      |               constructor: function(){
-               //      |                       console.log("B.constructor");
-               //      |               },
-               //      |               destroy: function(){
-               //      |                       console.log("B.destroy");
-               //      |               }
-               //      |       });
-               //      |       var C = dojo.declare(B, {
-               //      |               constructor: function(){
-               //      |                       console.log("C.constructor");
-               //      |               },
-               //      |               destroy: function(){
-               //      |                       console.log("C.destroy");
-               //      |               }
-               //      |       });
-               //      |       new C().destroy();
-               //      |       // prints:
-               //      |       // B.constructor
-               //      |       // C.constructor
-               //      |       // C.destroy
-               //      |       // B.destroy
-               //
-               //      example:
-               //      |       var A = dojo.declare(null, {
-               //      |               "-chains-": {
-               //      |                       constructor: "manual"
-               //      |               }
-               //      |       });
-               //      |       var B = dojo.declare(A, {
-               //      |               constructor: function(){
-               //      |                       // ...
-               //      |                       // call the base constructor with new parameters
-               //      |                       this.inherited(arguments, [1, 2, 3]);
-               //      |                       // ...
-               //      |               }
-               //      |       });
-               //
-               //      example:
-               //      |       var A = dojo.declare(null, {
-               //      |               "-chains-": {
-               //      |                       m1: "before"
-               //      |               },
-               //      |               m1: function(){
-               //      |                       console.log("A.m1");
-               //      |               },
-               //      |               m2: function(){
-               //      |                       console.log("A.m2");
-               //      |               }
-               //      |       });
-               //      |       var B = dojo.declare(A, {
-               //      |               "-chains-": {
-               //      |                       m2: "after"
-               //      |               },
-               //      |               m1: function(){
-               //      |                       console.log("B.m1");
-               //      |               },
-               //      |               m2: function(){
-               //      |                       console.log("B.m2");
-               //      |               }
-               //      |       });
-               //      |       var x = new B();
-               //      |       x.m1();
-               //      |       // prints:
-               //      |       // B.m1
-               //      |       // A.m1
-               //      |       x.m2();
-               //      |       // prints:
-               //      |       // A.m2
-               //      |       // B.m2
-               return new Function(); // Function
-       };
-       =====*/
-
-       /*=====
-       dojo.safeMixin = function(target, source){
-               //      summary:
-               //              Mix in properties skipping a constructor and decorating functions
-               //              like it is done by dojo.declare.
-               //      target: Object
-               //              Target object to accept new properties.
-               //      source: Object
-               //              Source object for new properties.
-               //      description:
-               //              This function is used to mix in properties like dojo._mixin does,
-               //              but it skips a constructor property and decorates functions like
-               //              dojo.declare does.
-               //
-               //              It is meant to be used with classes and objects produced with
-               //              dojo.declare. Functions mixed in with dojo.safeMixin can use
-               //              this.inherited() like normal methods.
-               //
-               //              This function is used to implement extend() method of a constructor
-               //              produced with dojo.declare().
-               //
-               //      example:
-               //      |       var A = dojo.declare(null, {
-               //      |               m1: function(){
-               //      |                       console.log("A.m1");
-               //      |               },
-               //      |               m2: function(){
-               //      |                       console.log("A.m2");
-               //      |               }
-               //      |       });
-               //      |       var B = dojo.declare(A, {
-               //      |               m1: function(){
-               //      |                       this.inherited(arguments);
-               //      |                       console.log("B.m1");
-               //      |               }
-               //      |       });
-               //      |       B.extend({
-               //      |               m2: function(){
-               //      |                       this.inherited(arguments);
-               //      |                       console.log("B.m2");
-               //      |               }
-               //      |       });
-               //      |       var x = new B();
-               //      |       dojo.safeMixin(x, {
-               //      |               m1: function(){
-               //      |                       this.inherited(arguments);
-               //      |                       console.log("X.m1");
-               //      |               },
-               //      |               m2: function(){
-               //      |                       this.inherited(arguments);
-               //      |                       console.log("X.m2");
-               //      |               }
-               //      |       });
-               //      |       x.m2();
-               //      |       // prints:
-               //      |       // A.m1
-               //      |       // B.m1
-               //      |       // X.m1
-       };
-       =====*/
-
-       /*=====
-       Object.inherited = function(name, args, newArgs){
-               //      summary:
-               //              Calls a super method.
-               //      name: String?
-               //              The optional method name. Should be the same as the caller's
-               //              name. Usually "name" is specified in complex dynamic cases, when
-               //              the calling method was dynamically added, undecorated by
-               //              dojo.declare, and it cannot be determined.
-               //      args: Arguments
-               //              The caller supply this argument, which should be the original
-               //              "arguments".
-               //      newArgs: Object?
-               //              If "true", the found function will be returned without
-               //              executing it.
-               //              If Array, it will be used to call a super method. Otherwise
-               //              "args" will be used.
-               //      returns:
-               //              Whatever is returned by a super method, or a super method itself,
-               //              if "true" was specified as newArgs.
-               //      description:
-               //              This method is used inside method of classes produced with
-               //              dojo.declare to call a super method (next in the chain). It is
-               //              used for manually controlled chaining. Consider using the regular
-               //              chaining, because it is faster. Use "this.inherited()" only in
-               //              complex cases.
-               //
-               //              This method cannot me called from automatically chained
-               //              constructors including the case of a special (legacy)
-               //              constructor chaining. It cannot be called from chained methods.
-               //
-               //              If "this.inherited()" cannot find the next-in-chain method, it
-               //              does nothing and returns "undefined". The last method in chain
-               //              can be a default method implemented in Object, which will be
-               //              called last.
-               //
-               //              If "name" is specified, it is assumed that the method that
-               //              received "args" is the parent method for this call. It is looked
-               //              up in the chain list and if it is found the next-in-chain method
-               //              is called. If it is not found, the first-in-chain method is
-               //              called.
-               //
-               //              If "name" is not specified, it will be derived from the calling
-               //              method (using a methoid property "nom").
-               //
-               //      example:
-               //      |       var B = dojo.declare(A, {
-               //      |               method1: function(a, b, c){
-               //      |                       this.inherited(arguments);
-               //      |               },
-               //      |               method2: function(a, b){
-               //      |                       return this.inherited(arguments, [a + b]);
-               //      |               }
-               //      |       });
-               //      |       // next method is not in the chain list because it is added
-               //      |       // manually after the class was created.
-               //      |       B.prototype.method3 = function(){
-               //      |               console.log("This is a dynamically-added method.");
-               //      |               this.inherited("method3", arguments);
-               //      |       };
-               //      example:
-               //      |       var B = dojo.declare(A, {
-               //      |               method: function(a, b){
-               //      |                       var super = this.inherited(arguments, true);
-               //      |                       // ...
-               //      |                       if(!super){
-               //      |                               console.log("there is no super method");
-               //      |                               return 0;
-               //      |                       }
-               //      |                       return super.apply(this, arguments);
-               //      |               }
-               //      |       });
-               return  {};     // Object
-       }
-       =====*/
-
-       /*=====
-       Object.getInherited = function(name, args){
-               //      summary:
-               //              Returns a super method.
-               //      name: String?
-               //              The optional method name. Should be the same as the caller's
-               //              name. Usually "name" is specified in complex dynamic cases, when
-               //              the calling method was dynamically added, undecorated by
-               //              dojo.declare, and it cannot be determined.
-               //      args: Arguments
-               //              The caller supply this argument, which should be the original
-               //              "arguments".
-               //      returns:
-               //              Returns a super method (Function) or "undefined".
-               //      description:
-               //              This method is a convenience method for "this.inherited()".
-               //              It uses the same algorithm but instead of executing a super
-               //              method, it returns it, or "undefined" if not found.
-               //
-               //      example:
-               //      |       var B = dojo.declare(A, {
-               //      |               method: function(a, b){
-               //      |                       var super = this.getInherited(arguments);
-               //      |                       // ...
-               //      |                       if(!super){
-               //      |                               console.log("there is no super method");
-               //      |                               return 0;
-               //      |                       }
-               //      |                       return super.apply(this, arguments);
-               //      |               }
-               //      |       });
-               return  {};     // Object
-       }
-       =====*/
-
-       /*=====
-       Object.isInstanceOf = function(cls){
-               //      summary:
-               //              Checks the inheritance cahin to see if it is inherited from this
-               //              class.
-               //      cls: Function
-               //              Class constructor.
-               //      returns:
-               //              "true", if this object is inherited from this class, "false"
-               //              otherwise.
-               //      description:
-               //              This method is used with instances of classes produced with
-               //              dojo.declare to determine of they support a certain interface or
-               //              not. It models "instanceof" operator.
-               //
-               //      example:
-               //      |       var A = dojo.declare(null, {
-               //      |               // constructor, properties, and methods go here
-               //      |               // ...
-               //      |       });
-               //      |       var B = dojo.declare(null, {
-               //      |               // constructor, properties, and methods go here
-               //      |               // ...
-               //      |       });
-               //      |       var C = dojo.declare([A, B], {
-               //      |               // constructor, properties, and methods go here
-               //      |               // ...
-               //      |       });
-               //      |       var D = dojo.declare(A, {
-               //      |               // constructor, properties, and methods go here
-               //      |               // ...
-               //      |       });
-               //      |
-               //      |       var a = new A(), b = new B(), c = new C(), d = new D();
-               //      |
-               //      |       console.log(a.isInstanceOf(A)); // true
-               //      |       console.log(b.isInstanceOf(A)); // false
-               //      |       console.log(c.isInstanceOf(A)); // true
-               //      |       console.log(d.isInstanceOf(A)); // true
-               //      |
-               //      |       console.log(a.isInstanceOf(B)); // false
-               //      |       console.log(b.isInstanceOf(B)); // true
-               //      |       console.log(c.isInstanceOf(B)); // true
-               //      |       console.log(d.isInstanceOf(B)); // false
-               //      |
-               //      |       console.log(a.isInstanceOf(C)); // false
-               //      |       console.log(b.isInstanceOf(C)); // false
-               //      |       console.log(c.isInstanceOf(C)); // true
-               //      |       console.log(d.isInstanceOf(C)); // false
-               //      |
-               //      |       console.log(a.isInstanceOf(D)); // false
-               //      |       console.log(b.isInstanceOf(D)); // false
-               //      |       console.log(c.isInstanceOf(D)); // false
-               //      |       console.log(d.isInstanceOf(D)); // true
-               return  {};     // Object
-       }
-       =====*/
-
-       /*=====
-       Object.extend = function(source){
-               //      summary:
-               //              Adds all properties and methods of source to constructor's
-               //              prototype, making them available to all instances created with
-               //              constructor. This method is specific to constructors created with
-               //              dojo.declare.
-               //      source: Object
-               //              Source object which properties are going to be copied to the
-               //              constructor's prototype.
-               //      description:
-               //              Adds source properties to the constructor's prototype. It can
-               //              override existing properties.
-               //
-               //              This method is similar to dojo.extend function, but it is specific
-               //              to constructors produced by dojo.declare. It is implemented
-               //              using dojo.safeMixin, and it skips a constructor property,
-               //              and properly decorates copied functions.
-               //
-               //      example:
-               //      |       var A = dojo.declare(null, {
-               //      |               m1: function(){},
-               //      |               s1: "Popokatepetl"
-               //      |       });
-               //      |       A.extend({
-               //      |               m1: function(){},
-               //      |               m2: function(){},
-               //      |               f1: true,
-               //      |               d1: 42
-               //      |       });
-       };
-       =====*/
-})();
-
-}
-
-if(!dojo._hasResource["dojo._base.connect"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.connect"] = true;
-dojo.provide("dojo._base.connect");
-
-
-// this file courtesy of the TurboAjax Group, licensed under a Dojo CLA
-
-// low-level delegation machinery
-dojo._listener = {
-       // create a dispatcher function
-       getDispatcher: function(){
-               // following comments pulled out-of-line to prevent cloning them 
-               // in the returned function.
-               // - indices (i) that are really in the array of listeners (ls) will 
-               //   not be in Array.prototype. This is the 'sparse array' trick
-               //   that keeps us safe from libs that take liberties with built-in 
-               //   objects
-               // - listener is invoked with current scope (this)
-               return function(){
-                       var ap=Array.prototype, c=arguments.callee, ls=c._listeners, t=c.target;
-                       // return value comes from original target function
-                       var r = t && t.apply(this, arguments);
-                       // make local copy of listener array so it is immutable during processing
-                       var lls;
-                                                                                       lls = [].concat(ls);
-                                                       
-                       // invoke listeners after target function
-                       for(var i in lls){
-                               if(!(i in ap)){
-                                       lls[i].apply(this, arguments);
-                               }
-                       }
-                       // return value comes from original target function
-                       return r;
-               }
-       },
-       // add a listener to an object
-       add: function(/*Object*/ source, /*String*/ method, /*Function*/ listener){
-               // Whenever 'method' is invoked, 'listener' will have the same scope.
-               // Trying to supporting a context object for the listener led to 
-               // complexity. 
-               // Non trivial to provide 'once' functionality here
-               // because listener could be the result of a dojo.hitch call,
-               // in which case two references to the same hitch target would not
-               // be equivalent. 
-               source = source || dojo.global;
-               // The source method is either null, a dispatcher, or some other function
-               var f = source[method];
-               // Ensure a dispatcher
-               if(!f||!f._listeners){
-                       var d = dojo._listener.getDispatcher();
-                       // original target function is special
-                       d.target = f;
-                       // dispatcher holds a list of listeners
-                       d._listeners = []; 
-                       // redirect source to dispatcher
-                       f = source[method] = d;
-               }
-               // The contract is that a handle is returned that can 
-               // identify this listener for disconnect. 
-               //
-               // The type of the handle is private. Here is it implemented as Integer. 
-               // DOM event code has this same contract but handle is Function 
-               // in non-IE browsers.
-               //
-               // We could have separate lists of before and after listeners.
-               return f._listeners.push(listener) ; /*Handle*/
-       },
-       // remove a listener from an object
-       remove: function(/*Object*/ source, /*String*/ method, /*Handle*/ handle){
-               var f = (source||dojo.global)[method];
-               // remember that handle is the index+1 (0 is not a valid handle)
-               if(f && f._listeners && handle--){
-                       delete f._listeners[handle];
-               }
-       }
-};
-
-// Multiple delegation for arbitrary methods.
-
-// This unit knows nothing about DOM, but we include DOM aware documentation
-// and dontFix argument here to help the autodocs. Actual DOM aware code is in
-// event.js.
-
-dojo.connect = function(/*Object|null*/ obj, 
-                                               /*String*/ event, 
-                                               /*Object|null*/ context, 
-                                               /*String|Function*/ method,
-                                               /*Boolean?*/ dontFix){
-       // summary:
-       //              `dojo.connect` is the core event handling and delegation method in
-       //              Dojo. It allows one function to "listen in" on the execution of
-       //              any other, triggering the second whenever the first is called. Many
-       //              listeners may be attached to a function, and source functions may
-       //              be either regular function calls or DOM events.
-       //
-       // description:
-       //              Connects listeners to actions, so that after event fires, a
-       //              listener is called with the same arguments passed to the orginal
-       //              function.
-       //
-       //              Since `dojo.connect` allows the source of events to be either a
-       //              "regular" JavaScript function or a DOM event, it provides a uniform
-       //              interface for listening to all the types of events that an
-       //              application is likely to deal with though a single, unified
-       //              interface. DOM programmers may want to think of it as
-       //              "addEventListener for everything and anything".
-       //
-       //              When setting up a connection, the `event` parameter must be a
-       //              string that is the name of the method/event to be listened for. If
-       //              `obj` is null, `dojo.global` is assumed, meaning that connections
-       //              to global methods are supported but also that you may inadvertantly
-       //              connect to a global by passing an incorrect object name or invalid
-       //              reference.
-       //
-       //              `dojo.connect` generally is forgiving. If you pass the name of a
-       //              function or method that does not yet exist on `obj`, connect will
-       //              not fail, but will instead set up a stub method. Similarly, null
-       //              arguments may simply be omitted such that fewer than 4 arguments
-       //              may be required to set up a connection See the examples for deails.
-       //
-       //              The return value is a handle that is needed to 
-       //              remove this connection with `dojo.disconnect`.
-       //
-       // obj: 
-       //              The source object for the event function. 
-       //              Defaults to `dojo.global` if null.
-       //              If obj is a DOM node, the connection is delegated 
-       //              to the DOM event manager (unless dontFix is true).
-       //
-       // event:
-       //              String name of the event function in obj. 
-       //              I.e. identifies a property `obj[event]`.
-       //
-       // context: 
-       //              The object that method will receive as "this".
-       //
-       //              If context is null and method is a function, then method
-       //              inherits the context of event.
-       //      
-       //              If method is a string then context must be the source 
-       //              object object for method (context[method]). If context is null,
-       //              dojo.global is used.
-       //
-       // method:
-       //              A function reference, or name of a function in context. 
-       //              The function identified by method fires after event does. 
-       //              method receives the same arguments as the event.
-       //              See context argument comments for information on method's scope.
-       //
-       // dontFix:
-       //              If obj is a DOM node, set dontFix to true to prevent delegation 
-       //              of this connection to the DOM event manager.
-       //
-       // example:
-       //              When obj.onchange(), do ui.update():
-       //      |       dojo.connect(obj, "onchange", ui, "update");
-       //      |       dojo.connect(obj, "onchange", ui, ui.update); // same
-       //
-       // example:
-       //              Using return value for disconnect:
-       //      |       var link = dojo.connect(obj, "onchange", ui, "update");
-       //      |       ...
-       //      |       dojo.disconnect(link);
-       //
-       // example:
-       //              When onglobalevent executes, watcher.handler is invoked:
-       //      |       dojo.connect(null, "onglobalevent", watcher, "handler");
-       //
-       // example:
-       //              When ob.onCustomEvent executes, customEventHandler is invoked:
-       //      |       dojo.connect(ob, "onCustomEvent", null, "customEventHandler");
-       //      |       dojo.connect(ob, "onCustomEvent", "customEventHandler"); // same
-       //
-       // example:
-       //              When ob.onCustomEvent executes, customEventHandler is invoked
-       //              with the same scope (this):
-       //      |       dojo.connect(ob, "onCustomEvent", null, customEventHandler);
-       //      |       dojo.connect(ob, "onCustomEvent", customEventHandler); // same
-       //
-       // example:
-       //              When globalEvent executes, globalHandler is invoked
-       //              with the same scope (this):
-       //      |       dojo.connect(null, "globalEvent", null, globalHandler);
-       //      |       dojo.connect("globalEvent", globalHandler); // same
-
-       // normalize arguments
-       var a=arguments, args=[], i=0;
-       // if a[0] is a String, obj was ommited
-       args.push(dojo.isString(a[0]) ? null : a[i++], a[i++]);
-       // if the arg-after-next is a String or Function, context was NOT omitted
-       var a1 = a[i+1];
-       args.push(dojo.isString(a1)||dojo.isFunction(a1) ? a[i++] : null, a[i++]);
-       // absorb any additional arguments
-       for(var l=a.length; i<l; i++){  args.push(a[i]); }
-       // do the actual work
-       return dojo._connect.apply(this, args); /*Handle*/
-}
-
-// used by non-browser hostenvs. always overriden by event.js
-dojo._connect = function(obj, event, context, method){
-       var l=dojo._listener, h=l.add(obj, event, dojo.hitch(context, method)); 
-       return [obj, event, h, l]; // Handle
-}
-
-dojo.disconnect = function(/*Handle*/ handle){
-       // summary:
-       //              Remove a link created by dojo.connect.
-       // description:
-       //              Removes the connection between event and the method referenced by handle.
-       // handle:
-       //              the return value of the dojo.connect call that created the connection.
-       if(handle && handle[0] !== undefined){
-               dojo._disconnect.apply(this, handle);
-               // let's not keep this reference
-               delete handle[0];
-       }
-}
-
-dojo._disconnect = function(obj, event, handle, listener){
-       listener.remove(obj, event, handle);
-}
-
-// topic publish/subscribe
-
-dojo._topics = {};
-
-dojo.subscribe = function(/*String*/ topic, /*Object|null*/ context, /*String|Function*/ method){
-       //      summary:
-       //              Attach a listener to a named topic. The listener function is invoked whenever the
-       //              named topic is published (see: dojo.publish).
-       //              Returns a handle which is needed to unsubscribe this listener.
-       //      context:
-       //              Scope in which method will be invoked, or null for default scope.
-       //      method:
-       //              The name of a function in context, or a function reference. This is the function that
-       //              is invoked when topic is published.
-       //      example:
-       //      |       dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); });
-       //      |       dojo.publish("alerts", [ "read this", "hello world" ]);                                                                                                                                 
-
-       // support for 2 argument invocation (omitting context) depends on hitch
-       return [topic, dojo._listener.add(dojo._topics, topic, dojo.hitch(context, method))]; /*Handle*/
-}
-
-dojo.unsubscribe = function(/*Handle*/ handle){
-       //      summary:
-       //              Remove a topic listener. 
-       //      handle:
-       //              The handle returned from a call to subscribe.
-       //      example:
-       //      |       var alerter = dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); };
-       //      |       ...
-       //      |       dojo.unsubscribe(alerter);
-       if(handle){
-               dojo._listener.remove(dojo._topics, handle[0], handle[1]);
-       }
-}
-
-dojo.publish = function(/*String*/ topic, /*Array*/ args){
-       //      summary:
-       //              Invoke all listener method subscribed to topic.
-       //      topic:
-       //              The name of the topic to publish.
-       //      args:
-       //              An array of arguments. The arguments will be applied 
-       //              to each topic subscriber (as first class parameters, via apply).
-       //      example:
-       //      |       dojo.subscribe("alerts", null, function(caption, message){ alert(caption + "\n" + message); };
-       //      |       dojo.publish("alerts", [ "read this", "hello world" ]); 
-
-       // Note that args is an array, which is more efficient vs variable length
-       // argument list.  Ideally, var args would be implemented via Array
-       // throughout the APIs.
-       var f = dojo._topics[topic];
-       if(f){
-               f.apply(this, args||[]);
-       }
-}
-
-dojo.connectPublisher = function(      /*String*/ topic, 
-                                                                       /*Object|null*/ obj, 
-                                                                       /*String*/ event){
-       //      summary:
-       //              Ensure that everytime obj.event() is called, a message is published
-       //              on the topic. Returns a handle which can be passed to
-       //              dojo.disconnect() to disable subsequent automatic publication on
-       //              the topic.
-       //      topic:
-       //              The name of the topic to publish.
-       //      obj: 
-       //              The source object for the event function. Defaults to dojo.global
-       //              if null.
-       //      event:
-       //              The name of the event function in obj. 
-       //              I.e. identifies a property obj[event].
-       //      example:
-       //      |       dojo.connectPublisher("/ajax/start", dojo, "xhrGet");
-       var pf = function(){ dojo.publish(topic, arguments); }
-       return (event) ? dojo.connect(obj, event, pf) : dojo.connect(obj, pf); //Handle
-};
-
-}
-
-if(!dojo._hasResource["dojo._base.Deferred"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.Deferred"] = true;
-dojo.provide("dojo._base.Deferred");
-
-
-dojo.Deferred = function(/*Function?*/ canceller){
-       // summary:
-       //              Encapsulates a sequence of callbacks in response to a value that
-       //              may not yet be available.  This is modeled after the Deferred class
-       //              from Twisted <http://twistedmatrix.com>.
-       // description:
-       //              JavaScript has no threads, and even if it did, threads are hard.
-       //              Deferreds are a way of abstracting non-blocking events, such as the
-       //              final response to an XMLHttpRequest. Deferreds create a promise to
-       //              return a response a some point in the future and an easy way to
-       //              register your interest in receiving that response.
-       //
-       //              The most important methods for Deffered users are:
-       //
-       //                      * addCallback(handler)
-       //                      * addErrback(handler)
-       //                      * callback(result)
-       //                      * errback(result)
-       //
-       //              In general, when a function returns a Deferred, users then "fill
-       //              in" the second half of the contract by registering callbacks and
-       //              error handlers. You may register as many callback and errback
-       //              handlers as you like and they will be executed in the order
-       //              registered when a result is provided. Usually this result is
-       //              provided as the result of an asynchronous operation. The code
-       //              "managing" the Deferred (the code that made the promise to provide
-       //              an answer later) will use the callback() and errback() methods to
-       //              communicate with registered listeners about the result of the
-       //              operation. At this time, all registered result handlers are called
-       //              *with the most recent result value*.
-       //
-       //              Deferred callback handlers are treated as a chain, and each item in
-       //              the chain is required to return a value that will be fed into
-       //              successive handlers. The most minimal callback may be registered
-       //              like this:
-       //
-       //              |       var d = new dojo.Deferred();
-       //              |       d.addCallback(function(result){ return result; });
-       //
-       //              Perhaps the most common mistake when first using Deferreds is to
-       //              forget to return a value (in most cases, the value you were
-       //              passed).
-       //
-       //              The sequence of callbacks is internally represented as a list of
-       //              2-tuples containing the callback/errback pair.  For example, the
-       //              following call sequence:
-       //              
-       //              |       var d = new dojo.Deferred();
-       //              |       d.addCallback(myCallback);
-       //              |       d.addErrback(myErrback);
-       //              |       d.addBoth(myBoth);
-       //              |       d.addCallbacks(myCallback, myErrback);
-       //
-       //              is translated into a Deferred with the following internal
-       //              representation:
-       //
-       //              |       [
-       //              |               [myCallback, null],
-       //              |               [null, myErrback],
-       //              |               [myBoth, myBoth],
-       //              |               [myCallback, myErrback]
-       //              |       ]
-       //
-       //              The Deferred also keeps track of its current status (fired).  Its
-       //              status may be one of three things:
-       //
-       //                      * -1: no value yet (initial condition)
-       //                      * 0: success
-       //                      * 1: error
-       //      
-       //              A Deferred will be in the error state if one of the following three
-       //              conditions are met:
-       //
-       //                      1. The result given to callback or errback is "instanceof" Error
-       //                      2. The previous callback or errback raised an exception while
-       //                         executing
-       //                      3. The previous callback or errback returned a value
-       //                         "instanceof" Error
-       //
-       //              Otherwise, the Deferred will be in the success state. The state of
-       //              the Deferred determines the next element in the callback sequence
-       //              to run.
-       //
-       //              When a callback or errback occurs with the example deferred chain,
-       //              something equivalent to the following will happen (imagine
-       //              that exceptions are caught and returned):
-       //
-       //              |       // d.callback(result) or d.errback(result)
-       //              |       if(!(result instanceof Error)){
-       //              |               result = myCallback(result);
-       //              |       }
-       //              |       if(result instanceof Error){
-       //              |               result = myErrback(result);
-       //              |       }
-       //              |       result = myBoth(result);
-       //              |       if(result instanceof Error){
-       //              |               result = myErrback(result);
-       //              |       }else{
-       //              |               result = myCallback(result);
-       //              |       }
-       //
-       //              The result is then stored away in case another step is added to the
-       //              callback sequence.      Since the Deferred already has a value
-       //              available, any new callbacks added will be called immediately.
-       //
-       //              There are two other "advanced" details about this implementation
-       //              that are useful:
-       //
-       //              Callbacks are allowed to return Deferred instances themselves, so
-       //              you can build complicated sequences of events with ease.
-       //
-       //              The creator of the Deferred may specify a canceller.  The canceller
-       //              is a function that will be called if Deferred.cancel is called
-       //              before the Deferred fires. You can use this to implement clean
-       //              aborting of an XMLHttpRequest, etc. Note that cancel will fire the
-       //              deferred with a CancelledError (unless your canceller returns
-       //              another kind of error), so the errbacks should be prepared to
-       //              handle that error for cancellable Deferreds.
-       // example:
-       //      |       var deferred = new dojo.Deferred();
-       //      |       setTimeout(function(){ deferred.callback({success: true}); }, 1000);
-       //      |       return deferred;
-       // example:
-       //              Deferred objects are often used when making code asynchronous. It
-       //              may be easiest to write functions in a synchronous manner and then
-       //              split code using a deferred to trigger a response to a long-lived
-       //              operation. For example, instead of register a callback function to
-       //              denote when a rendering operation completes, the function can
-       //              simply return a deferred:
-       //
-       //              |       // callback style:
-       //              |       function renderLotsOfData(data, callback){
-       //              |               var success = false
-       //              |               try{
-       //              |                       for(var x in data){
-       //              |                               renderDataitem(data[x]);
-       //              |                       }
-       //              |                       success = true;
-       //              |               }catch(e){ }
-       //              |               if(callback){
-       //              |                       callback(success);
-       //              |               }
-       //              |       }
-       //
-       //              |       // using callback style
-       //              |       renderLotsOfData(someDataObj, function(success){
-       //              |               // handles success or failure
-       //              |               if(!success){
-       //              |                       promptUserToRecover();
-       //              |               }
-       //              |       });
-       //              |       // NOTE: no way to add another callback here!!
-       // example:
-       //              Using a Deferred doesn't simplify the sending code any, but it
-       //              provides a standard interface for callers and senders alike,
-       //              providing both with a simple way to service multiple callbacks for
-       //              an operation and freeing both sides from worrying about details
-       //              such as "did this get called already?". With Deferreds, new
-       //              callbacks can be added at any time.
-       //
-       //              |       // Deferred style:
-       //              |       function renderLotsOfData(data){
-       //              |               var d = new dojo.Deferred();
-       //              |               try{
-       //              |                       for(var x in data){
-       //              |                               renderDataitem(data[x]);
-       //              |                       }
-       //              |                       d.callback(true);
-       //              |               }catch(e){ 
-       //              |                       d.errback(new Error("rendering failed"));
-       //              |               }
-       //              |               return d;
-       //              |       }
-       //
-       //              |       // using Deferred style
-       //              |       renderLotsOfData(someDataObj).addErrback(function(){
-       //              |               promptUserToRecover();
-       //              |       });
-       //              |       // NOTE: addErrback and addCallback both return the Deferred
-       //              |       // again, so we could chain adding callbacks or save the
-       //              |       // deferred for later should we need to be notified again.
-       // example:
-       //              In this example, renderLotsOfData is syncrhonous and so both
-       //              versions are pretty artificial. Putting the data display on a
-       //              timeout helps show why Deferreds rock:
-       //
-       //              |       // Deferred style and async func
-       //              |       function renderLotsOfData(data){
-       //              |               var d = new dojo.Deferred();
-       //              |               setTimeout(function(){
-       //              |                       try{
-       //              |                               for(var x in data){
-       //              |                                       renderDataitem(data[x]);
-       //              |                               }
-       //              |                               d.callback(true);
-       //              |                       }catch(e){ 
-       //              |                               d.errback(new Error("rendering failed"));
-       //              |                       }
-       //              |               }, 100);
-       //              |               return d;
-       //              |       }
-       //
-       //              |       // using Deferred style
-       //              |       renderLotsOfData(someDataObj).addErrback(function(){
-       //              |               promptUserToRecover();
-       //              |       });
-       //
-       //              Note that the caller doesn't have to change his code at all to
-       //              handle the asynchronous case.
-
-       this.chain = [];
-       this.id = this._nextId();
-       this.fired = -1;
-       this.paused = 0;
-       this.results = [null, null];
-       this.canceller = canceller;
-       this.silentlyCancelled = false;
-       this.isFiring = false;
-};
-
-dojo.extend(dojo.Deferred, {
-       /*
-       makeCalled: function(){
-               // summary:
-               //              returns a new, empty deferred, which is already in the called
-               //              state. Calling callback() or errback() on this deferred will
-               //              yeild an error and adding new handlers to it will result in
-               //              them being called immediately.
-               var deferred = new dojo.Deferred();
-               deferred.callback();
-               return deferred;
-       },
-
-       toString: function(){
-               var state;
-               if(this.fired == -1){
-                       state = 'unfired';
-               }else{
-                       state = this.fired ? 'success' : 'error';
-               }
-               return 'Deferred(' + this.id + ', ' + state + ')';
-       },
-       */
-
-       _nextId: (function(){
-               var n = 1;
-               return function(){ return n++; };
-       })(),
-
-       cancel: function(){
-               // summary:     
-               //              Cancels a Deferred that has not yet received a value, or is
-               //              waiting on another Deferred as its value.
-               // description:
-               //              If a canceller is defined, the canceller is called. If the
-               //              canceller did not return an error, or there was no canceller,
-               //              then the errback chain is started.
-               var err;
-               if(this.fired == -1){
-                       if(this.canceller){
-                               err = this.canceller(this);
-                       }else{
-                               this.silentlyCancelled = true;
-                       }
-                       if(this.fired == -1){
-                               if(!(err instanceof Error)){
-                                       var res = err;
-                                       var msg = "Deferred Cancelled";
-                                       if(err && err.toString){
-                                               msg += ": " + err.toString();
-                                       }
-                                       err = new Error(msg);
-                                       err.dojoType = "cancel";
-                                       err.cancelResult = res;
-                               }
-                               this.errback(err);
-                       }
-               }else if(       (this.fired == 0) &&
-                                       (this.results[0] instanceof dojo.Deferred)
-               ){
-                       this.results[0].cancel();
-               }
-       },
-                       
-
-       _resback: function(res){
-               // summary:
-               //              The private primitive that means either callback or errback
-               this.fired = ((res instanceof Error) ? 1 : 0);
-               this.results[this.fired] = res;
-               this._fire();
-       },
-
-       _check: function(){
-               if(this.fired != -1){
-                       if(!this.silentlyCancelled){
-                               throw new Error("already called!");
-                       }
-                       this.silentlyCancelled = false;
-                       return;
-               }
-       },
-
-       callback: function(res){
-               //      summary:        
-               //              Begin the callback sequence with a non-error value.
-               
-               /*
-               callback or errback should only be called once on a given
-               Deferred.
-               */
-               this._check();
-               this._resback(res);
-       },
-
-       errback: function(/*Error*/res){
-               //      summary: 
-               //              Begin the callback sequence with an error result.
-               this._check();
-               if(!(res instanceof Error)){
-                       res = new Error(res);
-               }
-               this._resback(res);
-       },
-
-       addBoth: function(/*Function|Object*/cb, /*String?*/cbfn){
-               //      summary:
-               //              Add the same function as both a callback and an errback as the
-               //              next element on the callback sequence.This is useful for code
-               //              that you want to guarantee to run, e.g. a finalizer.
-               var enclosed = dojo.hitch.apply(dojo, arguments);
-               return this.addCallbacks(enclosed, enclosed); // dojo.Deferred
-       },
-
-       addCallback: function(/*Function|Object*/cb, /*String?*/cbfn /*...*/){
-               //      summary: 
-               //              Add a single callback to the end of the callback sequence.
-               return this.addCallbacks(dojo.hitch.apply(dojo, arguments)); // dojo.Deferred
-       },
-
-       addErrback: function(cb, cbfn){
-               //      summary: 
-               //              Add a single callback to the end of the callback sequence.
-               return this.addCallbacks(null, dojo.hitch.apply(dojo, arguments)); // dojo.Deferred
-       },
-
-       addCallbacks: function(cb, eb){
-               // summary: 
-               //              Add separate callback and errback to the end of the callback
-               //              sequence.
-               this.chain.push([cb, eb])
-               if(this.fired >= 0 && !this.isFiring){
-                       this._fire();
-               }
-               return this; // dojo.Deferred
-       },
-
-       _fire: function(){
-               // summary: 
-               //              Used internally to exhaust the callback sequence when a result
-               //              is available.
-               this.isFiring = true;
-               var chain = this.chain;
-               var fired = this.fired;
-               var res = this.results[fired];
-               var self = this;
-               var cb = null;
-               while(
-                       (chain.length > 0) &&
-                       (this.paused == 0)
-               ){
-                       // Array
-                       var f = chain.shift()[fired];
-                       if(!f){ continue; }
-                       var func = function(){
-                               var ret = f(res);
-                               //If no response, then use previous response.
-                               if(typeof ret != "undefined"){
-                                       res = ret;
-                               }
-                               fired = ((res instanceof Error) ? 1 : 0);
-                               if(res instanceof dojo.Deferred){
-                                       cb = function(res){
-                                               self._resback(res);
-                                               // inlined from _pause()
-                                               self.paused--;
-                                               if(
-                                                       (self.paused == 0) && 
-                                                       (self.fired >= 0)
-                                               ){
-                                                       self._fire();
-                                               }
-                                       }
-                                       // inlined from _unpause
-                                       this.paused++;
-                               }
-                       };
-                       if(dojo.config.debugAtAllCosts){
-                               func.call(this);
-                       }else{
-                               try{
-                                       func.call(this);
-                               }catch(err){
-                                       fired = 1;
-                                       res = err;
-                               }
-                       }
-               }
-               this.fired = fired;
-               this.results[fired] = res;
-               this.isFiring = false;
-               if((cb)&&(this.paused)){
-                       // this is for "tail recursion" in case the dependent
-                       // deferred is already fired
-                       res.addBoth(cb);
-               }
-       }
-});
-
-}
-
-if(!dojo._hasResource["dojo._base.json"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.json"] = true;
-dojo.provide("dojo._base.json");
-
-dojo.fromJson = function(/*String*/ json){
-       // summary:
-       //              Parses a [JSON](http://json.org) string to return a JavaScript object.
-       // description:
-       //              Throws for invalid JSON strings, but it does not use a strict JSON parser. It
-       //              delegates to eval().
-       // json: 
-       //              a string literal of a JSON item, for instance:
-       //                      `'{ "foo": [ "bar", 1, { "baz": "thud" } ] }'`
-
-       return eval("(" + json + ")"); // Object
-}
-
-dojo._escapeString = function(/*String*/str){
-       //summary:
-       //              Adds escape sequences for non-visual characters, double quote and
-       //              backslash and surrounds with double quotes to form a valid string
-       //              literal.
-       return ('"' + str.replace(/(["\\])/g, '\\$1') + '"').
-               replace(/[\f]/g, "\\f").replace(/[\b]/g, "\\b").replace(/[\n]/g, "\\n").
-               replace(/[\t]/g, "\\t").replace(/[\r]/g, "\\r"); // string
-}
-
-dojo.toJsonIndentStr = "\t";
-dojo.toJson = function(/*Object*/ it, /*Boolean?*/ prettyPrint, /*String?*/ _indentStr){
-       //      summary:
-       //              Returns a [JSON](http://json.org) serialization of an object.
-       //      description:
-       //              Returns a [JSON](http://json.org) serialization of an object.
-       //              Note that this doesn't check for infinite recursion, so don't do that!
-       //      it:
-       //              an object to be serialized. Objects may define their own
-       //              serialization via a special "__json__" or "json" function
-       //              property. If a specialized serializer has been defined, it will
-       //              be used as a fallback.
-       //      prettyPrint:
-       //              if true, we indent objects and arrays to make the output prettier.
-       //              The variable `dojo.toJsonIndentStr` is used as the indent string --
-       //              to use something other than the default (tab), change that variable
-       //              before calling dojo.toJson().
-       //      _indentStr:
-       //              private variable for recursive calls when pretty printing, do not use.
-       //      example:
-       //              simple serialization of a trivial object
-       //              |       var jsonStr = dojo.toJson({ howdy: "stranger!", isStrange: true });
-       //              |       doh.is('{"howdy":"stranger!","isStrange":true}', jsonStr);
-       //      example:
-       //              a custom serializer for an objects of a particular class:
-       //              |       dojo.declare("Furby", null, {
-       //              |               furbies: "are strange",
-       //              |               furbyCount: 10,
-       //              |               __json__: function(){
-       //              |               },
-       //              |       });
-
-       if(it === undefined){
-               return "undefined";
-       }
-       var objtype = typeof it;
-       if(objtype == "number" || objtype == "boolean"){
-               return it + "";
-       }
-       if(it === null){
-               return "null";
-       }
-       if(dojo.isString(it)){ 
-               return dojo._escapeString(it); 
-       }
-       // recurse
-       var recurse = arguments.callee;
-       // short-circuit for objects that support "json" serialization
-       // if they return "self" then just pass-through...
-       var newObj;
-       _indentStr = _indentStr || "";
-       var nextIndent = prettyPrint ? _indentStr + dojo.toJsonIndentStr : "";
-       var tf = it.__json__||it.json;
-       if(dojo.isFunction(tf)){
-               newObj = tf.call(it);
-               if(it !== newObj){
-                       return recurse(newObj, prettyPrint, nextIndent);
-               }
-       }
-       if(it.nodeType && it.cloneNode){ // isNode
-               // we can't seriailize DOM nodes as regular objects because they have cycles
-               // DOM nodes could be serialized with something like outerHTML, but
-               // that can be provided by users in the form of .json or .__json__ function.
-               throw new Error("Can't serialize DOM nodes");
-       }
-
-       var sep = prettyPrint ? " " : "";
-       var newLine = prettyPrint ? "\n" : "";
-
-       // array
-       if(dojo.isArray(it)){
-               var res = dojo.map(it, function(obj){
-                       var val = recurse(obj, prettyPrint, nextIndent);
-                       if(typeof val != "string"){
-                               val = "undefined";
-                       }
-                       return newLine + nextIndent + val;
-               });
-               return "[" + res.join("," + sep) + newLine + _indentStr + "]";
-       }
-       /*
-       // look in the registry
-       try {
-               window.o = it;
-               newObj = dojo.json.jsonRegistry.match(it);
-               return recurse(newObj, prettyPrint, nextIndent);
-       }catch(e){
-               // console.log(e);
-       }
-       // it's a function with no adapter, skip it
-       */
-       if(objtype == "function"){
-               return null; // null
-       }
-       // generic object code path
-       var output = [], key;
-       for(key in it){
-               var keyStr, val;
-               if(typeof key == "number"){
-                       keyStr = '"' + key + '"';
-               }else if(typeof key == "string"){
-                       keyStr = dojo._escapeString(key);
-               }else{
-                       // skip non-string or number keys
-                       continue;
-               }
-               val = recurse(it[key], prettyPrint, nextIndent);
-               if(typeof val != "string"){
-                       // skip non-serializable values
-                       continue;
-               }
-               // FIXME: use += on Moz!!
-               //       MOW NOTE: using += is a pain because you have to account for the dangling comma...
-               output.push(newLine + nextIndent + keyStr + ":" + sep + val);
-       }
-       return "{" + output.join("," + sep) + newLine + _indentStr + "}"; // String
-}
-
-}
-
-if(!dojo._hasResource["dojo._base.Color"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.Color"] = true;
-dojo.provide("dojo._base.Color");
-
-
-
-(function(){
-
-       var d = dojo;
-
-       dojo.Color = function(/*Array|String|Object*/ color){
-               // summary:
-               //              Takes a named string, hex string, array of rgb or rgba values,
-               //              an object with r, g, b, and a properties, or another `dojo.Color` object
-               //              and creates a new Color instance to work from.
-               //
-               // example:
-               //              Work with a Color instance:
-               //       | var c = new dojo.Color();
-               //       | c.setColor([0,0,0]); // black
-               //       | var hex = c.toHex(); // #000000
-               //
-               // example:
-               //              Work with a node's color:
-               //       | var color = dojo.style("someNode", "backgroundColor");
-               //       | var n = new dojo.Color(color);
-               //       | // adjust the color some
-               //       | n.r *= .5;
-               //       | console.log(n.toString()); // rgb(128, 255, 255);
-               if(color){ this.setColor(color); }
-       };
-
-       // FIXME:
-       //      there's got to be a more space-efficient way to encode or discover
-       //      these!!  Use hex?
-       dojo.Color.named = {
-               black:      [0,0,0],
-               silver:     [192,192,192],
-               gray:       [128,128,128],
-               white:      [255,255,255],
-               maroon:         [128,0,0],
-               red:        [255,0,0],
-               purple:         [128,0,128],
-               fuchsia:        [255,0,255],
-               green:      [0,128,0],
-               lime:       [0,255,0],
-               olive:          [128,128,0],
-               yellow:         [255,255,0],
-               navy:       [0,0,128],
-               blue:       [0,0,255],
-               teal:           [0,128,128],
-               aqua:           [0,255,255],
-               transparent: d.config.transparentColor || [255,255,255]
-       };
-
-       dojo.extend(dojo.Color, {
-               r: 255, g: 255, b: 255, a: 1,
-               _set: function(r, g, b, a){
-                       var t = this; t.r = r; t.g = g; t.b = b; t.a = a;
-               },
-               setColor: function(/*Array|String|Object*/ color){
-                       // summary:
-                       //              Takes a named string, hex string, array of rgb or rgba values,
-                       //              an object with r, g, b, and a properties, or another `dojo.Color` object
-                       //              and sets this color instance to that value.
-                       //
-                       // example:
-                       //      |       var c = new dojo.Color(); // no color
-                       //      |       c.setColor("#ededed"); // greyish
-                       if(d.isString(color)){
-                               d.colorFromString(color, this);
-                       }else if(d.isArray(color)){
-                               d.colorFromArray(color, this);
-                       }else{
-                               this._set(color.r, color.g, color.b, color.a);
-                               if(!(color instanceof d.Color)){ this.sanitize(); }
-                       }
-                       return this;    // dojo.Color
-               },
-               sanitize: function(){
-                       // summary:
-                       //              Ensures the object has correct attributes
-                       // description:
-                       //              the default implementation does nothing, include dojo.colors to
-                       //              augment it with real checks
-                       return this;    // dojo.Color
-               },
-               toRgb: function(){
-                       // summary:
-                       //              Returns 3 component array of rgb values
-                       // example:
-                       //      |       var c = new dojo.Color("#000000");
-                       //      |       console.log(c.toRgb()); // [0,0,0]
-                       var t = this;
-                       return [t.r, t.g, t.b]; // Array
-               },
-               toRgba: function(){
-                       // summary:
-                       //              Returns a 4 component array of rgba values from the color
-                       //              represented by this object.
-                       var t = this;
-                       return [t.r, t.g, t.b, t.a];    // Array
-               },
-               toHex: function(){
-                       // summary:
-                       //              Returns a CSS color string in hexadecimal representation
-                       // example:
-                       //      |       console.log(new dojo.Color([0,0,0]).toHex()); // #000000
-                       var arr = d.map(["r", "g", "b"], function(x){
-                               var s = this[x].toString(16);
-                               return s.length < 2 ? "0" + s : s;
-                       }, this);
-                       return "#" + arr.join("");      // String
-               },
-               toCss: function(/*Boolean?*/ includeAlpha){
-                       // summary:
-                       //              Returns a css color string in rgb(a) representation
-                       // example:
-                       //      |       var c = new dojo.Color("#FFF").toCss();
-                       //      |       console.log(c); // rgb('255','255','255')
-                       var t = this, rgb = t.r + ", " + t.g + ", " + t.b;
-                       return (includeAlpha ? "rgba(" + rgb + ", " + t.a : "rgb(" + rgb) + ")";        // String
-               },
-               toString: function(){
-                       // summary:
-                       //              Returns a visual representation of the color
-                       return this.toCss(true); // String
-               }
-       });
-
-       dojo.blendColors = function(
-               /*dojo.Color*/ start,
-               /*dojo.Color*/ end,
-               /*Number*/ weight,
-               /*dojo.Color?*/ obj
-       ){
-               // summary:
-               //              Blend colors end and start with weight from 0 to 1, 0.5 being a 50/50 blend,
-               //              can reuse a previously allocated dojo.Color object for the result
-               var t = obj || new d.Color();
-               d.forEach(["r", "g", "b", "a"], function(x){
-                       t[x] = start[x] + (end[x] - start[x]) * weight;
-                       if(x != "a"){ t[x] = Math.round(t[x]); }
-               });
-               return t.sanitize();    // dojo.Color
-       };
-
-       dojo.colorFromRgb = function(/*String*/ color, /*dojo.Color?*/ obj){
-               // summary:
-               //              Returns a `dojo.Color` instance from a string of the form
-               //              "rgb(...)" or "rgba(...)". Optionally accepts a `dojo.Color`
-               //              object to update with the parsed value and return instead of
-               //              creating a new object.
-               // returns:
-               //              A dojo.Color object. If obj is passed, it will be the return value.
-               var m = color.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);
-               return m && dojo.colorFromArray(m[1].split(/\s*,\s*/), obj);    // dojo.Color
-       };
-
-       dojo.colorFromHex = function(/*String*/ color, /*dojo.Color?*/ obj){
-               // summary:
-               //              Converts a hex string with a '#' prefix to a color object.
-               //              Supports 12-bit #rgb shorthand. Optionally accepts a
-               //              `dojo.Color` object to update with the parsed value.
-               //
-               // returns:
-               //              A dojo.Color object. If obj is passed, it will be the return value.
-               //
-               // example:
-               //       | var thing = dojo.colorFromHex("#ededed"); // grey, longhand
-               //
-               // example:
-               //      | var thing = dojo.colorFromHex("#000"); // black, shorthand
-               var t = obj || new d.Color(),
-                       bits = (color.length == 4) ? 4 : 8,
-                       mask = (1 << bits) - 1;
-               color = Number("0x" + color.substr(1));
-               if(isNaN(color)){
-                       return null; // dojo.Color
-               }
-               d.forEach(["b", "g", "r"], function(x){
-                       var c = color & mask;
-                       color >>= bits;
-                       t[x] = bits == 4 ? 17 * c : c;
-               });
-               t.a = 1;
-               return t;       // dojo.Color
-       };
-
-       dojo.colorFromArray = function(/*Array*/ a, /*dojo.Color?*/ obj){
-               // summary:
-               //              Builds a `dojo.Color` from a 3 or 4 element array, mapping each
-               //              element in sequence to the rgb(a) values of the color.
-               // example:
-               //              | var myColor = dojo.colorFromArray([237,237,237,0.5]); // grey, 50% alpha 
-               // returns:
-               //              A dojo.Color object. If obj is passed, it will be the return value.
-               var t = obj || new d.Color();
-               t._set(Number(a[0]), Number(a[1]), Number(a[2]), Number(a[3]));
-               if(isNaN(t.a)){ t.a = 1; }
-               return t.sanitize();    // dojo.Color
-       };
-
-       dojo.colorFromString = function(/*String*/ str, /*dojo.Color?*/ obj){
-               // summary:
-               //              Parses `str` for a color value. Accepts hex, rgb, and rgba
-               //              style color values.
-               // description:
-               //              Acceptable input values for str may include arrays of any form
-               //              accepted by dojo.colorFromArray, hex strings such as "#aaaaaa", or
-               //              rgb or rgba strings such as "rgb(133, 200, 16)" or "rgba(10, 10,
-               //              10, 50)"
-               // returns:
-               //              A dojo.Color object. If obj is passed, it will be the return value.
-               var a = d.Color.named[str];
-               return a && d.colorFromArray(a, obj) || d.colorFromRgb(str, obj) || d.colorFromHex(str, obj);
-       };
-})();
-
-}
-
-if(!dojo._hasResource["dojo._base"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base"] = true;
-dojo.provide("dojo._base");
-
-
-
-
-
-
-
-
-
-}
-
-if(!dojo._hasResource["dojo._base.window"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.window"] = true;
-dojo.provide("dojo._base.window");
-
-/*=====
-dojo.doc = {
-       // summary:
-       //              Alias for the current document. 'dojo.doc' can be modified
-       //              for temporary context shifting. Also see dojo.withDoc().
-       // description:
-       //    Refer to dojo.doc rather
-       //    than referring to 'window.document' to ensure your code runs
-       //    correctly in managed contexts.
-       // example:
-       //      |       n.appendChild(dojo.doc.createElement('div'));
-}
-=====*/
-dojo.doc = window["document"] || null;
-
-dojo.body = function(){
-       // summary:
-       //              Return the body element of the document
-       //              return the body object associated with dojo.doc
-       // example:
-       //      |       dojo.body().appendChild(dojo.doc.createElement('div'));
-
-       // Note: document.body is not defined for a strict xhtml document
-       // Would like to memoize this, but dojo.doc can change vi dojo.withDoc().
-       return dojo.doc.body || dojo.doc.getElementsByTagName("body")[0]; // Node
-}
-
-dojo.setContext = function(/*Object*/globalObject, /*DocumentElement*/globalDocument){
-       // summary:
-       //              changes the behavior of many core Dojo functions that deal with
-       //              namespace and DOM lookup, changing them to work in a new global
-       //              context (e.g., an iframe). The varibles dojo.global and dojo.doc
-       //              are modified as a result of calling this function and the result of
-       //              `dojo.body()` likewise differs.
-       dojo.global = globalObject;
-       dojo.doc = globalDocument;
-};
-
-dojo.withGlobal = function(    /*Object*/globalObject, 
-                                                       /*Function*/callback, 
-                                                       /*Object?*/thisObject, 
-                                                       /*Array?*/cbArguments){
-       // summary:
-       //              Invoke callback with globalObject as dojo.global and
-       //              globalObject.document as dojo.doc.
-       // description:
-       //              Invoke callback with globalObject as dojo.global and
-       //              globalObject.document as dojo.doc. If provided, globalObject
-       //              will be executed in the context of object thisObject
-       //              When callback() returns or throws an error, the dojo.global
-       //              and dojo.doc will be restored to its previous state.
-
-       var oldGlob = dojo.global;
-       try{
-               dojo.global = globalObject;
-               return dojo.withDoc.call(null, globalObject.document, callback, thisObject, cbArguments);
-       }finally{
-               dojo.global = oldGlob;
-       }
-}
-
-dojo.withDoc = function(       /*DocumentElement*/documentObject, 
-                                                       /*Function*/callback, 
-                                                       /*Object?*/thisObject, 
-                                                       /*Array?*/cbArguments){
-       // summary:
-       //              Invoke callback with documentObject as dojo.doc.
-       // description:
-       //              Invoke callback with documentObject as dojo.doc. If provided,
-       //              callback will be executed in the context of object thisObject
-       //              When callback() returns or throws an error, the dojo.doc will
-       //              be restored to its previous state.
-
-       var oldDoc = dojo.doc,
-               oldLtr = dojo._bodyLtr,
-               oldQ = dojo.isQuirks;
-
-       try{
-               dojo.doc = documentObject;
-               delete dojo._bodyLtr; // uncache
-               dojo.isQuirks = dojo.doc.compatMode == "BackCompat"; // no need to check for QuirksMode which was Opera 7 only
-
-               if(thisObject && typeof callback == "string"){
-                       callback = thisObject[callback];
-               }
-
-               return callback.apply(thisObject, cbArguments || []);
-       }finally{
-               dojo.doc = oldDoc;
-               delete dojo._bodyLtr; // in case it was undefined originally, and set to true/false by the alternate document
-               if(oldLtr !== undefined){ dojo._bodyLtr = oldLtr; }
-               dojo.isQuirks = oldQ;
-       }
-};
-       
-
-}
-
-if(!dojo._hasResource["dojo._base.event"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.event"] = true;
-dojo.provide("dojo._base.event");
-
-
-// this file courtesy of the TurboAjax Group, licensed under a Dojo CLA
-
-(function(){
-       // DOM event listener machinery
-       var del = (dojo._event_listener = {
-               add: function(/*DOMNode*/ node, /*String*/ name, /*Function*/ fp){
-                       if(!node){return;} 
-                       name = del._normalizeEventName(name);
-                       fp = del._fixCallback(name, fp);
-                       var oname = name;
-                       if(
-                                                               !dojo.isIE && 
-                                                               (name == "mouseenter" || name == "mouseleave")
-                       ){
-                               var ofp = fp;
-                               //oname = name;
-                               name = (name == "mouseenter") ? "mouseover" : "mouseout";
-                               fp = function(e){
-                                       if(!dojo.isDescendant(e.relatedTarget, node)){
-                                               // e.type = oname; // FIXME: doesn't take? SJM: event.type is generally immutable.
-                                               return ofp.call(this, e); 
-                                       }
-                               }
-                       }
-                       node.addEventListener(name, fp, false);
-                       return fp; /*Handle*/
-               },
-               remove: function(/*DOMNode*/ node, /*String*/ event, /*Handle*/ handle){
-                       // summary:
-                       //              clobbers the listener from the node
-                       // node:
-                       //              DOM node to attach the event to
-                       // event:
-                       //              the name of the handler to remove the function from
-                       // handle:
-                       //              the handle returned from add
-                       if(node){
-                               event = del._normalizeEventName(event);
-                               if(!dojo.isIE && (event == "mouseenter" || event == "mouseleave")){
-                                       event = (event == "mouseenter") ? "mouseover" : "mouseout";
-                               }
-
-                               node.removeEventListener(event, handle, false);
-                       }
-               },
-               _normalizeEventName: function(/*String*/ name){
-                       // Generally, name should be lower case, unless it is special
-                       // somehow (e.g. a Mozilla DOM event).
-                       // Remove 'on'.
-                       return name.slice(0,2) =="on" ? name.slice(2) : name;
-               },
-               _fixCallback: function(/*String*/ name, fp){
-                       // By default, we only invoke _fixEvent for 'keypress'
-                       // If code is added to _fixEvent for other events, we have
-                       // to revisit this optimization.
-                       // This also applies to _fixEvent overrides for Safari and Opera
-                       // below.
-                       return name != "keypress" ? fp : function(e){ return fp.call(this, del._fixEvent(e, this)); };
-               },
-               _fixEvent: function(evt, sender){
-                       // _fixCallback only attaches us to keypress.
-                       // Switch on evt.type anyway because we might 
-                       // be called directly from dojo.fixEvent.
-                       switch(evt.type){
-                               case "keypress":
-                                       del._setKeyChar(evt);
-                                       break;
-                       }
-                       return evt;
-               },
-               _setKeyChar: function(evt){
-                       evt.keyChar = evt.charCode ? String.fromCharCode(evt.charCode) : '';
-                       evt.charOrCode = evt.keyChar || evt.keyCode;
-               },
-               // For IE and Safari: some ctrl-key combinations (mostly w/punctuation) do not emit a char code in IE
-               // we map those virtual key codes to ascii here
-               // not valid for all (non-US) keyboards, so maybe we shouldn't bother
-               _punctMap: { 
-                       106:42, 
-                       111:47, 
-                       186:59, 
-                       187:43, 
-                       188:44, 
-                       189:45, 
-                       190:46, 
-                       191:47, 
-                       192:96, 
-                       219:91, 
-                       220:92, 
-                       221:93, 
-                       222:39 
-               }
-       });
-
-       // DOM events
-       
-       dojo.fixEvent = function(/*Event*/ evt, /*DOMNode*/ sender){
-               // summary:
-               //              normalizes properties on the event object including event
-               //              bubbling methods, keystroke normalization, and x/y positions
-               // evt: Event
-               //              native event object
-               // sender: DOMNode
-               //              node to treat as "currentTarget"
-               return del._fixEvent(evt, sender);
-       }
-
-       dojo.stopEvent = function(/*Event*/ evt){
-               // summary:
-               //              prevents propagation and clobbers the default action of the
-               //              passed event
-               // evt: Event
-               //              The event object. If omitted, window.event is used on IE.
-               evt.preventDefault();
-               evt.stopPropagation();
-               // NOTE: below, this method is overridden for IE
-       }
-
-       // the default listener to use on dontFix nodes, overriden for IE
-       var node_listener = dojo._listener;
-       
-       // Unify connect and event listeners
-       dojo._connect = function(obj, event, context, method, dontFix){
-               // FIXME: need a more strict test
-               var isNode = obj && (obj.nodeType||obj.attachEvent||obj.addEventListener);
-               // choose one of three listener options: raw (connect.js), DOM event on a Node, custom event on a Node
-               // we need the third option to provide leak prevention on broken browsers (IE)
-               var lid = isNode ? (dontFix ? 2 : 1) : 0, l = [dojo._listener, del, node_listener][lid];
-               // create a listener
-               var h = l.add(obj, event, dojo.hitch(context, method));
-               // formerly, the disconnect package contained "l" directly, but if client code
-               // leaks the disconnect package (by connecting it to a node), referencing "l" 
-               // compounds the problem.
-               // instead we return a listener id, which requires custom _disconnect below.
-               // return disconnect package
-               return [ obj, event, h, lid ];
-       }
-
-       dojo._disconnect = function(obj, event, handle, listener){
-               ([dojo._listener, del, node_listener][listener]).remove(obj, event, handle);
-       }
-
-       // Constants
-
-       // Public: client code should test
-       // keyCode against these named constants, as the
-       // actual codes can vary by browser.
-       dojo.keys = {
-               // summary:
-               //              Definitions for common key values
-               BACKSPACE: 8,
-               TAB: 9,
-               CLEAR: 12,
-               ENTER: 13,
-               SHIFT: 16,
-               CTRL: 17,
-               ALT: 18,
-               META: dojo.isSafari ? 91 : 224,         // the apple key on macs
-               PAUSE: 19,
-               CAPS_LOCK: 20,
-               ESCAPE: 27,
-               SPACE: 32,
-               PAGE_UP: 33,
-               PAGE_DOWN: 34,
-               END: 35,
-               HOME: 36,
-               LEFT_ARROW: 37,
-               UP_ARROW: 38,
-               RIGHT_ARROW: 39,
-               DOWN_ARROW: 40,
-               INSERT: 45,
-               DELETE: 46,
-               HELP: 47,
-               LEFT_WINDOW: 91,
-               RIGHT_WINDOW: 92,
-               SELECT: 93,
-               NUMPAD_0: 96,
-               NUMPAD_1: 97,
-               NUMPAD_2: 98,
-               NUMPAD_3: 99,
-               NUMPAD_4: 100,
-               NUMPAD_5: 101,
-               NUMPAD_6: 102,
-               NUMPAD_7: 103,
-               NUMPAD_8: 104,
-               NUMPAD_9: 105,
-               NUMPAD_MULTIPLY: 106,
-               NUMPAD_PLUS: 107,
-               NUMPAD_ENTER: 108,
-               NUMPAD_MINUS: 109,
-               NUMPAD_PERIOD: 110,
-               NUMPAD_DIVIDE: 111,
-               F1: 112,
-               F2: 113,
-               F3: 114,
-               F4: 115,
-               F5: 116,
-               F6: 117,
-               F7: 118,
-               F8: 119,
-               F9: 120,
-               F10: 121,
-               F11: 122,
-               F12: 123,
-               F13: 124,
-               F14: 125,
-               F15: 126,
-               NUM_LOCK: 144,
-               SCROLL_LOCK: 145,
-               // virtual key mapping
-               copyKey: dojo.isMac && !dojo.isAIR ? (dojo.isSafari ? 91 : 224 ) : 17
-       };
-       
-       var evtCopyKey = dojo.isMac ? "metaKey" : "ctrlKey";
-       
-       dojo.isCopyKey = function(e){
-               // summary:
-               //              Checks an event for the copy key (meta on Mac, and ctrl anywhere else)
-               // e: Event
-               //              Event object to examine
-               return e[evtCopyKey];   // Boolean
-       };
-
-       // Public: decoding mouse buttons from events
-
-/*=====
-       dojo.mouseButtons = {
-               // LEFT: Number
-               //              Numeric value of the left mouse button for the platform.
-               LEFT:   0,
-               // MIDDLE: Number
-               //              Numeric value of the middle mouse button for the platform.
-               MIDDLE: 1,
-               // RIGHT: Number
-               //              Numeric value of the right mouse button for the platform.
-               RIGHT:  2,
-       
-               isButton: function(e, button){
-                       // summary:
-                       //              Checks an event object for a pressed button
-                       // e: Event
-                       //              Event object to examine
-                       // button: Number
-                       //              The button value (example: dojo.mouseButton.LEFT)
-                       return e.button == button; // Boolean
-               },
-               isLeft: function(e){
-                       // summary:
-                       //              Checks an event object for the pressed left button
-                       // e: Event
-                       //              Event object to examine
-                       return e.button == 0; // Boolean
-               },
-               isMiddle: function(e){
-                       // summary:
-                       //              Checks an event object for the pressed middle button
-                       // e: Event
-                       //              Event object to examine
-                       return e.button == 1; // Boolean
-               },
-               isRight: function(e){
-                       // summary:
-                       //              Checks an event object for the pressed right button
-                       // e: Event
-                       //              Event object to examine
-                       return e.button == 2; // Boolean
-               }
-       };
-=====*/
-
-               if(dojo.isIE){
-               dojo.mouseButtons = {
-                       LEFT:   1,
-                       MIDDLE: 4,
-                       RIGHT:  2,
-                       // helper functions
-                       isButton: function(e, button){ return e.button & button; },
-                       isLeft:   function(e){ return e.button & 1; },
-                       isMiddle: function(e){ return e.button & 4; },
-                       isRight:  function(e){ return e.button & 2; }
-               };
-       }else{
-                       dojo.mouseButtons = {
-                       LEFT:   0,
-                       MIDDLE: 1,
-                       RIGHT:  2,
-                       // helper functions
-                       isButton: function(e, button){ return e.button == button; },
-                       isLeft:   function(e){ return e.button == 0; },
-                       isMiddle: function(e){ return e.button == 1; },
-                       isRight:  function(e){ return e.button == 2; }
-               };
-               }
-       
-               // IE event normalization
-       if(dojo.isIE){ 
-               var _trySetKeyCode = function(e, code){
-                       try{
-                               // squelch errors when keyCode is read-only
-                               // (e.g. if keyCode is ctrl or shift)
-                               return (e.keyCode = code);
-                       }catch(e){
-                               return 0;
-                       }
-               }
-
-               // by default, use the standard listener
-               var iel = dojo._listener;
-               var listenersName = (dojo._ieListenersName = "_" + dojo._scopeName + "_listeners");
-               // dispatcher tracking property
-               if(!dojo.config._allow_leaks){
-                       // custom listener that handles leak protection for DOM events
-                       node_listener = iel = dojo._ie_listener = {
-                               // support handler indirection: event handler functions are 
-                               // referenced here. Event dispatchers hold only indices.
-                               handlers: [],
-                               // add a listener to an object
-                               add: function(/*Object*/ source, /*String*/ method, /*Function*/ listener){
-                                       source = source || dojo.global;
-                                       var f = source[method];
-                                       if(!f||!f[listenersName]){
-                                               var d = dojo._getIeDispatcher();
-                                               // original target function is special
-                                               d.target = f && (ieh.push(f) - 1);
-                                               // dispatcher holds a list of indices into handlers table
-                                               d[listenersName] = [];
-                                               // redirect source to dispatcher
-                                               f = source[method] = d;
-                                       }
-                                       return f[listenersName].push(ieh.push(listener) - 1) ; /*Handle*/
-                               },
-                               // remove a listener from an object
-                               remove: function(/*Object*/ source, /*String*/ method, /*Handle*/ handle){
-                                       var f = (source||dojo.global)[method], l = f && f[listenersName];
-                                       if(f && l && handle--){
-                                               delete ieh[l[handle]];
-                                               delete l[handle];
-                                       }
-                               }
-                       };
-                       // alias used above
-                       var ieh = iel.handlers;
-               }
-
-               dojo.mixin(del, {
-                       add: function(/*DOMNode*/ node, /*String*/ event, /*Function*/ fp){
-                               if(!node){return;} // undefined
-                               event = del._normalizeEventName(event);
-                               if(event=="onkeypress"){
-                                       // we need to listen to onkeydown to synthesize
-                                       // keypress events that otherwise won't fire
-                                       // on IE
-                                       var kd = node.onkeydown;
-                                       if(!kd || !kd[listenersName] || !kd._stealthKeydownHandle){
-                                               var h = del.add(node, "onkeydown", del._stealthKeyDown);
-                                               kd = node.onkeydown;
-                                               kd._stealthKeydownHandle = h;
-                                               kd._stealthKeydownRefs = 1;
-                                       }else{
-                                               kd._stealthKeydownRefs++;
-                                       }
-                               }
-                               return iel.add(node, event, del._fixCallback(fp));
-                       },
-                       remove: function(/*DOMNode*/ node, /*String*/ event, /*Handle*/ handle){
-                               event = del._normalizeEventName(event);
-                               iel.remove(node, event, handle); 
-                               if(event=="onkeypress"){
-                                       var kd = node.onkeydown;
-                                       if(--kd._stealthKeydownRefs <= 0){
-                                               iel.remove(node, "onkeydown", kd._stealthKeydownHandle);
-                                               delete kd._stealthKeydownHandle;
-                                       }
-                               }
-                       },
-                       _normalizeEventName: function(/*String*/ eventName){
-                               // Generally, eventName should be lower case, unless it is
-                               // special somehow (e.g. a Mozilla event)
-                               // ensure 'on'
-                               return eventName.slice(0,2) != "on" ? "on" + eventName : eventName;
-                       },
-                       _nop: function(){},
-                       _fixEvent: function(/*Event*/ evt, /*DOMNode*/ sender){
-                               // summary:
-                               //              normalizes properties on the event object including event
-                               //              bubbling methods, keystroke normalization, and x/y positions
-                               // evt:
-                               //              native event object
-                               // sender:
-                               //              node to treat as "currentTarget"
-                               if(!evt){
-                                       var w = sender && (sender.ownerDocument || sender.document || sender).parentWindow || window;
-                                       evt = w.event; 
-                               }
-                               if(!evt){return(evt);}
-                               evt.target = evt.srcElement; 
-                               evt.currentTarget = (sender || evt.srcElement); 
-                               evt.layerX = evt.offsetX;
-                               evt.layerY = evt.offsetY;
-                               // FIXME: scroll position query is duped from dojo.html to
-                               // avoid dependency on that entire module. Now that HTML is in
-                               // Base, we should convert back to something similar there.
-                               var se = evt.srcElement, doc = (se && se.ownerDocument) || document;
-                               // DO NOT replace the following to use dojo.body(), in IE, document.documentElement should be used
-                               // here rather than document.body
-                               var docBody = ((dojo.isIE < 6) || (doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement;
-                               var offset = dojo._getIeDocumentElementOffset();
-                               evt.pageX = evt.clientX + dojo._fixIeBiDiScrollLeft(docBody.scrollLeft || 0) - offset.x;
-                               evt.pageY = evt.clientY + (docBody.scrollTop || 0) - offset.y;
-                               if(evt.type == "mouseover"){ 
-                                       evt.relatedTarget = evt.fromElement;
-                               }
-                               if(evt.type == "mouseout"){ 
-                                       evt.relatedTarget = evt.toElement;
-                               }
-                               evt.stopPropagation = del._stopPropagation;
-                               evt.preventDefault = del._preventDefault;
-                               return del._fixKeys(evt);
-                       },
-                       _fixKeys: function(evt){
-                               switch(evt.type){
-                                       case "keypress":
-                                               var c = ("charCode" in evt ? evt.charCode : evt.keyCode);
-                                               if (c==10){
-                                                       // CTRL-ENTER is CTRL-ASCII(10) on IE, but CTRL-ENTER on Mozilla
-                                                       c=0;
-                                                       evt.keyCode = 13;
-                                               }else if(c==13||c==27){
-                                                       c=0; // Mozilla considers ENTER and ESC non-printable
-                                               }else if(c==3){
-                                                       c=99; // Mozilla maps CTRL-BREAK to CTRL-c
-                                               }
-                                               // Mozilla sets keyCode to 0 when there is a charCode
-                                               // but that stops the event on IE.
-                                               evt.charCode = c;
-                                               del._setKeyChar(evt);
-                                               break;
-                               }
-                               return evt;
-                       },
-                       _stealthKeyDown: function(evt){
-                               // IE doesn't fire keypress for most non-printable characters.
-                               // other browsers do, we simulate it here.
-                               var kp = evt.currentTarget.onkeypress;
-                               // only works if kp exists and is a dispatcher
-                               if(!kp || !kp[listenersName]){ return; }
-                               // munge key/charCode
-                               var k=evt.keyCode;
-                               // These are Windows Virtual Key Codes
-                               // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/VirtualKeyCodes.asp
-                               var unprintable = k!=13 && k!=32 && k!=27 && (k<48||k>90) && (k<96||k>111) && (k<186||k>192) && (k<219||k>222);
-                               // synthesize keypress for most unprintables and CTRL-keys
-                               if(unprintable||evt.ctrlKey){
-                                       var c = unprintable ? 0 : k;
-                                       if(evt.ctrlKey){
-                                               if(k==3 || k==13){
-                                                       return; // IE will post CTRL-BREAK, CTRL-ENTER as keypress natively 
-                                               }else if(c>95 && c<106){ 
-                                                       c -= 48; // map CTRL-[numpad 0-9] to ASCII
-                                               }else if((!evt.shiftKey)&&(c>=65&&c<=90)){ 
-                                                       c += 32; // map CTRL-[A-Z] to lowercase
-                                               }else{ 
-                                                       c = del._punctMap[c] || c; // map other problematic CTRL combinations to ASCII
-                                               }
-                                       }
-                                       // simulate a keypress event
-                                       var faux = del._synthesizeEvent(evt, {type: 'keypress', faux: true, charCode: c});
-                                       kp.call(evt.currentTarget, faux);
-                                       evt.cancelBubble = faux.cancelBubble;
-                                       evt.returnValue = faux.returnValue;
-                                       _trySetKeyCode(evt, faux.keyCode);
-                               }
-                       },
-                       // Called in Event scope
-                       _stopPropagation: function(){
-                               this.cancelBubble = true; 
-                       },
-                       _preventDefault: function(){
-                               // Setting keyCode to 0 is the only way to prevent certain keypresses (namely
-                               // ctrl-combinations that correspond to menu accelerator keys).
-                               // Otoh, it prevents upstream listeners from getting this information
-                               // Try to split the difference here by clobbering keyCode only for ctrl 
-                               // combinations. If you still need to access the key upstream, bubbledKeyCode is
-                               // provided as a workaround.
-                               this.bubbledKeyCode = this.keyCode;
-                               if(this.ctrlKey){_trySetKeyCode(this, 0);}
-                               this.returnValue = false;
-                       }
-               });
-                               
-               // override stopEvent for IE
-               dojo.stopEvent = function(evt){
-                       evt = evt || window.event;
-                       del._stopPropagation.call(evt);
-                       del._preventDefault.call(evt);
-               }
-       }
-       
-       del._synthesizeEvent = function(evt, props){
-                       var faux = dojo.mixin({}, evt, props);
-                       del._setKeyChar(faux);
-                       // FIXME: would prefer to use dojo.hitch: dojo.hitch(evt, evt.preventDefault); 
-                       // but it throws an error when preventDefault is invoked on Safari
-                       // does Event.preventDefault not support "apply" on Safari?
-                       faux.preventDefault = function(){ evt.preventDefault(); }; 
-                       faux.stopPropagation = function(){ evt.stopPropagation(); }; 
-                       return faux;
-       }
-       
-               // Opera event normalization
-       if(dojo.isOpera){
-               dojo.mixin(del, {
-                       _fixEvent: function(evt, sender){
-                               switch(evt.type){
-                                       case "keypress":
-                                               var c = evt.which;
-                                               if(c==3){
-                                                       c=99; // Mozilla maps CTRL-BREAK to CTRL-c
-                                               }
-                                               // can't trap some keys at all, like INSERT and DELETE
-                                               // there is no differentiating info between DELETE and ".", or INSERT and "-"
-                                               c = c<41 && !evt.shiftKey ? 0 : c;
-                                               if(evt.ctrlKey && !evt.shiftKey && c>=65 && c<=90){
-                                                       // lowercase CTRL-[A-Z] keys
-                                                       c += 32;
-                                               }
-                                               return del._synthesizeEvent(evt, { charCode: c });
-                               }
-                               return evt;
-                       }
-               });
-       }
-       
-               // Webkit event normalization
-       if(dojo.isWebKit){
-                               del._add = del.add;
-               del._remove = del.remove;
-
-               dojo.mixin(del, {
-                       add: function(/*DOMNode*/ node, /*String*/ event, /*Function*/ fp){
-                               if(!node){return;} // undefined
-                               var handle = del._add(node, event, fp);
-                               if(del._normalizeEventName(event) == "keypress"){
-                                       // we need to listen to onkeydown to synthesize
-                                       // keypress events that otherwise won't fire
-                                       // in Safari 3.1+: https://lists.webkit.org/pipermail/webkit-dev/2007-December/002992.html
-                                       handle._stealthKeyDownHandle = del._add(node, "keydown", function(evt){
-                                               //A variation on the IE _stealthKeydown function
-                                               //Synthesize an onkeypress event, but only for unprintable characters.
-                                               var k=evt.keyCode;
-                                               // These are Windows Virtual Key Codes
-                                               // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/VirtualKeyCodes.asp
-                                               var unprintable = k!=13 && k!=32 && (k<48 || k>90) && (k<96 || k>111) && (k<186 || k>192) && (k<219 || k>222);
-                                               // synthesize keypress for most unprintables and CTRL-keys
-                                               if(unprintable || evt.ctrlKey){
-                                                       var c = unprintable ? 0 : k;
-                                                       if(evt.ctrlKey){
-                                                               if(k==3 || k==13){
-                                                                       return; // IE will post CTRL-BREAK, CTRL-ENTER as keypress natively 
-                                                               }else if(c>95 && c<106){ 
-                                                                       c -= 48; // map CTRL-[numpad 0-9] to ASCII
-                                                               }else if(!evt.shiftKey && c>=65 && c<=90){ 
-                                                                       c += 32; // map CTRL-[A-Z] to lowercase
-                                                               }else{ 
-                                                                       c = del._punctMap[c] || c; // map other problematic CTRL combinations to ASCII
-                                                               }
-                                                       }
-                                                       // simulate a keypress event
-                                                       var faux = del._synthesizeEvent(evt, {type: 'keypress', faux: true, charCode: c});
-                                                       fp.call(evt.currentTarget, faux);
-                                               }
-                                       });
-                               }
-                               return handle; /*Handle*/
-                       },
-
-                       remove: function(/*DOMNode*/ node, /*String*/ event, /*Handle*/ handle){
-                               if(node){
-                                       if(handle._stealthKeyDownHandle){
-                                               del._remove(node, "keydown", handle._stealthKeyDownHandle);
-                                       }
-                                       del._remove(node, event, handle);
-                               }
-                       },
-                       _fixEvent: function(evt, sender){
-                               switch(evt.type){
-                                       case "keypress":
-                                               if(evt.faux){ return evt; }
-                                               var c = evt.charCode;
-                                               c = c>=32 ? c : 0;
-                                               return del._synthesizeEvent(evt, {charCode: c, faux: true});
-                               }
-                               return evt;
-                       }
-               });
-               }
-       })();
-
-if(dojo.isIE){
-       // keep this out of the closure
-       // closing over 'iel' or 'ieh' b0rks leak prevention
-       // ls[i] is an index into the master handler array
-       dojo._ieDispatcher = function(args, sender){
-               var ap = Array.prototype,
-                       h = dojo._ie_listener.handlers,
-                       c = args.callee,
-                       ls = c[dojo._ieListenersName],
-                       t = h[c.target];
-               // return value comes from original target function
-               var r = t && t.apply(sender, args);
-               // make local copy of listener array so it's immutable during processing
-               var lls = [].concat(ls);
-               // invoke listeners after target function
-               for(var i in lls){
-                       var f = h[lls[i]];
-                       if(!(i in ap) && f){
-                               f.apply(sender, args);
-                       }
-               }
-               return r;
-       }
-       dojo._getIeDispatcher = function(){
-               // ensure the returned function closes over nothing ("new Function" apparently doesn't close)
-               return new Function(dojo._scopeName + "._ieDispatcher(arguments, this)"); // function
-       }
-       // keep this out of the closure to reduce RAM allocation
-       dojo._event_listener._fixCallback = function(fp){
-               var f = dojo._event_listener._fixEvent;
-               return function(e){ return fp.call(this, f(e, this)); };
-       }
-}
-
-}
-
-if(!dojo._hasResource["dojo._base.html"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.html"] = true;
-
-dojo.provide("dojo._base.html");
-
-// FIXME: need to add unit tests for all the semi-public methods
-
-try{
-       document.execCommand("BackgroundImageCache", false, true);
-}catch(e){
-       // sane browsers don't have cache "issues"
-}
-
-// =============================
-// DOM Functions
-// =============================
-
-/*=====
-dojo.byId = function(id, doc){
-       //      summary:
-       //              Returns DOM node with matching `id` attribute or `null`
-       //              if not found. If `id` is a DomNode, this function is a no-op.
-       //
-       //      id: String|DOMNode
-       //              A string to match an HTML id attribute or a reference to a DOM Node
-       //
-       //      doc: Document?
-       //              Document to work in. Defaults to the current value of
-       //              dojo.doc.  Can be used to retrieve
-       //              node references from other documents.
-       //
-       //      example:
-       //      Look up a node by ID:
-       //      |       var n = dojo.byId("foo");
-       //
-       //      example:
-       //      Check if a node exists, and use it.
-       //      |       var n = dojo.byId("bar");
-       //      |       if(n){ doStuff() ... }
-       //
-       //      example:
-       //      Allow string or DomNode references to be passed to a custom function:
-       //      |       var foo = function(nodeOrId){
-       //      |               nodeOrId = dojo.byId(nodeOrId);
-       //      |               // ... more stuff
-       //      |       }
-=====*/
-
-if(dojo.isIE || dojo.isOpera){
-       dojo.byId = function(id, doc){
-               if(typeof id != "string"){
-                       return id;
-               }
-               var _d = doc || dojo.doc, te = _d.getElementById(id);
-               // attributes.id.value is better than just id in case the 
-               // user has a name=id inside a form
-               if(te && (te.attributes.id.value == id || te.id == id)){
-                       return te;
-               }else{
-                       var eles = _d.all[id];
-                       if(!eles || eles.nodeName){
-                               eles = [eles];
-                       }
-                       // if more than 1, choose first with the correct id
-                       var i=0;
-                       while((te=eles[i++])){
-                               if((te.attributes && te.attributes.id && te.attributes.id.value == id)
-                                       || te.id == id){
-                                       return te;
-                               }
-                       }
-               }
-       };
-}else{
-       dojo.byId = function(id, doc){
-               // inline'd type check
-               return (typeof id == "string") ? (doc || dojo.doc).getElementById(id) : id; // DomNode
-       };
-}
-/*=====
-};
-=====*/
-
-(function(){
-       var d = dojo;
-       var byId = d.byId;
-
-       var _destroyContainer = null,
-               _destroyDoc;
-               d.addOnWindowUnload(function(){
-               _destroyContainer = null; //prevent IE leak
-       });
-       
-/*=====
-       dojo._destroyElement = function(node){
-               // summary:
-               //              Existing alias for `dojo.destroy`. Deprecated, will be removed
-               //              in 2.0
-       }
-=====*/
-       dojo._destroyElement = dojo.destroy = function(/*String|DomNode*/node){
-               //      summary:
-               //              Removes a node from its parent, clobbering it and all of its
-               //              children.
-               //
-               //      description:
-               //              Removes a node from its parent, clobbering it and all of its
-               //              children. Function only works with DomNodes, and returns nothing.
-               //
-               //      node:
-               //              A String ID or DomNode reference of the element to be destroyed
-               //
-               //      example:
-               //      Destroy a node byId:
-               //      |       dojo.destroy("someId");
-               //
-               //      example:
-               //      Destroy all nodes in a list by reference:
-               //      |       dojo.query(".someNode").forEach(dojo.destroy);
-
-               node = byId(node);
-               try{
-                       var doc = node.ownerDocument;
-                       // cannot use _destroyContainer.ownerDocument since this can throw an exception on IE
-                       if(!_destroyContainer || _destroyDoc != doc){
-                               _destroyContainer = doc.createElement("div");
-                               _destroyDoc = doc;
-                       }
-                       _destroyContainer.appendChild(node.parentNode ? node.parentNode.removeChild(node) : node);
-                       // NOTE: see http://trac.dojotoolkit.org/ticket/2931. This may be a bug and not a feature
-                       _destroyContainer.innerHTML = "";
-               }catch(e){
-                       /* squelch */
-               }
-       };
-
-       dojo.isDescendant = function(/*DomNode|String*/node, /*DomNode|String*/ancestor){
-               //      summary:
-               //              Returns true if node is a descendant of ancestor
-               //      node: string id or node reference to test
-               //      ancestor: string id or node reference of potential parent to test against
-               //
-               // example:
-               //      Test is node id="bar" is a descendant of node id="foo"
-               //      |       if(dojo.isDescendant("bar", "foo")){ ... }
-               try{
-                       node = byId(node);
-                       ancestor = byId(ancestor);
-                       while(node){
-                               if(node == ancestor){
-                                       return true; // Boolean
-                               }
-                               node = node.parentNode;
-                       }
-               }catch(e){ /* squelch, return false */ }
-               return false; // Boolean
-       };
-
-       dojo.setSelectable = function(/*DomNode|String*/node, /*Boolean*/selectable){
-               //      summary: 
-               //              Enable or disable selection on a node
-               //      node:
-               //              id or reference to node
-               //      selectable:
-               //              state to put the node in. false indicates unselectable, true 
-               //              allows selection.
-               //      example:
-               //      Make the node id="bar" unselectable
-               //      |       dojo.setSelectable("bar"); 
-               //      example:
-               //      Make the node id="bar" selectable
-               //      |       dojo.setSelectable("bar", true);
-               node = byId(node);
-                               if(d.isMozilla){
-                       node.style.MozUserSelect = selectable ? "" : "none";
-               }else if(d.isKhtml || d.isWebKit){
-                                       node.style.KhtmlUserSelect = selectable ? "auto" : "none";
-                               }else if(d.isIE){
-                       var v = (node.unselectable = selectable ? "" : "on");
-                       d.query("*", node).forEach("item.unselectable = '"+v+"'");
-               }
-                               //FIXME: else?  Opera?
-       };
-
-       var _insertBefore = function(/*DomNode*/node, /*DomNode*/ref){
-               var parent = ref.parentNode;
-               if(parent){
-                       parent.insertBefore(node, ref);
-               }
-       };
-
-       var _insertAfter = function(/*DomNode*/node, /*DomNode*/ref){
-               //      summary:
-               //              Try to insert node after ref
-               var parent = ref.parentNode;
-               if(parent){
-                       if(parent.lastChild == ref){
-                               parent.appendChild(node);
-                       }else{
-                               parent.insertBefore(node, ref.nextSibling);
-                       }
-               }
-       };
-
-       dojo.place = function(node, refNode, position){
-               //      summary:
-               //              Attempt to insert node into the DOM, choosing from various positioning options.
-               //              Returns the first argument resolved to a DOM node.
-               //
-               //      node: String|DomNode
-               //              id or node reference, or HTML fragment starting with "<" to place relative to refNode
-               //
-               //      refNode: String|DomNode
-               //              id or node reference to use as basis for placement
-               //
-               //      position: String|Number?
-               //              string noting the position of node relative to refNode or a
-               //              number indicating the location in the childNodes collection of refNode.
-               //              Accepted string values are:
-               //      |       * before
-               //      |       * after
-               //      |       * replace
-               //      |       * only
-               //      |       * first
-               //      |       * last
-               //              "first" and "last" indicate positions as children of refNode, "replace" replaces refNode,
-               //              "only" replaces all children.  position defaults to "last" if not specified
-               //
-               //      returns: DomNode
-               //              Returned values is the first argument resolved to a DOM node.
-               //
-               //              .place() is also a method of `dojo.NodeList`, allowing `dojo.query` node lookups.
-               //
-               // example:
-               //              Place a node by string id as the last child of another node by string id:
-               //      |       dojo.place("someNode", "anotherNode");
-               //
-               // example:
-               //              Place a node by string id before another node by string id
-               //      |       dojo.place("someNode", "anotherNode", "before");
-               //
-               // example:
-               //              Create a Node, and place it in the body element (last child):
-               //      |       dojo.place("<div></div>", dojo.body());
-               //
-               // example:
-               //              Put a new LI as the first child of a list by id:
-               //      |       dojo.place("<li></li>", "someUl", "first");
-
-               refNode = byId(refNode);
-               if(typeof node == "string"){ // inline'd type check
-                       node = node.charAt(0) == "<" ? d._toDom(node, refNode.ownerDocument) : byId(node);
-               }
-               if(typeof position == "number"){ // inline'd type check
-                       var cn = refNode.childNodes;
-                       if(!cn.length || cn.length <= position){
-                               refNode.appendChild(node);
-                       }else{
-                               _insertBefore(node, cn[position < 0 ? 0 : position]);
-                       }
-               }else{
-                       switch(position){
-                               case "before":
-                                       _insertBefore(node, refNode);
-                                       break;
-                               case "after":
-                                       _insertAfter(node, refNode);
-                                       break;
-                               case "replace":
-                                       refNode.parentNode.replaceChild(node, refNode);
-                                       break;
-                               case "only":
-                                       d.empty(refNode);
-                                       refNode.appendChild(node);
-                                       break;
-                               case "first":
-                                       if(refNode.firstChild){
-                                               _insertBefore(node, refNode.firstChild);
-                                               break;
-                                       }
-                                       // else fallthrough...
-                               default: // aka: last
-                                       refNode.appendChild(node);
-                       }
-               }
-               return node; // DomNode
-       }
-
-       // Box functions will assume this model.
-       // On IE/Opera, BORDER_BOX will be set if the primary document is in quirks mode.
-       // Can be set to change behavior of box setters.
-
-       // can be either:
-       //      "border-box"
-       //      "content-box" (default)
-       dojo.boxModel = "content-box";
-
-       // We punt per-node box mode testing completely.
-       // If anybody cares, we can provide an additional (optional) unit 
-       // that overrides existing code to include per-node box sensitivity.
-
-       // Opera documentation claims that Opera 9 uses border-box in BackCompat mode.
-       // but experiments (Opera 9.10.8679 on Windows Vista) indicate that it actually continues to use content-box.
-       // IIRC, earlier versions of Opera did in fact use border-box.
-       // Opera guys, this is really confusing. Opera being broken in quirks mode is not our fault.
-
-               if(d.isIE /*|| dojo.isOpera*/){
-               // client code may have to adjust if compatMode varies across iframes
-               d.boxModel = document.compatMode == "BackCompat" ? "border-box" : "content-box";
-       }
-       
-       // =============================
-       // Style Functions
-       // =============================
-
-       // getComputedStyle drives most of the style code.
-       // Wherever possible, reuse the returned object.
-       //
-       // API functions below that need to access computed styles accept an 
-       // optional computedStyle parameter.
-       // If this parameter is omitted, the functions will call getComputedStyle themselves.
-       // This way, calling code can access computedStyle once, and then pass the reference to 
-       // multiple API functions.
-
-/*=====
-       dojo.getComputedStyle = function(node){
-               //      summary:
-               //              Returns a "computed style" object.
-               //
-               //      description:
-               //              Gets a "computed style" object which can be used to gather
-               //              information about the current state of the rendered node.
-               //
-               //              Note that this may behave differently on different browsers.
-               //              Values may have different formats and value encodings across
-               //              browsers.
-               //
-               //              Note also that this method is expensive.  Wherever possible,
-               //              reuse the returned object.
-               //
-               //              Use the dojo.style() method for more consistent (pixelized)
-               //              return values.
-               //
-               //      node: DOMNode
-               //              A reference to a DOM node. Does NOT support taking an
-               //              ID string for speed reasons.
-               //      example:
-               //      |       dojo.getComputedStyle(dojo.byId('foo')).borderWidth;
-               //
-               //      example:
-               //      Reusing the returned object, avoiding multiple lookups:
-               //      |       var cs = dojo.getComputedStyle(dojo.byId("someNode"));
-               //      |       var w = cs.width, h = cs.height;
-               return; // CSS2Properties
-       }
-=====*/
-
-       // Although we normally eschew argument validation at this
-       // level, here we test argument 'node' for (duck)type,
-       // by testing nodeType, ecause 'document' is the 'parentNode' of 'body'
-       // it is frequently sent to this function even 
-       // though it is not Element.
-       var gcs;
-               if(d.isWebKit){
-                       gcs = function(/*DomNode*/node){
-                       var s;
-                       if(node.nodeType == 1){
-                               var dv = node.ownerDocument.defaultView;
-                               s = dv.getComputedStyle(node, null);
-                               if(!s && node.style){
-                                       node.style.display = "";
-                                       s = dv.getComputedStyle(node, null);
-                               }
-                       }
-                       return s || {};
-               };
-               }else if(d.isIE){
-               gcs = function(node){
-                       // IE (as of 7) doesn't expose Element like sane browsers
-                       return node.nodeType == 1 /* ELEMENT_NODE*/ ? node.currentStyle : {};
-               };
-       }else{
-               gcs = function(node){
-                       return node.nodeType == 1 ?
-                               node.ownerDocument.defaultView.getComputedStyle(node, null) : {};
-               };
-       }
-               dojo.getComputedStyle = gcs;
-
-               if(!d.isIE){
-                       d._toPixelValue = function(element, value){
-                       // style values can be floats, client code may want
-                       // to round for integer pixels.
-                       return parseFloat(value) || 0;
-               };
-               }else{
-               d._toPixelValue = function(element, avalue){
-                       if(!avalue){ return 0; }
-                       // on IE7, medium is usually 4 pixels
-                       if(avalue == "medium"){ return 4; }
-                       // style values can be floats, client code may
-                       // want to round this value for integer pixels.
-                       if(avalue.slice && avalue.slice(-2) == 'px'){ return parseFloat(avalue); }
-                       with(element){
-                               var sLeft = style.left;
-                               var rsLeft = runtimeStyle.left;
-                               runtimeStyle.left = currentStyle.left;
-                               try{
-                                       // 'avalue' may be incompatible with style.left, which can cause IE to throw
-                                       // this has been observed for border widths using "thin", "medium", "thick" constants
-                                       // those particular constants could be trapped by a lookup
-                                       // but perhaps there are more
-                                       style.left = avalue;
-                                       avalue = style.pixelLeft;
-                               }catch(e){
-                                       avalue = 0;
-                               }
-                               style.left = sLeft;
-                               runtimeStyle.left = rsLeft;
-                       }
-                       return avalue;
-               }
-       }
-               var px = d._toPixelValue;
-
-       // FIXME: there opacity quirks on FF that we haven't ported over. Hrm.
-       /*=====
-       dojo._getOpacity = function(node){
-                       //      summary:
-                       //              Returns the current opacity of the passed node as a
-                       //              floating-point value between 0 and 1.
-                       //      node: DomNode
-                       //              a reference to a DOM node. Does NOT support taking an
-                       //              ID string for speed reasons.
-                       //      returns: Number between 0 and 1
-                       return; // Number
-       }
-       =====*/
-
-               var astr = "DXImageTransform.Microsoft.Alpha";
-       var af = function(n, f){
-               try{
-                       return n.filters.item(astr);
-               }catch(e){
-                       return f ? {} : null;
-               }
-       };
-
-               dojo._getOpacity =
-                       d.isIE ? function(node){
-                       try{
-                               return af(node).Opacity / 100; // Number
-                       }catch(e){
-                               return 1; // Number
-                       }
-               } :
-                       function(node){
-                       return gcs(node).opacity;
-               };
-
-       /*=====
-       dojo._setOpacity = function(node, opacity){
-                       //      summary:
-                       //              set the opacity of the passed node portably. Returns the
-                       //              new opacity of the node.
-                       //      node: DOMNode
-                       //              a reference to a DOM node. Does NOT support taking an
-                       //              ID string for performance reasons.
-                       //      opacity: Number
-                       //              A Number between 0 and 1. 0 specifies transparent.
-                       //      returns: Number between 0 and 1
-                       return; // Number
-       }
-       =====*/
-
-       dojo._setOpacity =
-                               d.isIE ? function(/*DomNode*/node, /*Number*/opacity){
-                       var ov = opacity * 100;
-                       node.style.zoom = 1.0;
-
-                       // on IE7 Alpha(Filter opacity=100) makes text look fuzzy so disable it altogether (bug #2661),
-                       //but still update the opacity value so we can get a correct reading if it is read later.
-                       af(node, 1).Enabled = !(opacity == 1);
-
-                       if(!af(node)){
-                               node.style.filter += " progid:" + astr + "(Opacity=" + ov + ")";
-                       }else{
-                               af(node, 1).Opacity = ov;
-                       }
-
-                       if(node.nodeName.toLowerCase() == "tr"){
-                               d.query("> td", node).forEach(function(i){
-                                       d._setOpacity(i, opacity);
-                               });
-                       }
-                       return opacity;
-               } :
-                               function(node, opacity){
-                       return node.style.opacity = opacity;
-               };
-
-       var _pixelNamesCache = {
-               left: true, top: true
-       };
-       var _pixelRegExp = /margin|padding|width|height|max|min|offset/;  // |border
-       var _toStyleValue = function(node, type, value){
-               type = type.toLowerCase(); // FIXME: should we really be doing string case conversion here? Should we cache it? Need to profile!
-                               if(d.isIE){
-                       if(value == "auto"){
-                               if(type == "height"){ return node.offsetHeight; }
-                               if(type == "width"){ return node.offsetWidth; }
-                       }
-                       if(type == "fontweight"){
-                               switch(value){
-                                       case 700: return "bold";
-                                       case 400:
-                                       default: return "normal";
-                               }
-                       }
-               }
-                               if(!(type in _pixelNamesCache)){
-                       _pixelNamesCache[type] = _pixelRegExp.test(type);
-               }
-               return _pixelNamesCache[type] ? px(node, value) : value;
-       };
-
-       var _floatStyle = d.isIE ? "styleFloat" : "cssFloat",
-               _floatAliases = { "cssFloat": _floatStyle, "styleFloat": _floatStyle, "float": _floatStyle }
-       ;
-
-       // public API
-
-       dojo.style = function(  /*DomNode|String*/ node,
-                                                       /*String?|Object?*/ style,
-                                                       /*String?*/ value){
-               //      summary:
-               //              Accesses styles on a node. If 2 arguments are
-               //              passed, acts as a getter. If 3 arguments are passed, acts
-               //              as a setter.
-               //      description:
-               //              Getting the style value uses the computed style for the node, so the value
-               //              will be a calculated value, not just the immediate node.style value.
-               //              Also when getting values, use specific style names,
-               //              like "borderBottomWidth" instead of "border" since compound values like
-               //              "border" are not necessarily reflected as expected.
-               //              If you want to get node dimensions, use `dojo.marginBox()`, 
-               //              `dojo.contentBox()` or `dojo.position()`.
-               //      node:
-               //              id or reference to node to get/set style for
-               //      style:
-               //              the style property to set in DOM-accessor format
-               //              ("borderWidth", not "border-width") or an object with key/value
-               //              pairs suitable for setting each property.
-               //      value:
-               //              If passed, sets value on the node for style, handling
-               //              cross-browser concerns.  When setting a pixel value,
-               //              be sure to include "px" in the value. For instance, top: "200px".
-               //              Otherwise, in some cases, some browsers will not apply the style.
-               //      example:
-               //              Passing only an ID or node returns the computed style object of
-               //              the node:
-               //      |       dojo.style("thinger");
-               //      example:
-               //              Passing a node and a style property returns the current
-               //              normalized, computed value for that property:
-               //      |       dojo.style("thinger", "opacity"); // 1 by default
-               //
-               //      example:
-               //              Passing a node, a style property, and a value changes the
-               //              current display of the node and returns the new computed value
-               //      |       dojo.style("thinger", "opacity", 0.5); // == 0.5
-               //
-               //      example:
-               //              Passing a node, an object-style style property sets each of the values in turn and returns the computed style object of the node:
-               //      |       dojo.style("thinger", {
-               //      |               "opacity": 0.5,
-               //      |               "border": "3px solid black",
-               //      |               "height": "300px"
-               //      |       });
-               //
-               //      example:
-               //              When the CSS style property is hyphenated, the JavaScript property is camelCased.
-               //              font-size becomes fontSize, and so on.
-               //      |       dojo.style("thinger",{
-               //      |               fontSize:"14pt",
-               //      |               letterSpacing:"1.2em"
-               //      |       });
-               //
-               //      example:
-               //              dojo.NodeList implements .style() using the same syntax, omitting the "node" parameter, calling
-               //              dojo.style() on every element of the list. See: `dojo.query()` and `dojo.NodeList()`
-               //      |       dojo.query(".someClassName").style("visibility","hidden");
-               //      |       // or
-               //      |       dojo.query("#baz > div").style({
-               //      |               opacity:0.75,
-               //      |               fontSize:"13pt"
-               //      |       });
-
-               var n = byId(node), args = arguments.length, op = (style == "opacity");
-               style = _floatAliases[style] || style;
-               if(args == 3){
-                       return op ? d._setOpacity(n, value) : n.style[style] = value; /*Number*/
-               }
-               if(args == 2 && op){
-                       return d._getOpacity(n);
-               }
-               var s = gcs(n);
-               if(args == 2 && typeof style != "string"){ // inline'd type check
-                       for(var x in style){
-                               d.style(node, x, style[x]);
-                       }
-                       return s;
-               }
-               return (args == 1) ? s : _toStyleValue(n, style, s[style] || n.style[style]); /* CSS2Properties||String||Number */
-       }
-
-       // =============================
-       // Box Functions
-       // =============================
-
-       dojo._getPadExtents = function(/*DomNode*/n, /*Object*/computedStyle){
-               //      summary:
-               //              Returns object with special values specifically useful for node
-               //              fitting.
-               //      description:
-               //              Returns an object with `w`, `h`, `l`, `t` properties:
-               //      |               l/t = left/top padding (respectively)
-               //      |               w = the total of the left and right padding 
-               //      |               h = the total of the top and bottom padding
-               //              If 'node' has position, l/t forms the origin for child nodes.
-               //              The w/h are used for calculating boxes.
-               //              Normally application code will not need to invoke this
-               //              directly, and will use the ...box... functions instead.
-               var 
-                       s = computedStyle||gcs(n),
-                       l = px(n, s.paddingLeft),
-                       t = px(n, s.paddingTop);
-               return {
-                       l: l,
-                       t: t,
-                       w: l+px(n, s.paddingRight),
-                       h: t+px(n, s.paddingBottom)
-               };
-       }
-
-       dojo._getBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
-               //      summary:
-               //              returns an object with properties useful for noting the border
-               //              dimensions.
-               //      description:
-               //              * l/t = the sum of left/top border (respectively)
-               //              * w = the sum of the left and right border
-               //              * h = the sum of the top and bottom border
-               //
-               //              The w/h are used for calculating boxes.
-               //              Normally application code will not need to invoke this
-               //              directly, and will use the ...box... functions instead.
-               var 
-                       ne = "none",
-                       s = computedStyle||gcs(n),
-                       bl = (s.borderLeftStyle != ne ? px(n, s.borderLeftWidth) : 0),
-                       bt = (s.borderTopStyle != ne ? px(n, s.borderTopWidth) : 0);
-               return {
-                       l: bl,
-                       t: bt,
-                       w: bl + (s.borderRightStyle!=ne ? px(n, s.borderRightWidth) : 0),
-                       h: bt + (s.borderBottomStyle!=ne ? px(n, s.borderBottomWidth) : 0)
-               };
-       }
-
-       dojo._getPadBorderExtents = function(/*DomNode*/n, /*Object*/computedStyle){
-               //      summary:
-               //              Returns object with properties useful for box fitting with
-               //              regards to padding.
-               // description:
-               //              * l/t = the sum of left/top padding and left/top border (respectively)
-               //              * w = the sum of the left and right padding and border
-               //              * h = the sum of the top and bottom padding and border
-               //
-               //              The w/h are used for calculating boxes.
-               //              Normally application code will not need to invoke this
-               //              directly, and will use the ...box... functions instead.
-               var 
-                       s = computedStyle||gcs(n),
-                       p = d._getPadExtents(n, s),
-                       b = d._getBorderExtents(n, s);
-               return {
-                       l: p.l + b.l,
-                       t: p.t + b.t,
-                       w: p.w + b.w,
-                       h: p.h + b.h
-               };
-       }
-
-       dojo._getMarginExtents = function(n, computedStyle){
-               //      summary:
-               //              returns object with properties useful for box fitting with
-               //              regards to box margins (i.e., the outer-box).
-               //
-               //              * l/t = marginLeft, marginTop, respectively
-               //              * w = total width, margin inclusive
-               //              * h = total height, margin inclusive
-               //
-               //              The w/h are used for calculating boxes.
-               //              Normally application code will not need to invoke this
-               //              directly, and will use the ...box... functions instead.
-               var 
-                       s = computedStyle||gcs(n),
-                       l = px(n, s.marginLeft),
-                       t = px(n, s.marginTop),
-                       r = px(n, s.marginRight),
-                       b = px(n, s.marginBottom);
-               if(d.isWebKit && (s.position != "absolute")){
-                       // FIXME: Safari's version of the computed right margin
-                       // is the space between our right edge and the right edge 
-                       // of our offsetParent.
-                       // What we are looking for is the actual margin value as 
-                       // determined by CSS.
-                       // Hack solution is to assume left/right margins are the same.
-                       r = l;
-               }
-               return {
-                       l: l,
-                       t: t,
-                       w: l+r,
-                       h: t+b
-               };
-       }
-
-       // Box getters work in any box context because offsetWidth/clientWidth
-       // are invariant wrt box context
-       //
-       // They do *not* work for display: inline objects that have padding styles
-       // because the user agent ignores padding (it's bogus styling in any case)
-       //
-       // Be careful with IMGs because they are inline or block depending on 
-       // browser and browser mode.
-
-       // Although it would be easier to read, there are not separate versions of 
-       // _getMarginBox for each browser because:
-       // 1. the branching is not expensive
-       // 2. factoring the shared code wastes cycles (function call overhead)
-       // 3. duplicating the shared code wastes bytes
-
-       dojo._getMarginBox = function(/*DomNode*/node, /*Object*/computedStyle){
-               // summary:
-               //              returns an object that encodes the width, height, left and top
-               //              positions of the node's margin box.
-               var s = computedStyle || gcs(node), me = d._getMarginExtents(node, s);
-               var l = node.offsetLeft - me.l, t = node.offsetTop - me.t, p = node.parentNode;
-                               if(d.isMoz){
-                       // Mozilla:
-                       // If offsetParent has a computed overflow != visible, the offsetLeft is decreased
-                       // by the parent's border.
-                       // We don't want to compute the parent's style, so instead we examine node's
-                       // computed left/top which is more stable.
-                       var sl = parseFloat(s.left), st = parseFloat(s.top);
-                       if(!isNaN(sl) && !isNaN(st)){
-                               l = sl, t = st;
-                       }else{
-                               // If child's computed left/top are not parseable as a number (e.g. "auto"), we
-                               // have no choice but to examine the parent's computed style.
-                               if(p && p.style){
-                                       var pcs = gcs(p);
-                                       if(pcs.overflow != "visible"){
-                                               var be = d._getBorderExtents(p, pcs);
-                                               l += be.l, t += be.t;
-                                       }
-                               }
-                       }
-               }else if(d.isOpera || (d.isIE > 7 && !d.isQuirks)){
-                       // On Opera and IE 8, offsetLeft/Top includes the parent's border
-                       if(p){
-                               be = d._getBorderExtents(p);
-                               l -= be.l;
-                               t -= be.t;
-                       }
-               }
-                               return {
-                       l: l,
-                       t: t,
-                       w: node.offsetWidth + me.w,
-                       h: node.offsetHeight + me.h 
-               };
-       }
-
-       dojo._getContentBox = function(node, computedStyle){
-               // summary:
-               //              Returns an object that encodes the width, height, left and top
-               //              positions of the node's content box, irrespective of the
-               //              current box model.
-
-               // clientWidth/Height are important since the automatically account for scrollbars
-               // fallback to offsetWidth/Height for special cases (see #3378)
-               var s = computedStyle || gcs(node),
-                       pe = d._getPadExtents(node, s),
-                       be = d._getBorderExtents(node, s),
-                       w = node.clientWidth,
-                       h
-               ;
-               if(!w){
-                       w = node.offsetWidth, h = node.offsetHeight;
-               }else{
-                       h = node.clientHeight, be.w = be.h = 0;
-               }
-               // On Opera, offsetLeft includes the parent's border
-                               if(d.isOpera){ pe.l += be.l; pe.t += be.t; };
-                               return {
-                       l: pe.l,
-                       t: pe.t,
-                       w: w - pe.w - be.w,
-                       h: h - pe.h - be.h
-               };
-       }
-
-       dojo._getBorderBox = function(node, computedStyle){
-               var s = computedStyle || gcs(node),
-                       pe = d._getPadExtents(node, s),
-                       cb = d._getContentBox(node, s)
-               ;
-               return {
-                       l: cb.l - pe.l,
-                       t: cb.t - pe.t,
-                       w: cb.w + pe.w,
-                       h: cb.h + pe.h
-               };
-       }
-
-       // Box setters depend on box context because interpretation of width/height styles
-       // vary wrt box context.
-       //
-       // The value of dojo.boxModel is used to determine box context.
-       // dojo.boxModel can be set directly to change behavior.
-       //
-       // Beware of display: inline objects that have padding styles
-       // because the user agent ignores padding (it's a bogus setup anyway)
-       //
-       // Be careful with IMGs because they are inline or block depending on 
-       // browser and browser mode.
-       //
-       // Elements other than DIV may have special quirks, like built-in
-       // margins or padding, or values not detectable via computedStyle.
-       // In particular, margins on TABLE do not seems to appear 
-       // at all in computedStyle on Mozilla.
-
-       dojo._setBox = function(/*DomNode*/node, /*Number?*/l, /*Number?*/t, /*Number?*/w, /*Number?*/h, /*String?*/u){
-               //      summary:
-               //              sets width/height/left/top in the current (native) box-model
-               //              dimentions. Uses the unit passed in u.
-               //      node:
-               //              DOM Node reference. Id string not supported for performance
-               //              reasons.
-               //      l:
-               //              left offset from parent.
-               //      t:
-               //              top offset from parent.
-               //      w:
-               //              width in current box model.
-               //      h:
-               //              width in current box model.
-               //      u:
-               //              unit measure to use for other measures. Defaults to "px".
-               u = u || "px";
-               var s = node.style;
-               if(!isNaN(l)){ s.left = l + u; }
-               if(!isNaN(t)){ s.top = t + u; }
-               if(w >= 0){ s.width = w + u; }
-               if(h >= 0){ s.height = h + u; }
-       }
-
-       dojo._isButtonTag = function(/*DomNode*/node) {
-               // summary:
-               //              True if the node is BUTTON or INPUT.type="button".
-               return node.tagName == "BUTTON"
-                       || node.tagName=="INPUT" && (node.getAttribute("type")||'').toUpperCase() == "BUTTON"; // boolean
-       }
-
-       dojo._usesBorderBox = function(/*DomNode*/node){
-               //      summary:
-               //              True if the node uses border-box layout.
-
-               // We could test the computed style of node to see if a particular box
-               // has been specified, but there are details and we choose not to bother.
-
-               // TABLE and BUTTON (and INPUT type=button) are always border-box by default.
-               // If you have assigned a different box to either one via CSS then
-               // box functions will break.
-
-               var n = node.tagName;
-               return d.boxModel=="border-box" || n=="TABLE" || d._isButtonTag(node); // boolean
-       }
-
-       dojo._setContentSize = function(/*DomNode*/node, /*Number*/widthPx, /*Number*/heightPx, /*Object*/computedStyle){
-               //      summary:
-               //              Sets the size of the node's contents, irrespective of margins,
-               //              padding, or borders.
-               if(d._usesBorderBox(node)){
-                       var pb = d._getPadBorderExtents(node, computedStyle);
-                       if(widthPx >= 0){ widthPx += pb.w; }
-                       if(heightPx >= 0){ heightPx += pb.h; }
-               }
-               d._setBox(node, NaN, NaN, widthPx, heightPx);
-       }
-
-       dojo._setMarginBox = function(/*DomNode*/node,  /*Number?*/leftPx, /*Number?*/topPx,
-                                                                                                       /*Number?*/widthPx, /*Number?*/heightPx,
-                                                                                                       /*Object*/computedStyle){
-               //      summary:
-               //              sets the size of the node's margin box and placement
-               //              (left/top), irrespective of box model. Think of it as a
-               //              passthrough to dojo._setBox that handles box-model vagaries for
-               //              you.
-
-               var s = computedStyle || gcs(node),
-               // Some elements have special padding, margin, and box-model settings.
-               // To use box functions you may need to set padding, margin explicitly.
-               // Controlling box-model is harder, in a pinch you might set dojo.boxModel.
-                       bb = d._usesBorderBox(node),
-                       pb = bb ? _nilExtents : d._getPadBorderExtents(node, s)
-               ;
-               if(d.isWebKit){
-                       // on Safari (3.1.2), button nodes with no explicit size have a default margin
-                       // setting an explicit size eliminates the margin.
-                       // We have to swizzle the width to get correct margin reading.
-                       if(d._isButtonTag(node)){
-                               var ns = node.style;
-                               if(widthPx >= 0 && !ns.width) { ns.width = "4px"; }
-                               if(heightPx >= 0 && !ns.height) { ns.height = "4px"; }
-                       }
-               }
-               var mb = d._getMarginExtents(node, s);
-               if(widthPx >= 0){ widthPx = Math.max(widthPx - pb.w - mb.w, 0); }
-               if(heightPx >= 0){ heightPx = Math.max(heightPx - pb.h - mb.h, 0); }
-               d._setBox(node, leftPx, topPx, widthPx, heightPx);
-       }
-
-       var _nilExtents = { l:0, t:0, w:0, h:0 };
-
-       // public API
-
-       dojo.marginBox = function(/*DomNode|String*/node, /*Object?*/box){
-               //      summary:
-               //              Getter/setter for the margin-box of node.
-               //      description:
-               //              Getter/setter for the margin-box of node.
-               //              Returns an object in the expected format of box (regardless
-               //              if box is passed). The object might look like:
-               //                      `{ l: 50, t: 200, w: 300: h: 150 }`
-               //              for a node offset from its parent 50px to the left, 200px from
-               //              the top with a margin width of 300px and a margin-height of
-               //              150px.
-               //      node:
-               //              id or reference to DOM Node to get/set box for
-               //      box:
-               //              If passed, denotes that dojo.marginBox() should
-               //              update/set the margin box for node. Box is an object in the
-               //              above format. All properties are optional if passed.
-               //      example:
-               //      Retrieve the marginbox of a passed node
-               //      |       var box = dojo.marginBox("someNodeId");
-               //      |       console.dir(box);
-               //
-               //      example:
-               //      Set a node's marginbox to the size of another node
-               //      |       var box = dojo.marginBox("someNodeId");
-               //      |       dojo.marginBox("someOtherNode", box);
-               
-               var n = byId(node), s = gcs(n), b = box;
-               return !b ? d._getMarginBox(n, s) : d._setMarginBox(n, b.l, b.t, b.w, b.h, s); // Object
-       }
-
-       dojo.contentBox = function(/*DomNode|String*/node, /*Object?*/box){
-               //      summary:
-               //              Getter/setter for the content-box of node.
-               //      description:
-               //              Returns an object in the expected format of box (regardless if box is passed).
-               //              The object might look like:
-               //                      `{ l: 50, t: 200, w: 300: h: 150 }`
-               //              for a node offset from its parent 50px to the left, 200px from
-               //              the top with a content width of 300px and a content-height of
-               //              150px. Note that the content box may have a much larger border
-               //              or margin box, depending on the box model currently in use and
-               //              CSS values set/inherited for node.
-               //      node:
-               //              id or reference to DOM Node to get/set box for
-               //      box:
-               //              If passed, denotes that dojo.contentBox() should
-               //              update/set the content box for node. Box is an object in the
-               //              above format. All properties are optional if passed.
-               var n = byId(node), s = gcs(n), b = box;
-               return !b ? d._getContentBox(n, s) : d._setContentSize(n, b.w, b.h, s); // Object
-       }
-
-       // =============================
-       // Positioning 
-       // =============================
-
-       var _sumAncestorProperties = function(node, prop){
-               if(!(node = (node||0).parentNode)){return 0}
-               var val, retVal = 0, _b = d.body();
-               while(node && node.style){
-                       if(gcs(node).position == "fixed"){
-                               return 0;
-                       }
-                       val = node[prop];
-                       if(val){
-                               retVal += val - 0;
-                               // opera and khtml #body & #html has the same values, we only
-                               // need one value
-                               if(node == _b){ break; }
-                       }
-                       node = node.parentNode;
-               }
-               return retVal;  //      integer
-       }
-
-       dojo._docScroll = function(){
-               var n = d.global;
-               return "pageXOffset" in n? { x:n.pageXOffset, y:n.pageYOffset } :
-                       (n=d.doc.documentElement, n.clientHeight? { x:d._fixIeBiDiScrollLeft(n.scrollLeft), y:n.scrollTop } :
-                       (n=d.body(), { x:n.scrollLeft||0, y:n.scrollTop||0 }));
-       };
-
-       dojo._isBodyLtr = function(){
-               return "_bodyLtr" in d? d._bodyLtr :
-                       d._bodyLtr = (d.body().dir || d.doc.documentElement.dir || "ltr").toLowerCase() == "ltr"; // Boolean 
-       }
-
-               dojo._getIeDocumentElementOffset = function(){
-               //      summary:
-               //              returns the offset in x and y from the document body to the
-               //              visual edge of the page
-               //      description:
-               // The following values in IE contain an offset:
-               //      |               event.clientX
-               //      |               event.clientY
-               //      |               node.getBoundingClientRect().left
-               //      |               node.getBoundingClientRect().top
-               //              But other position related values do not contain this offset,
-               //              such as node.offsetLeft, node.offsetTop, node.style.left and
-               //              node.style.top. The offset is always (2, 2) in LTR direction.
-               //              When the body is in RTL direction, the offset counts the width
-               //              of left scroll bar's width.  This function computes the actual
-               //              offset.
-
-               //NOTE: assumes we're being called in an IE browser
-
-               var de = d.doc.documentElement; // only deal with HTML element here, _abs handles body/quirks 
-
-               if(d.isIE < 8){
-                       var r = de.getBoundingClientRect(); // works well for IE6+
-                       //console.debug('rect left,top = ' + r.left+','+r.top + ', html client left/top = ' + de.clientLeft+','+de.clientTop + ', rtl = ' + (!d._isBodyLtr()) + ', quirks = ' + d.isQuirks);
-                       var l = r.left,
-                           t = r.top;
-                       if(d.isIE < 7){
-                               l += de.clientLeft;     // scrollbar size in strict/RTL, or,
-                               t += de.clientTop;      // HTML border size in strict
-                       }
-                       return {
-                               x: l < 0? 0 : l, // FRAME element border size can lead to inaccurate negative values
-                               y: t < 0? 0 : t
-                       };
-               }else{
-                       return {
-                               x: 0,
-                               y: 0
-                       };
-               }
-
-       };
-       
-       dojo._fixIeBiDiScrollLeft = function(/*Integer*/ scrollLeft){
-               // In RTL direction, scrollLeft should be a negative value, but IE < 8
-               // returns a positive one. All codes using documentElement.scrollLeft
-               // must call this function to fix this error, otherwise the position
-               // will offset to right when there is a horizontal scrollbar.
-
-                               var dd = d.doc;
-               if(d.isIE < 8 && !d._isBodyLtr()){
-                       var de = d.isQuirks ? dd.body : dd.documentElement;
-                       return scrollLeft + de.clientWidth - de.scrollWidth; // Integer
-               }
-                               return scrollLeft; // Integer
-       }
-
-       // FIXME: need a setter for coords or a moveTo!!
-       dojo._abs = dojo.position = function(/*DomNode*/node, /*Boolean?*/includeScroll){
-               //      summary:
-               //              Gets the position and size of the passed element relative to
-               //              the viewport (if includeScroll==false), or relative to the
-               //              document root (if includeScroll==true).
-               //
-               //      description:
-               //              Returns an object of the form:
-               //                      { x: 100, y: 300, w: 20, h: 15 }
-               //              If includeScroll==true, the x and y values will include any
-               //              document offsets that may affect the position relative to the
-               //              viewport.
-               //              Uses the border-box model (inclusive of border and padding but
-               //              not margin).  Does not act as a setter.
-
-               var db = d.body(), dh = db.parentNode, ret;
-               node = byId(node);
-               if(node["getBoundingClientRect"]){
-                       // IE6+, FF3+, super-modern WebKit, and Opera 9.6+ all take this branch
-                       ret = node.getBoundingClientRect();
-                       ret = { x: ret.left, y: ret.top, w: ret.right - ret.left, h: ret.bottom - ret.top };
-                                       if(d.isIE){
-                               // On IE there's a 2px offset that we need to adjust for, see _getIeDocumentElementOffset()
-                               var offset = d._getIeDocumentElementOffset();
-
-                               // fixes the position in IE, quirks mode
-                               ret.x -= offset.x + (d.isQuirks ? db.clientLeft+db.offsetLeft : 0);
-                               ret.y -= offset.y + (d.isQuirks ? db.clientTop+db.offsetTop : 0);
-                       }else if(d.isFF == 3){
-                               // In FF3 you have to subtract the document element margins.
-                               // Fixed in FF3.5 though.
-                               var cs = gcs(dh);
-                               ret.x -= px(dh, cs.marginLeft) + px(dh, cs.borderLeftWidth);
-                               ret.y -= px(dh, cs.marginTop) + px(dh, cs.borderTopWidth);
-                       }
-                               }else{
-                       // FF2 and older WebKit
-                       ret = {
-                               x: 0,
-                               y: 0,
-                               w: node.offsetWidth,
-                               h: node.offsetHeight
-                       };
-                       if(node["offsetParent"]){
-                               ret.x -= _sumAncestorProperties(node, "scrollLeft");
-                               ret.y -= _sumAncestorProperties(node, "scrollTop");
-
-                               var curnode = node;
-                               do{
-                                       var n = curnode.offsetLeft,
-                                               t = curnode.offsetTop;
-                                       ret.x += isNaN(n) ? 0 : n;
-                                       ret.y += isNaN(t) ? 0 : t;
-
-                                       cs = gcs(curnode);
-                                       if(curnode != node){
-                                                               if(d.isMoz){
-                                                       // tried left+right with differently sized left/right borders
-                                                       // it really is 2xleft border in FF, not left+right, even in RTL!
-                                                       ret.x += 2 * px(curnode,cs.borderLeftWidth);
-                                                       ret.y += 2 * px(curnode,cs.borderTopWidth);
-                                               }else{
-                                                                       ret.x += px(curnode, cs.borderLeftWidth);
-                                                       ret.y += px(curnode, cs.borderTopWidth);
-                                                               }
-                                                       }
-                                       // static children in a static div in FF2 are affected by the div's border as well
-                                       // but offsetParent will skip this div!
-                                                       if(d.isMoz && cs.position=="static"){
-                                               var parent=curnode.parentNode;
-                                               while(parent!=curnode.offsetParent){
-                                                       var pcs=gcs(parent);
-                                                       if(pcs.position=="static"){
-                                                               ret.x += px(curnode,pcs.borderLeftWidth);
-                                                               ret.y += px(curnode,pcs.borderTopWidth);
-                                                       }
-                                                       parent=parent.parentNode;
-                                               }
-                                       }
-                                                       curnode = curnode.offsetParent;
-                               }while((curnode != dh) && curnode);
-                       }else if(node.x && node.y){
-                               ret.x += isNaN(node.x) ? 0 : node.x;
-                               ret.y += isNaN(node.y) ? 0 : node.y;
-                       }
-               }
-               // account for document scrolling
-               // if offsetParent is used, ret value already includes scroll position
-               // so we may have to actually remove that value if !includeScroll
-               if(includeScroll){
-                       var scroll = d._docScroll();
-                       ret.x += scroll.x;
-                       ret.y += scroll.y;
-               }
-
-               return ret; // Object
-       }
-
-       dojo.coords = function(/*DomNode|String*/node, /*Boolean?*/includeScroll){
-               //      summary:
-               //              Deprecated: Use position() for border-box x/y/w/h
-               //              or marginBox() for margin-box w/h/l/t.
-               //              Returns an object representing a node's size and position.
-               //
-               //      description:
-               //              Returns an object that measures margin-box (w)idth/(h)eight
-               //              and absolute position x/y of the border-box. Also returned
-               //              is computed (l)eft and (t)op values in pixels from the
-               //              node's offsetParent as returned from marginBox().
-               //              Return value will be in the form:
-               //|                     { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 }
-               //              Does not act as a setter. If includeScroll is passed, the x and
-               //              y params are affected as one would expect in dojo.position().
-               var n = byId(node), s = gcs(n), mb = d._getMarginBox(n, s);
-               var abs = d.position(n, includeScroll);
-               mb.x = abs.x;
-               mb.y = abs.y;
-               return mb;
-       }
-
-       // =============================
-       // Element attribute Functions
-       // =============================
-
-       // dojo.attr() should conform to http://www.w3.org/TR/DOM-Level-2-Core/
-
-       var _propNames = {
-                       // properties renamed to avoid clashes with reserved words
-                       "class":   "className",
-                       "for":     "htmlFor",
-                       // properties written as camelCase
-                       tabindex:  "tabIndex",
-                       readonly:  "readOnly",
-                       colspan:   "colSpan",
-                       frameborder: "frameBorder",
-                       rowspan:   "rowSpan",
-                       valuetype: "valueType"
-               },
-               _attrNames = {
-                       // original attribute names
-                       classname: "class",
-                       htmlfor:   "for",
-                       // for IE
-                       tabindex:  "tabIndex",
-                       readonly:  "readOnly"
-               },
-               _forcePropNames = {
-                       innerHTML: 1,
-                       className: 1,
-                       htmlFor:   d.isIE,
-                       value:     1
-               };
-
-       var _fixAttrName = function(/*String*/ name){
-               return _attrNames[name.toLowerCase()] || name;
-       };
-
-       var _hasAttr = function(node, name){
-               var attr = node.getAttributeNode && node.getAttributeNode(name);
-               return attr && attr.specified; // Boolean
-       };
-
-       // There is a difference in the presence of certain properties and their default values
-       // between browsers. For example, on IE "disabled" is present on all elements,
-       // but it is value is "false"; "tabIndex" of <div> returns 0 by default on IE, yet other browsers
-       // can return -1.
-
-       dojo.hasAttr = function(/*DomNode|String*/node, /*String*/name){
-               //      summary:
-               //              Returns true if the requested attribute is specified on the
-               //              given element, and false otherwise.
-               //      node:
-               //              id or reference to the element to check
-               //      name:
-               //              the name of the attribute
-               //      returns:
-               //              true if the requested attribute is specified on the
-               //              given element, and false otherwise
-               var lc = name.toLowerCase();
-               return _forcePropNames[_propNames[lc] || name] || _hasAttr(byId(node), _attrNames[lc] || name); // Boolean
-       }
-
-       var _evtHdlrMap = {}, _ctr = 0,
-               _attrId = dojo._scopeName + "attrid",
-               // the next dictionary lists elements with read-only innerHTML on IE
-               _roInnerHtml = {col: 1, colgroup: 1,
-                       // frameset: 1, head: 1, html: 1, style: 1,
-                       table: 1, tbody: 1, tfoot: 1, thead: 1, tr: 1, title: 1};
-
-       dojo.attr = function(/*DomNode|String*/node, /*String|Object*/name, /*String?*/value){
-               //      summary:
-               //              Gets or sets an attribute on an HTML element.
-               //      description:
-               //              Handles normalized getting and setting of attributes on DOM
-               //              Nodes. If 2 arguments are passed, and a the second argumnt is a
-               //              string, acts as a getter.
-               //
-               //              If a third argument is passed, or if the second argument is a
-               //              map of attributes, acts as a setter.
-               //
-               //              When passing functions as values, note that they will not be
-               //              directly assigned to slots on the node, but rather the default
-               //              behavior will be removed and the new behavior will be added
-               //              using `dojo.connect()`, meaning that event handler properties
-               //              will be normalized and that some caveats with regards to
-               //              non-standard behaviors for onsubmit apply. Namely that you
-               //              should cancel form submission using `dojo.stopEvent()` on the
-               //              passed event object instead of returning a boolean value from
-               //              the handler itself.
-               //      node:
-               //              id or reference to the element to get or set the attribute on
-               //      name:
-               //              the name of the attribute to get or set.
-               //      value:
-               //              The value to set for the attribute
-               //      returns:
-               //              when used as a getter, the value of the requested attribute
-               //              or null if that attribute does not have a specified or
-               //              default value;
-               //
-               //              when used as a setter, the DOM node
-               //
-               //      example:
-               //      |       // get the current value of the "foo" attribute on a node
-               //      |       dojo.attr(dojo.byId("nodeId"), "foo");
-               //      |       // or we can just pass the id:
-               //      |       dojo.attr("nodeId", "foo");
-               //
-               //      example:
-               //      |       // use attr() to set the tab index
-               //      |       dojo.attr("nodeId", "tabIndex", 3);
-               //      |
-               //
-               //      example:
-               //      Set multiple values at once, including event handlers:
-               //      |       dojo.attr("formId", {
-               //      |               "foo": "bar",
-               //      |               "tabIndex": -1,
-               //      |               "method": "POST",
-               //      |               "onsubmit": function(e){
-               //      |                       // stop submitting the form. Note that the IE behavior
-               //      |                       // of returning true or false will have no effect here
-               //      |                       // since our handler is connect()ed to the built-in
-               //      |                       // onsubmit behavior and so we need to use
-               //      |                       // dojo.stopEvent() to ensure that the submission
-               //      |                       // doesn't proceed.
-               //      |                       dojo.stopEvent(e);
-               //      |
-               //      |                       // submit the form with Ajax
-               //      |                       dojo.xhrPost({ form: "formId" });
-               //      |               }
-               //      |       });
-               //
-               //      example:
-               //      Style is s special case: Only set with an object hash of styles
-               //      |       dojo.attr("someNode",{
-               //      |               id:"bar",
-               //      |               style:{
-               //      |                       width:"200px", height:"100px", color:"#000"
-               //      |               }
-               //      |       });
-               //
-               //      example:
-               //      Again, only set style as an object hash of styles:
-               //      |       var obj = { color:"#fff", backgroundColor:"#000" };
-               //      |       dojo.attr("someNode", "style", obj);
-               //      |
-               //      |       // though shorter to use `dojo.style()` in this case:
-               //      |       dojo.style("someNode", obj);
-
-               node = byId(node);
-               var args = arguments.length, prop;
-               if(args == 2 && typeof name != "string"){ // inline'd type check
-                       // the object form of setter: the 2nd argument is a dictionary
-                       for(var x in name){
-                               d.attr(node, x, name[x]);
-                       }
-                       return node; // DomNode
-               }
-               var lc = name.toLowerCase(),
-                       propName = _propNames[lc] || name,
-                       forceProp = _forcePropNames[propName],
-                       attrName = _attrNames[lc] || name;
-               if(args == 3){
-                       // setter
-                       do{
-                               if(propName == "style" && typeof value != "string"){ // inline'd type check
-                                       // special case: setting a style
-                                       d.style(node, value);
-                                       break;
-                               }
-                               if(propName == "innerHTML"){
-                                       // special case: assigning HTML
-                                                                               if(d.isIE && node.tagName.toLowerCase() in _roInnerHtml){
-                                               d.empty(node);
-                                               node.appendChild(d._toDom(value, node.ownerDocument));
-                                       }else{
-                                                                                       node[propName] = value;
-                                                                               }
-                                                                               break;
-                               }
-                               if(d.isFunction(value)){
-                                       // special case: assigning an event handler
-                                       // clobber if we can
-                                       var attrId = d.attr(node, _attrId);
-                                       if(!attrId){
-                                               attrId = _ctr++;
-                                               d.attr(node, _attrId, attrId);
-                                       }
-                                       if(!_evtHdlrMap[attrId]){
-                                               _evtHdlrMap[attrId] = {};
-                                       }
-                                       var h = _evtHdlrMap[attrId][propName];
-                                       if(h){
-                                               d.disconnect(h);
-                                       }else{
-                                               try{
-                                                       delete node[propName];
-                                               }catch(e){}
-                                       }
-                                       // ensure that event objects are normalized, etc.
-                                       _evtHdlrMap[attrId][propName] = d.connect(node, propName, value);
-                                       break;
-                               }
-                               if(forceProp || typeof value == "boolean"){
-                                       // special case: forcing assignment to the property
-                                       // special case: setting boolean to a property instead of attribute
-                                       node[propName] = value;
-                                       break;
-                               }
-                               // node's attribute
-                               node.setAttribute(attrName, value);
-                       }while(false);
-                       return node; // DomNode
-               }
-               // getter
-               // should we access this attribute via a property or
-               // via getAttribute()?
-               value = node[propName];
-               if(forceProp && typeof value != "undefined"){
-                       // node's property
-                       return value;   // Anything
-               }
-               if(propName != "href" && (typeof value == "boolean" || d.isFunction(value))){
-                       // node's property
-                       return value;   // Anything
-               }
-               // node's attribute
-               // we need _hasAttr() here to guard against IE returning a default value
-               return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null; // Anything
-       }
-
-       dojo.removeAttr = function(/*DomNode|String*/ node, /*String*/ name){
-               //      summary:
-               //              Removes an attribute from an HTML element.
-               //      node:
-               //              id or reference to the element to remove the attribute from
-               //      name:
-               //              the name of the attribute to remove
-               byId(node).removeAttribute(_fixAttrName(name));
-       }
-
-       dojo.getNodeProp = function(/*DomNode|String*/ node, /*String*/ name){
-               //      summary:
-               //              Returns an effective value of a property or an attribute.
-               //      node:
-               //              id or reference to the element to remove the attribute from
-               //      name:
-               //              the name of the attribute
-               node = byId(node);
-               var lc = name.toLowerCase(),
-                       propName = _propNames[lc] || name;
-               if((propName in node) && propName != "href"){
-                       // node's property
-                       return node[propName];  // Anything
-               }
-               // node's attribute
-               var attrName = _attrNames[lc] || name;
-               return _hasAttr(node, attrName) ? node.getAttribute(attrName) : null; // Anything
-       }
-
-       dojo.create = function(tag, attrs, refNode, pos){
-               //      summary:
-               //              Create an element, allowing for optional attribute decoration
-               //              and placement.
-               //
-               // description:
-               //              A DOM Element creation function. A shorthand method for creating a node or
-               //              a fragment, and allowing for a convenient optional attribute setting step,
-               //              as well as an optional DOM placement reference.
-               //|
-               //              Attributes are set by passing the optional object through `dojo.attr`.
-               //              See `dojo.attr` for noted caveats and nuances, and API if applicable.
-               //|
-               //              Placement is done via `dojo.place`, assuming the new node to be the action 
-               //              node, passing along the optional reference node and position.
-               //
-               // tag: String|DomNode
-               //              A string of the element to create (eg: "div", "a", "p", "li", "script", "br"),
-               //              or an existing DOM node to process.
-               //
-               // attrs: Object
-               //              An object-hash of attributes to set on the newly created node.
-               //              Can be null, if you don't want to set any attributes/styles.
-               //              See: `dojo.attr` for a description of available attributes.
-               //
-               // refNode: String?|DomNode?
-               //              Optional reference node. Used by `dojo.place` to place the newly created
-               //              node somewhere in the dom relative to refNode. Can be a DomNode reference
-               //              or String ID of a node.
-               //
-               // pos: String?
-               //              Optional positional reference. Defaults to "last" by way of `dojo.place`,
-               //              though can be set to "first","after","before","last", "replace" or "only"
-               //              to further control the placement of the new node relative to the refNode.
-               //              'refNode' is required if a 'pos' is specified.
-               //
-               // returns: DomNode
-               //
-               // example:
-               //      Create a DIV:
-               //      |       var n = dojo.create("div");
-               //
-               // example:
-               //      Create a DIV with content:
-               //      |       var n = dojo.create("div", { innerHTML:"<p>hi</p>" });
-               //
-               // example:
-               //      Place a new DIV in the BODY, with no attributes set
-               //      |       var n = dojo.create("div", null, dojo.body());
-               //
-               // example:
-               //      Create an UL, and populate it with LI's. Place the list as the first-child of a 
-               //      node with id="someId":
-               //      |       var ul = dojo.create("ul", null, "someId", "first");
-               //      |       var items = ["one", "two", "three", "four"];
-               //      |       dojo.forEach(items, function(data){
-               //      |               dojo.create("li", { innerHTML: data }, ul);
-               //      |       });
-               //
-               // example:
-               //      Create an anchor, with an href. Place in BODY:
-               //      |       dojo.create("a", { href:"foo.html", title:"Goto FOO!" }, dojo.body());
-               //
-               // example:
-               //      Create a `dojo.NodeList()` from a new element (for syntatic sugar):
-               //      |       dojo.query(dojo.create('div'))
-               //      |               .addClass("newDiv")
-               //      |               .onclick(function(e){ console.log('clicked', e.target) })
-               //      |               .place("#someNode"); // redundant, but cleaner.
-
-               var doc = d.doc;
-               if(refNode){
-                       refNode = byId(refNode);
-                       doc = refNode.ownerDocument;
-               }
-               if(typeof tag == "string"){ // inline'd type check
-                       tag = doc.createElement(tag);
-               }
-               if(attrs){ d.attr(tag, attrs); }
-               if(refNode){ d.place(tag, refNode, pos); }
-               return tag; // DomNode
-       }
-
-       /*=====
-       dojo.empty = function(node){
-                       //      summary:
-                       //              safely removes all children of the node.
-                       //      node: DOMNode|String
-                       //              a reference to a DOM node or an id.
-                       //      example:
-                       //      Destroy node's children byId:
-                       //      |       dojo.empty("someId");
-                       //
-                       //      example:
-                       //      Destroy all nodes' children in a list by reference:
-                       //      |       dojo.query(".someNode").forEach(dojo.empty);
-       }
-       =====*/
-
-       d.empty =
-                               d.isIE ?  function(node){
-                       node = byId(node);
-                       for(var c; c = node.lastChild;){ // intentional assignment
-                               d.destroy(c);
-                       }
-               } :
-                               function(node){
-                       byId(node).innerHTML = "";
-               };
-
-       /*=====
-       dojo._toDom = function(frag, doc){
-                       //      summary:
-                       //              instantiates an HTML fragment returning the corresponding DOM.
-                       //      frag: String
-                       //              the HTML fragment
-                       //      doc: DocumentNode?
-                       //              optional document to use when creating DOM nodes, defaults to
-                       //              dojo.doc if not specified.
-                       //      returns: DocumentFragment
-                       //
-                       //      example:
-                       //      Create a table row:
-                       //      |       var tr = dojo._toDom("<tr><td>First!</td></tr>");
-       }
-       =====*/
-
-       // support stuff for dojo._toDom
-       var tagWrap = {
-                       option: ["select"],
-                       tbody: ["table"],
-                       thead: ["table"],
-                       tfoot: ["table"],
-                       tr: ["table", "tbody"],
-                       td: ["table", "tbody", "tr"],
-                       th: ["table", "thead", "tr"],
-                       legend: ["fieldset"],
-                       caption: ["table"],
-                       colgroup: ["table"],
-                       col: ["table", "colgroup"],
-                       li: ["ul"]
-               },
-               reTag = /<\s*([\w\:]+)/,
-               masterNode = {}, masterNum = 0,
-               masterName = "__" + d._scopeName + "ToDomId";
-
-       // generate start/end tag strings to use
-       // for the injection for each special tag wrap case.
-       for(var param in tagWrap){
-               var tw = tagWrap[param];
-               tw.pre  = param == "option" ? '<select multiple="multiple">' : "<" + tw.join("><") + ">";
-               tw.post = "</" + tw.reverse().join("></") + ">";
-               // the last line is destructive: it reverses the array,
-               // but we don't care at this point
-       }
-
-       d._toDom = function(frag, doc){
-               //      summary:
-               //              converts HTML string into DOM nodes.
-
-               doc = doc || d.doc;
-               var masterId = doc[masterName];
-               if(!masterId){
-                       doc[masterName] = masterId = ++masterNum + "";
-                       masterNode[masterId] = doc.createElement("div");
-               }
-
-               // make sure the frag is a string.
-               frag += "";
-
-               // find the starting tag, and get node wrapper
-               var match = frag.match(reTag),
-                       tag = match ? match[1].toLowerCase() : "",
-                       master = masterNode[masterId],
-                       wrap, i, fc, df;
-               if(match && tagWrap[tag]){
-                       wrap = tagWrap[tag];
-                       master.innerHTML = wrap.pre + frag + wrap.post;
-                       for(i = wrap.length; i; --i){
-                               master = master.firstChild;
-                       }
-               }else{
-                       master.innerHTML = frag;
-               }
-
-               // one node shortcut => return the node itself
-               if(master.childNodes.length == 1){
-                       return master.removeChild(master.firstChild); // DOMNode
-               }
-
-               // return multiple nodes as a document fragment
-               df = doc.createDocumentFragment();
-               while(fc = master.firstChild){ // intentional assignment
-                       df.appendChild(fc);
-               }
-               return df; // DOMNode
-       }
-
-       // =============================
-       // (CSS) Class Functions
-       // =============================
-       var _className = "className";
-
-       dojo.hasClass = function(/*DomNode|String*/node, /*String*/classStr){
-               //      summary:
-               //              Returns whether or not the specified classes are a portion of the
-               //              class list currently applied to the node.
-               //
-               //      node:
-               //              String ID or DomNode reference to check the class for.
-               //
-               //      classStr:
-               //              A string class name to look for.
-               //
-               //      example:
-               //      Do something if a node with id="someNode" has class="aSillyClassName" present
-               //      |       if(dojo.hasClass("someNode","aSillyClassName")){ ... }
-
-               return ((" "+ byId(node)[_className] +" ").indexOf(" " + classStr + " ") >= 0);  // Boolean
-       };
-
-       var spaces = /\s+/, a1 = [""],
-               str2array = function(s){
-                       if(typeof s == "string" || s instanceof String){
-                               if(s.indexOf(" ") < 0){
-                                       a1[0] = s;
-                                       return a1;
-                               }else{
-                                       return s.split(spaces);
-                               }
-                       }
-                       // assumed to be an array
-                       return s;
-               };
-
-       dojo.addClass = function(/*DomNode|String*/node, /*String|Array*/classStr){
-               //      summary:
-               //              Adds the specified classes to the end of the class list on the
-               //              passed node. Will not re-apply duplicate classes.
-               //
-               //      node:
-               //              String ID or DomNode reference to add a class string too
-               //
-               //      classStr:
-               //              A String class name to add, or several space-separated class names,
-               //              or an array of class names.
-               //
-               // example:
-               //      Add a class to some node:
-               //      |       dojo.addClass("someNode", "anewClass");
-               //
-               // example:
-               //      Add two classes at once:
-               //      |       dojo.addClass("someNode", "firstClass secondClass");
-               //
-               // example:
-               //      Add two classes at once (using array):
-               //      |       dojo.addClass("someNode", ["firstClass", "secondClass"]);
-               //
-               // example:
-               //      Available in `dojo.NodeList` for multiple additions
-               //      |       dojo.query("ul > li").addClass("firstLevel");
-
-               node = byId(node);
-               classStr = str2array(classStr);
-               var cls = " " + node[_className] + " ";
-               for(var i = 0, len = classStr.length, c; i < len; ++i){
-                       c = classStr[i];
-                       if(c && cls.indexOf(" " + c + " ") < 0){
-                               cls += c + " ";
-                       }
-               }
-               node[_className] = d.trim(cls);
-       };
-
-       dojo.removeClass = function(/*DomNode|String*/node, /*String|Array?*/classStr){
-               // summary:
-               //              Removes the specified classes from node. No `dojo.hasClass`
-               //              check is required.
-               //
-               // node:
-               //              String ID or DomNode reference to remove the class from.
-               //
-               // classStr:
-               //              An optional String class name to remove, or several space-separated
-               //              class names, or an array of class names. If omitted, all class names
-               //              will be deleted.
-               //
-               // example:
-               //      Remove a class from some node:
-               //      |       dojo.removeClass("someNode", "firstClass");
-               //
-               // example:
-               //      Remove two classes from some node:
-               //      |       dojo.removeClass("someNode", "firstClass secondClass");
-               //
-               // example:
-               //      Remove two classes from some node (using array):
-               //      |       dojo.removeClass("someNode", ["firstClass", "secondClass"]);
-               //
-               // example:
-               //      Remove all classes from some node:
-               //      |       dojo.removeClass("someNode");
-               //
-               // example:
-               //      Available in `dojo.NodeList()` for multiple removal
-               //      |       dojo.query(".foo").removeClass("foo");
-
-               node = byId(node);
-               var cls;
-               if(classStr !== undefined){
-                       classStr = str2array(classStr);
-                       cls = " " + node[_className] + " ";
-                       for(var i = 0, len = classStr.length; i < len; ++i){
-                               cls = cls.replace(" " + classStr[i] + " ", " ");
-                       }
-                       cls = d.trim(cls);
-               }else{
-                       cls = "";
-               }
-               if(node[_className] != cls){ node[_className] = cls; }
-       };
-
-       dojo.toggleClass = function(/*DomNode|String*/node, /*String|Array*/classStr, /*Boolean?*/condition){
-               //      summary:
-               //              Adds a class to node if not present, or removes if present.
-               //              Pass a boolean condition if you want to explicitly add or remove.
-               //      condition:
-               //              If passed, true means to add the class, false means to remove.
-               //
-               // example:
-               //      |       dojo.toggleClass("someNode", "hovered");
-               //
-               // example:
-               //      Forcefully add a class
-               //      |       dojo.toggleClass("someNode", "hovered", true);
-               //
-               // example:
-               //      Available in `dojo.NodeList()` for multiple toggles
-               //      |       dojo.query(".toggleMe").toggleClass("toggleMe");
-
-               if(condition === undefined){
-                       condition = !d.hasClass(node, classStr);
-               }
-               d[condition ? "addClass" : "removeClass"](node, classStr);
-       };
-
-})();
-
-}
-
-if(!dojo._hasResource["dojo._base.NodeList"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.NodeList"] = true;
-dojo.provide("dojo._base.NodeList");
-
-
-
-(function(){
-
-       var d = dojo;
-
-       var ap = Array.prototype, aps = ap.slice, apc = ap.concat;
-
-       var tnl = function(/*Array*/ a, /*dojo.NodeList?*/ parent, /*Function?*/ NodeListCtor){
-               // summary:
-               //              decorate an array to make it look like a `dojo.NodeList`.
-               // a:
-               //              Array of nodes to decorate.
-               // parent:
-               //              An optional parent NodeList that generated the current
-               //              list of nodes. Used to call _stash() so the parent NodeList
-               //              can be accessed via end() later.
-               // NodeListCtor:
-               //              An optional constructor function to use for any
-               //              new NodeList calls. This allows a certain chain of
-               //              NodeList calls to use a different object than dojo.NodeList.
-               if(!a.sort){
-                       // make sure it's a real array before we pass it on to be wrapped
-                       a = aps.call(a, 0);
-               }
-               var ctor = NodeListCtor || this._NodeListCtor || d._NodeListCtor;
-               a.constructor = ctor;
-               dojo._mixin(a, ctor.prototype);
-               a._NodeListCtor = ctor;
-               return parent ? a._stash(parent) : a;
-       };
-
-       var loopBody = function(f, a, o){
-               a = [0].concat(aps.call(a, 0));
-               o = o || d.global;
-               return function(node){
-                       a[0] = node;
-                       return f.apply(o, a);
-               };
-       };
-
-       // adapters
-
-       var adaptAsForEach = function(f, o){
-               //      summary:
-               //              adapts a single node function to be used in the forEach-type
-               //              actions. The initial object is returned from the specialized
-               //              function.
-               //      f: Function
-               //              a function to adapt
-               //      o: Object?
-               //              an optional context for f
-               return function(){
-                       this.forEach(loopBody(f, arguments, o));
-                       return this;    // Object
-               };
-       };
-
-       var adaptAsMap = function(f, o){
-               //      summary:
-               //              adapts a single node function to be used in the map-type
-               //              actions. The return is a new array of values, as via `dojo.map`
-               //      f: Function
-               //              a function to adapt
-               //      o: Object?
-               //              an optional context for f
-               return function(){
-                       return this.map(loopBody(f, arguments, o));
-               };
-       };
-
-       var adaptAsFilter = function(f, o){
-               //      summary:
-               //              adapts a single node function to be used in the filter-type actions
-               //      f: Function
-               //              a function to adapt
-               //      o: Object?
-               //              an optional context for f
-               return function(){
-                       return this.filter(loopBody(f, arguments, o));
-               };
-       };
-
-       var adaptWithCondition = function(f, g, o){
-               //      summary:
-               //              adapts a single node function to be used in the map-type
-               //              actions, behaves like forEach() or map() depending on arguments
-               //      f: Function
-               //              a function to adapt
-               //      g: Function
-               //              a condition function, if true runs as map(), otherwise runs as forEach()
-               //      o: Object?
-               //              an optional context for f and g
-               return function(){
-                       var a = arguments, body = loopBody(f, a, o);
-                       if(g.call(o || d.global, a)){
-                               return this.map(body);  // self
-                       }
-                       this.forEach(body);
-                       return this;    // self
-               };
-       };
-
-       var magicGuard = function(a){
-               //      summary:
-               //              the guard function for dojo.attr() and dojo.style()
-               return a.length == 1 && (typeof a[0] == "string"); // inline'd type check
-       };
-
-       var orphan = function(node){
-               //      summary:
-               //              function to orphan nodes
-               var p = node.parentNode;
-               if(p){
-                       p.removeChild(node);
-               }
-       };
-       // FIXME: should we move orphan() to dojo.html?
-
-       dojo.NodeList = function(){
-               //      summary:
-               //              dojo.NodeList is an of Array subclass which adds syntactic
-               //              sugar for chaining, common iteration operations, animation, and
-               //              node manipulation. NodeLists are most often returned as the
-               //              result of dojo.query() calls.
-               //      description:
-               //              dojo.NodeList instances provide many utilities that reflect
-               //              core Dojo APIs for Array iteration and manipulation, DOM
-               //              manipulation, and event handling. Instead of needing to dig up
-               //              functions in the dojo.* namespace, NodeLists generally make the
-               //              full power of Dojo available for DOM manipulation tasks in a
-               //              simple, chainable way.
-               //      example:
-               //              create a node list from a node
-               //              |       new dojo.NodeList(dojo.byId("foo"));
-               //      example:
-               //              get a NodeList from a CSS query and iterate on it
-               //              |       var l = dojo.query(".thinger");
-               //              |       l.forEach(function(node, index, nodeList){
-               //              |               console.log(index, node.innerHTML);
-               //              |       });
-               //      example:
-               //              use native and Dojo-provided array methods to manipulate a
-               //              NodeList without needing to use dojo.* functions explicitly:
-               //              |       var l = dojo.query(".thinger");
-               //              |       // since NodeLists are real arrays, they have a length
-               //              |       // property that is both readable and writable and
-               //              |       // push/pop/shift/unshift methods
-               //              |       console.log(l.length);
-               //              |       l.push(dojo.create("span"));
-               //              |
-               //              |       // dojo's normalized array methods work too:
-               //              |       console.log( l.indexOf(dojo.byId("foo")) );
-               //              |       // ...including the special "function as string" shorthand
-               //              |       console.log( l.every("item.nodeType == 1") );
-               //              |
-               //              |       // NodeLists can be [..] indexed, or you can use the at()
-               //              |       // function to get specific items wrapped in a new NodeList:
-               //              |       var node = l[3]; // the 4th element
-               //              |       var newList = l.at(1, 3); // the 2nd and 4th elements
-               //      example:
-               //              the style functions you expect are all there too:
-               //              |       // style() as a getter...
-               //              |       var borders = dojo.query(".thinger").style("border");
-               //              |       // ...and as a setter:
-               //              |       dojo.query(".thinger").style("border", "1px solid black");
-               //              |       // class manipulation
-               //              |       dojo.query("li:nth-child(even)").addClass("even");
-               //              |       // even getting the coordinates of all the items
-               //              |       var coords = dojo.query(".thinger").coords();
-               //      example:
-               //              DOM manipulation functions from the dojo.* namespace area also
-               //              available:
-               //              |       // remove all of the elements in the list from their
-               //              |       // parents (akin to "deleting" them from the document)
-               //              |       dojo.query(".thinger").orphan();
-               //              |       // place all elements in the list at the front of #foo
-               //              |       dojo.query(".thinger").place("foo", "first");
-               //      example:
-               //              Event handling couldn't be easier. `dojo.connect` is mapped in,
-               //              and shortcut handlers are provided for most DOM events:
-               //              |       // like dojo.connect(), but with implicit scope
-               //              |       dojo.query("li").connect("onclick", console, "log");
-               //              |
-               //              |       // many common event handlers are already available directly:
-               //              |       dojo.query("li").onclick(console, "log");
-               //              |       var toggleHovered = dojo.hitch(dojo, "toggleClass", "hovered");
-               //              |       dojo.query("p")
-               //              |               .onmouseenter(toggleHovered)
-               //              |               .onmouseleave(toggleHovered);
-               //      example:
-               //              chainability is a key advantage of NodeLists:
-               //              |       dojo.query(".thinger")
-               //              |               .onclick(function(e){ /* ... */ })
-               //              |               .at(1, 3, 8) // get a subset
-               //              |                       .style("padding", "5px")
-               //              |                       .forEach(console.log);
-
-               return tnl(Array.apply(null, arguments));
-       };
-
-       //Allow things that new up a NodeList to use a delegated or alternate NodeList implementation.
-       d._NodeListCtor = d.NodeList;
-
-       var nl = d.NodeList, nlp = nl.prototype;
-
-       // expose adapters and the wrapper as private functions
-
-       nl._wrap = nlp._wrap = tnl;
-       nl._adaptAsMap = adaptAsMap;
-       nl._adaptAsForEach = adaptAsForEach;
-       nl._adaptAsFilter  = adaptAsFilter;
-       nl._adaptWithCondition = adaptWithCondition;
-
-       // mass assignment
-
-       // add array redirectors
-       d.forEach(["slice", "splice"], function(name){
-               var f = ap[name];
-               //Use a copy of the this array via this.slice() to allow .end() to work right in the splice case.
-               // CANNOT apply ._stash()/end() to splice since it currently modifies
-               // the existing this array -- it would break backward compatibility if we copy the array before
-               // the splice so that we can use .end(). So only doing the stash option to this._wrap for slice.
-               nlp[name] = function(){ return this._wrap(f.apply(this, arguments), name == "slice" ? this : null); };
-       });
-       // concat should be here but some browsers with native NodeList have problems with it
-
-       // add array.js redirectors
-       d.forEach(["indexOf", "lastIndexOf", "every", "some"], function(name){
-               var f = d[name];
-               nlp[name] = function(){ return f.apply(d, [this].concat(aps.call(arguments, 0))); };
-       });
-
-       // add conditional methods
-       d.forEach(["attr", "style"], function(name){
-               nlp[name] = adaptWithCondition(d[name], magicGuard);
-       });
-
-       // add forEach actions
-       d.forEach(["connect", "addClass", "removeClass", "toggleClass", "empty", "removeAttr"], function(name){
-               nlp[name] = adaptAsForEach(d[name]);
-       });
-
-       dojo.extend(dojo.NodeList, {
-               _normalize: function(/*String||Element||Object||NodeList*/content, /*DOMNode?*/refNode){
-                       // summary:
-                       //              normalizes data to an array of items to insert.
-                       // description:
-                       //              If content is an object, it can have special properties "template" and
-                       //              "parse". If "template" is defined, then the template value is run through
-                       //              dojo.string.substitute (if dojo.string.substitute has been dojo.required elsewhere),
-                       //              or if templateFunc is a function on the content, that function will be used to
-                       //              transform the template into a final string to be used for for passing to dojo._toDom.
-                       //              If content.parse is true, then it is remembered for later, for when the content
-                       //              nodes are inserted into the DOM. At that point, the nodes will be parsed for widgets
-                       //              (if dojo.parser has been dojo.required elsewhere).
-
-                       //Wanted to just use a DocumentFragment, but for the array/NodeList
-                       //case that meant  using cloneNode, but we may not want that.
-                       //Cloning should only happen if the node operations span
-                       //multiple refNodes. Also, need a real array, not a NodeList from the
-                       //DOM since the node movements could change those NodeLists.
-
-                       var parse = content.parse === true ? true : false;
-
-                       //Do we have an object that needs to be run through a template?
-                       if(typeof content.template == "string"){
-                               var templateFunc = content.templateFunc || (dojo.string && dojo.string.substitute);
-                               content = templateFunc ? templateFunc(content.template, content) : content;
-                       }
-
-                       var type = (typeof content);
-                       if(type == "string" || type == "number"){
-                               content = dojo._toDom(content, (refNode && refNode.ownerDocument));
-                               if(content.nodeType == 11){
-                                       //DocumentFragment. It cannot handle cloneNode calls, so pull out the children.
-                                       content = dojo._toArray(content.childNodes);
-                               }else{
-                                       content = [content];
-                               }
-                       }else if(!dojo.isArrayLike(content)){
-                               content = [content];
-                       }else if(!dojo.isArray(content)){
-                               //To get to this point, content is array-like, but
-                               //not an array, which likely means a DOM NodeList. Convert it now.
-                               content = dojo._toArray(content);
-                       }
-
-                       //Pass around the parse info
-                       if(parse){
-                               content._runParse = true;
-                       }
-                       return content; //Array
-               },
-
-               _cloneNode: function(/*DOMNode*/ node){
-                       // summary:
-                       //              private utiltity to clone a node. Not very interesting in the vanilla
-                       //              dojo.NodeList case, but delegates could do interesting things like
-                       //              clone event handlers if that is derivable from the node.
-                       return node.cloneNode(true);
-               },
-
-               _place: function(/*Array*/ary, /*DOMNode*/refNode, /*String*/position, /*Boolean*/useClone){
-                       // summary:
-                       //              private utility to handle placing an array of nodes relative to another node.
-                       // description:
-                       //              Allows for cloning the nodes in the array, and for
-                       //              optionally parsing widgets, if ary._runParse is true.
-
-                       //Avoid a disallowed operation if trying to do an innerHTML on a non-element node.
-                       if(refNode.nodeType != 1 && position == "only"){
-                               return;
-                       }
-                       var rNode = refNode, tempNode;
-
-                       //Always cycle backwards in case the array is really a
-                       //DOM NodeList and the DOM operations take it out of the live collection.
-                       var length = ary.length;
-                       for(var i = length - 1; i >= 0; i--){
-                               var node = (useClone ? this._cloneNode(ary[i]) : ary[i]);
-
-                               //If need widget parsing, use a temp node, instead of waiting after inserting into
-                               //real DOM because we need to start widget parsing at one node up from current node,
-                               //which could cause some already parsed widgets to be parsed again.
-                               if(ary._runParse && dojo.parser && dojo.parser.parse){
-                                       if(!tempNode){
-                                               tempNode = rNode.ownerDocument.createElement("div");
-                                       }
-                                       tempNode.appendChild(node);
-                                       dojo.parser.parse(tempNode);
-                                       node = tempNode.firstChild;
-                                       while(tempNode.firstChild){
-                                               tempNode.removeChild(tempNode.firstChild);
-                                       }
-                               }
-
-                               if(i == length - 1){
-                                       dojo.place(node, rNode, position);
-                               }else{
-                                       rNode.parentNode.insertBefore(node, rNode);
-                               }
-                               rNode = node;
-                       }
-               },
-
-               _stash: function(parent){
-                       // summary:
-                       //              private function to hold to a parent NodeList. end() to return the parent NodeList.
-                       //
-                       // example:
-                       // How to make a `dojo.NodeList` method that only returns the third node in
-                       // the dojo.NodeList but allows access to the original NodeList by using this._stash:
-                       //      |       dojo.extend(dojo.NodeList, {
-                       //      |               third: function(){
-                       //  |                   var newNodeList = dojo.NodeList(this[2]);
-                       //      |                       return newNodeList._stash(this);
-                       //      |               }
-                       //      |       });
-                       //      |       // then see how _stash applies a sub-list, to be .end()'ed out of
-                       //      |       dojo.query(".foo")
-                       //      |               .third()
-                       //      |                       .addClass("thirdFoo")
-                       //      |               .end()
-                       //      |               // access to the orig .foo list
-                       //      |               .removeClass("foo")
-                       //      |
-                       //
-                       this._parent = parent;
-                       return this; //dojo.NodeList
-               },
-
-               end: function(){
-                       // summary:
-                       //              Ends use of the current `dojo.NodeList` by returning the previous dojo.NodeList
-                       //              that generated the current dojo.NodeList.
-                       // description:
-                       //              Returns the `dojo.NodeList` that generated the current `dojo.NodeList`. If there
-                       //              is no parent dojo.NodeList, an empty dojo.NodeList is returned.
-                       // example:
-                       //      |       dojo.query("a")
-                       //      |               .filter(".disabled")
-                       //      |                       // operate on the anchors that only have a disabled class
-                       //      |                       .style("color", "grey")
-                       //      |               .end()
-                       //      |               // jump back to the list of anchors
-                       //      |               .style(...)
-                       //
-                       if(this._parent){
-                               return this._parent;
-                       }else{
-                               //Just return empy list.
-                               return new this._NodeListCtor();
-                       }
-               },
-
-               // http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array#Methods
-
-               // FIXME: handle return values for #3244
-               //              http://trac.dojotoolkit.org/ticket/3244
-
-               // FIXME:
-               //              need to wrap or implement:
-               //                      join (perhaps w/ innerHTML/outerHTML overload for toString() of items?)
-               //                      reduce
-               //                      reduceRight
-
-               /*=====
-               slice: function(begin, end){
-                       // summary:
-                       //              Returns a new NodeList, maintaining this one in place
-                       // description:
-                       //              This method behaves exactly like the Array.slice method
-                       //              with the caveat that it returns a dojo.NodeList and not a
-                       //              raw Array. For more details, see Mozilla's (slice
-                       //              documentation)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:slice]
-                       // begin: Integer
-                       //              Can be a positive or negative integer, with positive
-                       //              integers noting the offset to begin at, and negative
-                       //              integers denoting an offset from the end (i.e., to the left
-                       //              of the end)
-                       // end: Integer?
-                       //              Optional parameter to describe what position relative to
-                       //              the NodeList's zero index to end the slice at. Like begin,
-                       //              can be positive or negative.
-                       return this._wrap(a.slice.apply(this, arguments));
-               },
-
-               splice: function(index, howmany, item){
-                       // summary:
-                       //              Returns a new NodeList, manipulating this NodeList based on
-                       //              the arguments passed, potentially splicing in new elements
-                       //              at an offset, optionally deleting elements
-                       // description:
-                       //              This method behaves exactly like the Array.splice method
-                       //              with the caveat that it returns a dojo.NodeList and not a
-                       //              raw Array. For more details, see Mozilla's (splice
-                       //              documentation)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:splice]
-                       //              For backwards compatibility, calling .end() on the spliced NodeList
-                       //              does not return the original NodeList -- splice alters the NodeList in place.
-                       // index: Integer
-                       //              begin can be a positive or negative integer, with positive
-                       //              integers noting the offset to begin at, and negative
-                       //              integers denoting an offset from the end (i.e., to the left
-                       //              of the end)
-                       // howmany: Integer?
-                       //              Optional parameter to describe what position relative to
-                       //              the NodeList's zero index to end the slice at. Like begin,
-                       //              can be positive or negative.
-                       // item: Object...?
-                       //              Any number of optional parameters may be passed in to be
-                       //              spliced into the NodeList
-                       // returns:
-                       //              dojo.NodeList
-                       return this._wrap(a.splice.apply(this, arguments));
-               },
-
-               indexOf: function(value, fromIndex){
-                       //      summary:
-                       //              see dojo.indexOf(). The primary difference is that the acted-on 
-                       //              array is implicitly this NodeList
-                       // value: Object:
-                       //              The value to search for.
-                       // fromIndex: Integer?:
-                       //              The loction to start searching from. Optional. Defaults to 0.
-                       //      description:
-                       //              For more details on the behavior of indexOf, see Mozilla's
-                       //              (indexOf
-                       //              docs)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:indexOf]
-                       //      returns:
-                       //              Positive Integer or 0 for a match, -1 of not found.
-                       return d.indexOf(this, value, fromIndex); // Integer
-               },
-
-               lastIndexOf: function(value, fromIndex){
-                       // summary:
-                       //              see dojo.lastIndexOf(). The primary difference is that the
-                       //              acted-on array is implicitly this NodeList
-                       //      description:
-                       //              For more details on the behavior of lastIndexOf, see
-                       //              Mozilla's (lastIndexOf
-                       //              docs)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:lastIndexOf]
-                       // value: Object
-                       //              The value to search for.
-                       // fromIndex: Integer?
-                       //              The loction to start searching from. Optional. Defaults to 0.
-                       // returns:
-                       //              Positive Integer or 0 for a match, -1 of not found.
-                       return d.lastIndexOf(this, value, fromIndex); // Integer
-               },
-
-               every: function(callback, thisObject){
-                       //      summary:
-                       //              see `dojo.every()` and the (Array.every
-                       //              docs)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:every].
-                       //              Takes the same structure of arguments and returns as
-                       //              dojo.every() with the caveat that the passed array is
-                       //              implicitly this NodeList
-                       // callback: Function: the callback
-                       // thisObject: Object?: the context
-                       return d.every(this, callback, thisObject); // Boolean
-               },
-
-               some: function(callback, thisObject){
-                       //      summary:
-                       //              Takes the same structure of arguments and returns as
-                       //              `dojo.some()` with the caveat that the passed array is
-                       //              implicitly this NodeList.  See `dojo.some()` and Mozilla's
-                       //              (Array.some
-                       //              documentation)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:some].
-                       // callback: Function: the callback
-                       // thisObject: Object?: the context
-                       return d.some(this, callback, thisObject); // Boolean
-               },
-               =====*/
-
-               concat: function(item){
-                       // summary:
-                       //              Returns a new NodeList comprised of items in this NodeList
-                       //              as well as items passed in as parameters
-                       // description:
-                       //              This method behaves exactly like the Array.concat method
-                       //              with the caveat that it returns a `dojo.NodeList` and not a
-                       //              raw Array. For more details, see the (Array.concat
-                       //              docs)[http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array:concat]
-                       // item: Object?
-                       //              Any number of optional parameters may be passed in to be
-                       //              spliced into the NodeList
-                       // returns:
-                       //              dojo.NodeList
-
-                       //return this._wrap(apc.apply(this, arguments));
-                       // the line above won't work for the native NodeList :-(
-
-                       // implementation notes:
-                       // 1) Native NodeList is not an array, and cannot be used directly
-                       // in concat() --- the latter doesn't recognize it as an array, and
-                       // does not inline it, but append as a single entity.
-                       // 2) On some browsers (e.g., Safari) the "constructor" property is
-                       // read-only and cannot be changed. So we have to test for both
-                       // native NodeList and dojo.NodeList in this property to recognize
-                       // the node list.
-
-                       var t = d.isArray(this) ? this : aps.call(this, 0),
-                               m = d.map(arguments, function(a){
-                                       return a && !d.isArray(a) &&
-                                               (typeof NodeList != "undefined" && a.constructor === NodeList || a.constructor === this._NodeListCtor) ?
-                                                       aps.call(a, 0) : a;
-                               });
-                       return this._wrap(apc.apply(t, m), this);       // dojo.NodeList
-               },
-
-               map: function(/*Function*/ func, /*Function?*/ obj){
-                       //      summary:
-                       //              see dojo.map(). The primary difference is that the acted-on
-                       //              array is implicitly this NodeList and the return is a
-                       //              dojo.NodeList (a subclass of Array)
-                       ///return d.map(this, func, obj, d.NodeList); // dojo.NodeList
-                       return this._wrap(d.map(this, func, obj), this); // dojo.NodeList
-               },
-
-               forEach: function(callback, thisObj){
-                       //      summary:
-                       //              see `dojo.forEach()`. The primary difference is that the acted-on 
-                       //              array is implicitly this NodeList. If you want the option to break out
-                       //              of the forEach loop, use every() or some() instead.
-                       d.forEach(this, callback, thisObj);
-                       // non-standard return to allow easier chaining
-                       return this; // dojo.NodeList 
-               },
-
-               /*=====
-               coords: function(){
-                       //      summary:
-                       //              Returns the box objects of all elements in a node list as
-                       //              an Array (*not* a NodeList). Acts like `dojo.coords`, though assumes
-                       //              the node passed is each node in this list.
-
-                       return d.map(this, d.coords); // Array
-               },
-
-               position: function(){
-                       //      summary:
-                       //              Returns border-box objects (x/y/w/h) of all elements in a node list
-                       //              as an Array (*not* a NodeList). Acts like `dojo.position`, though
-                       //              assumes the node passed is each node in this list. 
-
-                       return d.map(this, d.position); // Array
-               },
-
-               attr: function(property, value){
-                       //      summary:
-                       //              gets or sets the DOM attribute for every element in the
-                       //              NodeList. See also `dojo.attr`
-                       //      property: String
-                       //              the attribute to get/set
-                       //      value: String?
-                       //              optional. The value to set the property to
-                       //      returns:
-                       //              if no value is passed, the result is an array of attribute values
-                       //              If a value is passed, the return is this NodeList
-                       //      example:
-                       //              Make all nodes with a particular class focusabl:
-                       //      |       dojo.query(".focusable").attr("tabIndex", -1);
-                       //      example:
-                       //              Disable a group of buttons:
-                       //      |       dojo.query("button.group").attr("disalbed", true);
-                       //      example:
-                       //              innerHTML can be assigned or retreived as well:
-                       //      |       // get the innerHTML (as an array) for each list item
-                       //      |       var ih = dojo.query("li.replaceable").attr("innerHTML");
-                       return; // dojo.NodeList
-                       return; // Array
-               },
-
-               style: function(property, value){
-                       //      summary:
-                       //              gets or sets the CSS property for every element in the NodeList
-                       //      property: String
-                       //              the CSS property to get/set, in JavaScript notation
-                       //              ("lineHieght" instead of "line-height")
-                       //      value: String?
-                       //              optional. The value to set the property to
-                       //      returns:
-                       //              if no value is passed, the result is an array of strings.
-                       //              If a value is passed, the return is this NodeList
-                       return; // dojo.NodeList
-                       return; // Array
-               },
-
-               addClass: function(className){
-                       //      summary:
-                       //              adds the specified class to every node in the list
-                       //      className: String|Array
-                       //              A String class name to add, or several space-separated class names,
-                       //              or an array of class names.
-                       return; // dojo.NodeList
-               },
-
-               removeClass: function(className){
-                       //      summary:
-                       //              removes the specified class from every node in the list
-                       //      className: String|Array?
-                       //              An optional String class name to remove, or several space-separated
-                       //              class names, or an array of class names. If omitted, all class names
-                       //              will be deleted.
-                       //      returns:
-                       //              dojo.NodeList, this list
-                       return; // dojo.NodeList
-               },
-
-               toggleClass: function(className, condition){
-                       //      summary:
-                       //              Adds a class to node if not present, or removes if present.
-                       //              Pass a boolean condition if you want to explicitly add or remove.
-                       //      condition: Boolean?
-                       //              If passed, true means to add the class, false means to remove.
-                       //      className: String
-                       //              the CSS class to add
-                       return; // dojo.NodeList
-               },
-
-               connect: function(methodName, objOrFunc, funcName){
-                       //      summary:
-                       //              attach event handlers to every item of the NodeList. Uses dojo.connect()
-                       //              so event properties are normalized
-                       //      methodName: String
-                       //              the name of the method to attach to. For DOM events, this should be
-                       //              the lower-case name of the event
-                       //      objOrFunc: Object|Function|String
-                       //              if 2 arguments are passed (methodName, objOrFunc), objOrFunc should
-                       //              reference a function or be the name of the function in the global
-                       //              namespace to attach. If 3 arguments are provided
-                       //              (methodName, objOrFunc, funcName), objOrFunc must be the scope to 
-                       //              locate the bound function in
-                       //      funcName: String?
-                       //              optional. A string naming the function in objOrFunc to bind to the
-                       //              event. May also be a function reference.
-                       //      example:
-                       //              add an onclick handler to every button on the page
-                       //              |       dojo.query("div:nth-child(odd)").connect("onclick", function(e){
-                       //              |               console.log("clicked!");
-                       //              |       });
-                       // example:
-                       //              attach foo.bar() to every odd div's onmouseover
-                       //              |       dojo.query("div:nth-child(odd)").connect("onmouseover", foo, "bar");
-               },
-
-               empty: function(){
-                       //      summary:
-                       //              clears all content from each node in the list. Effectively
-                       //              equivalent to removing all child nodes from every item in
-                       //              the list.
-                       return this.forEach("item.innerHTML='';"); // dojo.NodeList
-                       // FIXME: should we be checking for and/or disposing of widgets below these nodes?
-               },
-               =====*/
-
-               // useful html methods
-               coords: adaptAsMap(d.coords),
-               position: adaptAsMap(d.position),
-
-               // FIXME: connectPublisher()? connectRunOnce()?
-
-               /*
-               destroy: function(){
-                       //      summary:
-                       //              destroys every item in  the list.
-                       this.forEach(d.destroy);
-                       // FIXME: should we be checking for and/or disposing of widgets below these nodes?
-               },
-               */
-
-               place: function(/*String||Node*/ queryOrNode, /*String*/ position){
-                       //      summary:
-                       //              places elements of this node list relative to the first element matched
-                       //              by queryOrNode. Returns the original NodeList. See: `dojo.place`
-                       //      queryOrNode:
-                       //              may be a string representing any valid CSS3 selector or a DOM node.
-                       //              In the selector case, only the first matching element will be used 
-                       //              for relative positioning.
-                       //      position:
-                       //              can be one of:
-                       //              |       "last" (default)
-                       //              |       "first"
-                       //              |       "before"
-                       //              |       "after"
-                       //              |       "only"
-                       //              |       "replace"
-                       //              or an offset in the childNodes property
-                       var item = d.query(queryOrNode)[0];
-                       return this.forEach(function(node){ d.place(node, item, position); }); // dojo.NodeList
-               },
-
-               orphan: function(/*String?*/ simpleFilter){
-                       //      summary:
-                       //              removes elements in this list that match the simple filter
-                       //              from their parents and returns them as a new NodeList.
-                       //      simpleFilter:
-                       //              single-expression CSS rule. For example, ".thinger" or
-                       //              "#someId[attrName='value']" but not "div > span". In short,
-                       //              anything which does not invoke a descent to evaluate but
-                       //              can instead be used to test a single node is acceptable.
-                       //      returns:
-                       //              `dojo.NodeList` containing the orpahned elements 
-                       return (simpleFilter ? d._filterQueryResult(this, simpleFilter) : this).forEach(orphan); // dojo.NodeList
-               },
-
-               adopt: function(/*String||Array||DomNode*/ queryOrListOrNode, /*String?*/ position){
-                       //      summary:
-                       //              places any/all elements in queryOrListOrNode at a
-                       //              position relative to the first element in this list.
-                       //              Returns a dojo.NodeList of the adopted elements.
-                       //      queryOrListOrNode:
-                       //              a DOM node or a query string or a query result.
-                       //              Represents the nodes to be adopted relative to the
-                       //              first element of this NodeList.
-                       //      position:
-                       //              can be one of:
-                       //              |       "last" (default)
-                       //              |       "first"
-                       //              |       "before"
-                       //              |       "after"
-                       //              |       "only"
-                       //              |       "replace"
-                       //              or an offset in the childNodes property
-                       return d.query(queryOrListOrNode).place(this[0], position)._stash(this);        // dojo.NodeList
-               },
-
-               // FIXME: do we need this?
-               query: function(/*String*/ queryStr){
-                       //      summary:
-                       //              Returns a new list whose memebers match the passed query,
-                       //              assuming elements of the current NodeList as the root for
-                       //              each search.
-                       //      example:
-                       //              assume a DOM created by this markup:
-                       //      |       <div id="foo">
-                       //      |               <p>
-                       //      |                       bacon is tasty, <span>dontcha think?</span>
-                       //      |               </p>
-                       //      |       </div>
-                       //      |       <div id="bar">
-                       //      |               <p>great commedians may not be funny <span>in person</span></p>
-                       //      |       </div>
-                       //              If we are presented with the following defintion for a NodeList:
-                       //      |       var l = new dojo.NodeList(dojo.byId("foo"), dojo.byId("bar"));
-                       //              it's possible to find all span elements under paragraphs
-                       //              contained by these elements with this sub-query:
-                       //      |       var spans = l.query("p span");
-
-                       // FIXME: probably slow
-                       if(!queryStr){ return this; }
-                       var ret = this.map(function(node){
-                               // FIXME: why would we ever get undefined here?
-                               return d.query(queryStr, node).filter(function(subNode){ return subNode !== undefined; });
-                       });
-                       return this._wrap(apc.apply([], ret), this);    // dojo.NodeList
-               },
-
-               filter: function(/*String|Function*/ simpleFilter){
-                       //      summary:
-                       //              "masks" the built-in javascript filter() method (supported
-                       //              in Dojo via `dojo.filter`) to support passing a simple
-                       //              string filter in addition to supporting filtering function
-                       //              objects.
-                       //      simpleFilter:
-                       //              If a string, a single-expression CSS rule. For example,
-                       //              ".thinger" or "#someId[attrName='value']" but not "div >
-                       //              span". In short, anything which does not invoke a descent
-                       //              to evaluate but can instead be used to test a single node
-                       //              is acceptable.
-                       //      example:
-                       //              "regular" JS filter syntax as exposed in dojo.filter:
-                       //              |       dojo.query("*").filter(function(item){
-                       //              |               // highlight every paragraph
-                       //              |               return (item.nodeName == "p");
-                       //              |       }).style("backgroundColor", "yellow");
-                       // example:
-                       //              the same filtering using a CSS selector
-                       //              |       dojo.query("*").filter("p").styles("backgroundColor", "yellow");
-
-                       var a = arguments, items = this, start = 0;
-                       if(typeof simpleFilter == "string"){ // inline'd type check
-                               items = d._filterQueryResult(this, a[0]);
-                               if(a.length == 1){
-                                       // if we only got a string query, pass back the filtered results
-                                       return items._stash(this); // dojo.NodeList
-                               }
-                               // if we got a callback, run it over the filtered items
-                               start = 1;
-                       }
-                       return this._wrap(d.filter(items, a[start], a[start + 1]), this);       // dojo.NodeList
-               },
-
-               /*
-               // FIXME: should this be "copyTo" and include parenting info?
-               clone: function(){
-                       // summary:
-                       //              creates node clones of each element of this list
-                       //              and returns a new list containing the clones
-               },
-               */
-
-               addContent: function(/*String||DomNode||Object||dojo.NodeList*/ content, /*String||Integer?*/ position){
-                       //      summary:
-                       //              add a node, NodeList or some HTML as a string to every item in the
-                       //              list.  Returns the original list.
-                       //      description:
-                       //              a copy of the HTML content is added to each item in the
-                       //              list, with an optional position argument. If no position
-                       //              argument is provided, the content is appended to the end of
-                       //              each item.
-                       //      content:
-                       //              DOM node, HTML in string format, a NodeList or an Object. If a DOM node or
-                       //              NodeList, the content will be cloned if the current NodeList has more than one
-                       //              element. Only the DOM nodes are cloned, no event handlers. If it is an Object,
-                       //              it should be an object with at "template" String property that has the HTML string
-                       //              to insert. If dojo.string has already been dojo.required, then dojo.string.substitute
-                       //              will be used on the "template" to generate the final HTML string. Other allowed
-                       //              properties on the object are: "parse" if the HTML
-                       //              string should be parsed for widgets (dojo.require("dojo.parser") to get that
-                       //              option to work), and "templateFunc" if a template function besides dojo.string.substitute
-                       //              should be used to transform the "template".
-                       //      position:
-                       //              can be one of:
-                       //              |       "last"||"end" (default)
-                       //              |       "first||"start"
-                       //              |       "before"
-                       //              |       "after"
-                       //              |       "replace" (replaces nodes in this NodeList with new content)
-                       //              |       "only" (removes other children of the nodes so new content is hte only child)
-                       //              or an offset in the childNodes property
-                       //      example:
-                       //              appends content to the end if the position is ommitted
-                       //      |       dojo.query("h3 > p").addContent("hey there!");
-                       //      example:
-                       //              add something to the front of each element that has a
-                       //              "thinger" property:
-                       //      |       dojo.query("[thinger]").addContent("...", "first");
-                       //      example:
-                       //              adds a header before each element of the list
-                       //      |       dojo.query(".note").addContent("<h4>NOTE:</h4>", "before");
-                       //      example:
-                       //              add a clone of a DOM node to the end of every element in
-                       //              the list, removing it from its existing parent.
-                       //      |       dojo.query(".note").addContent(dojo.byId("foo"));
-                       //  example:
-                       //      Append nodes from a templatized string.
-                       //              dojo.require("dojo.string");
-                       //              dojo.query(".note").addContent({
-                       //              template: '<b>${id}: </b><span>${name}</span>',
-                       //                      id: "user332",
-                       //              name: "Mr. Anderson"
-                       //      });
-                       //  example:
-                       //      Append nodes from a templatized string that also has widgets parsed.
-                       //      dojo.require("dojo.string");
-                       //      dojo.require("dojo.parser");
-                       //      var notes = dojo.query(".note").addContent({
-                       //              template: '<button dojoType="dijit.form.Button">${text}</button>',
-                       //              parse: true,
-                       //              text: "Send"
-                       //      });
-                       content = this._normalize(content, this[0]);
-                       for(var i = 0, node; node = this[i]; i++){
-                               this._place(content, node, position, i > 0);
-                       }
-                       return this; //dojo.NodeList
-               },
-
-               instantiate: function(/*String|Object*/ declaredClass, /*Object?*/ properties){
-                       //      summary:
-                       //              Create a new instance of a specified class, using the
-                       //              specified properties and each node in the nodeList as a
-                       //              srcNodeRef.
-                       //      example:
-                       //              Grabs all buttons in the page and converts them to diji.form.Buttons.
-                       //      |       var buttons = dojo.query("button").instantiate("dijit.form.Button", {showLabel: true});
-                       var c = d.isFunction(declaredClass) ? declaredClass : d.getObject(declaredClass);
-                       properties = properties || {};
-                       return this.forEach(function(node){
-                               new c(properties, node);
-                       });     // dojo.NodeList
-               },
-
-               at: function(/*===== index =====*/){
-                       //      summary:
-                       //              Returns a new NodeList comprised of items in this NodeList
-                       //              at the given index or indices.
-                       //      index: Integer...
-                       //              One or more 0-based indices of items in the current
-                       //              NodeList.
-                       //      returns:
-                       //              dojo.NodeList
-                       var t = new this._NodeListCtor();
-                       d.forEach(arguments, function(i){ if(this[i]){ t.push(this[i]); }}, this);
-                       return t._stash(this); // dojo.NodeList
-               }
-
-       });
-
-       nl.events = [
-               // summary: list of all DOM events used in NodeList
-               "blur", "focus", "change", "click", "error", "keydown", "keypress",
-               "keyup", "load", "mousedown", "mouseenter", "mouseleave", "mousemove",
-               "mouseout", "mouseover", "mouseup", "submit"
-       ];
-
-       // syntactic sugar for DOM events
-       d.forEach(nl.events, function(evt){
-                       var _oe = "on"+evt;
-                       nlp[_oe] = function(a, b){
-                               return this.connect(_oe, a, b);
-                       }
-                               // FIXME: should these events trigger publishes?
-                               /*
-                               return (a ? this.connect(_oe, a, b) :
-                                                       this.forEach(function(n){
-                                                               // FIXME:
-                                                               //              listeners get buried by
-                                                               //              addEventListener and can't be dug back
-                                                               //              out to be triggered externally.
-                                                               // see:
-                                                               //              http://developer.mozilla.org/en/docs/DOM:element
-
-                                                               console.log(n, evt, _oe);
-
-                                                               // FIXME: need synthetic event support!
-                                                               var _e = { target: n, faux: true, type: evt };
-                                                               // dojo._event_listener._synthesizeEvent({}, { target: n, faux: true, type: evt });
-                                                               try{ n[evt](_e); }catch(e){ console.log(e); }
-                                                               try{ n[_oe](_e); }catch(e){ console.log(e); }
-                                                       })
-                               );
-                               */
-               }
-       );
-
-})();
-
-}
-
-if(!dojo._hasResource["dojo._base.query"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.query"] = true;
-if(typeof dojo != "undefined"){
-       dojo.provide("dojo._base.query");
-       
-       
-
-}
-
-/*
-       dojo.query() architectural overview:
-
-               dojo.query is a relatively full-featured CSS3 query library. It is
-               designed to take any valid CSS3 selector and return the nodes matching
-               the selector. To do this quickly, it processes queries in several
-               steps, applying caching where profitable.
-               
-               The steps (roughly in reverse order of the way they appear in the code):
-                       1.) check to see if we already have a "query dispatcher"
-                               - if so, use that with the given parameterization. Skip to step 4.
-                       2.) attempt to determine which branch to dispatch the query to:
-                               - JS (optimized DOM iteration)
-                               - native (FF3.1+, Safari 3.1+, IE 8+)
-                       3.) tokenize and convert to executable "query dispatcher"
-                               - this is where the lion's share of the complexity in the
-                                 system lies. In the DOM version, the query dispatcher is
-                                 assembled as a chain of "yes/no" test functions pertaining to
-                                 a section of a simple query statement (".blah:nth-child(odd)"
-                                 but not "div div", which is 2 simple statements). Individual
-                                 statement dispatchers are cached (to prevent re-definition)
-                                 as are entire dispatch chains (to make re-execution of the
-                                 same query fast)
-                       4.) the resulting query dispatcher is called in the passed scope
-                           (by default the top-level document)
-                               - for DOM queries, this results in a recursive, top-down
-                                 evaluation of nodes based on each simple query section
-                               - for native implementations, this may mean working around spec
-                                 bugs. So be it.
-                       5.) matched nodes are pruned to ensure they are unique (if necessary)
-*/
-
-;(function(d){
-       // define everything in a closure for compressability reasons. "d" is an
-       // alias to "dojo" (or the toolkit alias object, e.g., "acme").
-
-       ////////////////////////////////////////////////////////////////////////
-       // Toolkit aliases
-       ////////////////////////////////////////////////////////////////////////
-
-       // if you are extracing dojo.query for use in your own system, you will
-       // need to provide these methods and properties. No other porting should be
-       // necessary, save for configuring the system to use a class other than
-       // dojo.NodeList as the return instance instantiator
-       var trim =                      d.trim;
-       var each =                      d.forEach;
-       //                                      d.isIE; // float
-       //                                      d.isSafari; // float
-       //                                      d.isOpera; // float
-       //                                      d.isWebKit; // float
-       //                                      d.doc ; // document element
-       var qlc = d._NodeListCtor =             d.NodeList;
-
-       var getDoc = function(){ return d.doc; };
-       // NOTE(alex): the spec is idiotic. CSS queries should ALWAYS be case-sensitive, but nooooooo
-       var cssCaseBug = ((d.isWebKit||d.isMozilla) && ((getDoc().compatMode) == "BackCompat"));
-
-       ////////////////////////////////////////////////////////////////////////
-       // Global utilities
-       ////////////////////////////////////////////////////////////////////////
-
-
-       // on browsers that support the "children" collection we can avoid a lot of
-       // iteration on chaff (non-element) nodes.
-       // why.
-       var childNodesName = !!getDoc().firstChild["children"] ? "children" : "childNodes";
-
-       var specials = ">~+";
-
-       // global thunk to determine whether we should treat the current query as
-       // case sensitive or not. This switch is flipped by the query evaluator
-       // based on the document passed as the context to search.
-       var caseSensitive = false;
-
-       // how high?
-       var yesman = function(){ return true; };
-
-       ////////////////////////////////////////////////////////////////////////
-       // Tokenizer
-       ////////////////////////////////////////////////////////////////////////
-
-       var getQueryParts = function(query){
-               //      summary: 
-               //              state machine for query tokenization
-               //      description:
-               //              instead of using a brittle and slow regex-based CSS parser,
-               //              dojo.query implements an AST-style query representation. This
-               //              representation is only generated once per query. For example,
-               //              the same query run multiple times or under different root nodes
-               //              does not re-parse the selector expression but instead uses the
-               //              cached data structure. The state machine implemented here
-               //              terminates on the last " " (space) charachter and returns an
-               //              ordered array of query component structures (or "parts"). Each
-               //              part represents an operator or a simple CSS filtering
-               //              expression. The structure for parts is documented in the code
-               //              below.
-
-
-               // NOTE: 
-               //              this code is designed to run fast and compress well. Sacrifices
-               //              to readibility and maintainability have been made.  Your best
-               //              bet when hacking the tokenizer is to put The Donnas on *really*
-               //              loud (may we recommend their "Spend The Night" release?) and
-               //              just assume you're gonna make mistakes. Keep the unit tests
-               //              open and run them frequently. Knowing is half the battle ;-)
-               if(specials.indexOf(query.slice(-1)) >= 0){
-                       // if we end with a ">", "+", or "~", that means we're implicitly
-                       // searching all children, so make it explicit
-                       query += " * "
-               }else{
-                       // if you have not provided a terminator, one will be provided for
-                       // you...
-                       query += " ";
-               }
-
-               var ts = function(/*Integer*/ s, /*Integer*/ e){
-                       // trim and slice. 
-
-                       // take an index to start a string slice from and an end position
-                       // and return a trimmed copy of that sub-string
-                       return trim(query.slice(s, e));
-               }
-
-               // the overall data graph of the full query, as represented by queryPart objects
-               var queryParts = []; 
-
-
-               // state keeping vars
-               var inBrackets = -1, inParens = -1, inMatchFor = -1, 
-                       inPseudo = -1, inClass = -1, inId = -1, inTag = -1, 
-                       lc = "", cc = "", pStart;
-
-               // iteration vars
-               var x = 0, // index in the query
-                       ql = query.length,
-                       currentPart = null, // data structure representing the entire clause
-                       _cp = null; // the current pseudo or attr matcher
-
-               // several temporary variables are assigned to this structure durring a
-               // potential sub-expression match:
-               //              attr:
-               //                      a string representing the current full attribute match in a
-               //                      bracket expression
-               //              type:
-               //                      if there's an operator in a bracket expression, this is
-               //                      used to keep track of it
-               //              value:
-               //                      the internals of parenthetical expression for a pseudo. for
-               //                      :nth-child(2n+1), value might be "2n+1"
-
-               var endTag = function(){
-                       // called when the tokenizer hits the end of a particular tag name.
-                       // Re-sets state variables for tag matching and sets up the matcher
-                       // to handle the next type of token (tag or operator).
-                       if(inTag >= 0){
-                               var tv = (inTag == x) ? null : ts(inTag, x); // .toLowerCase();
-                               currentPart[ (specials.indexOf(tv) < 0) ? "tag" : "oper" ] = tv;
-                               inTag = -1;
-                       }
-               }
-
-               var endId = function(){
-                       // called when the tokenizer might be at the end of an ID portion of a match
-                       if(inId >= 0){
-                               currentPart.id = ts(inId, x).replace(/\\/g, "");
-                               inId = -1;
-                       }
-               }
-
-               var endClass = function(){
-                       // called when the tokenizer might be at the end of a class name
-                       // match. CSS allows for multiple classes, so we augment the
-                       // current item with another class in its list
-                       if(inClass >= 0){
-                               currentPart.classes.push(ts(inClass+1, x).replace(/\\/g, ""));
-                               inClass = -1;
-                       }
-               }
-
-               var endAll = function(){
-                       // at the end of a simple fragment, so wall off the matches
-                       endId(); endTag(); endClass();
-               }
-
-               var endPart = function(){
-                       endAll();
-                       if(inPseudo >= 0){
-                               currentPart.pseudos.push({ name: ts(inPseudo+1, x) });
-                       }
-                       // hint to the selector engine to tell it whether or not it
-                       // needs to do any iteration. Many simple selectors don't, and
-                       // we can avoid significant construction-time work by advising
-                       // the system to skip them
-                       currentPart.loops = (   
-                                       currentPart.pseudos.length || 
-                                       currentPart.attrs.length || 
-                                       currentPart.classes.length      );
-
-                       currentPart.oquery = currentPart.query = ts(pStart, x); // save the full expression as a string
-
-
-                       // otag/tag are hints to suggest to the system whether or not
-                       // it's an operator or a tag. We save a copy of otag since the
-                       // tag name is cast to upper-case in regular HTML matches. The
-                       // system has a global switch to figure out if the current
-                       // expression needs to be case sensitive or not and it will use
-                       // otag or tag accordingly
-                       currentPart.otag = currentPart.tag = (currentPart["oper"]) ? null : (currentPart.tag || "*");
-
-                       if(currentPart.tag){
-                               // if we're in a case-insensitive HTML doc, we likely want
-                               // the toUpperCase when matching on element.tagName. If we
-                               // do it here, we can skip the string op per node
-                               // comparison
-                               currentPart.tag = currentPart.tag.toUpperCase();
-                       }
-
-                       // add the part to the list
-                       if(queryParts.length && (queryParts[queryParts.length-1].oper)){
-                               // operators are always infix, so we remove them from the
-                               // list and attach them to the next match. The evaluator is
-                               // responsible for sorting out how to handle them.
-                               currentPart.infixOper = queryParts.pop();
-                               currentPart.query = currentPart.infixOper.query + " " + currentPart.query;
-                               /*
-                               console.debug(  "swapping out the infix", 
-                                                               currentPart.infixOper, 
-                                                               "and attaching it to", 
-                                                               currentPart);
-                               */
-                       }
-                       queryParts.push(currentPart);
-
-                       currentPart = null;
-               }
-
-               // iterate over the query, charachter by charachter, building up a 
-               // list of query part objects
-               for(; lc=cc, cc=query.charAt(x), x < ql; x++){
-                       //              cc: the current character in the match
-                       //              lc: the last charachter (if any)
-
-                       // someone is trying to escape something, so don't try to match any
-                       // fragments. We assume we're inside a literal.
-                       if(lc == "\\"){ continue; } 
-                       if(!currentPart){ // a part was just ended or none has yet been created
-                               // NOTE: I hate all this alloc, but it's shorter than writing tons of if's
-                               pStart = x;
-                               //      rules describe full CSS sub-expressions, like:
-                               //              #someId
-                               //              .className:first-child
-                               //      but not:
-                               //              thinger > div.howdy[type=thinger]
-                               //      the indidual components of the previous query would be
-                               //      split into 3 parts that would be represented a structure
-                               //      like:
-                               //              [
-                               //                      {
-                               //                              query: "thinger",
-                               //                              tag: "thinger",
-                               //                      },
-                               //                      {
-                               //                              query: "div.howdy[type=thinger]",
-                               //                              classes: ["howdy"],
-                               //                              infixOper: {
-                               //                                      query: ">",
-                               //                                      oper: ">",
-                               //                              }
-                               //                      },
-                               //              ]
-                               currentPart = {
-                                       query: null, // the full text of the part's rule
-                                       pseudos: [], // CSS supports multiple pseud-class matches in a single rule
-                                       attrs: [],      // CSS supports multi-attribute match, so we need an array
-                                       classes: [], // class matches may be additive, e.g.: .thinger.blah.howdy
-                                       tag: null,      // only one tag...
-                                       oper: null, // ...or operator per component. Note that these wind up being exclusive.
-                                       id: null,       // the id component of a rule
-                                       getTag: function(){
-                                               return (caseSensitive) ? this.otag : this.tag;
-                                       }
-                               };
-
-                               // if we don't have a part, we assume we're going to start at
-                               // the beginning of a match, which should be a tag name. This
-                               // might fault a little later on, but we detect that and this
-                               // iteration will still be fine.
-                               inTag = x; 
-                       }
-
-                       if(inBrackets >= 0){
-                               // look for a the close first
-                               if(cc == "]"){ // if we're in a [...] clause and we end, do assignment
-                                       if(!_cp.attr){
-                                               // no attribute match was previously begun, so we
-                                               // assume this is an attribute existance match in the
-                                               // form of [someAttributeName]
-                                               _cp.attr = ts(inBrackets+1, x);
-                                       }else{
-                                               // we had an attribute already, so we know that we're
-                                               // matching some sort of value, as in [attrName=howdy]
-                                               _cp.matchFor = ts((inMatchFor||inBrackets+1), x);
-                                       }
-                                       var cmf = _cp.matchFor;
-                                       if(cmf){
-                                               // try to strip quotes from the matchFor value. We want
-                                               // [attrName=howdy] to match the same 
-                                               //      as [attrName = 'howdy' ]
-                                               if(     (cmf.charAt(0) == '"') || (cmf.charAt(0)  == "'") ){
-                                                       _cp.matchFor = cmf.slice(1, -1);
-                                               }
-                                       }
-                                       // end the attribute by adding it to the list of attributes. 
-                                       currentPart.attrs.push(_cp);
-                                       _cp = null; // necessary?
-                                       inBrackets = inMatchFor = -1;
-                               }else if(cc == "="){
-                                       // if the last char was an operator prefix, make sure we
-                                       // record it along with the "=" operator. 
-                                       var addToCc = ("|~^$*".indexOf(lc) >=0 ) ? lc : "";
-                                       _cp.type = addToCc+cc;
-                                       _cp.attr = ts(inBrackets+1, x-addToCc.length);
-                                       inMatchFor = x+1;
-                               }
-                               // now look for other clause parts
-                       }else if(inParens >= 0){
-                               // if we're in a parenthetical expression, we need to figure
-                               // out if it's attached to a pseduo-selector rule like
-                               // :nth-child(1)
-                               if(cc == ")"){
-                                       if(inPseudo >= 0){
-                                               _cp.value = ts(inParens+1, x);
-                                       }
-                                       inPseudo = inParens = -1;
-                               }
-                       }else if(cc == "#"){
-                               // start of an ID match
-                               endAll();
-                               inId = x+1;
-                       }else if(cc == "."){
-                               // start of a class match
-                               endAll();
-                               inClass = x;
-                       }else if(cc == ":"){
-                               // start of a pseudo-selector match
-                               endAll();
-                               inPseudo = x;
-                       }else if(cc == "["){
-                               // start of an attribute match. 
-                               endAll();
-                               inBrackets = x;
-                               // provide a new structure for the attribute match to fill-in
-                               _cp = {
-                                       /*=====
-                                       attr: null, type: null, matchFor: null
-                                       =====*/
-                               };
-                       }else if(cc == "("){
-                               // we really only care if we've entered a parenthetical
-                               // expression if we're already inside a pseudo-selector match
-                               if(inPseudo >= 0){
-                                       // provide a new structure for the pseudo match to fill-in
-                                       _cp = { 
-                                               name: ts(inPseudo+1, x), 
-                                               value: null
-                                       }
-                                       currentPart.pseudos.push(_cp);
-                               }
-                               inParens = x;
-                       }else if(
-                               (cc == " ") && 
-                               // if it's a space char and the last char is too, consume the
-                               // current one without doing more work
-                               (lc != cc)
-                       ){
-                               endPart();
-                       }
-               }
-               return queryParts;
-       };
-       
-
-       ////////////////////////////////////////////////////////////////////////
-       // DOM query infrastructure
-       ////////////////////////////////////////////////////////////////////////
-
-       var agree = function(first, second){
-               // the basic building block of the yes/no chaining system. agree(f1,
-               // f2) generates a new function which returns the boolean results of
-               // both of the passed functions to a single logical-anded result. If
-               // either are not possed, the other is used exclusively.
-               if(!first){ return second; }
-               if(!second){ return first; }
-
-               return function(){
-                       return first.apply(window, arguments) && second.apply(window, arguments);
-               }
-       };
-
-       var getArr = function(i, arr){
-               // helps us avoid array alloc when we don't need it
-               var r = arr||[]; // FIXME: should this be 'new d._NodeListCtor()' ?
-               if(i){ r.push(i); }
-               return r;
-       };
-
-       var _isElement = function(n){ return (1 == n.nodeType); };
-
-       // FIXME: need to coalesce _getAttr with defaultGetter
-       var blank = "";
-       var _getAttr = function(elem, attr){
-               if(!elem){ return blank; }
-               if(attr == "class"){
-                       return elem.className || blank;
-               }
-               if(attr == "for"){
-                       return elem.htmlFor || blank;
-               }
-               if(attr == "style"){
-                       return elem.style.cssText || blank;
-               }
-               return (caseSensitive ? elem.getAttribute(attr) : elem.getAttribute(attr, 2)) || blank;
-       };
-
-       var attrs = {
-               "*=": function(attr, value){
-                       return function(elem){
-                               // E[foo*="bar"]
-                               //              an E element whose "foo" attribute value contains
-                               //              the substring "bar"
-                               return (_getAttr(elem, attr).indexOf(value)>=0);
-                       }
-               },
-               "^=": function(attr, value){
-                       // E[foo^="bar"]
-                       //              an E element whose "foo" attribute value begins exactly
-                       //              with the string "bar"
-                       return function(elem){
-                               return (_getAttr(elem, attr).indexOf(value)==0);
-                       }
-               },
-               "$=": function(attr, value){
-                       // E[foo$="bar"]        
-                       //              an E element whose "foo" attribute value ends exactly
-                       //              with the string "bar"
-                       var tval = " "+value;
-                       return function(elem){
-                               var ea = " "+_getAttr(elem, attr);
-                               return (ea.lastIndexOf(value)==(ea.length-value.length));
-                       }
-               },
-               "~=": function(attr, value){
-                       // E[foo~="bar"]        
-                       //              an E element whose "foo" attribute value is a list of
-                       //              space-separated values, one of which is exactly equal
-                       //              to "bar"
-
-                       // return "[contains(concat(' ',@"+attr+",' '), ' "+ value +" ')]";
-                       var tval = " "+value+" ";
-                       return function(elem){
-                               var ea = " "+_getAttr(elem, attr)+" ";
-                               return (ea.indexOf(tval)>=0);
-                       }
-               },
-               "|=": function(attr, value){
-                       // E[hreflang|="en"]
-                       //              an E element whose "hreflang" attribute has a
-                       //              hyphen-separated list of values beginning (from the
-                       //              left) with "en"
-                       var valueDash = " "+value+"-";
-                       return function(elem){
-                               var ea = " "+_getAttr(elem, attr);
-                               return (
-                                       (ea == value) ||
-                                       (ea.indexOf(valueDash)==0)
-                               );
-                       }
-               },
-               "=": function(attr, value){
-                       return function(elem){
-                               return (_getAttr(elem, attr) == value);
-                       }
-               }
-       };
-
-       // avoid testing for node type if we can. Defining this in the negative
-       // here to avoid negation in the fast path.
-       var _noNES = (typeof getDoc().firstChild.nextElementSibling == "undefined");
-       var _ns = !_noNES ? "nextElementSibling" : "nextSibling";
-       var _ps = !_noNES ? "previousElementSibling" : "previousSibling";
-       var _simpleNodeTest = (_noNES ? _isElement : yesman);
-
-       var _lookLeft = function(node){
-               // look left
-               while(node = node[_ps]){
-                       if(_simpleNodeTest(node)){ return false; }
-               }
-               return true;
-       };
-
-       var _lookRight = function(node){
-               // look right
-               while(node = node[_ns]){
-                       if(_simpleNodeTest(node)){ return false; }
-               }
-               return true;
-       };
-
-       var getNodeIndex = function(node){
-               var root = node.parentNode;
-               var i = 0,
-                       tret = root[childNodesName],
-                       ci = (node["_i"]||-1),
-                       cl = (root["_l"]||-1);
-
-               if(!tret){ return -1; }
-               var l = tret.length;
-
-               // we calcuate the parent length as a cheap way to invalidate the
-               // cache. It's not 100% accurate, but it's much more honest than what
-               // other libraries do
-               if( cl == l && ci >= 0 && cl >= 0 ){
-                       // if it's legit, tag and release
-                       return ci;
-               }
-
-               // else re-key things
-               root["_l"] = l;
-               ci = -1;
-               for(var te = root["firstElementChild"]||root["firstChild"]; te; te = te[_ns]){
-                       if(_simpleNodeTest(te)){ 
-                               te["_i"] = ++i;
-                               if(node === te){ 
-                                       // NOTE:
-                                       //      shortcuting the return at this step in indexing works
-                                       //      very well for benchmarking but we avoid it here since
-                                       //      it leads to potential O(n^2) behavior in sequential
-                                       //      getNodexIndex operations on a previously un-indexed
-                                       //      parent. We may revisit this at a later time, but for
-                                       //      now we just want to get the right answer more often
-                                       //      than not.
-                                       ci = i;
-                               }
-                       }
-               }
-               return ci;
-       };
-
-       var isEven = function(elem){
-               return !((getNodeIndex(elem)) % 2);
-       };
-
-       var isOdd = function(elem){
-               return ((getNodeIndex(elem)) % 2);
-       };
-
-       var pseudos = {
-               "checked": function(name, condition){
-                       return function(elem){
-                               return !!("checked" in elem ? elem.checked : elem.selected);
-                       }
-               },
-               "first-child": function(){ return _lookLeft; },
-               "last-child": function(){ return _lookRight; },
-               "only-child": function(name, condition){
-                       return function(node){ 
-                               if(!_lookLeft(node)){ return false; }
-                               if(!_lookRight(node)){ return false; }
-                               return true;
-                       };
-               },
-               "empty": function(name, condition){
-                       return function(elem){
-                               // DomQuery and jQuery get this wrong, oddly enough.
-                               // The CSS 3 selectors spec is pretty explicit about it, too.
-                               var cn = elem.childNodes;
-                               var cnl = elem.childNodes.length;
-                               // if(!cnl){ return true; }
-                               for(var x=cnl-1; x >= 0; x--){
-                                       var nt = cn[x].nodeType;
-                                       if((nt === 1)||(nt == 3)){ return false; }
-                               }
-                               return true;
-                       }
-               },
-               "contains": function(name, condition){
-                       var cz = condition.charAt(0);
-                       if( cz == '"' || cz == "'" ){ //remove quote
-                               condition = condition.slice(1, -1);
-                       }
-                       return function(elem){
-                               return (elem.innerHTML.indexOf(condition) >= 0);
-                       }
-               },
-               "not": function(name, condition){
-                       var p = getQueryParts(condition)[0];
-                       var ignores = { el: 1 }; 
-                       if(p.tag != "*"){
-                               ignores.tag = 1;
-                       }
-                       if(!p.classes.length){
-                               ignores.classes = 1;
-                       }
-                       var ntf = getSimpleFilterFunc(p, ignores);
-                       return function(elem){
-                               return (!ntf(elem));
-                       }
-               },
-               "nth-child": function(name, condition){
-                       var pi = parseInt;
-                       // avoid re-defining function objects if we can
-                       if(condition == "odd"){
-                               return isOdd;
-                       }else if(condition == "even"){
-                               return isEven;
-                       }
-                       // FIXME: can we shorten this?
-                       if(condition.indexOf("n") != -1){
-                               var tparts = condition.split("n", 2);
-                               var pred = tparts[0] ? ((tparts[0] == '-') ? -1 : pi(tparts[0])) : 1;
-                               var idx = tparts[1] ? pi(tparts[1]) : 0;
-                               var lb = 0, ub = -1;
-                               if(pred > 0){
-                                       if(idx < 0){
-                                               idx = (idx % pred) && (pred + (idx % pred));
-                                       }else if(idx>0){
-                                               if(idx >= pred){
-                                                       lb = idx - idx % pred;
-                                               }
-                                               idx = idx % pred;
-                                       }
-                               }else if(pred<0){
-                                       pred *= -1;
-                                       // idx has to be greater than 0 when pred is negative;
-                                       // shall we throw an error here?
-                                       if(idx > 0){
-                                               ub = idx;
-                                               idx = idx % pred;
-                                       }
-                               }
-                               if(pred > 0){
-                                       return function(elem){
-                                               var i = getNodeIndex(elem);
-                                               return (i>=lb) && (ub<0 || i<=ub) && ((i % pred) == idx);
-                                       }
-                               }else{
-                                       condition = idx;
-                               }
-                       }
-                       var ncount = pi(condition);
-                       return function(elem){
-                               return (getNodeIndex(elem) == ncount);
-                       }
-               }
-       };
-
-       var defaultGetter = (d.isIE) ? function(cond){
-               var clc = cond.toLowerCase();
-               if(clc == "class"){ cond = "className"; }
-               return function(elem){
-                       return (caseSensitive ? elem.getAttribute(cond) : elem[cond]||elem[clc]);
-               }
-       } : function(cond){
-               return function(elem){
-                       return (elem && elem.getAttribute && elem.hasAttribute(cond));
-               }
-       };
-
-       var getSimpleFilterFunc = function(query, ignores){
-               // generates a node tester function based on the passed query part. The
-               // query part is one of the structures generatd by the query parser
-               // when it creates the query AST. The "ignores" object specifies which
-               // (if any) tests to skip, allowing the system to avoid duplicating
-               // work where it may have already been taken into account by other
-               // factors such as how the nodes to test were fetched in the first
-               // place
-               if(!query){ return yesman; }
-               ignores = ignores||{};
-
-               var ff = null;
-
-               if(!("el" in ignores)){
-                       ff = agree(ff, _isElement);
-               }
-
-               if(!("tag" in ignores)){
-                       if(query.tag != "*"){
-                               ff = agree(ff, function(elem){
-                                       return (elem && (elem.tagName == query.getTag()));
-                               });
-                       }
-               }
-
-               if(!("classes" in ignores)){
-                       each(query.classes, function(cname, idx, arr){
-                               // get the class name
-                               /*
-                               var isWildcard = cname.charAt(cname.length-1) == "*";
-                               if(isWildcard){
-                                       cname = cname.substr(0, cname.length-1);
-                               }
-                               // I dislike the regex thing, even if memozied in a cache, but it's VERY short
-                               var re = new RegExp("(?:^|\\s)" + cname + (isWildcard ? ".*" : "") + "(?:\\s|$)");
-                               */
-                               var re = new RegExp("(?:^|\\s)" + cname + "(?:\\s|$)");
-                               ff = agree(ff, function(elem){
-                                       return re.test(elem.className);
-                               });
-                               ff.count = idx;
-                       });
-               }
-
-               if(!("pseudos" in ignores)){
-                       each(query.pseudos, function(pseudo){
-                               var pn = pseudo.name;
-                               if(pseudos[pn]){
-                                       ff = agree(ff, pseudos[pn](pn, pseudo.value));
-                               }
-                       });
-               }
-
-               if(!("attrs" in ignores)){
-                       each(query.attrs, function(attr){
-                               var matcher;
-                               var a = attr.attr;
-                               // type, attr, matchFor
-                               if(attr.type && attrs[attr.type]){
-                                       matcher = attrs[attr.type](a, attr.matchFor);
-                               }else if(a.length){
-                                       matcher = defaultGetter(a);
-                               }
-                               if(matcher){
-                                       ff = agree(ff, matcher);
-                               }
-                       });
-               }
-
-               if(!("id" in ignores)){
-                       if(query.id){
-                               ff = agree(ff, function(elem){ 
-                                       return (!!elem && (elem.id == query.id));
-                               });
-                       }
-               }
-
-               if(!ff){
-                       if(!("default" in ignores)){
-                               ff = yesman; 
-                       }
-               }
-               return ff;
-       };
-
-       var _nextSibling = function(filterFunc){
-               return function(node, ret, bag){
-                       while(node = node[_ns]){
-                               if(_noNES && (!_isElement(node))){ continue; }
-                               if(
-                                       (!bag || _isUnique(node, bag)) &&
-                                       filterFunc(node)
-                               ){
-                                       ret.push(node);
-                               }
-                               break;
-                       }
-                       return ret;
-               }
-       };
-
-       var _nextSiblings = function(filterFunc){
-               return function(root, ret, bag){
-                       var te = root[_ns];
-                       while(te){
-                               if(_simpleNodeTest(te)){
-                                       if(bag && !_isUnique(te, bag)){
-                                               break;
-                                       }
-                                       if(filterFunc(te)){
-                                               ret.push(te);
-                                       }
-                               }
-                               te = te[_ns];
-                       }
-                       return ret;
-               }
-       };
-
-       // get an array of child *elements*, skipping text and comment nodes
-       var _childElements = function(filterFunc){
-               filterFunc = filterFunc||yesman;
-               return function(root, ret, bag){
-                       // get an array of child elements, skipping text and comment nodes
-                       var te, x = 0, tret = root[childNodesName];
-                       while(te = tret[x++]){
-                               if(
-                                       _simpleNodeTest(te) &&
-                                       (!bag || _isUnique(te, bag)) &&
-                                       (filterFunc(te, x))
-                               ){ 
-                                       ret.push(te);
-                               }
-                       }
-                       return ret;
-               };
-       };
-       
-       /*
-       // thanks, Dean!
-       var itemIsAfterRoot = d.isIE ? function(item, root){
-               return (item.sourceIndex > root.sourceIndex);
-       } : function(item, root){
-               return (item.compareDocumentPosition(root) == 2);
-       };
-       */
-
-       // test to see if node is below root
-       var _isDescendant = function(node, root){
-               var pn = node.parentNode;
-               while(pn){
-                       if(pn == root){
-                               break;
-                       }
-                       pn = pn.parentNode;
-               }
-               return !!pn;
-       };
-
-       var _getElementsFuncCache = {};
-
-       var getElementsFunc = function(query){
-               var retFunc = _getElementsFuncCache[query.query];
-               // if we've got a cached dispatcher, just use that
-               if(retFunc){ return retFunc; }
-               // else, generate a new on
-
-               // NOTE:
-               //              this function returns a function that searches for nodes and
-               //              filters them.  The search may be specialized by infix operators
-               //              (">", "~", or "+") else it will default to searching all
-               //              descendants (the " " selector). Once a group of children is
-               //              founde, a test function is applied to weed out the ones we
-               //              don't want. Many common cases can be fast-pathed. We spend a
-               //              lot of cycles to create a dispatcher that doesn't do more work
-               //              than necessary at any point since, unlike this function, the
-               //              dispatchers will be called every time. The logic of generating
-               //              efficient dispatchers looks like this in pseudo code:
-               //
-               //              # if it's a purely descendant query (no ">", "+", or "~" modifiers)
-               //              if infixOperator == " ":
-               //                      if only(id):
-               //                              return def(root):
-               //                                      return d.byId(id, root);
-               //
-               //                      elif id:
-               //                              return def(root):
-               //                                      return filter(d.byId(id, root));
-               //
-               //                      elif cssClass && getElementsByClassName:
-               //                              return def(root):
-               //                                      return filter(root.getElementsByClassName(cssClass));
-               //
-               //                      elif only(tag):
-               //                              return def(root):
-               //                                      return root.getElementsByTagName(tagName);
-               //
-               //                      else:
-               //                              # search by tag name, then filter
-               //                              return def(root):
-               //                                      return filter(root.getElementsByTagName(tagName||"*"));
-               //
-               //              elif infixOperator == ">":
-               //                      # search direct children
-               //                      return def(root):
-               //                              return filter(root.children);
-               //
-               //              elif infixOperator == "+":
-               //                      # search next sibling
-               //                      return def(root):
-               //                              return filter(root.nextElementSibling);
-               //
-               //              elif infixOperator == "~":
-               //                      # search rightward siblings
-               //                      return def(root):
-               //                              return filter(nextSiblings(root));
-
-               var io = query.infixOper;
-               var oper = (io ? io.oper : "");
-               // the default filter func which tests for all conditions in the query
-               // part. This is potentially inefficient, so some optimized paths may
-               // re-define it to test fewer things.
-               var filterFunc = getSimpleFilterFunc(query, { el: 1 });
-               var qt = query.tag;
-               var wildcardTag = ("*" == qt);
-               var ecs = getDoc()["getElementsByClassName"]; 
-
-               if(!oper){
-                       // if there's no infix operator, then it's a descendant query. ID
-                       // and "elements by class name" variants can be accelerated so we
-                       // call them out explicitly:
-                       if(query.id){
-                               // testing shows that the overhead of yesman() is acceptable
-                               // and can save us some bytes vs. re-defining the function
-                               // everywhere.
-                               filterFunc = (!query.loops && wildcardTag) ? 
-                                       yesman : 
-                                       getSimpleFilterFunc(query, { el: 1, id: 1 });
-
-                               retFunc = function(root, arr){
-                                       var te = d.byId(query.id, (root.ownerDocument||root));
-                                       if(!te || !filterFunc(te)){ return; }
-                                       if(9 == root.nodeType){ // if root's a doc, we just return directly
-                                               return getArr(te, arr);
-                                       }else{ // otherwise check ancestry
-                                               if(_isDescendant(te, root)){
-                                                       return getArr(te, arr);
-                                               }
-                                       }
-                               }
-                       }else if(
-                               ecs && 
-                               // isAlien check. Workaround for Prototype.js being totally evil/dumb.
-                               /\{\s*\[native code\]\s*\}/.test(String(ecs)) && 
-                               query.classes.length &&
-                               !cssCaseBug
-                       ){
-                               // it's a class-based query and we've got a fast way to run it.
-
-                               // ignore class and ID filters since we will have handled both
-                               filterFunc = getSimpleFilterFunc(query, { el: 1, classes: 1, id: 1 });
-                               var classesString = query.classes.join(" ");
-                               retFunc = function(root, arr, bag){
-                                       var ret = getArr(0, arr), te, x=0;
-                                       var tret = root.getElementsByClassName(classesString);
-                                       while((te = tret[x++])){
-                                               if(filterFunc(te, root) && _isUnique(te, bag)){
-                                                       ret.push(te);
-                                               }
-                                       }
-                                       return ret;
-                               };
-
-                       }else if(!wildcardTag && !query.loops){
-                               // it's tag only. Fast-path it.
-                               retFunc = function(root, arr, bag){
-                                       var ret = getArr(0, arr), te, x=0;
-                                       var tret = root.getElementsByTagName(query.getTag());
-                                       while((te = tret[x++])){
-                                               if(_isUnique(te, bag)){
-                                                       ret.push(te);
-                                               }
-                                       }
-                                       return ret;
-                               };
-                       }else{
-                               // the common case:
-                               //              a descendant selector without a fast path. By now it's got
-                               //              to have a tag selector, even if it's just "*" so we query
-                               //              by that and filter
-                               filterFunc = getSimpleFilterFunc(query, { el: 1, tag: 1, id: 1 });
-                               retFunc = function(root, arr, bag){
-                                       var ret = getArr(0, arr), te, x=0;
-                                       // we use getTag() to avoid case sensitivity issues
-                                       var tret = root.getElementsByTagName(query.getTag());
-                                       while((te = tret[x++])){
-                                               if(filterFunc(te, root) && _isUnique(te, bag)){
-                                                       ret.push(te);
-                                               }
-                                       }
-                                       return ret;
-                               };
-                       }
-               }else{
-                       // the query is scoped in some way. Instead of querying by tag we
-                       // use some other collection to find candidate nodes
-                       var skipFilters = { el: 1 };
-                       if(wildcardTag){
-                               skipFilters.tag = 1;
-                       }
-                       filterFunc = getSimpleFilterFunc(query, skipFilters);
-                       if("+" == oper){
-                               retFunc = _nextSibling(filterFunc);
-                       }else if("~" == oper){
-                               retFunc = _nextSiblings(filterFunc);
-                       }else if(">" == oper){
-                               retFunc = _childElements(filterFunc);
-                       }
-               }
-               // cache it and return
-               return _getElementsFuncCache[query.query] = retFunc;
-       };
-
-       var filterDown = function(root, queryParts){
-               // NOTE:
-               //              this is the guts of the DOM query system. It takes a list of
-               //              parsed query parts and a root and finds children which match
-               //              the selector represented by the parts
-               var candidates = getArr(root), qp, x, te, qpl = queryParts.length, bag, ret;
-
-               for(var i = 0; i < qpl; i++){
-                       ret = [];
-                       qp = queryParts[i];
-                       x = candidates.length - 1;
-                       if(x > 0){
-                               // if we have more than one root at this level, provide a new
-                               // hash to use for checking group membership but tell the
-                               // system not to post-filter us since we will already have been
-                               // gauranteed to be unique
-                               bag = {};
-                               ret.nozip = true;
-                       }
-                       var gef = getElementsFunc(qp);
-                       for(var j = 0; (te = candidates[j]); j++){
-                               // for every root, get the elements that match the descendant
-                               // selector, adding them to the "ret" array and filtering them
-                               // via membership in this level's bag. If there are more query
-                               // parts, then this level's return will be used as the next
-                               // level's candidates
-                               gef(te, ret, bag);
-                       }
-                       if(!ret.length){ break; }
-                       candidates = ret;
-               }
-               return ret;
-       };
-
-       ////////////////////////////////////////////////////////////////////////
-       // the query runner
-       ////////////////////////////////////////////////////////////////////////
-
-       // these are the primary caches for full-query results. The query
-       // dispatcher functions are generated then stored here for hash lookup in
-       // the future
-       var _queryFuncCacheDOM = {},
-               _queryFuncCacheQSA = {};
-
-       // this is the second level of spliting, from full-length queries (e.g.,
-       // "div.foo .bar") into simple query expressions (e.g., ["div.foo",
-       // ".bar"])
-       var getStepQueryFunc = function(query){
-               var qparts = getQueryParts(trim(query));
-
-               // if it's trivial, avoid iteration and zipping costs
-               if(qparts.length == 1){
-                       // we optimize this case here to prevent dispatch further down the
-                       // chain, potentially slowing things down. We could more elegantly
-                       // handle this in filterDown(), but it's slower for simple things
-                       // that need to be fast (e.g., "#someId").
-                       var tef = getElementsFunc(qparts[0]);
-                       return function(root){
-                               var r = tef(root, new qlc());
-                               if(r){ r.nozip = true; }
-                               return r;
-                       }
-               }
-
-               // otherwise, break it up and return a runner that iterates over the parts recursively
-               return function(root){
-                       return filterDown(root, qparts);
-               }
-       };
-
-       // NOTES:
-       //      * we can't trust QSA for anything but document-rooted queries, so
-       //        caching is split into DOM query evaluators and QSA query evaluators
-       //      * caching query results is dirty and leak-prone (or, at a minimum,
-       //        prone to unbounded growth). Other toolkits may go this route, but
-       //        they totally destroy their own ability to manage their memory
-       //        footprint. If we implement it, it should only ever be with a fixed
-       //        total element reference # limit and an LRU-style algorithm since JS
-       //        has no weakref support. Caching compiled query evaluators is also
-       //        potentially problematic, but even on large documents the size of the
-       //        query evaluators is often < 100 function objects per evaluator (and
-       //        LRU can be applied if it's ever shown to be an issue).
-       //      * since IE's QSA support is currently only for HTML documents and even
-       //        then only in IE 8's "standards mode", we have to detect our dispatch
-       //        route at query time and keep 2 separate caches. Ugg.
-
-       // we need to determine if we think we can run a given query via
-       // querySelectorAll or if we'll need to fall back on DOM queries to get
-       // there. We need a lot of information about the environment and the query
-       // to make the determiniation (e.g. does it support QSA, does the query in
-       // question work in the native QSA impl, etc.).
-       var nua = navigator.userAgent;
-       // some versions of Safari provided QSA, but it was buggy and crash-prone.
-       // We need te detect the right "internal" webkit version to make this work.
-       var wk = "WebKit/";
-       var is525 = (
-               d.isWebKit && 
-               (nua.indexOf(wk) > 0) && 
-               (parseFloat(nua.split(wk)[1]) > 528)
-       );
-
-       // IE QSA queries may incorrectly include comment nodes, so we throw the
-       // zipping function into "remove" comments mode instead of the normal "skip
-       // it" which every other QSA-clued browser enjoys
-       var noZip = d.isIE ? "commentStrip" : "nozip";
-
-       var qsa = "querySelectorAll";
-       var qsaAvail = (
-               !!getDoc()[qsa] && 
-               // see #5832
-               (!d.isSafari || (d.isSafari > 3.1) || is525 )
-       );
-
-       //Don't bother with n+3 type of matches, IE complains if we modify those.
-       var infixSpaceRe = /n\+\d|([^ ])?([>~+])([^ =])?/g;
-       var infixSpaceFunc = function(match, pre, ch, post) {
-               return ch ? (pre ? pre + " " : "") + ch + (post ? " " + post : "") : /*n+3*/ match;
-       };
-
-       var getQueryFunc = function(query, forceDOM){
-               //Normalize query. The CSS3 selectors spec allows for omitting spaces around
-               //infix operators, >, ~ and +
-               //Do the work here since detection for spaces is used as a simple "not use QSA"
-               //test below.
-               query = query.replace(infixSpaceRe, infixSpaceFunc);
-
-               if(qsaAvail){
-                       // if we've got a cached variant and we think we can do it, run it!
-                       var qsaCached = _queryFuncCacheQSA[query];
-                       if(qsaCached && !forceDOM){ return qsaCached; }
-               }
-
-               // else if we've got a DOM cached variant, assume that we already know
-               // all we need to and use it
-               var domCached = _queryFuncCacheDOM[query];
-               if(domCached){ return domCached; }
-
-               // TODO: 
-               //              today we're caching DOM and QSA branches separately so we
-               //              recalc useQSA every time. If we had a way to tag root+query
-               //              efficiently, we'd be in good shape to do a global cache.
-
-               var qcz = query.charAt(0);
-               var nospace = (-1 == query.indexOf(" "));
-
-               // byId searches are wicked fast compared to QSA, even when filtering
-               // is required
-               if( (query.indexOf("#") >= 0) && (nospace) ){
-                       forceDOM = true;
-               }
-
-               var useQSA = ( 
-                       qsaAvail && (!forceDOM) &&
-                       // as per CSS 3, we can't currently start w/ combinator:
-                       //              http://www.w3.org/TR/css3-selectors/#w3cselgrammar
-                       (specials.indexOf(qcz) == -1) && 
-                       // IE's QSA impl sucks on pseudos
-                       (!d.isIE || (query.indexOf(":") == -1)) &&
-
-                       (!(cssCaseBug && (query.indexOf(".") >= 0))) &&
-
-                       // FIXME:
-                       //              need to tighten up browser rules on ":contains" and "|=" to
-                       //              figure out which aren't good
-                       //              Latest webkit (around 531.21.8) does not seem to do well with :checked on option
-                       //              elements, even though according to spec, selected options should
-                       //              match :checked. So go nonQSA for it:
-                       //              http://bugs.dojotoolkit.org/ticket/5179
-                       (query.indexOf(":contains") == -1) && (query.indexOf(":checked") == -1) && 
-                       (query.indexOf("|=") == -1) // some browsers don't grok it
-               );
-
-               // TODO: 
-               //              if we've got a descendant query (e.g., "> .thinger" instead of
-               //              just ".thinger") in a QSA-able doc, but are passed a child as a
-               //              root, it should be possible to give the item a synthetic ID and
-               //              trivially rewrite the query to the form "#synid > .thinger" to
-               //              use the QSA branch
-
-
-               if(useQSA){
-                       var tq = (specials.indexOf(query.charAt(query.length-1)) >= 0) ? 
-                                               (query + " *") : query;
-                       return _queryFuncCacheQSA[query] = function(root){
-                               try{
-                                       // the QSA system contains an egregious spec bug which
-                                       // limits us, effectively, to only running QSA queries over
-                                       // entire documents.  See:
-                                       //              http://ejohn.org/blog/thoughts-on-queryselectorall/
-                                       //      despite this, we can also handle QSA runs on simple
-                                       //      selectors, but we don't want detection to be expensive
-                                       //      so we're just checking for the presence of a space char
-                                       //      right now. Not elegant, but it's cheaper than running
-                                       //      the query parser when we might not need to
-                                       if(!((9 == root.nodeType) || nospace)){ throw ""; }
-                                       var r = root[qsa](tq);
-                                       // skip expensive duplication checks and just wrap in a NodeList
-                                       r[noZip] = true;
-                                       return r;
-                               }catch(e){
-                                       // else run the DOM branch on this query, ensuring that we
-                                       // default that way in the future
-                                       return getQueryFunc(query, true)(root);
-                               }
-                       }
-               }else{
-                       // DOM branch
-                       var parts = query.split(/\s*,\s*/);
-                       return _queryFuncCacheDOM[query] = ((parts.length < 2) ? 
-                               // if not a compound query (e.g., ".foo, .bar"), cache and return a dispatcher
-                               getStepQueryFunc(query) : 
-                               // if it *is* a complex query, break it up into its
-                               // constituent parts and return a dispatcher that will
-                               // merge the parts when run
-                               function(root){
-                                       var pindex = 0, // avoid array alloc for every invocation
-                                               ret = [],
-                                               tp;
-                                       while((tp = parts[pindex++])){
-                                               ret = ret.concat(getStepQueryFunc(tp)(root));
-                                       }
-                                       return ret;
-                               }
-                       );
-               }
-       };
-
-       var _zipIdx = 0;
-
-       // NOTE:
-       //              this function is Moo inspired, but our own impl to deal correctly
-       //              with XML in IE
-       var _nodeUID = d.isIE ? function(node){
-               if(caseSensitive){
-                       // XML docs don't have uniqueID on their nodes
-                       return (node.getAttribute("_uid") || node.setAttribute("_uid", ++_zipIdx) || _zipIdx);
-
-               }else{
-                       return node.uniqueID;
-               }
-       } : 
-       function(node){
-               return (node._uid || (node._uid = ++_zipIdx));
-       };
-
-       // determine if a node in is unique in a "bag". In this case we don't want
-       // to flatten a list of unique items, but rather just tell if the item in
-       // question is already in the bag. Normally we'd just use hash lookup to do
-       // this for us but IE's DOM is busted so we can't really count on that. On
-       // the upside, it gives us a built in unique ID function. 
-       var _isUnique = function(node, bag){
-               if(!bag){ return 1; }
-               var id = _nodeUID(node);
-               if(!bag[id]){ return bag[id] = 1; }
-               return 0;
-       };
-
-       // attempt to efficiently determine if an item in a list is a dupe,
-       // returning a list of "uniques", hopefully in doucment order
-       var _zipIdxName = "_zipIdx";
-       var _zip = function(arr){
-               if(arr && arr.nozip){ 
-                       return (qlc._wrap) ? qlc._wrap(arr) : arr;
-               }
-               // var ret = new d._NodeListCtor();
-               var ret = new qlc();
-               if(!arr || !arr.length){ return ret; }
-               if(arr[0]){
-                       ret.push(arr[0]);
-               }
-               if(arr.length < 2){ return ret; }
-
-               _zipIdx++;
-               
-               // we have to fork here for IE and XML docs because we can't set
-               // expandos on their nodes (apparently). *sigh*
-               if(d.isIE && caseSensitive){
-                       var szidx = _zipIdx+"";
-                       arr[0].setAttribute(_zipIdxName, szidx);
-                       for(var x = 1, te; te = arr[x]; x++){
-                               if(arr[x].getAttribute(_zipIdxName) != szidx){ 
-                                       ret.push(te);
-                               }
-                               te.setAttribute(_zipIdxName, szidx);
-                       }
-               }else if(d.isIE && arr.commentStrip){
-                       try{
-                               for(var x = 1, te; te = arr[x]; x++){
-                                       if(_isElement(te)){ 
-                                               ret.push(te);
-                                       }
-                               }
-                       }catch(e){ /* squelch */ }
-               }else{
-                       if(arr[0]){ arr[0][_zipIdxName] = _zipIdx; }
-                       for(var x = 1, te; te = arr[x]; x++){
-                               if(arr[x][_zipIdxName] != _zipIdx){ 
-                                       ret.push(te);
-                               }
-                               te[_zipIdxName] = _zipIdx;
-                       }
-               }
-               return ret;
-       };
-
-       // the main executor
-       d.query = function(/*String*/ query, /*String|DOMNode?*/ root){
-               //      summary:
-               //              Returns nodes which match the given CSS3 selector, searching the
-               //              entire document by default but optionally taking a node to scope
-               //              the search by. Returns an instance of dojo.NodeList.
-               //      description:
-               //              dojo.query() is the swiss army knife of DOM node manipulation in
-               //              Dojo. Much like Prototype's "$$" (bling-bling) function or JQuery's
-               //              "$" function, dojo.query provides robust, high-performance
-               //              CSS-based node selector support with the option of scoping searches
-               //              to a particular sub-tree of a document.
-               //
-               //              Supported Selectors:
-               //              --------------------
-               //
-               //              dojo.query() supports a rich set of CSS3 selectors, including:
-               //
-               //                      * class selectors (e.g., `.foo`)
-               //                      * node type selectors like `span`
-               //                      * ` ` descendant selectors
-               //                      * `>` child element selectors 
-               //                      * `#foo` style ID selectors
-               //                      * `*` universal selector
-               //                      * `~`, the immediately preceeded-by sibling selector
-               //                      * `+`, the preceeded-by sibling selector
-               //                      * attribute queries:
-               //                      |       * `[foo]` attribute presence selector
-               //                      |       * `[foo='bar']` attribute value exact match
-               //                      |       * `[foo~='bar']` attribute value list item match
-               //                      |       * `[foo^='bar']` attribute start match
-               //                      |       * `[foo$='bar']` attribute end match
-               //                      |       * `[foo*='bar']` attribute substring match
-               //                      * `:first-child`, `:last-child`, and `:only-child` positional selectors
-               //                      * `:empty` content emtpy selector
-               //                      * `:checked` pseudo selector
-               //                      * `:nth-child(n)`, `:nth-child(2n+1)` style positional calculations
-               //                      * `:nth-child(even)`, `:nth-child(odd)` positional selectors
-               //                      * `:not(...)` negation pseudo selectors
-               //
-               //              Any legal combination of these selectors will work with
-               //              `dojo.query()`, including compound selectors ("," delimited).
-               //              Very complex and useful searches can be constructed with this
-               //              palette of selectors and when combined with functions for
-               //              manipulation presented by dojo.NodeList, many types of DOM
-               //              manipulation operations become very straightforward.
-               //              
-               //              Unsupported Selectors:
-               //              ----------------------
-               //
-               //              While dojo.query handles many CSS3 selectors, some fall outside of
-               //              what's resaonable for a programmatic node querying engine to
-               //              handle. Currently unsupported selectors include:
-               //              
-               //                      * namespace-differentiated selectors of any form
-               //                      * all `::` pseduo-element selectors
-               //                      * certain pseduo-selectors which don't get a lot of day-to-day use:
-               //                      |       * `:root`, `:lang()`, `:target`, `:focus`
-               //                      * all visual and state selectors:
-               //                      |       * `:root`, `:active`, `:hover`, `:visisted`, `:link`,
-               //                                `:enabled`, `:disabled`
-               //                      * `:*-of-type` pseudo selectors
-               //              
-               //              dojo.query and XML Documents:
-               //              -----------------------------
-               //              
-               //              `dojo.query` (as of dojo 1.2) supports searching XML documents
-               //              in a case-sensitive manner. If an HTML document is served with
-               //              a doctype that forces case-sensitivity (e.g., XHTML 1.1
-               //              Strict), dojo.query() will detect this and "do the right
-               //              thing". Case sensitivity is dependent upon the document being
-               //              searched and not the query used. It is therefore possible to
-               //              use case-sensitive queries on strict sub-documents (iframes,
-               //              etc.) or XML documents while still assuming case-insensitivity
-               //              for a host/root document.
-               //
-               //              Non-selector Queries:
-               //              ---------------------
-               //
-               //              If something other than a String is passed for the query,
-               //              `dojo.query` will return a new `dojo.NodeList` instance
-               //              constructed from that parameter alone and all further
-               //              processing will stop. This means that if you have a reference
-               //              to a node or NodeList, you can quickly construct a new NodeList
-               //              from the original by calling `dojo.query(node)` or
-               //              `dojo.query(list)`.
-               //
-               //      query:
-               //              The CSS3 expression to match against. For details on the syntax of
-               //              CSS3 selectors, see <http://www.w3.org/TR/css3-selectors/#selectors>
-               //      root:
-               //              A DOMNode (or node id) to scope the search from. Optional.
-               //      returns: dojo.NodeList
-               //              An instance of `dojo.NodeList`. Many methods are available on
-               //              NodeLists for searching, iterating, manipulating, and handling
-               //              events on the matched nodes in the returned list.
-               //      example:
-               //              search the entire document for elements with the class "foo":
-               //      |       dojo.query(".foo");
-               //              these elements will match:
-               //      |       <span class="foo"></span>
-               //      |       <span class="foo bar"></span>
-               //      |       <p class="thud foo"></p>
-               //      example:
-               //              search the entire document for elements with the classes "foo" *and* "bar":
-               //      |       dojo.query(".foo.bar");
-               //              these elements will match:
-               //      |       <span class="foo bar"></span>
-               //              while these will not:
-               //      |       <span class="foo"></span>
-               //      |       <p class="thud foo"></p>
-               //      example:
-               //              find `<span>` elements which are descendants of paragraphs and
-               //              which have a "highlighted" class:
-               //      |       dojo.query("p span.highlighted");
-               //              the innermost span in this fragment matches:
-               //      |       <p class="foo">
-               //      |               <span>...
-               //      |                       <span class="highlighted foo bar">...</span>
-               //      |               </span>
-               //      |       </p>
-               //      example:
-               //              set an "odd" class on all odd table rows inside of the table
-               //              `#tabular_data`, using the `>` (direct child) selector to avoid
-               //              affecting any nested tables:
-               //      |       dojo.query("#tabular_data > tbody > tr:nth-child(odd)").addClass("odd");
-               //      example:
-               //              remove all elements with the class "error" from the document
-               //              and store them in a list:
-               //      |       var errors = dojo.query(".error").orphan();
-               //      example:
-               //              add an onclick handler to every submit button in the document
-               //              which causes the form to be sent via Ajax instead:
-               //      |       dojo.query("input[type='submit']").onclick(function(e){
-               //      |               dojo.stopEvent(e); // prevent sending the form
-               //      |               var btn = e.target;
-               //      |               dojo.xhrPost({
-               //      |                       form: btn.form,
-               //      |                       load: function(data){
-               //      |                               // replace the form with the response
-               //      |                               var div = dojo.doc.createElement("div");
-               //      |                               dojo.place(div, btn.form, "after");
-               //      |                               div.innerHTML = data;
-               //      |                               dojo.style(btn.form, "display", "none");
-               //      |                       }
-               //      |               });
-               //      |       });
-
-               //Set list constructor to desired value. This can change
-               //between calls, so always re-assign here.
-               qlc = d._NodeListCtor;
-
-               if(!query){
-                       return new qlc();
-               }
-
-               if(query.constructor == qlc){
-                       return query;
-               }
-               if(typeof query != "string"){ // inline'd type check
-                       return new qlc(query); // dojo.NodeList
-               }
-               if(typeof root == "string"){ // inline'd type check
-                       root = d.byId(root);
-                       if(!root){ return new qlc(); }
-               }
-
-               root = root||getDoc();
-               var od = root.ownerDocument||root.documentElement;
-
-               // throw the big case sensitivity switch
-
-               // NOTE:
-               //              Opera in XHTML mode doesn't detect case-sensitivity correctly
-               //              and it's not clear that there's any way to test for it
-               caseSensitive = (root.contentType && root.contentType=="application/xml") || 
-                                               (d.isOpera && (root.doctype || od.toString() == "[object XMLDocument]")) ||
-                                               (!!od) && 
-                                               (d.isIE ? od.xml : (root.xmlVersion||od.xmlVersion));
-
-               // NOTE: 
-               //              adding "true" as the 2nd argument to getQueryFunc is useful for
-               //              testing the DOM branch without worrying about the
-               //              behavior/performance of the QSA branch.
-               var r = getQueryFunc(query)(root);
-
-               // FIXME:
-               //              need to investigate this branch WRT #8074 and #8075
-               if(r && r.nozip && !qlc._wrap){
-                       return r;
-               }
-               return _zip(r); // dojo.NodeList
-       }
-
-       // FIXME: need to add infrastructure for post-filtering pseudos, ala :last
-       d.query.pseudos = pseudos;
-
-       // one-off function for filtering a NodeList based on a simple selector
-       d._filterQueryResult = function(nodeList, simpleFilter){
-               var tmpNodeList = new d._NodeListCtor();
-               var filterFunc = getSimpleFilterFunc(getQueryParts(simpleFilter)[0]);
-               for(var x = 0, te; te = nodeList[x]; x++){
-                       if(filterFunc(te)){ tmpNodeList.push(te); }
-               }
-               return tmpNodeList;
-       }
-})(this["queryPortability"]||this["acme"]||dojo);
-
-/*
-*/
-
-}
-
-if(!dojo._hasResource["dojo._base.xhr"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.xhr"] = true;
-dojo.provide("dojo._base.xhr");
-
-
-
-
-
-(function(){
-       var _d = dojo, cfg = _d.config;
-
-       function setValue(/*Object*/obj, /*String*/name, /*String*/value){
-               //summary:
-               //              For the named property in object, set the value. If a value
-               //              already exists and it is a string, convert the value to be an
-               //              array of values.
-
-               //Skip it if there is no value
-               if(value === null){
-                       return;
-               }
-
-               var val = obj[name];
-               if(typeof val == "string"){ // inline'd type check
-                       obj[name] = [val, value];
-               }else if(_d.isArray(val)){
-                       val.push(value);
-               }else{
-                       obj[name] = value;
-               }
-       }
-       
-       dojo.fieldToObject = function(/*DOMNode||String*/ inputNode){
-               // summary:
-               //              Serialize a form field to a JavaScript object.
-               //
-               // description:
-               //              Returns the value encoded in a form field as
-               //              as a string or an array of strings. Disabled form elements
-               //              and unchecked radio and checkboxes are skipped. Multi-select
-               //              elements are returned as an array of string values.
-               var ret = null;
-               var item = _d.byId(inputNode);
-               if(item){
-                       var _in = item.name;
-                       var type = (item.type||"").toLowerCase();
-                       if(_in && type && !item.disabled){
-                               if(type == "radio" || type == "checkbox"){
-                                       if(item.checked){ ret = item.value }
-                               }else if(item.multiple){
-                                       ret = [];
-                                       _d.query("option", item).forEach(function(opt){
-                                               if(opt.selected){
-                                                       ret.push(opt.value);
-                                               }
-                                       });
-                               }else{
-                                       ret = item.value;
-                               }
-                       }
-               }
-               return ret; // Object
-       }
-
-       dojo.formToObject = function(/*DOMNode||String*/ formNode){
-               // summary:
-               //              Serialize a form node to a JavaScript object.
-               // description:
-               //              Returns the values encoded in an HTML form as
-               //              string properties in an object which it then returns. Disabled form
-               //              elements, buttons, and other non-value form elements are skipped.
-               //              Multi-select elements are returned as an array of string values.
-               //
-               // example:
-               //              This form:
-               //              |       <form id="test_form">
-               //              |               <input type="text" name="blah" value="blah">
-               //              |               <input type="text" name="no_value" value="blah" disabled>
-               //              |               <input type="button" name="no_value2" value="blah">
-               //              |               <select type="select" multiple name="multi" size="5">
-               //              |                       <option value="blah">blah</option>
-               //              |                       <option value="thud" selected>thud</option>
-               //              |                       <option value="thonk" selected>thonk</option>
-               //              |               </select>
-               //              |       </form>
-               //
-               //              yields this object structure as the result of a call to
-               //              formToObject():
-               //
-               //              |       { 
-               //              |               blah: "blah",
-               //              |               multi: [
-               //              |                       "thud",
-               //              |                       "thonk"
-               //              |               ]
-               //              |       };
-
-               var ret = {};
-               var exclude = "file|submit|image|reset|button|";
-               _d.forEach(dojo.byId(formNode).elements, function(item){
-                       var _in = item.name;
-                       var type = (item.type||"").toLowerCase();
-                       if(_in && type && exclude.indexOf(type) == -1 && !item.disabled){
-                               setValue(ret, _in, _d.fieldToObject(item));
-                               if(type == "image"){
-                                       ret[_in+".x"] = ret[_in+".y"] = ret[_in].x = ret[_in].y = 0;
-                               }
-                       }
-               });
-               return ret; // Object
-       }
-
-       dojo.objectToQuery = function(/*Object*/ map){
-               //      summary:
-               //              takes a name/value mapping object and returns a string representing
-               //              a URL-encoded version of that object.
-               //      example:
-               //              this object:
-               //
-               //              |       { 
-               //              |               blah: "blah",
-               //              |               multi: [
-               //              |                       "thud",
-               //              |                       "thonk"
-               //              |               ]
-               //              |       };
-               //
-               //      yields the following query string:
-               //      
-               //      |       "blah=blah&multi=thud&multi=thonk"
-
-               // FIXME: need to implement encodeAscii!!
-               var enc = encodeURIComponent;
-               var pairs = [];
-               var backstop = {};
-               for(var name in map){
-                       var value = map[name];
-                       if(value != backstop[name]){
-                               var assign = enc(name) + "=";
-                               if(_d.isArray(value)){
-                                       for(var i=0; i < value.length; i++){
-                                               pairs.push(assign + enc(value[i]));
-                                       }
-                               }else{
-                                       pairs.push(assign + enc(value));
-                               }
-                       }
-               }
-               return pairs.join("&"); // String
-       }
-
-       dojo.formToQuery = function(/*DOMNode||String*/ formNode){
-               // summary:
-               //              Returns a URL-encoded string representing the form passed as either a
-               //              node or string ID identifying the form to serialize
-               return _d.objectToQuery(_d.formToObject(formNode)); // String
-       }
-
-       dojo.formToJson = function(/*DOMNode||String*/ formNode, /*Boolean?*/prettyPrint){
-               // summary:
-               //              Create a serialized JSON string from a form node or string
-               //              ID identifying the form to serialize
-               return _d.toJson(_d.formToObject(formNode), prettyPrint); // String
-       }
-
-       dojo.queryToObject = function(/*String*/ str){
-               // summary:
-               //              Create an object representing a de-serialized query section of a
-               //              URL. Query keys with multiple values are returned in an array.
-               //
-               // example:
-               //              This string:
-               //
-               //      |               "foo=bar&foo=baz&thinger=%20spaces%20=blah&zonk=blarg&"
-               //              
-               //              results in this object structure:
-               //
-               //      |               {
-               //      |                       foo: [ "bar", "baz" ],
-               //      |                       thinger: " spaces =blah",
-               //      |                       zonk: "blarg"
-               //      |               }
-               //      
-               //              Note that spaces and other urlencoded entities are correctly
-               //              handled.
-
-               // FIXME: should we grab the URL string if we're not passed one?
-               var ret = {};
-               var qp = str.split("&");
-               var dec = decodeURIComponent;
-               _d.forEach(qp, function(item){
-                       if(item.length){
-                               var parts = item.split("=");
-                               var name = dec(parts.shift());
-                               var val = dec(parts.join("="));
-                               if(typeof ret[name] == "string"){ // inline'd type check
-                                       ret[name] = [ret[name]];
-                               }
-
-                               if(_d.isArray(ret[name])){
-                                       ret[name].push(val);
-                               }else{
-                                       ret[name] = val;
-                               }
-                       }
-               });
-               return ret; // Object
-       }
-
-       // need to block async callbacks from snatching this thread as the result
-       // of an async callback might call another sync XHR, this hangs khtml forever
-       // must checked by watchInFlight()
-
-       dojo._blockAsync = false;
-
-       // MOW: remove dojo._contentHandlers alias in 2.0
-       var handlers = _d._contentHandlers = dojo.contentHandlers = {
-               // summary: 
-               //              A map of availble XHR transport handle types. Name matches the
-               //              `handleAs` attribute passed to XHR calls.
-               //
-               // description:
-               //              A map of availble XHR transport handle types. Name matches the
-               //              `handleAs` attribute passed to XHR calls. Each contentHandler is
-               //              called, passing the xhr object for manipulation. The return value
-               //              from the contentHandler will be passed to the `load` or `handle` 
-               //              functions defined in the original xhr call. 
-               //              
-               // example:
-               //              Creating a custom content-handler:
-               //      |       dojo.contentHandlers.makeCaps = function(xhr){
-               //      |               return xhr.responseText.toUpperCase();
-               //      |       }
-               //      |       // and later:
-               //      |       dojo.xhrGet({ 
-               //      |               url:"foo.txt",
-               //      |               handleAs:"makeCaps",
-               //      |               load: function(data){ /* data is a toUpper version of foo.txt */ }
-               //      |       });
-
-               text: function(xhr){ 
-                       // summary: A contentHandler which simply returns the plaintext response data
-                       return xhr.responseText; 
-               },
-               json: function(xhr){
-                       // summary: A contentHandler which returns a JavaScript object created from the response data
-                       return _d.fromJson(xhr.responseText || null);
-               },
-               "json-comment-filtered": function(xhr){ 
-                       // summary: A contentHandler which expects comment-filtered JSON. 
-                       // description: 
-                       //              A contentHandler which expects comment-filtered JSON. 
-                       //              the json-comment-filtered option was implemented to prevent
-                       //              "JavaScript Hijacking", but it is less secure than standard JSON. Use
-                       //              standard JSON instead. JSON prefixing can be used to subvert hijacking.
-                       //              
-                       //              Will throw a notice suggesting to use application/json mimetype, as
-                       //              json-commenting can introduce security issues. To decrease the chances of hijacking,
-                       //              use the standard `json` contentHandler, and prefix your "JSON" with: {}&& 
-                       //              
-                       //              use djConfig.useCommentedJson = true to turn off the notice
-                       if(!dojo.config.useCommentedJson){
-                               console.warn("Consider using the standard mimetype:application/json."
-                                       + " json-commenting can introduce security issues. To"
-                                       + " decrease the chances of hijacking, use the standard the 'json' handler and"
-                                       + " prefix your json with: {}&&\n"
-                                       + "Use djConfig.useCommentedJson=true to turn off this message.");
-                       }
-
-                       var value = xhr.responseText;
-                       var cStartIdx = value.indexOf("\/*");
-                       var cEndIdx = value.lastIndexOf("*\/");
-                       if(cStartIdx == -1 || cEndIdx == -1){
-                               throw new Error("JSON was not comment filtered");
-                       }
-                       return _d.fromJson(value.substring(cStartIdx+2, cEndIdx));
-               },
-               javascript: function(xhr){ 
-                       // summary: A contentHandler which evaluates the response data, expecting it to be valid JavaScript
-
-                       // FIXME: try Moz and IE specific eval variants?
-                       return _d.eval(xhr.responseText);
-               },
-               xml: function(xhr){
-                       // summary: A contentHandler returning an XML Document parsed from the response data
-                       var result = xhr.responseXML;
-                                               if(_d.isIE && (!result || !result.documentElement)){
-                               //WARNING: this branch used by the xml handling in dojo.io.iframe,
-                               //so be sure to test dojo.io.iframe if making changes below.
-                               var ms = function(n){ return "MSXML" + n + ".DOMDocument"; }
-                               var dp = ["Microsoft.XMLDOM", ms(6), ms(4), ms(3), ms(2)];
-                               _d.some(dp, function(p){
-                                       try{
-                                               var dom = new ActiveXObject(p);
-                                               dom.async = false;
-                                               dom.loadXML(xhr.responseText);
-                                               result = dom;
-                                       }catch(e){ return false; }
-                                       return true;
-                               });
-                       }
-                                               return result; // DOMDocument
-               },
-               "json-comment-optional": function(xhr){
-                       // summary: A contentHandler which checks the presence of comment-filtered JSON and 
-                       //              alternates between the `json` and `json-comment-filtered` contentHandlers.
-                       if(xhr.responseText && /^[^{\[]*\/\*/.test(xhr.responseText)){
-                               return handlers["json-comment-filtered"](xhr);
-                       }else{
-                               return handlers["json"](xhr);
-                       }
-               }
-       };
-
-       /*=====
-       dojo.__IoArgs = function(){
-               //      url: String
-               //              URL to server endpoint.
-               //      content: Object?
-               //              Contains properties with string values. These
-               //              properties will be serialized as name1=value2 and
-               //              passed in the request.
-               //      timeout: Integer?
-               //              Milliseconds to wait for the response. If this time
-               //              passes, the then error callbacks are called.
-               //      form: DOMNode?
-               //              DOM node for a form. Used to extract the form values
-               //              and send to the server.
-               //      preventCache: Boolean?
-               //              Default is false. If true, then a
-               //              "dojo.preventCache" parameter is sent in the request
-               //              with a value that changes with each request
-               //              (timestamp). Useful only with GET-type requests.
-               //      handleAs: String?
-               //              Acceptable values depend on the type of IO
-               //              transport (see specific IO calls for more information).
-               //      rawBody: String?
-               //              Sets the raw body for an HTTP request. If this is used, then the content
-               //              property is ignored. This is mostly useful for HTTP methods that have
-               //              a body to their requests, like PUT or POST. This property can be used instead
-               //              of postData and putData for dojo.rawXhrPost and dojo.rawXhrPut respectively.
-               //      ioPublish: Boolean?
-               //              Set this explicitly to false to prevent publishing of topics related to
-               //              IO operations. Otherwise, if djConfig.ioPublish is set to true, topics
-               //              will be published via dojo.publish for different phases of an IO operation.
-               //              See dojo.__IoPublish for a list of topics that are published.
-               //      load: Function?
-               //              This function will be
-               //              called on a successful HTTP response code.
-               //      error: Function?
-               //              This function will
-               //              be called when the request fails due to a network or server error, the url
-               //              is invalid, etc. It will also be called if the load or handle callback throws an
-               //              exception, unless djConfig.debugAtAllCosts is true.  This allows deployed applications
-               //              to continue to run even when a logic error happens in the callback, while making
-               //              it easier to troubleshoot while in debug mode.
-               //      handle: Function?
-               //              This function will
-               //              be called at the end of every request, whether or not an error occurs.
-               this.url = url;
-               this.content = content;
-               this.timeout = timeout;
-               this.form = form;
-               this.preventCache = preventCache;
-               this.handleAs = handleAs;
-               this.ioPublish = ioPublish;
-               this.load = function(response, ioArgs){
-                       // ioArgs: dojo.__IoCallbackArgs
-                       //              Provides additional information about the request.
-                       // response: Object
-                       //              The response in the format as defined with handleAs.
-               }
-               this.error = function(response, ioArgs){
-                       // ioArgs: dojo.__IoCallbackArgs
-                       //              Provides additional information about the request.
-                       // response: Object
-                       //              The response in the format as defined with handleAs.
-               }
-               this.handle = function(loadOrError, response, ioArgs){
-                       // loadOrError: String
-                       //              Provides a string that tells you whether this function
-                       //              was called because of success (load) or failure (error).
-                       // response: Object
-                       //              The response in the format as defined with handleAs.
-                       // ioArgs: dojo.__IoCallbackArgs
-                       //              Provides additional information about the request.
-               }
-       }
-       =====*/
-
-       /*=====
-       dojo.__IoCallbackArgs = function(args, xhr, url, query, handleAs, id, canDelete, json){
-               //      args: Object
-               //              the original object argument to the IO call.
-               //      xhr: XMLHttpRequest
-               //              For XMLHttpRequest calls only, the
-               //              XMLHttpRequest object that was used for the
-               //              request.
-               //      url: String
-               //              The final URL used for the call. Many times it
-               //              will be different than the original args.url
-               //              value.
-               //      query: String
-               //              For non-GET requests, the
-               //              name1=value1&name2=value2 parameters sent up in
-               //              the request.
-               //      handleAs: String
-               //              The final indicator on how the response will be
-               //              handled.
-               //      id: String
-               //              For dojo.io.script calls only, the internal
-               //              script ID used for the request.
-               //      canDelete: Boolean
-               //              For dojo.io.script calls only, indicates
-               //              whether the script tag that represents the
-               //              request can be deleted after callbacks have
-               //              been called. Used internally to know when
-               //              cleanup can happen on JSONP-type requests.
-               //      json: Object
-               //              For dojo.io.script calls only: holds the JSON
-               //              response for JSONP-type requests. Used
-               //              internally to hold on to the JSON responses.
-               //              You should not need to access it directly --
-               //              the same object should be passed to the success
-               //              callbacks directly.
-               this.args = args;
-               this.xhr = xhr;
-               this.url = url;
-               this.query = query;
-               this.handleAs = handleAs;
-               this.id = id;
-               this.canDelete = canDelete;
-               this.json = json;
-       }
-       =====*/
-
-
-       /*=====
-       dojo.__IoPublish = function(){
-               //      summary:
-               //              This is a list of IO topics that can be published
-               //              if djConfig.ioPublish is set to true. IO topics can be
-               //              published for any Input/Output, network operation. So,
-               //              dojo.xhr, dojo.io.script and dojo.io.iframe can all
-               //              trigger these topics to be published.
-               //      start: String
-               //              "/dojo/io/start" is sent when there are no outstanding IO
-               //              requests, and a new IO request is started. No arguments
-               //              are passed with this topic.
-               //      send: String
-               //              "/dojo/io/send" is sent whenever a new IO request is started.
-               //              It passes the dojo.Deferred for the request with the topic.
-               //      load: String
-               //              "/dojo/io/load" is sent whenever an IO request has loaded
-               //              successfully. It passes the response and the dojo.Deferred
-               //              for the request with the topic.
-               //      error: String
-               //              "/dojo/io/error" is sent whenever an IO request has errored.
-               //              It passes the error and the dojo.Deferred
-               //              for the request with the topic.
-               //      done: String
-               //              "/dojo/io/done" is sent whenever an IO request has completed,
-               //              either by loading or by erroring. It passes the error and
-               //              the dojo.Deferred for the request with the topic.
-               //      stop: String
-               //              "/dojo/io/stop" is sent when all outstanding IO requests have
-               //              finished. No arguments are passed with this topic.
-               this.start = "/dojo/io/start";
-               this.send = "/dojo/io/send";
-               this.load = "/dojo/io/load";
-               this.error = "/dojo/io/error";
-               this.done = "/dojo/io/done";
-               this.stop = "/dojo/io/stop";
-       }
-       =====*/
-
-
-       dojo._ioSetArgs = function(/*dojo.__IoArgs*/args,
-                       /*Function*/canceller,
-                       /*Function*/okHandler,
-                       /*Function*/errHandler){
-               //      summary: 
-               //              sets up the Deferred and ioArgs property on the Deferred so it
-               //              can be used in an io call.
-               //      args:
-               //              The args object passed into the public io call. Recognized properties on
-               //              the args object are:
-               //      canceller:
-               //              The canceller function used for the Deferred object. The function
-               //              will receive one argument, the Deferred object that is related to the
-               //              canceller.
-               //      okHandler:
-               //              The first OK callback to be registered with Deferred. It has the opportunity
-               //              to transform the OK response. It will receive one argument -- the Deferred
-               //              object returned from this function.
-               //      errHandler:
-               //              The first error callback to be registered with Deferred. It has the opportunity
-               //              to do cleanup on an error. It will receive two arguments: error (the 
-               //              Error object) and dfd, the Deferred object returned from this function.
-
-               var ioArgs = {args: args, url: args.url};
-
-               //Get values from form if requestd.
-               var formObject = null;
-               if(args.form){ 
-                       var form = _d.byId(args.form);
-                       //IE requires going through getAttributeNode instead of just getAttribute in some form cases, 
-                       //so use it for all.  See #2844
-                       var actnNode = form.getAttributeNode("action");
-                       ioArgs.url = ioArgs.url || (actnNode ? actnNode.value : null); 
-                       formObject = _d.formToObject(form);
-               }
-
-               // set up the query params
-               var miArgs = [{}];
-       
-               if(formObject){
-                       // potentially over-ride url-provided params w/ form values
-                       miArgs.push(formObject);
-               }
-               if(args.content){
-                       // stuff in content over-rides what's set by form
-                       miArgs.push(args.content);
-               }
-               if(args.preventCache){
-                       miArgs.push({"dojo.preventCache": new Date().valueOf()});
-               }
-               ioArgs.query = _d.objectToQuery(_d.mixin.apply(null, miArgs));
-       
-               // .. and the real work of getting the deferred in order, etc.
-               ioArgs.handleAs = args.handleAs || "text";
-               var d = new _d.Deferred(canceller);
-               d.addCallbacks(okHandler, function(error){
-                       return errHandler(error, d);
-               });
-
-               //Support specifying load, error and handle callback functions from the args.
-               //For those callbacks, the "this" object will be the args object.
-               //The callbacks will get the deferred result value as the
-               //first argument and the ioArgs object as the second argument.
-               var ld = args.load;
-               if(ld && _d.isFunction(ld)){
-                       d.addCallback(function(value){
-                               return ld.call(args, value, ioArgs);
-                       });
-               }
-               var err = args.error;
-               if(err && _d.isFunction(err)){
-                       d.addErrback(function(value){
-                               return err.call(args, value, ioArgs);
-                       });
-               }
-               var handle = args.handle;
-               if(handle && _d.isFunction(handle)){
-                       d.addBoth(function(value){
-                               return handle.call(args, value, ioArgs);
-                       });
-               }
-
-               //Plug in topic publishing, if dojo.publish is loaded.
-               if(cfg.ioPublish && _d.publish && ioArgs.args.ioPublish !== false){
-                       d.addCallbacks(
-                               function(res){
-                                       _d.publish("/dojo/io/load", [d, res]);
-                                       return res;
-                               },
-                               function(res){
-                                       _d.publish("/dojo/io/error", [d, res]);
-                                       return res;
-                               }
-                       );
-                       d.addBoth(function(res){
-                               _d.publish("/dojo/io/done", [d, res]);
-                               return res;
-                       });
-               }
-
-               d.ioArgs = ioArgs;
-       
-               // FIXME: need to wire up the xhr object's abort method to something
-               // analagous in the Deferred
-               return d;
-       }
-
-       var _deferredCancel = function(/*Deferred*/dfd){
-               // summary: canceller function for dojo._ioSetArgs call.
-               
-               dfd.canceled = true;
-               var xhr = dfd.ioArgs.xhr;
-               var _at = typeof xhr.abort;
-               if(_at == "function" || _at == "object" || _at == "unknown"){
-                       xhr.abort();
-               }
-               var err = dfd.ioArgs.error;
-               if(!err){
-                       err = new Error("xhr cancelled");
-                       err.dojoType="cancel";
-               }
-               return err;
-       }
-       var _deferredOk = function(/*Deferred*/dfd){
-               // summary: okHandler function for dojo._ioSetArgs call.
-
-               var ret = handlers[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);
-               return ret === undefined ? null : ret;
-       }
-       var _deferError = function(/*Error*/error, /*Deferred*/dfd){
-               // summary: errHandler function for dojo._ioSetArgs call.
-
-               if(!dfd.ioArgs.args.failOk){
-                       console.error(error);
-               }
-               return error;
-       }
-
-       // avoid setting a timer per request. It degrades performance on IE
-       // something fierece if we don't use unified loops.
-       var _inFlightIntvl = null;
-       var _inFlight = [];
-       
-       
-       //Use a separate count for knowing if we are starting/stopping io calls.
-       //Cannot use _inFlight.length since it can change at a different time than
-       //when we want to do this kind of test. We only want to decrement the count
-       //after a callback/errback has finished, since the callback/errback should be
-       //considered as part of finishing a request.
-       var _pubCount = 0;
-       var _checkPubCount = function(dfd){
-               if(_pubCount <= 0){
-                       _pubCount = 0;
-                       if(cfg.ioPublish && _d.publish && (!dfd || dfd && dfd.ioArgs.args.ioPublish !== false)){
-                               _d.publish("/dojo/io/stop");
-                       }
-               }
-       };
-
-       var _watchInFlight = function(){
-               //summary: 
-               //              internal method that checks each inflight XMLHttpRequest to see
-               //              if it has completed or if the timeout situation applies.
-               
-               var now = (new Date()).getTime();
-               // make sure sync calls stay thread safe, if this callback is called
-               // during a sync call and this results in another sync call before the
-               // first sync call ends the browser hangs
-               if(!_d._blockAsync){
-                       // we need manual loop because we often modify _inFlight (and therefore 'i') while iterating
-                       // note: the second clause is an assigment on purpose, lint may complain
-                       for(var i = 0, tif; i < _inFlight.length && (tif = _inFlight[i]); i++){
-                               var dfd = tif.dfd;
-                               var func = function(){
-                                       if(!dfd || dfd.canceled || !tif.validCheck(dfd)){
-                                               _inFlight.splice(i--, 1); 
-                                               _pubCount -= 1;
-                                       }else if(tif.ioCheck(dfd)){
-                                               _inFlight.splice(i--, 1);
-                                               tif.resHandle(dfd);
-                                               _pubCount -= 1;
-                                       }else if(dfd.startTime){
-                                               //did we timeout?
-                                               if(dfd.startTime + (dfd.ioArgs.args.timeout || 0) < now){
-                                                       _inFlight.splice(i--, 1);
-                                                       var err = new Error("timeout exceeded");
-                                                       err.dojoType = "timeout";
-                                                       dfd.errback(err);
-                                                       //Cancel the request so the io module can do appropriate cleanup.
-                                                       dfd.cancel();
-                                                       _pubCount -= 1;
-                                               }
-                                       }
-                               };
-                               if(dojo.config.debugAtAllCosts){
-                                       func.call(this);
-                               }else{
-                                       try{
-                                               func.call(this);
-                                       }catch(e){
-                                               dfd.errback(e);
-                                       }
-                               }
-                       }
-               }
-
-               _checkPubCount(dfd);
-
-               if(!_inFlight.length){
-                       clearInterval(_inFlightIntvl);
-                       _inFlightIntvl = null;
-                       return;
-               }
-       }
-
-       dojo._ioCancelAll = function(){
-               //summary: Cancels all pending IO requests, regardless of IO type
-               //(xhr, script, iframe).
-               try{
-                       _d.forEach(_inFlight, function(i){
-                               try{
-                                       i.dfd.cancel();
-                               }catch(e){/*squelch*/}
-                       });
-               }catch(e){/*squelch*/}
-       }
-
-       //Automatically call cancel all io calls on unload
-       //in IE for trac issue #2357.
-               if(_d.isIE){
-               _d.addOnWindowUnload(_d._ioCancelAll);
-       }
-       
-       _d._ioNotifyStart = function(/*Deferred*/dfd){
-               // summary:
-               //              If dojo.publish is available, publish topics
-               //              about the start of a request queue and/or the
-               //              the beginning of request.
-               // description:
-               //              Used by IO transports. An IO transport should
-               //              call this method before making the network connection.
-               if(cfg.ioPublish && _d.publish && dfd.ioArgs.args.ioPublish !== false){
-                       if(!_pubCount){
-                               _d.publish("/dojo/io/start");
-                       }
-                       _pubCount += 1;
-                       _d.publish("/dojo/io/send", [dfd]);
-               }
-       }
-
-       _d._ioWatch = function(dfd, validCheck, ioCheck, resHandle){
-               // summary: 
-               //              Watches the io request represented by dfd to see if it completes.
-               // dfd: Deferred
-               //              The Deferred object to watch.
-               // validCheck: Function
-               //              Function used to check if the IO request is still valid. Gets the dfd
-               //              object as its only argument.
-               // ioCheck: Function
-               //              Function used to check if basic IO call worked. Gets the dfd
-               //              object as its only argument.
-               // resHandle: Function
-               //              Function used to process response. Gets the dfd
-               //              object as its only argument.
-               var args = dfd.ioArgs.args;
-               if(args.timeout){
-                       dfd.startTime = (new Date()).getTime();
-               }
-               
-               _inFlight.push({dfd: dfd, validCheck: validCheck, ioCheck: ioCheck, resHandle: resHandle});
-               if(!_inFlightIntvl){
-                       _inFlightIntvl = setInterval(_watchInFlight, 50);
-               }
-               // handle sync requests
-               //A weakness: async calls in flight
-               //could have their handlers called as part of the
-               //_watchInFlight call, before the sync's callbacks
-               // are called.
-               if(args.sync){
-                       _watchInFlight();
-               }
-       }
-
-       var _defaultContentType = "application/x-www-form-urlencoded";
-
-       var _validCheck = function(/*Deferred*/dfd){
-               return dfd.ioArgs.xhr.readyState; //boolean
-       }
-       var _ioCheck = function(/*Deferred*/dfd){
-               return 4 == dfd.ioArgs.xhr.readyState; //boolean
-       }
-       var _resHandle = function(/*Deferred*/dfd){
-               var xhr = dfd.ioArgs.xhr;
-               if(_d._isDocumentOk(xhr)){
-                       dfd.callback(dfd);
-               }else{
-                       var err = new Error("Unable to load " + dfd.ioArgs.url + " status:" + xhr.status);
-                       err.status = xhr.status;
-                       err.responseText = xhr.responseText;
-                       dfd.errback(err);
-               }
-       }
-
-       dojo._ioAddQueryToUrl = function(/*dojo.__IoCallbackArgs*/ioArgs){
-               //summary: Adds query params discovered by the io deferred construction to the URL.
-               //Only use this for operations which are fundamentally GET-type operations.
-               if(ioArgs.query.length){
-                       ioArgs.url += (ioArgs.url.indexOf("?") == -1 ? "?" : "&") + ioArgs.query;
-                       ioArgs.query = null;
-               }               
-       }
-
-       /*=====
-       dojo.declare("dojo.__XhrArgs", dojo.__IoArgs, {
-               constructor: function(){
-                       //      summary:
-                       //              In addition to the properties listed for the dojo._IoArgs type,
-                       //              the following properties are allowed for dojo.xhr* methods.
-                       //      handleAs: String?
-                       //              Acceptable values are: text (default), json, json-comment-optional,
-                       //              json-comment-filtered, javascript, xml. See `dojo.contentHandlers`
-                       //      sync: Boolean?
-                       //              false is default. Indicates whether the request should
-                       //              be a synchronous (blocking) request.
-                       //      headers: Object?
-                       //              Additional HTTP headers to send in the request.
-                       //      failOk: Boolean?
-                       //              false is default. Indicates whether a request should be
-                       //              allowed to fail (and therefore no console error message in
-                       //              the event of a failure)
-                       this.handleAs = handleAs;
-                       this.sync = sync;
-                       this.headers = headers;
-                       this.failOk = failOk;
-               }
-       });
-       =====*/
-
-       dojo.xhr = function(/*String*/ method, /*dojo.__XhrArgs*/ args, /*Boolean?*/ hasBody){
-               //      summary:
-               //              Sends an HTTP request with the given method.
-               //      description:
-               //              Sends an HTTP request with the given method.
-               //              See also dojo.xhrGet(), xhrPost(), xhrPut() and dojo.xhrDelete() for shortcuts
-               //              for those HTTP methods. There are also methods for "raw" PUT and POST methods
-               //              via dojo.rawXhrPut() and dojo.rawXhrPost() respectively.
-               //      method:
-               //              HTTP method to be used, such as GET, POST, PUT, DELETE.  Should be uppercase.
-               //      hasBody:
-               //              If the request has an HTTP body, then pass true for hasBody.
-
-               //Make the Deferred object for this xhr request.
-               var dfd = _d._ioSetArgs(args, _deferredCancel, _deferredOk, _deferError);
-               var ioArgs = dfd.ioArgs;
-
-               //Pass the args to _xhrObj, to allow alternate XHR calls based specific calls, like
-               //the one used for iframe proxies.
-               var xhr = ioArgs.xhr = _d._xhrObj(ioArgs.args);
-               //If XHR factory fails, cancel the deferred.
-               if(!xhr){
-                       dfd.cancel();
-                       return dfd;
-               }
-
-               //Allow for specifying the HTTP body completely.
-               if("postData" in args){
-                       ioArgs.query = args.postData;
-               }else if("putData" in args){
-                       ioArgs.query = args.putData;
-               }else if("rawBody" in args){
-                       ioArgs.query = args.rawBody;
-               }else if((arguments.length > 2 && !hasBody) || "POST|PUT".indexOf(method.toUpperCase()) == -1){
-                       //Check for hasBody being passed. If no hasBody,
-                       //then only append query string if not a POST or PUT request.
-                       _d._ioAddQueryToUrl(ioArgs);
-               }
-
-               // IE 6 is a steaming pile. It won't let you call apply() on the native function (xhr.open).
-               // workaround for IE6's apply() "issues"
-               xhr.open(method, ioArgs.url, args.sync !== true, args.user || undefined, args.password || undefined);
-               if(args.headers){
-                       for(var hdr in args.headers){
-                               if(hdr.toLowerCase() === "content-type" && !args.contentType){
-                                       args.contentType = args.headers[hdr];
-                               }else if(args.headers[hdr]){
-                                       //Only add header if it has a value. This allows for instnace, skipping
-                                       //insertion of X-Requested-With by specifying empty value.
-                                       xhr.setRequestHeader(hdr, args.headers[hdr]);
-                               }
-                       }
-               }
-               // FIXME: is this appropriate for all content types?
-               xhr.setRequestHeader("Content-Type", args.contentType || _defaultContentType);
-               if(!args.headers || !("X-Requested-With" in args.headers)){
-                       xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
-               }
-               // FIXME: set other headers here!
-               _d._ioNotifyStart(dfd);
-               if(dojo.config.debugAtAllCosts){
-                       xhr.send(ioArgs.query);
-               }else{
-                       try{
-                               xhr.send(ioArgs.query);
-                       }catch(e){
-                               ioArgs.error = e;
-                               dfd.cancel();
-                       }
-               }
-               _d._ioWatch(dfd, _validCheck, _ioCheck, _resHandle);
-               xhr = null;
-               return dfd; // dojo.Deferred
-       }
-
-       dojo.xhrGet = function(/*dojo.__XhrArgs*/ args){
-               //      summary: 
-               //              Sends an HTTP GET request to the server.
-               return _d.xhr("GET", args); // dojo.Deferred
-       }
-
-       dojo.rawXhrPost = dojo.xhrPost = function(/*dojo.__XhrArgs*/ args){
-               //      summary:
-               //              Sends an HTTP POST request to the server. In addtion to the properties
-               //              listed for the dojo.__XhrArgs type, the following property is allowed:
-               //      postData:
-               //              String. Send raw data in the body of the POST request.
-               return _d.xhr("POST", args, true); // dojo.Deferred
-       }
-
-       dojo.rawXhrPut = dojo.xhrPut = function(/*dojo.__XhrArgs*/ args){
-               //      summary:
-               //              Sends an HTTP PUT request to the server. In addtion to the properties
-               //              listed for the dojo.__XhrArgs type, the following property is allowed:
-               //      putData:
-               //              String. Send raw data in the body of the PUT request.
-               return _d.xhr("PUT", args, true); // dojo.Deferred
-       }
-
-       dojo.xhrDelete = function(/*dojo.__XhrArgs*/ args){
-               //      summary:
-               //              Sends an HTTP DELETE request to the server.
-               return _d.xhr("DELETE", args); //dojo.Deferred
-       }
-
-       /*
-       dojo.wrapForm = function(formNode){
-               //summary:
-               //              A replacement for FormBind, but not implemented yet.
-
-               // FIXME: need to think harder about what extensions to this we might
-               // want. What should we allow folks to do w/ this? What events to
-               // set/send?
-               throw new Error("dojo.wrapForm not yet implemented");
-       }
-       */
-})();
-
-}
-
-if(!dojo._hasResource["dojo._base.fx"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.fx"] = true;
-dojo.provide("dojo._base.fx");
-
-
-
-
-
-/*
-       Animation loosely package based on Dan Pupius' work, contributed under CLA: 
-               http://pupius.co.uk/js/Toolkit.Drawing.js
-*/
-(function(){ 
-       var d = dojo;
-       var _mixin = d._mixin;
-       
-       dojo._Line = function(/*int*/ start, /*int*/ end){
-               //      summary:
-               //              dojo._Line is the object used to generate values from a start value
-               //              to an end value
-               //      start: int
-               //              Beginning value for range
-               //      end: int
-               //              Ending value for range
-               this.start = start;
-               this.end = end;
-       };
-       
-       dojo._Line.prototype.getValue = function(/*float*/ n){
-               //      summary: Returns the point on the line
-               //      n: a floating point number greater than 0 and less than 1
-               return ((this.end - this.start) * n) + this.start; // Decimal
-       };
-       
-       dojo.Animation = function(args){
-               //      summary:
-               //              A generic animation class that fires callbacks into its handlers
-               //              object at various states. 
-               //      description:
-               //              A generic animation class that fires callbacks into its handlers
-               //              object at various states. Nearly all dojo animation functions
-               //              return an instance of this method, usually without calling the
-               //              .play() method beforehand. Therefore, you will likely need to
-               //              call .play() on instances of `dojo.Animation` when one is
-               //              returned.
-               // args: Object
-               //              The 'magic argument', mixing all the properties into this
-               //              animation instance. 
-               
-               _mixin(this, args);
-               if(d.isArray(this.curve)){
-                       this.curve = new d._Line(this.curve[0], this.curve[1]);
-               }
-               
-       };
-       
-       // Alias to drop come 2.0:
-       d._Animation = d.Animation;
-       
-       d.extend(dojo.Animation, {
-               // duration: Integer
-               //              The time in milliseonds the animation will take to run
-               duration: 350,
-       
-       /*=====
-               // curve: dojo._Line|Array
-               //              A two element array of start and end values, or a `dojo._Line` instance to be
-               //              used in the Animation. 
-               curve: null,
-       
-               // easing: Function?
-               //              A Function to adjust the acceleration (or deceleration) of the progress 
-               //              across a dojo._Line
-               easing: null,
-       =====*/
-       
-               // repeat: Integer?
-               //              The number of times to loop the animation
-               repeat: 0,
-       
-               // rate: Integer?
-               //              the time in milliseconds to wait before advancing to next frame 
-               //              (used as a fps timer: 1000/rate = fps)
-               rate: 20 /* 50 fps */,
-       
-       /*===== 
-               // delay: Integer?
-               //              The time in milliseconds to wait before starting animation after it 
-               //              has been .play()'ed
-               delay: null,
-       
-               // beforeBegin: Event?
-               //              Synthetic event fired before a dojo.Animation begins playing (synchronous)
-               beforeBegin: null,
-       
-               // onBegin: Event?
-               //              Synthetic event fired as a dojo.Animation begins playing (useful?)
-               onBegin: null,
-       
-               // onAnimate: Event?
-               //              Synthetic event fired at each interval of a `dojo.Animation`
-               onAnimate: null,
-       
-               // onEnd: Event?
-               //              Synthetic event fired after the final frame of a `dojo.Animation`
-               onEnd: null,
-       
-               // onPlay: Event?
-               //              Synthetic event fired any time a `dojo.Animation` is play()'ed
-               onPlay: null,
-       
-               // onPause: Event?
-               //              Synthetic event fired when a `dojo.Animation` is paused
-               onPause: null,
-       
-               // onStop: Event
-               //              Synthetic event fires when a `dojo.Animation` is stopped
-               onStop: null,
-       
-       =====*/
-       
-               _percent: 0,
-               _startRepeatCount: 0,
-
-               _getStep: function(){
-                       var _p = this._percent,
-                               _e = this.easing
-                       ;
-                       return _e ? _e(_p) : _p;
-               },
-               _fire: function(/*Event*/ evt, /*Array?*/ args){
-                       //      summary:
-                       //              Convenience function.  Fire event "evt" and pass it the
-                       //              arguments specified in "args".
-                       //      description:
-                       //              Convenience function.  Fire event "evt" and pass it the
-                       //              arguments specified in "args".
-                       //              Fires the callback in the scope of the `dojo.Animation` 
-                       //              instance.
-                       //      evt:
-                       //              The event to fire.
-                       //      args:
-                       //              The arguments to pass to the event.
-                       var a = args||[];
-                       if(this[evt]){
-                               if(d.config.debugAtAllCosts){
-                                       this[evt].apply(this, a);
-                               }else{
-                                       try{
-                                               this[evt].apply(this, a);
-                                       }catch(e){
-                                               // squelch and log because we shouldn't allow exceptions in
-                                               // synthetic event handlers to cause the internal timer to run
-                                               // amuck, potentially pegging the CPU. I'm not a fan of this
-                                               // squelch, but hopefully logging will make it clear what's
-                                               // going on
-                                               console.error("exception in animation handler for:", evt);
-                                               console.error(e);
-                                       }
-                               }
-                       }
-                       return this; // dojo.Animation
-               },
-
-               play: function(/*int?*/ delay, /*Boolean?*/ gotoStart){
-                       // summary:
-                       //              Start the animation.
-                       // delay:
-                       //              How many milliseconds to delay before starting.
-                       // gotoStart:
-                       //              If true, starts the animation from the beginning; otherwise,
-                       //              starts it from its current position.
-                       // returns: dojo.Animation
-                       //              The instance to allow chaining.
-
-                       var _t = this;
-                       if(_t._delayTimer){ _t._clearTimer(); }
-                       if(gotoStart){
-                               _t._stopTimer();
-                               _t._active = _t._paused = false;
-                               _t._percent = 0;
-                       }else if(_t._active && !_t._paused){
-                               return _t;
-                       }
-       
-                       _t._fire("beforeBegin", [_t.node]);
-       
-                       var de = delay || _t.delay,
-                               _p = dojo.hitch(_t, "_play", gotoStart);
-                               
-                       if(de > 0){
-                               _t._delayTimer = setTimeout(_p, de);
-                               return _t;
-                       }
-                       _p();
-                       return _t;
-               },
-       
-               _play: function(gotoStart){
-                       var _t = this;
-                       if(_t._delayTimer){ _t._clearTimer(); }
-                       _t._startTime = new Date().valueOf();
-                       if(_t._paused){
-                               _t._startTime -= _t.duration * _t._percent;
-                       }
-                       _t._endTime = _t._startTime + _t.duration;
-       
-                       _t._active = true;
-                       _t._paused = false;
-                       var value = _t.curve.getValue(_t._getStep());
-                       if(!_t._percent){
-                               if(!_t._startRepeatCount){
-                                       _t._startRepeatCount = _t.repeat;
-                               }
-                               _t._fire("onBegin", [value]);
-                       }
-       
-                       _t._fire("onPlay", [value]);
-       
-                       _t._cycle();
-                       return _t; // dojo.Animation
-               },
-       
-               pause: function(){
-                       // summary: Pauses a running animation.
-                       var _t = this;
-                       if(_t._delayTimer){ _t._clearTimer(); }
-                       _t._stopTimer();
-                       if(!_t._active){ return _t; /*dojo.Animation*/ }
-                       _t._paused = true;
-                       _t._fire("onPause", [_t.curve.getValue(_t._getStep())]);
-                       return _t; // dojo.Animation
-               },
-       
-               gotoPercent: function(/*Decimal*/ percent, /*Boolean?*/ andPlay){
-                       //      summary:
-                       //              Sets the progress of the animation.
-                       //      percent:
-                       //              A percentage in decimal notation (between and including 0.0 and 1.0).
-                       //      andPlay:
-                       //              If true, play the animation after setting the progress.
-                       var _t = this;
-                       _t._stopTimer();
-                       _t._active = _t._paused = true;
-                       _t._percent = percent;
-                       if(andPlay){ _t.play(); }
-                       return _t; // dojo.Animation
-               },
-       
-               stop: function(/*boolean?*/ gotoEnd){
-                       // summary: Stops a running animation.
-                       // gotoEnd: If true, the animation will end.
-                       var _t = this;
-                       if(_t._delayTimer){ _t._clearTimer(); }
-                       if(!_t._timer){ return _t; /* dojo.Animation */ }
-                       _t._stopTimer();
-                       if(gotoEnd){
-                               _t._percent = 1;
-                       }
-                       _t._fire("onStop", [_t.curve.getValue(_t._getStep())]);
-                       _t._active = _t._paused = false;
-                       return _t; // dojo.Animation
-               },
-       
-               status: function(){
-                       // summary: 
-                       //              Returns a string token representation of the status of
-                       //              the animation, one of: "paused", "playing", "stopped"
-                       if(this._active){
-                               return this._paused ? "paused" : "playing"; // String
-                       }
-                       return "stopped"; // String
-               },
-       
-               _cycle: function(){
-                       var _t = this;
-                       if(_t._active){
-                               var curr = new Date().valueOf();
-                               var step = (curr - _t._startTime) / (_t._endTime - _t._startTime);
-       
-                               if(step >= 1){
-                                       step = 1;
-                               }
-                               _t._percent = step;
-       
-                               // Perform easing
-                               if(_t.easing){
-                                       step = _t.easing(step);
-                               }
-       
-                               _t._fire("onAnimate", [_t.curve.getValue(step)]);
-       
-                               if(_t._percent < 1){
-                                       _t._startTimer();
-                               }else{
-                                       _t._active = false;
-       
-                                       if(_t.repeat > 0){
-                                               _t.repeat--;
-                                               _t.play(null, true);
-                                       }else if(_t.repeat == -1){
-                                               _t.play(null, true);
-                                       }else{
-                                               if(_t._startRepeatCount){
-                                                       _t.repeat = _t._startRepeatCount;
-                                                       _t._startRepeatCount = 0;
-                                               }
-                                       }
-                                       _t._percent = 0;
-                                       _t._fire("onEnd", [_t.node]);
-                                       !_t.repeat && _t._stopTimer();
-                               }
-                       }
-                       return _t; // dojo.Animation
-               },
-               
-               _clearTimer: function(){
-                       // summary: Clear the play delay timer
-                       clearTimeout(this._delayTimer);
-                       delete this._delayTimer;
-               }
-               
-       });
-
-       // the local timer, stubbed into all Animation instances
-       var ctr = 0,
-               _globalTimerList = [],
-               timer = null,
-               runner = {
-                       run: function(){}
-               };
-
-       d.extend(d.Animation, {
-
-               _startTimer: function(){
-                       if(!this._timer){
-                               this._timer = d.connect(runner, "run", this, "_cycle");
-                               ctr++;
-                       }
-                       if(!timer){
-                               timer = setInterval(d.hitch(runner, "run"), this.rate);
-                       }
-               },
-
-               _stopTimer: function(){
-                       if(this._timer){
-                               d.disconnect(this._timer);
-                               this._timer = null;
-                               ctr--;
-                       }
-                       if(ctr <= 0){
-                               clearInterval(timer);
-                               timer = null;
-                               ctr = 0;
-                       }
-               }
-
-       });
-
-       var _makeFadeable = 
-                               d.isIE ? function(node){
-                       // only set the zoom if the "tickle" value would be the same as the
-                       // default
-                       var ns = node.style;
-                       // don't set the width to auto if it didn't already cascade that way.
-                       // We don't want to f anyones designs
-                       if(!ns.width.length && d.style(node, "width") == "auto"){
-                               ns.width = "auto";
-                       }
-               } : 
-                               function(){};
-
-       dojo._fade = function(/*Object*/ args){
-               //      summary: 
-               //              Returns an animation that will fade the node defined by
-               //              args.node from the start to end values passed (args.start
-               //              args.end) (end is mandatory, start is optional)
-
-               args.node = d.byId(args.node);
-               var fArgs = _mixin({ properties: {} }, args),
-                       props = (fArgs.properties.opacity = {});
-               
-               props.start = !("start" in fArgs) ?
-                       function(){ 
-                               return +d.style(fArgs.node, "opacity")||0; 
-                       } : fArgs.start;
-               props.end = fArgs.end;
-
-               var anim = d.animateProperty(fArgs);
-               d.connect(anim, "beforeBegin", d.partial(_makeFadeable, fArgs.node));
-
-               return anim; // dojo.Animation
-       };
-
-       /*=====
-       dojo.__FadeArgs = function(node, duration, easing){
-               //      node: DOMNode|String
-               //              The node referenced in the animation
-               //      duration: Integer?
-               //              Duration of the animation in milliseconds.
-               //      easing: Function?
-               //              An easing function.
-               this.node = node;
-               this.duration = duration;
-               this.easing = easing;
-       }
-       =====*/
-
-       dojo.fadeIn = function(/*dojo.__FadeArgs*/ args){
-               // summary: 
-               //              Returns an animation that will fade node defined in 'args' from
-               //              its current opacity to fully opaque.
-               return d._fade(_mixin({ end: 1 }, args)); // dojo.Animation
-       };
-
-       dojo.fadeOut = function(/*dojo.__FadeArgs*/  args){
-               // summary: 
-               //              Returns an animation that will fade node defined in 'args'
-               //              from its current opacity to fully transparent.
-               return d._fade(_mixin({ end: 0 }, args)); // dojo.Animation
-       };
-
-       dojo._defaultEasing = function(/*Decimal?*/ n){
-               // summary: The default easing function for dojo.Animation(s)
-               return 0.5 + ((Math.sin((n + 1.5) * Math.PI)) / 2);
-       };
-
-       var PropLine = function(properties){
-               // PropLine is an internal class which is used to model the values of
-               // an a group of CSS properties across an animation lifecycle. In
-               // particular, the "getValue" function handles getting interpolated
-               // values between start and end for a particular CSS value.
-               this._properties = properties;
-               for(var p in properties){
-                       var prop = properties[p];
-                       if(prop.start instanceof d.Color){
-                               // create a reusable temp color object to keep intermediate results
-                               prop.tempColor = new d.Color();
-                       }
-               }
-       };
-
-       PropLine.prototype.getValue = function(r){
-               var ret = {};
-               for(var p in this._properties){
-                       var prop = this._properties[p],
-                               start = prop.start;
-                       if(start instanceof d.Color){
-                               ret[p] = d.blendColors(start, prop.end, r, prop.tempColor).toCss();
-                       }else if(!d.isArray(start)){
-                               ret[p] = ((prop.end - start) * r) + start + (p != "opacity" ? prop.units || "px" : 0);
-                       }
-               }
-               return ret;
-       };
-
-       /*=====
-       dojo.declare("dojo.__AnimArgs", [dojo.__FadeArgs], {
-               // Properties: Object?
-               //      A hash map of style properties to Objects describing the transition,
-               //      such as the properties of dojo._Line with an additional 'units' property
-               properties: {}
-               
-               //TODOC: add event callbacks
-       });
-       =====*/
-
-       dojo.animateProperty = function(/*dojo.__AnimArgs*/ args){
-               // summary: 
-               //              Returns an animation that will transition the properties of
-               //              node defined in `args` depending how they are defined in
-               //              `args.properties`
-               //
-               // description:
-               //              `dojo.animateProperty` is the foundation of most `dojo.fx`
-               //              animations. It takes an object of "properties" corresponding to
-               //              style properties, and animates them in parallel over a set
-               //              duration.
-               //      
-               // example:
-               //              A simple animation that changes the width of the specified node.
-               //      |       dojo.animateProperty({ 
-               //      |               node: "nodeId",
-               //      |               properties: { width: 400 },
-               //      |       }).play();
-               //              Dojo figures out the start value for the width and converts the
-               //              integer specified for the width to the more expressive but
-               //              verbose form `{ width: { end: '400', units: 'px' } }` which you
-               //              can also specify directly. Defaults to 'px' if ommitted.
-               //
-               // example:
-               //              Animate width, height, and padding over 2 seconds... the
-               //              pedantic way:
-               //      |       dojo.animateProperty({ node: node, duration:2000,
-               //      |               properties: {
-               //      |                       width: { start: '200', end: '400', units:"px" },
-               //      |                       height: { start:'200', end: '400', units:"px" },
-               //      |                       paddingTop: { start:'5', end:'50', units:"px" } 
-               //      |               }
-               //      |       }).play();
-               //              Note 'paddingTop' is used over 'padding-top'. Multi-name CSS properties
-               //              are written using "mixed case", as the hyphen is illegal as an object key.
-               //              
-               // example:
-               //              Plug in a different easing function and register a callback for
-               //              when the animation ends. Easing functions accept values between
-               //              zero and one and return a value on that basis. In this case, an
-               //              exponential-in curve.
-               //      |       dojo.animateProperty({ 
-               //      |               node: "nodeId",
-               //      |               // dojo figures out the start value
-               //      |               properties: { width: { end: 400 } },
-               //      |               easing: function(n){
-               //      |                       return (n==0) ? 0 : Math.pow(2, 10 * (n - 1));
-               //      |               },
-               //      |               onEnd: function(node){
-               //      |                       // called when the animation finishes. The animation
-               //      |                       // target is passed to this function
-               //      |               }
-               //      |       }).play(500); // delay playing half a second
-               //
-               // example:
-               //              Like all `dojo.Animation`s, animateProperty returns a handle to the
-               //              Animation instance, which fires the events common to Dojo FX. Use `dojo.connect`
-               //              to access these events outside of the Animation definiton:
-               //      |       var anim = dojo.animateProperty({
-               //      |               node:"someId",
-               //      |               properties:{
-               //      |                       width:400, height:500
-               //      |               }
-               //      |       });
-               //      |       dojo.connect(anim,"onEnd", function(){
-               //      |               console.log("animation ended");
-               //      |       });
-               //      |       // play the animation now:
-               //      |       anim.play();
-               //
-               // example:
-               //              Each property can be a function whose return value is substituted along.
-               //              Additionally, each measurement (eg: start, end) can be a function. The node
-               //              reference is passed direcly to callbacks.
-               //      |       dojo.animateProperty({
-               //      |               node:"mine",
-               //      |               properties:{
-               //      |                       height:function(node){
-               //      |                               // shrink this node by 50%
-               //      |                               return dojo.position(node).h / 2
-               //      |                       },
-               //      |                       width:{
-               //      |                               start:function(node){ return 100; },
-               //      |                               end:function(node){ return 200; }       
-               //      |                       }
-               //      |               }
-               //      |       }).play();
-               //
-
-               var n = args.node = d.byId(args.node);
-               if(!args.easing){ args.easing = d._defaultEasing; }
-
-               var anim = new d.Animation(args);
-               d.connect(anim, "beforeBegin", anim, function(){
-                       var pm = {};
-                       for(var p in this.properties){
-                               // Make shallow copy of properties into pm because we overwrite
-                               // some values below. In particular if start/end are functions
-                               // we don't want to overwrite them or the functions won't be
-                               // called if the animation is reused.
-                               if(p == "width" || p == "height"){
-                                       this.node.display = "block";
-                               }
-                               var prop = this.properties[p];
-                               if(d.isFunction(prop)){
-                                       prop = prop(n);
-                               }
-                               prop = pm[p] = _mixin({}, (d.isObject(prop) ? prop: { end: prop }));
-
-                               if(d.isFunction(prop.start)){
-                                       prop.start = prop.start(n);
-                               }
-                               if(d.isFunction(prop.end)){
-                                       prop.end = prop.end(n);
-                               }
-                               var isColor = (p.toLowerCase().indexOf("color") >= 0);
-                               function getStyle(node, p){
-                                       // dojo.style(node, "height") can return "auto" or "" on IE; this is more reliable:
-                                       var v = { height: node.offsetHeight, width: node.offsetWidth }[p];
-                                       if(v !== undefined){ return v; }
-                                       v = d.style(node, p);
-                                       return (p == "opacity") ? +v : (isColor ? v : parseFloat(v));
-                               }
-                               if(!("end" in prop)){
-                                       prop.end = getStyle(n, p);
-                               }else if(!("start" in prop)){
-                                       prop.start = getStyle(n, p);
-                               }
-
-                               if(isColor){
-                                       prop.start = new d.Color(prop.start);
-                                       prop.end = new d.Color(prop.end);
-                               }else{
-                                       prop.start = (p == "opacity") ? +prop.start : parseFloat(prop.start);
-                               }
-                       }
-                       this.curve = new PropLine(pm);
-               });
-               d.connect(anim, "onAnimate", d.hitch(d, "style", anim.node));
-               return anim; // dojo.Animation
-       };
-
-       dojo.anim = function(   /*DOMNode|String*/      node, 
-                                                       /*Object*/                      properties, 
-                                                       /*Integer?*/            duration, 
-                                                       /*Function?*/           easing, 
-                                                       /*Function?*/           onEnd,
-                                                       /*Integer?*/            delay){
-               //      summary:
-               //              A simpler interface to `dojo.animateProperty()`, also returns
-               //              an instance of `dojo.Animation` but begins the animation
-               //              immediately, unlike nearly every other Dojo animation API.
-               //      description:
-               //              `dojo.anim` is a simpler (but somewhat less powerful) version
-               //              of `dojo.animateProperty`.  It uses defaults for many basic properties
-               //              and allows for positional parameters to be used in place of the
-               //              packed "property bag" which is used for other Dojo animation
-               //              methods.
-               //
-               //              The `dojo.Animation` object returned from `dojo.anim` will be
-               //              already playing when it is returned from this function, so
-               //              calling play() on it again is (usually) a no-op.
-               //      node:
-               //              a DOM node or the id of a node to animate CSS properties on
-               //      duration:
-               //              The number of milliseconds over which the animation
-               //              should run. Defaults to the global animation default duration
-               //              (350ms).
-               //      easing:
-               //              An easing function over which to calculate acceleration
-               //              and deceleration of the animation through its duration.
-               //              A default easing algorithm is provided, but you may
-               //              plug in any you wish. A large selection of easing algorithms
-               //              are available in `dojo.fx.easing`.
-               //      onEnd:
-               //              A function to be called when the animation finishes
-               //              running.
-               //      delay:
-               //              The number of milliseconds to delay beginning the
-               //              animation by. The default is 0.
-               //      example:
-               //              Fade out a node
-               //      |       dojo.anim("id", { opacity: 0 });
-               //      example:
-               //              Fade out a node over a full second
-               //      |       dojo.anim("id", { opacity: 0 }, 1000);
-               return d.animateProperty({ // dojo.Animation
-                       node: node,
-                       duration: duration || d.Animation.prototype.duration,
-                       properties: properties,
-                       easing: easing,
-                       onEnd: onEnd 
-               }).play(delay || 0);
-       };
-})();
-
-}
-
-if(!dojo._hasResource["dojo._base.browser"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
-dojo._hasResource["dojo._base.browser"] = true;
-dojo.provide("dojo._base.browser");
-
-
-
-
-
-
-
-
-
-
-//Need this to be the last code segment in base, so do not place any
-//dojo.requireIf calls in this file. Otherwise, due to how the build system
-//puts all requireIf dependencies after the current file, the require calls
-//could be called before all of base is defined.
-dojo.forEach(dojo.config.require, function(i){
-       dojo["require"](i);
-});
-
-}
-
-       //INSERT dojo.i18n._preloadLocalizations HERE
-
-       if(dojo.config.afterOnLoad && dojo.isBrowser){
-               //Dojo is being added to the page after page load, so just trigger
-               //the init sequence after a timeout. Using a timeout so the rest of this
-               //script gets evaluated properly. This work needs to happen after the
-               //dojo.config.require work done in dojo._base.
-               window.setTimeout(dojo._loadInit, 1000);
-       }
-
-})();
-
diff --git a/ricoClient/js/baselibs/dojo.js b/ricoClient/js/baselibs/dojo.js
deleted file mode 100644 (file)
index 11d2841..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
-       Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
-       Available via Academic Free License >= 2.1 OR the modified BSD license.
-       see: http://dojotoolkit.org/license for details
-*/
-
-/*
-       This is a compiled version of Dojo, built for deployment and not for
-       development. To get an editable version, please visit:
-
-               http://dojotoolkit.org
-
-       for documentation and information on getting the source.
-*/
-
-(function(){var _1=null;if((_1||(typeof djConfig!="undefined"&&djConfig.scopeMap))&&(typeof window!="undefined")){var _2="",_3="",_4="",_5={},_6={};_1=_1||djConfig.scopeMap;for(var i=0;i<_1.length;i++){var _7=_1[i];_2+="var "+_7[0]+" = {}; "+_7[1]+" = "+_7[0]+";"+_7[1]+"._scopeName = '"+_7[1]+"';";_3+=(i==0?"":",")+_7[0];_4+=(i==0?"":",")+_7[1];_5[_7[0]]=_7[1];_6[_7[1]]=_7[0];}eval(_2+"dojo._scopeArgs = ["+_4+"];");dojo._scopePrefixArgs=_3;dojo._scopePrefix="(function("+_3+"){";dojo._scopeSuffix="})("+_4+")";dojo._scopeMap=_5;dojo._scopeMapRev=_6;}(function(){if(typeof this["loadFirebugConsole"]=="function"){this["loadFirebugConsole"]();}else{this.console=this.console||{};var cn=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","profile","profileEnd","time","timeEnd","trace","warn","log"];var i=0,tn;while((tn=cn[i++])){if(!console[tn]){(function(){var _8=tn+"";console[_8]=("log" in console)?function(){var a=Array.apply({},arguments);a.unshift(_8+":");console["log"](a.join(" "));}:function(){};console[_8]._fake=true;})();}}}if(typeof dojo=="undefined"){dojo={_scopeName:"dojo",_scopePrefix:"",_scopePrefixArgs:"",_scopeSuffix:"",_scopeMap:{},_scopeMapRev:{}};}var d=dojo;if(typeof dijit=="undefined"){dijit={_scopeName:"dijit"};}if(typeof dojox=="undefined"){dojox={_scopeName:"dojox"};}if(!d._scopeArgs){d._scopeArgs=[dojo,dijit,dojox];}d.global=this;d.config={isDebug:false,debugAtAllCosts:false};if(typeof djConfig!="undefined"){for(var _9 in djConfig){d.config[_9]=djConfig[_9];}}dojo.locale=d.config.locale;var _a="$Rev: 20973 $".match(/\d+/);dojo.version={major:1,minor:4,patch:0,flag:"",revision:_a?+_a[0]:NaN,toString:function(){with(d.version){return major+"."+minor+"."+patch+flag+" ("+revision+")";}}};if(typeof OpenAjax!="undefined"){OpenAjax.hub.registerLibrary(dojo._scopeName,"http://dojotoolkit.org",d.version.toString());}var _b,_c,_d={};for(var i in {toString:1}){_b=[];break;}dojo._extraNames=_b=_b||["hasOwnProperty","valueOf","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","constructor"];_c=_b.length;dojo._mixin=function(_e,_f){var _10,s,i;for(_10 in _f){s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}if(_c&&_f){for(i=0;i<_c;++i){_10=_b[i];s=_f[_10];if(!(_10 in _e)||(_e[_10]!==s&&(!(_10 in _d)||_d[_10]!==s))){_e[_10]=s;}}}return _e;};dojo.mixin=function(obj,_11){if(!obj){obj={};}for(var i=1,l=arguments.length;i<l;i++){d._mixin(obj,arguments[i]);}return obj;};dojo._getProp=function(_12,_13,_14){var obj=_14||d.global;for(var i=0,p;obj&&(p=_12[i]);i++){if(i==0&&d._scopeMap[p]){p=d._scopeMap[p];}obj=(p in obj?obj[p]:(_13?obj[p]={}:undefined));}return obj;};dojo.setObject=function(_15,_16,_17){var _18=_15.split("."),p=_18.pop(),obj=d._getProp(_18,true,_17);return obj&&p?(obj[p]=_16):undefined;};dojo.getObject=function(_19,_1a,_1b){return d._getProp(_19.split("."),_1a,_1b);};dojo.exists=function(_1c,obj){return !!d.getObject(_1c,false,obj);};dojo["eval"]=function(_1d){return d.global.eval?d.global.eval(_1d):eval(_1d);};d.deprecated=d.experimental=function(){};})();(function(){var d=dojo;d.mixin(d,{_loadedModules:{},_inFlightCount:0,_hasResource:{},_modulePrefixes:{dojo:{name:"dojo",value:"."},doh:{name:"doh",value:"../util/doh"},tests:{name:"tests",value:"tests"}},_moduleHasPrefix:function(_1e){var mp=d._modulePrefixes;return !!(mp[_1e]&&mp[_1e].value);},_getModulePrefix:function(_1f){var mp=d._modulePrefixes;if(d._moduleHasPrefix(_1f)){return mp[_1f].value;}return _1f;},_loadedUrls:[],_postLoad:false,_loaders:[],_unloaders:[],_loadNotifying:false});dojo._loadPath=function(_20,_21,cb){var uri=((_20.charAt(0)=="/"||_20.match(/^\w+:/))?"":d.baseUrl)+_20;try{return !_21?d._loadUri(uri,cb):d._loadUriAndCheck(uri,_21,cb);}catch(e){console.error(e);return false;}};dojo._loadUri=function(uri,cb){if(d._loadedUrls[uri]){return true;}d._inFlightCount++;var _22=d._getText(uri,true);if(_22){d._loadedUrls[uri]=true;d._loadedUrls.push(uri);if(cb){_22="("+_22+")";}else{_22=d._scopePrefix+_22+d._scopeSuffix;}if(!d.isIE){_22+="\r\n//@ sourceURL="+uri;}var _23=d["eval"](_22);if(cb){cb(_23);}}if(--d._inFlightCount==0&&d._postLoad&&d._loaders.length){setTimeout(function(){if(d._inFlightCount==0){d._callLoaded();}},0);}return !!_22;};dojo._loadUriAndCheck=function(uri,_24,cb){var ok=false;try{ok=d._loadUri(uri,cb);}catch(e){console.error("failed loading "+uri+" with error: "+e);}return !!(ok&&d._loadedModules[_24]);};dojo.loaded=function(){d._loadNotifying=true;d._postLoad=true;var mll=d._loaders;d._loaders=[];for(var x=0;x<mll.length;x++){mll[x]();}d._loadNotifying=false;if(d._postLoad&&d._inFlightCount==0&&mll.length){d._callLoaded();}};dojo.unloaded=function(){var mll=d._unloaders;while(mll.length){(mll.pop())();}};d._onto=function(arr,obj,fn){if(!fn){arr.push(obj);}else{if(fn){var _25=(typeof fn=="string")?obj[fn]:fn;arr.push(function(){_25.call(obj);});}}};dojo.ready=dojo.addOnLoad=function(obj,_26){d._onto(d._loaders,obj,_26);if(d._postLoad&&d._inFlightCount==0&&!d._loadNotifying){d._callLoaded();}};var dca=d.config.addOnLoad;if(dca){d.addOnLoad[(dca instanceof Array?"apply":"call")](d,dca);}dojo._modulesLoaded=function(){if(d._postLoad){return;}if(d._inFlightCount>0){console.warn("files still in flight!");return;}d._callLoaded();};dojo._callLoaded=function(){if(typeof setTimeout=="object"||(d.config.useXDomain&&d.isOpera)){setTimeout(d.isAIR?function(){d.loaded();}:d._scopeName+".loaded();",0);}else{d.loaded();}};dojo._getModuleSymbols=function(_27){var _28=_27.split(".");for(var i=_28.length;i>0;i--){var _29=_28.slice(0,i).join(".");if(i==1&&!d._moduleHasPrefix(_29)){_28[0]="../"+_28[0];}else{var _2a=d._getModulePrefix(_29);if(_2a!=_29){_28.splice(0,i,_2a);break;}}}return _28;};dojo._global_omit_module_check=false;dojo.loadInit=function(_2b){_2b();};dojo._loadModule=dojo.require=function(_2c,_2d){_2d=d._global_omit_module_check||_2d;var _2e=d._loadedModules[_2c];if(_2e){return _2e;}var _2f=d._getModuleSymbols(_2c).join("/")+".js";var _30=!_2d?_2c:null;var ok=d._loadPath(_2f,_30);if(!ok&&!_2d){throw new Error("Could not load '"+_2c+"'; last tried '"+_2f+"'");}if(!_2d&&!d._isXDomain){_2e=d._loadedModules[_2c];if(!_2e){throw new Error("symbol '"+_2c+"' is not defined after loading '"+_2f+"'");}}return _2e;};dojo.provide=function(_31){_31=_31+"";return (d._loadedModules[_31]=d.getObject(_31,true));};dojo.platformRequire=function(_32){var _33=_32.common||[];var _34=_33.concat(_32[d._name]||_32["default"]||[]);for(var x=0;x<_34.length;x++){var _35=_34[x];if(_35.constructor==Array){d._loadModule.apply(d,_35);}else{d._loadModule(_35);}}};dojo.requireIf=function(_36,_37){if(_36===true){var _38=[];for(var i=1;i<arguments.length;i++){_38.push(arguments[i]);}d.require.apply(d,_38);}};dojo.requireAfterIf=d.requireIf;dojo.registerModulePath=function(_39,_3a){d._modulePrefixes[_39]={name:_39,value:_3a};};dojo.requireLocalization=function(_3b,_3c,_3d,_3e){d.require("dojo.i18n");d.i18n._requireLocalization.apply(d.hostenv,arguments);};var ore=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),ire=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");dojo._Url=function(){var n=null,_3f=arguments,uri=[_3f[0]];for(var i=1;i<_3f.length;i++){if(!_3f[i]){continue;}var _40=new d._Url(_3f[i]+""),_41=new d._Url(uri[0]+"");if(_40.path==""&&!_40.scheme&&!_40.authority&&!_40.query){if(_40.fragment!=n){_41.fragment=_40.fragment;}_40=_41;}else{if(!_40.scheme){_40.scheme=_41.scheme;if(!_40.authority){_40.authority=_41.authority;if(_40.path.charAt(0)!="/"){var _42=_41.path.substring(0,_41.path.lastIndexOf("/")+1)+_40.path;var _43=_42.split("/");for(var j=0;j<_43.length;j++){if(_43[j]=="."){if(j==_43.length-1){_43[j]="";}else{_43.splice(j,1);j--;}}else{if(j>0&&!(j==1&&_43[0]=="")&&_43[j]==".."&&_43[j-1]!=".."){if(j==(_43.length-1)){_43.splice(j,1);_43[j-1]="";}else{_43.splice(j-1,2);j-=2;}}}}_40.path=_43.join("/");}}}}uri=[];if(_40.scheme){uri.push(_40.scheme,":");}if(_40.authority){uri.push("//",_40.authority);}uri.push(_40.path);if(_40.query){uri.push("?",_40.query);}if(_40.fragment){uri.push("#",_40.fragment);}}this.uri=uri.join("");var r=this.uri.match(ore);this.scheme=r[2]||(r[1]?"":n);this.authority=r[4]||(r[3]?"":n);this.path=r[5];this.query=r[7]||(r[6]?"":n);this.fragment=r[9]||(r[8]?"":n);if(this.authority!=n){r=this.authority.match(ire);this.user=r[3]||n;this.password=r[4]||n;this.host=r[6]||r[7];this.port=r[9]||n;}};dojo._Url.prototype.toString=function(){return this.uri;};dojo.moduleUrl=function(_44,url){var loc=d._getModuleSymbols(_44).join("/");if(!loc){return null;}if(loc.lastIndexOf("/")!=loc.length-1){loc+="/";}var _45=loc.indexOf(":");if(loc.charAt(0)!="/"&&(_45==-1||_45>loc.indexOf("/"))){loc=d.baseUrl+loc;}return new d._Url(loc,url);};})();if(typeof window!="undefined"){dojo.isBrowser=true;dojo._name="browser";(function(){var d=dojo;if(document&&document.getElementsByTagName){var _46=document.getElementsByTagName("script");var _47=/dojo(\.xd)?\.js(\W|$)/i;for(var i=0;i<_46.length;i++){var src=_46[i].getAttribute("src");if(!src){continue;}var m=src.match(_47);if(m){if(!d.config.baseUrl){d.config.baseUrl=src.substring(0,m.index);}var cfg=_46[i].getAttribute("djConfig");if(cfg){var _48=eval("({ "+cfg+" })");for(var x in _48){dojo.config[x]=_48[x];}}break;}}}d.baseUrl=d.config.baseUrl;var n=navigator;var dua=n.userAgent,dav=n.appVersion,tv=parseFloat(dav);if(dua.indexOf("Opera")>=0){d.isOpera=tv;}if(dua.indexOf("AdobeAIR")>=0){d.isAIR=1;}d.isKhtml=(dav.indexOf("Konqueror")>=0)?tv:0;d.isWebKit=parseFloat(dua.split("WebKit/")[1])||undefined;d.isChrome=parseFloat(dua.split("Chrome/")[1])||undefined;d.isMac=dav.indexOf("Macintosh")>=0;var _49=Math.max(dav.indexOf("WebKit"),dav.indexOf("Safari"),0);if(_49&&!dojo.isChrome){d.isSafari=parseFloat(dav.split("Version/")[1]);if(!d.isSafari||parseFloat(dav.substr(_49+7))<=419.3){d.isSafari=2;}}if(dua.indexOf("Gecko")>=0&&!d.isKhtml&&!d.isWebKit){d.isMozilla=d.isMoz=tv;}if(d.isMoz){d.isFF=parseFloat(dua.split("Firefox/")[1]||dua.split("Minefield/")[1])||undefined;}if(document.all&&!d.isOpera){d.isIE=parseFloat(dav.split("MSIE ")[1])||undefined;var _4a=document.documentMode;if(_4a&&_4a!=5&&Math.floor(d.isIE)!=_4a){d.isIE=_4a;}}if(dojo.isIE&&window.location.protocol==="file:"){dojo.config.ieForceActiveXXhr=true;}d.isQuirks=document.compatMode=="BackCompat";d.locale=dojo.config.locale||(d.isIE?n.userLanguage:n.language).toLowerCase();d._XMLHTTP_PROGIDS=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"];d._xhrObj=function(){var _4b,_4c;if(!dojo.isIE||!dojo.config.ieForceActiveXXhr){try{_4b=new XMLHttpRequest();}catch(e){}}if(!_4b){for(var i=0;i<3;++i){var _4d=d._XMLHTTP_PROGIDS[i];try{_4b=new ActiveXObject(_4d);}catch(e){_4c=e;}if(_4b){d._XMLHTTP_PROGIDS=[_4d];break;}}}if(!_4b){throw new Error("XMLHTTP not available: "+_4c);}return _4b;};d._isDocumentOk=function(_4e){var _4f=_4e.status||0,lp=location.protocol;return (_4f>=200&&_4f<300)||_4f==304||_4f==1223||(!_4f&&(lp=="file:"||lp=="chrome:"||lp=="app:"));};var _50=window.location+"";var _51=document.getElementsByTagName("base");var _52=(_51&&_51.length>0);d._getText=function(uri,_53){var _54=d._xhrObj();if(!_52&&dojo._Url){uri=(new dojo._Url(_50,uri)).toString();}if(d.config.cacheBust){uri+="";uri+=(uri.indexOf("?")==-1?"?":"&")+String(d.config.cacheBust).replace(/\W+/g,"");}_54.open("GET",uri,false);try{_54.send(null);if(!d._isDocumentOk(_54)){var err=Error("Unable to load "+uri+" status:"+_54.status);err.status=_54.status;err.responseText=_54.responseText;throw err;}}catch(e){if(_53){return null;}throw e;}return _54.responseText;};var _55=window;var _56=function(_57,fp){var _58=_55.attachEvent||_55.addEventListener;_57=_55.attachEvent?_57:_57.substring(2);_58(_57,function(){fp.apply(_55,arguments);},false);};d._windowUnloaders=[];d.windowUnloaded=function(){var mll=d._windowUnloaders;while(mll.length){(mll.pop())();}};var _59=0;d.addOnWindowUnload=function(obj,_5a){d._onto(d._windowUnloaders,obj,_5a);if(!_59){_59=1;_56("onunload",d.windowUnloaded);}};var _5b=0;d.addOnUnload=function(obj,_5c){d._onto(d._unloaders,obj,_5c);if(!_5b){_5b=1;_56("onbeforeunload",dojo.unloaded);}};})();dojo._initFired=false;dojo._loadInit=function(e){if(!dojo._initFired){dojo._initFired=true;if(!dojo.config.afterOnLoad&&window.detachEvent){window.detachEvent("onload",dojo._loadInit);}if(dojo._inFlightCount==0){dojo._modulesLoaded();}}};if(!dojo.config.afterOnLoad){if(document.addEventListener){document.addEventListener("DOMContentLoaded",dojo._loadInit,false);window.addEventListener("load",dojo._loadInit,false);}else{if(window.attachEvent){window.attachEvent("onload",dojo._loadInit);}}}if(dojo.isIE){if(!dojo.config.afterOnLoad&&!dojo.config.skipIeDomLoaded){document.write("<scr"+"ipt defer src=\"//:\" "+"onreadystatechange=\"if(this.readyState=='complete'){"+dojo._scopeName+"._loadInit();}\">"+"</scr"+"ipt>");}try{document.namespaces.add("v","urn:schemas-microsoft-com:vml");var _5d=["*","group","roundrect","oval","shape","rect","imagedata"],i=0,l=1,s=document.createStyleSheet();if(dojo.isIE>=8){i=1;l=_5d.length;}for(;i<l;++i){s.addRule("v\\:"+_5d[i],"behavior:url(#default#VML); display:inline-block");}}catch(e){}}}(function(){var mp=dojo.config["modulePaths"];if(mp){for(var _5e in mp){dojo.registerModulePath(_5e,mp[_5e]);}}})();if(dojo.config.isDebug){dojo.require("dojo._firebug.firebug");}if(dojo.config.debugAtAllCosts){dojo.config.useXDomain=true;dojo.require("dojo._base._loader.loader_xd");dojo.require("dojo._base._loader.loader_debug");dojo.require("dojo.i18n");}if(!dojo._hasResource["dojo._base.lang"]){dojo._hasResource["dojo._base.lang"]=true;dojo.provide("dojo._base.lang");(function(){var d=dojo,_5f=Object.prototype.toString;dojo.isString=function(it){return (typeof it=="string"||it instanceof String);};dojo.isArray=function(it){return it&&(it instanceof Array||typeof it=="array");};dojo.isFunction=function(it){return _5f.call(it)==="[object Function]";};dojo.isObject=function(it){return it!==undefined&&(it===null||typeof it=="object"||d.isArray(it)||d.isFunction(it));};dojo.isArrayLike=function(it){return it&&it!==undefined&&!d.isString(it)&&!d.isFunction(it)&&!(it.tagName&&it.tagName.toLowerCase()=="form")&&(d.isArray(it)||isFinite(it.length));};dojo.isAlien=function(it){return it&&!d.isFunction(it)&&/\{\s*\[native code\]\s*\}/.test(String(it));};dojo.extend=function(_60,_61){for(var i=1,l=arguments.length;i<l;i++){d._mixin(_60.prototype,arguments[i]);}return _60;};dojo._hitchArgs=function(_62,_63){var pre=d._toArray(arguments,2);var _64=d.isString(_63);return function(){var _65=d._toArray(arguments);var f=_64?(_62||d.global)[_63]:_63;return f&&f.apply(_62||this,pre.concat(_65));};};dojo.hitch=function(_66,_67){if(arguments.length>2){return d._hitchArgs.apply(d,arguments);}if(!_67){_67=_66;_66=null;}if(d.isString(_67)){_66=_66||d.global;if(!_66[_67]){throw (["dojo.hitch: scope[\"",_67,"\"] is null (scope=\"",_66,"\")"].join(""));}return function(){return _66[_67].apply(_66,arguments||[]);};}return !_66?_67:function(){return _67.apply(_66,arguments||[]);};};dojo.delegate=dojo._delegate=(function(){function TMP(){};return function(obj,_68){TMP.prototype=obj;var tmp=new TMP();TMP.prototype=null;if(_68){d._mixin(tmp,_68);}return tmp;};})();var _69=function(obj,_6a,_6b){return (_6b||[]).concat(Array.prototype.slice.call(obj,_6a||0));};var _6c=function(obj,_6d,_6e){var arr=_6e||[];for(var x=_6d||0;x<obj.length;x++){arr.push(obj[x]);}return arr;};dojo._toArray=d.isIE?function(obj){return ((obj.item)?_6c:_69).apply(this,arguments);}:_69;dojo.partial=function(_6f){var arr=[null];return d.hitch.apply(d,arr.concat(d._toArray(arguments)));};var _70=d._extraNames,_71=_70.length,_72={};dojo.clone=function(o){if(!o||typeof o!="object"||d.isFunction(o)){return o;}if(o.nodeType&&o.cloneNode){return o.cloneNode(true);}if(o instanceof Date){return new Date(o.getTime());}var r,i,l,s,_73;if(d.isArray(o)){r=[];for(i=0,l=o.length;i<l;++i){if(i in o){r.push(d.clone(o[i]));}}}else{r=o.constructor?new o.constructor():{};}for(_73 in o){s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=d.clone(s);}}if(_71){for(i=0;i<_71;++i){_73=_70[i];s=o[_73];if(!(_73 in r)||(r[_73]!==s&&(!(_73 in _72)||_72[_73]!==s))){r[_73]=s;}}}return r;};dojo.trim=String.prototype.trim?function(str){return str.trim();}:function(str){return str.replace(/^\s\s*/,"").replace(/\s\s*$/,"");};var _74=/\{([^\}]+)\}/g;dojo.replace=function(_75,map,_76){return _75.replace(_76||_74,d.isFunction(map)?map:function(_77,k){return d.getObject(k,false,map);});};})();}if(!dojo._hasResource["dojo._base.array"]){dojo._hasResource["dojo._base.array"]=true;dojo.provide("dojo._base.array");(function(){var _78=function(arr,obj,cb){return [(typeof arr=="string")?arr.split(""):arr,obj||dojo.global,(typeof cb=="string")?new Function("item","index","array",cb):cb];};var _79=function(_7a,arr,_7b,_7c){var _7d=_78(arr,_7c,_7b);arr=_7d[0];for(var i=0,l=arr.length;i<l;++i){var _7e=!!_7d[2].call(_7d[1],arr[i],i,arr);if(_7a^_7e){return _7e;}}return _7a;};dojo.mixin(dojo,{indexOf:function(_7f,_80,_81,_82){var _83=1,end=_7f.length||0,i=0;if(_82){i=end-1;_83=end=-1;}if(_81!=undefined){i=_81;}if((_82&&i>end)||i<end){for(;i!=end;i+=_83){if(_7f[i]==_80){return i;}}}return -1;},lastIndexOf:function(_84,_85,_86){return dojo.indexOf(_84,_85,_86,true);},forEach:function(arr,_87,_88){if(!arr||!arr.length){return;}var _89=_78(arr,_88,_87);arr=_89[0];for(var i=0,l=arr.length;i<l;++i){_89[2].call(_89[1],arr[i],i,arr);}},every:function(arr,_8a,_8b){return _79(true,arr,_8a,_8b);},some:function(arr,_8c,_8d){return _79(false,arr,_8c,_8d);},map:function(arr,_8e,_8f){var _90=_78(arr,_8f,_8e);arr=_90[0];var _91=(arguments[3]?(new arguments[3]()):[]);for(var i=0,l=arr.length;i<l;++i){_91.push(_90[2].call(_90[1],arr[i],i,arr));}return _91;},filter:function(arr,_92,_93){var _94=_78(arr,_93,_92);arr=_94[0];var _95=[];for(var i=0,l=arr.length;i<l;++i){if(_94[2].call(_94[1],arr[i],i,arr)){_95.push(arr[i]);}}return _95;}});})();}if(!dojo._hasResource["dojo._base.declare"]){dojo._hasResource["dojo._base.declare"]=true;dojo.provide("dojo._base.declare");(function(){var d=dojo,mix=d._mixin,op=Object.prototype,_96=op.toString,_97=new Function,_98=0,_99="constructor";function err(msg){throw new Error("declare: "+msg);};function _9a(_9b){var _9c=[],_9d=[{cls:0,refs:[]}],_9e={},_9f=1,l=_9b.length,i=0,j,lin,_a0,top,_a1,rec,_a2,_a3;for(;i<l;++i){_a0=_9b[i];if(!_a0){err("mixin #"+i+" is null");}lin=_a0._meta?_a0._meta.bases:[_a0];top=0;for(j=lin.length-1;j>=0;--j){_a1=lin[j].prototype;if(!_a1.hasOwnProperty("declaredClass")){_a1.declaredClass="uniqName_"+(_98++);}_a2=_a1.declaredClass;if(!_9e.hasOwnProperty(_a2)){_9e[_a2]={count:0,refs:[],cls:lin[j]};++_9f;}rec=_9e[_a2];if(top&&top!==rec){rec.refs.push(top);++top.count;}top=rec;}++top.count;_9d[0].refs.push(top);}while(_9d.length){top=_9d.pop();_9c.push(top.cls);--_9f;while(_a3=top.refs,_a3.length==1){top=_a3[0];if(!top||--top.count){top=0;break;}_9c.push(top.cls);--_9f;}if(top){for(i=0,l=_a3.length;i<l;++i){top=_a3[i];if(!--top.count){_9d.push(top);}}}}if(_9f){err("can't build consistent linearization");}_a0=_9b[0];_9c[0]=_a0?_a0._meta&&_a0===_9c[_9c.length-_a0._meta.bases.length]?_a0._meta.bases.length:1:0;return _9c;};function _a4(_a5,a,f){var _a6,_a7,_a8,_a9,_aa,_ab,_ac,opf,pos,_ad=this._inherited=this._inherited||{};if(typeof _a5=="string"){_a6=_a5;_a5=a;a=f;}f=0;_a9=_a5.callee;_a6=_a6||_a9.nom;if(!_a6){err("can't deduce a name to call inherited()");}_aa=this.constructor._meta;_a8=_aa.bases;pos=_ad.p;if(_a6!=_99){if(_ad.c!==_a9){pos=0;_ab=_a8[0];_aa=_ab._meta;if(_aa.hidden[_a6]!==_a9){_a7=_aa.chains;if(_a7&&typeof _a7[_a6]=="string"){err("calling chained method with inherited: "+_a6);}do{_aa=_ab._meta;_ac=_ab.prototype;if(_aa&&(_ac[_a6]===_a9&&_ac.hasOwnProperty(_a6)||_aa.hidden[_a6]===_a9)){break;}}while(_ab=_a8[++pos]);pos=_ab?pos:-1;}}_ab=_a8[++pos];if(_ab){_ac=_ab.prototype;if(_ab._meta&&_ac.hasOwnProperty(_a6)){f=_ac[_a6];}else{opf=op[_a6];do{_ac=_ab.prototype;f=_ac[_a6];if(f&&(_ab._meta?_ac.hasOwnProperty(_a6):f!==opf)){break;}}while(_ab=_a8[++pos]);}}f=_ab&&f||op[_a6];}else{if(_ad.c!==_a9){pos=0;_aa=_a8[0]._meta;if(_aa&&_aa.ctor!==_a9){_a7=_aa.chains;if(!_a7||_a7.constructor!=="manual"){err("calling chained constructor with inherited");}while(_ab=_a8[++pos]){_aa=_ab._meta;if(_aa&&_aa.ctor===_a9){break;}}pos=_ab?pos:-1;}}while(_ab=_a8[++pos]){_aa=_ab._meta;f=_aa?_aa.ctor:_ab;if(f){break;}}f=_ab&&f;}_ad.c=f;_ad.p=pos;if(f){return a===true?f:f.apply(this,a||_a5);}};function _ae(_af,_b0){if(typeof _af=="string"){return this.inherited(_af,_b0,true);}return this.inherited(_af,true);};function _b1(cls){var _b2=this.constructor._meta.bases;for(var i=0,l=_b2.length;i<l;++i){if(_b2[i]===cls){return true;}}return this instanceof cls;};function _b3(_b4,_b5){var _b6,t,i=0,l=d._extraNames.length;for(_b6 in _b5){t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}for(;i<l;++i){_b6=d._extraNames[i];t=_b5[_b6];if((t!==op[_b6]||!(_b6 in op))&&_b6!=_99){if(_96.call(t)=="[object Function]"){t.nom=_b6;}_b4[_b6]=t;}}return _b4;};function _b7(_b8){_b3(this.prototype,_b8);return this;};function _b9(_ba,_bb){return function(){var a=arguments,_bc=a,a0=a[0],f,i,m,l=_ba.length,_bd;if(_bb&&(a0&&a0.preamble||this.preamble)){_bd=new Array(_ba.length);_bd[0]=a;for(i=0;;){a0=a[0];if(a0){f=a0.preamble;if(f){a=f.apply(this,a)||a;}}f=_ba[i].prototype;f=f.hasOwnProperty("preamble")&&f.preamble;if(f){a=f.apply(this,a)||a;}if(++i==l){break;}_bd[i]=a;}}for(i=l-1;i>=0;--i){f=_ba[i];m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,_bd?_bd[i]:a);}}f=this.postscript;if(f){f.apply(this,_bc);}};};function _be(_bf,_c0){return function(){var a=arguments,t=a,a0=a[0],f;if(_c0){if(a0){f=a0.preamble;if(f){t=f.apply(this,t)||t;}}f=this.preamble;if(f){f.apply(this,t);}}if(_bf){_bf.apply(this,a);}f=this.postscript;if(f){f.apply(this,a);}};};function _c1(_c2){return function(){var a=arguments,i=0,f;for(;f=_c2[i];++i){m=f._meta;f=m?m.ctor:f;if(f){f.apply(this,a);break;}}f=this.postscript;if(f){f.apply(this,a);}};};function _c3(_c4,_c5,_c6){return function(){var b,m,f,i=0,_c7=1;if(_c6){i=_c5.length-1;_c7=-1;}for(;b=_c5[i];i+=_c7){m=b._meta;f=(m?m.hidden:b.prototype)[_c4];if(f){f.apply(this,arguments);}}};};d.declare=function(_c8,_c9,_ca){var _cb,i,t,_cc,_cd,_ce,_cf,_d0=1,_d1=_c9;if(typeof _c8!="string"){_ca=_c9;_c9=_c8;_c8="";}_ca=_ca||{};if(_96.call(_c9)=="[object Array]"){_ce=_9a(_c9);t=_ce[0];_d0=_ce.length-t;_c9=_ce[_d0];}else{_ce=[0];if(_c9){t=_c9._meta;_ce=_ce.concat(t?t.bases:_c9);}}if(_c9){for(i=_d0-1;;--i){_97.prototype=_c9.prototype;_cb=new _97;if(!i){break;}t=_ce[i];mix(_cb,t._meta?t._meta.hidden:t.prototype);_cc=new Function;_cc.superclass=_c9;_cc.prototype=_cb;_c9=_cb.constructor=_cc;}}else{_cb={};}_b3(_cb,_ca);t=_ca.constructor;if(t!==op.constructor){t.nom=_99;_cb.constructor=t;}_97.prototype=0;for(i=_d0-1;i;--i){t=_ce[i]._meta;if(t&&t.chains){_cf=mix(_cf||{},t.chains);}}if(_cb["-chains-"]){_cf=mix(_cf||{},_cb["-chains-"]);}t=!_cf||!_cf.hasOwnProperty(_99);_ce[0]=_cc=(_cf&&_cf.constructor==="manual")?_c1(_ce):(_ce.length==1?_be(_ca.constructor,t):_b9(_ce,t));_cc._meta={bases:_ce,hidden:_ca,chains:_cf,parents:_d1,ctor:_ca.constructor};_cc.superclass=_c9&&_c9.prototype;_cc.extend=_b7;_cc.prototype=_cb;_cb.constructor=_cc;_cb.getInherited=_ae;_cb.inherited=_a4;_cb.isInstanceOf=_b1;if(_c8){_cb.declaredClass=_c8;d.setObject(_c8,_cc);}if(_cf){for(_cd in _cf){if(_cb[_cd]&&typeof _cf[_cd]=="string"&&_cd!=_99){t=_cb[_cd]=_c3(_cd,_ce,_cf[_cd]==="after");t.nom=_cd;}}}return _cc;};d.safeMixin=_b3;})();}if(!dojo._hasResource["dojo._base.connect"]){dojo._hasResource["dojo._base.connect"]=true;dojo.provide("dojo._base.connect");dojo._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target;var r=t&&t.apply(this,arguments);var lls;lls=[].concat(ls);for(var i in lls){if(!(i in ap)){lls[i].apply(this,arguments);}}return r;};},add:function(_d2,_d3,_d4){_d2=_d2||dojo.global;var f=_d2[_d3];if(!f||!f._listeners){var d=dojo._listener.getDispatcher();d.target=f;d._listeners=[];f=_d2[_d3]=d;}return f._listeners.push(_d4);},remove:function(_d5,_d6,_d7){var f=(_d5||dojo.global)[_d6];if(f&&f._listeners&&_d7--){delete f._listeners[_d7];}}};dojo.connect=function(obj,_d8,_d9,_da,_db){var a=arguments,_dc=[],i=0;_dc.push(dojo.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];_dc.push(dojo.isString(a1)||dojo.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){_dc.push(a[i]);}return dojo._connect.apply(this,_dc);};dojo._connect=function(obj,_dd,_de,_df){var l=dojo._listener,h=l.add(obj,_dd,dojo.hitch(_de,_df));return [obj,_dd,h,l];};dojo.disconnect=function(_e0){if(_e0&&_e0[0]!==undefined){dojo._disconnect.apply(this,_e0);delete _e0[0];}};dojo._disconnect=function(obj,_e1,_e2,_e3){_e3.remove(obj,_e1,_e2);};dojo._topics={};dojo.subscribe=function(_e4,_e5,_e6){return [_e4,dojo._listener.add(dojo._topics,_e4,dojo.hitch(_e5,_e6))];};dojo.unsubscribe=function(_e7){if(_e7){dojo._listener.remove(dojo._topics,_e7[0],_e7[1]);}};dojo.publish=function(_e8,_e9){var f=dojo._topics[_e8];if(f){f.apply(this,_e9||[]);}};dojo.connectPublisher=function(_ea,obj,_eb){var pf=function(){dojo.publish(_ea,arguments);};return (_eb)?dojo.connect(obj,_eb,pf):dojo.connect(obj,pf);};}if(!dojo._hasResource["dojo._base.Deferred"]){dojo._hasResource["dojo._base.Deferred"]=true;dojo.provide("dojo._base.Deferred");dojo.Deferred=function(_ec){this.chain=[];this.id=this._nextId();this.fired=-1;this.paused=0;this.results=[null,null];this.canceller=_ec;this.silentlyCancelled=false;this.isFiring=false;};dojo.extend(dojo.Deferred,{_nextId:(function(){var n=1;return function(){return n++;};})(),cancel:function(){var err;if(this.fired==-1){if(this.canceller){err=this.canceller(this);}else{this.silentlyCancelled=true;}if(this.fired==-1){if(!(err instanceof Error)){var res=err;var msg="Deferred Cancelled";if(err&&err.toString){msg+=": "+err.toString();}err=new Error(msg);err.dojoType="cancel";err.cancelResult=res;}this.errback(err);}}else{if((this.fired==0)&&(this.results[0] instanceof dojo.Deferred)){this.results[0].cancel();}}},_resback:function(res){this.fired=((res instanceof Error)?1:0);this.results[this.fired]=res;this._fire();},_check:function(){if(this.fired!=-1){if(!this.silentlyCancelled){throw new Error("already called!");}this.silentlyCancelled=false;return;}},callback:function(res){this._check();this._resback(res);},errback:function(res){this._check();if(!(res instanceof Error)){res=new Error(res);}this._resback(res);},addBoth:function(cb,_ed){var _ee=dojo.hitch.apply(dojo,arguments);return this.addCallbacks(_ee,_ee);},addCallback:function(cb,_ef){return this.addCallbacks(dojo.hitch.apply(dojo,arguments));},addErrback:function(cb,_f0){return this.addCallbacks(null,dojo.hitch.apply(dojo,arguments));},addCallbacks:function(cb,eb){this.chain.push([cb,eb]);if(this.fired>=0&&!this.isFiring){this._fire();}return this;},_fire:function(){this.isFiring=true;var _f1=this.chain;var _f2=this.fired;var res=this.results[_f2];var _f3=this;var cb=null;while((_f1.length>0)&&(this.paused==0)){var f=_f1.shift()[_f2];if(!f){continue;}var _f4=function(){var ret=f(res);if(typeof ret!="undefined"){res=ret;}_f2=((res instanceof Error)?1:0);if(res instanceof dojo.Deferred){cb=function(res){_f3._resback(res);_f3.paused--;if((_f3.paused==0)&&(_f3.fired>=0)){_f3._fire();}};this.paused++;}};if(dojo.config.debugAtAllCosts){_f4.call(this);}else{try{_f4.call(this);}catch(err){_f2=1;res=err;}}}this.fired=_f2;this.results[_f2]=res;this.isFiring=false;if((cb)&&(this.paused)){res.addBoth(cb);}}});}if(!dojo._hasResource["dojo._base.json"]){dojo._hasResource["dojo._base.json"]=true;dojo.provide("dojo._base.json");dojo.fromJson=function(_f5){return eval("("+_f5+")");};dojo._escapeString=function(str){return ("\""+str.replace(/(["\\])/g,"\\$1")+"\"").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r");};dojo.toJsonIndentStr="\t";dojo.toJson=function(it,_f6,_f7){if(it===undefined){return "undefined";}var _f8=typeof it;if(_f8=="number"||_f8=="boolean"){return it+"";}if(it===null){return "null";}if(dojo.isString(it)){return dojo._escapeString(it);}var _f9=arguments.callee;var _fa;_f7=_f7||"";var _fb=_f6?_f7+dojo.toJsonIndentStr:"";var tf=it.__json__||it.json;if(dojo.isFunction(tf)){_fa=tf.call(it);if(it!==_fa){return _f9(_fa,_f6,_fb);}}if(it.nodeType&&it.cloneNode){throw new Error("Can't serialize DOM nodes");}var sep=_f6?" ":"";var _fc=_f6?"\n":"";if(dojo.isArray(it)){var res=dojo.map(it,function(obj){var val=_f9(obj,_f6,_fb);if(typeof val!="string"){val="undefined";}return _fc+_fb+val;});return "["+res.join(","+sep)+_fc+_f7+"]";}if(_f8=="function"){return null;}var _fd=[],key;for(key in it){var _fe,val;if(typeof key=="number"){_fe="\""+key+"\"";}else{if(typeof key=="string"){_fe=dojo._escapeString(key);}else{continue;}}val=_f9(it[key],_f6,_fb);if(typeof val!="string"){continue;}_fd.push(_fc+_fb+_fe+":"+sep+val);}return "{"+_fd.join(","+sep)+_fc+_f7+"}";};}if(!dojo._hasResource["dojo._base.Color"]){dojo._hasResource["dojo._base.Color"]=true;dojo.provide("dojo._base.Color");(function(){var d=dojo;dojo.Color=function(_ff){if(_ff){this.setColor(_ff);}};dojo.Color.named={black:[0,0,0],silver:[192,192,192],gray:[128,128,128],white:[255,255,255],maroon:[128,0,0],red:[255,0,0],purple:[128,0,128],fuchsia:[255,0,255],green:[0,128,0],lime:[0,255,0],olive:[128,128,0],yellow:[255,255,0],navy:[0,0,128],blue:[0,0,255],teal:[0,128,128],aqua:[0,255,255],transparent:d.config.transparentColor||[255,255,255]};dojo.extend(dojo.Color,{r:255,g:255,b:255,a:1,_set:function(r,g,b,a){var t=this;t.r=r;t.g=g;t.b=b;t.a=a;},setColor:function(_100){if(d.isString(_100)){d.colorFromString(_100,this);}else{if(d.isArray(_100)){d.colorFromArray(_100,this);}else{this._set(_100.r,_100.g,_100.b,_100.a);if(!(_100 instanceof d.Color)){this.sanitize();}}}return this;},sanitize:function(){return this;},toRgb:function(){var t=this;return [t.r,t.g,t.b];},toRgba:function(){var t=this;return [t.r,t.g,t.b,t.a];},toHex:function(){var arr=d.map(["r","g","b"],function(x){var s=this[x].toString(16);return s.length<2?"0"+s:s;},this);return "#"+arr.join("");},toCss:function(_101){var t=this,rgb=t.r+", "+t.g+", "+t.b;return (_101?"rgba("+rgb+", "+t.a:"rgb("+rgb)+")";},toString:function(){return this.toCss(true);}});dojo.blendColors=function(_102,end,_103,obj){var t=obj||new d.Color();d.forEach(["r","g","b","a"],function(x){t[x]=_102[x]+(end[x]-_102[x])*_103;if(x!="a"){t[x]=Math.round(t[x]);}});return t.sanitize();};dojo.colorFromRgb=function(_104,obj){var m=_104.toLowerCase().match(/^rgba?\(([\s\.,0-9]+)\)/);return m&&dojo.colorFromArray(m[1].split(/\s*,\s*/),obj);};dojo.colorFromHex=function(_105,obj){var t=obj||new d.Color(),bits=(_105.length==4)?4:8,mask=(1<<bits)-1;_105=Number("0x"+_105.substr(1));if(isNaN(_105)){return null;}d.forEach(["b","g","r"],function(x){var c=_105&mask;_105>>=bits;t[x]=bits==4?17*c:c;});t.a=1;return t;};dojo.colorFromArray=function(a,obj){var t=obj||new d.Color();t._set(Number(a[0]),Number(a[1]),Number(a[2]),Number(a[3]));if(isNaN(t.a)){t.a=1;}return t.sanitize();};dojo.colorFromString=function(str,obj){var a=d.Color.named[str];return a&&d.colorFromArray(a,obj)||d.colorFromRgb(str,obj)||d.colorFromHex(str,obj);};})();}if(!dojo._hasResource["dojo._base"]){dojo._hasResource["dojo._base"]=true;dojo.provide("dojo._base");}if(!dojo._hasResource["dojo._base.window"]){dojo._hasResource["dojo._base.window"]=true;dojo.provide("dojo._base.window");dojo.doc=window["document"]||null;dojo.body=function(){return dojo.doc.body||dojo.doc.getElementsByTagName("body")[0];};dojo.setContext=function(_106,_107){dojo.global=_106;dojo.doc=_107;};dojo.withGlobal=function(_108,_109,_10a,_10b){var _10c=dojo.global;try{dojo.global=_108;return dojo.withDoc.call(null,_108.document,_109,_10a,_10b);}finally{dojo.global=_10c;}};dojo.withDoc=function(_10d,_10e,_10f,_110){var _111=dojo.doc,_112=dojo._bodyLtr,oldQ=dojo.isQuirks;try{dojo.doc=_10d;delete dojo._bodyLtr;dojo.isQuirks=dojo.doc.compatMode=="BackCompat";if(_10f&&typeof _10e=="string"){_10e=_10f[_10e];}return _10e.apply(_10f,_110||[]);}finally{dojo.doc=_111;delete dojo._bodyLtr;if(_112!==undefined){dojo._bodyLtr=_112;}dojo.isQuirks=oldQ;}};}if(!dojo._hasResource["dojo._base.event"]){dojo._hasResource["dojo._base.event"]=true;dojo.provide("dojo._base.event");(function(){var del=(dojo._event_listener={add:function(node,name,fp){if(!node){return;}name=del._normalizeEventName(name);fp=del._fixCallback(name,fp);var _113=name;if(!dojo.isIE&&(name=="mouseenter"||name=="mouseleave")){var ofp=fp;name=(name=="mouseenter")?"mouseover":"mouseout";fp=function(e){if(!dojo.isDescendant(e.relatedTarget,node)){return ofp.call(this,e);}};}node.addEventListener(name,fp,false);return fp;},remove:function(node,_114,_115){if(node){_114=del._normalizeEventName(_114);if(!dojo.isIE&&(_114=="mouseenter"||_114=="mouseleave")){_114=(_114=="mouseenter")?"mouseover":"mouseout";}node.removeEventListener(_114,_115,false);}},_normalizeEventName:function(name){return name.slice(0,2)=="on"?name.slice(2):name;},_fixCallback:function(name,fp){return name!="keypress"?fp:function(e){return fp.call(this,del._fixEvent(e,this));};},_fixEvent:function(evt,_116){switch(evt.type){case "keypress":del._setKeyChar(evt);break;}return evt;},_setKeyChar:function(evt){evt.keyChar=evt.charCode?String.fromCharCode(evt.charCode):"";evt.charOrCode=evt.keyChar||evt.keyCode;},_punctMap:{106:42,111:47,186:59,187:43,188:44,189:45,190:46,191:47,192:96,219:91,220:92,221:93,222:39}});dojo.fixEvent=function(evt,_117){return del._fixEvent(evt,_117);};dojo.stopEvent=function(evt){evt.preventDefault();evt.stopPropagation();};var _118=dojo._listener;dojo._connect=function(obj,_119,_11a,_11b,_11c){var _11d=obj&&(obj.nodeType||obj.attachEvent||obj.addEventListener);var lid=_11d?(_11c?2:1):0,l=[dojo._listener,del,_118][lid];var h=l.add(obj,_119,dojo.hitch(_11a,_11b));return [obj,_119,h,lid];};dojo._disconnect=function(obj,_11e,_11f,_120){([dojo._listener,del,_118][_120]).remove(obj,_11e,_11f);};dojo.keys={BACKSPACE:8,TAB:9,CLEAR:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,META:dojo.isSafari?91:224,PAUSE:19,CAPS_LOCK:20,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,INSERT:45,DELETE:46,HELP:47,LEFT_WINDOW:91,RIGHT_WINDOW:92,SELECT:93,NUMPAD_0:96,NUMPAD_1:97,NUMPAD_2:98,NUMPAD_3:99,NUMPAD_4:100,NUMPAD_5:101,NUMPAD_6:102,NUMPAD_7:103,NUMPAD_8:104,NUMPAD_9:105,NUMPAD_MULTIPLY:106,NUMPAD_PLUS:107,NUMPAD_ENTER:108,NUMPAD_MINUS:109,NUMPAD_PERIOD:110,NUMPAD_DIVIDE:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,NUM_LOCK:144,SCROLL_LOCK:145,copyKey:dojo.isMac&&!dojo.isAIR?(dojo.isSafari?91:224):17};var _121=dojo.isMac?"metaKey":"ctrlKey";dojo.isCopyKey=function(e){return e[_121];};if(dojo.isIE){dojo.mouseButtons={LEFT:1,MIDDLE:4,RIGHT:2,isButton:function(e,_122){return e.button&_122;},isLeft:function(e){return e.button&1;},isMiddle:function(e){return e.button&4;},isRight:function(e){return e.button&2;}};}else{dojo.mouseButtons={LEFT:0,MIDDLE:1,RIGHT:2,isButton:function(e,_123){return e.button==_123;},isLeft:function(e){return e.button==0;},isMiddle:function(e){return e.button==1;},isRight:function(e){return e.button==2;}};}if(dojo.isIE){var _124=function(e,code){try{return (e.keyCode=code);}catch(e){return 0;}};var iel=dojo._listener;var _125=(dojo._ieListenersName="_"+dojo._scopeName+"_listeners");if(!dojo.config._allow_leaks){_118=iel=dojo._ie_listener={handlers:[],add:function(_126,_127,_128){_126=_126||dojo.global;var f=_126[_127];if(!f||!f[_125]){var d=dojo._getIeDispatcher();d.target=f&&(ieh.push(f)-1);d[_125]=[];f=_126[_127]=d;}return f[_125].push(ieh.push(_128)-1);},remove:function(_129,_12a,_12b){var f=(_129||dojo.global)[_12a],l=f&&f[_125];if(f&&l&&_12b--){delete ieh[l[_12b]];delete l[_12b];}}};var ieh=iel.handlers;}dojo.mixin(del,{add:function(node,_12c,fp){if(!node){return;}_12c=del._normalizeEventName(_12c);if(_12c=="onkeypress"){var kd=node.onkeydown;if(!kd||!kd[_125]||!kd._stealthKeydownHandle){var h=del.add(node,"onkeydown",del._stealthKeyDown);kd=node.onkeydown;kd._stealthKeydownHandle=h;kd._stealthKeydownRefs=1;}else{kd._stealthKeydownRefs++;}}return iel.add(node,_12c,del._fixCallback(fp));},remove:function(node,_12d,_12e){_12d=del._normalizeEventName(_12d);iel.remove(node,_12d,_12e);if(_12d=="onkeypress"){var kd=node.onkeydown;if(--kd._stealthKeydownRefs<=0){iel.remove(node,"onkeydown",kd._stealthKeydownHandle);delete kd._stealthKeydownHandle;}}},_normalizeEventName:function(_12f){return _12f.slice(0,2)!="on"?"on"+_12f:_12f;},_nop:function(){},_fixEvent:function(evt,_130){if(!evt){var w=_130&&(_130.ownerDocument||_130.document||_130).parentWindow||window;evt=w.event;}if(!evt){return (evt);}evt.target=evt.srcElement;evt.currentTarget=(_130||evt.srcElement);evt.layerX=evt.offsetX;evt.layerY=evt.offsetY;var se=evt.srcElement,doc=(se&&se.ownerDocument)||document;var _131=((dojo.isIE<6)||(doc["compatMode"]=="BackCompat"))?doc.body:doc.documentElement;var _132=dojo._getIeDocumentElementOffset();evt.pageX=evt.clientX+dojo._fixIeBiDiScrollLeft(_131.scrollLeft||0)-_132.x;evt.pageY=evt.clientY+(_131.scrollTop||0)-_132.y;if(evt.type=="mouseover"){evt.relatedTarget=evt.fromElement;}if(evt.type=="mouseout"){evt.relatedTarget=evt.toElement;}evt.stopPropagation=del._stopPropagation;evt.preventDefault=del._preventDefault;return del._fixKeys(evt);},_fixKeys:function(evt){switch(evt.type){case "keypress":var c=("charCode" in evt?evt.charCode:evt.keyCode);if(c==10){c=0;evt.keyCode=13;}else{if(c==13||c==27){c=0;}else{if(c==3){c=99;}}}evt.charCode=c;del._setKeyChar(evt);break;}return evt;},_stealthKeyDown:function(evt){var kp=evt.currentTarget.onkeypress;if(!kp||!kp[_125]){return;}var k=evt.keyCode;var _133=k!=13&&k!=32&&k!=27&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_133||evt.ctrlKey){var c=_133?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if((!evt.shiftKey)&&(c>=65&&c<=90)){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});kp.call(evt.currentTarget,faux);evt.cancelBubble=faux.cancelBubble;evt.returnValue=faux.returnValue;_124(evt,faux.keyCode);}},_stopPropagation:function(){this.cancelBubble=true;},_preventDefault:function(){this.bubbledKeyCode=this.keyCode;if(this.ctrlKey){_124(this,0);}this.returnValue=false;}});dojo.stopEvent=function(evt){evt=evt||window.event;del._stopPropagation.call(evt);del._preventDefault.call(evt);};}del._synthesizeEvent=function(evt,_134){var faux=dojo.mixin({},evt,_134);del._setKeyChar(faux);faux.preventDefault=function(){evt.preventDefault();};faux.stopPropagation=function(){evt.stopPropagation();};return faux;};if(dojo.isOpera){dojo.mixin(del,{_fixEvent:function(evt,_135){switch(evt.type){case "keypress":var c=evt.which;if(c==3){c=99;}c=c<41&&!evt.shiftKey?0:c;if(evt.ctrlKey&&!evt.shiftKey&&c>=65&&c<=90){c+=32;}return del._synthesizeEvent(evt,{charCode:c});}return evt;}});}if(dojo.isWebKit){del._add=del.add;del._remove=del.remove;dojo.mixin(del,{add:function(node,_136,fp){if(!node){return;}var _137=del._add(node,_136,fp);if(del._normalizeEventName(_136)=="keypress"){_137._stealthKeyDownHandle=del._add(node,"keydown",function(evt){var k=evt.keyCode;var _138=k!=13&&k!=32&&(k<48||k>90)&&(k<96||k>111)&&(k<186||k>192)&&(k<219||k>222);if(_138||evt.ctrlKey){var c=_138?0:k;if(evt.ctrlKey){if(k==3||k==13){return;}else{if(c>95&&c<106){c-=48;}else{if(!evt.shiftKey&&c>=65&&c<=90){c+=32;}else{c=del._punctMap[c]||c;}}}}var faux=del._synthesizeEvent(evt,{type:"keypress",faux:true,charCode:c});fp.call(evt.currentTarget,faux);}});}return _137;},remove:function(node,_139,_13a){if(node){if(_13a._stealthKeyDownHandle){del._remove(node,"keydown",_13a._stealthKeyDownHandle);}del._remove(node,_139,_13a);}},_fixEvent:function(evt,_13b){switch(evt.type){case "keypress":if(evt.faux){return evt;}var c=evt.charCode;c=c>=32?c:0;return del._synthesizeEvent(evt,{charCode:c,faux:true});}return evt;}});}})();if(dojo.isIE){dojo._ieDispatcher=function(args,_13c){var ap=Array.prototype,h=dojo._ie_listener.handlers,c=args.callee,ls=c[dojo._ieListenersName],t=h[c.target];var r=t&&t.apply(_13c,args);var lls=[].concat(ls);for(var i in lls){var f=h[lls[i]];if(!(i in ap)&&f){f.apply(_13c,args);}}return r;};dojo._getIeDispatcher=function(){return new Function(dojo._scopeName+"._ieDispatcher(arguments, this)");};dojo._event_listener._fixCallback=function(fp){var f=dojo._event_listener._fixEvent;return function(e){return fp.call(this,f(e,this));};};}}if(!dojo._hasResource["dojo._base.html"]){dojo._hasResource["dojo._base.html"]=true;dojo.provide("dojo._base.html");try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}if(dojo.isIE||dojo.isOpera){dojo.byId=function(id,doc){if(typeof id!="string"){return id;}var _13d=doc||dojo.doc,te=_13d.getElementById(id);if(te&&(te.attributes.id.value==id||te.id==id)){return te;}else{var eles=_13d.all[id];if(!eles||eles.nodeName){eles=[eles];}var i=0;while((te=eles[i++])){if((te.attributes&&te.attributes.id&&te.attributes.id.value==id)||te.id==id){return te;}}}};}else{dojo.byId=function(id,doc){return (typeof id=="string")?(doc||dojo.doc).getElementById(id):id;};}(function(){var d=dojo;var byId=d.byId;var _13e=null,_13f;d.addOnWindowUnload(function(){_13e=null;});dojo._destroyElement=dojo.destroy=function(node){node=byId(node);try{var doc=node.ownerDocument;if(!_13e||_13f!=doc){_13e=doc.createElement("div");_13f=doc;}_13e.appendChild(node.parentNode?node.parentNode.removeChild(node):node);_13e.innerHTML="";}catch(e){}};dojo.isDescendant=function(node,_140){try{node=byId(node);_140=byId(_140);while(node){if(node==_140){return true;}node=node.parentNode;}}catch(e){}return false;};dojo.setSelectable=function(node,_141){node=byId(node);if(d.isMozilla){node.style.MozUserSelect=_141?"":"none";}else{if(d.isKhtml||d.isWebKit){node.style.KhtmlUserSelect=_141?"auto":"none";}else{if(d.isIE){var v=(node.unselectable=_141?"":"on");d.query("*",node).forEach("item.unselectable = '"+v+"'");}}}};var _142=function(node,ref){var _143=ref.parentNode;if(_143){_143.insertBefore(node,ref);}};var _144=function(node,ref){var _145=ref.parentNode;if(_145){if(_145.lastChild==ref){_145.appendChild(node);}else{_145.insertBefore(node,ref.nextSibling);}}};dojo.place=function(node,_146,_147){_146=byId(_146);if(typeof node=="string"){node=node.charAt(0)=="<"?d._toDom(node,_146.ownerDocument):byId(node);}if(typeof _147=="number"){var cn=_146.childNodes;if(!cn.length||cn.length<=_147){_146.appendChild(node);}else{_142(node,cn[_147<0?0:_147]);}}else{switch(_147){case "before":_142(node,_146);break;case "after":_144(node,_146);break;case "replace":_146.parentNode.replaceChild(node,_146);break;case "only":d.empty(_146);_146.appendChild(node);break;case "first":if(_146.firstChild){_142(node,_146.firstChild);break;}default:_146.appendChild(node);}}return node;};dojo.boxModel="content-box";if(d.isIE){d.boxModel=document.compatMode=="BackCompat"?"border-box":"content-box";}var gcs;if(d.isWebKit){gcs=function(node){var s;if(node.nodeType==1){var dv=node.ownerDocument.defaultView;s=dv.getComputedStyle(node,null);if(!s&&node.style){node.style.display="";s=dv.getComputedStyle(node,null);}}return s||{};};}else{if(d.isIE){gcs=function(node){return node.nodeType==1?node.currentStyle:{};};}else{gcs=function(node){return node.nodeType==1?node.ownerDocument.defaultView.getComputedStyle(node,null):{};};}}dojo.getComputedStyle=gcs;if(!d.isIE){d._toPixelValue=function(_148,_149){return parseFloat(_149)||0;};}else{d._toPixelValue=function(_14a,_14b){if(!_14b){return 0;}if(_14b=="medium"){return 4;}if(_14b.slice&&_14b.slice(-2)=="px"){return parseFloat(_14b);}with(_14a){var _14c=style.left;var _14d=runtimeStyle.left;runtimeStyle.left=currentStyle.left;try{style.left=_14b;_14b=style.pixelLeft;}catch(e){_14b=0;}style.left=_14c;runtimeStyle.left=_14d;}return _14b;};}var px=d._toPixelValue;var astr="DXImageTransform.Microsoft.Alpha";var af=function(n,f){try{return n.filters.item(astr);}catch(e){return f?{}:null;}};dojo._getOpacity=d.isIE?function(node){try{return af(node).Opacity/100;}catch(e){return 1;}}:function(node){return gcs(node).opacity;};dojo._setOpacity=d.isIE?function(node,_14e){var ov=_14e*100;node.style.zoom=1;af(node,1).Enabled=!(_14e==1);if(!af(node)){node.style.filter+=" progid:"+astr+"(Opacity="+ov+")";}else{af(node,1).Opacity=ov;}if(node.nodeName.toLowerCase()=="tr"){d.query("> td",node).forEach(function(i){d._setOpacity(i,_14e);});}return _14e;}:function(node,_14f){return node.style.opacity=_14f;};var _150={left:true,top:true};var _151=/margin|padding|width|height|max|min|offset/;var _152=function(node,type,_153){type=type.toLowerCase();if(d.isIE){if(_153=="auto"){if(type=="height"){return node.offsetHeight;}if(type=="width"){return node.offsetWidth;}}if(type=="fontweight"){switch(_153){case 700:return "bold";case 400:default:return "normal";}}}if(!(type in _150)){_150[type]=_151.test(type);}return _150[type]?px(node,_153):_153;};var _154=d.isIE?"styleFloat":"cssFloat",_155={"cssFloat":_154,"styleFloat":_154,"float":_154};dojo.style=function(node,_156,_157){var n=byId(node),args=arguments.length,op=(_156=="opacity");_156=_155[_156]||_156;if(args==3){return op?d._setOpacity(n,_157):n.style[_156]=_157;}if(args==2&&op){return d._getOpacity(n);}var s=gcs(n);if(args==2&&typeof _156!="string"){for(var x in _156){d.style(node,x,_156[x]);}return s;}return (args==1)?s:_152(n,_156,s[_156]||n.style[_156]);};dojo._getPadExtents=function(n,_158){var s=_158||gcs(n),l=px(n,s.paddingLeft),t=px(n,s.paddingTop);return {l:l,t:t,w:l+px(n,s.paddingRight),h:t+px(n,s.paddingBottom)};};dojo._getBorderExtents=function(n,_159){var ne="none",s=_159||gcs(n),bl=(s.borderLeftStyle!=ne?px(n,s.borderLeftWidth):0),bt=(s.borderTopStyle!=ne?px(n,s.borderTopWidth):0);return {l:bl,t:bt,w:bl+(s.borderRightStyle!=ne?px(n,s.borderRightWidth):0),h:bt+(s.borderBottomStyle!=ne?px(n,s.borderBottomWidth):0)};};dojo._getPadBorderExtents=function(n,_15a){var s=_15a||gcs(n),p=d._getPadExtents(n,s),b=d._getBorderExtents(n,s);return {l:p.l+b.l,t:p.t+b.t,w:p.w+b.w,h:p.h+b.h};};dojo._getMarginExtents=function(n,_15b){var s=_15b||gcs(n),l=px(n,s.marginLeft),t=px(n,s.marginTop),r=px(n,s.marginRight),b=px(n,s.marginBottom);if(d.isWebKit&&(s.position!="absolute")){r=l;}return {l:l,t:t,w:l+r,h:t+b};};dojo._getMarginBox=function(node,_15c){var s=_15c||gcs(node),me=d._getMarginExtents(node,s);var l=node.offsetLeft-me.l,t=node.offsetTop-me.t,p=node.parentNode;if(d.isMoz){var sl=parseFloat(s.left),st=parseFloat(s.top);if(!isNaN(sl)&&!isNaN(st)){l=sl,t=st;}else{if(p&&p.style){var pcs=gcs(p);if(pcs.overflow!="visible"){var be=d._getBorderExtents(p,pcs);l+=be.l,t+=be.t;}}}}else{if(d.isOpera||(d.isIE>7&&!d.isQuirks)){if(p){be=d._getBorderExtents(p);l-=be.l;t-=be.t;}}}return {l:l,t:t,w:node.offsetWidth+me.w,h:node.offsetHeight+me.h};};dojo._getContentBox=function(node,_15d){var s=_15d||gcs(node),pe=d._getPadExtents(node,s),be=d._getBorderExtents(node,s),w=node.clientWidth,h;if(!w){w=node.offsetWidth,h=node.offsetHeight;}else{h=node.clientHeight,be.w=be.h=0;}if(d.isOpera){pe.l+=be.l;pe.t+=be.t;}return {l:pe.l,t:pe.t,w:w-pe.w-be.w,h:h-pe.h-be.h};};dojo._getBorderBox=function(node,_15e){var s=_15e||gcs(node),pe=d._getPadExtents(node,s),cb=d._getContentBox(node,s);return {l:cb.l-pe.l,t:cb.t-pe.t,w:cb.w+pe.w,h:cb.h+pe.h};};dojo._setBox=function(node,l,t,w,h,u){u=u||"px";var s=node.style;if(!isNaN(l)){s.left=l+u;}if(!isNaN(t)){s.top=t+u;}if(w>=0){s.width=w+u;}if(h>=0){s.height=h+u;}};dojo._isButtonTag=function(node){return node.tagName=="BUTTON"||node.tagName=="INPUT"&&(node.getAttribute("type")||"").toUpperCase()=="BUTTON";};dojo._usesBorderBox=function(node){var n=node.tagName;return d.boxModel=="border-box"||n=="TABLE"||d._isButtonTag(node);};dojo._setContentSize=function(node,_15f,_160,_161){if(d._usesBorderBox(node)){var pb=d._getPadBorderExtents(node,_161);if(_15f>=0){_15f+=pb.w;}if(_160>=0){_160+=pb.h;}}d._setBox(node,NaN,NaN,_15f,_160);};dojo._setMarginBox=function(node,_162,_163,_164,_165,_166){var s=_166||gcs(node),bb=d._usesBorderBox(node),pb=bb?_167:d._getPadBorderExtents(node,s);if(d.isWebKit){if(d._isButtonTag(node)){var ns=node.style;if(_164>=0&&!ns.width){ns.width="4px";}if(_165>=0&&!ns.height){ns.height="4px";}}}var mb=d._getMarginExtents(node,s);if(_164>=0){_164=Math.max(_164-pb.w-mb.w,0);}if(_165>=0){_165=Math.max(_165-pb.h-mb.h,0);}d._setBox(node,_162,_163,_164,_165);};var _167={l:0,t:0,w:0,h:0};dojo.marginBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getMarginBox(n,s):d._setMarginBox(n,b.l,b.t,b.w,b.h,s);};dojo.contentBox=function(node,box){var n=byId(node),s=gcs(n),b=box;return !b?d._getContentBox(n,s):d._setContentSize(n,b.w,b.h,s);};var _168=function(node,prop){if(!(node=(node||0).parentNode)){return 0;}var val,_169=0,_16a=d.body();while(node&&node.style){if(gcs(node).position=="fixed"){return 0;}val=node[prop];if(val){_169+=val-0;if(node==_16a){break;}}node=node.parentNode;}return _169;};dojo._docScroll=function(){var n=d.global;return "pageXOffset" in n?{x:n.pageXOffset,y:n.pageYOffset}:(n=d.doc.documentElement,n.clientHeight?{x:d._fixIeBiDiScrollLeft(n.scrollLeft),y:n.scrollTop}:(n=d.body(),{x:n.scrollLeft||0,y:n.scrollTop||0}));};dojo._isBodyLtr=function(){return "_bodyLtr" in d?d._bodyLtr:d._bodyLtr=(d.body().dir||d.doc.documentElement.dir||"ltr").toLowerCase()=="ltr";};dojo._getIeDocumentElementOffset=function(){var de=d.doc.documentElement;if(d.isIE<8){var r=de.getBoundingClientRect();var l=r.left,t=r.top;if(d.isIE<7){l+=de.clientLeft;t+=de.clientTop;}return {x:l<0?0:l,y:t<0?0:t};}else{return {x:0,y:0};}};dojo._fixIeBiDiScrollLeft=function(_16b){var dd=d.doc;if(d.isIE<8&&!d._isBodyLtr()){var de=d.isQuirks?dd.body:dd.documentElement;return _16b+de.clientWidth-de.scrollWidth;}return _16b;};dojo._abs=dojo.position=function(node,_16c){var db=d.body(),dh=db.parentNode,ret;node=byId(node);if(node["getBoundingClientRect"]){ret=node.getBoundingClientRect();ret={x:ret.left,y:ret.top,w:ret.right-ret.left,h:ret.bottom-ret.top};if(d.isIE){var _16d=d._getIeDocumentElementOffset();ret.x-=_16d.x+(d.isQuirks?db.clientLeft+db.offsetLeft:0);ret.y-=_16d.y+(d.isQuirks?db.clientTop+db.offsetTop:0);}else{if(d.isFF==3){var cs=gcs(dh);ret.x-=px(dh,cs.marginLeft)+px(dh,cs.borderLeftWidth);ret.y-=px(dh,cs.marginTop)+px(dh,cs.borderTopWidth);}}}else{ret={x:0,y:0,w:node.offsetWidth,h:node.offsetHeight};if(node["offsetParent"]){ret.x-=_168(node,"scrollLeft");ret.y-=_168(node,"scrollTop");var _16e=node;do{var n=_16e.offsetLeft,t=_16e.offsetTop;ret.x+=isNaN(n)?0:n;ret.y+=isNaN(t)?0:t;cs=gcs(_16e);if(_16e!=node){if(d.isMoz){ret.x+=2*px(_16e,cs.borderLeftWidth);ret.y+=2*px(_16e,cs.borderTopWidth);}else{ret.x+=px(_16e,cs.borderLeftWidth);ret.y+=px(_16e,cs.borderTopWidth);}}if(d.isMoz&&cs.position=="static"){var _16f=_16e.parentNode;while(_16f!=_16e.offsetParent){var pcs=gcs(_16f);if(pcs.position=="static"){ret.x+=px(_16e,pcs.borderLeftWidth);ret.y+=px(_16e,pcs.borderTopWidth);}_16f=_16f.parentNode;}}_16e=_16e.offsetParent;}while((_16e!=dh)&&_16e);}else{if(node.x&&node.y){ret.x+=isNaN(node.x)?0:node.x;ret.y+=isNaN(node.y)?0:node.y;}}}if(_16c){var _170=d._docScroll();ret.x+=_170.x;ret.y+=_170.y;}return ret;};dojo.coords=function(node,_171){var n=byId(node),s=gcs(n),mb=d._getMarginBox(n,s);var abs=d.position(n,_171);mb.x=abs.x;mb.y=abs.y;return mb;};var _172={"class":"className","for":"htmlFor",tabindex:"tabIndex",readonly:"readOnly",colspan:"colSpan",frameborder:"frameBorder",rowspan:"rowSpan",valuetype:"valueType"},_173={classname:"class",htmlfor:"for",tabindex:"tabIndex",readonly:"readOnly"},_174={innerHTML:1,className:1,htmlFor:d.isIE,value:1};var _175=function(name){return _173[name.toLowerCase()]||name;};var _176=function(node,name){var attr=node.getAttributeNode&&node.getAttributeNode(name);return attr&&attr.specified;};dojo.hasAttr=function(node,name){var lc=name.toLowerCase();return _174[_172[lc]||name]||_176(byId(node),_173[lc]||name);};var _177={},_178=0,_179=dojo._scopeName+"attrid",_17a={col:1,colgroup:1,table:1,tbody:1,tfoot:1,thead:1,tr:1,title:1};dojo.attr=function(node,name,_17b){node=byId(node);var args=arguments.length,prop;if(args==2&&typeof name!="string"){for(var x in name){d.attr(node,x,name[x]);}return node;}var lc=name.toLowerCase(),_17c=_172[lc]||name,_17d=_174[_17c],_17e=_173[lc]||name;if(args==3){do{if(_17c=="style"&&typeof _17b!="string"){d.style(node,_17b);break;}if(_17c=="innerHTML"){if(d.isIE&&node.tagName.toLowerCase() in _17a){d.empty(node);node.appendChild(d._toDom(_17b,node.ownerDocument));}else{node[_17c]=_17b;}break;}if(d.isFunction(_17b)){var _17f=d.attr(node,_179);if(!_17f){_17f=_178++;d.attr(node,_179,_17f);}if(!_177[_17f]){_177[_17f]={};}var h=_177[_17f][_17c];if(h){d.disconnect(h);}else{try{delete node[_17c];}catch(e){}}_177[_17f][_17c]=d.connect(node,_17c,_17b);break;}if(_17d||typeof _17b=="boolean"){node[_17c]=_17b;break;}node.setAttribute(_17e,_17b);}while(false);return node;}_17b=node[_17c];if(_17d&&typeof _17b!="undefined"){return _17b;}if(_17c!="href"&&(typeof _17b=="boolean"||d.isFunction(_17b))){return _17b;}return _176(node,_17e)?node.getAttribute(_17e):null;};dojo.removeAttr=function(node,name){byId(node).removeAttribute(_175(name));};dojo.getNodeProp=function(node,name){node=byId(node);var lc=name.toLowerCase(),_180=_172[lc]||name;if((_180 in node)&&_180!="href"){return node[_180];}var _181=_173[lc]||name;return _176(node,_181)?node.getAttribute(_181):null;};dojo.create=function(tag,_182,_183,pos){var doc=d.doc;if(_183){_183=byId(_183);doc=_183.ownerDocument;}if(typeof tag=="string"){tag=doc.createElement(tag);}if(_182){d.attr(tag,_182);}if(_183){d.place(tag,_183,pos);}return tag;};d.empty=d.isIE?function(node){node=byId(node);for(var c;c=node.lastChild;){d.destroy(c);}}:function(node){byId(node).innerHTML="";};var _184={option:["select"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","thead","tr"],legend:["fieldset"],caption:["table"],colgroup:["table"],col:["table","colgroup"],li:["ul"]},_185=/<\s*([\w\:]+)/,_186={},_187=0,_188="__"+d._scopeName+"ToDomId";for(var _189 in _184){var tw=_184[_189];tw.pre=_189=="option"?"<select multiple=\"multiple\">":"<"+tw.join("><")+">";tw.post="</"+tw.reverse().join("></")+">";}d._toDom=function(frag,doc){doc=doc||d.doc;var _18a=doc[_188];if(!_18a){doc[_188]=_18a=++_187+"";_186[_18a]=doc.createElement("div");}frag+="";var _18b=frag.match(_185),tag=_18b?_18b[1].toLowerCase():"",_18c=_186[_18a],wrap,i,fc,df;if(_18b&&_184[tag]){wrap=_184[tag];_18c.innerHTML=wrap.pre+frag+wrap.post;for(i=wrap.length;i;--i){_18c=_18c.firstChild;}}else{_18c.innerHTML=frag;}if(_18c.childNodes.length==1){return _18c.removeChild(_18c.firstChild);}df=doc.createDocumentFragment();while(fc=_18c.firstChild){df.appendChild(fc);}return df;};var _18d="className";dojo.hasClass=function(node,_18e){return ((" "+byId(node)[_18d]+" ").indexOf(" "+_18e+" ")>=0);};var _18f=/\s+/,a1=[""],_190=function(s){if(typeof s=="string"||s instanceof String){if(s.indexOf(" ")<0){a1[0]=s;return a1;}else{return s.split(_18f);}}return s;};dojo.addClass=function(node,_191){node=byId(node);_191=_190(_191);var cls=" "+node[_18d]+" ";for(var i=0,len=_191.length,c;i<len;++i){c=_191[i];if(c&&cls.indexOf(" "+c+" ")<0){cls+=c+" ";}}node[_18d]=d.trim(cls);};dojo.removeClass=function(node,_192){node=byId(node);var cls;if(_192!==undefined){_192=_190(_192);cls=" "+node[_18d]+" ";for(var i=0,len=_192.length;i<len;++i){cls=cls.replace(" "+_192[i]+" "," ");}cls=d.trim(cls);}else{cls="";}if(node[_18d]!=cls){node[_18d]=cls;}};dojo.toggleClass=function(node,_193,_194){if(_194===undefined){_194=!d.hasClass(node,_193);}d[_194?"addClass":"removeClass"](node,_193);};})();}if(!dojo._hasResource["dojo._base.NodeList"]){dojo._hasResource["dojo._base.NodeList"]=true;dojo.provide("dojo._base.NodeList");(function(){var d=dojo;var ap=Array.prototype,aps=ap.slice,apc=ap.concat;var tnl=function(a,_195,_196){if(!a.sort){a=aps.call(a,0);}var ctor=_196||this._NodeListCtor||d._NodeListCtor;a.constructor=ctor;dojo._mixin(a,ctor.prototype);a._NodeListCtor=ctor;return _195?a._stash(_195):a;};var _197=function(f,a,o){a=[0].concat(aps.call(a,0));o=o||d.global;return function(node){a[0]=node;return f.apply(o,a);};};var _198=function(f,o){return function(){this.forEach(_197(f,arguments,o));return this;};};var _199=function(f,o){return function(){return this.map(_197(f,arguments,o));};};var _19a=function(f,o){return function(){return this.filter(_197(f,arguments,o));};};var _19b=function(f,g,o){return function(){var a=arguments,body=_197(f,a,o);if(g.call(o||d.global,a)){return this.map(body);}this.forEach(body);return this;};};var _19c=function(a){return a.length==1&&(typeof a[0]=="string");};var _19d=function(node){var p=node.parentNode;if(p){p.removeChild(node);}};dojo.NodeList=function(){return tnl(Array.apply(null,arguments));};d._NodeListCtor=d.NodeList;var nl=d.NodeList,nlp=nl.prototype;nl._wrap=nlp._wrap=tnl;nl._adaptAsMap=_199;nl._adaptAsForEach=_198;nl._adaptAsFilter=_19a;nl._adaptWithCondition=_19b;d.forEach(["slice","splice"],function(name){var f=ap[name];nlp[name]=function(){return this._wrap(f.apply(this,arguments),name=="slice"?this:null);};});d.forEach(["indexOf","lastIndexOf","every","some"],function(name){var f=d[name];nlp[name]=function(){return f.apply(d,[this].concat(aps.call(arguments,0)));};});d.forEach(["attr","style"],function(name){nlp[name]=_19b(d[name],_19c);});d.forEach(["connect","addClass","removeClass","toggleClass","empty","removeAttr"],function(name){nlp[name]=_198(d[name]);});dojo.extend(dojo.NodeList,{_normalize:function(_19e,_19f){var _1a0=_19e.parse===true?true:false;if(typeof _19e.template=="string"){var _1a1=_19e.templateFunc||(dojo.string&&dojo.string.substitute);_19e=_1a1?_1a1(_19e.template,_19e):_19e;}var type=(typeof _19e);if(type=="string"||type=="number"){_19e=dojo._toDom(_19e,(_19f&&_19f.ownerDocument));if(_19e.nodeType==11){_19e=dojo._toArray(_19e.childNodes);}else{_19e=[_19e];}}else{if(!dojo.isArrayLike(_19e)){_19e=[_19e];}else{if(!dojo.isArray(_19e)){_19e=dojo._toArray(_19e);}}}if(_1a0){_19e._runParse=true;}return _19e;},_cloneNode:function(node){return node.cloneNode(true);},_place:function(ary,_1a2,_1a3,_1a4){if(_1a2.nodeType!=1&&_1a3=="only"){return;}var _1a5=_1a2,_1a6;var _1a7=ary.length;for(var i=_1a7-1;i>=0;i--){var node=(_1a4?this._cloneNode(ary[i]):ary[i]);if(ary._runParse&&dojo.parser&&dojo.parser.parse){if(!_1a6){_1a6=_1a5.ownerDocument.createElement("div");}_1a6.appendChild(node);dojo.parser.parse(_1a6);node=_1a6.firstChild;while(_1a6.firstChild){_1a6.removeChild(_1a6.firstChild);}}if(i==_1a7-1){dojo.place(node,_1a5,_1a3);}else{_1a5.parentNode.insertBefore(node,_1a5);}_1a5=node;}},_stash:function(_1a8){this._parent=_1a8;return this;},end:function(){if(this._parent){return this._parent;}else{return new this._NodeListCtor();}},concat:function(item){var t=d.isArray(this)?this:aps.call(this,0),m=d.map(arguments,function(a){return a&&!d.isArray(a)&&(typeof NodeList!="undefined"&&a.constructor===NodeList||a.constructor===this._NodeListCtor)?aps.call(a,0):a;});return this._wrap(apc.apply(t,m),this);},map:function(func,obj){return this._wrap(d.map(this,func,obj),this);},forEach:function(_1a9,_1aa){d.forEach(this,_1a9,_1aa);return this;},coords:_199(d.coords),position:_199(d.position),place:function(_1ab,_1ac){var item=d.query(_1ab)[0];return this.forEach(function(node){d.place(node,item,_1ac);});},orphan:function(_1ad){return (_1ad?d._filterQueryResult(this,_1ad):this).forEach(_19d);},adopt:function(_1ae,_1af){return d.query(_1ae).place(this[0],_1af)._stash(this);},query:function(_1b0){if(!_1b0){return this;}var ret=this.map(function(node){return d.query(_1b0,node).filter(function(_1b1){return _1b1!==undefined;});});return this._wrap(apc.apply([],ret),this);},filter:function(_1b2){var a=arguments,_1b3=this,_1b4=0;if(typeof _1b2=="string"){_1b3=d._filterQueryResult(this,a[0]);if(a.length==1){return _1b3._stash(this);}_1b4=1;}return this._wrap(d.filter(_1b3,a[_1b4],a[_1b4+1]),this);},addContent:function(_1b5,_1b6){_1b5=this._normalize(_1b5,this[0]);for(var i=0,node;node=this[i];i++){this._place(_1b5,node,_1b6,i>0);}return this;},instantiate:function(_1b7,_1b8){var c=d.isFunction(_1b7)?_1b7:d.getObject(_1b7);_1b8=_1b8||{};return this.forEach(function(node){new c(_1b8,node);});},at:function(){var t=new this._NodeListCtor();d.forEach(arguments,function(i){if(this[i]){t.push(this[i]);}},this);return t._stash(this);}});nl.events=["blur","focus","change","click","error","keydown","keypress","keyup","load","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","submit"];d.forEach(nl.events,function(evt){var _1b9="on"+evt;nlp[_1b9]=function(a,b){return this.connect(_1b9,a,b);};});})();}if(!dojo._hasResource["dojo._base.query"]){dojo._hasResource["dojo._base.query"]=true;if(typeof dojo!="undefined"){dojo.provide("dojo._base.query");}(function(d){var trim=d.trim;var each=d.forEach;var qlc=d._NodeListCtor=d.NodeList;var _1ba=function(){return d.doc;};var _1bb=((d.isWebKit||d.isMozilla)&&((_1ba().compatMode)=="BackCompat"));var _1bc=!!_1ba().firstChild["children"]?"children":"childNodes";var _1bd=">~+";var _1be=false;var _1bf=function(){return true;};var _1c0=function(_1c1){if(_1bd.indexOf(_1c1.slice(-1))>=0){_1c1+=" * ";}else{_1c1+=" ";}var ts=function(s,e){return trim(_1c1.slice(s,e));};var _1c2=[];var _1c3=-1,_1c4=-1,_1c5=-1,_1c6=-1,_1c7=-1,inId=-1,_1c8=-1,lc="",cc="",_1c9;var x=0,ql=_1c1.length,_1ca=null,_1cb=null;var _1cc=function(){if(_1c8>=0){var tv=(_1c8==x)?null:ts(_1c8,x);_1ca[(_1bd.indexOf(tv)<0)?"tag":"oper"]=tv;_1c8=-1;}};var _1cd=function(){if(inId>=0){_1ca.id=ts(inId,x).replace(/\\/g,"");inId=-1;}};var _1ce=function(){if(_1c7>=0){_1ca.classes.push(ts(_1c7+1,x).replace(/\\/g,""));_1c7=-1;}};var _1cf=function(){_1cd();_1cc();_1ce();};var _1d0=function(){_1cf();if(_1c6>=0){_1ca.pseudos.push({name:ts(_1c6+1,x)});}_1ca.loops=(_1ca.pseudos.length||_1ca.attrs.length||_1ca.classes.length);_1ca.oquery=_1ca.query=ts(_1c9,x);_1ca.otag=_1ca.tag=(_1ca["oper"])?null:(_1ca.tag||"*");if(_1ca.tag){_1ca.tag=_1ca.tag.toUpperCase();}if(_1c2.length&&(_1c2[_1c2.length-1].oper)){_1ca.infixOper=_1c2.pop();_1ca.query=_1ca.infixOper.query+" "+_1ca.query;}_1c2.push(_1ca);_1ca=null;};for(;lc=cc,cc=_1c1.charAt(x),x<ql;x++){if(lc=="\\"){continue;}if(!_1ca){_1c9=x;_1ca={query:null,pseudos:[],attrs:[],classes:[],tag:null,oper:null,id:null,getTag:function(){return (_1be)?this.otag:this.tag;}};_1c8=x;}if(_1c3>=0){if(cc=="]"){if(!_1cb.attr){_1cb.attr=ts(_1c3+1,x);}else{_1cb.matchFor=ts((_1c5||_1c3+1),x);}var cmf=_1cb.matchFor;if(cmf){if((cmf.charAt(0)=="\"")||(cmf.charAt(0)=="'")){_1cb.matchFor=cmf.slice(1,-1);}}_1ca.attrs.push(_1cb);_1cb=null;_1c3=_1c5=-1;}else{if(cc=="="){var _1d1=("|~^$*".indexOf(lc)>=0)?lc:"";_1cb.type=_1d1+cc;_1cb.attr=ts(_1c3+1,x-_1d1.length);_1c5=x+1;}}}else{if(_1c4>=0){if(cc==")"){if(_1c6>=0){_1cb.value=ts(_1c4+1,x);}_1c6=_1c4=-1;}}else{if(cc=="#"){_1cf();inId=x+1;}else{if(cc=="."){_1cf();_1c7=x;}else{if(cc==":"){_1cf();_1c6=x;}else{if(cc=="["){_1cf();_1c3=x;_1cb={};}else{if(cc=="("){if(_1c6>=0){_1cb={name:ts(_1c6+1,x),value:null};_1ca.pseudos.push(_1cb);}_1c4=x;}else{if((cc==" ")&&(lc!=cc)){_1d0();}}}}}}}}}return _1c2;};var _1d2=function(_1d3,_1d4){if(!_1d3){return _1d4;}if(!_1d4){return _1d3;}return function(){return _1d3.apply(window,arguments)&&_1d4.apply(window,arguments);};};var _1d5=function(i,arr){var r=arr||[];if(i){r.push(i);}return r;};var _1d6=function(n){return (1==n.nodeType);};var _1d7="";var _1d8=function(elem,attr){if(!elem){return _1d7;}if(attr=="class"){return elem.className||_1d7;}if(attr=="for"){return elem.htmlFor||_1d7;}if(attr=="style"){return elem.style.cssText||_1d7;}return (_1be?elem.getAttribute(attr):elem.getAttribute(attr,2))||_1d7;};var _1d9={"*=":function(attr,_1da){return function(elem){return (_1d8(elem,attr).indexOf(_1da)>=0);};},"^=":function(attr,_1db){return function(elem){return (_1d8(elem,attr).indexOf(_1db)==0);};},"$=":function(attr,_1dc){var tval=" "+_1dc;return function(elem){var ea=" "+_1d8(elem,attr);return (ea.lastIndexOf(_1dc)==(ea.length-_1dc.length));};},"~=":function(attr,_1dd){var tval=" "+_1dd+" ";return function(elem){var ea=" "+_1d8(elem,attr)+" ";return (ea.indexOf(tval)>=0);};},"|=":function(attr,_1de){var _1df=" "+_1de+"-";return function(elem){var ea=" "+_1d8(elem,attr);return ((ea==_1de)||(ea.indexOf(_1df)==0));};},"=":function(attr,_1e0){return function(elem){return (_1d8(elem,attr)==_1e0);};}};var _1e1=(typeof _1ba().firstChild.nextElementSibling=="undefined");var _1e2=!_1e1?"nextElementSibling":"nextSibling";var _1e3=!_1e1?"previousElementSibling":"previousSibling";var _1e4=(_1e1?_1d6:_1bf);var _1e5=function(node){while(node=node[_1e3]){if(_1e4(node)){return false;}}return true;};var _1e6=function(node){while(node=node[_1e2]){if(_1e4(node)){return false;}}return true;};var _1e7=function(node){var root=node.parentNode;var i=0,tret=root[_1bc],ci=(node["_i"]||-1),cl=(root["_l"]||-1);if(!tret){return -1;}var l=tret.length;if(cl==l&&ci>=0&&cl>=0){return ci;}root["_l"]=l;ci=-1;for(var te=root["firstElementChild"]||root["firstChild"];te;te=te[_1e2]){if(_1e4(te)){te["_i"]=++i;if(node===te){ci=i;}}}return ci;};var _1e8=function(elem){return !((_1e7(elem))%2);};var _1e9=function(elem){return ((_1e7(elem))%2);};var _1ea={"checked":function(name,_1eb){return function(elem){return !!("checked" in elem?elem.checked:elem.selected);};},"first-child":function(){return _1e5;},"last-child":function(){return _1e6;},"only-child":function(name,_1ec){return function(node){if(!_1e5(node)){return false;}if(!_1e6(node)){return false;}return true;};},"empty":function(name,_1ed){return function(elem){var cn=elem.childNodes;var cnl=elem.childNodes.length;for(var x=cnl-1;x>=0;x--){var nt=cn[x].nodeType;if((nt===1)||(nt==3)){return false;}}return true;};},"contains":function(name,_1ee){var cz=_1ee.charAt(0);if(cz=="\""||cz=="'"){_1ee=_1ee.slice(1,-1);}return function(elem){return (elem.innerHTML.indexOf(_1ee)>=0);};},"not":function(name,_1ef){var p=_1c0(_1ef)[0];var _1f0={el:1};if(p.tag!="*"){_1f0.tag=1;}if(!p.classes.length){_1f0.classes=1;}var ntf=_1f1(p,_1f0);return function(elem){return (!ntf(elem));};},"nth-child":function(name,_1f2){var pi=parseInt;if(_1f2=="odd"){return _1e9;}else{if(_1f2=="even"){return _1e8;}}if(_1f2.indexOf("n")!=-1){var _1f3=_1f2.split("n",2);var pred=_1f3[0]?((_1f3[0]=="-")?-1:pi(_1f3[0])):1;var idx=_1f3[1]?pi(_1f3[1]):0;var lb=0,ub=-1;if(pred>0){if(idx<0){idx=(idx%pred)&&(pred+(idx%pred));}else{if(idx>0){if(idx>=pred){lb=idx-idx%pred;}idx=idx%pred;}}}else{if(pred<0){pred*=-1;if(idx>0){ub=idx;idx=idx%pred;}}}if(pred>0){return function(elem){var i=_1e7(elem);return (i>=lb)&&(ub<0||i<=ub)&&((i%pred)==idx);};}else{_1f2=idx;}}var _1f4=pi(_1f2);return function(elem){return (_1e7(elem)==_1f4);};}};var _1f5=(d.isIE)?function(cond){var clc=cond.toLowerCase();if(clc=="class"){cond="className";}return function(elem){return (_1be?elem.getAttribute(cond):elem[cond]||elem[clc]);};}:function(cond){return function(elem){return (elem&&elem.getAttribute&&elem.hasAttribute(cond));};};var _1f1=function(_1f6,_1f7){if(!_1f6){return _1bf;}_1f7=_1f7||{};var ff=null;if(!("el" in _1f7)){ff=_1d2(ff,_1d6);}if(!("tag" in _1f7)){if(_1f6.tag!="*"){ff=_1d2(ff,function(elem){return (elem&&(elem.tagName==_1f6.getTag()));});}}if(!("classes" in _1f7)){each(_1f6.classes,function(_1f8,idx,arr){var re=new RegExp("(?:^|\\s)"+_1f8+"(?:\\s|$)");ff=_1d2(ff,function(elem){return re.test(elem.className);});ff.count=idx;});}if(!("pseudos" in _1f7)){each(_1f6.pseudos,function(_1f9){var pn=_1f9.name;if(_1ea[pn]){ff=_1d2(ff,_1ea[pn](pn,_1f9.value));}});}if(!("attrs" in _1f7)){each(_1f6.attrs,function(attr){var _1fa;var a=attr.attr;if(attr.type&&_1d9[attr.type]){_1fa=_1d9[attr.type](a,attr.matchFor);}else{if(a.length){_1fa=_1f5(a);}}if(_1fa){ff=_1d2(ff,_1fa);}});}if(!("id" in _1f7)){if(_1f6.id){ff=_1d2(ff,function(elem){return (!!elem&&(elem.id==_1f6.id));});}}if(!ff){if(!("default" in _1f7)){ff=_1bf;}}return ff;};var _1fb=function(_1fc){return function(node,ret,bag){while(node=node[_1e2]){if(_1e1&&(!_1d6(node))){continue;}if((!bag||_1fd(node,bag))&&_1fc(node)){ret.push(node);}break;}return ret;};};var _1fe=function(_1ff){return function(root,ret,bag){var te=root[_1e2];while(te){if(_1e4(te)){if(bag&&!_1fd(te,bag)){break;}if(_1ff(te)){ret.push(te);}}te=te[_1e2];}return ret;};};var _200=function(_201){_201=_201||_1bf;return function(root,ret,bag){var te,x=0,tret=root[_1bc];while(te=tret[x++]){if(_1e4(te)&&(!bag||_1fd(te,bag))&&(_201(te,x))){ret.push(te);}}return ret;};};var _202=function(node,root){var pn=node.parentNode;while(pn){if(pn==root){break;}pn=pn.parentNode;}return !!pn;};var _203={};var _204=function(_205){var _206=_203[_205.query];if(_206){return _206;}var io=_205.infixOper;var oper=(io?io.oper:"");var _207=_1f1(_205,{el:1});var qt=_205.tag;var _208=("*"==qt);var ecs=_1ba()["getElementsByClassName"];if(!oper){if(_205.id){_207=(!_205.loops&&_208)?_1bf:_1f1(_205,{el:1,id:1});_206=function(root,arr){var te=d.byId(_205.id,(root.ownerDocument||root));if(!te||!_207(te)){return;}if(9==root.nodeType){return _1d5(te,arr);}else{if(_202(te,root)){return _1d5(te,arr);}}};}else{if(ecs&&/\{\s*\[native code\]\s*\}/.test(String(ecs))&&_205.classes.length&&!_1bb){_207=_1f1(_205,{el:1,classes:1,id:1});var _209=_205.classes.join(" ");_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByClassName(_209);while((te=tret[x++])){if(_207(te,root)&&_1fd(te,bag)){ret.push(te);}}return ret;};}else{if(!_208&&!_205.loops){_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByTagName(_205.getTag());while((te=tret[x++])){if(_1fd(te,bag)){ret.push(te);}}return ret;};}else{_207=_1f1(_205,{el:1,tag:1,id:1});_206=function(root,arr,bag){var ret=_1d5(0,arr),te,x=0;var tret=root.getElementsByTagName(_205.getTag());while((te=tret[x++])){if(_207(te,root)&&_1fd(te,bag)){ret.push(te);}}return ret;};}}}}else{var _20a={el:1};if(_208){_20a.tag=1;}_207=_1f1(_205,_20a);if("+"==oper){_206=_1fb(_207);}else{if("~"==oper){_206=_1fe(_207);}else{if(">"==oper){_206=_200(_207);}}}}return _203[_205.query]=_206;};var _20b=function(root,_20c){var _20d=_1d5(root),qp,x,te,qpl=_20c.length,bag,ret;for(var i=0;i<qpl;i++){ret=[];qp=_20c[i];x=_20d.length-1;if(x>0){bag={};ret.nozip=true;}var gef=_204(qp);for(var j=0;(te=_20d[j]);j++){gef(te,ret,bag);}if(!ret.length){break;}_20d=ret;}return ret;};var _20e={},_20f={};var _210=function(_211){var _212=_1c0(trim(_211));if(_212.length==1){var tef=_204(_212[0]);return function(root){var r=tef(root,new qlc());if(r){r.nozip=true;}return r;};}return function(root){return _20b(root,_212);};};var nua=navigator.userAgent;var wk="WebKit/";var _213=(d.isWebKit&&(nua.indexOf(wk)>0)&&(parseFloat(nua.split(wk)[1])>528));var _214=d.isIE?"commentStrip":"nozip";var qsa="querySelectorAll";var _215=(!!_1ba()[qsa]&&(!d.isSafari||(d.isSafari>3.1)||_213));var _216=/n\+\d|([^ ])?([>~+])([^ =])?/g;var _217=function(_218,pre,ch,post){return ch?(pre?pre+" ":"")+ch+(post?" "+post:""):_218;};var _219=function(_21a,_21b){_21a=_21a.replace(_216,_217);if(_215){var _21c=_20f[_21a];if(_21c&&!_21b){return _21c;}}var _21d=_20e[_21a];if(_21d){return _21d;}var qcz=_21a.charAt(0);var _21e=(-1==_21a.indexOf(" "));if((_21a.indexOf("#")>=0)&&(_21e)){_21b=true;}var _21f=(_215&&(!_21b)&&(_1bd.indexOf(qcz)==-1)&&(!d.isIE||(_21a.indexOf(":")==-1))&&(!(_1bb&&(_21a.indexOf(".")>=0)))&&(_21a.indexOf(":contains")==-1)&&(_21a.indexOf(":checked")==-1)&&(_21a.indexOf("|=")==-1));if(_21f){var tq=(_1bd.indexOf(_21a.charAt(_21a.length-1))>=0)?(_21a+" *"):_21a;return _20f[_21a]=function(root){try{if(!((9==root.nodeType)||_21e)){throw "";}var r=root[qsa](tq);r[_214]=true;return r;}catch(e){return _219(_21a,true)(root);}};}else{var _220=_21a.split(/\s*,\s*/);return _20e[_21a]=((_220.length<2)?_210(_21a):function(root){var _221=0,ret=[],tp;while((tp=_220[_221++])){ret=ret.concat(_210(tp)(root));}return ret;});}};var _222=0;var _223=d.isIE?function(node){if(_1be){return (node.getAttribute("_uid")||node.setAttribute("_uid",++_222)||_222);}else{return node.uniqueID;}}:function(node){return (node._uid||(node._uid=++_222));};var _1fd=function(node,bag){if(!bag){return 1;}var id=_223(node);if(!bag[id]){return bag[id]=1;}return 0;};var _224="_zipIdx";var _225=function(arr){if(arr&&arr.nozip){return (qlc._wrap)?qlc._wrap(arr):arr;}var ret=new qlc();if(!arr||!arr.length){return ret;}if(arr[0]){ret.push(arr[0]);}if(arr.length<2){return ret;}_222++;if(d.isIE&&_1be){var _226=_222+"";arr[0].setAttribute(_224,_226);for(var x=1,te;te=arr[x];x++){if(arr[x].getAttribute(_224)!=_226){ret.push(te);}te.setAttribute(_224,_226);}}else{if(d.isIE&&arr.commentStrip){try{for(var x=1,te;te=arr[x];x++){if(_1d6(te)){ret.push(te);}}}catch(e){}}else{if(arr[0]){arr[0][_224]=_222;}for(var x=1,te;te=arr[x];x++){if(arr[x][_224]!=_222){ret.push(te);}te[_224]=_222;}}}return ret;};d.query=function(_227,root){qlc=d._NodeListCtor;if(!_227){return new qlc();}if(_227.constructor==qlc){return _227;}if(typeof _227!="string"){return new qlc(_227);}if(typeof root=="string"){root=d.byId(root);if(!root){return new qlc();}}root=root||_1ba();var od=root.ownerDocument||root.documentElement;_1be=(root.contentType&&root.contentType=="application/xml")||(d.isOpera&&(root.doctype||od.toString()=="[object XMLDocument]"))||(!!od)&&(d.isIE?od.xml:(root.xmlVersion||od.xmlVersion));var r=_219(_227)(root);if(r&&r.nozip&&!qlc._wrap){return r;}return _225(r);};d.query.pseudos=_1ea;d._filterQueryResult=function(_228,_229){var _22a=new d._NodeListCtor();var _22b=_1f1(_1c0(_229)[0]);for(var x=0,te;te=_228[x];x++){if(_22b(te)){_22a.push(te);}}return _22a;};})(this["queryPortability"]||this["acme"]||dojo);}if(!dojo._hasResource["dojo._base.xhr"]){dojo._hasResource["dojo._base.xhr"]=true;dojo.provide("dojo._base.xhr");(function(){var _22c=dojo,cfg=_22c.config;function _22d(obj,name,_22e){if(_22e===null){return;}var val=obj[name];if(typeof val=="string"){obj[name]=[val,_22e];}else{if(_22c.isArray(val)){val.push(_22e);}else{obj[name]=_22e;}}};dojo.fieldToObject=function(_22f){var ret=null;var item=_22c.byId(_22f);if(item){var _230=item.name;var type=(item.type||"").toLowerCase();if(_230&&type&&!item.disabled){if(type=="radio"||type=="checkbox"){if(item.checked){ret=item.value;}}else{if(item.multiple){ret=[];_22c.query("option",item).forEach(function(opt){if(opt.selected){ret.push(opt.value);}});}else{ret=item.value;}}}}return ret;};dojo.formToObject=function(_231){var ret={};var _232="file|submit|image|reset|button|";_22c.forEach(dojo.byId(_231).elements,function(item){var _233=item.name;var type=(item.type||"").toLowerCase();if(_233&&type&&_232.indexOf(type)==-1&&!item.disabled){_22d(ret,_233,_22c.fieldToObject(item));if(type=="image"){ret[_233+".x"]=ret[_233+".y"]=ret[_233].x=ret[_233].y=0;}}});return ret;};dojo.objectToQuery=function(map){var enc=encodeURIComponent;var _234=[];var _235={};for(var name in map){var _236=map[name];if(_236!=_235[name]){var _237=enc(name)+"=";if(_22c.isArray(_236)){for(var i=0;i<_236.length;i++){_234.push(_237+enc(_236[i]));}}else{_234.push(_237+enc(_236));}}}return _234.join("&");};dojo.formToQuery=function(_238){return _22c.objectToQuery(_22c.formToObject(_238));};dojo.formToJson=function(_239,_23a){return _22c.toJson(_22c.formToObject(_239),_23a);};dojo.queryToObject=function(str){var ret={};var qp=str.split("&");var dec=decodeURIComponent;_22c.forEach(qp,function(item){if(item.length){var _23b=item.split("=");var name=dec(_23b.shift());var val=dec(_23b.join("="));if(typeof ret[name]=="string"){ret[name]=[ret[name]];}if(_22c.isArray(ret[name])){ret[name].push(val);}else{ret[name]=val;}}});return ret;};dojo._blockAsync=false;var _23c=_22c._contentHandlers=dojo.contentHandlers={text:function(xhr){return xhr.responseText;},json:function(xhr){return _22c.fromJson(xhr.responseText||null);},"json-comment-filtered":function(xhr){if(!dojo.config.useCommentedJson){console.warn("Consider using the standard mimetype:application/json."+" json-commenting can introduce security issues. To"+" decrease the chances of hijacking, use the standard the 'json' handler and"+" prefix your json with: {}&&\n"+"Use djConfig.useCommentedJson=true to turn off this message.");}var _23d=xhr.responseText;var _23e=_23d.indexOf("/*");var _23f=_23d.lastIndexOf("*/");if(_23e==-1||_23f==-1){throw new Error("JSON was not comment filtered");}return _22c.fromJson(_23d.substring(_23e+2,_23f));},javascript:function(xhr){return _22c.eval(xhr.responseText);},xml:function(xhr){var _240=xhr.responseXML;if(_22c.isIE&&(!_240||!_240.documentElement)){var ms=function(n){return "MSXML"+n+".DOMDocument";};var dp=["Microsoft.XMLDOM",ms(6),ms(4),ms(3),ms(2)];_22c.some(dp,function(p){try{var dom=new ActiveXObject(p);dom.async=false;dom.loadXML(xhr.responseText);_240=dom;}catch(e){return false;}return true;});}return _240;},"json-comment-optional":function(xhr){if(xhr.responseText&&/^[^{\[]*\/\*/.test(xhr.responseText)){return _23c["json-comment-filtered"](xhr);}else{return _23c["json"](xhr);}}};dojo._ioSetArgs=function(args,_241,_242,_243){var _244={args:args,url:args.url};var _245=null;if(args.form){var form=_22c.byId(args.form);var _246=form.getAttributeNode("action");_244.url=_244.url||(_246?_246.value:null);_245=_22c.formToObject(form);}var _247=[{}];if(_245){_247.push(_245);}if(args.content){_247.push(args.content);}if(args.preventCache){_247.push({"dojo.preventCache":new Date().valueOf()});}_244.query=_22c.objectToQuery(_22c.mixin.apply(null,_247));_244.handleAs=args.handleAs||"text";var d=new _22c.Deferred(_241);d.addCallbacks(_242,function(_248){return _243(_248,d);});var ld=args.load;if(ld&&_22c.isFunction(ld)){d.addCallback(function(_249){return ld.call(args,_249,_244);});}var err=args.error;if(err&&_22c.isFunction(err)){d.addErrback(function(_24a){return err.call(args,_24a,_244);});}var _24b=args.handle;if(_24b&&_22c.isFunction(_24b)){d.addBoth(function(_24c){return _24b.call(args,_24c,_244);});}if(cfg.ioPublish&&_22c.publish&&_244.args.ioPublish!==false){d.addCallbacks(function(res){_22c.publish("/dojo/io/load",[d,res]);return res;},function(res){_22c.publish("/dojo/io/error",[d,res]);return res;});d.addBoth(function(res){_22c.publish("/dojo/io/done",[d,res]);return res;});}d.ioArgs=_244;return d;};var _24d=function(dfd){dfd.canceled=true;var xhr=dfd.ioArgs.xhr;var _24e=typeof xhr.abort;if(_24e=="function"||_24e=="object"||_24e=="unknown"){xhr.abort();}var err=dfd.ioArgs.error;if(!err){err=new Error("xhr cancelled");err.dojoType="cancel";}return err;};var _24f=function(dfd){var ret=_23c[dfd.ioArgs.handleAs](dfd.ioArgs.xhr);return ret===undefined?null:ret;};var _250=function(_251,dfd){if(!dfd.ioArgs.args.failOk){console.error(_251);}return _251;};var _252=null;var _253=[];var _254=0;var _255=function(dfd){if(_254<=0){_254=0;if(cfg.ioPublish&&_22c.publish&&(!dfd||dfd&&dfd.ioArgs.args.ioPublish!==false)){_22c.publish("/dojo/io/stop");}}};var _256=function(){var now=(new Date()).getTime();if(!_22c._blockAsync){for(var i=0,tif;i<_253.length&&(tif=_253[i]);i++){var dfd=tif.dfd;var func=function(){if(!dfd||dfd.canceled||!tif.validCheck(dfd)){_253.splice(i--,1);_254-=1;}else{if(tif.ioCheck(dfd)){_253.splice(i--,1);tif.resHandle(dfd);_254-=1;}else{if(dfd.startTime){if(dfd.startTime+(dfd.ioArgs.args.timeout||0)<now){_253.splice(i--,1);var err=new Error("timeout exceeded");err.dojoType="timeout";dfd.errback(err);dfd.cancel();_254-=1;}}}}};if(dojo.config.debugAtAllCosts){func.call(this);}else{try{func.call(this);}catch(e){dfd.errback(e);}}}}_255(dfd);if(!_253.length){clearInterval(_252);_252=null;return;}};dojo._ioCancelAll=function(){try{_22c.forEach(_253,function(i){try{i.dfd.cancel();}catch(e){}});}catch(e){}};if(_22c.isIE){_22c.addOnWindowUnload(_22c._ioCancelAll);}_22c._ioNotifyStart=function(dfd){if(cfg.ioPublish&&_22c.publish&&dfd.ioArgs.args.ioPublish!==false){if(!_254){_22c.publish("/dojo/io/start");}_254+=1;_22c.publish("/dojo/io/send",[dfd]);}};_22c._ioWatch=function(dfd,_257,_258,_259){var args=dfd.ioArgs.args;if(args.timeout){dfd.startTime=(new Date()).getTime();}_253.push({dfd:dfd,validCheck:_257,ioCheck:_258,resHandle:_259});if(!_252){_252=setInterval(_256,50);}if(args.sync){_256();}};var _25a="application/x-www-form-urlencoded";var _25b=function(dfd){return dfd.ioArgs.xhr.readyState;};var _25c=function(dfd){return 4==dfd.ioArgs.xhr.readyState;};var _25d=function(dfd){var xhr=dfd.ioArgs.xhr;if(_22c._isDocumentOk(xhr)){dfd.callback(dfd);}else{var err=new Error("Unable to load "+dfd.ioArgs.url+" status:"+xhr.status);err.status=xhr.status;err.responseText=xhr.responseText;dfd.errback(err);}};dojo._ioAddQueryToUrl=function(_25e){if(_25e.query.length){_25e.url+=(_25e.url.indexOf("?")==-1?"?":"&")+_25e.query;_25e.query=null;}};dojo.xhr=function(_25f,args,_260){var dfd=_22c._ioSetArgs(args,_24d,_24f,_250);var _261=dfd.ioArgs;var xhr=_261.xhr=_22c._xhrObj(_261.args);if(!xhr){dfd.cancel();return dfd;}if("postData" in args){_261.query=args.postData;}else{if("putData" in args){_261.query=args.putData;}else{if("rawBody" in args){_261.query=args.rawBody;}else{if((arguments.length>2&&!_260)||"POST|PUT".indexOf(_25f.toUpperCase())==-1){_22c._ioAddQueryToUrl(_261);}}}}xhr.open(_25f,_261.url,args.sync!==true,args.user||undefined,args.password||undefined);if(args.headers){for(var hdr in args.headers){if(hdr.toLowerCase()==="content-type"&&!args.contentType){args.contentType=args.headers[hdr];}else{if(args.headers[hdr]){xhr.setRequestHeader(hdr,args.headers[hdr]);}}}}xhr.setRequestHeader("Content-Type",args.contentType||_25a);if(!args.headers||!("X-Requested-With" in args.headers)){xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");}_22c._ioNotifyStart(dfd);if(dojo.config.debugAtAllCosts){xhr.send(_261.query);}else{try{xhr.send(_261.query);}catch(e){_261.error=e;dfd.cancel();}}_22c._ioWatch(dfd,_25b,_25c,_25d);xhr=null;return dfd;};dojo.xhrGet=function(args){return _22c.xhr("GET",args);};dojo.rawXhrPost=dojo.xhrPost=function(args){return _22c.xhr("POST",args,true);};dojo.rawXhrPut=dojo.xhrPut=function(args){return _22c.xhr("PUT",args,true);};dojo.xhrDelete=function(args){return _22c.xhr("DELETE",args);};})();}if(!dojo._hasResource["dojo._base.fx"]){dojo._hasResource["dojo._base.fx"]=true;dojo.provide("dojo._base.fx");(function(){var d=dojo;var _262=d._mixin;dojo._Line=function(_263,end){this.start=_263;this.end=end;};dojo._Line.prototype.getValue=function(n){return ((this.end-this.start)*n)+this.start;};dojo.Animation=function(args){_262(this,args);if(d.isArray(this.curve)){this.curve=new d._Line(this.curve[0],this.curve[1]);}};d._Animation=d.Animation;d.extend(dojo.Animation,{duration:350,repeat:0,rate:20,_percent:0,_startRepeatCount:0,_getStep:function(){var _264=this._percent,_265=this.easing;return _265?_265(_264):_264;},_fire:function(evt,args){var a=args||[];if(this[evt]){if(d.config.debugAtAllCosts){this[evt].apply(this,a);}else{try{this[evt].apply(this,a);}catch(e){console.error("exception in animation handler for:",evt);console.error(e);}}}return this;},play:function(_266,_267){var _268=this;if(_268._delayTimer){_268._clearTimer();}if(_267){_268._stopTimer();_268._active=_268._paused=false;_268._percent=0;}else{if(_268._active&&!_268._paused){return _268;}}_268._fire("beforeBegin",[_268.node]);var de=_266||_268.delay,_269=dojo.hitch(_268,"_play",_267);if(de>0){_268._delayTimer=setTimeout(_269,de);return _268;}_269();return _268;},_play:function(_26a){var _26b=this;if(_26b._delayTimer){_26b._clearTimer();}_26b._startTime=new Date().valueOf();if(_26b._paused){_26b._startTime-=_26b.duration*_26b._percent;}_26b._endTime=_26b._startTime+_26b.duration;_26b._active=true;_26b._paused=false;var _26c=_26b.curve.getValue(_26b._getStep());if(!_26b._percent){if(!_26b._startRepeatCount){_26b._startRepeatCount=_26b.repeat;}_26b._fire("onBegin",[_26c]);}_26b._fire("onPlay",[_26c]);_26b._cycle();return _26b;},pause:function(){var _26d=this;if(_26d._delayTimer){_26d._clearTimer();}_26d._stopTimer();if(!_26d._active){return _26d;}_26d._paused=true;_26d._fire("onPause",[_26d.curve.getValue(_26d._getStep())]);return _26d;},gotoPercent:function(_26e,_26f){var _270=this;_270._stopTimer();_270._active=_270._paused=true;_270._percent=_26e;if(_26f){_270.play();}return _270;},stop:function(_271){var _272=this;if(_272._delayTimer){_272._clearTimer();}if(!_272._timer){return _272;}_272._stopTimer();if(_271){_272._percent=1;}_272._fire("onStop",[_272.curve.getValue(_272._getStep())]);_272._active=_272._paused=false;return _272;},status:function(){if(this._active){return this._paused?"paused":"playing";}return "stopped";},_cycle:function(){var _273=this;if(_273._active){var curr=new Date().valueOf();var step=(curr-_273._startTime)/(_273._endTime-_273._startTime);if(step>=1){step=1;}_273._percent=step;if(_273.easing){step=_273.easing(step);}_273._fire("onAnimate",[_273.curve.getValue(step)]);if(_273._percent<1){_273._startTimer();}else{_273._active=false;if(_273.repeat>0){_273.repeat--;_273.play(null,true);}else{if(_273.repeat==-1){_273.play(null,true);}else{if(_273._startRepeatCount){_273.repeat=_273._startRepeatCount;_273._startRepeatCount=0;}}}_273._percent=0;_273._fire("onEnd",[_273.node]);!_273.repeat&&_273._stopTimer();}}return _273;},_clearTimer:function(){clearTimeout(this._delayTimer);delete this._delayTimer;}});var ctr=0,_274=[],_275=null,_276={run:function(){}};d.extend(d.Animation,{_startTimer:function(){if(!this._timer){this._timer=d.connect(_276,"run",this,"_cycle");ctr++;}if(!_275){_275=setInterval(d.hitch(_276,"run"),this.rate);}},_stopTimer:function(){if(this._timer){d.disconnect(this._timer);this._timer=null;ctr--;}if(ctr<=0){clearInterval(_275);_275=null;ctr=0;}}});var _277=d.isIE?function(node){var ns=node.style;if(!ns.width.length&&d.style(node,"width")=="auto"){ns.width="auto";}}:function(){};dojo._fade=function(args){args.node=d.byId(args.node);var _278=_262({properties:{}},args),_279=(_278.properties.opacity={});_279.start=!("start" in _278)?function(){return +d.style(_278.node,"opacity")||0;}:_278.start;_279.end=_278.end;var anim=d.animateProperty(_278);d.connect(anim,"beforeBegin",d.partial(_277,_278.node));return anim;};dojo.fadeIn=function(args){return d._fade(_262({end:1},args));};dojo.fadeOut=function(args){return d._fade(_262({end:0},args));};dojo._defaultEasing=function(n){return 0.5+((Math.sin((n+1.5)*Math.PI))/2);};var _27a=function(_27b){this._properties=_27b;for(var p in _27b){var prop=_27b[p];if(prop.start instanceof d.Color){prop.tempColor=new d.Color();}}};_27a.prototype.getValue=function(r){var ret={};for(var p in this._properties){var prop=this._properties[p],_27c=prop.start;if(_27c instanceof d.Color){ret[p]=d.blendColors(_27c,prop.end,r,prop.tempColor).toCss();}else{if(!d.isArray(_27c)){ret[p]=((prop.end-_27c)*r)+_27c+(p!="opacity"?prop.units||"px":0);}}}return ret;};dojo.animateProperty=function(args){var n=args.node=d.byId(args.node);if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args);d.connect(anim,"beforeBegin",anim,function(){var pm={};for(var p in this.properties){if(p=="width"||p=="height"){this.node.display="block";}var prop=this.properties[p];if(d.isFunction(prop)){prop=prop(n);}prop=pm[p]=_262({},(d.isObject(prop)?prop:{end:prop}));if(d.isFunction(prop.start)){prop.start=prop.start(n);}if(d.isFunction(prop.end)){prop.end=prop.end(n);}var _27d=(p.toLowerCase().indexOf("color")>=0);function _27e(node,p){var v={height:node.offsetHeight,width:node.offsetWidth}[p];if(v!==undefined){return v;}v=d.style(node,p);return (p=="opacity")?+v:(_27d?v:parseFloat(v));};if(!("end" in prop)){prop.end=_27e(n,p);}else{if(!("start" in prop)){prop.start=_27e(n,p);}}if(_27d){prop.start=new d.Color(prop.start);prop.end=new d.Color(prop.end);}else{prop.start=(p=="opacity")?+prop.start:parseFloat(prop.start);}}this.curve=new _27a(pm);});d.connect(anim,"onAnimate",d.hitch(d,"style",anim.node));return anim;};dojo.anim=function(node,_27f,_280,_281,_282,_283){return d.animateProperty({node:node,duration:_280||d.Animation.prototype.duration,properties:_27f,easing:_281,onEnd:_282}).play(_283||0);};})();}if(!dojo._hasResource["dojo._base.browser"]){dojo._hasResource["dojo._base.browser"]=true;dojo.provide("dojo._base.browser");dojo.forEach(dojo.config.require,function(i){dojo["require"](i);});}if(dojo.config.afterOnLoad&&dojo.isBrowser){window.setTimeout(dojo._loadInit,1000);}})();
diff --git a/ricoClient/js/baselibs/ext-core.js b/ricoClient/js/baselibs/ext-core.js
deleted file mode 100644 (file)
index 31ecb38..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/*\r
- * Ext Core Library 3.0\r
- * http://extjs.com/\r
- * Copyright(c) 2006-2009, Ext JS, LLC.\r
- * \r
- * MIT Licensed - http://extjs.com/license/mit.txt\r
- * \r
- */\r
-window.undefined=window.undefined;Ext={version:"3.0"};Ext.apply=function(d,e,b){if(b){Ext.apply(d,b)}if(d&&e&&typeof e=="object"){for(var a in e){d[a]=e[a]}}return d};(function(){var d=0,r=navigator.userAgent.toLowerCase(),w=function(e){return e.test(r)},k=document.compatMode=="CSS1Compat",y=w(/opera/),g=w(/chrome/),s=w(/webkit/),v=!g&&w(/safari/),a=v&&w(/version\/3/),z=v&&w(/version\/4/),q=!y&&w(/msie/),o=q&&w(/msie 7/),n=q&&w(/msie 8/),p=q&&!o&&!n,m=!s&&w(/gecko/),b=m&&w(/rv:1\.9/),t=q&&!k,x=w(/windows|win32/),j=w(/macintosh|mac os x/),h=w(/adobeair/),l=w(/linux/),c=/^https/i.test(window.location.protocol);if(p){try{document.execCommand("BackgroundImageCache",false,true)}catch(u){}}Ext.apply(Ext,{isStrict:k,isSecure:c,isReady:false,enableGarbageCollector:true,enableListenerCollection:false,USE_NATIVE_JSON:false,applyIf:function(A,B){if(A){for(var e in B){if(Ext.isEmpty(A[e])){A[e]=B[e]}}}return A},id:function(e,A){return(e=Ext.getDom(e)||{}).id=e.id||(A||"ext-gen")+(++d)},extend:function(){var A=function(C){for(var B in C){this[B]=C[B]}};var e=Object.prototype.constructor;return function(H,D,G){if(Ext.isObject(D)){G=D;D=H;H=G.constructor!=e?G.constructor:function(){D.apply(this,arguments)}}var C=function(){},E,B=D.prototype;C.prototype=B;E=H.prototype=new C();E.constructor=H;H.superclass=B;if(B.constructor==e){B.constructor=D}H.override=function(F){Ext.override(H,F)};E.superclass=E.supr=(function(){return B});E.override=A;Ext.override(H,G);H.extend=function(F){Ext.extend(H,F)};return H}}(),override:function(e,B){if(B){var A=e.prototype;Ext.apply(A,B);if(Ext.isIE&&B.toString!=e.toString){A.toString=B.toString}}},namespace:function(){var A,e;Ext.each(arguments,function(B){e=B.split(".");A=window[e[0]]=window[e[0]]||{};Ext.each(e.slice(1),function(C){A=A[C]=A[C]||{}})});return A},urlEncode:function(F,E){var C,A=[],B,D=encodeURIComponent;for(B in F){C=typeof F[B]=="undefined";Ext.each(C?B:F[B],function(G,e){A.push("&",D(B),"=",(G!=B||!C)?D(G):"")})}if(!E){A.shift();E=""}return E+A.join("")},urlDecode:function(B,A){var E={},D=B.split("&"),F=decodeURIComponent,e,C;Ext.each(D,function(G){G=G.split("=");e=F(G[0]);C=F(G[1]);E[e]=A||!E[e]?C:[].concat(E[e]).concat(C)});return E},toArray:function(){return q?function(e,C,A,B){B=[];Ext.each(e,function(D){B.push(D)});return B.slice(C||0,A||B.length)}:function(e,B,A){return Array.prototype.slice.call(e,B||0,A||e.length)}}(),each:function(D,C,B){if(Ext.isEmpty(D,true)){return}if(typeof D.length=="undefined"||Ext.isPrimitive(D)){D=[D]}for(var A=0,e=D.length;A<e;A++){if(C.call(B||D[A],D[A],A,D)===false){return A}}},getDom:function(e){if(!e||!document){return null}return e.dom?e.dom:(typeof e=="string"?document.getElementById(e):e)},getBody:function(){return Ext.get(document.body||document.documentElement)},removeNode:q?function(){var e;return function(A){if(A&&A.tagName!="BODY"){e=e||document.createElement("div");e.appendChild(A);e.innerHTML=""}}}():function(e){if(e&&e.parentNode&&e.tagName!="BODY"){e.parentNode.removeChild(e)}},isEmpty:function(A,e){return A===null||A===undefined||((Ext.isArray(A)&&!A.length))||(!e?A==="":false)},isArray:function(e){return Object.prototype.toString.apply(e)==="[object Array]"},isObject:function(e){return e&&typeof e=="object"},isPrimitive:function(e){var A=typeof e;return A=="string"||A=="number"||A=="boolean"},isFunction:function(e){return typeof e=="function"},isOpera:y,isWebKit:s,isChrome:g,isSafari:v,isSafari3:a,isSafari4:z,isSafari2:v&&!(a||z),isIE:q,isIE6:p,isIE7:o,isIE8:n,isGecko:m,isGecko2:m&&!b,isGecko3:b,isBorderBox:t,isLinux:l,isWindows:x,isMac:j,isAir:h});Ext.ns=Ext.namespace})();Ext.ns("Ext","Ext.util","Ext.lib","Ext.data");Ext.apply(Function.prototype,{createInterceptor:function(b,a){var c=this;return !Ext.isFunction(b)?this:function(){var e=this,d=arguments;b.target=e;b.method=c;return(b.apply(a||e||window,d)!==false)?c.apply(e||window,d):null}},createCallback:function(){var a=arguments,b=this;return function(){return b.apply(window,a)}},createDelegate:function(c,b,a){var d=this;return function(){var g=b||arguments;if(a===true){g=Array.prototype.slice.call(arguments,0);g=g.concat(b)}else{if(typeof a=="number"){g=Array.prototype.slice.call(arguments,0);var e=[a,0].concat(b);Array.prototype.splice.apply(g,e)}}return d.apply(c||window,g)}},defer:function(c,e,b,a){var d=this.createDelegate(e,b,a);if(c>0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(c){for(var b=0,a=this.length;b<a;b++){if(this[b]==c){return b}}return -1},remove:function(b){var a=this.indexOf(b);if(a!=-1){this.splice(a,1)}return this}});Ext.util.TaskRunner=function(e){e=e||10;var g=[],a=[],b=0,h=false,d=function(){h=false;clearInterval(b);b=0},j=function(){if(!h){h=true;b=setInterval(k,e)}},c=function(l){a.push(l);if(l.onStop){l.onStop.apply(l.scope||l)}},k=function(){var n=a.length,p=new Date().getTime();if(n>0){for(var r=0;r<n;r++){g.remove(a[r])}a=[];if(g.length<1){d();return}}for(var r=0,q,m,o,l=g.length;r<l;++r){q=g[r];m=p-q.taskRunTime;if(q.interval<=m){o=q.run.apply(q.scope||q,q.args||[++q.taskRunCount]);q.taskRunTime=p;if(o===false||q.taskRunCount===q.repeat){c(q);return}}if(q.duration&&q.duration<=(p-q.taskStartTime)){c(q)}}};this.start=function(l){g.push(l);l.taskStartTime=new Date().getTime();l.taskRunTime=0;l.taskRunCount=0;j();return l};this.stop=function(l){c(l);return l};this.stopAll=function(){d();for(var m=0,l=g.length;m<l;m++){if(g[m].onStop){g[m].onStop()}}g=[];a=[]}};Ext.TaskMgr=new Ext.util.TaskRunner();(function(){var b;function c(d){if(!b){b=new Ext.Element.Flyweight()}b.dom=d;return b}(function(){var g=document,d=g.compatMode=="CSS1Compat",e=Math.max,h=parseInt;Ext.lib.Dom={isAncestor:function(k,l){var j=false;k=Ext.getDom(k);l=Ext.getDom(l);if(k&&l){if(k.contains){return k.contains(l)}else{if(k.compareDocumentPosition){return !!(k.compareDocumentPosition(l)&16)}else{while(l=l.parentNode){j=l==k||j}}}}return j},getViewWidth:function(j){return j?this.getDocumentWidth():this.getViewportWidth()},getViewHeight:function(j){return j?this.getDocumentHeight():this.getViewportHeight()},getDocumentHeight:function(){return e(!d?g.body.scrollHeight:g.documentElement.scrollHeight,this.getViewportHeight())},getDocumentWidth:function(){return e(!d?g.body.scrollWidth:g.documentElement.scrollWidth,this.getViewportWidth())},getViewportHeight:function(){return Ext.isIE?(Ext.isStrict?g.documentElement.clientHeight:g.body.clientHeight):self.innerHeight},getViewportWidth:function(){return !Ext.isStrict&&!Ext.isOpera?g.body.clientWidth:Ext.isIE?g.documentElement.clientWidth:self.innerWidth},getY:function(j){return this.getXY(j)[1]},getX:function(j){return this.getXY(j)[0]},getXY:function(l){var k,r,t,w,m,n,v=0,s=0,u,j,o=(g.body||g.documentElement),q=[0,0];l=Ext.getDom(l);if(l!=o){if(l.getBoundingClientRect){t=l.getBoundingClientRect();u=c(document).getScroll();q=[t.left+u.left,t.top+u.top]}else{k=l;j=c(l).isStyle("position","absolute");while(k){r=c(k);v+=k.offsetLeft;s+=k.offsetTop;j=j||r.isStyle("position","absolute");if(Ext.isGecko){s+=w=h(r.getStyle("borderTopWidth"),10)||0;v+=m=h(r.getStyle("borderLeftWidth"),10)||0;if(k!=l&&!r.isStyle("overflow","visible")){v+=m;s+=w}}k=k.offsetParent}if(Ext.isSafari&&j){v-=o.offsetLeft;s-=o.offsetTop}if(Ext.isGecko&&!j){n=c(o);v+=h(n.getStyle("borderLeftWidth"),10)||0;s+=h(n.getStyle("borderTopWidth"),10)||0}k=l.parentNode;while(k&&k!=o){if(!Ext.isOpera||(k.tagName!="TR"&&!c(k).isStyle("display","inline"))){v-=k.scrollLeft;s-=k.scrollTop}k=k.parentNode}q=[v,s]}}return q},setXY:function(k,l){(k=Ext.fly(k,"_setXY")).position();var m=k.translatePoints(l),j=k.dom.style,n;for(n in m){if(!isNaN(m[n])){j[n]=m[n]+"px"}}},setX:function(k,j){this.setXY(k,[j,false])},setY:function(j,k){this.setXY(j,[false,k])}}})();Ext.lib.Event=function(){var x=false,v=[],g=[],B=0,r=[],d,E=false,l=window,H=document,m=200,t=20,C=0,s=1,j=2,n=3,u=3,y=4,e=function(){var I;if(l.addEventListener){I=function(M,K,L,J){if(K=="mouseenter"){L=L.createInterceptor(p);M.addEventListener("mouseover",L,(J))}else{if(K=="mouseleave"){L=L.createInterceptor(p);M.addEventListener("mouseout",L,(J))}else{M.addEventListener(K,L,(J))}}return L}}else{if(l.attachEvent){I=function(M,K,L,J){M.attachEvent("on"+K,L);return L}}else{I=function(){}}}return I}(),h=function(){var I;if(l.removeEventListener){I=function(M,K,L,J){if(K=="mouseenter"){K="mouseover"}else{if(K=="mouseleave"){K="mouseout"}}M.removeEventListener(K,L,(J))}}else{if(l.detachEvent){I=function(L,J,K){L.detachEvent("on"+J,K)}}else{I=function(){}}}return I}();var D=Ext.isGecko?function(I){return Object.prototype.toString.call(I)=="[object XULElement]"}:function(){};var q=Ext.isGecko?function(I){try{return I.nodeType==3}catch(J){return false}}:function(I){return I.nodeType==3};function p(J){var I=z.getRelatedTarget(J);return !(D(I)||w(J.currentTarget,I))}function w(I,K){if(I&&I.firstChild){while(K){if(K===I){return true}try{K=K.parentNode}catch(J){return false}if(K&&(K.nodeType!=1)){K=null}}}return false}function A(L,I,K){var J=-1;Ext.each(v,function(M,N){if(M&&M[j]==K&&M[C]==L&&M[s]==I){J=N}});return J}function F(){var I=false,L=[],J,K=!x||(B>0);if(!E){E=true;Ext.each(r,function(N,O,M){if(N&&(J=H.getElementById(N.id))){if(!N.checkReady||x||J.nextSibling||(H&&H.body)){J=N.override?(N.override===true?N.obj:N.override):J;N.fn.call(J,N.obj);r[O]=null}else{L.push(item)}}});B=(L.length==0)?0:B-1;if(K){o()}else{clearInterval(d);d=null}I=!(E=false)}return I}function o(){if(!d){var I=function(){F()};d=setInterval(I,t)}}function G(){var I=Ext.fly(H).getScroll();return[I.top,I.top]}function k(I,J){I=I.browserEvent||I;var K=I["page"+J];if(!K&&0!=K){K=I["client"+J]||0;if(Ext.isIE){K+=G()[J=="X"?0:1]}}return K}var z={onAvailable:function(K,I,L,J){r.push({id:K,fn:I,obj:L,override:J,checkReady:false});B=m;o()},addListener:function(L,I,K){var J;L=Ext.getDom(L);if(L&&K){if("unload"==I){J=!!(g[g.length]=[L,I,K])}else{v.push([L,I,K,J=e(L,I,K,false)])}}return !!J},removeListener:function(N,J,M){var L=false,K,I;N=Ext.getDom(N);if(!M){L=this.purgeElement(N,false,J)}else{if("unload"==J){Ext.each(g,function(P,Q,O){if(P&&P[0]==N&&P[1]==J&&P[2]==M){g.splice(Q,1);L=true}})}else{K=arguments[3]||A(N,J,M);I=v[K];if(N&&I){h(N,J,I[n],false);I[n]=I[j]=null;v.splice(K,1);L=true}}}return L},getTarget:function(I){I=I.browserEvent||I;return this.resolveTextNode(I.target||I.srcElement)},resolveTextNode:function(I){return I&&!D(I)&&q(I)?I.parentNode:I},getRelatedTarget:function(I){I=I.browserEvent||I;return this.resolveTextNode(I.relatedTarget||(I.type=="mouseout"?I.toElement:I.type=="mouseover"?I.fromElement:null))},getPageX:function(I){return k(I,"X")},getPageY:function(I){return k(I,"Y")},getXY:function(I){return[this.getPageX(I),this.getPageY(I)]},stopEvent:function(I){this.stopPropagation(I);this.preventDefault(I)},stopPropagation:function(I){I=I.browserEvent||I;if(I.stopPropagation){I.stopPropagation()}else{I.cancelBubble=true}},preventDefault:function(I){I=I.browserEvent||I;if(I.preventDefault){I.preventDefault()}else{I.returnValue=false}},getEvent:function(I){I=I||l.event;if(!I){var J=this.getEvent.caller;while(J){I=J.arguments[0];if(I&&Event==I.constructor){break}J=J.caller}}return I},getCharCode:function(I){I=I.browserEvent||I;return I.charCode||I.keyCode||0},_load:function(J){x=true;var I=Ext.lib.Event;if(Ext.isIE&&J!==true){h(l,"load",arguments.callee)}},purgeElement:function(J,L,I){var K=this;Ext.each(K.getListeners(J,I),function(M){if(M){K.removeListener(J,M.type,M.fn)}});if(L&&J&&J.childNodes){Ext.each(J.childNodes,function(M){K.purgeElement(M,L,I)})}},getListeners:function(L,J){var M=this,K=[],I;if(J){I=J=="unload"?g:v}else{I=v.concat(g)}Ext.each(I,function(N,O){if(N&&N[C]==L&&(!J||J==N[s])){K.push({type:N[s],fn:N[j],obj:N[u],adjust:N[y],index:O})}});return K.length?K:null},_unload:function(P){var O=Ext.lib.Event,M,L,J,I,K,N;Ext.each(g,function(Q){if(Q){try{N=Q[y]?(Q[y]===true?Q[u]:Q[y]):l;Q[j].call(N,O.getEvent(R),Q[u])}catch(R){}}});g=null;if(v&&(L=v.length)){while(L){if(J=v[K=--L]){O.removeListener(J[C],J[s],J[j],K)}}}h(l,"unload",O._unload)}};z.on=z.addListener;z.un=z.removeListener;if(H&&H.body){z._load(true)}else{e(l,"load",z._load)}e(l,"unload",z._unload);F();return z}();Ext.lib.Ajax=function(){var g=["MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];function h(t){var s=t.conn,u;function r(v,w){for(u in w){if(w.hasOwnProperty(u)){v.setRequestHeader(u,w[u])}}}if(l.defaultHeaders){r(s,l.defaultHeaders)}if(l.headers){r(s,l.headers);l.headers=null}}function d(u,t,s,r){return{tId:u,status:s?-1:0,statusText:s?"transaction aborted":"communication failure",isAbort:true,isTimeout:true,argument:t}}function k(r,s){(l.headers=l.headers||{})[r]=s}function p(w,u){var r={},s,t=w.conn;try{s=w.conn.getAllResponseHeaders();Ext.each(s.split("\n"),function(x){var y=x.indexOf(":");r[x.substr(0,y)]=x.substr(y+1)})}catch(v){}return{tId:w.tId,status:t.status,statusText:t.statusText,getResponseHeader:function(x){return r[x]},getAllResponseHeaders:function(){return s},responseText:t.responseText,responseXML:t.responseXML,argument:u}}function o(r){r.conn=null;r=null}function e(w,x,s,r){if(!x){o(w);return}var u,t;try{if(w.conn.status!==undefined&&w.conn.status!=0){u=w.conn.status}else{u=13030}}catch(v){u=13030}if((u>=200&&u<300)||(Ext.isIE&&u==1223)){t=p(w,x.argument);if(x.success){if(!x.scope){x.success(t)}else{x.success.apply(x.scope,[t])}}}else{switch(u){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:t=d(w.tId,x.argument,(s?s:false),r);if(x.failure){if(!x.scope){x.failure(t)}else{x.failure.apply(x.scope,[t])}}break;default:t=p(w,x.argument);if(x.failure){if(!x.scope){x.failure(t)}else{x.failure.apply(x.scope,[t])}}}}o(w);t=null}function n(t,w){w=w||{};var r=t.conn,v=t.tId,s=l.poll,u=w.timeout||null;if(u){l.timeout[v]=setTimeout(function(){l.abort(t,w,true)},u)}s[v]=setInterval(function(){if(r&&r.readyState==4){clearInterval(s[v]);s[v]=null;if(u){clearTimeout(l.timeout[v]);l.timeout[v]=null}e(t,w)}},l.pollInterval)}function j(v,s,u,r){var t=m()||null;if(t){t.conn.open(v,s,true);if(l.useDefaultXhrHeader){k("X-Requested-With",l.defaultXhrHeader)}if(r&&l.useDefaultHeader&&(!l.headers||!l.headers["Content-Type"])){k("Content-Type",l.defaultPostHeader)}if(l.defaultHeaders||l.headers){h(t)}n(t,u);t.conn.send(r||null)}return t}function m(){var s;try{if(s=q(l.transactionId)){l.transactionId++}}catch(r){}finally{return s}}function q(u){var r;try{r=new XMLHttpRequest()}catch(t){for(var s=0;s<g.length;++s){try{r=new ActiveXObject(g[s]);break}catch(t){}}}finally{return{conn:r,tId:u}}}var l={request:function(y,w,r,x,s){if(s){var v=this,u=s.xmlData,t=s.jsonData;Ext.applyIf(v,s);if(u||t){k("Content-Type",u?"text/xml":"application/json");x=u||(Ext.isObject(t)?Ext.encode(t):t)}}return j(y||s.method||"POST",w,r,x)},serializeForm:function(s){var t=s.elements||(document.forms[s]||Ext.getDom(s)).elements,z=false,y=encodeURIComponent,w,A,r,u,v="",x;Ext.each(t,function(B){r=B.name;x=B.type;if(!B.disabled&&r){if(/select-(one|multiple)/i.test(x)){Ext.each(B.options,function(C){if(C.selected){v+=String.format("{0}={1}&",y(r),(C.hasAttribute?C.hasAttribute("value"):C.getAttribute("value")!==null)?C.value:C.text)}})}else{if(!/file|undefined|reset|button/i.test(x)){if(!(/radio|checkbox/i.test(x)&&!B.checked)&&!(x=="submit"&&z)){v+=y(r)+"="+y(B.value)+"&";z=/submit/i.test(x)}}}}});return v.substr(0,v.length-1)},useDefaultHeader:true,defaultPostHeader:"application/x-www-form-urlencoded; charset=UTF-8",useDefaultXhrHeader:true,defaultXhrHeader:"XMLHttpRequest",poll:{},timeout:{},pollInterval:50,transactionId:0,abort:function(u,w,r){var t=this,v=u.tId,s=false;if(t.isCallInProgress(u)){u.conn.abort();clearInterval(t.poll[v]);t.poll[v]=null;if(r){t.timeout[v]=null}e(u,w,(s=true),r)}return s},isCallInProgress:function(r){return r.conn&&!{0:true,4:true}[r.conn.readyState]}};return l}();(function(){var h=Ext.lib,k=/width|height|opacity|padding/i,g=/^((width|height)|(top|left))$/,d=/width|height|top$|bottom$|left$|right$/i,j=/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i,l=function(m){return typeof m!=="undefined"},e=function(){return new Date()};h.Anim={motion:function(p,n,q,r,m,o){return this.run(p,n,q,r,m,o,Ext.lib.Motion)},run:function(q,n,s,t,m,p,o){o=o||Ext.lib.AnimBase;if(typeof t=="string"){t=Ext.lib.Easing[t]}var r=new o(q,n,s,t);r.animateX(function(){if(Ext.isFunction(m)){m.call(p)}});return r}};h.AnimBase=function(n,m,o,p){if(n){this.init(n,m,o,p)}};h.AnimBase.prototype={doMethod:function(m,p,n){var o=this;return o.method(o.curFrame,p,n-p,o.totalFrames)},setAttr:function(m,o,n){if(k.test(m)&&o<0){o=0}Ext.fly(this.el,"_anim").setStyle(m,o+n)},getAttr:function(m){var o=Ext.fly(this.el),p=o.getStyle(m),n=g.exec(m)||[];if(p!=="auto"&&!j.test(p)){return parseFloat(p)}return(!!(n[2])||(o.getStyle("position")=="absolute"&&!!(n[3])))?o.dom["offset"+n[0].charAt(0).toUpperCase()+n[0].substr(1)]:0},getDefaultUnit:function(m){return d.test(m)?"px":""},animateX:function(p,m){var n=this,o=function(){n.onComplete.removeListener(o);if(Ext.isFunction(p)){p.call(m||n,n)}};n.onComplete.addListener(o,n);n.animate()},setRunAttr:function(p){var r=this,s=this.attributes[p],t=s.to,q=s.by,u=s.from,v=s.unit,n=(this.runAttrs[p]={}),o;if(!l(t)&&!l(q)){return false}var m=l(u)?u:r.getAttr(p);if(l(t)){o=t}else{if(l(q)){if(Ext.isArray(m)){o=[];Ext.each(m,function(w,x){o[x]=w+q[x]})}else{o=m+q}}}Ext.apply(n,{start:m,end:o,unit:l(v)?v:r.getDefaultUnit(p)})},init:function(n,r,q,m){var t=this,p=0,u=h.AnimMgr;Ext.apply(t,{isAnimated:false,startTime:null,el:Ext.getDom(n),attributes:r||{},duration:q||1,method:m||h.Easing.easeNone,useSec:true,curFrame:0,totalFrames:u.fps,runAttrs:{},animate:function(){var w=this,x=w.duration;if(w.isAnimated){return false}w.curFrame=0;w.totalFrames=w.useSec?Math.ceil(u.fps*x):x;u.registerElement(w)},stop:function(w){var x=this;if(w){x.curFrame=x.totalFrames;x._onTween.fire()}u.stop(x)}});var v=function(){var x=this,w;x.onStart.fire();x.runAttrs={};for(w in this.attributes){this.setRunAttr(w)}x.isAnimated=true;x.startTime=e();p=0};var s=function(){var x=this;x.onTween.fire({duration:e()-x.startTime,curFrame:x.curFrame});var y=x.runAttrs;for(var w in y){this.setAttr(w,x.doMethod(w,y[w].start,y[w].end),y[w].unit)}++p};var o=function(){var w=this,y=(e()-w.startTime)/1000,x={duration:y,frames:p,fps:p/y};w.isAnimated=false;p=0;w.onComplete.fire(x)};t.onStart=new Ext.util.Event(t);t.onTween=new Ext.util.Event(t);t.onComplete=new Ext.util.Event(t);(t._onStart=new Ext.util.Event(t)).addListener(v);(t._onTween=new Ext.util.Event(t)).addListener(s);(t._onComplete=new Ext.util.Event(t)).addListener(o)}};Ext.lib.AnimMgr=new function(){var q=this,o=null,n=[],m=0;Ext.apply(q,{fps:1000,delay:1,registerElement:function(s){n.push(s);++m;s._onStart.fire();q.start()},unRegister:function(t,s){t._onComplete.fire();s=s||r(t);if(s!=-1){n.splice(s,1)}if(--m<=0){q.stop()}},start:function(){if(o===null){o=setInterval(q.run,q.delay)}},stop:function(u){if(!u){clearInterval(o);for(var t=0,s=n.length;t<s;++t){if(n[0].isAnimated){q.unRegister(n[0],0)}}n=[];o=null;m=0}else{q.unRegister(u)}},run:function(){var s;Ext.each(n,function(t){if(t&&t.isAnimated){s=t.totalFrames;if(t.curFrame<s||s===null){++t.curFrame;if(t.useSec){p(t)}t._onTween.fire()}else{q.stop(t)}}},q)}});var r=function(t){var s=-1;Ext.each(n,function(v,u){if(v==t){s=u;return false}});return s};var p=function(t){var x=t.totalFrames,w=t.curFrame,v=t.duration,u=(w*v*1000/x),s=(e()-t.startTime),y=0;if(s<v*1000){y=Math.round((s/u-1)*w)}else{y=x-(w+1)}if(y>0&&isFinite(y)){if(t.curFrame+y>=x){y=x-(w+1)}t.curFrame+=y}}};h.Bezier=new function(){this.getPosition=function(r,q){var u=r.length,p=[],s=1-q,o,m;for(o=0;o<u;++o){p[o]=[r[o][0],r[o][1]]}for(m=1;m<u;++m){for(o=0;o<u-m;++o){p[o][0]=s*p[o][0]+q*p[parseInt(o+1,10)][0];p[o][1]=s*p[o][1]+q*p[parseInt(o+1,10)][1]}}return[p[0][0],p[0][1]]}};h.Easing={easeNone:function(n,m,p,o){return p*n/o+m},easeIn:function(n,m,p,o){return p*(n/=o)*n+m},easeOut:function(n,m,p,o){return -p*(n/=o)*(n-2)+m}};(function(){h.Motion=function(r,q,s,t){if(r){h.Motion.superclass.constructor.call(this,r,q,s,t)}};Ext.extend(h.Motion,Ext.lib.AnimBase);var p=h.Motion.superclass,o=h.Motion.prototype,n=/^points$/i;Ext.apply(h.Motion.prototype,{setAttr:function(q,u,t){var s=this,r=p.setAttr;if(n.test(q)){t=t||"px";r.call(s,"left",u[0],t);r.call(s,"top",u[1],t)}else{r.call(s,q,u,t)}},getAttr:function(q){var s=this,r=p.getAttr;return n.test(q)?[r.call(s,"left"),r.call(s,"top")]:r.call(s,q)},doMethod:function(q,t,r){var s=this;return n.test(q)?h.Bezier.getPosition(s.runAttrs[q],s.method(s.curFrame,0,100,s.totalFrames)/100):p.doMethod.call(s,q,t,r)},setRunAttr:function(x){if(n.test(x)){var z=this,s=this.el,C=this.attributes.points,v=C.control||[],A=C.from,B=C.to,y=C.by,D=h.Dom,r,u,t,w,q;if(v.length>0&&!Ext.isArray(v[0])){v=[v]}else{}Ext.fly(s,"_anim").position();D.setXY(s,l(A)?A:D.getXY(s));r=z.getAttr("points");if(l(B)){t=m.call(z,B,r);for(u=0,w=v.length;u<w;++u){v[u]=m.call(z,v[u],r)}}else{if(l(y)){t=[r[0]+y[0],r[1]+y[1]];for(u=0,w=v.length;u<w;++u){v[u]=[r[0]+v[u][0],r[1]+v[u][1]]}}}q=this.runAttrs[x]=[r];if(v.length>0){q=q.concat(v)}q[q.length]=t}else{p.setRunAttr.call(this,x)}}});var m=function(q,s){var r=h.Dom.getXY(this.el);return[q[0]-r[0]+s[0],q[1]-r[1]+s[1]]}})()})();(function(){var d=Math.abs,k=Math.PI,j=Math.asin,h=Math.pow,e=Math.sin,g=Ext.lib;Ext.apply(g.Easing,{easeBoth:function(m,l,o,n){return((m/=n/2)<1)?o/2*m*m+l:-o/2*((--m)*(m-2)-1)+l},easeInStrong:function(m,l,o,n){return o*(m/=n)*m*m*m+l},easeOutStrong:function(m,l,o,n){return -o*((m=m/n-1)*m*m*m-1)+l},easeBothStrong:function(m,l,o,n){return((m/=n/2)<1)?o/2*m*m*m*m+l:-o/2*((m-=2)*m*m*m-2)+l},elasticIn:function(n,l,u,r,m,q){if(n==0||(n/=r)==1){return n==0?l:l+u}q=q||(r*0.3);var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return -(m*h(2,10*(n-=1))*e((n*r-o)*(2*k)/q))+l},elasticOut:function(n,l,u,r,m,q){if(n==0||(n/=r)==1){return n==0?l:l+u}q=q||(r*0.3);var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return m*h(2,-10*n)*e((n*r-o)*(2*k)/q)+u+l},elasticBoth:function(n,l,u,r,m,q){if(n==0||(n/=r/2)==2){return n==0?l:l+u}q=q||(r*(0.3*1.5));var o;if(m>=d(u)){o=q/(2*k)*j(u/m)}else{m=u;o=q/4}return n<1?-0.5*(m*h(2,10*(n-=1))*e((n*r-o)*(2*k)/q))+l:m*h(2,-10*(n-=1))*e((n*r-o)*(2*k)/q)*0.5+u+l},backIn:function(m,l,p,o,n){n=n||1.70158;return p*(m/=o)*m*((n+1)*m-n)+l},backOut:function(m,l,p,o,n){if(!n){n=1.70158}return p*((m=m/o-1)*m*((n+1)*m+n)+1)+l},backBoth:function(m,l,p,o,n){n=n||1.70158;return((m/=o/2)<1)?p/2*(m*m*(((n*=(1.525))+1)*m-n))+l:p/2*((m-=2)*m*(((n*=(1.525))+1)*m+n)+2)+l},bounceIn:function(m,l,o,n){return o-g.Easing.bounceOut(n-m,0,o,n)+l},bounceOut:function(m,l,o,n){if((m/=n)<(1/2.75)){return o*(7.5625*m*m)+l}else{if(m<(2/2.75)){return o*(7.5625*(m-=(1.5/2.75))*m+0.75)+l}else{if(m<(2.5/2.75)){return o*(7.5625*(m-=(2.25/2.75))*m+0.9375)+l}}}return o*(7.5625*(m-=(2.625/2.75))*m+0.984375)+l},bounceBoth:function(m,l,o,n){return(m<n/2)?g.Easing.bounceIn(m*2,0,o,n)*0.5+l:g.Easing.bounceOut(m*2-n,0,o,n)*0.5+o*0.5+l}})})();(function(){var j=Ext.lib;j.Anim.color=function(r,p,s,t,o,q){return j.Anim.run(r,p,s,t,o,q,j.ColorAnim)};j.ColorAnim=function(p,o,q,r){j.ColorAnim.superclass.constructor.call(this,p,o,q,r)};Ext.extend(j.ColorAnim,j.AnimBase);var l=j.ColorAnim.superclass,k=/color$/i,g=/^transparent|rgba\(0, 0, 0, 0\)$/,n=/^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i,d=/^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i,e=/^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i,h=function(o){return typeof o!=="undefined"};function m(p){var r=parseInt,q,o=null,t;if(p.length==3){return p}Ext.each([d,n,e],function(u,s){q=(s%2==0)?16:10;t=u.exec(p);if(t&&t.length==4){o=[r(t[1],q),r(t[2],q),r(t[3],q)];return false}});return o}Ext.apply(j.ColorAnim.prototype,{getAttr:function(o){var q=this,p=q.el,r;if(k.test(o)){while(p&&g.test(r=Ext.fly(p).getStyle(o))){p=p.parentNode;r="fff"}}else{r=l.getAttr.call(q,o)}return r},doMethod:function(o,t,p){var r=this,s,q=Math.floor;if(k.test(o)){s=[];Ext.each(t,function(u,w){s[w]=l.doMethod.call(r,o,u,p[w])});s="rgb("+q(s[0])+","+q(s[1])+","+q(s[2])+")"}else{s=l.doMethod.call(r,o,t,p)}return s},setRunAttr:function(o){var r=this,q=r.attributes[o],v=q.to,s=q.by,t;l.setRunAttr.call(r,o);t=r.runAttrs[o];if(k.test(o)){var u=m(t.start),p=m(t.end);if(!h(v)&&h(s)){p=m(s);Ext.each(u,function(x,w){p[i]=x+p[i]})}t.start=u;t.end=p}}})})();(function(){var d=Ext.lib;d.Anim.scroll=function(l,j,m,n,h,k){return d.Anim.run(l,j,m,n,h,k,d.Scroll)};d.Scroll=function(j,h,k,l){if(j){d.Scroll.superclass.constructor.call(this,j,h,k,l)}};Ext.extend(d.Scroll,d.ColorAnim);var g=d.Scroll.superclass,e="scroll";Ext.apply(d.Scroll.prototype,{doMethod:function(h,o,j){var m,l=this,n=l.curFrame,k=l.totalFrames;if(h==e){m=[l.method(n,o[0],j[0]-o[0],k),l.method(n,o[1],j[1]-o[1],k)]}else{m=g.doMethod.call(l,h,o,j)}return m},getAttr:function(h){var j=this;if(h==e){return[j.el.scrollLeft,j.el.scrollTop]}else{return g.getAttr.call(j,h)}},setAttr:function(h,l,k){var j=this;if(h==e){j.el.scrollLeft=l[0];j.el.scrollTop=l[1]}else{g.setAttr.call(j,h,l,k)}}})})();if(Ext.isIE){function a(){var d=Function.prototype;delete d.createSequence;delete d.defer;delete d.createDelegate;delete d.createCallback;delete d.createInterceptor;window.detachEvent("onunload",a)}window.attachEvent("onunload",a)}})();(function(){var j=Ext.util,m=Ext.toArray,l=Ext.each,a=Ext.isObject,h=true,k=false;j.Observable=function(){var n=this,o=n.events;if(n.listeners){n.on(n.listeners);delete n.listeners}n.events=o||{}};j.Observable.prototype=function(){var o=/^(?:scope|delay|buffer|single)$/,n=function(p){return p.toLowerCase()};return{fireEvent:function(){var p=m(arguments),s=n(p[0]),t=this,r=h,v=t.events[s],u,w;if(t.eventsSuspended===h){if(u=t.suspendedEventsQueue){u.push(p)}}else{if(a(v)&&v.bubble){if(v.fire.apply(v,p.slice(1))===k){return k}w=t.getBubbleTarget&&t.getBubbleTarget();if(w&&w.enableBubble){w.enableBubble(s);return w.fireEvent.apply(w,p)}}else{if(a(v)){p.shift();r=v.fire.apply(v,p)}}}return r},addListener:function(r,u,w,q){var t=this,s,x,v,p;if(a(r)){q=r;for(s in q){x=q[s];if(!o.test(s)){t.addListener(s,x.fn||x,x.scope||q.scope,x.fn?x:q)}}}else{r=n(r);p=t.events[r]||h;if(typeof p=="boolean"){t.events[r]=p=new j.Event(t,r)}p.addListener(u,w,a(q)?q:{})}},removeListener:function(p,r,q){var s=this.events[n(p)];if(a(s)){s.removeListener(r,q)}},purgeListeners:function(){var r=this.events,p,q;for(q in r){p=r[q];if(a(p)){p.clearListeners()}}},addEvents:function(q){var p=this;p.events=p.events||{};if(typeof q=="string"){l(arguments,function(r){p.events[r]=p.events[r]||h})}else{Ext.applyIf(p.events,q)}},hasListener:function(p){var q=this.events[p];return a(q)&&q.listeners.length>0},suspendEvents:function(p){this.eventsSuspended=h;if(p){this.suspendedEventsQueue=[]}},resumeEvents:function(){var p=this;p.eventsSuspended=!delete p.suspendedEventQueue;l(p.suspendedEventsQueue,function(q){p.fireEvent.apply(p,q)})}}}();var e=j.Observable.prototype;e.on=e.addListener;e.un=e.removeListener;j.Observable.releaseCapture=function(n){n.fireEvent=e.fireEvent};function g(p,q,n){return function(){if(q.target==arguments[0]){p.apply(n,m(arguments))}}}function c(q,r,p){var n=new j.DelayedTask();return function(){n.delay(r.buffer,q,p,m(arguments))}}function d(p,q,o,n){return function(){q.removeListener(o,n);return p.apply(n,arguments)}}function b(p,q,n){return function(){var o=m(arguments);(function(){p.apply(n,o)}).defer(q.delay||10)}}j.Event=function(o,n){this.name=n;this.obj=o;this.listeners=[]};j.Event.prototype={addListener:function(q,p,o){var r=this,n;p=p||r.obj;if(!r.isListening(q,p)){n=r.createListener(q,p,o);if(r.firing){r.listeners=r.listeners.slice(0)}r.listeners.push(n)}},createListener:function(r,q,s){s=s||{},q=q||this.obj;var n={fn:r,scope:q,options:s},p=r;if(s.target){p=g(p,s,q)}if(s.delay){p=b(p,s,q)}if(s.single){p=d(p,this,r,q)}if(s.buffer){p=c(p,s,q)}n.fireFn=p;return n},findListener:function(q,p){var o,n=-1;l(this.listeners,function(r,s){o=r.scope;if(r.fn==q&&(o==p||o==this.obj)){n=s;return k}},this);return n},isListening:function(o,n){return this.findListener(o,n)!=-1},removeListener:function(q,p){var o,r=this,n=k;if((o=r.findListener(q,p))!=-1){if(r.firing){r.listeners=r.listeners.slice(0)}r.listeners.splice(o,1);n=h}return n},clearListeners:function(){this.listeners=[]},fire:function(){var p=this,o=m(arguments),n=h;l(p.listeners,function(q){p.firing=h;if(q.fireFn.apply(q.scope||p.obj||window,o)===k){return n=p.firing=k}});p.firing=k;return n}}})();Ext.DomHelper=function(){var t=null,k=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,m=/^table|tbody|tr|td$/i,q,n="afterbegin",o="afterend",c="beforebegin",p="beforeend",a="<table>",h="</table>",b=a+"<tbody>",j="</tbody>"+h,l=b+"<tr>",s="</tr>"+j;function g(x,z,y,A,w,u){var v=q.insertHtml(A,Ext.getDom(x),r(z));return y?Ext.get(v,true):v}function r(z){var w="",v,y,x,u,A;if(typeof z=="string"){w=z}else{if(Ext.isArray(z)){Ext.each(z,function(B){w+=r(B)})}else{w+="<"+(z.tag=z.tag||"div");for(v in z){y=z[v];if(!/tag|children|cn|html$/i.test(v)&&!Ext.isFunction(y)){if(Ext.isObject(y)){w+=" "+v+"='";for(x in y){u=y[x];w+=!Ext.isFunction(u)?x+":"+u+";":""}w+="'"}else{w+=" "+({cls:"class",htmlFor:"for"}[v]||v)+"='"+y+"'"}}}if(k.test(z.tag)){w+="/>"}else{w+=">";if(A=z.children||z.cn){w+=r(A)}else{if(z.html){w+=z.html}}w+="</"+z.tag+">"}}}return w}function e(z,x,w,y){t.innerHTML=[x,w,y].join("");var u=-1,v=t;while(++u<z){v=v.firstChild}return v}function d(u,v,x,w){var y,z;t=t||document.createElement("div");if(u=="td"&&(v==n||v==p)||!/td|tr|tbody/i.test(u)&&(v==c||v==o)){return}z=v==c?x:v==o?x.nextSibling:v==n?x.firstChild:null;if(v==c||v==o){x=x.parentNode}if(u=="td"||(u=="tr"&&(v==p||v==n))){y=e(4,l,w,s)}else{if((u=="tbody"&&(v==p||v==n))||(u=="tr"&&(v==c||v==o))){y=e(3,b,w,j)}else{y=e(2,a,w,h)}}x.insertBefore(y,z);return y}q={markup:function(u){return r(u)},insertHtml:function(z,u,A){var y={},w,C,B,D,x,v;z=z.toLowerCase();y[c]=["BeforeBegin","previousSibling"];y[o]=["AfterEnd","nextSibling"];if(u.insertAdjacentHTML){if(m.test(u.tagName)&&(v=d(u.tagName.toLowerCase(),z,u,A))){return v}y[n]=["AfterBegin","firstChild"];y[p]=["BeforeEnd","lastChild"];if(w=y[z]){u.insertAdjacentHTML(w[0],A);return u[w[1]]}}else{B=u.ownerDocument.createRange();C="setStart"+(/end/i.test(z)?"After":"Before");if(y[z]){B[C](u);D=B.createContextualFragment(A);u.parentNode.insertBefore(D,z==c?u:u.nextSibling);return u[(z==c?"previous":"next")+"Sibling"]}else{x=(z==n?"first":"last")+"Child";if(u.firstChild){B[C](u[x]);D=B.createContextualFragment(A);z==n?u.insertBefore(D,u.firstChild):u.appendChild(D)}else{u.innerHTML=A}return u[x]}}throw'Illegal insertion point -> "'+z+'"'},insertBefore:function(u,w,v){return g(u,w,v,c)},insertAfter:function(u,w,v){return g(u,w,v,o,"nextSibling")},insertFirst:function(u,w,v){return g(u,w,v,n,"firstChild")},append:function(u,w,v){return g(u,w,v,p,"",true)},overwrite:function(u,w,v){u=Ext.getDom(u);u.innerHTML=r(w);return v?Ext.get(u.firstChild):u.firstChild},createHtml:r};return q}();Ext.Template=function(d){var e=this,b=arguments,c=[];if(Ext.isArray(d)){d=d.join("")}else{if(b.length>1){Ext.each(b,function(a){if(Ext.isObject(a)){Ext.apply(e,a)}else{c.push(a)}});d=c.join("")}}e.html=d;if(e.compiled){e.compile()}};Ext.Template.prototype={applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(c,d){return a[d]!==undefined?a[d]:""})},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},re:/\{([\w-]+)\}/g,compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'"}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.DomQuery=function(){var cache={},simpleCache={},valueCache={},nonSpace=/\S/,trimRe=/^\s+|\s+$/g,tplRe=/\{(\d+)\}/g,modeRe=/^(\s?[\/>+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,isOpera=Ext.isOpera,key=30803;eval("var batch = 30803;");function child(p,index){var i=0,n=p.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(d){var n=d.firstChild,ni=-1,nx;while(n){nx=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){d.removeChild(n)}else{n.nodeIndex=++ni}n=nx}return this}function byClassName(c,a,v){if(!v){return c}var r=[],ri=-1,cn;for(var i=0,ci;ci=c[i];i++){if((" "+ci.className+" ").indexOf(v)!=-1){r[++ri]=ci}}return r}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=isOpera?ni.childNodes:(ni.children||ni.childNodes);for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i<l;i++){a[a.length]=b[i]}return a}function byTag(cs,tagName){if(cs.tagName||cs==document){cs=[cs]}if(!tagName){return cs}var r=[],ri=-1;tagName=tagName.toLowerCase();for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType==1&&ci.tagName.toLowerCase()==tagName){r[++ri]=ci}}return r}function byId(cs,attr,id){if(cs.tagName||cs==document){cs=[cs]}if(!id){return cs}var r=[],ri=-1;for(var i=0,ci;ci=cs[i];i++){if(ci&&ci.id==id){r[++ri]=ci;return r}}return r}function byAttribute(cs,attr,value,op,custom){var r=[],ri=-1,st=custom=="{",f=Ext.DomQuery.operators[op];for(var i=0,ci;ci=cs[i];i++){if(ci.nodeType!=1){continue}var a;if(st){a=Ext.DomQuery.getStyle(ci,attr)}else{if(attr=="class"||attr=="className"){a=ci.className}else{if(attr=="for"){a=ci.htmlFor}else{if(attr=="href"){a=ci.getAttribute("href",2)}else{a=ci.getAttribute(attr)}}}}if((f&&f(a,value))||(!f&&a)){r[++ri]=ci}}return r}function byPseudo(cs,name,value){return Ext.DomQuery.pseudos[name](cs,value)}function nodupIEXml(cs){var d=++key,r;cs[0].setAttribute("_nodup",d);r=[cs[0]];for(var i=1,len=cs.length;i<len;i++){var c=cs[i];if(!c.getAttribute("_nodup")!=d){c.setAttribute("_nodup",d);r[r.length]=c}}for(var i=0,len=cs.length;i<len;i++){cs[i].removeAttribute("_nodup")}return r}function nodup(cs){if(!cs){return[]}var len=cs.length,c,i,r=cs,cj,ri=-1;if(!len||typeof cs.nodeType!="undefined"||len==1){return cs}if(isIE&&typeof cs[0].selectSingleNode!="undefined"){return nodupIEXml(cs)}var d=++key;cs[0]._nodup=d;for(i=1;c=cs[i];i++){if(c._nodup!=d){c._nodup=d}else{r=[];for(var j=0;j<i;j++){r[++ri]=cs[j]}for(j=i+1;cj=cs[j];j++){if(cj._nodup!=d){cj._nodup=d;r[++ri]=cj}}return r}}return r}function quickDiffIEXml(c1,c2){var d=++key,r=[];for(var i=0,len=c1.length;i<len;i++){c1[i].setAttribute("_qdiff",d)}for(var i=0,len=c2.length;i<len;i++){if(c2[i].getAttribute("_qdiff")!=d){r[r.length]=c2[i]}}for(var i=0,len=c1.length;i<len;i++){c1[i].removeAttribute("_qdiff")}return r}function quickDiff(c1,c2){var len1=c1.length,d=++key,r=[];if(!len1){return c2}if(isIE&&c1[0].selectSingleNode){return quickDiffIEXml(c1,c2)}for(var i=0;i<len1;i++){c1[i]._qdiff=d}for(var i=0,len=c2.length;i<len;i++){if(c2[i]._qdiff!=d){r[r.length]=c2[i]}}return r}function quickId(ns,mode,root,id){if(ns==root){var d=root.ownerDocument||root;return d.getElementById(id)}ns=getNodes(ns,mode,"*");return byId(ns,null,id)}return{getStyle:function(el,name){return Ext.fly(el).getStyle(name)},compile:function(path,type){type=type||"select";var fn=["var f = function(root){\n var mode; ++batch; var n = root || document;\n"],q=path,mode,lq,tk=Ext.DomQuery.matchers,tklen=tk.length,mm,lmode=q.match(modeRe);if(lmode&&lmode[1]){fn[fn.length]='mode="'+lmode[1].replace(trimRe,"")+'";';q=q.replace(lmode[1],"")}while(path.substr(0,1)=="/"){path=path.substr(1)}while(q&&lq!=q){lq=q;var tm=q.match(tagTokenRe);if(type=="select"){if(tm){if(tm[1]=="#"){fn[fn.length]='n = quickId(n, mode, root, "'+tm[2]+'");'}else{fn[fn.length]='n = getNodes(n, mode, "'+tm[2]+'");'}q=q.replace(tm[0],"")}else{if(q.substr(0,1)!="@"){fn[fn.length]='n = getNodes(n, mode, "*");'}}}else{if(tm){if(tm[1]=="#"){fn[fn.length]='n = byId(n, null, "'+tm[2]+'");'}else{fn[fn.length]='n = byTag(n, "'+tm[2]+'");'}q=q.replace(tm[0],"")}}while(!(mm=q.match(modeRe))){var matched=false;for(var j=0;j<tklen;j++){var t=tk[j];var m=q.match(t.re);if(m){fn[fn.length]=t.select.replace(tplRe,function(x,i){return m[i]});q=q.replace(m[0],"");matched=true;break}}if(!matched){throw'Error parsing selector, parsing failed at "'+q+'"'}}if(mm[1]){fn[fn.length]='mode="'+mm[1].replace(trimRe,"")+'";';q=q.replace(mm[1],"")}}fn[fn.length]="return nodup(n);\n}";eval(fn.join(""));return f},select:function(path,root,type){if(!root||root==document){root=document}if(typeof root=="string"){root=document.getElementById(root)}var paths=path.split(","),results=[];for(var i=0,len=paths.length;i<len;i++){var p=paths[i].replace(trimRe,"");if(!cache[p]){cache[p]=Ext.DomQuery.compile(p);if(!cache[p]){throw p+" is not a valid selector"}}var result=cache[p](root);if(result&&result!=document){results=results.concat(result)}}if(paths.length>1){return nodup(results)}return results},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, null, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, null, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.EventManager=function(){var u,n,k=false,m=Ext.lib.Event,o=Ext.lib.Dom,b=document,v=window,g="ie-deferred-loader",p="DOMContentLoaded",e={},h=/^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/;function l(B,x,A,z,y){var D=Ext.id(B),C=e[D]=e[D]||{};(C[x]=C[x]||[]).push([A,z,y]);m.on(B,x,z);if(x=="mousewheel"&&B.addEventListener){var w=["DOMMouseScroll",z,false];B.addEventListener.apply(B,w);m.on(window,"unload",function(){B.removeEventListener.apply(B,w)})}if(x=="mousedown"&&B==document){Ext.EventManager.stoppedMouseDownEvent.addListener(z)}}function c(){if(!k){Ext.isReady=k=true;if(n){clearInterval(n)}if(Ext.isGecko||Ext.isOpera){b.removeEventListener(p,c,false)}if(Ext.isIE){var w=b.getElementById(g);if(w){w.onreadystatechange=null;w.parentNode.removeChild(w)}}if(u){u.fire();u.clearListeners()}}}function a(){var w="complete";u=new Ext.util.Event();if(Ext.isGecko||Ext.isOpera){b.addEventListener(p,c,false)}else{if(Ext.isIE){b.write("<script id="+g+' defer="defer" src="//:"><\/script>');b.getElementById(g).onreadystatechange=function(){if(this.readyState==w){c()}}}else{if(Ext.isWebKit){n=setInterval(function(){if(b.readyState==w){c()}},10)}}}m.on(v,"load",c)}function s(w,x){return function(){var y=Ext.toArray(arguments);if(x.target==Ext.EventObject.setEvent(y[0]).target){w.apply(this,y)}}}function t(x,y){var w=new Ext.util.DelayedTask(x);return function(z){w.delay(y.buffer,x,null,[new Ext.EventObjectImpl(z)])}}function q(A,z,w,y,x){return function(B){Ext.EventManager.removeListener(z,w,y,x);A(B)}}function d(w,x){return function(y){y=new Ext.EventObjectImpl(y);setTimeout(function(){w(y)},x.delay||10)}}function j(y,x,w,C,B){var D=!Ext.isObject(w)?{}:w,A=Ext.getDom(y);C=C||D.fn;B=B||D.scope;if(!A){throw'Error listening for "'+x+'". Element "'+y+"\" doesn't exist."}function z(F){if(!Ext){return}F=Ext.EventObject.setEvent(F);var E;if(D.delegate){if(!(E=F.getTarget(D.delegate,A))){return}}else{E=F.target}if(D.stopEvent){F.stopEvent()}if(D.preventDefault){F.preventDefault()}if(D.stopPropagation){F.stopPropagation()}if(D.normalized){F=F.browserEvent}C.call(B||A,F,E,D)}if(D.target){z=s(z,D)}if(D.delay){z=d(z,D)}if(D.single){z=q(z,A,x,C,B)}if(D.buffer){z=t(z,D)}l(A,x,C,z,B);return z}var r={addListener:function(y,w,A,z,x){if(Ext.isObject(w)){var D=w,B,C;for(B in D){C=D[B];if(!h.test(B)){if(Ext.isFunction(C)){j(y,B,D,C,D.scope)}else{j(y,B,C)}}}}else{j(y,w,x,A,z)}},removeListener:function(x,w,B,A){var z=Ext.getDom(x),C=Ext.id(z),y;Ext.each((e[C]||{})[w],function(E,F,D){if(Ext.isArray(E)&&E[0]==B&&(!A||E[2]==A)){m.un(z,w,y=E[1]);D.splice(F,1);return false}});if(w=="mousewheel"&&z.addEventListener&&y){z.removeEventListener("DOMMouseScroll",y,false)}if(w=="mousedown"&&z==b&&y){Ext.EventManager.stoppedMouseDownEvent.removeListener(y)}},removeAll:function(x){var z=Ext.id(x=Ext.getDom(x)),y=e[z],w;for(w in y){if(y.hasOwnProperty(w)){Ext.each(y[w],function(A){m.un(x,w,A.wrap)})}}e[z]=null},onDocumentReady:function(y,x,w){if(k){u.addListener(y,x,w);u.fire();u.clearListeners()}else{if(!u){a()}w=w||{};w.delay=w.delay||1;u.addListener(y,x,w)}},elHash:e};r.on=r.addListener;r.un=r.removeListener;r.stoppedMouseDownEvent=new Ext.util.Event();return r}();Ext.onReady=Ext.EventManager.onDocumentReady;(function(){var a=function(){var c=document.body||document.getElementsByTagName("body")[0];if(!c){return false}var b=[" ",Ext.isIE?"ext-ie "+(Ext.isIE6?"ext-ie6":(Ext.isIE7?"ext-ie7":"ext-ie8")):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?"ext-gecko2":"ext-gecko3"):Ext.isOpera?"ext-opera":Ext.isWebKit?"ext-webkit":""];if(Ext.isSafari){b.push("ext-safari "+(Ext.isSafari2?"ext-safari2":(Ext.isSafari3?"ext-safari3":"ext-safari4")))}else{if(Ext.isChrome){b.push("ext-chrome")}}if(Ext.isMac){b.push("ext-mac")}if(Ext.isLinux){b.push("ext-linux")}if(Ext.isBorderBox){b.push("ext-border-box")}if(Ext.isStrict){var d=c.parentNode;if(d){d.className+=" ext-strict"}}c.className+=b.join(" ");return true};if(!a()){Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},c=Ext.isIE?{1:0,4:1,2:2}:(Ext.isWebKit?{1:0,2:1,3:2}:{0:0,1:1,2:2});Ext.EventObjectImpl=function(d){if(d){this.setEvent(d.browserEvent||d)}};Ext.EventObjectImpl.prototype={setEvent:function(g){var d=this;if(g==d||(g&&g.browserEvent)){return g}d.browserEvent=g;if(g){d.button=g.button?c[g.button]:(g.which?g.which-1:-1);if(g.type=="click"&&d.button==-1){d.button=0}d.type=g.type;d.shiftKey=g.shiftKey;d.ctrlKey=g.ctrlKey||g.metaKey||false;d.altKey=g.altKey;d.keyCode=g.keyCode;d.charCode=g.charCode;d.target=b.getTarget(g);d.xy=b.getXY(g)}else{d.button=-1;d.shiftKey=false;d.ctrlKey=false;d.altKey=false;d.keyCode=0;d.charCode=0;d.target=null;d.xy=[0,0]}return d},stopEvent:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopEvent(d.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var d=this;if(d.browserEvent){if(d.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(d)}b.stopPropagation(d.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(d){return Ext.isSafari?(a[d]||d):d},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(e,g,d){return e?Ext.fly(this.target).findParent(e,g,d):(d?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var d=this.browserEvent;var g=0;if(d.wheelDelta){g=d.wheelDelta/120}else{if(d.detail){g=-d.detail/3}}return g},within:function(g,h,d){if(g){var e=this[h?"getRelatedTarget":"getTarget"]();return e&&((d?(e==Ext.getDom(g)):false)||Ext.fly(g).contains(e))}return false}};return new Ext.EventObjectImpl()}();(function(){var j=document;Ext.Element=function(o,p){var q=typeof o=="string"?j.getElementById(o):o,r;if(!q){return null}r=q.id;if(!p&&r&&Ext.Element.cache[r]){return Ext.Element.cache[r]}this.dom=q;this.id=r||Ext.id(q)};var a=Ext.lib.Dom,e=Ext.DomHelper,m=Ext.lib.Event,d=Ext.lib.Anim,g=Ext.Element;g.prototype={set:function(t,q){var r=this.dom,p,s;for(p in t){s=t[p];if(p!="style"&&!Ext.isFunction(s)){if(p=="cls"){r.className=s}else{if(t.hasOwnProperty(p)){if(q||!!r.setAttribute){r.setAttribute(p,s)}else{r[p]=s}}}}}if(t.style){Ext.DomHelper.applyStyles(r,t.style)}return this},defaultUnit:"px",is:function(o){return Ext.DomQuery.is(this.dom,o)},focus:function(r,q){var o=this,q=q||o.dom;try{if(Number(r)){o.focus.defer(r,null,[null,q])}else{q.focus()}}catch(p){}return o},blur:function(){try{this.dom.blur()}catch(o){}return this},getValue:function(o){var p=this.dom.value;return o?parseInt(p,10):p},addListener:function(o,r,q,p){Ext.EventManager.on(this.dom,o,r,q||this,p);return this},removeListener:function(o,q,p){Ext.EventManager.removeListener(this.dom,o,q,p||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},addUnits:function(o){if(o===""||o=="auto"||o===undefined){o=o||""}else{if(!isNaN(o)||!k.test(o)){o=o+(this.defaultUnit||"px")}}return o},load:function(p,q,o){Ext.Ajax.request(Ext.apply({params:q,url:p.url||p,callback:o,el:this.dom,indicatorText:p.indicatorText||""},Ext.isObject(p)?p:{}));return this},isBorderBox:function(){return h[(this.dom.tagName||"").toLowerCase()]||Ext.isBorderBox},remove:function(){var o=this,p=o.dom;o.removeAllListeners();delete g.cache[p.id];delete g.dataCache[p.id];Ext.removeNode(p)},hover:function(p,o,r,q){var s=this;s.on("mouseenter",p,r||s.dom,q);s.on("mouseleave",o,r||s.dom,q);return s},contains:function(o){return !o?false:Ext.lib.Dom.isAncestor(this.dom,o.dom?o.dom:o)},getAttributeNS:function(p,o){return this.getAttribute(o,p)},getAttribute:Ext.isIE?function(o,q){var r=this.dom,p=typeof r[q+":"+o];if(["undefined","unknown"].indexOf(p)==-1){return r[q+":"+o]}return r[o]}:function(o,p){var q=this.dom;return q.getAttributeNS(p,o)||q.getAttribute(p+":"+o)||q.getAttribute(o)||q[o]},update:function(o){this.dom.innerHTML=o}};var n=g.prototype;g.addMethods=function(p){Ext.apply(n,p)};n.on=n.addListener;n.un=n.removeListener;n.autoBoxAdjust=true;var k=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;g.cache={};g.dataCache={};g.get=function(p){var o,s,r;if(!p){return null}if(typeof p=="string"){if(!(s=j.getElementById(p))){return null}if(o=g.cache[p]){o.dom=s}else{o=g.cache[p]=new g(s)}return o}else{if(p.tagName){if(!(r=p.id)){r=Ext.id(p)}if(o=g.cache[r]){o.dom=p}else{o=g.cache[r]=new g(p)}return o}else{if(p instanceof g){if(p!=c){p.dom=j.getElementById(p.id)||p.dom;g.cache[p.id]=p}return p}else{if(p.isComposite){return p}else{if(Ext.isArray(p)){return g.select(p)}else{if(p==j){if(!c){var q=function(){};q.prototype=g.prototype;c=new q();c.dom=j}return c}}}}}}return null};g.data=function(p,o,q){var r=g.dataCache[p.id];if(!r){r=g.dataCache[p.id]={}}if(arguments.length==2){return r[o]}else{r[o]=q}};function l(){if(!Ext.enableGarbageCollector){clearInterval(g.collectorThread)}else{var o,p,q;for(o in g.cache){p=g.cache[o];q=p.dom;if(!q||!q.parentNode||(!q.offsetParent&&!j.getElementById(o))){delete g.cache[o];if(q&&Ext.enableListenerCollection){Ext.EventManager.removeAll(q)}}}}}g.collectorThreadId=setInterval(l,30000);var b=function(){};b.prototype=g.prototype;g.Flyweight=function(o){this.dom=o};g.Flyweight.prototype=new b();g.Flyweight.prototype.isFlyweight=true;g._flyweights={};g.fly=function(q,o){var p=null;o=o||"_global";if(q=Ext.getDom(q)){(g._flyweights[o]=g._flyweights[o]||new g.Flyweight()).dom=q;p=g._flyweights[o]}return p};Ext.get=g.get;Ext.fly=g.fly;var h=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){h.button=1}Ext.EventManager.on(window,"unload",function(){delete g.cache;delete g.dataCache;delete g._flyweights})})();Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(n,m,h){var k=this.dom,g=document.body,l=0,j;if(Ext.isGecko&&Object.prototype.toString.call(k)=="[object XULElement]"){return null}m=m||50;if(isNaN(m)){j=Ext.getDom(m);m=10}while(k&&k.nodeType==1&&l<m&&k!=g&&k!=j){if(e.is(k,n)){return h?a(k):k}l++;k=k.parentNode}return null},findParentNode:function(k,j,g){var h=Ext.fly(this.dom.parentNode,"_internal");return h?h.findParent(k,j,g):null},up:function(h,g){return this.findParentNode(h,g,true)},select:function(g,h){return Ext.Element.select(g,h,this.dom)},query:function(g,h){return e.select(g,this.dom)},child:function(g,h){var j=e.selectNode(g,this.dom);return h?j:a(j)},down:function(g,h){var j=e.selectNode(" > "+g,this.dom);return h?j:a(j)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,l,g,j){var k=this.dom[l];while(k){if(k.nodeType==1&&(!g||e.is(k,g))){return !j?a(k):k}k=k[h]}return null}}}());Ext.Element.addMethods(function(){var d=Ext.getDom,a=Ext.get,c=Ext.DomHelper,b=function(e){return(e.nodeType||e.dom||typeof e=="string")};return{appendChild:function(e){return a(e).appendTo(this)},appendTo:function(e){d(e).appendChild(this.dom);return this},insertBefore:function(e){(e=d(e)).parentNode.insertBefore(this.dom,e);return this},insertAfter:function(e){(e=d(e)).parentNode.insertBefore(this.dom,e.nextSibling);return this},insertFirst:function(g,e){g=g||{};if(b(g)){g=d(g);this.dom.insertBefore(g,this.dom.firstChild);return !e?a(g):g}else{return this.createChild(g,this.dom.firstChild,e)}},replace:function(e){e=a(e);this.insertBefore(e);e.remove();return this},replaceWith:function(g){var h=this,e=Ext.Element;if(b(g)){g=d(g);h.dom.parentNode.insertBefore(g,h.dom)}else{g=c.insertBefore(h.dom,g)}delete e.cache[h.id];Ext.removeNode(h.dom);h.id=Ext.id(h.dom=g);return e.cache[h.id]=h},createChild:function(g,e,h){g=g||{tag:"div"};return e?c.insertBefore(e,g,h!==true):c[!this.dom.firstChild?"overwrite":"append"](this.dom,g,h!==true)},wrap:function(e,g){var h=c.insertBefore(this.dom,e||{tag:"div"},!g);h.dom?h.dom.appendChild(this.dom):h.appendChild(this.dom);return h},insertHtml:function(g,h,e){var j=c.insertHtml(g,this.dom,h);return e?Ext.get(j):j}}}());Ext.Element.addMethods(function(){var g={},u=/(-[a-z])/gi,b={},p=document.defaultView,r=Ext.isIE?"styleFloat":"cssFloat",x=/alpha\(opacity=(.*)\)/i,k=/^\s+|\s+$/g,w=Ext.Element,d="padding",c="margin",v="border",q="-left",o="-right",t="-top",l="-bottom",h="-width",j={l:v+q+h,r:v+o+h,t:v+t+h,b:v+l+h},e={l:d+q,r:d+o,t:d+t,b:d+l},a={l:c+q,r:c+o,t:c+t,b:c+l},y=Ext.Element.data;function n(z,A){return A.charAt(1).toUpperCase()}function m(A,z){var B=0;Ext.each(A.match(/\w/g),function(C){if(C=parseInt(this.getStyle(z[C]),10)){B+=Math.abs(C)}},this);return B}function s(z){return g[z]||(g[z]=z=="float"?r:z.replace(u,n))}return{adjustWidth:function(z){var A=this;if(typeof z=="number"&&A.autoBoxAdjust&&!A.isBorderBox()){z-=(A.getBorderWidth("lr")+A.getPadding("lr"));z=z<0?0:z}return z},adjustHeight:function(z){var A=this;if(typeof z=="number"&&A.autoBoxAdjust&&!A.isBorderBox()){z-=(A.getBorderWidth("tb")+A.getPadding("tb"));z=z<0?0:z}return z},addClass:function(z){var A=this;Ext.each(z,function(B){A.dom.className+=(!A.hasClass(B)&&B?" "+B:"")});return A},radioClass:function(z){Ext.each(this.dom.parentNode.childNodes,function(A){if(A.nodeType==1){Ext.fly(A).removeClass(z)}});return this.addClass(z)},removeClass:function(z){var A=this;if(A.dom.className){Ext.each(z,function(B){A.dom.className=A.dom.className.replace(b[B]=b[B]||new RegExp("(?:^|\\s+)"+B+"(?:\\s+|$)","g")," ")})}return A},toggleClass:function(z){return this.hasClass(z)?this.removeClass(z):this.addClass(z)},hasClass:function(z){return z&&(" "+this.dom.className+" ").indexOf(" "+z+" ")!=-1},replaceClass:function(A,z){return this.removeClass(A).addClass(z)},isStyle:function(z,A){return this.getStyle(z)==A},getStyle:function(){return p&&p.getComputedStyle?function(C){var B=this.dom,z,A;if(B==document){return null}C=s(C);return(z=B.style[C])?z:(A=p.getComputedStyle(B,""))?A[C]:null}:function(D){var B=this.dom,z,A;if(B==document){return null}if(D=="opacity"){if(B.style.filter.match){if(z=B.style.filter.match(x)){var C=parseFloat(z[1]);if(!isNaN(C)){return C?C/100:0}}}return 1}D=s(D);return B.style[D]||((A=B.currentStyle)?A[D]:null)}}(),getColor:function(z,A,E){var D,C=this.getStyle(z),B=E||"#";if(!C||C=="transparent"||C=="inherit"){return A}if(/^r/.test(C)){Ext.each(C.slice(4,C.length-1).split(","),function(F){D=(F*1).toString(16);B+=D<16?"0"+D:D})}else{B+=C.replace("#","").replace(/^(\w)(\w)(\w)$/,"$1$1$2$2$3$3")}return B.length>5?B.toLowerCase():A},setStyle:function(D,C){var A,B,z;if(!Ext.isObject(D)){A={};A[D]=C;D=A}for(B in D){C=D[B];B=="opacity"?this.setOpacity(C):this.dom.style[s(B)]=C}return this},setOpacity:function(A,z){var D=this,B=D.dom.style;if(!z||!D.anim){if(Ext.isIE){var C=A<1?"alpha(opacity="+A*100+")":"",E=B.filter.replace(x,"").replace(k,"");B.zoom=1;B.filter=E+(E.length>0?" ":"")+C}else{B.opacity=A}}else{D.anim({opacity:{to:A}},D.preanim(arguments,1),null,0.35,"easeIn")}return D},clearOpacity:function(){var z=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(z.filter)){z.filter=z.filter.replace(x,"").replace(k,"")}}else{z.opacity=z["-moz-opacity"]=z["-khtml-opacity"]=""}return this},getHeight:function(A){var z=this.dom.offsetHeight||0;z=!A?z:z-this.getBorderWidth("tb")-this.getPadding("tb");return z<0?0:z},getWidth:function(A){var z=this.dom.offsetWidth||0;z=!A?z:z-this.getBorderWidth("lr")-this.getPadding("lr");return z<0?0:z},setWidth:function(A,z){var B=this;A=B.adjustWidth(A);!z||!B.anim?B.dom.style.width=B.addUnits(A):B.anim({width:{to:A}},B.preanim(arguments,1));return B},setHeight:function(z,A){var B=this;z=B.adjustHeight(z);!A||!B.anim?B.dom.style.height=B.addUnits(z):B.anim({height:{to:z}},B.preanim(arguments,1));return B},getBorderWidth:function(z){return m.call(this,z,j)},getPadding:function(z){return m.call(this,z,e)},clip:function(){var z=this;dom=z.dom;if(!y(dom,"isClipped")){y(dom,"isClipped",true);y(dom,"originalClip,",{o:z.getStyle("overflow"),x:z.getStyle("overflow-x"),y:z.getStyle("overflow-y")});z.setStyle("overflow","hidden");z.setStyle("overflow-x","hidden");z.setStyle("overflow-y","hidden")}return z},unclip:function(){var z=this,B=z.dom;if(y(B,"isClipped")){y(B,"isClipped",false);var A=y(B,"originalClip");if(A.o){z.setStyle("overflow",A.o)}if(A.x){z.setStyle("overflow-x",A.x)}if(A.y){z.setStyle("overflow-y",A.y)}}return z},addStyles:m,margins:a}}());(function(){var a=Ext.lib.Dom,b="left",g="right",d="top",j="bottom",h="position",c="static",e="relative",k="auto",l="z-index";function m(o,n,p){return this.preanim&&!!n?this.preanim(o,p):false}Ext.Element.addMethods({getX:function(){return a.getX(this.dom)},getY:function(){return a.getY(this.dom)},getXY:function(){return a.getXY(this.dom)},getOffsetsTo:function(n){var q=this.getXY(),p=Ext.fly(n,"_internal").getXY();return[q[0]-p[0],q[1]-p[1]]},setX:function(n,o){return this.setXY([n,this.getY()],m.call(this,arguments,o,1))},setY:function(o,n){return this.setXY([this.getX(),o],m.call(this,arguments,n,1))},setLeft:function(n){this.setStyle(b,this.addUnits(n));return this},setTop:function(n){this.setStyle(d,this.addUnits(n));return this},setRight:function(n){this.setStyle(g,this.addUnits(n));return this},setBottom:function(n){this.setStyle(j,this.addUnits(n));return this},setXY:function(p,n){var o=this;if(!n||!o.anim){a.setXY(o.dom,p)}else{o.anim({points:{to:p}},o.preanim(arguments,1),"motion")}return o},setLocation:function(n,p,o){return this.setXY([n,p],m.call(this,arguments,o,2))},moveTo:function(n,p,o){return this.setXY([n,p],m.call(this,arguments,o,2))},getLeft:function(n){return !n?this.getX():parseInt(this.getStyle(b),10)||0},getRight:function(n){var o=this;return !n?o.getX()+o.getWidth():(o.getLeft(true)+o.getWidth())||0},getTop:function(n){return !n?this.getY():parseInt(this.getStyle(d),10)||0},getBottom:function(n){var o=this;return !n?o.getY()+o.getHeight():(o.getTop(true)+o.getHeight())||0},position:function(r,q,n,p){var o=this;if(!r&&o.isStyle(h,c)){o.setStyle(h,e)}else{if(r){o.setStyle(h,r)}}if(q){o.setStyle(l,q)}if(n||p){o.setXY([n||false,p||false])}},clearPositioning:function(n){n=n||"";this.setStyle({left:n,right:n,top:n,bottom:n,"z-index":"",position:c});return this},getPositioning:function(){var n=this.getStyle(b);var o=this.getStyle(d);return{position:this.getStyle(h),left:n,right:n?"":this.getStyle(g),top:o,bottom:o?"":this.getStyle(j),"z-index":this.getStyle(l)}},setPositioning:function(n){var p=this,o=p.dom.style;p.setStyle(n);if(n.right==k){o.right=""}if(n.bottom==k){o.bottom=""}return p},translatePoints:function(n,v){v=isNaN(n[1])?v:n[1];n=isNaN(n[0])?n:n[0];var r=this,s=r.isStyle(h,e),u=r.getXY(),p=parseInt(r.getStyle(b),10),q=parseInt(r.getStyle(d),10);p=!isNaN(p)?p:(s?0:r.dom.offsetLeft);q=!isNaN(q)?q:(s?0:r.dom.offsetTop);return{left:(n-u[0]+p),top:(v-u[1]+q)}},animTest:m})})();Ext.Element.addMethods({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var j=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(j==h||j==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:j.scrollLeft,top:j.scrollTop}}return e}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.addMethods(function(){var h="visibility",d="display",b="hidden",k="none",a="originalDisplay",c="visibilityMode",e=Ext.Element.DISPLAY,g=Ext.Element.data,j=function(n){var m=g(n,a);if(m===undefined){g(n,a,m="")}return m},l=function(o){var n=g(o,c);if(n===undefined){g(o,c,n=1)}return n};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(m){g(this.dom,c,m);return this},animate:function(n,p,o,q,m){this.anim(n,{duration:p,callback:o,easing:q},m);return this},anim:function(p,q,n,s,o,m){n=n||"run";q=q||{};var r=this,t=Ext.lib.Anim[n](r.dom,p,(q.duration||s)||0.35,(q.easing||o)||"easeOut",function(){if(m){m.call(r)}if(q.callback){q.callback.call(q.scope||r,r,q)}},r);q.anim=t;return t},preanim:function(m,n){return !m[n]?false:(Ext.isObject(m[n])?m[n]:{duration:m[n+1],callback:m[n+2],easing:m[n+3]})},isVisible:function(){return !this.isStyle(h,b)&&!this.isStyle(d,k)},setVisible:function(q,n){var o=this,p=o.dom,m=l(this.dom)==e;if(!n||!o.anim){if(m){o.setDisplayed(q)}else{o.fixDisplay();p.style.visibility=q?"visible":b}}else{if(q){o.setOpacity(0.01);o.setVisible(true)}o.anim({opacity:{to:(q?1:0)}},o.preanim(arguments,1),null,0.35,"easeIn",function(){if(!q){p.style[m?d:h]=(m)?k:b;Ext.fly(p).setOpacity(1)}})}return o},toggle:function(m){var n=this;n.setVisible(!n.isVisible(),n.preanim(arguments,0));return n},setDisplayed:function(m){if(typeof m=="boolean"){m=m?j(this.dom):k}this.setStyle(d,m);return this},fixDisplay:function(){var m=this;if(m.isStyle(d,k)){m.setStyle(h,b);m.setStyle(d,j(this.dom));if(m.isStyle(d,k)){m.setStyle(d,"block")}}},hide:function(m){this.setVisible(false,this.preanim(arguments,0));return this},show:function(m){this.setVisible(true,this.preanim(arguments,0));return this}}}());(function(){var z=null,B=undefined,l=true,u=false,k="setX",h="setY",a="setXY",o="left",m="bottom",t="top",n="right",r="height",g="width",j="points",x="hidden",A="absolute",v="visible",e="motion",p="position",s="easeOut",d=new Ext.Element.Flyweight(),w={},y=function(C){return C||{}},q=function(C){d.dom=C;d.id=Ext.id(C);return d},c=function(C){if(!w[C]){w[C]=[]}return w[C]},b=function(D,C){w[D]=C};Ext.enableFx=l;Ext.Fx={switchStatements:function(D,E,C){return E.apply(this,C[D])},slideIn:function(I,F){F=y(F);var K=this,H=K.dom,N=H.style,P,C,M,E,D,N,J,O,L,G;I=I||"t";K.queueFx(F,function(){P=q(H).getXY();q(H).fixDisplay();C=q(H).getFxRestore();M={x:P[0],y:P[1],0:P[0],1:P[1],width:H.offsetWidth,height:H.offsetHeight};M.right=M.x+M.width;M.bottom=M.y+M.height;q(H).setWidth(M.width).setHeight(M.height);E=q(H).fxWrap(C.pos,F,x);N.visibility=v;N.position=A;function Q(){q(H).fxUnwrap(E,C.pos,F);N.width=C.width;N.height=C.height;q(H).afterFx(F)}O={to:[M.x,M.y]};L={to:M.width};G={to:M.height};function R(V,S,W,T,Y,aa,ad,ac,ab,X,U){var Z={};q(V).setWidth(W).setHeight(T);if(q(V)[Y]){q(V)[Y](aa)}S[ad]=S[ac]="0";if(ab){Z.width=ab}if(X){Z.height=X}if(U){Z.points=U}return Z}J=q(H).switchStatements(I.toLowerCase(),R,{t:[E,N,M.width,0,z,z,o,m,z,G,z],l:[E,N,0,M.height,z,z,n,t,L,z,z],r:[E,N,M.width,M.height,k,M.right,o,t,z,z,O],b:[E,N,M.width,M.height,h,M.bottom,o,t,z,G,O],tl:[E,N,0,0,z,z,n,m,L,G,O],bl:[E,N,0,0,h,M.y+M.height,n,t,L,G,O],br:[E,N,0,0,a,[M.right,M.bottom],o,t,L,G,O],tr:[E,N,0,0,k,M.x+M.width,o,m,L,G,O]});N.visibility=v;q(E).show();arguments.callee.anim=q(E).fxanim(J,F,e,0.5,s,Q)});return K},slideOut:function(G,E){E=y(E);var I=this,F=I.dom,L=F.style,M=I.getXY(),D,C,J,K,H={to:0};G=G||"t";I.queueFx(E,function(){C=q(F).getFxRestore();J={x:M[0],y:M[1],0:M[0],1:M[1],width:F.offsetWidth,height:F.offsetHeight};J.right=J.x+J.width;J.bottom=J.y+J.height;q(F).setWidth(J.width).setHeight(J.height);D=q(F).fxWrap(C.pos,E,v);L.visibility=v;L.position=A;q(D).setWidth(J.width).setHeight(J.height);function N(){E.useDisplay?q(F).setDisplayed(u):q(F).hide();q(F).fxUnwrap(D,C.pos,E);L.width=C.width;L.height=C.height;q(F).afterFx(E)}function O(P,X,V,Y,T,W,S,U,R){var Q={};P[X]=P[V]="0";Q[Y]=T;if(W){Q[W]=S}if(U){Q[U]=R}return Q}K=q(F).switchStatements(G.toLowerCase(),O,{t:[L,o,m,r,H],l:[L,n,t,g,H],r:[L,o,t,g,H,j,{to:[J.right,J.y]}],b:[L,o,t,r,H,j,{to:[J.x,J.bottom]}],tl:[L,n,m,g,H,r,H],bl:[L,n,t,g,H,r,H,j,{to:[J.x,J.bottom]}],br:[L,o,t,g,H,r,H,j,{to:[J.x+J.width,J.bottom]}],tr:[L,o,m,g,H,r,H,j,{to:[J.right,J.y]}]});arguments.callee.anim=q(D).fxanim(K,E,e,0.5,s,N)});return I},puff:function(I){I=y(I);var G=this,H=G.dom,D=H.style,E,C,F;G.queueFx(I,function(){E=q(H).getWidth();C=q(H).getHeight();q(H).clearOpacity();q(H).show();F=q(H).getFxRestore();function J(){I.useDisplay?q(H).setDisplayed(u):q(H).hide();q(H).clearOpacity();q(H).setPositioning(F.pos);D.width=F.width;D.height=F.height;D.fontSize="";q(H).afterFx(I)}arguments.callee.anim=q(H).fxanim({width:{to:q(H).adjustWidth(E*2)},height:{to:q(H).adjustHeight(C*2)},points:{by:[-E*0.5,-C*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},I,e,0.5,s,J)});return G},switchOff:function(G){G=y(G);var E=this,F=E.dom,C=F.style,D;E.queueFx(G,function(){q(F).clearOpacity();q(F).clip();D=q(F).getFxRestore();function H(){G.useDisplay?q(F).setDisplayed(u):q(F).hide();q(F).clearOpacity();q(F).setPositioning(D.pos);C.width=D.width;C.height=D.height;q(F).afterFx(G)}q(F).fxanim({opacity:{to:0.3}},z,z,0.1,z,function(){q(F).clearOpacity();(function(){q(F).fxanim({height:{to:1},points:{by:[0,q(F).getHeight()*0.5]}},G,e,0.3,"easeIn",H)}).defer(100)})});return E},highlight:function(E,I){I=y(I);var G=this,H=G.dom,C=I.attr||"backgroundColor",D={},F;G.queueFx(I,function(){q(H).clearOpacity();q(H).show();function J(){H.style[C]=F;q(H).afterFx(I)}F=H.style[C];D[C]={from:E||"ffff9c",to:I.endColor||q(H).getColor(C)||"ffffff"};arguments.callee.anim=q(H).fxanim(D,I,"color",1,"easeIn",J)});return G},frame:function(C,F,I){I=y(I);var E=this,H=E.dom,D,G;E.queueFx(I,function(){C=C||"#C3DAF9";if(C.length==6){C="#"+C}F=F||1;q(H).show();var M=q(H).getXY(),K={x:M[0],y:M[1],0:M[0],1:M[1],width:H.offsetWidth,height:H.offsetHeight},J=function(){D=q(document.body||document.documentElement).createChild({style:{visbility:x,position:A,"z-index":35000,border:"0px solid "+C}});return D.queueFx({},L)};arguments.callee.anim={isAnimated:true,stop:function(){F=0;D.stopFx()}};function L(){var N=Ext.isBorderBox?2:1;G=D.anim({top:{from:K.y,to:K.y-20},left:{from:K.x,to:K.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:K.height,to:K.height+20*N},width:{from:K.width,to:K.width+20*N}},{duration:I.duration||1,callback:function(){D.remove();--F>0?J():q(H).afterFx(I)}});arguments.callee.anim={isAnimated:true,stop:function(){G.stop()}}}J()});return E},pause:function(E){var D=this.dom,C;this.queueFx({},function(){C=setTimeout(function(){q(D).afterFx({})},E*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(C);q(D).afterFx({})}}});return this},fadeIn:function(E){E=y(E);var C=this,D=C.dom,F=E.endOpacity||1;C.queueFx(E,function(){q(D).setOpacity(0);q(D).fixDisplay();D.style.visibility=v;arguments.callee.anim=q(D).fxanim({opacity:{to:F}},E,z,0.5,s,function(){if(F==1){q(D).clearOpacity()}q(D).afterFx(E)})});return C},fadeOut:function(F){F=y(F);var D=this,E=D.dom,C=E.style,G=F.endOpacity||0;D.queueFx(F,function(){arguments.callee.anim=q(E).fxanim({opacity:{to:G}},F,z,0.5,s,function(){if(G==0){Ext.Element.data(E,"visibilityMode")==Ext.Element.DISPLAY||F.useDisplay?C.display="none":C.visibility=x;q(E).clearOpacity()}q(E).afterFx(F)})});return D},scale:function(C,D,E){this.shift(Ext.apply({},E,{width:C,height:D}));return this},shift:function(E){E=y(E);var D=this.dom,C={};this.queueFx(E,function(){for(var F in E){if(E[F]!=B){C[F]={to:E[F]}}}C.width?C.width.to=q(D).adjustWidth(E.width):C;C.height?C.height.to=q(D).adjustWidth(E.height):C;if(C.x||C.y||C.xy){C.points=C.xy||{to:[C.x?C.x.to:q(D).getX(),C.y?C.y.to:q(D).getY()]}}arguments.callee.anim=q(D).fxanim(C,E,e,0.35,s,function(){q(D).afterFx(E)})});return this},ghost:function(F,D){D=y(D);var H=this,E=H.dom,K=E.style,I={opacity:{to:0},points:{}},L=I.points,C,J,G;F=F||"b";H.queueFx(D,function(){C=q(E).getFxRestore();J=q(E).getWidth();G=q(E).getHeight();function M(){D.useDisplay?q(E).setDisplayed(u):q(E).hide();q(E).clearOpacity();q(E).setPositioning(C.pos);K.width=C.width;K.height=C.height;q(E).afterFx(D)}L.by=q(E).switchStatements(F.toLowerCase(),function(O,N){return[O,N]},{t:[0,-G],l:[-J,0],r:[J,0],b:[0,G],tl:[-J,-G],bl:[-J,G],br:[J,G],tr:[J,-G]});arguments.callee.anim=q(E).fxanim(I,D,e,0.5,s,M)});return H},syncFx:function(){var C=this;C.fxDefaults=Ext.apply(C.fxDefaults||{},{block:u,concurrent:l,stopFx:u});return C},sequenceFx:function(){var C=this;C.fxDefaults=Ext.apply(C.fxDefaults||{},{block:u,concurrent:u,stopFx:u});return C},nextFx:function(){var C=c(this.dom.id)[0];if(C){C.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(C){var D=this,F=D.dom.id;if(D.hasActiveFx()){var E=c(F)[0];if(E&&E.anim){if(E.anim.isAnimated){b(F,[E]);E.anim.stop(C!==undefined?C:l)}else{b(F,[])}}}return D},beforeFx:function(C){if(this.hasActiveFx()&&!C.concurrent){if(C.stopFx){this.stopFx();return l}return u}return l},hasFxBlock:function(){var C=c(this.dom.id);return C&&C[0]&&C[0].block},queueFx:function(F,C){var D=this;if(!D.hasFxBlock()){Ext.applyIf(F,D.fxDefaults);if(!F.concurrent){var E=D.beforeFx(F);C.block=F.block;c(D.dom.id).push(C);if(E){D.nextFx()}}else{C.call(D)}}return D},fxWrap:function(I,G,E){var F=this.dom,D,C;if(!G.wrap||!(D=Ext.getDom(G.wrap))){if(G.fixPosition){C=q(F).getXY()}var H=document.createElement("div");H.style.visibility=E;D=F.parentNode.insertBefore(H,F);q(D).setPositioning(I);if(q(D).isStyle(p,"static")){q(D).position("relative")}q(F).clearPositioning("auto");q(D).clip();D.appendChild(F);if(C){q(D).setXY(C)}}return D},fxUnwrap:function(C,F,E){var D=this.dom;q(D).clearPositioning();q(D).setPositioning(F);if(!E.wrap){C.parentNode.insertBefore(D,C);q(C).remove()}},getFxRestore:function(){var C=this.dom.style;return{pos:this.getPositioning(),width:C.width,height:C.height}},afterFx:function(D){var C=this.dom,E=C.id;if(D.afterStyle){q(C).setStyle(D.afterStyle)}if(D.afterCls){q(C).addClass(D.afterCls)}if(D.remove==l){q(C).remove()}if(D.callback){D.callback.call(D.scope,q(C))}if(!D.concurrent){c(E).shift();q(C).nextFx()}},fxanim:function(F,G,D,H,E,C){D=D||"run";G=G||{};var I=Ext.lib.Anim[D](this.dom,F,(G.duration||H)||0.35,(G.easing||E)||s,C,this);G.anim=I;return I}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getCount:function(){return this.elements.length},add:function(b){if(b){if(Ext.isArray(b)){this.elements=this.elements.concat(b)}else{var a=this.elements;Ext.each(b,function(c){a.push(c)})}}return this},invoke:function(d,a){var b=this.elements,c=this.el;Ext.each(b,function(g){c.dom=g;Ext.Element.prototype[d].apply(c,a)});return this},item:function(a){var b=this;if(!b.elements[a]){return null}b.el.dom=b.elements[a];return b.el},addListener:function(a,d,c,b){Ext.each(this.elements,function(g){Ext.EventManager.on(g,a,d,c||g,b)});return this},each:function(c,b){var d=this,a=d.el;Ext.each(d.elements,function(h,g){a.dom=h;return c.call(b||a,a,d,g)});return d},indexOf:function(a){return this.elements.indexOf(Ext.getDom(a))},replaceElement:function(e,c,a){var b=!isNaN(e)?e:this.indexOf(e),g;if(b>-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;(function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(var c in b){if(Ext.isFunction(b[c])){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}})();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var c="beforerequest",m="requestcomplete",l="requestexception",e=undefined,j="load",h="POST",k="GET",g=window;Ext.data.Connection=function(n){Ext.apply(this,n);this.addEvents(c,m,l);Ext.data.Connection.superclass.constructor.call(this)};function b(n){this.transId=false;var o=n.argument.options;n.argument=o?o.argument:null;this.fireEvent(m,this,n,o);if(o.success){o.success.call(o.scope,n,o)}if(o.callback){o.callback.call(o.scope,o,true,n)}}function d(n,p){this.transId=false;var o=n.argument.options;n.argument=o?o.argument:null;this.fireEvent(l,this,n,o,p);if(o.failure){o.failure.call(o.scope,n,o)}if(o.callback){o.callback.call(o.scope,o,false,n)}}function a(s,n,p){var q=Ext.id(),y=document,t=y.createElement("iframe"),r=Ext.getDom(s.form),x=[],w;t.id=t.name=q;t.className="x-hidden";t.src=Ext.SSL_SECURE_URL;y.body.appendChild(t);if(Ext.isIE){y.frames[q].name=q}r.target=q;r.method=h;r.enctype=r.encoding="multipart/form-data";r.action=p||"";n=Ext.urlDecode(n,false);for(var v in n){if(n.hasOwnProperty(v)){w=y.createElement("input");w.type="hidden";w.value=n[w.name=v];r.appendChild(w);x.push(w)}}function u(){var z=this,o={responseText:"",responseXML:null,argument:s.argument},C,B;try{C=t.contentWindow.document||t.contentDocument||g.frames[q].document;if(C){if(C.body){if(/textarea/i.test((B=C.body.firstChild||{}).tagName)){o.responseText=B.value}else{o.responseText=C.body.innerHTML}}else{o.responseXML=C.XMLDocument||C}}}catch(A){}Ext.EventManager.removeListener(t,j,u,z);z.fireEvent(m,z,o,s);Ext.callback(s.success,s.scope,[o,s]);Ext.callback(s.callback,s.scope,[s,true,o]);if(!z.debugUploads){setTimeout(function(){Ext.removeNode(t)},100)}}Ext.EventManager.on(t,j,u,this);r.submit();Ext.each(x,function(o){Ext.removeNode(o)})}Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(t){var w=this;if(w.fireEvent(c,w,t)){if(t.el){if(!Ext.isEmpty(t.indicatorText)){w.indicatorText='<div class="loading-indicator">'+t.indicatorText+"</div>"}if(w.indicatorText){Ext.getDom(t.el).innerHTML=w.indicatorText}t.success=(Ext.isFunction(t.success)?t.success:function(){}).createInterceptor(function(o){Ext.getDom(t.el).innerHTML=o.responseText})}var r=t.params,q=t.url||w.url,n,u={success:b,failure:d,scope:w,argument:{options:t},timeout:t.timeout||w.timeout},s,x;if(Ext.isFunction(r)){r=r.call(t.scope||g,t)}r=Ext.urlEncode(w.extraParams,typeof r=="object"?Ext.urlEncode(r):r);if(Ext.isFunction(q)){q=q.call(t.scope||g,t)}if(s=Ext.getDom(t.form)){q=q||s.action;if(t.isUpload||/multipart\/form-data/i.test(s.getAttribute("enctype"))){return a.call(w,t,r,q)}x=Ext.lib.Ajax.serializeForm(s);r=r?(r+"&"+x):x}n=t.method||w.method||((r||t.xmlData||t.jsonData)?h:k);if(n===k&&(w.disableCaching&&t.disableCaching!==false)||t.disableCaching===true){var v=t.disableCachingParam||w.disableCachingParam;q+=(q.indexOf("?")!=-1?"&":"?")+v+"="+(new Date().getTime())}t.headers=Ext.apply(t.headers||{},w.defaultHeaders||{});if(t.autoAbort===true||w.autoAbort){w.abort()}if((n==k||t.xmlData||t.jsonData)&&r){q+=(/\?/.test(q)?"&":"?")+r;r=""}return w.transId=Ext.lib.Ajax.request(n,q,u,r,t)}else{return t.callback?t.callback.apply(t.scope,[t,e,e]):null}},isLoading:function(n){return n?Ext.lib.Ajax.isCallInProgress(n):!!this.transId},abort:function(n){if(n||this.isLoading()){Ext.lib.Ajax.abort(n||this.transId)}}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(j,l,k,h){e.cancel();d=l||d;c=k||c;a=h||a;g=setInterval(b,j)};e.cancel=function(){if(g){clearInterval(g);g=null}}};Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=Ext.USE_NATIVE_JSON&&JSON&&JSON.toString()=="[object JSON]";var pad=function(n){return n<10?"0"+n:n};var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'};var encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i<l;i+=1){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(v===null?"null":Ext.util.JSON.encode(v));b=true}}a.push("]");return a.join("")};this.encodeDate=function(o){return'"'+o.getFullYear()+"-"+pad(o.getMonth()+1)+"-"+pad(o.getDate())+"T"+pad(o.getHours())+":"+pad(o.getMinutes())+":"+pad(o.getSeconds())+'"'};this.encode=isNative?JSON.stringify:function(o){if(typeof o=="undefined"||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Object.prototype.toString.apply(o)==="[object Date]"){return Ext.util.JSON.encodeDate(o)}else{if(typeof o=="string"){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(typeof o=="boolean"){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(this.encode(i),":",v===null?"null":this.encode(v));b=true}}}a.push("}");return a.join("")}}}}}}};this.decode=isNative?JSON.parse:function(json){return eval("("+json+")")}})();Ext.encode=Ext.util.JSON.encode;Ext.decode=Ext.util.JSON.decode;
\ No newline at end of file
diff --git a/ricoClient/js/baselibs/glow.core-1.7.js b/ricoClient/js/baselibs/glow.core-1.7.js
new file mode 100644 (file)
index 0000000..e6d6e0e
--- /dev/null
@@ -0,0 +1,20 @@
+/*     
+       Copyright 2009 British Broadcasting Corporation
+
+       Licensed under the Apache License, Version 2.0 (the "License");
+       you may not use this file except in compliance with the License.
+       You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing, software
+       distributed under the License is distributed on an "AS IS" BASIS,
+       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+       See the License for the specific language governing permissions and
+       limitations under the License.
+*/
+(function(){var f={glow:true},b=/([$^\\\/()|?+*\[\]{}.-])/g,a=navigator.userAgent.toLowerCase(),k="1.7.3",r=0,g=[],m=0,q=[],o=0,s=false,n={VERSION:k,UID:"glow"+Math.floor(Math.random()*(1<<30)),isDomReady:window.gloader&&gloader.isReady,isReady:window.gloader&&gloader.isReady,env:function(){var u=[0,NaN],d=(/opera[\s\/]([\w\.]+)/.exec(a)||u)[1],v=d?NaN:(/msie ([\w\.]+)/.exec(a)||u)[1],x=(/rv:([\w\.]+).*gecko\//.exec(a)||u)[1],e=(/applewebkit\/([\w\.]+)/.exec(a)||u)[1],t=(/khtml\/([\w\.]+)/.exec(a)||u)[1],w=parseFloat;return{gecko:w(x),ie:w(v),opera:w(d),webkit:w(e),khtml:w(t),version:v||x||e||d||t,standardsMode:document.compatMode!="BackCompat"&&(!v||v>=6)};}(),module:function(u){var t=2,w=u.depends[0]||[],d=w.length,e=u.name,v=window.glow;if(u.library[1]!=n.VERSION){throw new Error("Cannot register "+e+": Version mismatch");}if(w[2]){for(;t<d;t++){if(!f[w[t]]){throw new Error("Module "+w[t]+" required before "+e);}}}u.builder(n);f[e]=true;return n;},ready:function(d){if(this.isReady){d();}else{q[o++]=d;}return this;},_readyBlockers:{},_addReadyBlock:function(d){if(!n._readyBlockers[d]){n._readyBlockers[d]=true;n.isReady=false;r++;}return n;},_removeReadyBlock:function(d){if(n._readyBlockers[d]){n._readyBlockers[d]=false;r--;if(!r){n.isReady=true;p();}}return n;},onDomReady:function(d){if(this.isDomReady){d();}else{g[m++]=d;}},lang:{trim:function(d){return d.replace(/^\s*((?:[\S\s]*\S)?)\s*$/,"$1");},toArray:function(e){if(e.constructor==Array){return e;}var u=[],t=0,d=e.length;for(;t<d;t++){u[t]=e[t];}return u;},apply:function(d,t){for(var e in t){d[e]=t[e];}return d;},map:function(e,x,w){if(Array.prototype.map){return Array.prototype.map.call(e,x,w||e);}if(!x.call){throw new TypeError();}var d=e.length,v=[],u=w||e,t=0;for(;t<d;t++){if(t in e){v[t]=x.call(u,e[t],t,e);}}return v;},replace:(function(){var d="g".replace(/g/,function(){return"l";})!="l",e=String.prototype.replace;return function(y,w,t){var z,v,x,u;if(!d||typeof(t)!="function"){return e.call(y,w,t);}if(!(w instanceof RegExp)){z=y.indexOf(w);return z==-1?y:e.call(y,w,t.call(null,w,z,y));}u=[];x=w.lastIndex=0;while((v=w.exec(y))!=null){z=v.index;u[u.length]=y.slice(x,z);u[u.length]=t.apply(null,v);if(w.global){x=w.lastIndex;}else{x=z+v[0].length;break;}}u[u.length]=y.slice(x);return u.join("");};})(),interpolate:function(t,w,u){var d,v,e,x;u=u||{};if(u.escapeHtml){if(!n.dom){throw new Error("glow.lang.interpolate - glow.dom is needed for escapeHtml");}x=n.dom.create("<div></div>");}if(u.delimiter==undefined){d=/\{[^{}]+\}/g;}else{v=u.delimiter.substr(0,1).replace(b,"\\$1");e=u.delimiter.substr(1,1).replace(b,"\\$1")||v;d=new RegExp(v+"[^"+v+e+"]+"+e,"g");}return t.replace(d,function(D){var A=D.slice(1,-1),C=A.split("."),B,z=0,y=C.length;if(A in w){B=w[A];}else{B=w;for(;z<y;z++){if(C[z] in B){B=B[C[z]];}else{return D;}}}if(u.escapeHtml){B=x.text(B).html();}return B;});},hasOwnProperty:{}.hasOwnProperty?function(d,e){return d.hasOwnProperty(e);}:function(x,y){var u=x[y],w=x.__proto__,t=w?w[y]:{};if(u!==t){return true;}var e=n.lang.hasOwnProperty(w,y),d=w[y]={},v=(x[y]!==d);delete w[y];if(e){w[name]=d;}return v;},extend:function(e,u,d){var t=function(){},v;t.prototype=u.prototype;v=new t();e.prototype=v;v.constructor=e;e.base=u;if(d){n.lang.apply(e.prototype,d);}},clone:function(t){var d,u,e;t=t.valueOf();if(typeof t!=="object"){return t;}else{if(t[0]||t.concat){e=[];d=t.length;while(d--){e[d]=arguments.callee(t[d]);}}else{e={};for(d in t){e[d]=arguments.callee(t[d]);}}return e;}}}},h=n.env,l=document;function c(){n.isDomReady=true;for(var d=0;d<m;d++){g[d]();}}function p(){if(s){return;}s=true;for(var d=0;d<o;){q[d]();d++;if(r){break;}}q=q.slice(d);o=o-d;s=false;}(function(){if(n.isDomReady){return;}n._addReadyBlock("glow_domReady");if(h.ie){if(typeof window.frameElement!="undefined"){l.attachEvent("onreadystatechange",function(){if(l.readyState=="complete"){l.detachEvent("onreadystatechange",arguments.callee);c();n._removeReadyBlock("glow_domReady");}});}else{(function(){try{l.documentElement.doScroll("left");}catch(u){setTimeout(arguments.callee,0);return;}c();n._removeReadyBlock("glow_domReady");})();}}else{if(n.env.webkit<525.13&&typeof l.readyState!="undefined"){var e=function(){if(/loaded|complete/.test(l.readyState)){c();n._removeReadyBlock("glow_domReady");}else{setTimeout(e,0);}};e();}else{var t=function(){if(t.fired){return;}t.fired=true;c();n._removeReadyBlock("glow_domReady");};if(l.addEventListener){l.addEventListener("DOMContentLoaded",t,false);}var d=window.onload;window.onload=function(){if(d){d();}t();};}}})();n.isSupported=!(h.ie<6||(h.gecko<1.9&&!/^1\.8\.1/.test(h.version))||h.opera<9||h.webkit<412);if(!n.isSupported){n._addReadyBlock("glow_browserSupport");}if(window.gloader){gloader.library({name:"glow",version:"1.7.3",builder:function(){return n;}});}else{if(window.glow){throw new Error("Glow global object already exists");}else{window.glow=n;}}if(n.ie){try{document.execCommand("BackgroundImageCache",false,true);}catch(j){}}})();
+/*@cc_on @*/
+/*@if (@_jscript_version > 5.5)@*/
+(window.gloader||glow).module({name:"glow.i18n",library:["glow","1.7.3"],depends:[["glow","1.7.3"]],builder:function(r){var A;var t={l:/^[a-z]$/,lv:/^[a-z]{2,3}$/,s:/^[A-Z][a-z]{3}$/,r:/^[A-Z]{2}|[0-9]{3}$/,v:/^[a-z0-9]{4,}$/};var s=1,k=2,l=4,j=8,p=s+k+l+j,f=s+l+j,x=s+k+j,c=s+j,y=s+k+l,e=s+l,d=s+k;var m={l:s,s:k,r:l,v:j},I=["l","s","r","v"],F={l:0,s:1,r:2,v:3};var C={};var b={};var o=w(document.documentElement.lang||"en")||w("en");function D(K){for(var J in t){if(t[J].test(K)){return J;}}return"";}function w(V){if(!V.split){V="";}var N=V.split("-"),Q=N.length,R=[],K={l:"",s:"",r:"",v:""},J=0,O=J,U=0,P,S;for(var M=0,T=I.length;M<T;M++){O=J;P=I[M];S=F[P];while((D(N[O]).indexOf(P)==-1)&&(O<Q)){O++;}if(O<Q){R[S]=N[O];U+=m[P];K[P]=N[O];N[O]="*";J=O;}}var L=R.join("-").replace(/-+/g,"-");if((L=="")||(L.substring(0,1)=="-")){return false;}else{return{canonical:L,mask:U,subtags:K};}}function g(K,M,J){var L;if((J&~K.mask)==0){L=K.subtags.l;if(k&J){L=L+"-"+K.subtags.s;}if(l&J){L=L+"-"+K.subtags.r;}if(j&J){L=L+"-"+K.subtags.v;}if(M(L)){return L;}}return false;}function a(K,N,J,L){var M;switch(K.mask){case f:if((M=g(K,N,f))){break;}case e:if((M=g(K,N,e))){break;}case p:if((M=g(K,N,p))){break;}case y:if((M=g(K,N,y))){break;}case x:if((M=g(K,N,x))){break;}case d:if((M=g(K,N,d))){break;}case c:if((M=g(K,N,c))){break;}case s:if((M=g(K,N,s))){break;}default:if(N("en")){M="en";}else{M=null;}}if(M==null){L();}else{J(M);}}function v(L){var J=o,K=w(L);if(K){o=K;o.next=J;}return A;}function H(){o=o.next||o;return A;}function B(){return o.canonical;}function h(M,L,Q){var J=w(L),P,O,K;if(J){P=C[J.canonical]=C[J.canonical]||{};O=P[M]=P[M]||{};K=b[M]=b[M]||{};for(var N in Q){O[N]=Q[N];K[N]=1;}}return A;}function E(K,J){var L={},S=J||{},N=b[K]||{},O=o,T,Q;function P(U){if(C[U]&&C[U][K]&&C[U][K][Q]){return true;}else{return false;}}function R(U){L[Q]=C[U][K][Q];}function M(){L[Q]="[Error! No "+K+"."+Q+" on "+O.canonical+"]";}if(S.locale!=undefined){T=w(S.locale);if(T){O=T;}}for(Q in N){a(O,P,R,M);}return L;}function G(K,L){for(var J in L){h(J,K,L[J]);}return A;}function u(L,M){var K=M||{},J=w(L);if(K.module){if(K.label){return q(J,K.module,K.label);}else{return n(J,K.module);}}else{return z(J);}return null;}function q(L,N,M){var J;function P(Q){if(C[Q]&&C[Q][N]&&C[Q][N][M]){return true;}else{return false;}}function O(Q){J=Q;}function K(){J="**error** - no negotiated value exists";}a(L,P,O,K);return J;}function n(L,O){var K=b[O]||{},N={},M;function Q(R){if(C[R]&&C[R][O]&&C[R][O][M]){return true;}else{return false;}}function P(R){N[M]=R;}function J(){N[M]="**error** - no negotiated value exists";}for(M in K){a(L,Q,P,J);}return N;}function z(K){var N={},M,L;function P(Q){if(C[Q]&&C[Q][M]&&C[Q][M][L]){return true;}else{return false;}}function O(Q){N[M][L]=Q;}function J(){N[M][L]="**error** - no negotiated value exists";}for(M in b){N[M]={};for(L in b[M]){a(K,P,O,J);}}return N;}r.i18n=A={setLocale:v,revertLocale:H,getLocale:B,addLocaleModule:h,getLocaleModule:E,addLocalePack:G,checkLocale:u};G("en",{PROPERTIES:{LANGUAGE:"English",DIR:"ltr"}});}});(window.gloader||glow).module({name:"glow.dom",library:["glow","1.7.3"],depends:[],builder:function(u){var n=u.env,k=u.lang,s={tagName:/^(\w+|\*)/,combinator:/^\s*([>]?)\s*/,classNameOrId:(n.webkit<417)?new RegExp("^([\\.#])((?:(?![\\.#\\[:\\s\\\\]).|\\\\.)+)"):/^([\.#])((?:[^\.#\[:\\\s]+|\\.)+)/},X=/([$^\\\/()|?+*\[\]{}.-])/g,B={},R={checked:"checked","class":"className",disabled:"disabled","for":"htmlFor",maxlength:"maxLength"},c={checked:true,disabled:true},ah={maxlength:function(r){return r.toString()=="2147483647"?undefined:r;}},ad=1,x="_unique"+u.UID,ai="_uniqueData"+u.UID,ag=1,L=[],I={black:0,silver:12632256,gray:8421504,white:16777215,maroon:8388608,red:16711680,purple:8388736,fuchsia:16711935,green:32768,lime:65280,olive:8421376,yellow:16776960,navy:128,blue:255,teal:32896,aqua:65535,orange:16753920},D=/height|top/,t=/^rgb\(([\d\.]+)(%?),\s*([\d\.]+)(%?),\s*([\d\.]+)(%?)/i,A=/^(?:(width|height)|(border-(top|bottom|left|right)-width))$/,C=/width|height|top$|bottom$|left$|right$|spacing$|indent$|font-size/,T,d,K,H,aa=window,l=document,V,G,w,P=l.createElement("div"),y=[1,"<table>","</table>"],ab=[0,"",""],O=n.webkit<526?[0,"","</div>",true]:[1,"b<div>","</div>"],a=[3,"<table><tbody><tr>","</tr></tbody></table>"],E={caption:y,thead:y,th:a,colgroup:y,tbody:y,tr:[2,"<table><tbody>","</tbody></table>"],td:a,tfoot:y,option:[1,"<select>","</select>"],legend:[1,"<fieldset>","</fieldset>"],link:O,script:O,style:O};if(n.ie){window.attachEvent("onunload",function(){P=null;});}u.ready(function(){V=l.body;G=l.documentElement;});(function(){var r=l.createElement("div");r.a=1;w=!!r.cloneNode(true).a;})();function af(r){for(var aj=r.firstChild;aj;aj=aj.nextSibling){if(aj.nodeType==1){return aj;}}return null;}function v(r){return new RegExp(["(^|\\s)",r.replace(X,"\\$1"),"($|\\s)"].join(""),"g");}function N(ap){var ao=[],al=(/^\s*<([^\s>]+)/.exec(ap)||[,"div"])[1],aj=E[al]||ab,am,ak,an=0;P.innerHTML=(aj[1]+ap+aj[2]);ak=P;am=aj[0];while(am--){ak=ak.lastChild;}while(ak.firstChild){ao[an++]=ak.removeChild(ak.firstChild);}ak=null;return ao;}function p(al){var ak=[],aj=0;for(;al[aj];aj++){ak[aj]=al[aj];}return ak;}function e(am,aj){for(var al=this,r=0,ak=al.length;r<ak;r++){aj.call(al[r],am.call?am.call(al[r],r):am);}return al;}if(document.all){T=function(ak,aj){var al=0,r=ak.length,am=aj.length;if(typeof aj.length=="number"){for(;al<am;al++){ak[r++]=aj[al];}}else{for(;aj[al];al++){ak[r++]=aj[al];}}};}else{T=function(ak,aj){var al=0,r=ak.length;for(;aj[al];al++){ak[r++]=aj[al];}};}function M(r){return(r.ownerDocument&&!r.ownerDocument.body)||(r.documentElement&&!r.documentElement.body);}if(n.ie){d=function(ak){if(ak.length==1){return ak;}var am=[],aj=0,al=0;for(;ak[al];al++){if(ak[al].getAttribute(x)!=ad&&ak[al].nodeType==1){am[aj++]=ak[al];}ak[al].setAttribute(x,ad);}for(al=0;ak[al];al++){ak[al].removeAttribute(x);}ad++;return am;};}else{d=function(ak){if(ak.length==1){return ak;}var am=[],aj=0,al=0;for(;ak[al];al++){if(ak[al][x]!=ad&&ak[al].nodeType==1){am[aj++]=ak[al];}ak[al][x]=ad;}ad++;return am;};}if(document.all){H=function(aj,al){var am=[],ak=0;for(;al[ak];ak++){if(aj=="*"&&al[ak].all&&!M(al[ak])){T(am,al[ak].all);}else{T(am,al[ak].getElementsByTagName(aj));}}return am;};}else{H=function(ak,am){var an=[],al=0,aj=am.length;for(;al<aj;al++){T(an,am[al].getElementsByTagName(ak));}return an;};}function b(am){var al=[],an=am.childNodes,ak=0,aj=0;for(;an[ak];ak++){if(an[ak].nodeType==1&&an[ak].nodeName!="!"){al[aj++]=an[ak];}}return al;}var U=["border-left-width","border-right-width","padding-left","padding-right"],Q=["border-top-width","border-bottom-width","padding-top","padding-bottom"];function f(ap,an){var am,aj=n.standardsMode?G:V,ao=(an=="width"),ak=ao?"Width":"Height",al;if(ap.window){am=n.webkit<522.11?(ao?ap.innerWidth:ap.innerHeight):n.webkit?(ao?V.clientWidth:ap.innerHeight):n.opera<9.5?(ao?V.clientWidth:V.clientHeight):(ao?aj.clientWidth:aj.clientHeight);}else{if(ap.getElementById){am=Math.max(V["scroll"+ak],G["scroll"+ak]);}else{al=ao?U:Q;am=ap["offset"+ak]-parseInt(Z(ap,al));}}return am;}function ae(r){if(n.ie<6){return r.document.body;}else{return r.ownerDocument.body;}}function j(al,am,ak){if(typeof am=="number"||/\d$/.test(am)){am+="px";}for(var aj=0,r=al.length;aj<r;aj++){al[aj].style[ak]=am;}}function W(r){if(r=="float"){return n.ie?"styleFloat":"cssFloat";}return k.replace(r,/-(\w)/g,function(aj,ak){return ak.toUpperCase();});}function z(ap,an){var am,ao=ap.style,al=ao.display,aj=ao.visibility,ak=ao.position;ao.visibility="hidden";ao.position="absolute";ao.display="block";if(!h(ap)){ao.position=ak;am=z(ap.parentNode,an);ao.display=al;ao.visibility=aj;}else{am=an();ao.display=al;ao.position=ak;ao.visibility=aj;}return am;}function h(r){return r.offsetWidth||r.offsetHeight;}function Z(ar,al){var ak,au=0,ap=0,ao=al.length,an=l.defaultView&&(l.defaultView.getComputedStyle(ar,null)||l.defaultView.getComputedStyle),am=ar.currentStyle,at,aq,aj=al.push||A.exec(al)||[];if(al.push){for(;ap<ao;ap++){au+=parseInt(Z(ar,al[ap]),10)||0;}return au+"px";}if(aj[1]){if(!h(ar)){return z(ar,function(){return f(ar,aj[1])+"px";});}return f(ar,aj[1])+"px";}else{if(aj[2]&&u.env.ie&&Z(ar,"border-"+aj[3]+"-style")=="none"){return"0";}else{if(an){if(typeof an=="function"){at=ar.style.display;ak=z(ar,function(){if(al=="display"){ar.style.display=at;if(!l.defaultView.getComputedStyle(ar,null)){return"none";}ar.style.display="block";}return Z(ar,al);});}else{if(n.webkit>500&&n.webkit<526&&al=="margin-right"&&an.getPropertyValue("position")!="absolute"){al="margin-left";}ak=an.getPropertyValue(al);}}else{if(am){if(al=="opacity"){aq=/alpha\(opacity=([^\)]+)\)/.exec(am.filter);return aq?String(parseInt(aq[1],10)/100):"1";}ak=String(am[W(al)]);if(/^-?[\d\.]+(?!px)[%a-z]+$/i.test(ak)&&al!="font-size"){ak=J(ar,ak,D.test(al))+"px";}}}}}if(al.indexOf("color")!=-1){ak=S(ak).toString();}else{if(ak.indexOf("url")==0){ak=ak.replace(/\"/g,"");}}return ak;}function J(ao,aq,am){var ak=am?"top":"left",an=am?"Top":"Left",ar=ao.style,al=ar[ak],ap=ao.runtimeStyle[ak],aj;ao.runtimeStyle[ak]=ao.currentStyle[ak];ar[ak]=aq;aj=ar["pixel"+an];ar[ak]=al;ao.runtimeStyle[ak]=ap;return aj;}function S(ak){if(/^(transparent|rgba\(0, ?0, ?0, ?0\))$/.test(ak)){return"transparent";}var ao,aj,ap,aq,al,an=Math.round,ar=parseInt,am=parseFloat;if(ao=t.exec(ak)){aj=ao[2]?an(((am(ao[1])/100)*255)):ar(ao[1]);ap=ao[4]?an(((am(ao[3])/100)*255)):ar(ao[3]);aq=ao[6]?an(((am(ao[5])/100)*255)):ar(ao[5]);}else{if(typeof ak=="number"){al=ak;}else{if(ak.charAt(0)=="#"){if(ak.length=="4"){ak="#"+ak.charAt(1)+ak.charAt(1)+ak.charAt(2)+ak.charAt(2)+ak.charAt(3)+ak.charAt(3);}al=ar(ak.slice(1),16);}else{al=I[ak];}}aj=(al)>>16;ap=(al&65280)>>8;aq=(al&255);}ak=new String("rgb("+aj+", "+ap+", "+aq+")");ak.r=aj;ak.g=ap;ak.b=aq;return ak;}function m(an){var am="",ak=an.childNodes,al=0,aj=ak.length;for(;al<aj;al++){if(ak[al].nodeType==3){am+=ak[al].nodeValue;}else{if(ak[al].nodeType==1){am+=m(ak[al]);}}}return am;}function q(ao,al){var ak=[],aj=0,r,am=0,an=ao.length;for(;am<an;am++){r=ao[am];while(r=r[al+"Sibling"]){if(r.nodeType==1&&r.nodeName!="!"){ak[aj++]=r;break;}}}return Y.get(ak);}function F(aj){var r=aj.offsetParent;while(r&&Y.get(r).css("position")=="static"){r=r.offsetParent;}if(!r&&Y.get(G).css("position")!="static"){r=G;}return r||null;}function ac(am,al){var ak,aj="scroll"+(al?"Left":"Top");if(am.window){ak=am.document.documentElement[aj]||(al?am.pageXOffset:am.pageYOffset)||0;}else{ak=am[aj];}return ak;}function o(ak,aj,r){if(ak.window){ak.scrollTo(aj?r:ac(ak,true),!aj?r:ac(ak,false));}else{ak["scroll"+(aj?"Left":"Top")]=r;}}function g(r,al,ak){var aj=r.length;if(ak!==undefined){while(aj--){o(r[aj],al,ak);}return r;}else{return ac(r[0],al);}}var Y={};Y.get=function(){var am=new u.dom.NodeList(),al=0,ak=arguments,aj=ak.length;for(;al<aj;al++){if(typeof ak[al]=="string"){am.push(new u.dom.NodeList().push(l).get(ak[al]));}else{am.push(ak[al]);}}return am;};Y.create=function(an,am){var r=[],aj=0,al=0,ak;am=u.lang.apply({interpolate:null,escapeHtml:false},am||{});if(am.interpolate){an=k.interpolate(an,am.interpolate,{escapeHtml:am.escapeHtml});}ak=N(an);for(;ak[aj];aj++){if(ak[aj].nodeType==1&&ak[aj].nodeName!="!"){r[al++]=ak[aj];}else{if(ak[aj].nodeType==3&&k.trim(ak[aj].nodeValue)!==""){throw new Error("glow.dom.create - Text must be wrapped in an element");}}}return new Y.NodeList().push(r);};Y.parseCssColor=function(r){var aj=S(r);return{r:aj.r,g:aj.g,b:aj.b};};Y.NodeList=function(){this.length=0;};Y.NodeList.prototype={item:function(r){return this[r];},push:function(){var ak=arguments,aj=ak.length,al=0,ao,r,am=this,an=Array.prototype.push;for(;al<aj;al++){if(!ak[al]){continue;}else{if(ak[al].nodeType==1||ak[al].nodeType==9||ak[al].document){an.call(am,ak[al]);}else{if(ak[al][0]){for(ao=0,r=ak[al].length;ao<r;ao++){an.call(am,ak[al][ao]);}}}}}return am;},each:function(al){for(var r=0,ak=this,aj=ak.length;r<aj;r++){al.call(ak[r],r,ak);}return ak;},eq:function(al){var ak=this,r=0,aj=ak.length;if(!al.push){al=[al];}if(al.length!=ak.length){return false;}for(;r<aj;r++){if(ak[r]!=al[r]){return false;}}return true;},isWithin:function(al){if(al.push){al=al[0];}if(!al||!this.length){return false;}var ak=this,r=0,aj=ak.length,am;if(al.contains&&n.webkit>=521){for(;r<aj;r++){if(!(al.contains(ak[r])&&ak[r]!=al)){return false;}}}else{if(ak[0].compareDocumentPosition){for(;r<aj;r++){if(!(ak[r].compareDocumentPosition(al)&8)){return false;}}}else{for(;r<aj;r++){am=ak[r];while(am=am.parentNode){if(am==al){break;}}if(!am){return false;}}}}return true;},attr:function(ak){var am=this,aj=arguments,r=aj.length,al,an;if(am.length===0){return r>1?am:undefined;}if(typeof ak=="object"){for(al in ak){if(k.hasOwnProperty(ak,al)){am.attr(al,ak[al]);}}return am;}if(n.ie&&R[ak]){if(r>1){e.call(am,aj[1],function(ao){this[R[ak]]=ao;});return am;}an=am[0][R[ak]];if(c[ak]){return an?ak:undefined;}else{if(ah[ak]){return ah[ak](an);}}return an;}if(r>1){e.call(am,aj[1],function(ao){this.setAttribute(ak,ao);});return am;}return M(am[0])?am[0].getAttribute(ak):am[0].getAttribute(ak,2);},removeAttr:function(aj){var r=n.ie&&R[aj],am=this,ak=0,al=am.length;for(;ak<al;ak++){if(r){am[ak][r]="";}else{am[ak].removeAttribute(aj);}}return am;},hasAttr:function(al){var an=this[0],ak=an.attributes;if(M(an)&&n.ie){var ak=an.attributes,am=0,aj=ak.length;for(;am<aj;am++){if(ak[am].nodeName==al){return ak[am].specified;}}return false;}else{if(this[0].getAttributeNode){var r=this[0].getAttributeNode(al);return r?r.specified:false;}}return typeof ak[r]!="undefined";},prop:function(r,am){if(r.constructor===Object){var al=r,ak;for(ak in al){this.prop(ak,al[ak]);}return this;}if(am!==undefined){var aj=this.length;while(aj--){this[aj][r]=am;}return this;}if(!this[0]){return undefined;}return this[0][r];},hasClass:function(r){for(var aj=0,ak=this.length;aj<ak;aj++){if((" "+this[aj].className+" ").indexOf(" "+r+" ")!=-1){return true;}}return false;},addClass:function(r){for(var aj=0,ak=this.length;aj<ak;aj++){if((" "+this[aj].className+" ").indexOf(" "+r+" ")==-1){this[aj].className+=((this[aj].className)?" ":"")+r;}}return this;},removeClass:function(r){var ak=v(r),am=this,aj=0,al=am.length;for(;aj<al;aj++){am[aj].className=am[aj].className.replace(ak," ");}return am;},toggleClass:function(aj){var al=this.length,ak,r=" "+aj+" ";while(al--){ak=" "+this[al].className+" ";if(ak.indexOf(r)!=-1){this[al].className=ak.replace(r," ");}else{this[al].className+=" "+aj;}}return this;},val:function(){function al(ap){var am=ap.type,an=ap.checked,ar=ap.value,at=[],ao=0;if(am=="radio"){return an?ar:"";}else{if(am=="checkbox"){return an?ar:"";}else{if(am=="select-one"){return ap.selectedIndex>-1?ap.options[ap.selectedIndex].value:"";}else{if(am=="select-multiple"){for(var aq=ap.options.length;ao<aq;ao++){if(ap.options[ao].selected){at[at.length]=ap.options[ao].value;}}return at;}else{return ar;}}}}}function aj(an){var av={},au={},aq=an.elements,at=0,ap=aq.length,am,ax,ar,ao,aw;for(;at<ap;at++){ax=aq[at];aw=ax.nodeName.toLowerCase();am=ax.name;if(aw=="fieldset"||aw=="object"||!am){continue;}if(ax.type=="checkbox"&&!ax.checked){if(!am in av){av[am]=undefined;}}else{if(ax.type=="radio"){if(au[am]){au[am][au[am].length]=ax;}else{au[am]=[ax];}}else{var ay=al(ax);if(am in av){if(av[am].push){av[am][av[am].length]=ay;}else{av[am]=[av[am],ay];}}else{av[am]=ay;}}}}for(at in au){ar=0;for(ap=au[at].length;ar<ap;ar++){ao=au[at][ar];am=ao.name;if(ao.checked){av[ao.name]=ao.value;break;}}if(!am in av){av[am]=undefined;}}return av;}function r(an,aw){var am,ax,at={},aq,ar=0,ao,au,av,ap;for(am in aw){ax=an[am];if(ax&&ax[0]&&!ax.options){aw[am]=aw[am]&&aw[am].push?aw[am]:[aw[am]];at.radios=[];at.checkboxesSelects=[];at.multiSelects=[];at.other=[];for(ar=0;ax[ar];ar++){ap=ax[ar].type;if(ap=="radio"){aq="radios";}else{if(ap=="select-one"||ap=="checkbox"){aq="checkboxesSelects";}else{if(ap=="select-multiple"){aq="multiSelects";}else{aq="other";}}}at[aq][at[aq].length]=ax[ar];}for(ar=0;at.multiSelects[ar];ar++){aw[am]=ak(at.multiSelects[ar],aw[am]);}for(ar=0;at.checkboxesSelects[ar];ar++){ak(at.checkboxesSelects[ar],"");for(ao=0,au=aw[am].length;ao<au;ao++){if(ak(at.checkboxesSelects[ar],aw[am][ao])){aw[am].slice(ao,1);break;}}}for(ar=0;at.radios[ar];ar++){at.radios[ar].checked=false;av=false;for(ao=0,au=aw[am].length;ao<au;ao++){if(ak(at.radios[ar],aw[am][ao])){aw[am].slice(ao,1);av=true;break;}if(av){break;}}}for(ar=0;at.other[ar]&&aw[am][ar]!==undefined;ar++){ak(at.other[ar],aw[am][ar]);}}else{if(ax&&ax.nodeName){ak(ax,aw[am]);}}}}function ak(ao,aq){var ar=0,an,ap=0,av,am,au;if(ao.type=="select-one"){for(an=ao.options.length;ar<an;ar++){if(ao.options[ar].value==aq){ao.selectedIndex=ar;return true;}}return false;}else{if(ao.type=="select-multiple"){var at=!!aq.push;for(ar=0,an=ao.options.length;ar<an;ar++){am=ao.options[ar];au=am.value;if(at){am.selected=false;for(av=aq.length;ap<av;ap++){if(au==aq[ap]){am.selected=true;aq.splice(ap,1);break;}}}else{return am.selected=aq==au;}}return false;}else{if(ao.type=="radio"||ao.type=="checkbox"){ao.checked=aq==ao.value;return aq==ao.value;}else{ao.value=aq;return true;}}}}return function(){var am=arguments,aq=am[0],ap=this,an=0,ao=ap.length;if(am.length===0){return ap[0].nodeName=="FORM"?aj(ap[0]):al(ap[0]);}if(ap[0].nodeName=="FORM"){if(!typeof aq=="object"){throw"value for FORM must be object";}r(ap[0],aq);}else{for(;an<ao;an++){ak(ap[an],aq);}}return ap;};}(),slice:function(){return new Y.NodeList().push(Array.prototype.slice.apply(this,arguments));},sort:function(al){var ak=this,aj=0,r;if(!ak.length){return ak;}if(!al){if(typeof ak[0].sourceIndex=="number"){al=function(an,am){return an.sourceIndex-am.sourceIndex;};}else{if(ak[0].compareDocumentPosition){al=function(an,am){return 3-(an.compareDocumentPosition(am)&6);};}else{r=H("*",[l]);for(;r[aj];aj++){r[aj]._sourceIndex=aj;}al=function(an,am){return an._sourceIndex-am._sourceIndex;};}}}return Y.get([].sort.call(ak,al));},filter:function(am){var aj=[],r=0,ak=0,al=this.length;for(;ak<al;ak++){if(am.apply(this[ak],[ak])){aj[r++]=this[ak];}}return Y.get(aj);},children:function(){var aj=[],r=0,ak=0,an=0,am=this.length,al;for(;ak<am;ak++){aj=aj.concat(b(this[ak]));}return Y.get(aj);},parent:function(){var aj=[],r=0,ak=0,al=this.length;for(;ak<al;ak++){aj[r++]=this[ak].parentNode;}return Y.get(d(aj));},ancestors:function(){var aj=[],r=0,ak=0,al=this.length,am;while(ak<al){am=this[ak].parentNode;while(am&&am.nodeType==1){aj[r++]=am;am=am.parentNode;}ak++;}return Y.get(d(aj));},wrap:function(am){var al=this.length,r,ak,aj;if(typeof am=="string"){aj=Y.create(am);}else{aj=Y.get(am);}for(i=0;i<al;i++){ak=aj[0];while(ak){r=af(ak);if(r){ak=r;}else{break;}}if(this[i].parentNode){aj.insertBefore(this[i]);}if(i!=al-1){aj=aj.clone();}ak.appendChild(this[i]);}return this;},unwrap:function(){var aj,r=this.parent(),ak=r.length;for(i=0;i<ak;i++){aj=r.slice(i,i+1);if(!aj[0].parentNode){aj.children().remove();aj.destroy();}else{aj.children().insertBefore(aj);aj.destroy();}}return this;},next:function(){return q(this,"next");},prev:function(){return q(this,"previous");},is:function(aj){var ak=u.dom.get(aj),am=0,r=this.length,al,an;node:for(;am<r;am++){for(al=0,an=ak.length;al<an;al++){if(this[am]==ak[al]){continue node;}}return false;}return true;},text:function(){var r=arguments,aj=0,al=this,ak=al.length;if(r.length>0){for(;aj<ak;aj++){al[aj].innerHTML="";al[aj].appendChild(l.createTextNode(r[0]));}return al;}return al[0].innerText||al[0].textContent==undefined?m(al[0]):al[0].textContent;},empty:function(){var aj=0,r=this.length;for(;aj<r;aj++){while(this[aj].firstChild){this[aj].removeChild(this[aj].firstChild);}}return this;},remove:function(){for(var al=this,aj=0,ak=al.length,r;aj<ak;aj++){if(r=al[aj].parentNode){r.removeChild(al[aj]);}}return al;},destroy:function(){this.get("*").push(this).removeData();this.appendTo(P);P.innerHTML="";Array.prototype.splice.call(this,0,this.length);return this;},clone:function(am){var aj=[],al=this.length,r,ak;eventIdProp="__eventId"+u.UID;if(al===0){return new Y.NodeList();}while(al--){aj[al]=this[al].cloneNode(true);}r=Y.get(aj).get("*").push(aj);if(w&&!M(aj[0])){al=r.length;while(al--){r[al][eventIdProp]=null;}}ak=this.get("*").push(this);al=r.length;while(al--){r[al].removeAttribute(ai);u.dom.get(r[al]).data(u.dom.get(ak[al]).data());}if(am){if(!u.events){throw"glow.events required to clone event listeners";}u.events._copyListeners(this.get("*").push(this),r||Y.get(aj).get("*").push(aj));}return Y.get(aj);},html:function(r){var aj=0,ak=this.length;if(r!==undefined){return this.empty().append(r.toString());}return this[0]?this[0].innerHTML:"";},width:function(r){if(r==undefined){return f(this[0],"width");}j(this,r,"width");return this;},height:function(r){if(r==undefined){return f(this[0],"height");}j(this,r,"height");return this;},scrollLeft:function(r){return g(this,true,r);},scrollTop:function(r){return g(this,false,r);},show:function(){var ak=0,aj=this.length,r,al;for(;ak<aj;ak++){r=Y.get(this[ak]);al=r[0].style;if(r.css("display")=="none"){al.display="";al.visibility="visible";if(r.css("display")=="none"){al.display="block";}}}return this;},hide:function(){return this.css("display","none").css("visibility","hidden");},css:function(ao,al){var ak=this,an,aj=0,r=ak.length,am=ao;if(ao.constructor===Object){for(style in ao){this.css(style,ao[style]);}return ak;}else{if(al!=undefined){ao=W(ao);for(;aj<r;aj++){an=ak[aj].style;if(typeof al=="number"&&C.test(am)){al=al.toString()+"px";}if(ao=="opacity"&&n.ie){an.zoom="1";if(al===""){an.filter="";}else{an.filter="alpha(opacity="+Math.round(Number(al,10)*100)+")";}}else{an[ao]=al;}}return ak;}else{if(!r){return;}return Z(ak[0],ao);}}},offset:function(){var an=this[0],al={x:ac(window,true),y:ac(window,false)};if(!u.env.webkit&&an.getBoundingClientRect){var ap=an.getBoundingClientRect();return{top:ap.top+al.y-G.clientTop,left:ap.left+al.x-G.clientLeft};}else{var ao=an.offsetTop,r=an.offsetLeft,aj=an,aq,am=false,ak=an;while(an=an.offsetParent){r+=an.offsetLeft;ao+=an.offsetTop;if(Z(an,"position")=="fixed"){am=true;}if(n.gecko||n.webkit>500){r+=parseInt(Z(an,"border-left-width"))||0;ao+=parseInt(Z(an,"border-top-width"))||0;}if(an.nodeName.toLowerCase()!="body"){ak=an;}}an=aj;while((an=an.parentNode)&&(an!=V)&&(an!=G)){r-=an.scrollLeft;ao-=an.scrollTop;if(n.gecko&&Z(an,"overflow")!="visible"){r+=parseInt(Z(an,"border-left-width"));ao+=parseInt(Z(an,"border-top-width"));}}if(am){r+=al.x;ao+=al.y;}if((n.webkit<500&&(am||Z(ak,"position")=="absolute"))||(n.gecko&&Z(ak,"position")!="absolute")){r-=V.offsetLeft;ao-=V.offsetTop;}return{left:r,top:ao};}},position:function(){var aj=Y.get(F(this[0])),ao=!!aj[0],an=parseInt(this.css("margin-left"))||0,am=parseInt(this.css("margin-top"))||0,al=(ao&&parseInt(aj.css("border-left-width")))||0,r=(ao&&parseInt(aj.css("border-top-width")))||0,ap=this.offset(),ak=ao?aj.offset():{top:0,left:0};return{left:ap.left-ak.left-an-al,top:ap.top-ak.top-am-r};},append:function(an){var am=this,aj=0,ak=1,al=am.length,r;if(al==0){return am;}r=typeof an=="string"?p(N(an)):an.nodeType?[an]:p(an);for(;r[aj];aj++){am[0].appendChild(r[aj]);}for(;ak<al;ak++){for(aj=0;r[aj];aj++){am[ak].appendChild(r[aj].cloneNode(true));}}return am;},prepend:function(ao){var am=this,aj=0,ak=1,al=am.length,r,an;if(al==0){return am;}r=typeof ao=="string"?p(N(ao)):ao.nodeType?[ao]:p(ao);an=am[0].firstChild;for(;r[aj];aj++){am[0].insertBefore(r[aj],an);}for(;ak<al;ak++){an=am[ak].firstChild;for(aj=0;r[aj];aj++){am[ak].insertBefore(r[aj].cloneNode(true),an);}}return am;},appendTo:function(r){if(!(r instanceof Y.NodeList)){r=Y.get(r);}r.append(this);return this;},prependTo:function(r){if(!(r instanceof Y.NodeList)){r=Y.get(r);}r.prepend(this);return this;},after:function(ap){var ao=this,an=ao.length,ak,aj,al,am=1,r;if(an==0){return ao;}ak=typeof ap=="string"?Y.create(ap):ap instanceof Y.NodeList?ap:Y.get(ap);aj=ak.length;for(al=aj-1;al>=0;al--){ao[0].parentNode.insertBefore(ak[al],ao[0].nextSibling);}for(;am<an;am++){r=ak.clone();for(al=aj-1;al>=0;al--){ao[am].parentNode.insertBefore(r[al],ao[am].nextSibling);}}return ao;},before:function(ap){var ao=this,an=ao.length,al=0,am=1,ak,aj,r;if(an==0){return ao;}ak=typeof ap=="string"?Y.create(ap):ap instanceof Y.NodeList?ap:Y.get(ap);aj=ak.length;for(;al<aj;al++){ao[0].parentNode.insertBefore(ak[al],ao[0]);}for(;am<an;am++){r=ak.clone();for(al=0;al<aj;al++){ao[am].parentNode.insertBefore(r[al],ao[am]);}}return ao;},insertAfter:function(r){if(!(r instanceof Y.NodeList)){r=Y.get(r);}r.after(this);return this;},insertBefore:function(r){if(!(r instanceof Y.NodeList)){r=Y.get(r);}r.before(this);return this;},replaceWith:function(r){if(n.webkit<500){this.after(K).remove();Y.get("u.glow-placeholder").after(r).remove();}else{this.after(r).remove();}return this;},data:function(ak,al){if(typeof ak==="object"){for(var an in ak){this.data(an,ak[an]);}return this;}var r,am;switch(arguments.length){case 0:if(this[0]===undefined){return undefined;}r=this[0][ai]||ag++;return L[r]||(L[r]={});case 1:if(this[0]===undefined){return undefined;}r=this[0][ai];return r?L[r][ak]:undefined;case 2:for(var aj=this.length;aj--;){am=this[aj];if(!(r=am[ai])){r=ag++;am[ai]=r;L[r]={};}L[r][ak]=al;}return this;default:throw new Error("glow.dom.NodeList#data expects 2 or less arguments, not "+arguments.length+".");}},removeData:function(ak){var am,aj=this.length,r;while(aj--){am=this[aj];r=am[ai];if(r!==undefined){switch(arguments.length){case 0:L[r]=undefined;am[ai]=undefined;try{delete am[ai];}catch(al){am.removeAttribute&&am.removeAttribute(ai);}break;case 1:L[r][ak]=undefined;delete L[r][ak];break;default:throw new Error("glow.dom.NodeList#removeData expects 1 or less arguments, not "+arguments.length+".");}}}return this;},get:function(){function ak(az){if(B[az]){return B[az];}var ar=[],aC=0,at,aA,av,ax,aB,ay,au=true,aw=az;while(az&&az!=ay){aA="";av="";ay=az;if(ax=s.combinator.exec(az)){at=ax[1];az=az.slice(ax[0].length);}if(ax=s.tagName.exec(az)){aA=ax[1];az=az.slice(ax[0].length);}if(ax=s.classNameOrId.exec(az)){if(ax[1]=="#"){av=ax[2];az=az.slice(ax[0].length);}}if(!at){if(av&&au){ar[aC++]=[am,[av.replace(/\\/g,""),aA||"*",null]];}else{ar[aC++]=[H,[aA||"*",null]];if(av){ar[aC++]=[ap,[av.replace(/\\/g,""),null]];}}}else{if(at==">"){ar[aC++]=[al,[null]];if(av){ar[aC++]=[ap,[av.replace(/\\/g,""),null]];}if(aA&&aA!="*"){ar[aC++]=[aq,[aA,null]];}}}aB=true;while(aB){if(az.charAt(0)=="#"||az.charAt(0)=="."){if(ax=s.classNameOrId.exec(az)){if(az.charAt(0)=="#"){ar[aC++]=[ap,[ax[2].replace(/\\/g,""),null]];}else{ar[aC++]=[ao,[ax[2].replace(/\\/g,""),null]];}az=az.slice(ax[0].length);}else{throw new Error("Invalid Selector "+aw);}}else{aB=false;}}au=false;}if(az!==""){throw new Error("Invalid Selector "+aw);}return B[az]=ar;}function an(ar,av){var au=av;for(var at=0,aw=ar.length;at<aw;at++){ar[at][1][ar[at][1].length-1]=au;au=ar[at][0].apply(this,ar[at][1]);}return au;}function am(at,ax,au){var ar=[],aB=0,aw=[],aA=0,ay;for(var az=0,av=au.length;az<av;az++){if(au[az].getElementById){ay=au[az].getElementById(at);if(ay&&(ay.tagName==ax.toUpperCase()||ax=="*"||ay.tagName==ax)){ar[aB++]=ay;}}else{aw[aA++]=au[az];}}if(aw[0]){aw=H(ax,aw);aw=ap(at,aw);}return ar.concat(aw);}function al(au){var av=[],at=0,ar=au.length;for(;at<ar;at++){T(av,b(au[at]));}return av;}function ap(av,at){for(var ar=0,au=at.length;ar<au;ar++){if(at[ar].id==av){return[at[ar]];}}return[];}function aq(av,au){var ax=[],ar=0;for(var at=0,aw=au.length;at<aw;at++){if(au[at].tagName==av.toUpperCase()||au[at].tagName==av){ax[ar++]=au[at];}}return ax;}function ao(av,au){var ax=[],ar=0;for(var at=0,aw=au.length;at<aw;at++){if((" "+au[at].className+" ").indexOf(" "+av+" ")!=-1){ax[ar++]=au[at];}}return ax;}function aj(ay,au){var av;var ax=[];var aw=ay.split(",");for(var at=0,ar=aw.length;at<ar;at++){av=ak(u.lang.trim(aw[at]));ax=ax.concat(an(av,au));}return ax;}function r(at,av){at=at.length?at:[at];var aw=[];var ar;for(var au=0;at[au];au++){ar=u.dom.get(at[au]);for(var ax=0;av[ax];ax++){if(ar.isWithin(av[ax])){aw[aw.length]=ar[0];break;}}}return aw;}return function(av){if(!this.length){return this;}var au=[];for(var at=0,ar=arguments.length;at<ar;at++){if(typeof arguments[at]=="string"){au=au.concat(aj(arguments[at],this));}else{au=au.concat(r(arguments[at],this));}}return u.dom.get(d(au));};}()};K=Y.create('<u class="glow-placeholder"></u>');u.dom=Y;}});(window.gloader||glow).module({name:"glow.events",library:["glow","1.7.3"],depends:[["glow","1.7.3","glow.dom"]],builder:function(o){var k=o.dom.get;var C={};var x=1;var m=1;var n={};var b={};var p={};var l="__eventId"+o.UID;var g=l+"PreventDefault";var u=l+"StopPropagation";var E={};var f=1;var B={};var z={};var G=1;var d=2;var s=4;var h={TAB:"\t",SPACE:" ",ENTER:"\n",BACKTICK:"`"};var K={"96":223};var t={CAPSLOCK:20,NUMLOCK:144,SCROLLLOCK:145,BREAK:19,BACKTICK:223,BACKSPACE:8,PRINTSCREEN:44,MENU:93,SPACE:32,SHIFT:16,CTRL:17,ALT:18,ESC:27,TAB:9,META:91,RIGHTMETA:92,ENTER:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,INS:45,HOME:36,PAGEUP:33,DEL:46,END:35,PAGEDOWN:34,LEFT:37,UP:38,RIGHT:39,DOWN:40};var I={};for(var H in t){I[""+t[H]]=H;}var y="0123456789=;'\\/#,.-";function D(O){var N=z[O];if(!N){return false;}var M=B[N];if(!M){return false;}for(var L=0,r=M.length;L<r;L++){if(M[L][0]==O){M.splice(L,1);return true;}}return false;}function A(r){E[r]=C.addListener(document,"key"+r,function(R){var P=0;if(R.ctrlKey){P+=G;}if(R.altKey){P+=d;}if(R.shiftKey){P+=s;}var Q=R.chr?R.chr.toLowerCase():R.key?R.key.toLowerCase():R.keyCode;var N=P+":"+Q+":"+r;var O=B[N]?B[N].slice(0):[];if(R.shiftKey){var S=(P&~s)+":"+Q+":"+r;if(B[S]){for(var M=0,L=B[S].length;M<L;M++){O[O.length]=B[S][M];}}}if(!O){return;}for(var M=0,L=O.length;M<L;M++){if(O[M][2].call(O[M][3]||this,R)===false){R.preventDefault();}}return !R.defaultPrevented();});}function w(){var r;for(r in b){C.removeListener(r);}}var q;var J,e;function F(O,N,L){var r;L=!!L;if(o.env.opera){if(N.toLowerCase()=="resize"&&!J&&O==window){J=C.addListener(window.document.body,"resize",function(R){C.fire(window,"resize",R);});}else{if(N.toLowerCase()=="scroll"&&!e&&O==window){e=C.addListener(window.document,"scroll",function(R){C.fire(window,"scroll",R);});}}}var Q=function(T){if(!T){T=window.event;}var S=new C.Event(),R=N.toLowerCase();S.nativeEvent=T;S.source=T.target||T.srcElement;S.relatedTarget=T.relatedTarget||(R=="mouseover"?T.fromElement:T.toElement);S.button=o.env.ie?(T.button&1?0:T.button&2?2:1):T.button;if(T.pageX||T.pageY){S.pageX=T.pageX;S.pageY=T.pageY;}else{if(T.clientX||T.clientY){S.pageX=T.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;S.pageY=T.clientY+document.body.scrollTop+document.documentElement.scrollTop;}}if(R=="mousewheel"){S.wheelDelta=T.wheelDelta?T.wheelDelta/120:T.detail?-T.detail/3:0;if(S.wheelDelta==0){return;}}if(R.indexOf("key")!=-1){S.altKey=!!T.altKey;S.ctrlKey=!!T.ctrlKey;S.shiftKey=!!T.shiftKey;if(N=="keydown"){q=T.keyCode;}S.charCode=T.keyCode&&T.charCode!==0?undefined:T.charCode;if(R=="keypress"){if(typeof(S.charCode)=="undefined"){S.charCode=T.keyCode;}if(o.env.opera&&S.charCode&&S.charCode==q&&y.indexOf(String.fromCharCode(S.charCode))==-1){S.charCode=undefined;S.keyCode=q;}}if(S.charCode&&S.charCode<=49){S.charCode=undefined;}if(S.charCode){S.chr=String.fromCharCode(S.charCode);}else{if(T.keyCode){S.charCode=undefined;S.keyCode=K[T.keyCode.toString()]||T.keyCode;S.key=I[S.keyCode];if(h[S.key]){S.chr=h[S.key];S.charCode=S.chr.charCodeAt(0);}}}if(S.chr){S.capsLock=S.chr.toUpperCase()!=S.chr?S.shiftKey:S.chr.toLowerCase()!=S.chr?!S.shiftKey:undefined;}}C.fire(this,N,S);if(S.defaultPrevented()){return false;}};if(O.addEventListener&&(!o.env.webkit||o.env.webkit>418)){if((N=="focus"||N=="blur")&&(o.env.opera)){O.parentNode.addEventListener(N,function(){},true);}O.addEventListener(N.toLowerCase()=="mousewheel"&&o.env.gecko?"DOMMouseScroll":N,Q,L);}else{var M="on"+N;var P=O[M];if(P){O[M]=function(){var R=P.apply(this,arguments),S=Q.apply(this,arguments);return(R!==false)&&(S!==false);};}else{O[M]=Q;}}O=null;}function a(M,N){var O=k(M),r=N?"mouseout":"mouseover",L=N?"mouseleave":"mouseenter";C.addListener(M,r,function(Q){var P=k(Q.relatedTarget);if(!P.eq(O)&&!P.isWithin(O)){return !C.fire(O[0],L,Q).defaultPrevented();}});}C._copyListeners=function(R,Q){var M=R.length,P,r,L,O,N;while(M--){if(R[M][l]){P=n[R[M][l]];for(r in P){L=0;O=P[r].length;for(;L<O;L++){N=P[r][L];C.addListener(Q[M],r,N[2],N[3]);}}}}};C.addListener=function(S,M,V,O){var T=false;if(!S){throw"no attachTo paramter passed to addListener";}if(typeof S=="string"){if(!o.dom){throw"glow.dom must be loaded to use a selector as the first argument to glow.events.addListener";}S=k(S);}if(o.dom&&S instanceof o.dom.NodeList){var U=[],R=S.length;while(R--){U[R]=C.addListener(S[R],M,V,O);}return U;}var N;if(!(N=S[l])){N=S[l]=m++;}var Q=x++;var P=[N,M,V,O,Q];b[Q]=P;var r=n[N];if(!r){r=n[N]={};}var L=r[M];if(!L){L=r[M]=[];}L[L.length]=P;if((S.addEventListener||S.attachEvent)&&!p[N+":"+M]){switch(M){case"mouseenter":a(S,false);return Q;case"mouseleave":a(S,true);return Q;case"focus":if(o.env.ie){c(S,true);return Q;}else{T=true;}break;case"blur":if(o.env.ie){c(S,false);return Q;}else{T=true;}break;}F(S,M,T);p[N+":"+M]=true;}return Q;};function c(M,N){var r=N?"focusin":"focusout",L=N?"focus":"blur";C.addListener(M,r,function(O){return !C.fire(M,L,O).defaultPrevented();});}C.removeListener=function(O){if(O&&O.toString().indexOf("k:")!=-1){return D(O);}if(O instanceof Array){var L=O.length;while(L--){C.removeListener(O[L]);}return true;}var N=b[O];if(!N){return false;}delete b[O];var M=n[N[0]][N[1]];for(var L=0,r=M.length;L<r;L++){if(M[L]==N){M.splice(L,1);break;}}if(!M.length){delete n[N[0]][N[1]];}var P=false;for(var L in n[N[0]]){P=true;break;}if(!P){delete n[N[0]];}return true;};C.removeAllListeners=function(Q){var N,M,P=[],O=0,r,L;if(typeof Q=="string"){Q=k(Q);}if(Q instanceof Array||Q instanceof o.dom.NodeList){N=Q.length;while(N--){C.removeAllListeners(Q[N]);}return C;}M=Q[l];if(!M){return C;}L=n[M];for(r in L){N=L[r].length;while(N--){P[O++]=L[r][N][4];}}if(P.length){C.removeListener(P);}return C;};C.fire=function(r,L,M){if(!r){throw"glow.events.fire: required parameter attachedTo not passed (name: "+L+")";}if(!L){throw"glow.events.fire: required parameter name not passed";}if(!M){M=new C.Event();}if(M.constructor===Object){M=new C.Event(M);}if(typeof r=="string"){if(!o.dom){throw"glow.dom must be loaded to use a selector as the first argument to glow.events.addListener";}r=k(r);}M.type=L;M.attachedTo=r;if(!M.source){M.source=r;}if(r instanceof o.dom.NodeList){r.each(function(N){v(r[N],M);});}else{v(r,M);}return M;};function v(R,Q){var L,r,M=r&&r[Q.type];(L=R[l])&&(r=n[L])&&(M=r[Q.type]);if(!M){return Q;}var N;var S=M.slice(0);for(var O=0,P=S.length;O<P;O++){N=S[O];if(N[2].call(N[3]||R,Q)===false){Q.preventDefault();}}}var j=/^((?:(?:ctrl|alt|shift)\+)*)(?:(\w+|.)|[\n\r])$/i;C.addKeyListener=function(Q,P,R,L){P.replace(/^key/i,"");P=P.toLowerCase();if(!(P=="press"||P=="down"||P=="up")){throw"event type must be press, down or up";}if(!E[P]){A(P);}var N=Q.match(j),S=0,T;if(!N){throw"key format not recognised";}if(N[1].toLowerCase().indexOf("ctrl")!=-1){S+=G;}if(N[1].toLowerCase().indexOf("alt")!=-1){S+=d;}if(N[1].toLowerCase().indexOf("shift")!=-1){S+=s;}var r=S+":"+(N[2]?N[2].toLowerCase():"\n")+":"+P;var M="k:"+f++;z[M]=r;var O=B[r];if(!O){O=B[r]=[];}O[O.length]=[M,P,R,L];return M;};C.Event=function(r){if(r){o.lang.apply(this,r);}};C.Event.prototype.preventDefault=function(){if(this[g]){return;}this[g]=true;if(this.nativeEvent&&this.nativeEvent.preventDefault){this.nativeEvent.preventDefault();this.nativeEvent.returnValue=false;}};C.Event.prototype.defaultPrevented=function(){return !!this[g];};C.Event.prototype.stopPropagation=function(){if(this[u]){return;}this[u]=true;var r=this.nativeEvent;if(r){r.cancelBubble=true;if(r.stopPropagation){r.stopPropagation();}}};C.Event.prototype.propagationStopped=function(){return !!this[u];};if(o.env.ie<8||o.env.webkit<500){C.addListener(window,"unload",w);}o.events=C;o.events.listenersByObjId=n;}});(window.gloader||glow).module({name:"glow.data",library:["glow","1.7.3"],depends:[["glow","1.7.3","glow.dom"]],builder:function(glow){var TYPES={UNDEFINED:"undefined",OBJECT:"object",NUMBER:"number",BOOLEAN:"boolean",STRING:"string",ARRAY:"array",FUNCTION:"function",NULL:"null"};var TEXT={AT:"@",EQ:"=",DOT:".",EMPTY:"",AND:"&",OPEN:"(",CLOSE:")"};var JSON={HASH:{START:"{",END:"}",SHOW_KEYS:true},ARRAY:{START:"[",END:"]",SHOW_KEYS:false},DATA_SEPARATOR:",",KEY_SEPARATOR:":",KEY_DELIMITER:'"',STRING_DELIMITER:'"',SAFE_PT1:/^[\],:{}\s]*$/,SAFE_PT2:/\\./g,SAFE_PT3:/\"[^\"\\\n\r]*\"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,SAFE_PT4:/(?:^|:|,)(?:\s*\[)+/g};var SLASHES={TEST:/[\b\n\r\t\\\f\"]/g,B:{PLAIN:"\b",ESC:"\\b"},N:{PLAIN:"\n",ESC:"\\n"},R:{PLAIN:"\r",ESC:"\\r"},T:{PLAIN:"\t",ESC:"\\t"},F:{PLAIN:"\f",ESC:"\\f"},SL:{PLAIN:"\\",ESC:"\\\\"},QU:{PLAIN:'"',ESC:'\\"'}};function _replaceSlashes(s){switch(s){case SLASHES.B.PLAIN:return SLASHES.B.ESC;case SLASHES.N.PLAIN:return SLASHES.N.ESC;case SLASHES.R.PLAIN:return SLASHES.R.ESC;case SLASHES.T.PLAIN:return SLASHES.T.ESC;case SLASHES.F.PLAIN:return SLASHES.F.ESC;case SLASHES.SL.PLAIN:return SLASHES.SL.ESC;case SLASHES.QU.PLAIN:return SLASHES.QU.ESC;default:return s;}}function _getType(object){if((typeof object)==TYPES.OBJECT){if(object==null){return TYPES.NULL;}else{return(object instanceof Array)?TYPES.ARRAY:TYPES.OBJECT;}}else{return(typeof object);}}glow.data={encodeUrl:function(object){var objectType=_getType(object);var paramsList=[];var listLength=0;if(objectType!=TYPES.OBJECT){throw new Error("glow.data.encodeUrl: cannot encode item");}else{for(var key in object){switch(_getType(object[key])){case TYPES.FUNCTION:case TYPES.OBJECT:throw new Error("glow.data.encodeUrl: cannot encode item");break;case TYPES.ARRAY:for(var i=0,l=object[key].length;i<l;i++){switch(_getType(object[key])[i]){case TYPES.FUNCTION:case TYPES.OBJECT:case TYPES.ARRAY:throw new Error("glow.data.encodeUrl: cannot encode item");break;default:paramsList[listLength++]=key+TEXT.EQ+encodeURIComponent(object[key][i]);}}break;default:paramsList[listLength++]=key+TEXT.EQ+encodeURIComponent(object[key]);}}return paramsList.join(TEXT.AND);}},decodeUrl:function(text){if(_getType(text)!=TYPES.STRING){throw new Error("glow.data.decodeUrl: cannot decode item");}else{if(text===""){return{};}}var result={};var keyValues=text.split(/[&;]/);var thisPair,key,value;for(var i=0,l=keyValues.length;i<l;i++){thisPair=keyValues[i].split(TEXT.EQ);if(thisPair.length!=2){throw new Error("glow.data.decodeUrl: cannot decode item");}else{key=glow.lang.trim(decodeURIComponent(thisPair[0]));value=glow.lang.trim(decodeURIComponent(thisPair[1]));switch(_getType(result[key])){case TYPES.ARRAY:result[key][result[key].length]=value;break;case TYPES.UNDEFINED:result[key]=value;break;default:result[key]=[result[key],value];}}}return result;},encodeJson:function(object,options){function _encode(object,options){if(_getType(object)==TYPES.ARRAY){var type=JSON.ARRAY;}else{var type=JSON.HASH;}var serial=[type.START];var len=1;var dataType;var notFirst=false;for(var key in object){dataType=_getType(object[key]);if(dataType!=TYPES.UNDEFINED){if(notFirst){serial[len++]=JSON.DATA_SEPARATOR;}notFirst=true;if(type.SHOW_KEYS){serial[len++]=JSON.KEY_DELIMITER;serial[len++]=key;serial[len++]=JSON.KEY_DELIMITER;serial[len++]=JSON.KEY_SEPARATOR;}switch(dataType){case TYPES.FUNCTION:throw new Error("glow.data.encodeJson: cannot encode item");break;case TYPES.STRING:default:serial[len++]=JSON.STRING_DELIMITER;serial[len++]=glow.lang.replace(object[key],SLASHES.TEST,_replaceSlashes);serial[len++]=JSON.STRING_DELIMITER;break;case TYPES.NUMBER:case TYPES.BOOLEAN:serial[len++]=object[key];break;case TYPES.OBJECT:case TYPES.ARRAY:serial[len++]=_encode(object[key],options);break;case TYPES.NULL:serial[len++]=TYPES.NULL;break;}}}serial[len++]=type.END;return serial.join(TEXT.EMPTY);}options=options||{};var type=_getType(object);if((type==TYPES.OBJECT)||(type==TYPES.ARRAY)){return _encode(object,options);}else{throw new Error("glow.data.encodeJson: cannot encode item");}},decodeJson:function(text,options){if(_getType(text)!=TYPES.STRING){throw new Error("glow.data.decodeJson: cannot decode item");}options=options||{};options.safeMode=options.safeMode||false;var canEval=true;if(options.safeMode){canEval=(JSON.SAFE_PT1.test(text.replace(JSON.SAFE_PT2,TEXT.AT).replace(JSON.SAFE_PT3,JSON.ARRAY.END).replace(JSON.SAFE_PT4,TEXT.EMPTY)));}if(canEval){try{return eval(TEXT.OPEN+text+TEXT.CLOSE);}catch(e){}}throw new Error("glow.data.decodeJson: cannot decode item");},escapeHTML:function(html){return glow.dom.create("<div></div>").text(html).html();}};}});(window.gloader||glow).module({name:"glow.net",library:["glow","1.7.3"],depends:[["glow","1.7.3","glow.data","glow.events"]],builder:function(h){var t={XML_ERR:"Cannot get response as XML, check the mime type of the data",POST_DEFAULT_CONTENT_TYPE:"application/x-www-form-urlencoded;"},u=/\+xml$/,p=[],e="c",o="_"+h.UID+"loadScriptCbs",g=h.dom.get,c=h.events,f=function(){},k=1;function s(){if(window.ActiveXObject){return(s=function(){return new ActiveXObject("Microsoft.XMLHTTP");})();}else{return(s=function(){return new XMLHttpRequest();})();}}function d(w){var r=h.lang.apply({onLoad:f,onError:f,onAbort:f,headers:{},async:true,useCache:false,data:null,defer:false,forceXml:false},w||{});if(!("X-Requested-With" in r.headers)){r.headers["X-Requested-With"]="XMLHttpRequest";}return r;}function v(r){return[r,(/\?/.test(r)?"&":"?"),"a",new Date().getTime(),parseInt(Math.random()*100000)].join("");}function j(C,r,z){var y=s(),A=z.data&&(typeof z.data=="string"?z.data:h.data.encodeUrl(z.data)),w,x=new q(y,z);if(!z.useCache){r=v(r);}y.open(C,r,z.async);for(w in z.headers){y.setRequestHeader(w,z.headers[w]);}function B(){x.send=f;if(z.async){if(z.timeout){x._timeout=setTimeout(function(){a(x);var E=new b(y,true,x);c.fire(x,"error",E);},z.timeout*1000);}y.onreadystatechange=function(){if(y.readyState==4){x._timeout&&clearTimeout(x._timeout);x.completed=true;var E=new b(y,false,x);if(E.wasSuccessful){c.fire(x,"load",E);}else{c.fire(x,"error",E);}y.onreadystatechange=new Function();}};y.send(A);return x;}else{y.send(A);x.completed=true;var D=new b(y,false,x);if(D.wasSuccessful){c.fire(x,"load",D);}else{c.fire(x,"error",D);}return D;}}x.send=B;return z.defer?x:B();}var m={};m.get=function(r,w){w=d(w);return j("GET",r,w);};m.post=function(r,w,x){x=d(x);x.data=w;if(!x.headers["Content-Type"]){x.headers["Content-Type"]=t.POST_DEFAULT_CONTENT_TYPE;}return j("POST",r,x);};m.send=function(y,r,w,x){w=w||"";x=d(x);x.data=w;return j(y,r,x);};m.put=function(r,w,x){x=d(x);x.data=w;if(!x.headers["Content-Type"]){x.headers["Content-Type"]=t.POST_DEFAULT_CONTENT_TYPE;}return j("PUT",r,x);};m.del=function(r,w){w=d(w);return j("DELETE",r,w);};m.loadScript=function(w,z){var x=p.length,r,A=e+x,z=d(z),y=new q(x,z),w=z.useCache?w:v(w),B=window[o]||(window[o]={});if(z.onLoad!=f){B[A]=function(){y._timeout&&clearTimeout(y._timeout);y.completed=true;z.onLoad.apply(this,arguments);y.destroy();r=B[A]=undefined;delete B[A];};w=h.lang.interpolate(w,{callback:o+"."+A});}r=p[x]=document.createElement("script");if(z.charset){r.charset=z.charset;}c.addListener(y,"abort",z.onAbort);h.ready(function(){if(z.timeout){y._timeout=setTimeout(function(){a(y);z.onError();},z.timeout*1000);}if(h.env.opera){setTimeout(function(){if(r){r.src=w;}},0);}else{r.src=w;}document.body.appendChild(r);});return y;};function a(w){var r=w.nativeRequest,x=w._callbackIndex;w._timeout&&clearTimeout(w._timeout);if(r){r.onreadystatechange=new Function();r.abort();}else{if(x){window[o][e+x]=f;h.dom.get(p[x]).destroy();}}}function q(y,w){this._timeout=null;this._forceXml=w.forceXml;if(w.forceXml&&y.overrideMimeType){y.overrideMimeType("application/xml");}this.complete=false;if(typeof y=="number"){this._callbackIndex=y;}else{this.nativeRequest=y;}var x=["Load","Error","Abort"],r=0;for(;r<3;r++){c.addListener(this,x[r].toLowerCase(),w["on"+x[r]]);}}q.prototype={send:function(){},abort:function(){if(!this.completed&&!c.fire(this,"abort").defaultPrevented()){a(this);}return this;},destroy:function(){var r=this;if(this._callbackIndex!==undefined){setTimeout(function(){g(p[r._callbackIndex]).destroy();p[r._callbackIndex]=undefined;delete p[r._callbackIndex];},0);}return this;}};function b(x,r,w){c.Event.call(this);this._request=w;this.nativeResponse=x;this.status=r?408:x.status==1223?204:x.status;this.timedOut=!!r;this.wasSuccessful=(this.status>=200&&this.status<300)||this.status==304||(this.status==0&&x.responseText);}function l(){var r=this.header("Content-Type");return u.test(r)||r==="";}h.lang.extend(b,c.Event,{text:function(){return this.nativeResponse.responseText;},xml:function(){var w=this.nativeResponse;if((h.env.ie&&l.call(this))||(this._request._forceXml&&!this._request.nativeRequest.overrideMimeType&&window.ActiveXObject)){var r=new ActiveXObject("Microsoft.XMLDOM");r.loadXML(w.responseText);return r;}else{if(!w.responseXML){throw new Error(t.XML_ERR);}return w.responseXML;}},json:function(r){return h.data.decodeJson(this.text(),{safeMode:r});},header:function(r){return this.nativeResponse.getResponseHeader(r);},statusText:function(){return this.timedOut?"Request Timeout":this.nativeResponse.statusText;}});var n=function(r,x,y,w){this.url=r;this.data=x;this.isGet=y;this.opts=w;};n.prototype={_send:function(){this._addIframe();this._addForm();this._addTimeout();this.onLoad=this._handleResponse;this._submitForm();},_addIframe:function(){this.iframe=h.dom.create('<iframe style="visibility: hidden; position: absolute; height: 0;"></iframe>');var r=this.iframe[0],w=this,x=function(){if(w.onLoad){w.onLoad();}};if(r.attachEvent){r.attachEvent("onload",x);}else{r.onload=x;}g("body").append(this.iframe);},_addForm:function(){var x=this._window().document;if(h.env.ie){x.open();x.write("<html><body></body></html>");x.close();}var w=this.form=x.createElement("form");w.setAttribute("action",this.url);w.setAttribute("method",this.isGet?"GET":"POST");var r=x.getElementsByTagName("body")[0];r.appendChild(w);this._addFormData();},_addFormData:function(){for(var x in this.data){if(!this.data.hasOwnProperty(x)){continue;}if(this.data[x] instanceof Array){var r=this.data[x].length;for(var w=0;w<r;w++){this._addHiddenInput(x,this.data[x][w]);}}else{this._addHiddenInput(x,this.data[x]);}}},_addHiddenInput:function(w,x){var r=this._window().document.createElement("input");r.type="hidden";r.name=w;r.value=x;this.form.appendChild(r);},_window:function(){var r=this.iframe[0];if(r.contentWindow){return r.contentWindow;}throw new Error("could not get contentWindow from iframe");},_addTimeout:function(){var r=this;this.timeout=setTimeout(function(){var w;if(r.opts.hasOwnProperty("onTimeout")){try{r.opts.onTimeout();}catch(x){w=x;}}r._cleanup();if(w){throw new Error("error in xDomainPost onTimeout callback: "+w);}},(this.opts.timeout||10)*1000);},_handleResponse:function(){var w,r,y=this._window();try{r=y.location.href;}catch(x){w=x;}if(r!="about:blank"||w){clearTimeout(this.timeout);this.onLoad=this._readHandler;if("_fullBlankUrl" in this.opts){y.location=this.opts._fullBlankUrl;}else{y.location=window.location.protocol+"//"+window.location.host+(this.opts.blankUrl||"/favicon.ico");}}},_readHandler:function(){var r;if(this.opts.hasOwnProperty("onLoad")){try{this.opts.onLoad(this._window().name);}catch(w){r=w;}}this._cleanup();if(r){throw new Error("error in xDomainPost onLoad callback: "+r);}},_cleanup:function(){this.iframe.remove();},_submitForm:function(){var r=this;this._window().setTimeout(function(){r.form.submit();},0);}};m.xDomainPost=function(r,y,x){var w=new n(r,y,false,x);w._send();};m.xDomainGet=function(r,x){var w=new n(r,{},true,x);w._send();};h.net=m;}});(window.gloader||glow).module({name:"glow.tweens",library:["glow","1.7.3"],depends:[],builder:function(b){function a(c){return function(d){return 1-c(1-d);};}b.tweens={linear:function(){return function(c){return c;};},easeIn:function(c){c=c||2;return function(d){return Math.pow(1,c-1)*Math.pow(d,c);};},easeOut:function(c){return a(this.easeIn(c));},easeBoth:function(c){return this.combine(this.easeIn(c),this.easeOut(c));},overshootIn:function(c){return a(this.overshootOut(c));},overshootOut:function(c){c=c||1.70158;return function(d){if(d==0||d==1){return d;}return((d-=1)*d*((c+1)*d+c)+1);};},overshootBoth:function(c){return this.combine(this.overshootIn(c),this.overshootOut(c));},bounceIn:function(){return a(this.bounceOut());},bounceOut:function(){return function(c){if(c<(1/2.75)){return 7.5625*c*c;}else{if(c<(2/2.75)){return(7.5625*(c-=(1.5/2.75))*c+0.75);}else{if(c<(2.5/2.75)){return(7.5625*(c-=(2.25/2.75))*c+0.9375);}else{return(7.5625*(c-=(2.625/2.75))*c+0.984375);}}}};},bounceBoth:function(){return this.combine(this.bounceIn(),this.bounceOut());},elasticIn:function(c,d){return a(this.elasticOut(c,d));},elasticOut:function(c,d){return function(e){if(e==0||e==1){return e;}if(!d){d=0.3;}if(!c||c<1){c=1;var f=d/4;}else{var f=d/(2*Math.PI)*Math.asin(1/c);}return c*Math.pow(2,-10*e)*Math.sin((e-f)*(2*Math.PI)/d)+1;};},elasticBoth:function(c,d){d=d||0.45;return this.combine(this.elasticIn(c,d),this.elasticOut(c,d));},combine:function(d,c){return function(e){if(e<0.5){return d(e*2)/2;}else{return c((e-0.5)*2)/2+0.5;}};}};}});(window.gloader||glow).module({name:"glow.anim",library:["glow","1.7.3"],depends:[["glow","1.7.3","glow.tweens","glow.events","glow.dom"]],builder:function(glow){var $=glow.dom.get,manager,events=glow.events,dom=glow.dom,get=dom.get,hasUnits=/width|height|top$|bottom$|left$|right$|spacing$|indent$|font-size/,noNegatives=/width|height|padding|opacity/,usesYAxis=/height|top/,getUnit=/(\D+)$/,testElement=dom.create('<div style="position:absolute;visibility:hidden"></div>');function addEventsFromOpts(instance,opts,eventProps){for(var i=0,len=eventProps.length;i<len;i++){if(opts[eventProps[i]]){events.addListener(instance,eventProps[i].slice(2).toLowerCase(),opts[eventProps[i]]);}}}(function(){var queue=[],queueLen=0,intervalTime=13,interval;manager={addToQueue:function(anim){queue[queueLen++]=anim;anim._playing=true;anim._timeAnchor=anim._timeAnchor||new Date().valueOf();if(!interval){this.startInterval();}},removeFromQueue:function(anim){for(var i=0;i<queueLen;i++){if(queue[i]==anim){queue.splice(i,1);anim._timeAnchor=null;anim._playing=false;if(--queueLen==0){this.stopInterval();}return;}}},startInterval:function(){interval=window.setInterval(this.processQueue,intervalTime);},stopInterval:function(){window.clearInterval(interval);interval=null;},processQueue:function(){var anim,i,now=new Date().valueOf();for(i=0;i<queueLen;i++){anim=queue[i];if(anim.position==anim.duration){manager.removeFromQueue(anim);i--;events.fire(anim,"complete");if(anim._opts.destroyOnComplete){anim.destroy();}continue;}if(anim.useSeconds){anim.position=(now-anim._timeAnchor)/1000;if(anim.position>anim.duration){anim.position=anim.duration;}}else{anim.position++;}anim.value=anim.tween(anim.position/anim.duration);events.fire(anim,"frame");}}};})();function convertCssUnit(element,fromValue,toUnit,axis){var elmStyle=testElement[0].style,axisProp=(axis=="x")?"width":"height",startPixelValue,toUnitPixelValue;elmStyle.margin=elmStyle.padding=elmStyle.border="0";startPixelValue=testElement.css(axisProp,fromValue).insertAfter(element)[axisProp]();toUnitPixelValue=testElement.css(axisProp,10+toUnit)[axisProp]()/10;testElement.remove();return startPixelValue/toUnitPixelValue;}function keepWithinRange(num,start,end){if(start!==undefined&&num<start){return start;}if(end!==undefined&&num>end){return end;}return num;}function buildAnimFunction(element,spec){var cssProp,r=["a=(function(){"],rLen=1,fromUnit,unitDefault=[0,"px"],to,from,unit,a;for(cssProp in spec){r[rLen++]='element.css("'+cssProp+'", ';if(typeof spec[cssProp]!="object"){to=spec[cssProp];}else{to=spec[cssProp].to;}if((from=spec[cssProp].from)===undefined){if(cssProp=="font-size"||cssProp=="background-position"){throw new Error("From value must be set for "+cssProp);}from=element.css(cssProp);}if(hasUnits.test(cssProp)){unit=(getUnit.exec(to)||unitDefault)[1];fromUnit=(getUnit.exec(from)||unitDefault)[1];from=parseFloat(from)||0;to=parseFloat(to)||0;if(from&&unit!=fromUnit){if(cssProp=="font-size"){throw new Error("Units must be the same for font-size");}from=convertCssUnit(element,from+fromUnit,unit,usesYAxis.test(cssProp)?"y":"x");}if(noNegatives.test(cssProp)){r[rLen++]="keepWithinRange(("+(to-from)+" * this.value) + "+from+', 0) + "'+unit+'"';}else{r[rLen++]="("+(to-from)+" * this.value) + "+from+' + "'+unit+'"';}}else{if(!(isNaN(from)||isNaN(to))){from=Number(from);to=Number(to);r[rLen++]="("+(to-from)+" * this.value) + "+from;}else{if(cssProp.indexOf("color")!=-1){to=dom.parseCssColor(to);if(!glow.lang.hasOwnProperty(from,"r")){from=dom.parseCssColor(from);}r[rLen++]='"rgb(" + keepWithinRange(Math.round('+(to.r-from.r)+" * this.value + "+from.r+'), 0, 255) + "," + keepWithinRange(Math.round('+(to.g-from.g)+" * this.value + "+from.g+'), 0, 255) + "," + keepWithinRange(Math.round('+(to.b-from.b)+" * this.value + "+from.b+'), 0, 255) + ")"';}else{if(cssProp=="background-position"){var vals={},fromTo=["from","to"],unit=(getUnit.exec(from)||unitDefault)[1];vals.fromOrig=from.toString().split(/\s/);vals.toOrig=to.toString().split(/\s/);if(vals.fromOrig[1]===undefined){vals.fromOrig[1]="50%";}if(vals.toOrig[1]===undefined){vals.toOrig[1]="50%";}for(var i=0;i<2;i++){vals[fromTo[i]+"X"]=parseFloat(vals[fromTo[i]+"Orig"][0]);vals[fromTo[i]+"Y"]=parseFloat(vals[fromTo[i]+"Orig"][1]);vals[fromTo[i]+"XUnit"]=(getUnit.exec(vals[fromTo[i]+"Orig"][0])||unitDefault)[1];vals[fromTo[i]+"YUnit"]=(getUnit.exec(vals[fromTo[i]+"Orig"][1])||unitDefault)[1];}if((vals.fromXUnit!==vals.toXUnit)||(vals.fromYUnit!==vals.toYUnit)){throw new Error("Mismatched axis units cannot be used for "+cssProp);}r[rLen++]="("+(vals.toX-vals.fromX)+" * this.value + "+vals.fromX+') + "'+vals.fromXUnit+' " + ('+(vals.toY-vals.fromY)+" * this.value + "+vals.fromY+') + "'+vals.fromYUnit+'"';}}}}r[rLen++]=");";}r[rLen++]="})";return eval(r.join(""));}var r={};r.css=function(element,duration,spec,opts){element=get(element);var anim=new r.Animation(duration,opts);if(element[0]){events.addListener(anim,"frame",buildAnimFunction(element,spec));}return anim;};slideElement=function slideElement(element,duration,action,opts){duration=duration||0.5;element=$(element);opts=glow.lang.apply({tween:glow.tweens.easeBoth(),onStart:function(){},onComplete:function(){}},opts);var i=0,thatlength=element.length,completeHeight,fromHeight,channels=[],timeline;for(;i<thatlength;i++){if(action=="up"||(action=="toggle"&&element.slice(i,i+1).height()>0)){element[i].style.overflow="hidden";if(glow.env.ie<8){element[i].style.zoom=1;}completeHeight=0;fromHeight=element.slice(i,i+1).height();}else{if(action=="down"||(action=="toggle"&&element.slice(i,i+1).height()==0)){fromHeight=element.slice(i,i+1).height();element[i].style.height="";completeHeight=element.slice(i,i+1).height();if(completeHeight===0){element[i].style.height="auto";completeHeight=element.slice(i,i+1).height();}element[i].style.height=fromHeight+"px";}}channels[i]=[glow.anim.css(element[i],duration,{height:{from:fromHeight,to:completeHeight}},{tween:opts.tween})];}timeline=new glow.anim.Timeline(channels,{destroyOnComplete:true});events.addListener(timeline,"complete",function(){element.each(function(){if(this.style.height.slice(0,1)!="0"){this.style.height="";if(glow.dom.get(this).height()===0){this.style.height="auto";}}});});events.addListener(timeline,"start",opts.onStart);events.addListener(timeline,"complete",opts.onComplete);return timeline.start();};r.slideDown=function(element,duration,opts){return slideElement(element,duration,"down",opts);};r.slideUp=function(element,duration,opts){return slideElement(element,duration,"up",opts);};r.slideToggle=function(element,duration,opts){return slideElement(element,duration,"toggle",opts);};r.fadeOut=function(element,duration,opts){return r.fadeTo(element,0,duration,opts);};r.fadeIn=function(element,duration,opts){return r.fadeTo(element,1,duration,opts);};r.fadeTo=function(element,opacity,duration,opts){duration=duration||0.5;element=$(element);opts=glow.lang.apply({tween:glow.tweens.easeBoth(),onStart:function(){},onComplete:function(){}},opts);var i=0,thatlength=element.length,channels=[],timeline;for(;i<thatlength;i++){channels[i]=[glow.anim.css(element[i],duration,{opacity:opacity},{tween:opts.tween})];}timeline=new glow.anim.Timeline(channels,{destroyOnComplete:true});events.addListener(timeline,"start",opts.onStart);events.addListener(timeline,"complete",opts.onComplete);return timeline.start();};r.highlight=function(element,highlightColour,duration,opts){element=$(element);duration=duration||1;highlightColour=highlightColour||"#ffff99";opts=glow.lang.apply({tween:glow.tweens.easeBoth(),onStart:function(){},onComplete:function(){}},opts);var i=0,transArray=[],elmsLength=element.length,completeColour,channels=[],timeline;for(;i<elmsLength;i++){completeColour=opts.completeColour||element.slice(i,i+1).css("background-color");if(completeColour=="transparent"||completeColour==""){completeColour="#fff";}channels[i]=[r.css(element[i],duration,{"background-color":{from:highlightColour,to:completeColour}},{tween:opts.tween})];}timeline=new glow.anim.Timeline(channels,{destroyOnComplete:true});events.addListener(timeline,"start",opts.onStart);events.addListener(timeline,"complete",opts.onComplete);return timeline.start();};var animationEventConstructorNames=["onStart","onStop","onComplete","onResume","onFrame"];r.Animation=function(duration,opts){this._opts=opts=glow.lang.apply({useSeconds:true,tween:glow.tweens.linear(),destroyOnComplete:false,onStart:null,onStop:null,onComplete:null,onResume:null,onFrame:null},opts);this._playing=false;this._timeAnchor=null;this.duration=duration;this.useSeconds=opts.useSeconds;this.tween=opts.tween;this.position=0;this.value=0;addEventsFromOpts(this,opts,animationEventConstructorNames);};r.Animation.prototype={start:function(){if(this._playing){this.stop();}var e=events.fire(this,"start");if(e.defaultPrevented()){return this;}this._timeAnchor=null;this.position=0;manager.addToQueue(this);return this;},stop:function(){if(this._playing){var e=events.fire(this,"stop");if(e.defaultPrevented()){return this;}manager.removeFromQueue(this);}return this;},destroy:function(){this.stop();events.removeAllListeners(this);return this;},resume:function(){if(!this._playing){var e=events.fire(this,"resume");if(e.defaultPrevented()){return this;}this._timeAnchor=new Date().valueOf()-(this.position*1000);manager.addToQueue(this);}return this;},isPlaying:function(){return this._playing;},goTo:function(pos){this._timeAnchor=new Date().valueOf()-((this.position=pos)*1000);this.value=this.tween(this.duration&&this.position/this.duration);events.fire(this,"frame");return this;}};var timelineEventConstructorNames=["onStart","onStop","onComplete","onResume"];r.Timeline=function(channels,opts){this._opts=opts=glow.lang.apply({loop:false,destroyOnComplete:false,onStart:null,onStop:null,onComplete:null,onResume:null},opts);this._channels=(channels[0]&&channels[0].push)?channels:[channels];this._channelPos=[];this._playing=false;this.loop=opts.loop;var i,j,iLen,jLen,channel,allChannels=this._channels,totalDuration=0,channelDuration;for(i=0,iLen=allChannels.length;i<iLen;i++){channel=allChannels[i];channelDuration=0;for(j=0,jLen=channel.length;j<jLen;j++){if(typeof channel[j]=="number"){channel[j]=new r.Animation(channel[j]);}if(channel[j] instanceof r.Animation){if(!channel[j].useSeconds){throw new Error("Timelined animations must be timed in seconds");}channel[j]._timelineOffset=channelDuration*1000;channelDuration+=channel[j].duration;channel[j]._channelIndex=i;}}this.duration=totalDuration=Math.max(channelDuration,totalDuration);}this._controlAnim=new r.Animation(totalDuration);events.addListener(this._controlAnim,"frame",this._processFrame,this);events.addListener(this._controlAnim,"complete",this._complete,this);addEventsFromOpts(this,opts,timelineEventConstructorNames);};r.Timeline.prototype={_advanceChannel:function(i){var currentAnim=this._channels[i][this._channelPos[i]],nextAnim=this._channels[i][++this._channelPos[i]];if(currentAnim&&currentAnim._playing){currentAnim._playing=false;events.fire(currentAnim,"complete");if(currentAnim._opts.destroyOnComplete){currentAnim.destroy();}}if((nextAnim)!==undefined){if(typeof nextAnim=="function"){nextAnim();this._advanceChannel(i);}else{nextAnim.position=0;nextAnim._channelIndex=i;events.fire(nextAnim,"start");nextAnim._playing=true;}}},_complete:function(){if(this.loop){this.start();return;}this._playing=false;events.fire(this,"complete");if(this._opts.destroyOnComplete){this.destroy();}},_processFrame:function(){var i,len,anim,controlAnim=this._controlAnim,msFromStart=(new Date().valueOf())-controlAnim._timeAnchor;for(i=0,len=this._channels.length;i<len;i++){if(!(anim=this._channels[i][this._channelPos[i]])){continue;}anim.position=(msFromStart-anim._timelineOffset)/1000;if(anim.position>anim.duration){anim.position=anim.duration;}anim.value=anim.tween(anim.position/anim.duration);events.fire(anim,"frame");if(anim.position==anim.duration){this._advanceChannel(i);}}},start:function(){var e=events.fire(this,"start");if(e.defaultPrevented()){return this;}var i,iLen,j,jLen,anim;this._playing=true;for(i=0,iLen=this._channels.length;i<iLen;i++){this._channelPos[i]=-1;this._advanceChannel(i);for(j=this._channels[i].length;j;j--){anim=this._channels[i][j];if(anim instanceof r.Animation){anim.goTo(0);}}}this._controlAnim.start();return this;},stop:function(){if(this._playing){var e=events.fire(this,"stop");if(e.defaultPrevented()){return this;}this._playing=false;var anim;for(var i=0,len=this._channels.length;i<len;i++){anim=this._channels[i][this._channelPos[i]];if(anim instanceof r.Animation&&anim._playing){events.fire(anim,"stop");anim._playing=false;}}this._controlAnim.stop();}return this;},destroy:function(){var i,j;this.stop();events.removeAllListeners(this);this._controlAnim.destroy();i=this._channels.length;while(i--){j=this._channels[i].length;while(j--){if(this._channels[i][j].destroy){this._channels[i][j].destroy();}}}return this;},resume:function(){if(!this._playing){var e=events.fire(this,"resume");if(e.defaultPrevented()){return this;}this._playing=true;var anim;for(var i=0,len=this._channels.length;i<len;i++){anim=this._channels[i][this._channelPos[i]];if(anim instanceof r.Animation&&!anim._playing){events.fire(anim,"resume");anim._playing=true;}}this._controlAnim.resume();}return this;},isPlaying:function(){return this._playing;},goTo:function(pos){var i,j,k,channelsLen=this._channels.length,channelLen,anim,runningDuration;if(typeof pos=="number"){if(pos>this.duration){if(this.loop){pos=pos%this.duration;}else{pos=this.duration;}}this._controlAnim.goTo(pos);for(i=0;i<channelsLen;i++){runningDuration=0;for(j=0,channelLen=this._channels[i].length;j<channelLen;j++){anim=this._channels[i][j];if(anim instanceof r.Animation){if((runningDuration+anim.duration)>pos){this._channelPos[i]=j;anim.goTo(pos-runningDuration);break;}anim.goTo(anim.duration);runningDuration+=anim.duration;}}for(k=channelLen;k>j;k--){anim.goTo(0);}}}else{for(i=0;i<channelsLen;i++){runningDuration=0;for(j=0,channelLen=this._channels[i].length;j<channelLen;j++){anim=this._channels[i][j];if(anim===pos){return this.goTo(runningDuration);}if(anim instanceof r.Animation){runningDuration+=anim.duration;}}}throw"Animation not found in animation channels";}return this;}};glow.anim=r;}});(window.gloader||glow).module({name:"glow.forms",library:["glow","1.7.3"],depends:[["glow","1.7.3","glow.dom","glow.events","glow.anim","glow.net","glow.i18n"]],builder:function(g){var b=g.i18n,f=g.lang.interpolate;b.addLocaleModule("GLOW_FORMS","en",{TEST_MESSAGE_REQUIRED:"Value is required",TEST_MESSAGE_IS_NUMBER:"Must be a number.",TEST_MESSAGE_MIN:"The value must be at least {arg}.",TEST_MESSAGE_MAX:"The value must be less than {arg}.",TEST_MESSAGE_RANGE:"The value must be {min} or greater, and less than {max}.",TEST_MESSAGE_MIN_COUNT:"Must be have at least {arg} values.",TEST_MESSAGE_MAX_COUNT:"Must be have at most {arg} values.",TEST_MESSAGE_COUNT:"Must have {arg} values.",TEST_MESSAGE_REGEX:"Must be in the correct format.",TEST_MESSAGE_MIN_LEN:"Must be at least {arg} characters.",TEST_MESSAGE_MAX_LEN:"Must be at most {arg} characters.",TEST_MESSAGE_IS_EMAIL:"Must be a valid email address.",TEST_MESSAGE_SAME_AS:"Must be the same as: {arg}",TEST_MESSAGE_AJAX:"server responded",TEST_MESSAGE_IS:"Must be {arg}",TEST_MESSAGE_IS_NOT:"Must not be {arg}"});g.forms={};g.forms.Form=function(k,j){this.formNode=g.dom.get(k);if(!this.formNode[0]){throw"Could not find form. Possibly run before DOM ready.";}this._fields=[];this._result=null;this.opts=j||{};g.events.addListener(this,"validate",this.opts.onValidate||a.defaultFeedback);this._idleTimer=null;this._localeModule=b.getLocaleModule("GLOW_FORMS");var h=this;g.events.addListener(this.formNode,"submit",function(){h.validate("submit");return false;});};g.forms.Form.prototype.validate=function(h,j){this.eventName=h||"submit";this._result=new g.forms.ValidateResult(this.eventName);this._result.form=this;this._fieldCur=0;this._testCur=-1;this._fieldName=j;c.call(this);};var c=function(){this._testCur++;if(this._testCur>=this._fields[this._fieldCur]._tests.length){if(!d.call(this)){return;}}var j=this._fields[this._fieldCur]._tests[this._testCur];var h;if(j.opts.field){h=this.formNode.val()[j.opts.field]||"";j.isConditional=true;}else{h=this.formNode.val()[this._fields[this._fieldCur].name]||"";}if(!h.join){h=[h];}var k=function(l){return function(){e.apply(l,arguments);};}(this);j.opts.on=j.opts.on||"submit";if(this._result.eventName&&(" "+j.opts.on+" ").indexOf(" "+this._result.eventName+" ")!=-1){if(this._fieldName&&this._fieldName!=j.name){c.call(this);return;}if(typeof g.forms.tests[j.type]!="function"){throw"Unimplemented test: no test exists of type '"+j.type+"'.";}j.opts._localeModule=this._localeModule;g.forms.tests[j.type](h,j.opts,k,this.formNode.val());}else{c.call(this);}};var d=function(){this._fieldCur++;this._testCur=0;if(this._fieldCur>=this._fields.length){this._fieldCur=0;g.events.fire(this,"validate",this._result);if(this.eventName=="submit"&&this._result&&!this._result.defaultPrevented()){try{this.formNode[0].submit();}catch(h){throw new Error("Glow can't submit the form because the submit function can't be called. Perhaps that form's submit was replaced by an input element named 'submit'?");}}return false;}return true;};var e=function(h,j){if(typeof h=="boolean"){h=(h)?g.forms.PASS:g.forms.FAIL;}if(this._fields[this._fieldCur]._tests[this._testCur].isConditional&&h===g.forms.FAIL){h=g.forms.SKIP;}this._result.fields.push({name:this._fields[this._fieldCur].name,result:h,message:j});if(h!==g.forms.PASS){if(h===g.forms.FAIL){this._result.errorCount++;}this._testCur=this._fields[this._fieldCur]._tests.length;}c.call(this);};g.forms.Form.prototype.addTests=function(r){var q={name:r,_tests:[]};var j=function(s){return function(){s.validate.apply(s,["change",r]);};}(this);var n=function(s){return function(){s.validate.apply(s,["click",r]);};}(this);var o=function(s){return function(){s.validate.apply(s,["idle",r]);};}(this);for(var l=1;l<arguments.length;l++){var k=arguments[l][0];var p=(arguments[l].length>1)?arguments[l][1]:{};q._tests.push({name:r,type:k,opts:p});if(!j.added&&(" "+p.on+" ").indexOf(" change ")!=-1){var m=this.formNode.get("*").each(function(s){if(this.name==r){g.events.addListener(this,"change",j);j.added=true;}});}if(!n.added&&(" "+p.on+" ").indexOf(" click ")!=-1){var m=this.formNode.get("*").each(function(s){if(this.name==r){g.events.addListener(this,"click",n);n.added=true;}});}if(!o.added&&(" "+p.on+" ").indexOf(" idle ")!=-1){var h=(typeof p.delay!="undefined")?parseInt(p.delay):1000;var m=this.formNode.get("*").each(function(s){if(this.name==r){g.events.addListener(this,"keyup",function(u){return function(){window.clearTimeout(this.idleTimeoutID);if(this.value){this.idleTimeoutID=window.setTimeout(o,u);}};}(h));g.events.addListener(this,"blur",function(){window.clearTimeout(this.idleTimeoutID);});o.added=true;}});}}this._fields.push(q);return this;};g.forms.ValidateResult=function(h){g.events.Event.apply(this);this.eventName=h;this.errorCount=0;this.value=undefined;this.fields=[];};g.lang.extend(g.forms.ValidateResult,g.events.Event);g.forms.PASS=1;g.forms.FAIL=0;g.forms.SKIP=-1;g.forms.tests={required:function(j,m,n){var l=m.message||m._localeModule.TEST_MESSAGE_REQUIRED;for(var k=0,h=j.length;k<h;k++){if(/^\s*$/.test(j[k])){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);},isNumber:function(j,m,n){var l=m.message||m._localeModule.TEST_MESSAGE_IS_NUMBER;for(var k=0,h=j.length;k<h;k++){if(j[k]==""||isNaN(j[k])){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);},min:function(j,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_MIN,{arg:m.arg});for(var k=0,h=j.length;k<h;k++){if(Number(j[k])<Number(m.arg)){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);},max:function(j,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_MAX,{arg:m.arg});for(var k=0,h=j.length;k<h;k++){if(Number(j[k])>Number(m.arg)){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);},range:function(k,o,p){var n=o.arg.split("..");if(typeof n[0]=="undefined"||typeof n[1]=="undefined"){throw"Range test requires a parameter like 0..10.";}var m=o.message||f(o._localeModule.TEST_MESSAGE_RANGE,{min:n[0],max:n[1]});n[0]*=1;n[1]*=1;if(n[0]>n[1]){var j=n[0];n[0]=n[1];n[1]=j;}for(var l=0,h=k.length;l<h;l++){if(k[l]<n[0]||k[l]>n[1]){p(g.forms.FAIL,m);return;}}p(g.forms.PASS,m);},minCount:function(h,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_MIN_COUNT,{arg:m.arg});var k=0;for(var j=0;j<h.length;j++){if(h[j]!=""){k++;}}if(k<m.arg){n(g.forms.FAIL,l);return;}n(g.forms.PASS,l);},maxCount:function(h,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_MAX_COUNT,{arg:m.arg});var k=0;for(var j=0;j<h.length;j++){if(h[j]!=""){k++;}}if(k>m.arg){n(g.forms.FAIL,l);return;}n(g.forms.PASS,l);},count:function(h,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_COUNT,{arg:m.arg});var k=0;for(var j=0;j<h.length;j++){if(h[j]!=""){k++;}}if(k!=m.arg){n(g.forms.FAIL,l);return;}n(g.forms.PASS,l);},regex:function(j,n,o){var m=n.message||n._localeModule.TEST_MESSAGE_REGEX;var l=(typeof n.arg=="string")?new RegExp(n.arg):n.arg;for(var k=0,h=j.length;k<h;k++){if(!l.test(j[k])){o(g.forms.FAIL,m);return;}}o(g.forms.PASS,m);},minLen:function(j,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_MIN_LEN,{arg:m.arg});for(var k=0,h=j.length;k<h;k++){if(j[k].length<m.arg){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);},maxLen:function(j,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_MAX_LEN,{arg:m.arg});for(var k=0,h=j.length;k<h;k++){if(j[k].length>m.arg){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);},isEmail:function(j,m,n){var l=m.message||m._localeModule.TEST_MESSAGE_IS_EMAIL;for(var k=0,h=j.length;k<h;k++){if(!/^\s*[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}\s*$/i.test(j[k])){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);},sameAs:function(j,n,p,o){var m=n.message||f(n._localeModule.TEST_MESSAGE_SAME_AS,{arg:n.arg});var k=o[n.arg];for(var l=0,h=j.length;l<h;l++){if(j[l]!=k){p(g.forms.FAIL,m);return;}}p(g.forms.PASS,m);},ajax:function(o,h,q,n){var m={},r=(h.message||h._localeModule.TEST_MESSAGE_AJAX);for(var k in n){if(typeof n[k]=="string"){m[k]=escape(n[k]);}else{if(typeof n[k].push!="undefined"){m[k]=g.lang.map(n[k],function(p){return escape(p);}).join(",");}}}var j=g.lang.interpolate(h.url,m);var l=g.net.get(j,{onLoad:function(p){var s=h.arg(p);if(typeof s.push=="undefined"){s=[s,r];}q(s[0],s[1]);},onError:function(p){alert("Error getting file: "+j);}});},custom:function(h,j,k){j.arg.apply(this,arguments);},is:function(j,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_IS,{arg:m.arg});for(var k=0,h=j.length;k<h;k++){if(j[k]!=m.arg){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);},isNot:function(j,m,n){var l=m.message||f(m._localeModule.TEST_MESSAGE_IS_NOT,{arg:m.arg});for(var k=0,h=j.length;k<h;k++){if(j[k]==m.arg){n(g.forms.FAIL,l);return;}}n(g.forms.PASS,l);}};var a=g.forms.feedback={};a.defaultFeedback=(function(){var h;function l(){if(!h){h=g.dom.create('<input type="hidden" value="0" name="1.7.3" id="1.7.3" />').appendTo(document.body);}h[0].value++;}function k(o){var n=o.fields,r,q,s,p,m;for(p=0,m=n.length;p<m;p++){r=g.dom.get(o.form.formNode[0].elements[n[p].name]);q=g.dom.get("."+n[p].name.replace(/(\W)/g,"\\$1")+"-msgContainer");if(!q[0]&&r.length==1){q=o.form.formNode.get("label").filter(function(){return this.htmlFor==r[0].id;});}s=q.get("span.glow-errorMsg");if(n[p].result){s.remove();r.removeClass("glow-invalid");}else{if(q.length){if(!s[0]){q.append((s=g.dom.create('<span class="glow-errorMsg"></span>')));}s.text(n[p].message);r.addClass("glow-invalid");}}}}function j(p){var s=p.fields,v,n,o,r,m,q,t;p.form.formNode.get("div.glow-errorSummary").remove();n=g.dom.create('<div class="glow-errorSummary" tabindex="-1"><ul></ul></div>');o=n.get("ul");for(q=0,t=s.length;q<t;q++){v=g.dom.get(p.form.formNode[0].elements[s[q].name]);r=g.dom.get("."+s[q].name.replace(/(\W)/g,"\\$1")+"-prompt");if(!r[0]&&v.length==1){r=p.form.formNode.get("label").filter(function(){return this.htmlFor==v[0].id;});}if(r[0]){r.get("span.glow-errorMsg").remove();m=g.lang.trim(r.text());if(m.slice(-1)==":"){m=m.slice(0,-1);}}else{m=s[q].name.replace(/^\w/,function(w){return w.toUpperCase();});}if(!s[q].result){o.append(g.dom.create("<li></li>").text(m+": "+s[q].message));}}p.form.formNode.prepend(n.css("opacity","0"));g.anim.css(n,"0.5",{opacity:{from:0,to:1}},{tween:g.tweens.easeOut()}).start();try{n[0].focus();}catch(u){}l();}return function(m){if(m.eventName=="submit"){if(!m.errorCount){m.form.formNode.get("div.glow-errorSummary").remove();return;}j(m);}setTimeout(function(){k(m);},0);return false;};}());}});(window.gloader||glow).module({name:"glow.embed",library:["glow","1.7.3"],depends:[["glow","1.7.3","glow.dom","glow.data","glow.i18n"]],builder:function(n){var o=n.i18n;o.addLocaleModule("GLOW_EMBED","en",{FLASH_MESSAGE:"This content requires Flash Player version {min} (installed version: {installed})",NO_PLAYER_MESSAGE:"No Flash Flayer installed, or version is pre 6.0.0"});function b(s){var r="";for(var t in s){if(t.toLowerCase()=="flashvars"&&typeof s[t]=="object"){r+=' FlashVars="'+n.data.encodeUrl(s[t])+'"';}else{r+=" "+t+'="'+s[t]+'"';}}return r;}function q(s){var u="",t,v;for(t in s){if(t.toLowerCase()=="flashvars"&&typeof s[t]=="object"){v=n.data.encodeUrl(s[t]);}else{v=s[t];}u+='<param name="'+t+'" value="'+v+'" />\n';}return u;}function h(s,r){s=s||{};for(var t in r){if(typeof s[t]=="undefined"){s[t]=r[t];}else{if(typeof r[t]=="object"){s[t]=h(s[t],r[t]);}}}return s;}function c(){var r=(navigator.platform||navigator.userAgent);return r.match(/win/i)?"win":r.match(/mac/i)?"mac":"other";}function l(r){var t=/^WIN (\d+),(\d+),(\d+),\d+$/;var s=r.GetVariable("$version");if($match=t.exec(s)){return{major:parseInt($match[1]),minor:parseInt($match[2]),release:parseInt($match[3]),actual:s};}else{}}function k(){var s,u,v={major:0,minor:0,release:0},r=v;if(n.env.ie){try{u=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");r=l(u);}catch(w){try{u=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");try{u.AllowScriptAccess="always";r=l(u);}catch(w){r={major:6,minor:0,release:29};}}catch(w){}}}else{var t=/^Shockwave Flash\s*(\d+)\.(\d+)\s*\w(\d+)$/;if((u=navigator.plugins["Shockwave Flash"])&&(s=t.exec(u.description))){r={major:parseInt(s[1]),minor:parseInt(s[2]),release:parseInt(s[3]),actual:u.description};}}r.toString=function(){return this.major?[this.major,this.minor,this.release].join("."):o.getLocaleModule("GLOW_EMBED").NO_PLAYER_MESSAGE;};return r;}var m=k();function f(t){if(typeof t!="object"){var s=String(t).match(/^(\d+)(?:\.(\d+)(?:\.(\d+))?)?$/);if(!s){throw new Error('glow.embed._meetsVersionRequirements: invalid format for version string, require "n.n.n" or "n.n" or simply "n" where n is a numeric value');}t={major:parseInt(s[1],10),minor:parseInt(s[2]||0,10),release:parseInt(s[3]||0,10)};}var r=m,u=t;return(r.major>u.major||(r.major==u.major&&r.minor>u.minor)||(r.major==u.major&&r.minor==u.minor&&r.release>=u.release));}var e=n.env.ie?j:g;function g(t,r,s){return'<embed type="application/x-shockwave-flash" src="'+t+'"'+b(r)+b(s)+"></embed>";}function j(t,r,s){return'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+b(r)+'><param name="movie" value="'+t+'" />'+q(s)+"</object>";}var a={},p=0;function d(){return n.UID+"FlashEmbed"+(p++);}a.Flash=function(x,r,w,v){v=h(v,{width:"100%",height:"100%",params:{allowscriptaccess:"always",allowfullscreen:"true",quality:"high"},attributes:{},message:n.lang.interpolate(o.getLocaleModule("GLOW_EMBED").FLASH_MESSAGE,{min:w,installed:m}),id:(v&&v.attributes&&v.attributes.id)||d()});r=n.dom.get(r);if(!r.length){throw new Error("glow.embed.Flash unable to locate container");}this.container=r;this.movie=null;this._displayErrorMessage=typeof v.message=="function"?v.message:function(){return v.message;};this.isSupported;if(this.isSupported=f(w)){var s=v.attributes,u=["id","width","height"],t=u.length;while(t--){if(v[u[t]]){s[u[t]]=v[u[t]];}}if(v.className){s["class"]=v.className;}this._embed_tag=e(x,s,v.params);}};a.Flash.version=function(){return m;};a.Flash.prototype.embed=function(){var s=this.container[0];if(this.isSupported){s.innerHTML=this._embed_tag;this.movie=s.firstChild;}else{var r=this._displayErrorMessage();if(r){s.innerHTML=r;}}return this;};n.embed=a;}});(window.gloader||glow).module({name:"glow.dragdrop",library:["glow","1.7.3"],depends:[["glow","1.7.3","glow.tweens","glow.events","glow.dom","glow.anim"]],builder:function(j){var c=j.events,k=c.addListener,v=c.fire,g=c.removeListener,q=j.dom,h=q.get,m=q.create;var n={},w=1000,a=(document.compatMode=="CSS1Compat"&&j.env.ie>=5)?true:false,x=(document.compatMode!="CSS1Compat"&&j.env.ie>=5)?true:false,d=j.env.ie>=5,s=["top","right","bottom","left"];function b(r,z){var A=r.prototype[z];var y="cached_"+z;r.prototype[z]=function(){if(y in this){return this[y];}return this[y]=A.apply(this,arguments);};}function u(A,z){var r=s.length,y;while(r--){y="margin-"+s[r];A.css(y,z.css(y));}}function f(r,y){var A=r.prototype[y];var z="cached_"+y;r.prototype[y]=function(B){if(!this[z]){this[z]={};}if(B in this[z]){return this[z][B];}return this[z][B]=A.apply(this,arguments);};}function t(A,z){for(var y=0,r=z.length;y<r;y++){delete A["cached_"+z[y]];}}var o=function(r){this.el=r;};o.prototype={val:function(r){var y=parseInt(this.el.css(r));return y||0;},width:function(){return this.borderWidth()-this.val("border-left-width")-this.val("border-right-width");},height:function(){return this.borderHeight()-this.val("border-top-width")-this.val("border-bottom-width");},offsetParentPageTop:function(){var r=this.el[0],z,y;while(r=r.offsetParent){if(h(r).css("position")!="static"){break;}}return r?h(r).offset().top:0;},offsetTop:function(){return this.el.position().top;},offsetLeft:function(){return this.el.position().left;},borderWidth:function(){var r=this.el[0].offsetWidth;if(j.env.khtml){r-=this.val("margin-left")+this.val("margin-right")+this.val("border-left-width")+this.val("border-right-width");}return r;},borderHeight:function(){if(this._logicalBottom){return this._logicalBottom-this.offsetTop();}var r=this.el[0].offsetHeight;if(j.env.khtml){r-=this.val("margin-top")+this.val("margin-bottom")+this.val("border-top-width")+this.val("border-bottom-width");}return r;},outerWidth:function(){return this.borderWidth()+this.val("margin-left")+this.val("margin-right");},outerHeight:function(){return this.borderHeight()+this.val("margin-top")+this.val("margin-bottom");},innerLeftPos:function(){return this.offsetLeft()+this.val("margin-left")+this.val("border-left-width")+this.val("padding-left");},innerTopPos:function(){return this.offsetTop()+this.val("margin-top")+this.val("border-top-width")+this.val("padding-top");},surroundWidth:function(){return this.val("border-left-width")+this.val("padding-left")+this.val("padding-right")+this.val("border-right-width");},surroundHeight:function(){return this.val("border-top-width")+this.val("padding-top")+this.val("padding-bottom")+this.val("border-bottom-width");},verticalCenter:function(){return this.offsetTop()+(this.outerHeight()/2);},horizontalCenter:function(){return this.offsetTop()+(this.outerWidth()/2);}};for(var p in o.prototype){if(p=="val"){f(o,p);}else{b(o,p);}}j.lang.apply(o.prototype,{resetPosition:function(){t(this,["offsetTop","offsetLeft","borderTopPos","borderLeftPos","innerTopPos","innerLeftPos","verticalCenter","horizontalCenter"]);},setLogicalBottom:function(r){this._logicalBottom=r;},boundsFor:function(z){var y,r,A=this.el.css("position");if(A!="static"){y=r=0;}else{y=this.innerTopPos();r=this.innerLeftPos();}return[y,r+this.width()-z.outerWidth(),y+this.height()-z.outerHeight(),r];},outerBounds:function(){var z=this.el.offset(),y=z.left,r=z.top;return[r,y+this.borderWidth(),r+this.borderHeight(),y];},intersectSize:function(z,A){var y=this.outerBounds(),r=z.outerBounds();if(A){y[1]++;r[1]++;y[2]++;r[2]++;}return(y[2]<r[0]?0:r[2]<y[0]?0:y[0]<r[0]?(y[2]<r[2]?y[2]-r[0]:r[2]-r[0]):r[2]<y[2]?r[2]-y[0]:y[2]-y[0])*(y[1]<r[3]?0:r[1]<y[3]?0:y[3]<r[3]?(y[1]<r[1]?y[1]-r[3]:r[1]-r[3]):r[1]<y[1]?r[1]-y[3]:y[1]-y[3]);},sizePlaceholder:function(C,D,A,y){var B=new o(C),z=this.el,r=D||z.css("position");C.css("display","none");z.after(C);C.css("width",(z[0].offsetWidth-B.surroundWidth())+"px").css("height",(z[0].offsetHeight-B.surroundHeight())+"px");u(C,z);C.remove();C.css("display","block");if(r!="static"){C.css("left",A+"px");C.css("top",y+"px");}C.css("position",r);},contains:function(z){var y=this.boundsFor(z),r=z.el.position(),B=r.top,A=r.left;return B>=y[0]&&A<=y[1]&&B<=y[2]&&A>=y[3];},containsPoint:function(y){var r=this.el.offset();return y.x>=r.left&&y.y>=r.top&&y.x<=r.left+this.borderWidth()&&y.y<=r.top+this.borderHeight();},positionedAncestorBox:function(){var r=this.el.parent(),y;while(r[0]){y=r.css("position")||"static";if(y=="relative"||y=="absolute"||y=="fixed"){return new o(r);}r=r.parent();}return null;}});function e(y){var r=y[0].tagName.toLowerCase()=="li"?"li":"div";var z=m("<"+r+"></"+r+">");if(r=="li"){z.css("list-style-type","none");}return z;}n.Draggable=function(A,B){this.element=h(A);this._opts=B=j.lang.apply({dragPrevention:["input","textarea","button","select","option","a"],placeholder:"spacer",placeholderClass:"glow-dragdrop-placeholder",step:{x:1,y:1}},B||{});if(typeof B.step=="number"){B.step={x:B.step,y:B.step};}else{B.step.x=B.step.x||1;B.step.y=B.step.y||1;}this._preventDrag=[];for(var y=0,r=B.dragPrevention.length;y<r;y++){this._preventDrag[y]=B.dragPrevention[y].toLowerCase();}if(B.container){this.container=h(B.container);}this._handle=B.handle&&this.element.get(B.handle)||this.element;if(B.dropTargets){this.dropTargets=h(B.dropTargets);}var z=this._listeners=[],y=0;if(B.onDrag){z[y++]=k(this,"drag",this._opts.onDrag,this);}if(B.onEnter){z[y++]=k(this,"enter",this._opts.onEnter,this);}if(B.onLeave){z[y++]=k(this,"leave",this._opts.onLeave,this);}if(B.onDrop){z[y++]=k(this,"drop",this._opts.onDrop,this);}if(B.onAfterDrop){z[y++]=k(this,"afterDrop",this._opts.onAfterDrop,this);}this._dragListener=k(this._handle,"mousedown",this._startDragMouse,this);return;};n.Draggable.prototype={_createPlaceholder:function(){var r=this.element,z,y=this._box;if(this._opts.placeholder=="clone"){z=r.clone();}else{z=e(r);}if(this._opts.placeholderClass){z.addClass(this._opts.placeholderClass);}y.sizePlaceholder(z,null,this._startLeft,this._startTop);r.after(z);this._placeholder=z;},_removePlaceholder:function(){this._placeholder.remove();},_resetPosition:function(){var G=this._preDragPosition,r=this.element,z=this._box,B=this._startOffset,D=r.css("position"),F,C;z.resetPosition();var A=z.el.position(),y={x:A.left,y:A.top};if(this._placeholder||this._dropIndicator){r.remove();}if(G=="static"&&y.y==B.y&&y.x==B.x){r.css("position","static");r.css("left","");r.css("top","");}else{r.css("z-index",this._preDragZIndex);r.css("position",G=="static"?"relative":G);if(G=="static"){F=y.x-B.x;C=y.y-B.y;}else{if(G=="relative"&&D!="relative"){F=this._startLeft+(y.x-B.x);C=this._startTop+(y.y-B.y);}}if(D!=G){r.css("left",F?F+"px":"");r.css("top",C?C+"px":"");}}if(this._dropIndicator){var E=this._dropIndicator.parent()[0];if(E){E.replaceChild(r[0],this._dropIndicator[0]);}delete this._dropIndicator;if(this._placeholder){this._placeholder.remove();delete this._placeholder;}r.css("position",G);if(G=="relative"&&D!="relative"){r.css("left",this._startLeft);r.css("top",this._startTop);}}else{if(this._placeholder){var E=this._placeholder.parent()[0];if(E){E.replaceChild(r[0],this._placeholder[0]);}delete this._placeholder;}}},_startDragMouse:function(I){var D=this._preventDrag,y=I.source,M=y.tagName.toLowerCase();for(var F=0,E=D.length;F<E;F++){if(D[F]==M){return;}}if(v(this,"drag").defaultPrevented()){return;}if(this._dragging==1){return this.endDrag();}else{if(this._dragging){return;}}this._dragging=1;var B=this.element,A=this.container,r=this._opts,H=this._box=new o(B),C=r.step;this._preDragPosition=B.css("position");var G=H.el.position(),J=this._startOffset={x:G.left,y:G.top};if(A){this._containerBox=new o(A);this._bounds=this._containerBox.boundsFor(H);if(C.x!=1){this._bounds[3]-=(this._bounds[3]-J.x)%C.x;this._bounds[1]-=(this._bounds[1]-J.x)%C.x;}if(C.y!=1){this._bounds[0]-=(this._bounds[0]-J.y)%C.y;this._bounds[2]-=(this._bounds[2]-J.y)%C.y;}}else{delete this._bounds;}this._mouseStart={x:I.pageX,y:I.pageY};this._preDragStyle=B.attr("style");this._preDragZIndex=B.css("z-index");B.css("z-index",w++);this._startLeft=B[0].style.left?parseInt(B[0].style.left):0;this._startTop=B[0].style.top?parseInt(B[0].style.top):0;if(r.placeholder&&r.placeholder!="none"){this._createPlaceholder();}B.css("position","absolute");B.css("left",J.x+"px");B.css("top",J.y+"px");if(a){this._scrollY=document.documentElement.scrollTop;this._innerHeight=document.documentElement.clientHeight;}else{if(x){this._scrollY=document.body.scrollTop;this._innerHeight=document.body.clientHeight;}else{this._scrollY=window.scrollY;this._innerHeight=window.innerHeight;}}var K=function(){return false;},L=document.documentElement;if(this.dropTargets){var z=new c.Event();z.draggable=this;for(var F=0,E=this.dropTargets.length;F<E;F++){v(this.dropTargets[F],"active",z);}this._mousePos={x:I.pageX,y:I.pageY};this._testForDropTargets();}this._dragListeners=[k(L,"selectstart",K),k(L,"dragstart",K),k(L,"mousedown",K),k(L,"mousemove",this._dragMouse,this),k(L,"mouseup",this._releaseElement,this)];return false;},_dragMouse:function(C){var r=this.element,y=this._opts.axis,D=y=="y"?this._startOffset.x:(this._startOffset.x+C.pageX-this._mouseStart.x),B=y=="x"?this._startOffset.y:(this._startOffset.y+C.pageY-this._mouseStart.y),A=this._bounds,z=this._opts.step;if(z.x!=1){D=Math.round((D-this._startOffset.x)/z.x)*z.x+this._startOffset.x;}if(z.y!=1){B=Math.round((B-this._startOffset.y)/z.y)*z.y+this._startOffset.y;}if(A){if(y!="y"){D=D<A[3]?A[3]:D>A[1]?A[1]:D;}if(y!="x"){B=B<A[0]?A[0]:B>A[2]?A[2]:B;}}r[0].style.left=D+"px";r[0].style.top=B+"px";if(this.dropTargets){this._mousePos={x:C.pageX,y:C.pageY};}if(d&&C.nativeEvent.button==0){this._releaseElement(C);return false;}return false;},_testForDropTargets:function(H){if(!this._lock){this._lock=0;}if(H){this._lock--;}else{if(this.lock){return;}}if(this._dragging!=1){return;}var z=this.activeTarget,y,R=this.dropTargets,S,C,F=this._box,K=this._mousePos;F.resetPosition();var D=0;for(var L=0,J=R.length;L<J;L++){S=R[L];C=S._box;if(S._opts.tolerance=="contained"){if(C.contains(F)){y=S;break;}}else{if(S._opts.tolerance=="cursor"){if(C.containsPoint(K)){y=S;break;}}else{var M=C.intersectSize(F,true);if(M>D){D=M;y=S;}}}}this.activeTarget=y;if(y!==z){if(y){var I=new c.Event();I.draggable=this;v(y,"enter",I);var r=new c.Event();r.dropTarget=y;v(this,"enter",r);}if(z){var E=new c.Event();E.draggable=this;v(z,"leave",E);var G=new c.Event();G.dropTarget=z;v(this,"leave",G);}}if(y&&y._opts.dropIndicator!="none"){var P,N=y._childBoxes,A=y._children;F.resetPosition();var Q=y._box.innerTopPos();var T=K.y-F.offsetParentPageTop();var O=0;for(var L=0,J=N.length;L<J;L++){if(A[L]==this.element[0]){continue;}P=N[L];Q+=P.outerHeight();if(T<=Q){if(y._dropIndicatorAt!=L){h(P.el).before(y._dropIndicator);y._dropIndicatorAt=L;}O=1;break;}}if(!O){if(P){h(P.el).after(y._dropIndicator);y._dropIndicatorAt=L+1;}else{y.element.append(y._dropIndicator);y._dropIndicatorAt=0;}}}this._lock++;var B=this;setTimeout(function(){B._testForDropTargets(1);},100);},_releaseElement:function(){if(this._dragging!=1){return;}this._dragging=2;var z,r;var D=this.dropTargets,C=this.activeTarget;if(D){for(z=0,r=D.length;z<r;z++){var B=new c.Event();B.draggable=this;B.droppedOnThis=C&&C==D[z];v(D[z],"inactive",B);}}if(C){var B=new c.Event();B.draggable=this;v(C,"drop",B);}var y=this._dragListeners;for(z=0,r=y.length;z<r;z++){c.removeListener(y[z]);}var A=v(this,"drop");if(!A.defaultPrevented()&&this.dropTargets){this.returnHome();}else{this.endDrag();}},endDrag:function(){if(this._dragging!=2){return;}this._dragging=0;if(this._reset){this._reset();delete this._reset;}if(this.placeholder){this.placeholder.remove();}this._resetPosition();delete this.activeTarget;v(this,"afterDrop");},returnHome:function(G){var z=(G)?G:j.tweens.linear(),C,r,A=this.element,E=this._box.el.position(),y=Math.pow(Math.pow(this._startOffset.x-E.left,2)+Math.pow(this._startOffset.y-E.top,2),0.5),B=0.3+(y/1000);var D=[[j.anim.css(A,B,{left:this._startOffset.x,top:this._startOffset.y},{tween:z})]];if(this._dropIndicator){D.push([j.anim.css(this._dropIndicator,B-0.1,{opacity:{to:0}})]);}var F=new j.anim.Timeline(D);k(F,"complete",function(){this.endDrag();},this);F.start();return;}};var l=0;n.DropTarget=function(r,y){r=this.element=h(r);if(!r.length){throw"no element passed into DropTarget constuctor";}if(r.length>1){throw"more than one element passed into DropTarget constructor";}this._id=++l;this._opts=y=j.lang.apply({dropIndicator:"none",dropIndicatorClass:"glow-dragdrop-dropindicator",tolerance:"intersect"},y||{});if(y.onActive){k(this,"active",y.onActive);}if(y.onInactive){k(this,"inactive",y.onInactive);}if(y.onEnter){k(this,"enter",y.onEnter);}if(y.onLeave){k(this,"leave",y.onLeave);}if(y.onDrop){k(this,"drop",y.onDrop);}k(this,"active",this._onActive);k(this,"inactive",this._onInactive);return this;};n.DropTarget.prototype={setLogicalBottom:function(r){this._logicalBottom=r;},_onActive:function(A){var y=A.draggable;this._box=new o(this.element);if(this._logicalBottom){this._box.setLogicalBottom(this._logicalBottom);}if(this._opts.dropIndicator=="none"){return;}this._onEnterListener=k(this,"enter",this._onEnter);this._onLeaveListener=k(this,"leave",this._onLeave);this._dropIndicator=e(y.element);if(this._opts.dropIndicatorClass){this._dropIndicator.addClass(this._opts.dropIndicatorClass);}y._box.sizePlaceholder(this._dropIndicator,"relative",0,0);var z=this._children=h(this.element.children()).filter(function(){var B=h(this);return(!A.draggable._placeholder||!B.eq(A.draggable._placeholder))&&(!this._dropIndicator||!B.eq(this._dropIndicator));});var r=this._childBoxes=[];z.each(function(B){r[B]=new o(h(z[B]));});},_onInactive:function(r){g(this._onEnterListener);g(this._onLeaveListener);delete this._box;if(this._opts.dropIndicator=="none"){return;}if(!r.droppedOnThis&&this._dropIndicator){this._dropIndicator.remove();delete this._dropIndicator;}delete this._childBoxes;delete this._children;},_onEnter:function(){this._dropIndicatorAt=-1;},_onLeave:function(){this._dropIndicator.remove();},moveToPosition:function(y){var C=this._dropIndicator,z=new o(C);var B=parseInt(C.css("margin-left"))||0,A=parseInt(C.css("margin-top"))||0,r=z.el.position();y._startOffset={x:r.left,y:r.top};y._dropIndicator=C;delete this._dropIndicator;}};j.dragdrop=n;}});
+/*@end @*/
diff --git a/ricoClient/js/baselibs/glow.core.debug.js b/ricoClient/js/baselibs/glow.core.debug.js
deleted file mode 100644 (file)
index 8874467..0000000
+++ /dev/null
@@ -1,12705 +0,0 @@
-/*     
-       Copyright 2009 British Broadcasting Corporation
-
-       Licensed under the Apache License, Version 2.0 (the "License");
-       you may not use this file except in compliance with the License.
-       You may obtain a copy of the License at
-
-          http://www.apache.org/licenses/LICENSE-2.0
-
-       Unless required by applicable law or agreed to in writing, software
-       distributed under the License is distributed on an "AS IS" BASIS,
-       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-       See the License for the specific language governing permissions and
-       limitations under the License.
-*/
-/**
-@name glow
-@namespace
-@version 1.7.0 (2008-09-22)
-@description The glow namespace and core library.
-
-    Includes common methods for running scripts onDomReady and user agent sniffing.
-*/
-(function() {
-       /*
-       PrivateVar: moduleRegister
-               Holds info on which modules are registered {name:true}
-       */
-       var moduleRegister = {glow: true},
-               /*
-               PrivateVar: regexEscape
-                       For escaping strings to go in regex
-               */
-               regexEscape = /([$^\\\/()|?+*\[\]{}.-])/g,
-               /*
-               PrivateVar: ua
-                       A lowercase representation of the user's useragent string
-               */
-               ua = navigator.userAgent.toLowerCase(),
-               //glow version
-               version = "1.7.0",
-               // number of blockers blocking (when it's zero, we're ready)
-               blockersActive = 0,
-               /*
-               PrivateMethod: domReadyQueue
-                       array of functions to call when dom is ready
-               */
-               domReadyQueue = [],
-               domReadyQueueLen = 0,
-               /*
-               PrivateMethod: readyQueue
-                       array of functions to call when all ready blockers are unblocked
-               */
-               //we want to set isReady to true when this is first run
-               readyQueue = [],
-               readyQueueLen = 0,
-               // stops two instances of 'runReadyQueue' fighting on the call stack
-               processingReadyQueue = false,
-               glow = {
-                       /**
-                       @name glow.VERSION
-                       @description Version of glow
-                               This is in the format 1.2.3
-
-                       @type String
-
-                       @see <a href="/glow/docs/previous_versions.shtml#versionScheme">Glow's versioning scheme</a>
-                       */
-                       VERSION: version,
-
-                       /**
-                       @name glow.UID
-                       @description A unique ID for this instance of Glow
-
-                               This will be used in glow-specific property names
-                               that need to be unique to this instance of glow.
-
-                       @type String
-                       */
-                       UID: "glow" + Math.floor(Math.random() * (1<<30)),
-
-                       /**
-                       @name glow.isDomReady
-                       @description Is the DOM ready?
-
-                               If glow is loaded after the page has loaded (by means other than Gloader)
-                               this value should be set manually.
-
-                       @type Boolean
-                       */
-                       //check gloader to see if dom is already ready
-                       isDomReady: window.gloader && gloader.isReady,
-                       
-                       /**
-                       @name glow.isReady
-                       @description Is Glow ready?
-
-                               Set to true when Glow is ready. This includes DOM ready,
-                               a supported browser and any additional requirements. For example
-                               Glow widgets will add the loading of their CSS file as a requirement.
-
-                       @type Boolean
-                       */
-                       //check gloader to see if dom is already ready
-                       isReady: window.gloader && gloader.isReady,
-
-                       /**
-                       @name glow.env
-                       @description Information about the browser / platform
-                       @type Object
-
-                       @example
-                               if (glow.env.ie < 7) {
-                                       //this only runs in IE 6 and below
-                               }
-                               if (glow.env.gecko < 1.9) {
-                                       //this only runs in Gecko versions less than 1.9
-                                       //Wikipedia can be used to link engine versions to browser versions
-                               }
-                       */
-                       /**
-                       @name glow.env.gecko
-                       @description Gecko version number to one decimal place (eg 1.9) or NaN
-                       @type Number
-                       */
-                       /**
-                       @name glow.env.ie
-                       @description IE version number or NaN
-                       @type Number
-                       */
-                       /**
-                       @name glow.env.opera
-                       @description Opera version (eg 8.02) or NaN
-                       @type Number
-                       */
-                       /**
-                       @name glow.env.webkit
-                       @description Webkit version number to one decimal place (eg 419.3) or NaN
-                       @type Number
-                       */
-                       /**
-                       @name glow.env.khtml
-                       @description KHTML version number to one decimal place or NaN
-                       @type Number
-                       */
-                       /**
-                       @name glow.env.standardsMode
-                       @description True if the browser reports itself to be in 'standards mode'
-                       @type Boolean
-                       */
-                       /**
-                       @name glow.env.version
-                       @description Browser version as a string. Includes non-numerical data, eg "1.8.1" or "7b"
-                       @type String
-                       */
-                       env: function(){
-                               var nanArray = [0, NaN],
-                                       opera = (/opera[\s\/]([\w\.]+)/.exec(ua) || nanArray)[1],
-                                       ie = opera ? NaN : (/msie ([\w\.]+)/.exec(ua) || nanArray)[1],
-                                       gecko = (/rv:([\w\.]+).*gecko\//.exec(ua) || nanArray)[1],
-                                       webkit = (/applewebkit\/([\w\.]+)/.exec(ua) || nanArray)[1],
-                                       khtml = (/khtml\/([\w\.]+)/.exec(ua) || nanArray)[1],
-                                       toNum = parseFloat;
-
-                               return {
-                                       gecko   : toNum(gecko),
-                                       ie      : toNum(ie),
-                                       opera   : toNum(opera),
-                                       webkit  : toNum(webkit),
-                                       khtml   : toNum(khtml),
-                                       version : ie || gecko || webkit || opera || khtml,
-                                       standardsMode : document.compatMode != "BackCompat" && (!ie || ie >= 6)
-                               }
-                       }(),
-
-                       /**
-                       @name glow.module
-                       @private
-                       @function
-                       @description Registers a new module with the library, checking version numbers &amp; dependencies.
-
-                       @param {Object} meta
-                               Object containing all of the following. This object is
-                               compatible with gloader.module, hence some properties which seem
-                               unnecessary here. This is all simplified by glow's module pattern.
-
-                       @param {String} meta.name Name of the module.
-                               Eg. "glow.dom" or "glow.widgets.Panel"
-
-                       @param {String[]} meta.library Information about Glow.
-                               This must be ["glow", "1.7.0"]. 1.7.0 should be
-                               the version number of glow expected.
-
-                       @param {String[]} meta.depends The module's dependencies.
-                               This must start ["glow", "1.7.0"], followed by modules
-                               such as "glow.dom". 1.7.0 should be the version number
-                               of glow expected.
-
-                       @param {Function} meta.builder The module's implementation.
-                               A reference to glow will be passed in as the first parameter
-                               to this function. Add to that object to create publicly
-                               accessabile properties. Anything else in this function
-                               will be private.
-
-                       @returns {Object} Glow
-
-                       @example
-                               glow.module({
-                                       name: "glow.anim",
-                                       library: ["glow", "1.0.0"],
-                                       depends: ["glow", "1.0.0", "glow.dom"],
-                                       builder: function(glow) {
-                                               glow.anim = {
-                                                       //...
-                                               };
-                                       }
-                               });
-                       */
-                       module: function(meta) {
-                               var i = 2,
-                                       depends = meta.depends[0] || [],
-                                       dependsLen = depends.length,
-                                       name = meta.name,
-                                       objRef = window.glow; //holds the parent object for the new module
-
-                               //check version number match core version
-                               if (meta.library[1] != glow.VERSION) {
-                                       throw new Error("Cannot register " + name + ": Version mismatch");
-                               }
-
-                               //check dependencies loaded
-                               if (depends[2]) {
-                                       for (; i < dependsLen; i++) {
-                                               //check exists
-                                               if (!moduleRegister[depends[i]]) {
-                                                       //check again ondomready to detect if modules are being included in wrong order
-                                                       throw new Error("Module " + depends[i] + " required before " + name);
-                                               }
-                                       }
-                               }
-
-                               //create module
-                               meta.builder(glow);
-                               //register it as built
-                               moduleRegister[name] = true;
-                               return glow;
-                       },
-
-                       /**
-                       @name glow.ready
-                       @function
-                       @description Calls a function when the DOM had loaded and the browser is supported
-                       
-                               "ready" also waits for glow's CSS file to load if it has been
-                               requested.
-
-                       @param {Function} callback Function to call
-
-                       @returns {glow}
-
-                       @example
-                               glow.ready(function() {
-                                       alert("DOM Ready!");
-                               });
-                       */
-                       ready: function(f) {
-                               //just run function if already ready
-                               if (this.isReady) {
-                                       f();
-                               } else {
-                                       readyQueue[readyQueueLen++] = f;
-                               }
-                               return this;
-                       },
-                       
-                       /**
-                       @name glow._readyBlockers
-                       @private
-                       @object
-                       @description A hash (by name) of blockers.
-                               True if they are blocking, false if they've since unblocked
-                       */
-                       _readyBlockers: {},
-                       
-                       /**
-                       @name glow._addReadyBlock
-                       @private
-                       @function
-                       @description Adds a blocker to anything added via glow.ready.
-                               Uncalled callbacks added via glow.ready will not fire until
-                               this block is removed
-
-                       @param {String} name Name of blocker
-
-                       @returns {glow}
-
-                       @example
-                               glow._addReadyBlock("widgetsCss");
-                               
-                               // when CSS is ready...
-                               glow._removeReadyBlock("widgetsCss");
-                       */
-                       _addReadyBlock: function(name) {
-                               if (name in glow._readyBlockers) {
-                                       throw new Error("Blocker '" + name +"' already exists");
-                               }
-                               glow._readyBlockers[name] = true;
-                               glow.isReady = false;
-                               blockersActive++;
-                               return glow;
-                       },
-                       
-                       /**
-                       @name glow._removeReadyBlock
-                       @private
-                       @function
-                       @description Removes a ready blocker added via glow._addReadyBlock
-
-                       @param {String} name Name of blocker
-
-                       @returns {glow}
-
-                       @example
-                               glow._addReadyBlock("widgetsCss");
-                               
-                               // when CSS is ready...
-                               glow._removeReadyBlock("widgetsCss");
-                       */
-                       _removeReadyBlock: function(name) {
-                               if (glow._readyBlockers[name]) {
-                                       glow._readyBlockers[name] = false;
-                                       blockersActive--;
-                                       // if we're out of blockers
-                                       if (!blockersActive) {
-                                               // call our queue
-                                               glow.isReady = true;
-                                               runReadyQueue();
-                                       }
-                               }
-                               return glow;
-                       },
-
-                       /**
-                       @name glow.onDomReady
-                       @function
-                       @description Calls a function when / if the DOM is ready.
-
-                               This function does not wait for glow's CSS to load, nor
-                               does it block unsupported browsers. If you want these features,
-                               use {@link glow.ready}
-
-                       @param {Function} callback Function to call
-
-                       @returns {glow}
-
-                       @exmaple
-                               glow.onDomReady(function() {
-                                       alert("DOM Ready!");
-                               });
-                       */
-                       onDomReady: function(f) {
-                               //just run function if already ready
-                               if (this.isDomReady) {
-                                       f();
-                               } else {
-                                       domReadyQueue[domReadyQueueLen++] = f;
-                               }
-                       },
-
-                       /**
-                       @name glow.lang
-                       @namespace
-                       @description Useful language functions.
-                       @see <a href="../furtherinfo/glow/glow.lang.shtml">Using glow.lang.clone</a>
-                       */
-                       lang: {
-                               /**
-                               @name glow.lang.trim
-                               @function
-                               @description Removes leading and trailing whitespace from a string
-
-                               @param {String} str String to trim
-
-                               @returns {String}
-
-                                       String without leading and trailing whitespace
-
-                               @example
-                                       glow.lang.trim("  Hello World  "); // "Hello World"
-                               */
-                               trim: function(sStr) {
-                                       //this optimisation from http://blog.stevenlevithan.com/archives/faster-trim-javascript
-                                       return sStr.replace(/^\s*((?:[\S\s]*\S)?)\s*$/, '$1');
-                               },
-
-                               /**
-                               @name glow.lang.toArray
-                               @function
-                               @description Converts an array-like object to a real array
-
-                               @param {Object} arrayLike Any array-like object
-
-                               @returns {Array}
-
-                               @example
-                                       var a = glow.lang.toArray(glow.dom.get("a"));
-                               */
-                               toArray: function(aArrayLike) {
-                                       if (aArrayLike.constructor == Array) {
-                                               return aArrayLike;
-                                       }
-                                       //use array.slice if not IE? Could be faster
-                                       var r = [], i=0, len = aArrayLike.length;
-                                       for (; i < len; i++) {
-                                               r[i] = aArrayLike[i];
-                                       }
-                                       return r;
-                               },
-
-                               /**
-                               @name glow.lang.apply
-                               @function
-                               @description Copies properties from one object to another
-
-                               @param {Object} destination Destination object
-
-                               @param {Object} source Properties of this object will be copied onto the destination
-
-                               @returns {Object}
-
-                               @example
-                                       var obj = glow.lang.apply({foo: "hello", bar: "world"}, {bar: "everyone"});
-                                       //results in {foo: "hello", bar: "everyone"}
-                               */
-                               apply: function(destination, source) {
-                                       for (var i in source) {
-                                               destination[i] = source[i];
-                                       }
-                                       return destination;
-                               },
-
-                               /**
-                               @name glow.lang.map
-                               @function
-                               @description Runs a function for each element of an array and returns an array of the results
-
-                               @param {Array} array Array to loop over
-                               @param {Function} callback The function to run on each element. This function is passed three params, the array item, its index and the source array.
-                               @param {Object} [context] The context for the callback function (the array is used if not specified)
-
-                               @returns {Array}
-
-                                       Array containing one element for each value returned from the callback
-
-                               @example
-                                       var weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]
-                                       var weekdaysAbbr = glow.lang.map(weekdays, function (day) {
-                                               return day.slice(0, 3).toLowerCase();
-                                       });
-                                       // returns ["mon", "tue", "wed", "thu", "fri"]
-                               */
-                               map: function (arr, callback, context) {
-                                       if (Array.prototype.map) { return Array.prototype.map.call(arr, callback, context || arr); }
-                                       if (! callback.call) { throw new TypeError(); }
-
-                                       var len = arr.length,
-                                               res = [],
-                                               thisp = context || arr,
-                                               i = 0;
-
-                                       for (; i < len; i++) {
-                                               if (i in arr) {
-                                                       res[i] = callback.call(thisp, arr[i], i, arr);
-                                               }
-                                       }
-                                       return res;
-                               },
-
-                               /**
-                               @name glow.lang.replace
-                               @function
-                               @description Makes a replacement in a string.
-
-                                       Has the same interface as the builtin
-                                       String.prototype.replace method, but takes the input
-                                       string as the first parameter. In general the native string
-                                       method should be used unless you need to pass a function as the
-                                       second parameter, as this method will work accross our
-                                       supported browsers.
-
-                               @param {String} str Input string
-
-                               @param {String | RegExp} pattern String or regular expression to match against
-
-                               @param {String | Function} replacement String to make replacements with, or a function to generate the replacements
-
-                               @returns {String}
-                                       A new string with the replacement(s) made
-
-                               @example
-                                       var myDays = '1 3 6';
-                                       var dayNames = glow.lang.replace(myDays, /(\d)/, function (day) {
-                                               return " MTWTFSS".charAt(day - 1);
-                                       });
-                                       // dayNames now contains "M W S"
-                               */
-                               replace: (function () {
-                                       var replaceBroken = "g".replace(/g/, function () { return 'l'; }) != 'l',
-                                               def = String.prototype.replace;
-                                       return function (inputString, re, replaceWith) {
-                                               var pos, match, last, buf;
-                                               if (! replaceBroken || typeof(replaceWith) != 'function') {
-                                                       return def.call(inputString, re, replaceWith);
-                                               }
-                                               if (! (re instanceof RegExp)) {
-                                                       pos = inputString.indexOf(re);
-                                                       return pos == -1 ?
-                                                               inputString :
-                                                               def.call(inputString, re, replaceWith.call(null, re, pos, inputString));
-                                               }
-                                               buf = [];
-                                               last = re.lastIndex = 0;
-                                               while ((match = re.exec(inputString)) != null) {
-                                                       pos = match.index;
-                                                       buf[buf.length] = inputString.slice(last, pos);
-                                                       buf[buf.length] = replaceWith.apply(null, match);
-                                                       if (re.global) {
-                                                               last = re.lastIndex;
-                                                       } else {
-                                                               last = pos + match[0].length;
-                                                               break;
-                                                       }
-                                               }
-                                               buf[buf.length] = inputString.slice(last);
-                                               return buf.join("");
-                                       };
-                               })(),
-
-                               /**
-                               @name glow.lang.interpolate
-                               @function
-                               @description Replaces placeholders in a string with data from an object
-
-                               @param {String} template The string containing {placeholders}
-                               @param {Object} data Object containing the data to be merged in to the template
-                                       <p>The object can contain nested data objects and arrays, with nested object properties and array elements are accessed using dot notation. eg foo.bar or foo.0.</p>
-                                       <p>The data labels in the object cannot contain characters used in the template delimiters, so if the data must be allowed to contain the default { and } delimiters, the delimters must be changed using the option below.</p>
-                               @param {Object} opts Options object
-                                       @param {String} [opts.delimiter="{}"] Alternative label delimiter(s) for the template
-                                               The first character supplied will be the opening delimiter, and the second the closing. If only one character is supplied, it will be used for both ends.
-                                       @param {Boolean} [opts.escapeHtml=false] Escape any special html characters found in the data object
-                                               Use this to safely inject data from the user into an HTML template. The glow.dom module
-                                               must be present for this feature to work (an error will be thrown otherwise).
-
-                               @returns {String}
-
-                               @example
-                                       var data = {
-                                               name: "Domino",
-                                               colours: ["black", "white"],
-                                               family: {
-                                                       mum: "Spot",
-                                                       dad: "Patch",
-                                                       siblings: []
-                                               }
-                                       };
-                                       var template = "My cat's name is {name}. His colours are {colours.0} & {colours.1}. His mum is {family.mum}, his dad is {family.dad} and he has {family.siblings.length} brothers or sisters.";
-                                       var result = glow.lang.interpolate(template, data);
-                                       // result == "My cat's name is Domino. His colours are black & white. His mum is Spot, his dad is Patch and he has 0 brothers or sisters."
-                               
-                               @example
-                                       var data = {
-                                               name: 'Haxors!!1 <script src="hackhackhack.js"></script>'
-                                       }
-                                       var template = '<p>Hello, my name is {name}</p>';
-                                       var result = glow.lang.interpolate(template, data, {
-                                               escapeHtml: true
-                                       });
-                                       // result == '<p>Hello, my name is Haxors!!1 &lt;script src="hackhackhack.js"&gt;&lt;/script&gt;</p>'
-                               */
-                               interpolate : function (template, data, opts) {
-                                       var placeHolderRx,
-                                               leftDelimiter,
-                                               rightDelimiter,
-                                               // div used for html escaping
-                                               div;
-
-                                       opts = opts || {};
-                                       
-                                       // make sure the dom module is around
-                                       if (opts.escapeHtml) {
-                                               if (!glow.dom) { throw new Error('glow.lang.interpolate - glow.dom is needed for escapeHtml'); }
-                                               div = glow.dom.create('<div></div>');
-                                       }
-
-                                       if (opts.delimiter == undefined) {
-                                               placeHolderRx = /\{[^{}]+\}/g;
-                                       } else {
-                                               leftDelimiter = opts.delimiter.substr(0, 1).replace(regexEscape, "\\$1");
-                                               rightDelimiter = opts.delimiter.substr(1, 1).replace(regexEscape, "\\$1") || leftDelimiter;
-                                               placeHolderRx = new RegExp(leftDelimiter + "[^" + leftDelimiter + rightDelimiter + "]+" + rightDelimiter, "g");
-                                       }
-
-                                       return template.replace(placeHolderRx, function (placeholder) {
-
-                                               var key = placeholder.slice(1, -1),
-                                                       keyParts = key.split("."),
-                                                       val,
-                                                       i = 0,
-                                                       len = keyParts.length;
-                                               
-                                               if (key in data) {
-                                                       // need to be backwards compatible with "flattened" data.
-                                                       val = data[key]; 
-                                               } else {
-                                                       // look up the chain
-                                                       val = data;
-                                                       for (; i < len; i++) {
-                                                               if (keyParts[i] in val) {
-                                                                       val = val[ keyParts[i] ];
-                                                               } else {
-                                                                       return placeholder;
-                                                               }
-                                                       }
-                                               }
-                                               
-                                               if (opts.escapeHtml) {
-                                                       val = div.text(val).html();
-                                               }
-                                               return val;
-                                       });
-                               },
-                               /**
-                               @name glow.lang.hasOwnProperty
-                               @function
-                               @description Cross-browser implementation
-                               @deprecated
-
-                                 Safari 1.3 doesn't support
-                                 <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object:hasOwnProperty">
-                                   Object.hasOwnProperty
-                                 </a>, use this method instead.
-
-                               @param {Object} obj The object to check
-
-                               @param {String} property Property name
-
-                               @returns {Boolean}
-
-                                       Returns false if a property doesn't exist in an object, or it
-                                       was inherited from the object's prototype. Otherwise, returns
-                                       true
-                               */
-                               hasOwnProperty: {}.hasOwnProperty ? //not supported in Safari 1.3
-                                       function(obj, prop) {
-                                               return obj.hasOwnProperty(prop);
-                                       } :
-                                       function(obj, prop) {
-                                               var propVal = obj[prop], //value of the property
-                                                       objProto = obj.__proto__, //prototype of obj
-                                                       protoVal = objProto ? objProto[prop] : {}; //prototype val
-                                               if (propVal !== protoVal) {
-                                                       return true;
-                                               }
-                                               //try changing prototype and see if obj reacts
-                                               var restoreProtoVal = glow.lang.hasOwnProperty(objProto, prop),
-                                                       tempObjProtoVal = objProto[prop] = {},
-                                                       hasOwn = (obj[prop] !== tempObjProtoVal);
-
-                                               delete objProto[prop];
-                                               if (restoreProtoVal) {
-                                                       objProto[name] = tempObjProtoVal;
-                                               }
-                                               return hasOwn;
-                                       },
-
-                               /**
-                               @name glow.lang.extend
-                               @function
-                               @description Copies the prototype of one object to another.
-
-                                       The 'subclass' can also access the 'base class' via subclass.base
-
-                               @param {Function} sub Class which inherits properties.
-
-                               @param {Function} base Class to inherit from.
-
-                               @param {Object} additionalProperties An object of properties and methods to add to the subclass.
-
-                               @example
-                                       function MyClass(arg) {
-                                               this.prop = arg;
-                                       }
-                                       MyClass.prototype = {
-                                               showProp: function() { alert(this.prop); }
-                                       };
-                                       function MyOtherClass(arg) {
-                                               //call the base class's constructor
-                                               arguments.callee.base.apply(this, arguments);
-                                       }
-                                       glow.lang.extend(MyOtherClass, MyClass, {
-                                               setProp: function(newProp) { this.prop = newProp; }
-                                       });
-
-                                       var test = new MyOtherClass("hello");
-                                       test.showProp(); // alerts "hello"
-                                       test.setProp("world");
-                                       test.showProp(); // alerts "world"
-                                *
-                                */
-                               extend: function(sub, base, additionalProperties) {
-                                       var f = function () {}, p;
-                                       f.prototype = base.prototype;
-                                       p = new f();
-                                       sub.prototype = p;
-                                       p.constructor = sub;
-                                       sub.base = base;
-                                       if (additionalProperties) {
-                                               glow.lang.apply(sub.prototype, additionalProperties);
-                                       }
-                               },
-
-                               /**
-                               @name glow.lang.clone
-                               @function
-                               @description Deep clones an object / array
-
-                               @param {Object} Data Object to clone
-
-                               @returns {Object}
-
-                               @example
-                                       var firstObj = { name: "Bob", secondNames: ["is","your","uncle"] };
-                                       var clonedObj = glow.lang.clone( firstObj );
-                               */
-                               clone: function( obj ) {
-                                       var index, _index, tmp;
-                                       obj = obj.valueOf();
-                                       if ( typeof obj !== 'object' ) {
-                                               return obj;
-                                       } else {
-                                               if ( obj[0] || obj.concat ) {
-                                                       tmp = [ ];
-                                                       index = obj.length;
-                                                       while(index--) {
-                                                               tmp[index] = arguments.callee( obj[index] );
-                                                       }
-                                       } else {
-                                                       tmp = { };
-                                                       for ( index in obj ) {
-                                                               tmp[index] = arguments.callee( obj[index] );
-                                                       }
-                                               }
-                                       return tmp;
-                                       }
-
-                               }
-                       }
-               },
-               env = glow.env,
-               d = document;
-       
-       //dom ready stuff
-       //run queued ready functions when DOM is ready
-       
-       function runDomReadyQueue() {
-               glow.isDomReady = true;
-               // run all functions in the array
-               for (var i = 0; i < domReadyQueueLen; i++) {
-                       domReadyQueue[i]();
-               }
-       }
-       
-       function runReadyQueue() {
-               // if we're already processing the queue, just exit, the other instance will take care of it
-               if (processingReadyQueue) return;
-               processingReadyQueue = true;
-               for (var i = 0; i < readyQueueLen;) {
-                       readyQueue[i]();
-                       i++;
-                       // check if the previous function has created a blocker
-                       if (blockersActive) {
-                               break;
-                       }
-               }
-               // take items off the ready queue that have processed
-               readyQueue = readyQueue.slice(i);
-               // update len
-               readyQueueLen = readyQueueLen - i;
-               processingReadyQueue = false;
-       }
-       
-       (function(){
-               //don't do this stuff if the dom is already ready
-               if (glow.isDomReady) { return; }
-               
-               glow._addReadyBlock("glow_domReady");
-               if (env.ie) {
-                       if (typeof window.frameElement != 'undefined') {
-                               // we can't use doScroll if we're in an iframe...
-                               d.attachEvent("onreadystatechange", function(){
-                                       if (d.readyState == "complete") {
-                                               d.detachEvent("onreadystatechange", arguments.callee);
-                                               runDomReadyQueue();
-                                               glow._removeReadyBlock("glow_domReady");
-                                       }
-                               });
-                       } else {
-                               // polling for no errors
-                               (function () {
-                                       try {
-                                               // throws errors until after ondocumentready
-                                               d.documentElement.doScroll('left');
-                                       } catch (e) {
-                                               setTimeout(arguments.callee, 0);
-                                               return;
-                                       }
-                                       // no errors, fire
-                                       runDomReadyQueue();
-                                       glow._removeReadyBlock("glow_domReady");
-                               })();
-                       }
-               } else if (glow.env.webkit < 525.13 && typeof d.readyState != 'undefined') {
-                       var f = function(){
-                               if ( /loaded|complete/.test(d.readyState) ) {
-                                       runDomReadyQueue();
-                                       glow._removeReadyBlock("glow_domReady");
-                               } else {
-                                       setTimeout(f, 0);
-                               }
-                       };
-                       f();
-               } else {
-                       var callback = function () {
-                               if (callback.fired) { return; }
-                               callback.fired = true;
-                               runDomReadyQueue();
-                               glow._removeReadyBlock("glow_domReady");
-                       };
-                       if (d.addEventListener) {
-                               d.addEventListener("DOMContentLoaded", callback, false);
-                       }
-                       var oldOnload = window.onload;
-                       window.onload = function () {
-                               if (oldOnload) { oldOnload(); }
-                               callback();
-                       };
-               }
-       })();
-
-       /**
-       @name glow.isSupported
-       @description Set to true in supported user agents
-               This will read false in 'level 2' browsers in BBC's Browser Support Guidelines
-       @type Boolean
-
-       @see <a href="http://www.bbc.co.uk/guidelines/newmedia/technical/browser_support.shtml">BBC's Browser Support Guidelines</a>
-       */
-       // TODO: for v2 we should switch this to 'notSupported' as it's a blacklist
-       glow.isSupported = !(
-               //here are the browsers we don't support
-               env.ie < 6 ||
-               (env.gecko < 1.9 && !/^1\.8\.1/.test(env.version)) ||
-               env.opera < 9 ||
-               env.webkit < 412
-       );
-       // block 'ready' if browser isn't supported
-       if (!glow.isSupported) {
-               glow._addReadyBlock("glow_browserSupport");
-       }
-
-       if (window.gloader) {
-               gloader.library({
-                       name: "glow",
-                       version: "1.7.0",
-                       builder: function () {
-                               return glow;
-                       }
-               });
-       } else if (window.glow) {
-               throw new Error("Glow global object already exists");
-       } else {
-               window.glow = glow;
-       }
-
-       // this helps IE cache background images
-       if (glow.ie) {
-               try {
-                       document.execCommand("BackgroundImageCache", false, true);
-               } catch(e) {}
-       }
-})();
-/*@cc_on @*/
-/*@if (@_jscript_version > 5.5)@*/
-/**
-@name glow.i18n
-@namespace
-@description Internationalisation Module.
-@requires glow
-@see <a href="../furtherinfo/i18n/index.shtml">Using glow.i18n</a>
-*/
-(window.gloader || glow).module({
-       name: "glow.i18n",
-       library: ["glow", "1.7.0"],
-       depends: [["glow", "1.7.0"]],
-       builder: function(glow) {
-               var self;
-               
-               // Regexes for judging subtag types in the 'L'anguage, 'S'cript, 'R'egion, 'V'ariant form
-               // lv is a match for a subtag that can be either 'L'anguage or 'V'ariant
-               // See full explanation of tags and subtags at the end of the file
-               var subtagRegexes = {
-                               l  : /^[a-z]$/,
-                               lv : /^[a-z]{2,3}$/,
-                               s  : /^[A-Z][a-z]{3}$/,
-                               r  : /^[A-Z]{2}|[0-9]{3}$/,
-                               v  : /^[a-z0-9]{4,}$/
-                       };
-
-               // Bit masks for tag signature in the 'L'anguage, 'S'cript, 'R'egion, 'V'ariant form
-               // See full explanation of tags and subtags at the end of the file
-               var L    = 1,
-                       S    = 2,
-                       R    = 4,
-                       V    = 8,
-                       LSRV = L + S + R + V,
-                       LRV  = L     + R + V,
-                       LSV  = L + S     + V,
-                       LV   = L         + V,
-                       LSR  = L + S + R    ,
-                       LR   = L     + R    ,
-                       LS   = L + S;
-       
-               // Base structures for tag parsing using 'L'anguage, 'S'cript, 'R'egion, 'V'ariant form
-               // See full explanation of tags and subtags at the end of the file
-               var masks   = {l: L, s: S, r: R, v: V}, // map subtag types to masks
-                       subtags = ['l', 's', 'r', 'v'],         // in order
-                       labels  = {l: 0, s: 1, r: 2, v: 3}; // reverse look up for subtags
-
-               // holds the actual local pack data
-               var localePacks = {};
-
-               // holds the main index of the pack / module structure
-               var moduleStructure = {};
-
-               // the currently selected locale
-               // comes from html lang if it exists and is valid, defaults to 'en'
-               var currentLocale = parseTag(document.documentElement.lang || 'en') || parseTag('en');
-               
-               // Determine what, if any, type of subtag this is by regex matching
-               function getSubtagPattern( subtag ) {
-                       for (var pattern in subtagRegexes) { // These regexes are mutually exclusive, so order is immaterial
-                               if (subtagRegexes[pattern].test(subtag)) {
-                                       return pattern;
-                               }
-                       }
-       
-                       return "";
-               }
-
-               // Parse the given tag and return a queryable data set using 'L'anguage, 'S'cript, 'R'egion, 'V'ariant form
-               // See full explanation of tags and subtags at the end of the file
-               // if the tag is valid, returns the internal representation of a parsed locale tag
-               // canonical is the valid canonical form of the tag eg "en-GB", mask is a bitmask indicating which subtag types are present and subtags is an object containing the actual subtags
-               function parseTag( tag ) {
-                       if (!tag.split) {
-                               tag = "";
-                       }
-               
-                       var parts = tag.split("-"), // get the subtags
-                               len = parts.length,
-                               canon = [],                             // will hold the subtags of the canonical tag
-                               matchedSubtags = {l: "", s:"", r:"", v:""},
-                               start = 0,
-                               i = start,
-                               mask = 0,
-                               subtag,
-                               label;
-               
-                       for (var j = 0, jlen = subtags.length; j < jlen; j++) { // order of subtag match is important
-                               i = start;
-                               subtag = subtags[j];
-                               label = labels[subtag];
-       
-                               while ((getSubtagPattern(parts[i]).indexOf(subtag) == -1) && (i < len)) { // indexOf allows for partial match of 'lv' regex
-                                       i++; // if no match, move on
-                               }
-                               
-                               if (i < len) { // if a match is found, store it and continue with the next subtag from this point
-                                       canon[label] = parts[i];
-                                       mask += masks[subtag];
-                                       matchedSubtags[subtag] = parts[i];
-                                       parts[i] = "*";
-                                       start = i;
-                               }
-                       }
-                       
-                       // put it all back together as a string
-                       var canonical = canon.join("-").replace(/-+/g, "-");
-                       
-                       if ((canonical == "") || (canonical.substring(0, 1) == "-")) { // this means there is no language subtag, so we must fail the parse
-                               return false;
-                       }
-                       else {
-                               return {canonical: canonical, mask: mask, subtags: matchedSubtags};
-                       }
-               }               
-               
-               // For a given tag, and mask for a subset of it, return the subset tag using 'L'anguage, 'S'cript, 'R'egion, 'V'ariant form
-               // eg for 'en-GB-scouse' and an LR mask, return 'en-GB'
-               // See full explanation of tags and subtags at the end of the file
-               // ** note the bitwise operations **
-               function getSubsetTag( parsed, test, mask ) {
-                       var subset;
-                       
-                       // this test (bitwise because the operands are bitmasks) determines that mask has no bits set that parsed.mask does not
-                       // this is to make sure that the tag being generated is genuinely a subset of the main tag
-                       if ((mask & ~parsed.mask) == 0) {
-                               subset = parsed.subtags["l"]; // there must be a language subtag, because this tags passed the parse
-                               
-                               if (S & mask) {
-                                       subset = subset + "-" + parsed.subtags["s"];
-                               }
-                               if (R & mask) {
-                                       subset = subset + "-" + parsed.subtags["r"];
-                               }
-                               if (V & mask) {
-                                       subset = subset + "-" + parsed.subtags["v"];
-                               }
-       
-                               if (test(subset)) {
-                                       return subset;
-                               }
-                       }
-               
-                       return false;
-               }
-
-               // Performs the generic tag negotiation process
-               // The test is a function that performs an additional check to see if the subset tag currently being
-               // checked should be used, normally based on the presence of appropriate data in the locale packs
-               // parsed is the parsed locale tag, as returned by parseTag
-               // testFn is the function passed to getSubsetTag, used to determine if a given subste tag is a negotiated hit
-               // successFn, failFn are the functions to be run when the negotiation result is known
-               function negotiate( parsed, testFn, successFn, failFn ) {
-                       var subset;
-                                       
-                       switch(parsed.mask) { // NOTE the breaks are conditional because it might be OK for all the cases to execute - need to move on to the next case if the "if" fails
-                               case LRV:
-                                       if ((subset = getSubsetTag(parsed, testFn, LRV ))) {
-                                               break;
-                                       }
-                               case LR:
-                                       if ((subset = getSubsetTag(parsed, testFn, LR  ))) {
-                                               break;
-                                       }
-                               case LSRV:
-                                       if ((subset = getSubsetTag(parsed, testFn, LSRV))) {
-                                               break;
-                                       }
-                               case LSR:
-                                       if ((subset = getSubsetTag(parsed, testFn, LSR ))) {
-                                               break;
-                                       }
-                               case LSV:
-                                       if ((subset = getSubsetTag(parsed, testFn, LSV ))) {
-                                               break;
-                                       }
-                               case LS:
-                                       if ((subset = getSubsetTag(parsed, testFn, LS  ))) {
-                                               break;
-                                       }
-                               case LV:
-                                       if ((subset = getSubsetTag(parsed, testFn, LV  ))) {
-                                               break;
-                                       }
-                               case L:
-                                       if ((subset = getSubsetTag(parsed, testFn, L   ))) {
-                                               break;
-                                       }
-                               default:
-                                       if (testFn('en')) {
-                                               subset = 'en';
-                                       }
-                                       else {
-                                               subset = null;
-                                       }
-                       }
-
-                       if (subset == null) {
-                               failFn();
-                       } 
-                       else {
-                               successFn(subset);
-                       }
-               }
-       
-               /**
-               @name glow.i18n.setLocale
-               @function
-               @description Sets the locale to a new one, stacking up the old one for later retreival.
-               
-                       Has no effect if the newLocaleTag is invalid.
-               
-               @param {String} newLocaleTag The new locale tag to be set.
-
-               @returns this
-               
-               @example
-                       // assume locale is "en-GB" first
-                       glow.i18n.setLocale("cy-GB");
-                       // locale is now "cy-GB" with "en-GB" stacked up
-               */
-               function setLocale( newLocaleTag ) {
-                       var old = currentLocale,
-                               parsed = parseTag(newLocaleTag);
-
-                       if (parsed) {
-                               currentLocale = parsed;
-                               currentLocale.next = old;
-                       }
-                       
-                       return self;
-               }
-       
-               /**
-               @name glow.i18n.revertLocale
-               @function
-               @description Reverts the locale to the one used immediately prior to the current one.
-               
-                       Has no effect if the current locale was the first set (ie if no new locales have been set,
-                       or if the locale has been reverted all the way back to the beginning).
-
-               @returns this
-               
-               @example
-                       // assume locale is "en-GB" first
-                       glow.i18n.setLocale("cy-GB");
-                       // locale is now "cy-GB" with "en-GB" stacked up
-                       glow.i18n.revertLocale();
-                       // locale is now back to "en-GB"
-               */
-               function revertLocale() {
-                       currentLocale = currentLocale.next || currentLocale;
-                       
-                       return self;            
-               }
-               
-               /**
-               @name glow.i18n.getLocale
-               @function
-               @description Returns the tag of the current locale in canonical form.
-
-               @returns {String}
-
-               @example
-                       loc = glow.i18n.getLocale(); // returns the current locale eg "en-GB"
-
-                       glow.i18n.setLocale("cy-GB");
-                       loc = glow.i18n.getLocale(); // now returns "cy
-
-                       glow.i18n.setLocale("en-ignoredsubtag-US");
-                       loc = glow.i18n.getLocale(); // now returns "en-US", which is the canonical form
-               */
-               function getLocale() {
-                       return currentLocale.canonical;
-               }
-               
-               /**
-               @name glow.i18n.addLocaleModule
-               @function
-               @description Stores the given data against the given module on the given locale.
-                       Creates any local packs and / or moduels that dio not already exist.
-                       Adds the given data to any that do.
-
-               @param {String} moduleName The name of the module to be created/added to.
-               @param {String} localeTag The locale tag to add the module to.
-               @param {Object} data The data of the module in key : value form.
-
-               @returns this
-               
-               @example
-                       // assume locale is "en-GB" first
-                       glow.i18n.setLocale("cy-nonsense-GB");
-                       var newLocale = glow.i18n.getLocale(); // returns "cy-GB"
-               */
-               function addLocaleModule( moduleName, localeTag, data ) {
-                       var tag = parseTag(localeTag),
-                               pack,
-                               module,
-                               structure;
-                       
-                       if (tag) {
-                               pack      = localePacks[tag.canonical]  = localePacks[tag.canonical]  || {};
-                               module    = pack[moduleName]            = pack[moduleName]            || {};
-                               structure = moduleStructure[moduleName] = moduleStructure[moduleName] || {};
-                               
-                               for (var key in data) { // not using glow.lang.apply to avoid two loops
-                                       module[key] = data[key];
-                                       structure[key] = 1;
-                               }
-                       }
-                       
-                       return self;
-               }
-       
-               /**
-               @name glow.i18n.getLocaleModule
-               @function
-               @description Retreives an object whose keys are every label that can have a value (via tag negotiation) associated with it, and whose values are the associated label values.
-
-               @param {String} moduleName The name of the module retreived.
-               @param {Object} [opts] Options object
-                       @param {String} [opts.locale] On override locale to use instaed of the system locale.
-
-               @returns {Object}
-               */
-               function getLocaleModule( moduleName, opts ) {
-                       var module = {},
-                               options = opts || {},
-                               structure = moduleStructure[moduleName] || {},
-                               localeTag = currentLocale,
-                               tag,
-                               label;
-
-                       // define the customisers for negotiate outside the loop
-                       // oddly, the loop control variable *is* correclty accessed, becasue of var scoping and the synchronous function calls
-                       function test( nTag ) {
-                               if (localePacks[nTag] && localePacks[nTag][moduleName] && localePacks[nTag][moduleName][label]) {
-                                       return true;
-                               }
-                               else {
-                                       return false;
-                               }
-                       }
-                       
-                       function success( sTag ) {
-                               module[label] = localePacks[sTag][moduleName][label];
-                       }
-                       
-                       function fail() {
-                               module[label] = "[Error! No " + moduleName + "." + label + " on " + localeTag.canonical + "]";
-                       }
-                       
-                       if (options.locale != undefined) {
-                               tag = parseTag(options.locale);
-                               
-                               if (tag) {
-                                       localeTag = tag;
-                               }
-                       }
-
-                       for (label in structure) {
-                               negotiate(localeTag, test, success, fail);
-                       }
-
-                       return module;
-               }
-               
-               /**
-               @name glow.i18n.addLocalePack
-               @function
-               @description Shortcut for creating many locale modules on one locale (ie a brand new entire locale pack)
-
-               @param {String} localeTag The name of the module retreived.
-               @param {Object} data The data of the module in MODULE : key : value form.
-
-               @returns this
-               */
-               function addLocalePack( localeTag, data ) {
-                       for (var moduleName in data) {
-                               addLocaleModule(moduleName, localeTag, data[moduleName]);
-                       }
-                       
-                       return self;
-               }
-       
-               /**
-               @name glow.i18n.checkLocale
-               @function
-               @description Developer focused checker for getting the locale tag(s) returned by tag negotiation
-                       if no options passed it returns a structured data object of the entire data set for the given locale
-                       if just a module name is passed, the result set is limited to that module
-                       if a module name and a label are passed it returns a string for just that label
-       
-               @param {String} localeTag The name of the module retreived.
-               @param {Object} [opts] Options object
-                       @param {String} [opts.module] If set, restricts the results to that module.
-                       @param {String} [opts.label] If set alongside opts.module, restricts the results to that label on that module.
-
-               @returns {Object}
-               */
-               function checkLocale( localeTag, opts ) {
-                       var options = opts || {},
-                               parsed = parseTag(localeTag);
-       
-                       if (options.module) {
-                               if (options.label) {
-                                       return checkLocaleByModuleAndLabel(parsed, options.module, options.label);
-                               }
-                               else {
-                                       return checkLocaleByModule(parsed, options.module);
-                               }
-                       }
-                       else {
-                               return checkLocaleByEverything(parsed);
-                       }
-                       
-                       return null;
-               }
-
-               // helper for checkLocale
-               function checkLocaleByModuleAndLabel( parsed, module, label ) {
-                       var result;
-                       
-                       // Define the customisers for negotiate outside the function call to be consistent with other checkLocaleBy* helpers
-                       function test( nTag ) {
-                               if (localePacks[nTag] && localePacks[nTag][module] && localePacks[nTag][module][label]) {
-                                       return true;
-                               }
-                               else {
-                                       return false;
-                               }
-                       }
-                       
-                       function success( sTag ) {
-                               result = sTag;
-                       }
-                       
-                       function fail() {
-                               result = "**error** - no negotiated value exists";
-                       }
-
-                       negotiate(parsed, test, success, fail);
-                       
-                       return result;
-               }
-               
-               // helper for checkLocale
-               function checkLocaleByModule( parsed, module ) {
-                       var structure = moduleStructure[module] || {},
-                               results = {},
-                               label;
-
-                       // Define the customisers for negotiate outside the loop
-                       // Oddly, the loop control variable *is* correclty accessed, becasue of var scoping and the synchronous function calls
-                       function test( nTag ) {
-                               if (localePacks[nTag] && localePacks[nTag][module] && localePacks[nTag][module][label]) {
-                                       return true;
-                               }
-                               else {
-                                       return false;
-                               }
-                       }
-                       
-                       function success( sTag ) {
-                               results[label] = sTag;
-                       }
-                       
-                       function fail() {
-                               results[label] = "**error** - no negotiated value exists";
-                       }
-                       
-                       for (label in structure) {
-                               negotiate(parsed, test, success, fail);
-                       }
-                       
-                       return results;                 
-               }
-               
-               // helper for checkLocale
-               function checkLocaleByEverything( parsed ) {
-                       var results = {},
-                               module,
-                               label;
-                       
-                       // Define the customisers for negotiate outside the loop
-                       // Oddly, the loop control variable *is* correclty accessed, becasue of var scoping and the synchronous function calls
-                       function test( nTag ) {
-                               if (localePacks[nTag] && localePacks[nTag][module] && localePacks[nTag][module][label]) {
-                                       return true;
-                               }
-                               else {
-                                       return false;
-                               }
-                       }
-                       
-                       function success( sTag ) {
-                               results[module][label] = sTag;
-                       }
-                       
-                       function fail() {
-                               results[module][label] = "**error** - no negotiated value exists";
-                       }
-
-                       for (module in moduleStructure) {
-                               results[module] = {};
-                               
-                               for (label in moduleStructure[module]) {
-                                       negotiate(parsed, test, success, fail);
-                               }
-                       }
-                       
-                       return results;
-               }
-
-               
-               // make the module
-               glow.i18n = self = {
-                       setLocale : setLocale,
-                       revertLocale : revertLocale,
-                       getLocale : getLocale,
-                       addLocaleModule : addLocaleModule,
-                       getLocaleModule : getLocaleModule,
-                       addLocalePack : addLocalePack,
-                       checkLocale : checkLocale
-               }
-               
-               // define the basic 'en' locale pack
-               // just the properties - widgets and modules will add their own locale modules
-               addLocalePack("en", {
-                       PROPERTIES : {
-                               LANGUAGE : "English",
-                               DIR : "ltr"
-                       }
-               });
-       }
-});
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-
-       About Locale Tags and Tag Negotiation
-       =====================================
-       
-       Locale Tag negotiation is the process Glow uses to find the most specific
-       match for a given tag given the context.
-       
-       
-       
-       Locale Tag Structure
-       ~~~~~~~~~~~~~~~~~~~~
-       
-       First, let's look at the anatomy of locale tags in Glow.
-       
-       According to the IANA spec, locale tags have this structure
-       
-               language-script-region-variant-extension-privateuse
-       
-       There are also "grandfathered" and "redundant" tags that existed before
-       this structure was implemented and continue for backwards compatibility.
-       
-       Glow only supports the following subset of that structure. Subtags are
-       separated by "-" and must appear in the correct order.
-       
-               language-script-region-variant
-       
-       These are the IANA formats of these subtags
-       
-       language : /[a-z]{2,3}/          - 2 or 3 lowercase letters.
-       script   : /[A-Z][a-z]{3}/       - an uppercase letter followed by
-                                                                          3 lowercase letters
-       region   : /[A-Z]{2}|[0-9]{3}/   - 2 upper case letters or a 3 digit number
-       variant  : /[a-z0-9]{4,}/        - lower case letters or numbers,
-                                                                          4 or more characters
-       
-       eg (yes, these are all official IANA tags, even the last one...)
-       
-       en                        language                  generic English
-       en-GB             language-region               British English
-       en-Runr           language-script           English written in Runic script
-       en-Runr-GB        language-script-region    British English written in Runic
-       en-GB-scouse  language-region-variant   Scouse variant of British English
-       
-       While Glow does not support grandfathered or redundant tags or extension or
-       private use subtags, it does not enforce compliance with the IANA registry.
-       
-       This means that if the subtag formats can be relaxed a little, variation
-       from the standard could be used to fill these gaps with a tag that Glow can
-       parse.
-       
-       As a result Glow applies theses formats to subtags
-       
-       language : /[a-z]{1,3}/        - 1, 2 or 3 lowercase letters
-                                                                               > allowing shorter subtag than IANA
-       script   : /[A-Z][a-z]{3}/     - an uppercase letter
-                                                                        followed by 3 lowercase letters
-                                                                               > same as IANA
-       region   : /[A-Z]{2}|[0-9]{3}/ - 2 upper case letters or a 3 digit number
-                                                                               > same as IANA
-       variant  : /[a-z0-9]{2,}/      - lower case letters or numbers,
-                                                                        2 or more characters
-                                                                               > allowing shorter subtag than IANA
-       
-       This does mean that there is now potential conflict between the language
-       and the variant subtags; a subtag that is 2 or 3 lowercase letters could be
-       either. Glow's insistence on strict subtag order solves this. If a subtag
-       that falls in this overlap zone is encountered, it is a language subtag
-       first, a variant if a language has already be found, and ignored as a last
-       resort.
-       
-       Now, even though according to IANA, en-GB-oed is grandfathered (the variant
-       is too short), it can be directly supported by Glow.
-       
-       (If you're interested, en-GB-oed is British English, but with Oxford
-       English Dictionary spellings. These basically -ize rather than -ise but all
-       other spellings as en-GB, so the OED lists "colourize")
-       
-       
-       
-       Tag Negotiation Process
-       ~~~~~~~~~~~~~~~~~~~~~~~
-       
-       When parsing a tag, Glow will look for each subtag in the expected order.
-       If a subtag is encountered out of order, or when that item has already been
-       parsed, it will be ignored. If a subtag's type cannot be identified, it
-       will be ignored.
-       
-       GB-cy-1-en-US will be parsed as cy-US.
-               'GB' is out of order,
-               'en' is a duplicated language subtag and
-               '1' is not a recognised subtag type.
-       
-       Given all this, Locale negotiation occurs in the following order.
-       
-                                                               script present?
-                                                                       /      \
-                                                        (yes) /        \ (no)
-                                                                 /          \
-               language-script-region-variant    language-region-variant
-                               language-script-region    language-region
-                          language-script-variant       /
-                                          language-script      /
-                                                                       \      /
-                                                               language-variant
-                                                                       language
-                                                                          en
-       
-       It starts at the specificity of the given tag, and skips steps which have a
-       subtag that isn't present. eg
-       
-       xx-YY, which will be parsed as language-region, will negotiate as
-               language-region
-               language
-               en
-       
-       xx-Yyyy-ZZ, will be parsed as language-script-region, and negotiate as
-               language-script-region
-               language-script
-               language
-               en
-       
-       When Locale packs are created, the tag will be checked to see if it can
-       be negotiated. A valid tag must have at least a language, so "en-GB" and
-       "cy" are valid, but "GB" is not.
-       
-       
-       How this Module handles all this
-       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-       
-       The code has a number of variables, objects and arrays whose names or
-       values make reference to some variant or combination of l, s, r or v. These
-       match to the 'L'anguage, 'S'cript, 'R'egion or 'V'ariant subtag.
-
-       So, for instance, the variable LSRV is a bitmask for a tag structure with
-       all four subtags.
-       
-       
-       
-       Useful URLs
-       ~~~~~~~~~~~
-       
-       http://www.w3.org/International/articles/language-tags/
-       http://www.w3.org/International/articles/bcp47/
-       http://www.iana.org/assignments/language-subtag-registry
-
-
-
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/**
-@name glow.dom
-@namespace
-@description Accessing and manipulating the DOM
-@see <a href="../furtherinfo/creatingnodelists/">Creating NodeLists</a>
-@see <a href="../furtherinfo/workingwithnodelists/">Working with NodeLists</a>
-@see <a href="../furtherinfo/xmlnodelists/">XML NodeLists</a>
-*/
-(window.gloader || glow).module({
-       name: "glow.dom",
-       library: ["glow", "1.7.0"],
-       depends: [],
-       builder: function(glow) {
-               //private
-               var env = glow.env,
-                       lang = glow.lang,
-               /*
-               PrivateVar: cssRegex
-                       For matching CSS selectors
-               */
-                       cssRegex = {
-                               tagName: /^(\w+|\*)/,
-                               combinator: /^\s*([>]?)\s*/,
-                               //safari 1.3 is a bit dim when it comes to unicode stuff, only dot matches them (not even \S), so some negative lookalheads are needed
-                               classNameOrId: (env.webkit < 417) ? new RegExp("^([\\.#])((?:(?![\\.#\\[:\\s\\\\]).|\\\\.)+)") : /^([\.#])((?:[^\.#\[:\\\s]+|\\.)+)/
-                       },
-                       //for escaping strings in regex
-                       regexEscape = /([$^\\\/()|?+*\[\]{}.-])/g,
-
-               /*
-               PrivateVar: cssCache
-                       Cache of arrays representing an execution path for css selectors
-               */
-                       cssCache = {},
-
-               /*
-               PrivateVar: dom0PropertyMapping
-                       Mapping of HTML attribute names to DOM0 property names.
-               */
-                       dom0PropertyMapping = {
-                               checked    : "checked",
-                               "class"    : "className",
-                               "disabled" : "disabled",
-                               "for"      : "htmlFor",
-                               maxlength  : "maxLength"
-                       },
-
-               /*
-               PrivateVar: dom0BooleanAttribute
-                       The HTML attributes names that should be converted from true/false
-                       to ATTRIBUTENAME/undefined (i.e. boolean attributes like checked="checked").
-               */
-                       dom0BooleanAttribute = {
-                               checked  : true,
-                               disabled : true
-                       },
-
-               /*
-               PrivateVar: dom0AttributeMappings
-                       Functions that map dom0 values to sane ones.
-               */
-                       dom0AttributeMappings = {
-                               maxlength : function (val) { return val.toString() == "2147483647" ? undefined : val; }
-                       },
-               /*
-               PrivateVar: ucheck
-                       Used by unique(), increased by 1 on each use
-               */
-                       ucheck = 1,
-               /*
-               PrivateVar: ucheckPropName
-                       This is the property name used by unique checks
-               */
-                       ucheckPropName = "_unique" + glow.UID,
-                       
-               /**
-                       @name glow.dom-dataPropName
-                       @private
-                       @type String
-                       @description The property name added to the DomElement by the NodeList#data method.
-               */
-                       dataPropName = "_uniqueData" + glow.UID,
-               
-               /**
-                       @name glow.dom-dataIndex
-                       @private
-                       @type String
-                       @description The value of the dataPropName added by the NodeList#data method.
-               */
-                       dataIndex = 1, // must be a truthy value
-                       
-               /**
-                       @name glow.dom-dataCache
-                       @private
-                       @type Object
-                       @description Holds the data used by the NodeList#data method.
-                       
-                       The structure is like:
-                       [
-                               {
-                                       myKey: "my data"
-                               }
-                       ]
-               */
-                       dataCache = [],
-               
-               /*
-               PrivateVar: htmlColorNames
-                       Mapping of colour names to hex values
-               */
-                       htmlColorNames = {
-                               black: 0,
-                               silver: 0xc0c0c0,
-                               gray: 0x808080,
-                               white: 0xffffff,
-                               maroon: 0x800000,
-                               red: 0xff0000,
-                               purple: 0x800080,
-                               fuchsia: 0xff00ff,
-                               green: 0x8000,
-                               lime: 0xff00,
-                               olive: 0x808000,
-                               yellow: 0xffff00,
-                               navy: 128,
-                               blue: 255,
-                               teal: 0x8080,
-                               aqua: 0xffff,
-                               orange: 0xffa500
-                       },
-               /*
-               PrivateVar: usesYAxis
-                       regex for detecting which css properties need to be calculated relative to the y axis
-               */
-                       usesYAxis = /height|top/,
-                       colorRegex = /^rgb\(([\d\.]+)(%?),\s*([\d\.]+)(%?),\s*([\d\.]+)(%?)/i,
-                       cssPropRegex = /^(?:(width|height)|(border-(top|bottom|left|right)-width))$/,
-                       hasUnits = /width|height|top$|bottom$|left$|right$|spacing$|indent$|font-size/,
-                       //append gets set to a function below
-                       append,
-                       //unique gets set to a function below
-                       unique,
-                       //we set this up at the end of the module
-                       placeholderElm,
-                       //getByTagName gets get to a function below
-                       getByTagName,
-                       win = window,
-                       doc = document,
-                       docBody,
-                       docElm,
-                       // true if properties of a dom node are cloned when the node is cloned (eg, true in IE)
-                       nodePropertiesCloned,
-                       // used to convert divs to strings
-                       tmpDiv = doc.createElement("div"),
-                       /*
-                       PrivateVars: tableArray, elmFilter
-                               Used in private function stringToNodes to capture any 
-                               elements that cannot be a childNode of <div>.
-                                       Each entry in JSON responds to an element.
-                                       First array value is how deep the element will be created in a node tree.
-                                       Second array value is the beginning of the node tree.
-                                       Third array value is the end of the node tree.
-                       */
-                       tableArray = [1, '<table>', '</table>'],
-                       emptyArray = [0, '', ''],
-                       // webkit won't accept <link> elms to be the only child of an element,
-                       // it steals them and hides them in the head for some reason. Using
-                       // broken html fixes it for some reason
-                       paddingElmArray = env.webkit < 526 ? [0, '', '</div>', true] : [1, 'b<div>', '</div>'],
-                       trArray = [3, '<table><tbody><tr>', '</tr></tbody></table>'],
-                       elmWraps = {
-                               caption: tableArray,
-                               thead: tableArray,
-                               th: trArray,
-                               colgroup: tableArray,
-                               tbody: tableArray,
-                               tr: [2, '<table><tbody>', '</tbody></table>'],
-                               td: trArray,
-                               tfoot: tableArray,
-                               option: [1, '<select>', '</select>'],
-                               legend: [1, '<fieldset>', '</fieldset>'],
-                               link: paddingElmArray,
-                               script: paddingElmArray,
-                               style: paddingElmArray
-                       };
-               
-               // clean up IE's mess
-               if (env.ie) {
-                       window.attachEvent("onunload", function() {
-                               tmpDiv = null;
-                       });
-               }
-               
-               glow.ready(function() {
-                       docBody = doc.body;
-                       docElm = doc.documentElement;
-               });
-               
-               
-               // test for nodePropertiesCloned
-               (function() {
-                       var div = doc.createElement("div");
-                       div.a = 1;
-                       nodePropertiesCloned = !!div.cloneNode(true).a;
-               })();
-               
-               /**
-                @name glow.dom-getFirstChildElm
-                @private
-                @description Returns the first leaf of a NodeList
-                @param {NodeList} 
-               */
-               function getFirstChildElm(parent) {                                     
-                       for (var child = parent.firstChild; child; child = child.nextSibling) {
-                               if (child.nodeType == 1) {
-                                       return child;
-                               }                       
-                       }                       
-                       return null;                    
-               }
-
-               /*
-               PrivateMethod: removeClassRegex
-                       Get a regex that can be used to remove a class from a space separated list of classes.
-
-               Arguments:
-                       name - (string) the name of the class.
-
-               Returns:
-                       The regex.
-               */
-               function removeClassRegex (name) {
-                       return new RegExp(["(^|\\s)", name.replace(regexEscape, "\\$1"), "($|\\s)"].join(""), "g");
-               }
-
-
-               /*
-               PrivateMethod: stringToNodes
-                       Creates an array of nodes from a string
-               */
-               function stringToNodes(str) {
-                       var r = [],
-                               tagName = (/^\s*<([^\s>]+)/.exec(str) || [,'div'])[1],
-                               // This matches str content with potential elements that cannot
-                               // be a child of <div>.  elmFilter declared at top of page.
-                               elmWrap = elmWraps[tagName] || emptyArray, 
-                               nodeDepth,
-                               childElm,
-                               rLen = 0;
-                       
-                       // Create the new element using the node tree contents available in filteredElm.
-                       tmpDiv.innerHTML = (elmWrap[1] + str + elmWrap[2]);
-                       
-                       childElm = tmpDiv;
-                       
-                       // Strip newElement down to just the required element and its parent
-                       nodeDepth = elmWrap[0];
-                       while(nodeDepth--) {
-                               childElm = childElm.lastChild;
-                       }
-
-                       // pull nodes out of child
-                       while (childElm.firstChild) {
-                               r[rLen++] = childElm.removeChild(childElm.firstChild);
-                       }
-                       
-                       childElm = null;
-                       
-                       return r;
-               }
-
-               /*
-               PrivateMethod: nodelistToArray
-                       Converts a w3 NodeList to an array
-               */
-               function nodelistToArray(nodelist) {
-                       var r = [], i = 0;
-                       for (; nodelist[i]; i++) {
-                               r[i] = nodelist[i];
-                       }
-                       return r;
-               }
-
-               /*
-               PrivateMethod: setAttribute
-                       Sets the attribute in the nodelist using the supplied function.
-
-               Arguments:
-                       value - (String|Function) the value/value generator.
-                       attributeSetter - (Function) a function that can be called to actually set the attribute.
-
-               Returns:
-                       The <NodeList> object.
-               */
-               // is marginal having this separated out as it is only used twice and call is almost as big
-               // leaving it separate for now for once and only once, as well as in case attr does some more mutating stuff
-               // could be merged back with attr later
-               function setAttribute (value, attributeSetter) {
-                       for (var that = this, i = 0, length = that.length; i < length; i++) {
-                               attributeSetter.call(
-                                       that[i],
-                                       value.call ?
-                                               value.call(that[i], i) :
-                                               value
-                               );
-                       }
-                       return that;
-               }
-
-
-               /*
-               PrivateMethod: append
-                       append the nodes in "b" to the array / list "a"
-               */
-               //return different function for IE & Opera to deal with their stupid bloody expandos. Pah.
-               if (document.all) {
-                       append = function(a, b) {
-                               var i = 0,
-                                       ai = a.length,
-                                       length = b.length;
-                               if (typeof b.length == "number") {
-                                       for (; i < length; i++) {
-                                               a[ai++] = b[i];
-                                       }
-                               } else {
-                                       for (; b[i]; i++) {
-                                               a[ai++] = b[i];
-                                       }
-                               }
-                       };
-               } else {
-                       append = function(a, b) {
-                               var i = 0, ai = a.length;
-                               for (; b[i]; i++) {
-                                       a[ai++] = b[i];
-                               }
-                       };
-               }
-
-               /*
-               PrivateMethod: isXml
-                       Is this node an XML Document node or within an XML Document node
-
-               Arguments:
-                       node
-
-               Returns:
-                       Bool
-               */
-               function isXml(node) {
-                       //test for nodes within xml element
-                       return  (node.ownerDocument && !node.ownerDocument.body) ||
-                                       //test for xml document elements
-                                       (node.documentElement && !node.documentElement.body);
-               }
-
-               /*
-               PrivateMethod: unique
-                       Get an array of nodes without duplicate nodes from an array of nodes.
-
-               Arguments:
-                       aNodes - (Array|<NodeList>)
-
-               Returns:
-                       An array of nodes without duplicates.
-               */
-               //worth checking if it's an XML document?
-               if (env.ie) {
-                       unique = function(aNodes) {
-                               if (aNodes.length == 1) { return aNodes; }
-
-                               //remove duplicates
-                               var r = [],
-                                       ri = 0,
-                                       i = 0;
-
-                               for (; aNodes[i]; i++) {
-                                       if (aNodes[i].getAttribute(ucheckPropName) != ucheck && aNodes[i].nodeType == 1) {
-                                               r[ri++] = aNodes[i];
-                                       }
-                                       aNodes[i].setAttribute(ucheckPropName, ucheck);
-                               }
-                               for (i=0; aNodes[i]; i++) {
-                                       aNodes[i].removeAttribute(ucheckPropName);
-                               }
-                               ucheck++;
-                               return r;
-                       }
-               } else {
-                       unique = function(aNodes) {
-                               if (aNodes.length == 1) { return aNodes; }
-
-                               //remove duplicates
-                               var r = [],
-                                       ri = 0,
-                                       i = 0;
-
-                               for (; aNodes[i]; i++) {
-                                       if (aNodes[i][ucheckPropName] != ucheck && aNodes[i].nodeType == 1) {
-                                               r[ri++] = aNodes[i];
-                                       }
-                                       aNodes[i][ucheckPropName] = ucheck;
-                               }
-                               ucheck++;
-                               return r;
-                       }
-               }
-
-               /*
-               PrivateMethod: getElementsByTag
-                       Get elements by a specified tag name from a set of context objects. If multiple
-                       context objects are passed, then the resulting array may contain duplicates. See
-                       <unique> to remove duplicate nodes.
-
-               Arguments:
-                       tag - (string) Tag name. "*" for all.
-                       contexts - (array) DOM Documents and/or DOM Elements to search in.
-
-               Returns:
-                       An array(like) collection of elements with the specified tag name.
-               */
-               if (document.all) { //go the long way around for IE (and Opera)
-                       getByTagName = function(tag, context) {
-                               var r = [], i = 0;
-                               for (; context[i]; i++) {
-                                       //need to check .all incase data is XML
-                                       //TODO: Drop IE5.5
-                                       if (tag == "*" && context[i].all && !isXml(context[i])) { // IE 5.5 doesn't support getElementsByTagName("*")
-                                               append(r, context[i].all);
-                                       } else {
-                                               append(r, context[i].getElementsByTagName(tag));
-                                       }
-                               }
-                               return r;
-                       };
-               } else {
-                       getByTagName = function(tag, context) {
-                               var r = [], i = 0, len = context.length;
-                               for (; i < len; i++) {
-                                       append(r, context[i].getElementsByTagName(tag));
-                               }
-                               return r;
-                       };
-               }
-               
-               /*
-                       Get the child elements for an html node
-               */
-               function getChildElms(node) {
-                       var r = [],
-                               childNodes = node.childNodes,
-                               i = 0,
-                               ri = 0;
-                       
-                       for (; childNodes[i]; i++) {
-                               if (childNodes[i].nodeType == 1 && childNodes[i].nodeName != "!") {
-                                       r[ri++] = childNodes[i];
-                               }
-                       }
-                       return r;
-               }
-               
-               
-               var horizontalBorderPadding = [
-                               'border-left-width',
-                               'border-right-width',
-                               'padding-left',
-                               'padding-right'
-                       ],
-                       verticalBorderPadding = [
-                               'border-top-width',
-                               'border-bottom-width',
-                               'padding-top',
-                               'padding-bottom'
-                       ];
-               
-               /*
-               PrivateMethod: getElmDimension
-                       Gets the size of an element as an integer, not including padding or border
-               */              
-               function getElmDimension(elm, cssProp /* (width|height) */) {
-                       var r, // val to return
-                               docElmOrBody = env.standardsMode ? docElm : docBody,
-                               isWidth = (cssProp == "width"),
-                               cssPropCaps = isWidth ? "Width" : "Height",
-                               cssBorderPadding;
-
-                       if (elm.window) { // is window
-                               r = env.webkit < 522.11 ? (isWidth ? elm.innerWidth                             : elm.innerHeight) :
-                                       env.webkit                      ? (isWidth ? docBody.clientWidth                : elm.innerHeight) :
-                                       env.opera < 9.5         ? (isWidth ? docBody.clientWidth                : docBody.clientHeight) :
-                                       /* else */                        (isWidth ? docElmOrBody.clientWidth   : docElmOrBody.clientHeight);
-
-                       }
-                       else if (elm.getElementById) { // is document
-                               // we previously checked offsetWidth & clientWidth here
-                               // but they returned values too large in IE6 scrollWidth seems enough
-                               r = Math.max(
-                                       docBody["scroll" + cssPropCaps],
-                                       docElm["scroll" + cssPropCaps]
-                               )
-                       }
-                       else {
-                               // get an array of css borders & padding
-                               cssBorderPadding = isWidth ? horizontalBorderPadding : verticalBorderPadding;
-                               r = elm['offset' + cssPropCaps] - parseInt( getCssValue(elm, cssBorderPadding) );
-                       }
-                       return r;
-               }
-
-               /*
-               PrivateMethod: getBodyElm
-                       Gets the body elm for a given element. Gets around IE5.5 nonsense. do getBodyElm(elm).parentNode to get documentElement
-               */
-               function getBodyElm(elm) {
-                       if (env.ie < 6) {
-                               return elm.document.body;
-                       } else {
-                               return elm.ownerDocument.body;
-                       }
-               }
-
-               /*
-               PrivateMethod: setElmsSize
-                       Set element's size
-
-               Arguments:
-                       elms - (<NodeList>) Elements
-                       val - (Mixed) Set element height / width. In px unless stated
-                       type - (String) "height" or "width"
-
-               Returns:
-                       Nowt.
-               */
-               function setElmsSize(elms, val, type) {
-                       if (typeof val == "number" || /\d$/.test(val)) {
-                               val += "px";
-                       }
-                       for (var i = 0, len = elms.length; i < len; i++) {
-                               elms[i].style[type] = val;
-                       }
-               }
-
-               /*
-               PrivateMethod: toStyleProp
-                       Converts a css property name into its javascript name, such as "background-color" to "backgroundColor".
-
-               Arguments:
-                       prop - (String) CSS Property name
-
-               Returns:
-                       String, javascript style property name
-               */
-               function toStyleProp(prop) {
-                       if (prop == "float") {
-                               return env.ie ? "styleFloat" : "cssFloat";
-                       }
-                       return lang.replace(prop, /-(\w)/g, function(match, p1) {
-                               return p1.toUpperCase();
-                       });
-               }
-
-               /*
-               PrivateMethod: tempBlock
-                       Gives an element display:block (but keeps it hidden) and runs a function, then sets the element back how it was
-
-               Arguments:
-                       elm - element
-                       func - function to run
-
-               Returns:
-                       Return value of the function
-               */
-               function tempBlock(elm, func) {
-                       //TODO: rather than recording individual style properties, just cache cssText? This was faster for getting the element size
-                       var r,
-                               elmStyle = elm.style,
-                               oldDisp = elmStyle.display,
-                               oldVis = elmStyle.visibility,
-                               oldPos = elmStyle.position;
-
-                       elmStyle.visibility = "hidden";
-                       elmStyle.position = "absolute";
-                       elmStyle.display = "block";
-                       if (!isVisible(elm)) {
-                               elmStyle.position = oldPos;
-                               r = tempBlock(elm.parentNode, func);
-                               elmStyle.display = oldDisp;
-                               elmStyle.visibility = oldVis;
-                       } else {
-                               r = func();
-                               elmStyle.display = oldDisp;
-                               elmStyle.position = oldPos;
-                               elmStyle.visibility = oldVis;
-                       }
-                       return r;
-               }
-
-               /*
-               PrivateMethod: isVisible
-                       Is the element visible?
-               */
-               function isVisible(elm) {
-                       //this is a bit of a guess, if there's a better way to do this I'm interested!
-                       return elm.offsetWidth ||
-                               elm.offsetHeight;
-               }
-
-               /*
-               PrivateMethod: getCssValue
-                       Get a computed css property
-
-               Arguments:
-                       elm - element
-                       prop - css property or array of properties to add together
-
-               Returns:
-                       String, value
-               */
-               function getCssValue(elm, prop) {
-                       var r, //return value
-                               total = 0,
-                               i = 0,
-                               propLen = prop.length,
-                               compStyle = doc.defaultView && (doc.defaultView.getComputedStyle(elm, null) || doc.defaultView.getComputedStyle),
-                               elmCurrentStyle = elm.currentStyle,
-                               oldDisplay,
-                               match,
-                               propTest = prop.push || cssPropRegex.exec(prop) || [];
-
-
-                       if (prop.push) { //multiple properties, add them up
-                               for (; i < propLen; i++) {
-                                       total += parseInt( getCssValue(elm, prop[i]), 10 ) || 0;
-                               }
-                               return total + "px";
-                       }
-                       
-                       if (propTest[1]) { // is width / height
-                               if (!isVisible(elm)) { //element may be display: none
-                                       return tempBlock(elm, function() {
-                                               return getElmDimension(elm, propTest[1]) + "px";
-                                       });
-                               }
-                               return getElmDimension(elm, propTest[1]) + "px";
-                       }
-                       else if (propTest[2] //is border-*-width
-                               && glow.env.ie
-                               && getCssValue(elm, "border-" + propTest[3] + "-style") == "none"
-                       ) {
-                               return "0";
-                       }
-                       else if (compStyle) { //W3 Method
-                               //this returns computed values
-                               if (typeof compStyle == "function") {
-                                       //safari returns null for compStyle when element is display:none
-
-                                       oldDisplay = elm.style.display;
-                                       r = tempBlock(elm, function() {
-                                               if (prop == "display") { //get true value for display, since we've just fudged it
-                                                       elm.style.display = oldDisplay;
-                                                       if (!doc.defaultView.getComputedStyle(elm, null)) {
-                                                               return "none";
-                                                       }
-                                                       elm.style.display = "block";
-                                               }
-                                               return getCssValue(elm, prop);
-                                       });
-                               } else {
-                                       // assume equal horizontal margins in safari 3
-                                       // http://bugs.webkit.org/show_bug.cgi?id=13343
-                                       // The above bug doesn't appear to be closed, but it works fine in Safari 4
-                                       if (env.webkit > 500 && env.webkit < 526 && prop == 'margin-right' && compStyle.getPropertyValue('position') != 'absolute') {
-                                               prop = 'margin-left';
-                                       }
-                                       r = compStyle.getPropertyValue(prop);
-                               }
-                       } else if (elmCurrentStyle) { //IE method
-                               if (prop == "opacity") {
-                                       match = /alpha\(opacity=([^\)]+)\)/.exec(elmCurrentStyle.filter);
-                                       return match ? String(parseInt(match[1], 10) / 100) : "1";
-                               }
-                               //this returns cascaded values so needs fixing
-                               r = String(elmCurrentStyle[toStyleProp(prop)]);
-                               if (/^-?[\d\.]+(?!px)[%a-z]+$/i.test(r) && prop != "font-size") {
-                                       r = getPixelValue(elm, r, usesYAxis.test(prop)) + "px";
-                               }
-                       }
-                       //some results need post processing
-                       if (prop.indexOf("color") != -1) { //deal with colour values
-                               r = normaliseCssColor(r).toString();
-                       } else if (r.indexOf("url") == 0) { //some browsers put quotes around the url, get rid
-                               r = r.replace(/\"/g,"");
-                       }
-                       return r;
-               }
-
-               /*
-               PrivateMethod: getPixelValue
-                       Converts a relative value into an absolute pixel value. Only works in IE with Dimension value (not stuff like relative font-size).
-                       Based on some Dean Edwards' code
-
-               Arguments:
-                       element - element used to calculate relative values
-                       value - (string) relative value
-                       useYAxis - (string) calulate relative values to the y axis rather than x
-
-               Returns:
-                       Number
-               */
-               function getPixelValue(element, value, useYAxis) {
-                       // Remember the original values
-                       var axisPos = useYAxis ? "top" : "left",
-                               axisPosUpper = useYAxis ? "Top" : "Left",
-                               elmStyle = element.style,
-                               positionVal = elmStyle[axisPos],
-                               runtimePositionVal = element.runtimeStyle[axisPos],
-                               r;
-                       
-                       // copy to the runtime type to prevent changes to the display
-                       element.runtimeStyle[axisPos] = element.currentStyle[axisPos];
-                       // set value to left / top
-                       elmStyle[axisPos] = value;
-                       // get the pixel value
-                       r = elmStyle["pixel" + axisPosUpper];
-                       
-                       // revert values
-                       elmStyle[axisPos] = positionVal;
-                       element.runtimeStyle[axisPos] = runtimePositionVal;
-                       
-                       return r;
-               }
-
-               /*
-               PrivateMethod: normaliseCssColor
-                       Converts a CSS colour into "rgb(255, 255, 255)" or "transparent" format
-               */
-
-               function normaliseCssColor(val) {
-                       if (/^(transparent|rgba\(0, ?0, ?0, ?0\))$/.test(val)) { return 'transparent'; }
-                       var match, //tmp regex match holder
-                               r, g, b, //final colour vals
-                               hex, //tmp hex holder
-                               mathRound = Math.round,
-                               parseIntFunc = parseInt,
-                               parseFloatFunc = parseFloat;
-
-                       if (match = colorRegex.exec(val)) { //rgb() format, cater for percentages
-                               r = match[2] ? mathRound(((parseFloatFunc(match[1]) / 100) * 255)) : parseIntFunc(match[1]);
-                               g = match[4] ? mathRound(((parseFloatFunc(match[3]) / 100) * 255)) : parseIntFunc(match[3]);
-                               b = match[6] ? mathRound(((parseFloatFunc(match[5]) / 100) * 255)) : parseIntFunc(match[5]);
-                       } else {
-                               if (typeof val == "number") {
-                                       hex = val;
-                               } else if (val.charAt(0) == "#") {
-                                       if (val.length == "4") { //deal with #fff shortcut
-                                               val = "#" + val.charAt(1) + val.charAt(1) + val.charAt(2) + val.charAt(2) + val.charAt(3) + val.charAt(3);
-                                       }
-                                       hex = parseIntFunc(val.slice(1), 16);
-                               } else {
-                                       hex = htmlColorNames[val];
-                               }
-
-                               r = (hex) >> 16;
-                               g = (hex & 0x00ff00) >> 8;
-                               b = (hex & 0x0000ff);
-                       }
-
-                       val = new String("rgb(" + r + ", " + g + ", " + b + ")");
-                       val.r = r;
-                       val.g = g;
-                       val.b = b;
-                       return val;
-               }
-
-               /*
-               PrivateMethod: getTextNodeConcat
-                       Take an element and returns a string of its text nodes combined. This is useful when a browser (Safari 2) goes mad and doesn't return anything for innerText or textContent
-               */
-               function getTextNodeConcat(elm) {
-                       var r = "",
-                               nodes = elm.childNodes,
-                               i = 0,
-                               len = nodes.length;
-                       for (; i < len; i++) {
-                               if (nodes[i].nodeType == 3) { //text
-                                       //this function is used in safari only, string concatination is faster
-                                       r += nodes[i].nodeValue;
-                               } else if (nodes[i].nodeType == 1) { //element
-                                       r += getTextNodeConcat(nodes[i]);
-                               }
-                       }
-                       return r;
-               }
-
-               /*
-               PrivateMethod: getNextOrPrev
-                       This gets the next / previous sibling element of each node in a nodeset
-                       and returns the new nodeset.
-               */
-               function getNextOrPrev(nodelist, dir /* "next" or "previous" */) {
-                       var ret = [],
-                               ri = 0,
-                               nextTmp,
-                               i = 0,
-                               length = nodelist.length;
-
-                       for (; i < length; i++) {
-                               nextTmp = nodelist[i];
-                               while (nextTmp = nextTmp[dir + "Sibling"]) {
-                                       if (nextTmp.nodeType == 1 && nextTmp.nodeName != "!") {
-                                               ret[ri++] = nextTmp;
-                                               break;
-                                       }
-                               }
-                       }
-                       return r.get(ret);
-               }
-               
-               /*
-                Get the 'real' positioned parent for an element, otherwise return null.
-               */
-               function getPositionedParent(elm) {
-                       var offsetParent = elm.offsetParent;
-                       
-                       // get the real positioned parent
-                       // IE places elements with hasLayout in the offsetParent chain even if they're position:static
-                       // Also, <body> and <html> can appear in the offsetParent chain, but we don't want to return them if they're position:static
-                       while (offsetParent && r.get(offsetParent).css("position") == "static") {       
-                               offsetParent = offsetParent.offsetParent;
-                       }
-                       
-                       // sometimes the <html> element doesn't appear in the offsetParent chain, even if it has position:relative
-                       if (!offsetParent && r.get(docElm).css("position") != "static") {
-                               offsetParent = docElm;
-                       }
-                       
-                       return offsetParent || null;
-               }
-               
-               /**
-                @name glow.dom-getScrollOffset
-                @private
-                @description Get the scrollTop / scrollLeft of a particular element
-                @param {Element} elm Element (or window object) to get the scroll position of
-                @param {Boolean} isLeft True if we're dealing with left scrolling, otherwise top
-               */
-               function getScrollOffset(elm, isLeft) {
-                       var r,                  
-                               scrollProp = 'scroll' + (isLeft ? "Left" : "Top");
-                       
-                       // are we dealing with the window object or the document object?
-                       if (elm.window) {
-                               // get the scroll of the documentElement or the pageX/Yoffset
-                               // - some browsers use one but not the other
-                               r = elm.document.documentElement[scrollProp]
-                                       || (isLeft ? elm.pageXOffset : elm.pageYOffset)
-                                       || 0;
-                       }
-                       else {
-                               r = elm[scrollProp];
-                       }
-                       return r;
-               }
-               
-               /**
-                @name glow.dom-setScrollOffset
-                @private
-                @description Set the scrollTop / scrollLeft of a particular element
-                @param {Element} elm Element (or window object) to get the scroll position of
-                @param {Boolean} isLeft True if we're dealing with left scrolling, otherwise top
-                @param {Number} newVal New scroll value
-               */
-               function setScrollOffset(elm, isLeft, newVal) {
-                       
-                       // are we dealing with the window object or the document object?
-                       if (elm.window) {
-                               // we need to get whichever value we're not setting
-                               elm.scrollTo(
-                                       isLeft  ? newVal : getScrollOffset(elm, true),
-                                       !isLeft ? newVal : getScrollOffset(elm, false)
-                               );
-                       }
-                       else {
-                               elm['scroll' + (isLeft ? "Left" : "Top")] = newVal;
-                       }
-               }
-               
-               /**
-                @name glow.dom-scrollOffset
-                @private
-                @description Set/get the scrollTop / scrollLeft of a NodeList
-                @param {glow.dom.NodeList} nodeList Elements to get / set the position of
-                @param {Boolean} isLeft True if we're dealing with left scrolling, otherwise top
-                @param {Number} [val] Val to set (if not provided, we'll get the value)
-                
-                @returns NodeList for sets, Number for gets
-               */
-               function scrollOffset(nodeList, isLeft, val) {
-                       var i = nodeList.length;
-                       
-                       if (val !== undefined) {
-                               while (i--) {
-                                       setScrollOffset(nodeList[i], isLeft, val);
-                               }
-                               return nodeList;
-                       } else {
-                               return getScrollOffset(nodeList[0], isLeft);
-                       }
-               }
-
-               //public
-               var r = {}; //object to be returned
-
-               /**
-               @name glow.dom.get
-               @function
-               @description Returns a {@link glow.dom.NodeList NodeList} from CSS selectors and/or Elements.
-
-               @param {String | String[] | Element | Element[] | glow.dom.NodeList} nodespec+ One or more CSS selector strings, Elements or {@link glow.dom.NodeList NodeLists}.
-
-                       Will also accept arrays of these types, or any combinations thereof.
-
-                       Supported CSS selectors:
-
-                       <ul>
-                               <li>Universal selector "*".</li>
-                               <li>Type selector "div"</li>
-                               <li>Class selector ".myClass"</li>
-                               <li>ID selector "#myDiv"</li>
-                               <li>Child selector "ul > li"</li>
-                               <li>Grouping "div, p"</li>
-                       </ul>
-
-               @returns {glow.dom.NodeList}
-
-               @example
-                       // Nodelist with all links in element with id "nav"
-                       var myNodeList = glow.dom.get("#nav a");
-
-               @example
-                       // NodeList containing the nodes passed in
-                       var myNodeList = glow.dom.get(someNode, anotherNode);
-
-               @example
-                       // NodeList containing elements in the first form
-                       var myNodeList = glow.dom.get(document.forms[0].elements);
-               */
-               r.get = function() {
-                       var r = new glow.dom.NodeList(),
-                               i = 0,
-                               args = arguments,
-                               argsLen = args.length;
-
-                       for (; i < argsLen; i++) {
-                               if (typeof args[i] == "string") {
-                                       r.push(new glow.dom.NodeList().push(doc).get(args[i]));
-                               } else {
-                                       r.push(args[i]);
-                               }
-                       }
-                       return r;
-               };
-
-               /**
-               @name glow.dom.create
-               @function
-               @description Returns a {@link glow.dom.NodeList NodeList} from an HTML fragment.
-
-               @param {String} html An HTML string.
-
-                       All top-level nodes must be elements (i.e. text content in the
-                       HTML must be wrapped in HTML tags).
-
-               @param {Object} [opts] An optional options object
-                       @param {Object} [opts.interpolate] Data for a call to {@link glow.lang.interpolate}
-                               If this option is set, the String html parameter will be passed through glow.lang.interpolate with this as the data and no options
-                               If glow.lang.interpolates options are required, an explicit call must be made
-                       @param {Boolean} [opts.escapeHtml] Escape HTML in the interpolate data object.
-                               See {@link glow.lang.interpolate}
-
-               @returns {glow.dom.NodeList}
-
-               @example
-                       // NodeList of two elements
-                       var myNodeList = glow.dom.create("<div>Hello</div><div>World</div>");
-                       
-               @example
-                       // Nodelist of one list item
-                       var listItem = glow.dom.create('<li>{content}</li>', {
-                               interpolate: {content: textFromUser},
-                               escapeHtml: true
-                       });
-                       // if testFromUser contains HTML, it will be correctly escaped
-                       // before being inserted into the li
-               */
-               r.create = function(sHtml, opts) {
-                       var ret = [],
-                               i = 0,
-                               rLen = 0,
-                               toCheck;
-                       
-                       // set default options
-                       opts = glow.lang.apply({
-                               interpolate: null,
-                               escapeHtml: false
-                       }, opts || {});
-                       
-                       if (opts.interpolate) {
-                               sHtml = lang.interpolate(sHtml, opts.interpolate, {
-                                       escapeHtml: opts.escapeHtml
-                               });
-                       }
-                       
-                       toCheck = stringToNodes(sHtml);
-                       
-                       for (; toCheck[i]; i++) {
-                               if (toCheck[i].nodeType == 1 && toCheck[i].nodeName != "!") {
-                                       ret[rLen++] = toCheck[i];
-                               } else if (toCheck[i].nodeType == 3 && lang.trim(toCheck[i].nodeValue) !== "") {
-                                       throw new Error("glow.dom.create - Text must be wrapped in an element");
-                               }
-                       }
-                       return new r.NodeList().push(ret);
-               };
-
-               /**
-               @name glow.dom.parseCssColor
-               @function
-               @description Returns an object representing a CSS colour string.
-
-               @param {String} color A CSS colour.
-
-                       Examples of valid values are "red", "#f00", "#ff0000",
-                       "rgb(255,0,0)", "rgb(100%, 0%, 0%)"
-
-               @returns {Object}
-
-                       An object with properties named "r", "g" and "b", each will have
-                       an integer value between 0 and 255.
-
-               @example
-                       glow.dom.parseCssColor("#ff0000");
-                       // returns {r:255, g:0, b:0}
-               */
-               r.parseCssColor = function(cssColor) {
-                       var normal = normaliseCssColor(cssColor);
-                       return {r: normal.r, g: normal.g, b: normal.b};
-               }
-
-               /**
-               @name glow.dom.NodeList
-               @class
-               @description An array-like collection of DOM Elements.
-
-                       It is recommended you create a NodeList using {@link glow.dom.get glow.dom.get},
-                       or {@link glow.dom.create glow.dom.create}, but you can also use
-                       the constructor to create an empty NodeList.
-
-                       Unless otherwise specified, all methods of NodeList return the
-                       NodeList itself, allowing you to chain methods calls together.
-
-               @example
-                       // empty NodeList
-                       var nodes = new glow.dom.NodeList();
-
-               @example
-                       // using get to return a NodeList then chaining methods
-                       glow.dom.get("p").addClass("eg").append("<b>Hello!</b>");
-
-               @see <a href="../furtherinfo/creatingnodelists/">Creating NodeLists</a>
-               @see <a href="../furtherinfo/workingwithnodelists/">Working with NodeLists</a>
-               @see <a href="../furtherinfo/xmlnodelists/">XML NodeLists</a>
-               */
-               r.NodeList = function() {
-
-                       /**
-                       @name glow.dom.NodeList#length
-                       @type Number
-                       @description Number of nodes in the NodeList
-                       @example
-                               // get the number of paragraphs on the page
-                               glow.dom.get("p").length;
-                       */
-                       this.length = 0; //number of elements in NodeList
-               };
-
-               /*
-                       Group: Methods
-               */
-               r.NodeList.prototype = {
-
-                       /**
-                       @name glow.dom.NodeList#item
-                       @function
-                       @description Returns a node from the NodeList.
-
-                       @param {Number} index The numeric index of the node to return.
-
-                       @returns {Element}
-
-                       @example
-                               // get the fourth node
-                               var node = myNodeList.item(3);
-
-                       @example
-                               // another way to get the fourth node
-                               var node = myNodeList[3];
-                       */
-                       item: function (nIndex) {
-                               return this[nIndex];
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#push
-                       @function
-                       @description Adds Elements to the NodeList.
-
-                       @param {Element | Element[] | glow.dom.NodeList} nodespec+ One or more Elements, Arrays of Elements or NodeLists.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               var myNodeList = glow.dom.create("<div>Hello world</div>");
-                               myNodeList.push("<div>Foo</div>", glow.dom.get("#myList li"));
-                       */
-                       push: function() {
-                               var args = arguments,
-                                       argsLen = args.length,
-                                       i = 0,
-                                       n,
-                                       nNodeListLength,
-                                       that = this,
-                                       arrayPush = Array.prototype.push;
-
-                               for (; i < argsLen; i++) {
-                                       if (!args[i]) {
-                                               continue;
-                                       } else if (args[i].nodeType == 1 || args[i].nodeType == 9 || args[i].document) { //is Node
-                                               arrayPush.call(that, args[i]);
-                                       } else if (args[i][0]) { //is array or array like
-                                               for (n = 0, nNodeListLength = args[i].length; n < nNodeListLength; n++) {
-                                                       arrayPush.call(that, args[i][n]);
-                                               }
-                                       }
-                               }
-                               return that;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#each
-                       @function
-                       @description Calls a function for each node.
-
-                               The supplied function will be called for each node in the NodeList.
-                               
-                               The index of the node will be provided as the first parameter, and
-                               'this' will refer to the node.
-
-                       @param {Function} callback The function to run for each node.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               var myNodeList = glow.dom.get("a");
-                               myNodeList.each(function(i){
-                                       // in this function: this == myNodeList[i]
-                               });
-                       */
-                       each: function (callback) {
-                               for (var i = 0, that = this, length = that.length; i < length; i++) {
-                                       callback.call(that[i], i, that);
-                               }
-                               return that;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#eq
-                       @function
-                       @description Compares the NodeList to an element, array of elements or another NodeList
-
-                                       Returns true if the items are the same and are in the same
-                                       order.
-
-                       @param {Element | Element[] | glow.dom.NodeList} nodespec The element, array or NodeList the NodeList is being compared to.
-
-                       @returns {Boolean}
-
-                       @example
-                               // the following returns true
-                               glow.dom.get('#blah').eq( document.getElementById('blah') );
-                       */
-                       eq: function (nodelist) {
-                               var that = this, i = 0, length = that.length;
-
-                               if (! nodelist.push) { nodelist = [nodelist]; }
-                               if (nodelist.length != that.length) { return false; }
-                               for (; i < length; i++) {
-                                       if (that[i] != nodelist[i]) { return false; }
-                               }
-                               return true;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#isWithin
-                       @function
-                       @description Tests if all the nodes are decendents of an element.
-
-                       @param {Element | glow.dom.NodeList} nodespec The element or NodeList that the NodeList is being tested against.
-
-                               If nodespec is a NodeList, then the its first node will be used.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               var myNodeList = glow.dom.get("input");
-                               if (myNodeList.isWithin(glow.dom.get("form")) {
-                                       // do something
-                               }
-                       */
-                       isWithin: function (node) {
-                               if (node.push) { node = node[0]; }
-                               
-                               // missing some nodes? Return false
-                               if ( !node || !this.length ) { return false; }
-                               
-                               var that = this,
-                                       i = 0,
-                                       length = that.length,
-                                       toTest; //node to test in manual method
-
-                               if (node.contains && env.webkit >= 521) { //proprietary method, safari 2 has a wonky implementation of this, avoid, avoid, avoid
-                                       //loop through
-                                       for (; i < length; i++) {
-                                               // myNode.contains(myNode) returns true in most browsers
-                                               if (!(node.contains(that[i]) && that[i] != node)) { return false; }
-                                       }
-                               } else if (that[0].compareDocumentPosition) { //w3 method
-                                       //loop through
-                                       for (; i < length; i++) {
-                                               //compare against bitmask
-                                               if (!(that[i].compareDocumentPosition(node) & 8)) { return false; }
-                                       }
-                               } else { //manual method
-                                       for (; i < length; i++) {
-                                               toTest = that[i];
-                                               while (toTest = toTest.parentNode) {
-                                                       if (toTest == node) { break; }
-                                               }
-                                               if (!toTest) { return false; }
-                                       }
-                               }
-                               return true;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#attr
-                       @function
-                       @description Gets or sets attributes
-
-                               When getting an attribute, it is retrieved from the first
-                               node in the NodeList. Setting attributes applies the change
-                               to each element in the NodeList.
-
-                               To set an attribute, pass in the name as the first
-                               parameter and the value as a second parameter.
-
-                               To set multiple attributes in one call, pass in an object of
-                               name/value pairs as a single parameter.
-
-                               For browsers that don't support manipulating attributes
-                               using the DOM, this method will try to do the right thing
-                               (i.e. don't expect the semantics of this method to be
-                               consistent across browsers as this is not possible with
-                               currently supported browsers).
-
-                       @param {String | Object} name The name of the attribute, or an object of name/value pairs
-                       @param {String} [value] The value to set the attribute to.
-
-                       @returns {String | glow.dom.NodeList}
-
-                               When setting attributes it returns the NodeList, otherwise
-                               returns the attribute value.
-
-                       @example
-                               var myNodeList = glow.dom.get(".myImgClass");
-
-                               // get an attribute
-                               myNodeList.attr("class");
-
-                               // set an attribute
-                               myNodeList.attr("class", "anotherImgClass");
-
-                               // set multiple attributes
-                               myNodeList.attr({
-                                 src: "a.png",
-                                 alt: "Cat jumping through a field"
-                               });
-                       */
-                       attr: function (name /* , val */) {
-                               var that = this,
-                                       args = arguments,
-                                       argsLen = args.length,
-                                       i,
-                                       value;
-
-                               if (that.length === 0) {
-                                       return argsLen > 1 ? that : undefined;
-                               }
-                               if (typeof name == 'object') {
-                                       for (i in name) {
-                                               if (lang.hasOwnProperty(name, i)) {
-                                                       that.attr(i, name[i]);
-                                               }
-                                       }
-                                       return that;
-                               }
-                               if (env.ie && dom0PropertyMapping[name]) {
-                                       if (argsLen > 1) {
-                                               setAttribute.call(
-                                                       that,
-                                                       args[1],
-                                                       // in the callback this is the dom node
-                                                       function (val) { this[dom0PropertyMapping[name]] = val; }
-                                               );
-                                               return that;
-                                       }
-                                       value = that[0][dom0PropertyMapping[name]];
-                                       if (dom0BooleanAttribute[name]) {
-                                               return value ? name : undefined;
-                                       }
-                                       else if (dom0AttributeMappings[name]) {
-                                               return dom0AttributeMappings[name](value);
-                                       }
-                                       return value;
-                               }
-                               if (argsLen > 1) {
-                                       setAttribute.call(
-                                               that,
-                                               args[1],
-                                               // in the callback this is the dom node
-                                               function (val) { this.setAttribute(name, val); }
-                                       );
-                                       return that;
-                               }
-                               //2nd parameter makes IE behave, but errors for XML nodes (and isn't needed for xml nodes)
-                               return isXml(that[0]) ? that[0].getAttribute(name) : that[0].getAttribute(name, 2);
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#removeAttr
-                       @function
-                       @description Removes an attribute from each node.
-
-                       @param {String} name The name of the attribute to remove.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               glow.dom.get("a").removeAttr("target");
-                       */
-                       removeAttr: function (name) {
-                               var mapping = env.ie && dom0PropertyMapping[name],
-                                       that = this,
-                                       i = 0,
-                                       length = that.length;
-
-                               for (; i < length; i++) {
-                                       if (mapping) {
-                                               that[i][mapping] = "";
-                                       } else {
-                                               that[i].removeAttribute(name);
-                                       }
-                               }
-                               return that;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#hasAttr
-                       @function
-                       @description Does the node have a particular attribute?
-                               
-                               The first node in the NodeList is tested
-                               
-                       @param {String} name The name of the attribute to test for.
-
-                       @returns {Boolean}
-
-                       @example
-                               if ( glow.dom.get("#myImg").hasAttr("alt") ){
-                                       // ...
-                               }
-                       */
-                       hasAttr: function (name) {
-                               var firstNode = this[0],
-                                       attributes = firstNode.attributes;
-
-                               if (isXml(firstNode) && env.ie) { //getAttributeNode not supported for XML
-                                       var attributes = firstNode.attributes,
-                                               i = 0,
-                                               len = attributes.length;
-
-                                       //named node map doesn't seem to work properly, so need to go by index
-                                       for (; i < len; i++) {
-                                               if (attributes[i].nodeName == name) {
-                                                       return attributes[i].specified;
-                                               }
-                                       }
-                                       return false;
-                               } else if (this[0].getAttributeNode) {
-                                       var attr = this[0].getAttributeNode(name);
-                                       return attr ? attr.specified : false;
-                               }
-
-                               return typeof attributes[attr] != "undefined";
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#prop
-                       @function
-                       @description Gets or sets node peropties
-                       
-                               This function gets / sets node properties, to get attributes,
-                               see {@link glow.dom.NodeList#attr NodeList#attr}.
-                               
-                               When getting a property, it is retrieved from the first
-                               node in the NodeList. Setting properties to each element in
-                               the NodeList.
-                               
-                               To set multiple properties in one call, pass in an object of
-                               name/value pairs.
-                               
-                       @param {String | Object} name The name of the property, or an object of name/value pairs
-                       @param {String} [value] The value to set the property to.
-
-                       @returns {String | glow.dom.NodeList}
-
-                               When setting properties it returns the NodeList, otherwise
-                               returns the property value.
-
-                       @example
-                               var myNodeList = glow.dom.get("#formElement");
-
-                               // get the node name
-                               myNodeList.prop("nodeName");
-
-                               // set a property
-                               myNodeList.prop("_secretValue", 10);
-
-                               // set multiple properties
-                               myNodeList.prop({
-                                       checked: true,
-                                       _secretValue: 10
-                               });
-                       */
-                       prop: function(name, val) {
-                               
-                               // setting multiple
-                               if (name.constructor === Object) {
-                                       var hash = name,
-                                               key;
-                                       
-                                       // loop through hash
-                                       for (key in hash) {
-                                               this.prop(key, hash[key]);
-                                       }
-                                       return this;
-                               }
-                               
-                               // setting single (to all in the NodeList)
-                               if (val !== undefined) {
-                                       var i = this.length;
-                                       while (i--) {
-                                               this[i][name] = val;
-                                       }
-                                       return this;
-                               }
-                               
-                               // getting
-                               if (!this[0]) { return undefined; }
-                               return this[0][name];
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#hasClass
-                       @function
-                       @description Tests if a node has a given class.
-
-                               Will return true if any node in the NodeList has the supplied class
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                       @param {String} name The name of the class to test for.
-
-                       @returns {Boolean}
-
-                       @example
-                               if (glow.dom.get("a").hasClass("termsLink")){
-                                       // ...
-                               }
-                       */
-                       hasClass: function (name) {
-                               for (var i = 0, length = this.length; i < length; i++) {
-                                       if ((" " + this[i].className + " ").indexOf(" " + name + " ") != -1) {
-                                               return true;
-                                       }
-                               }
-                               return false;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#addClass
-                       @function
-                       @description Adds a class to each node.
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                       @param {String} name The name of the class to add.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               glow.dom.get("#login a").addClass("highlight");
-                       */
-                       addClass: function (name) {
-                               for (var i = 0, length = this.length; i < length; i++) {
-                                       if ((" " + this[i].className + " ").indexOf(" " + name + " ") == -1) {
-                                               this[i].className += ((this[i].className)? " " : "") + name;
-                                       }
-                               }
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#removeClass
-                       @function
-                       @description Removes a class from each node.
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                       @param {String} name The name of the class to remove.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               glow.dom.get("#footer #login a").removeClass("highlight");
-                       */
-                       removeClass: function (name) {
-                               var re = removeClassRegex(name),
-                                       that = this,
-                                       i = 0,
-                                       length = that.length;
-
-                               for (; i < length; i++) {
-                                       that[i].className = that[i].className.replace(re, " ");
-                               }
-                               return that;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#toggleClass
-                       @function
-                       @description Toggles a class on each node.
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                       @param {String} name The name of the class to toggle.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               glow.dom.get(".onOffSwitch").toggleClass("on");
-                        */
-                       toggleClass: function (name) {
-                               var i = this.length,
-                                       paddedClassName,
-                                       paddedName = " " + name + " ";
-                                       
-                               while (i--) {
-                                       paddedClassName = " " + this[i].className + " ";
-                                       
-                                       if (paddedClassName.indexOf(paddedName) != -1) {
-                                               this[i].className = paddedClassName.replace(paddedName, " ");
-                                       } else {
-                                               this[i].className += " " + name;
-                                       }
-                               }
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#val
-                       @function
-                       @description Gets or sets form values for the first node.
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                               <p><em>Getting values from form elements</em></p>
-
-                               The returned value depends on the type of element, see below:
-
-                               <dl>
-                               <dt>Radio button or checkbox</dt>
-                               <dd>If checked, then the contents of the value attribute, otherwise an empty string.</dd>
-                               <dt>Select</dt>
-                               <dd>The contents of value attribute of the selected option</dd>
-                               <dt>Select (multiple)</dt>
-                               <dd>An array of selected option values.</dd>
-                               <dt>Other form element</dt>
-                               <dd>The value of the input.</dd>
-                               </dl>
-
-                               <p><em>Getting values from a form</em></p>
-
-                               If the first element in the NodeList is a form, then an
-                               object is returned containing the form data. Each item
-                               property of the object is a value as above, apart from when
-                               multiple elements of the same name exist, in which case the
-                               it will contain an array of values.
-
-                               <p><em>Setting values for form elements</em></p>
-
-                               If a value is passed and the first element of the NodeList
-                               is a form element, then the form element is given that value.
-                               For select elements, this means that the first option that
-                               matches the value will be selected. For selects that allow
-                               multiple selection, the options which have a value that
-                               exists in the array of values/match the value will be
-                               selected and others will be deselected.
-
-                               Currently checkboxes and radio buttons are not checked or
-                               unchecked, just their value is changed. This does mean that
-                               this does not do exactly the reverse of getting the value
-                               from the element (see above) and as such may be subject to
-                               change
-
-                               <p><em>Setting values for forms</em></p>
-
-                               If the first element in the NodeList is a form and the
-                               value is an object, then each element of the form has its
-                               value set to the corresponding property of the object, using
-                               the method described above.
-
-                       @param {String | Object} [value] The value to set the form element/elements to.
-
-                       @returns {glow.dom.NodeList | String | Object}
-
-                               When used to set a value it returns the NodeList, otherwise
-                               returns the value as described above.
-
-                       @example
-                               // get a value
-                               var username = glow.dom.get("input#username").val();
-
-                       @example
-                               // get values from a form
-                               var userDetails = glow.dom.get("form").val();
-
-                       @example
-                               // set a value
-                               glow.dom.get("input#username").val("example username");
-
-                       @example
-                               // set values in a form
-                               glow.dom.get("form").val({
-                                       username : "another",
-                                       name     : "A N Other"
-                               });
-                       */
-                       val: function () {
-
-                               /*
-                               PrivateFunction: elementValue
-                                       Get a value for a form element.
-                               */
-                               function elementValue (el) {
-                                       var elType = el.type,
-                                               elChecked = el.checked,
-                                               elValue = el.value,
-                                               vals = [],
-                                               i = 0;
-
-                                       if (elType == "radio") {
-                                               return elChecked ? elValue : "";
-                                       } else if (elType == "checkbox") {
-                                               return elChecked ? elValue : "";
-
-                                       } else if (elType == "select-one") {
-                                               return el.selectedIndex > -1 ?
-                                                       el.options[el.selectedIndex].value : "";
-
-                                       } else if (elType == "select-multiple") {
-                                               for (var length = el.options.length; i < length; i++) {
-                                                       if (el.options[i].selected) {
-                                                               vals[vals.length] = el.options[i].value;
-                                                       }
-                                               }
-                                               return vals;
-                                       } else {
-                                               return elValue;
-                                       }
-                               }
-
-                               /*
-                               PrivateMethod: formValues
-                                       Get an object containing form data.
-                               */
-                               function formValues (form) {
-                                       var vals = {},
-                                               radios = {},
-                                               formElements = form.elements,
-                                               i = 0,
-                                               length = formElements.length,
-                                               name,
-                                               formElement,
-                                               j,
-                                               radio,
-                                               nodeName;
-
-                                       for (; i < length; i++) {
-                                               formElement = formElements[i];
-                                               nodeName = formElement.nodeName.toLowerCase();
-                                               name = formElement.name;
-                                               
-                                               // fieldsets & objects come back as form elements, but we don't care about these
-                                               // we don't bother with fields that don't have a name
-                                               // switch to whitelist?
-                                               if (
-                                                       nodeName == "fieldset" ||
-                                                       nodeName == "object" ||
-                                                       !name
-                                               ) { continue; }
-
-                                               if (formElement.type == "checkbox" && ! formElement.checked) {
-                                                       if (! name in vals) {
-                                                               vals[name] = undefined;
-                                                       }
-                                               } else if (formElement.type == "radio") {
-                                                       if (radios[name]) {
-                                                               radios[name][radios[name].length] = formElement;
-                                                       } else {
-                                                               radios[name] = [formElement];
-                                                       }
-                                               } else {
-                                                       var value = elementValue(formElement);
-                                                       if (name in vals) {
-                                                               if (vals[name].push) {
-                                                                       vals[name][vals[name].length] = value;
-                                                               } else {
-                                                                       vals[name] = [vals[name], value];
-                                                               }
-                                                       } else {
-                                                               vals[name] = value;
-                                                       }
-                                               }
-                                       }
-                                       for (i in radios) {
-                                               j = 0;
-                                               for (length = radios[i].length; j < length; j++) {
-                                                       radio = radios[i][j];
-                                                       name = radio.name;
-                                                       if (radio.checked) {
-                                                               vals[radio.name] = radio.value;
-                                                               break;
-                                                       }
-                                               }
-                                               if (! name in vals) { vals[name] = undefined; }
-                                       }
-                                       return vals;
-                               }
-
-                               /*
-                               PrivateFunction: setFormValues
-                                       Set values of a form to those in passed in object.
-                               */
-                               function setFormValues (form, vals) {
-                                       var prop, currentField,
-                                               fields = {},
-                                               storeType, i = 0, n, len, foundOne, currentFieldType;
-
-                                       for (prop in vals) {
-                                               currentField = form[prop];
-                                               if (currentField && currentField[0] && !currentField.options) { // is array of fields
-                                                       //normalise values to array of vals
-                                                       vals[prop] = vals[prop] && vals[prop].push ? vals[prop] : [vals[prop]];
-                                                       //order the fields by types that matter
-                                                       fields.radios = [];
-                                                       fields.checkboxesSelects = [];
-                                                       fields.multiSelects = [];
-                                                       fields.other = [];
-
-                                                       for (i = 0; currentField[i]; i++) {
-                                                               currentFieldType = currentField[i].type;
-                                                               if (currentFieldType == "radio") {
-                                                                       storeType = "radios";
-                                                               } else if (currentFieldType == "select-one" || currentFieldType == "checkbox") {
-                                                                       storeType = "checkboxesSelects";
-                                                               } else if (currentFieldType == "select-multiple") {
-                                                                       storeType = "multiSelects";
-                                                               } else {
-                                                                       storeType = "other";
-                                                               }
-                                                               //add it to the correct array
-                                                               fields[storeType][fields[storeType].length] = currentField[i];
-                                                       }
-
-                                                       for (i = 0; fields.multiSelects[i]; i++) {
-                                                               vals[prop] = setValue(fields.multiSelects[i], vals[prop]);
-                                                       }
-                                                       for (i = 0; fields.checkboxesSelects[i]; i++) {
-                                                               setValue(fields.checkboxesSelects[i], "");
-                                                               for (n = 0, len = vals[prop].length; n < len; n++) {
-                                                                       if (setValue(fields.checkboxesSelects[i], vals[prop][n])) {
-                                                                               vals[prop].slice(n, 1);
-                                                                               break;
-                                                                       }
-                                                               }
-                                                       }
-                                                       for (i = 0; fields.radios[i]; i++) {
-                                                               fields.radios[i].checked = false;
-                                                               foundOne = false;
-                                                               for (n = 0, len = vals[prop].length; n < len; n++) {
-                                                                       if (setValue(fields.radios[i], vals[prop][n])) {
-                                                                               vals[prop].slice(n, 1);
-                                                                               foundOne = true;
-                                                                               break;
-                                                                       }
-                                                                       if (foundOne) { break; }
-                                                               }
-                                                       }
-                                                       for (i = 0; fields.other[i] && vals[prop][i] !== undefined; i++) {
-                                                               setValue(fields.other[i], vals[prop][i]);
-                                                       }
-                                               } else if (currentField && currentField.nodeName) { // is single field, easy
-                                                       setValue(currentField, vals[prop]);
-                                               }
-                                       }
-                               }
-
-                               /*
-                               PrivateFunction: setValue
-                                       Set the value of a form element.
-
-                               Returns:
-                                       values that weren't able to set if array of vals passed (for multi select). Otherwise true if val set, false if not
-                               */
-                               function setValue (el, val) {
-                                       var i = 0,
-                                               length,
-                                               n = 0,
-                                               nlen,
-                                               elOption,
-                                               optionVal;
-
-                                       if (el.type == "select-one") {
-                                               for (length = el.options.length; i < length; i++) {
-                                                       if (el.options[i].value == val) {
-                                                               el.selectedIndex = i;
-                                                               return true;
-                                                       }
-                                               }
-                                               return false;
-                                       } else if (el.type == "select-multiple") {
-                                               var isArray = !!val.push;
-                                               for (i = 0, length = el.options.length; i < length; i++) {
-                                                       elOption = el.options[i];
-                                                       optionVal = elOption.value;
-                                                       if (isArray) {
-                                                               elOption.selected = false;
-                                                               for (nlen = val.length; n < nlen; n++) {
-                                                                       if (optionVal == val[n]) {
-                                                                               elOption.selected = true;
-                                                                               val.splice(n, 1);
-                                                                               break;
-                                                                       }
-                                                               }
-                                                       } else {
-                                                               return elOption.selected = val == optionVal;
-                                                       }
-                                               }
-                                               return false;
-                                       } else if (el.type == "radio" || el.type == "checkbox") {
-                                               el.checked = val == el.value;
-                                               return val == el.value;
-                                       } else {
-                                               el.value = val;
-                                               return true;
-                                       }
-                               }
-
-                               // toplevel implementation
-                               return function (/* [value] */) {
-                                       var args = arguments,
-                                               val = args[0],
-                                               that = this,
-                                               i = 0,
-                                               length = that.length;
-
-                                       if (args.length === 0) {
-                                               return that[0].nodeName == 'FORM' ?
-                                                       formValues(that[0]) :
-                                                       elementValue(that[0]);
-                                       }
-                                       if (that[0].nodeName == 'FORM') {
-                                               if (! typeof val == 'object') {
-                                                       throw 'value for FORM must be object';
-                                               }
-                                               setFormValues(that[0], val);
-                                       } else {
-                                               for (; i < length; i++) {
-                                                       setValue(that[i], val);
-                                               }
-                                       }
-                                       return that;
-                               };
-                       }(),
-
-                       /**
-                       @name glow.dom.NodeList#slice
-                       @function
-                       @description Extracts nodes from a NodeList and returns them as a new NodeList.
-
-                       @param {Number} start The NodeList index at which to begin extraction.
-
-                               If negative, this param specifies a position measured from
-                               the end of the NodeList
-
-                       @param {Number} [end] The NodeList index immediately after the end of the extraction.
-
-                               If not specified the extraction includes all nodes from the
-                               start to the end of the NodeList. A Negative end specifies
-                               an position measured from the end of the NodeList.
-
-                       @returns {glow.dom.NodeList}
-
-                               Returns a new NodeList containing the extracted nodes
-
-                       @example
-                               var myNodeList = glow.dom.create("<div></div><div></div>");
-                               myNodeList = myNodeList.slice(1, 2); // just second div
-                        */
-                       slice: function (/* start, end */) {
-                               return new r.NodeList().push(Array.prototype.slice.apply(this, arguments));
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#sort
-                       @function
-                       @description Returns a new NodeList containing the same nodes in order.
-
-                               Sort order defaults to document order if no sort function is passed in.
-
-                       @param {Function} [func] Function to determine sort order
-
-                               This function will be passed 2 nodes (a, b). The function
-                               should return a number less than 0 to sort a lower than b
-                               and greater than 0 to sort a higher than b.
-
-                       @returns {glow.dom.NodeList}
-
-                               Returns a new NodeList containing the sorted nodes
-
-                       @example
-                               // heading elements in document order
-                               var headings = glow.dom.get("h1, h2, h3, h4, h5, h6").sort();
-
-                               //get links in alphabetical (well, lexicographical) order
-                               var links = glow.dom.get("a").sort(function(a, b) {
-                                       return ((a.textContent || a.innerText) < (b.textContent || b.innerText)) ? -1 : 1;
-                               })
-                       */
-                       sort: function(func) {
-                               var that = this, i=0, aNodes;
-
-                               if (!that.length) { return that; }
-                               if (!func) {
-                                       if (typeof that[0].sourceIndex == "number") {
-                                               // sourceIndex is IE proprietary (but Opera supports)
-                                               func = function(a, b) {
-                                                       return a.sourceIndex - b.sourceIndex;
-                                               };
-                                       } else if (that[0].compareDocumentPosition) {
-                                               // DOM3 method
-                                               func = function(a, b) {
-                                                       return 3 - (a.compareDocumentPosition(b) & 6);
-                                               };
-                                       } else {
-                                               // js emulation of sourceIndex
-                                               aNodes = getByTagName("*", [doc]);
-                                               for (; aNodes[i]; i++) {
-                                                       aNodes[i]._sourceIndex = i;
-                                               }
-                                               func = function(a, b) {
-                                                       return a._sourceIndex - b._sourceIndex;
-                                               };
-                                       }
-                               }
-
-                               return r.get([].sort.call(that, func));
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#filter
-                       @function
-                       @description Filter the NodeList using a function
-
-                               The supplied function will be called for each node in the NodeList.
-                               
-                               The index of the node will be provided as the first parameter, and
-                               'this' will refer to the node.
-                               
-                               Return true to keep the node, or false to remove it.
-
-                       @param {Function} func Function to test each node
-
-                       @returns {glow.dom.NodeList}
-
-                               Returns a new NodeList containing the filtered nodes
-
-                       @example
-                               // return images with a width greater than 320
-                               glow.dom.get("img").filter(function (i) {
-                                       return this.width > 320;
-                               });
-                        */
-                       filter: function(callback) {
-                               var ret = [], //result
-                                       ri = 0,
-                                       i = 0,
-                                       length = this.length;
-                               for (; i < length; i++) {
-                                       if (callback.apply(this[i], [i])) {
-                                               ret[ri++] = this[i];
-                                       }
-                               }
-                               return r.get(ret);
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#children
-                       @function
-                       @description Gets the child elements of each node as a new NodeList.
-
-                       @returns {glow.dom.NodeList}
-
-                               Returns a new NodeList containing all the child nodes
-
-                       @example
-                               // get all list items
-                               var items = glow.dom.get("ul, ol").children();
-                        */
-                       children: function() {
-                               var ret = [],
-                                       ri = 0,
-                                       i = 0,
-                                       n = 0,
-                                       length = this.length,
-                                       childTmp;
-                               
-                               for (; i < length; i++) {
-                                       ret = ret.concat( getChildElms(this[i]) );
-                               }
-                               return r.get(ret);
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#parent
-                       @function
-                       @description Gets the unique parent nodes of each node as a new NodeList.
-                       The given nodelist will always be placed in the first element with no child elements.
-
-                       @returns {glow.dom.NodeList}
-
-                               Returns a new NodeList containing the parent nodes, with
-                               duplicates removed
-
-                       @example
-                               // elements which contain links
-                               var parents = glow.dom.get("a").parent();
-                       */
-                       parent: function() {
-                               var ret = [],
-                                       ri = 0,
-                                       i = 0,
-                                       length = this.length;
-
-                               for (; i < length; i++) {
-                                       ret[ri++] = this[i].parentNode;
-                               }
-                               
-                               return r.get(unique(ret));
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#ancestors
-                       @function
-                       @description Gets the unique ancestor nodes of each node as a new NodeList.
-
-                       @returns {glow.dom.NodeList}
-
-                               Returns NodeList
-
-                       @example
-                               // get ancestor elements for anchor elements 
-                               var ancestors = glow.dom.get("a").ancestors();
-                       */
-                       ancestors: function() {
-                               var ret = [],
-                                       ri = 0,
-                                       i = 0,
-                                       length = this.length,
-                                       elm;
-                                       
-                               while (i < length) {
-                                       elm = this[i].parentNode;
-                                       
-                                       while (elm && elm.nodeType == 1) {                                                      
-                                               ret[ri++] = elm;
-                                               elm = elm.parentNode;
-                                       }                                                               
-                                       i++;
-                               }
-                               
-                               return r.get(unique(ret));
-                       },
-                       
-                       
-                       /**
-                       @name glow.dom.NodeList#wrap
-                       @function
-                       @description Wraps the given NodeList with the specified element(s).
-                       
-                               The given NodeList items will always be placed in the first child node that contains no further element nodes.
-                               
-                               Each item in a given NodeList will be wrapped individually.
-
-                       @returns {glow.dom.NodeList}
-
-                               Returns the NodeList with new wrapper parents
-
-                       @example
-                               // wrap the given element 
-                               glow.dom.get("p").wrap("<div></div>");
-                               // <div><p></p></div>
-                       */
-                       wrap: function(wrapper) {
-                               var length = this.length,
-                                       childElm,
-                                       parent,
-                                       wrappingNodes;
-                                       
-                               if (typeof wrapper == 'string') {
-                                       wrappingNodes = r.create(wrapper);
-                               }
-                               else {
-                                       wrappingNodes = r.get(wrapper);
-                               }
-                                               
-                               for (i=0; i < length; i++) {                                    
-                                       parent = wrappingNodes[0];
-                                       
-                                       while (parent) {                                        
-                                               childElm = getFirstChildElm(parent);
-                                                       
-                                               if (childElm) {                                 
-                                                       parent = childElm;
-                                               }
-                                               else {
-                                                       break;
-                                               }
-                                       }                                                       
-                                       
-                                       if (this[i].parentNode) {                                               
-                                               wrappingNodes.insertBefore(this[i]);                                                                                                    
-                                       }
-                                       // If wrapping multiple nodes, we need to take a clean copy of the wrapping nodes
-                                       if (i != length-1) {
-                                               wrappingNodes = wrappingNodes.clone();
-                                       }
-                                       
-                                       parent.appendChild(this[i]);
-
-                               }
-                               
-                               return this;
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#unwrap
-                       @function
-                       @description Removes the first unique parent for each item of a supplied NodeList
-
-                       @returns {glow.dom.NodeList}
-
-                               Returns the unwrapped NodeList
-
-                       @example
-                               // Before: <div><div><p></p></div></div>
-                               // unwrap the given element
-                               glow.dom.get("p").unwrap();
-                               // After: <div><p></p></div>
-                       */
-                       unwrap: function() {
-                               var toRemove,
-                                       nodesToRemove = this.parent(),
-                                       length = nodesToRemove.length;
-                               
-                               for (i=0; i < length; i++) {                            
-                                       toRemove = nodesToRemove.slice(i, i+1);
-                                       // if the item we're removing has no new parent (i.e. is not in document), then we just remove the child and destroy the old parent
-                                       if (!toRemove[0].parentNode){
-                                               toRemove.children().remove();
-                                               toRemove.destroy();
-                                       }
-                                       else {
-                                               toRemove.children().insertBefore(toRemove);
-                                               toRemove.destroy();                                                     
-                                       }                                               
-
-                               }
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#next
-                       @function
-                       @description Gets the next sibling element for each node as a new NodeList.
-
-                       @returns {glow.dom.NodeList}
-
-                               A new NodeList containing the next sibling elements.
-
-                       @example
-                               // gets the element following #myLink (if there is one)
-                               var next = glow.dom.get("#myLink").next();
-                       */
-                       next: function() {
-                               return getNextOrPrev(this, "next");
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#prev
-                       @function
-                       @description Gets the previous sibling element for each node as a new NodeList.
-
-                       @returns {glow.dom.NodeList}
-
-                               A new NodeList containing the previous sibling elements.
-
-                       @example
-                               // gets the elements before #myLink (if there is one)
-                               var previous = glow.dom.get("#myLink").previous();
-                       */
-                       prev: function() {
-                               return getNextOrPrev(this, "previous");
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#is
-                       @function
-                       @description Tests if all the nodes match a CSS selector.
-                       
-                               Jake: I'm deprecating this until we have time to make it faster (probably when we change our CSS selector engine)
-                       
-                       @deprecated
-                       @param {String} selector A CSS selector string
-
-                       @returns {Boolean}
-
-                       @example
-                               var bigHeadings = glow.dom.get("h1, h2, h3");
-
-                               // true
-                               if (bigHeadings.is("h1, h2, h3, h4, h5, h6")) ...
-
-                               // false
-                               if (bigHeadings.is("a")) ...
-                       */
-                       is: function (selector) {
-                               // TODO - this implementation needs to be optimized
-                               var nodes = glow.dom.get(selector),
-                                       i = 0,
-                                       iLen = this.length,
-                                       j,
-                                       jLen;
-
-                               node:
-                               for (; i < iLen; i++) {
-                                       for (j = 0, jLen = nodes.length; j < jLen; j++) {
-                                               if (this[i] == nodes[j]) {
-                                                       continue node;
-                                               }
-                                       }
-                                       return false;
-                               }
-                               return true;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#text
-                       @function
-                       @description Gets the inner text of the first node, or set the inner text of all matched nodes.
-
-                       @param {String} [text] String to set as inner text of nodes
-
-                       @returns {glow.dom.NodeList | String}
-
-                               If the text argument is passed then the NodeList is
-                               returned, otherwise the text is returned.
-
-                       @example
-                               // set text
-                               var div = glow.dom.create("<div></div>").text("Hello World!");
-
-                               // get text
-                               var greeting = div.text();
-                       */
-                       text: function (/* text */) {
-                               var args = arguments,
-                                       i = 0,
-                                       that = this,
-                                       length = that.length;
-
-                               if (args.length > 0) {
-                                       for (; i < length; i++) {
-                                               that[i].innerHTML = "";
-                                               that[i].appendChild(doc.createTextNode(args[0]));
-                                       }
-                                       return that;
-                               }
-                               //innerText (empty) and textContent (undefined) don't work in safari 2 for hidden elements
-                               return that[0].innerText || that[0].textContent == undefined ? getTextNodeConcat(that[0]) : that[0].textContent;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#empty
-                       @function
-                       @description Removes the contents of all the nodes.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // remove the contents of all textareas
-                               glow.dom.get("textarea").empty();
-                       */
-                       empty: function () {
-                               /*
-                                 NOTE: I changed this to destroy all nodes within the parent, but
-                                 seemed backwards incompatible with our own timetable demo
-                                 so we best hadn't do it until Glow 2
-                               */
-                               var i = 0,
-                                       len = this.length;
-                                       
-                               for (; i < len; i++) {
-                                       while(this[i].firstChild) {
-                                               this[i].removeChild(this[i].firstChild);
-                                       }
-                               }
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#remove
-                       @function
-                       @description Removes each node from its parent node.
-                               If you no longer need the nodes, consider using
-                               {@link glow.dom.NodeList#destroy destroy}
-                               
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // take all the links out of a document
-                               glow.dom.get("a").remove();
-                       */
-                       remove: function () {
-                               for (var that = this, i = 0, length = that.length, parentNode; i < length; i++) {
-                                       if (parentNode = that[i].parentNode) {
-                                               parentNode.removeChild(that[i]);
-                                       }
-                               }
-                               return that;
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#destroy
-                       @function
-                       @description Removes each node from the DOM
-                               The node will actually be destroyed to free up memory
-
-                       @returns {glow.dom.NodeList} An empty NodeList
-
-                       @example
-                               // destroy all links in the document
-                               glow.dom.get("a").destroy();
-                       */
-                       destroy: function () {
-                               // remove any data attached to this NodeList
-                               this.get("*").push(this).removeData();
-                               
-                               this.appendTo(tmpDiv);
-                               // destroy nodes
-                               tmpDiv.innerHTML = "";
-                               // empty the nodelist
-                               
-                               Array.prototype.splice.call(this, 0, this.length);
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#clone
-                       @function
-                       @description Gets a new NodeList containing a clone of each node.
-                       
-                       @param {Boolean} [cloneListeners=false] Also clone any event listeners assigned using Glow
-                       
-                       @returns {glow.dom.NodeList}
-
-                               Returns a new NodeList containing clones of all the nodes in
-                               the NodeList
-
-                       @example
-                               // get a copy of all heading elements
-                               var myClones = glow.dom.get("h1, h2, h3, h4, h5, h6").clone();
-                               
-                       @example
-                               // get a copy of all anchor elements with 
-                               var myAnchors = glow.dom.get("a").clone(true);
-                       */
-                       clone: function (cloneListeners) {
-                               var ret = [],
-                                       i = this.length,
-                                       allCloneElms,
-                                       allBaseElms
-                                       eventIdProp = '__eventId' + glow.UID;
-
-                               while (i--) {
-                                       ret[i] = this[i].cloneNode(true);
-                               }
-                               
-                               // some browsers (ie) also clone node properties as attributes
-                               // we need to get rid of the eventId.
-                               allCloneElms = r.get( ret ).get("*").push( ret );
-                               if (nodePropertiesCloned && !isXml(ret[0])) {
-                                       i = allCloneElms.length;
-                                       while(i--) {
-                                               allCloneElms[i][eventIdProp] = null;
-                                       }
-                               }
-                               
-                               // copy data from base elements to clone elements
-                               allBaseElms = this.get("*").push( this );
-                               i = allCloneElms.length;
-                               while (i--) {
-                                       allCloneElms[i].removeAttribute(dataPropName);
-                                       glow.dom.get(allCloneElms[i]).data(
-                                               glow.dom.get(allBaseElms[i]).data()
-                                       );
-                               }
-                               
-                               // shall we clone events too?
-                               if (cloneListeners) {
-                                       // check the stuff we need is hanging around, we don't want
-                                       // glow.dom to be dependant on glow.events as it's a circular
-                                       // dependency
-                                       if ( !glow.events ) {
-                                               throw "glow.events required to clone event listeners";
-                                       }
-                                       
-                                       glow.events._copyListeners(
-                                               this.get("*").push( this ),
-                                               allCloneElms || r.get( ret ).get("*").push( ret )
-                                       );
-                               }
-                               
-                               return r.get(ret);
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#html
-                       @function
-                       @description Gets the HTML content of the first node, or set the HTML content of all nodes.
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                       @param {String} [html] String to set as inner HTML of nodes
-
-                       @returns {glow.dom.NodeList | String}
-
-                               If the html argument is passed, then the NodeList is
-                               returned, otherwise the inner HTML of the first node is returned.
-
-                       @example
-                               // get the html in #footer
-                               var footerContents = glow.dom.get("#footer").html();
-
-                       @example
-                               // set a new footer
-                               glow.dom.get("#footer").html("<strong>Hello World!</strong>");
-                       */
-                       html: function (newHtml) {
-                               var i = 0,
-                                       length = this.length;
-
-                               if (newHtml !== undefined) {
-                                       // not setting innerHTML, doesn't work in IE for elements like <table>
-                                       return this.empty().append(newHtml);
-                               }
-                               return this[0] ? this[0].innerHTML : "";
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#width
-                       @function
-                       @description Gets the width of the first node in pixels or sets the width of all nodes
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                               Return value does not include the padding or border of the
-                               element in browsers supporting the correct box model.
-
-                               You can use this to easily get the width of the document or
-                               window, see example below.
-
-                       @param {Number} [width] New width in pixels.
-
-                       @returns {glow.dom.NodeList | Number}
-
-                               Width of first element in pixels, or NodeList when setting widths
-
-                       @example
-                               // get the width of #myDiv
-                               glow.dom.get("#myDiv").width();
-
-                       @example
-                               // set the width of list items in #myDiv to 200 pixels
-                               glow.dom.get("#myDiv li").width(200);
-
-                       @example
-                               // get the height of the document
-                               glow.dom.get(document).width()
-
-                       @example
-                               // get the height of the window
-                               glow.dom.get(window).width()
-                       */
-                       width: function(width) {
-                               if (width == undefined) {
-                                       return getElmDimension(this[0], "width");
-                               }
-                               setElmsSize(this, width, "width");
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#height
-                       @function
-                       @description Gets the height of the first element in pixels or sets the height of all nodes
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                                Return value does not include the padding or border of the element in
-                                browsers supporting the correct box model.
-
-                                You can use this to easily get the height of the document or
-                                window, see example below.
-
-                       @param {Number} [height] New height in pixels.
-
-                       @returns {glow.dom.NodeList | Number}
-
-                               Height of first element in pixels, or NodeList when setting heights.
-
-                       @example
-                               // get the height of #myDiv
-                               glow.dom.get("#myDiv").height();
-
-                       @example
-                               // set the height of list items in #myDiv to 200 pixels
-                               glow.dom.get("#myDiv li").height(200);
-
-                       @example
-                               // get the height of the document
-                               glow.dom.get(document).height()
-
-                       @example
-                               // get the height of the window
-                               glow.dom.get(window).height()
-                       */
-                       height: function(height) {
-                               if (height == undefined) {
-                                       return getElmDimension(this[0], "height");
-                               }
-                               setElmsSize(this, height, "height");
-                               return this;
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#scrollLeft
-                       @function
-                       @description Gets/sets the number of pixels the element has scrolled horizontally
-                               
-                               Get the value by calling without arguments, set by providing a new
-                               value.
-                               
-                               To get/set the scroll position of the window, use this method on
-                               a nodelist containing the window object.
-
-                       @param {Number} [val] New left scroll position
-
-                       @returns {glow.dom.NodeList | Number}
-
-                               Current scrollLeft value, or NodeList when setting scroll position.
-
-                       @example
-                               // get the scroll left value of #myDiv
-                               var scrollPos = glow.dom.get("#myDiv").scrollLeft();
-                               // scrollPos is a number, eg: 45
-
-                       @example
-                               // set the scroll left value of #myDiv to 20
-                               glow.dom.get("#myDiv").scrollLeft(20);
-
-                       @example
-                               // get the scrollLeft of the window
-                               var scrollPos = glow.dom.get(window).scrollLeft();
-                               // scrollPos is a number, eg: 45
-                       */
-                       scrollLeft: function(val) {
-                               return scrollOffset(this, true, val);
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#scrollTop
-                       @function
-                       @description Gets/sets the number of pixels the element has scrolled vertically
-                               
-                               Get the value by calling without arguments, set by providing a new
-                               value.
-                               
-                               To get/set the scroll position of the window, use this method on
-                               a nodelist containing the window object.
-
-                       @param {Number} [val] New top scroll position
-
-                       @returns {glow.dom.NodeList | Number}
-
-                               Current scrollTop value, or NodeList when setting scroll position.
-
-                       @example
-                               // get the scroll top value of #myDiv
-                               var scrollPos = glow.dom.get("#myDiv").scrollTop();
-                               // scrollPos is a number, eg: 45
-
-                       @example
-                               // set the scroll top value of #myDiv to 20
-                               glow.dom.get("#myDiv").scrollTop(20);
-
-                       @example
-                               // get the scrollTop of the window
-                               var scrollPos = glow.dom.get(window).scrollTop();
-                               // scrollPos is a number, eg: 45
-                       */
-                       scrollTop: function(val) {
-                               return scrollOffset(this, false, val);
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#show
-                       @function
-                       @description Shows all hidden items in the NodeList.
-                       @returns {glow.dom.NodeList}
-                       @example
-                               // Show element with ID myDiv
-                               glow.dom.get("#myDiv").show();
-                       @example
-                               // Show all list items within #myDiv
-                               glow.dom.get("#myDiv li").show();
-                       */
-                       show: function() {
-                               var i = 0,
-                                       len = this.length,
-                                       currItem,
-                                       itemStyle;
-                               for (; i < len; i++) {
-                                       /* Create a NodeList for the current item */
-                                       currItem = r.get(this[i]);
-                                       itemStyle = currItem[0].style;
-                                       if (currItem.css("display") == "none") {
-                                               itemStyle.display = "";
-                                               itemStyle.visibility = "visible";
-                                               /* If display is still none, set to block */
-                                               if (currItem.css("display") == "none") {
-                                                       itemStyle.display = "block";
-                                               }
-                                       }
-                               }
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#hide
-                       @function
-                       @description Hides all items in the NodeList.
-                       @returns {glow.dom.NodeList}
-                       @example
-                               // Hides all list items within #myDiv
-                               glow.dom.get("#myDiv li").hide();
-                       */
-                       hide: function() {
-                               return this.css("display", "none").css("visibility", "hidden");
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#css
-                       @function
-                       @description Gets a CSS property for the first node or sets a CSS property on all nodes.
-
-                               <p><em>This method is not applicable to XML NodeLists.</em></p>
-
-                               If a single property name is passed, the corresponding value
-                               from the first node will be returned.
-
-                               If a single property name is passed with a value, that value
-                               will be set on all nodes on the NodeList.
-
-                               If an array of properties name is passed with no value, the return
-                               value is the sum of those values from the first node in the NodeList.
-                               This can be useful for getting the total of left and right padding,
-                               for example.
-
-                               Return values are strings. For instance, "height" will return
-                               "25px" for an element 25 pixels high. You may want to use
-                               parseInt to convert these values.
-
-                               Here are the compatible properties you can get, if you use one
-                               which isn't on this list the return value may differ between browsers.
-
-                               <dl>
-                               <dt>width</dt><dd>Returns pixel width, eg "25px". Can be used even if width has not been set with CSS.</dd>
-                               <dt>height</dt><dd>Returns pixel height, eg "25px". Can be used even if height has not been set with CSS.</dd>
-                               <dt>top, right, bottom, left</dt><dd>Pixel position relative to positioned parent, or original location if position:relative, eg "10px". These can be used even if position:static.</dd>
-                               <dt>padding-top</dt><dd>Pixel size of top padding, eg "5px"</dd>
-                               <dt>padding-right</dt><dd>Pixel size of right padding, eg "5px"</dd>
-                               <dt>padding-bottom</dt><dd>Pixel size of bottom padding, eg "5px"</dd>
-                               <dt>padding-left</dt><dd>Pixel size of left padding, eg "5px"</dd>
-                               <dt>margin-top</dt><dd>Pixel size of top margin, eg "5px"</dd>
-                               <dt>margin-right</dt><dd>Pixel size of right margin, eg "5px"</dd>
-                               <dt>margin-bottom</dt><dd>Pixel size of bottom margin, eg "5px"</dd>
-                               <dt>margin-left</dt><dd>Pixel size of left margin, eg "5px"</dd>
-                               <dt>border-top-width</dt><dd>Pixel size of top border, eg "5px"</dd>
-                               <dt>border-right-width</dt><dd>Pixel size of right border, eg "5px"</dd>
-                               <dt>border-bottom-width</dt><dd>Pixel size of bottom border, eg "5px"</dd>
-                               <dt>border-left-width</dt><dd>Pixel size of left border, eg "5px"</dd>
-                               <dt>border-*-style</dt><dd>eg "dotted"</dd>
-                               <dt>border-*-color</dt><dd>returns colour in format "rgb(255, 255, 255)", return value also has properties r, g & b to get individual values as integers</dd>
-                               <dt>color</dt><dd>returns colour in format "rgb(255, 255, 255)", return value also has properties r, g & b to get individual values as integers</dd>
-                               <dt>list-style-position</dt><dd>eg "outside"</dd>
-                               <dt>list-style-type</dt><dd>eg "square"</dd>
-                               <dt>list-style-image</dt><dd>Returns full image path, eg "url(http://www.bbc.co.uk/lifestyle/images/bullets/1.gif)" or "none"</dd>
-                               <dt>background-image</dt><dd>Returns full image path, eg "url(http://www.bbc.co.uk/lifestyle/images/bgs/1.gif)" or "none"</dd>
-                               <dt>background-attachment</dt><dd>eg "scroll"</dd>
-                               <dt>background-repeat</dt><dd>eg "repeat-x"</dd>
-                               <dt>direction</dt><dd>eg "ltr"</dd>
-                               <dt>font-style</dt><dd>eg "italic"</dd>
-                               <dt>font-variant</dt><dd>eg "small-caps"</dd>
-                               <dt>line-height</dt><dd>Pixel height, eg "30px". Note, Opera may return value with 2 decimal places, eg "30.00px"</dd>
-                               <dt>letter-spacing</dt><dd>Pixel spacing, eg "10px"</dd>
-                               <dt>text-align</dt><dd>eg "right"</dd>
-                               <dt>text-decoration</dt><dd>eg "underline"</dd>
-                               <dt>text-indent</dt><dd>Pixel indent, eg "10px"</dd>
-                               <dt>white-space</dt><dd>eg "nowrap"</dd>
-                               <dt>word-spacing</dt><dd>Pixel spacing, eg "5px"</dd>
-                               <dt>float</dt><dd>eg "left"</dd>
-                               <dt>clear</dt><dd>eg "right"</dd>
-                               <dt>opacity</dt><dd>Value between 0 & 1. In IE, this value comes from the filter property (/100)</dd>
-                               <dt>position</dt><dd>eg "relative"</dd>
-                               <dt>z-index</dt><dd>eg "32"</dd>
-                               <dt>display</dt><dd>eg "block"</dd>
-                               <dt>text-transform</dt><dd>eg "uppercase"</dd>
-                               </dl>
-
-                               The following return values that may be usable but have differences in browsers
-
-                               <dl>
-                               <dt>font-family</dt><dd>Some browsers return the font used ("Verdana"), others return the full list found in the declaration ("madeup, verdana, sans-serif")</dd>
-                               <dt>font-size</dt><dd>Returns size as pixels except in IE, which will return the value in the same units it was set in ("0.9em")</dd>
-                               <dt>font-weight</dt><dd>Returns named values in some browsers ("bold"), returns computed weight in others ("700")</dd>
-                               </dl>
-
-                       @param {String | String[] | Object} property The CSS property name, array of names to sum, or object of key-value pairs
-
-                       @param {String} [value] The value to apply
-
-                       @returns {glow.dom.NodeList | String}
-
-                               Returns the CSS value from the first node, or NodeList when setting values
-
-                       @example
-                               // get value from first node
-                               glow.dom.get("#myDiv").css("display");
-
-                       @example
-                               // set left padding to 10px on all nodes
-                               glow.dom.get("#myDiv").css("padding-left", "10px");
-
-                       @example
-                               // "30px", total of left & right padding
-                               glow.dom.get("#myDiv").css(["padding-left", "padding-right"]);
-
-                       @example
-                               // where appropriate, px is assumed when no unit is passed
-                               glow.dom.get("#myDiv").css("height", 300);
-               
-                       @example
-                               // set multiple CSS values at once
-                               // NOTE: Property names containing a hyphen such as font-weight must be quoted
-                               glow.dom.get("#myDiv").css({
-                                       "font-weight": "bold",
-                                       padding: "10px",
-                                       color: "#00cc99"
-                               })
-                       */
-                       css: function(prop, val) {
-                               var that = this,
-                                       thisStyle,
-                                       i = 0,
-                                       len = that.length,
-                                       originalProp = prop;
-
-                               if (prop.constructor === Object) { // set multiple values
-                                       for (style in prop) {
-                                               this.css(style, prop[style]);
-                                       }
-                                       return that;
-                               }
-                               else if (val != undefined) { //set one CSS value
-                                       prop = toStyleProp(prop);
-                                       for (; i < len; i++) {
-                                               thisStyle = that[i].style;
-                                               
-                                               if (typeof val == "number" && hasUnits.test(originalProp)) {
-                                                       val = val.toString() + "px";
-                                               }
-                                               if (prop == "opacity" && env.ie) {
-                                                       //in IE the element needs hasLayout for opacity to work
-                                                       thisStyle.zoom = "1";
-                                                       if (val === "") {
-                                                               thisStyle.filter = "";
-                                                       } else {
-                                                               thisStyle.filter = "alpha(opacity=" + Math.round(Number(val, 10) * 100) + ")";
-                                                       }
-                                               } else {
-                                                       thisStyle[prop] = val;
-                                               }
-                                       }
-                                       return that;
-                               } else { //getting stuff
-                                       if (!len) { return; }
-                                       return getCssValue(that[0], prop);
-                               }
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#offset
-                       @function
-                       @description Gets the offset from the top left of the document.
-                       
-                               If the NodeList contains multiple items, the offset of the
-                               first item is returned.
-
-                       @returns {Object}
-                               Returns an object with "top" & "left" properties in pixels
-
-                       @example
-                               glow.dom.get("#myDiv").offset().top
-                       */
-                       offset: function () {
-                               // http://weblogs.asp.net/bleroy/archive/2008/01/29/getting-absolute-coordinates-from-a-dom-element.aspx - great bit of research, most bugfixes identified here (and also jquery trac)
-                               var elm = this[0],
-                                       docScrollPos = {
-                                               x: getScrollOffset(window, true),
-                                               y: getScrollOffset(window, false)
-                                       }
-
-                               //this is simple(r) if we can use 'getBoundingClientRect'
-                               // Sorry but the sooper dooper simple(r) way is not accurate in Safari 4
-                               if (!glow.env.webkit && elm.getBoundingClientRect) {
-                                       var rect = elm.getBoundingClientRect();
-                                       return {
-                                               top: rect.top
-                                                       /*
-                                                        getBoundingClientRect is realive to top left of
-                                                        the viewport, so we need to sort out scrolling offset
-                                                       */
-                                                       + docScrollPos.y
-                                                       /*
-                                                        IE adds the html element's border to the value. We can
-                                                        deduct this value using client(Top|Left). However, if
-                                                        the user has done html{border:0} clientTop will still
-                                                        report a 2px border in IE quirksmode so offset will be off by 2.
-                                                        Hopefully this is an edge case but we may have to revisit this
-                                                        in future
-                                                       */
-                                                       - docElm.clientTop,
-
-                                               left: rect.left //see above for docs on all this stuff
-                                                       + docScrollPos.x
-                                                       - docElm.clientLeft
-                                       };
-                               } else { //damnit, let's go the long way around
-                                       var top = elm.offsetTop,
-                                               left = elm.offsetLeft,
-                                               originalElm = elm,
-                                               nodeNameLower,
-                                               //does the parent chain contain a position:fixed element
-                                               involvesFixedElement = false,
-                                               offsetParentBeforeBody = elm;
-
-                                       //add up all the offset positions
-                                       while (elm = elm.offsetParent) {
-                                               left += elm.offsetLeft;
-                                               top += elm.offsetTop;
-
-                                               //if css position is fixed, we need to add in the scroll offset too, catch it here
-                                               if (getCssValue(elm, "position") == "fixed") {
-                                                       involvesFixedElement = true;
-                                               }
-
-                                               //gecko & webkit (safari 3) don't add on the border for positioned items
-                                               if (env.gecko || env.webkit > 500) {
-                                                       left += parseInt(getCssValue(elm, "border-left-width")) || 0;
-                                                       top  += parseInt(getCssValue(elm, "border-top-width"))  || 0;
-                                               }
-
-                                               //we need the offset parent (before body) later
-                                               if (elm.nodeName.toLowerCase() != "body") {
-                                                       offsetParentBeforeBody = elm;
-                                               }
-                                       }
-
-                                       //deduct all the scroll offsets
-                                       elm = originalElm;
-                                       while ((elm = elm.parentNode) && (elm != docBody) && (elm != docElm)) {
-                                               left -= elm.scrollLeft;
-                                               top -= elm.scrollTop;
-
-                                               //FIXES
-                                               //gecko doesn't add the border of contained elements to the offset (overflow!=visible)
-                                               if (env.gecko && getCssValue(elm, "overflow") != "visible") {
-                                                       left += parseInt(getCssValue(elm, "border-left-width"));
-                                                       top += parseInt(getCssValue(elm, "border-top-width"));
-                                               }
-                                       }
-
-                                       //if we found a fixed position element we need to add the scroll offsets
-                                       if (involvesFixedElement) {
-                                               left += docScrollPos.x;
-                                               top += docScrollPos.y;
-                                       }
-
-                                       //FIXES
-                                       // Webkit < 500 body's offset gets counted twice for absolutely-positioned elements (or if there's a fixed element)
-                                       // Gecko - non-absolutely positioned elements that are direct children of body get the body offset counted twice
-                                       if (
-                                               (env.webkit < 500 && (involvesFixedElement || getCssValue(offsetParentBeforeBody, "position") == "absolute")) ||
-                                               (env.gecko && getCssValue(offsetParentBeforeBody, "position") != "absolute")
-                                       ) {
-                                               left -= docBody.offsetLeft;
-                                               top -= docBody.offsetTop;
-                                       }
-
-                                       return {left:left, top:top};
-                               }
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#position
-                       @function
-                       @description Get the top & left position of an element relative to its positioned parent
-                               
-                               This is useful if you want to make a position:static element position:absolute
-                               and retain the original position of the element
-                               
-                       @returns {Object} An object with 'top' and 'left' number properties
-
-                       @example
-                               // get the top distance from the positioned parent
-                               glow.dom.get("#elm").position().top
-                       */
-                       position: function() {
-                               var positionedParent = r.get( getPositionedParent(this[0]) ),
-                                       hasPositionedParent = !!positionedParent[0],
-                                       
-                                       // element margins to deduct
-                                       marginLeft = parseInt( this.css("margin-left") ) || 0,
-                                       marginTop  = parseInt( this.css("margin-top")  ) || 0,
-                                       
-                                       // offset parent borders to deduct, set to zero if there's no positioned parent
-                                       positionedParentBorderLeft = ( hasPositionedParent && parseInt( positionedParent.css("border-left-width") ) ) || 0,
-                                       positionedParentBorderTop  = ( hasPositionedParent && parseInt( positionedParent.css("border-top-width")  ) ) || 0,
-                                       
-                                       // element offsets
-                                       elOffset = this.offset(),
-                                       positionedParentOffset = hasPositionedParent ? positionedParent.offset() : {top: 0, left: 0};
-                               
-                               return {
-                                       left: elOffset.left - positionedParentOffset.left - marginLeft - positionedParentBorderLeft,
-                                       top:  elOffset.top  - positionedParentOffset.top  - marginTop  - positionedParentBorderTop
-                               }
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#append
-                       @function
-                       @description Appends the given elements to each node.
-
-                               If there is more than one node in the NodeList, then the given elements
-                               are appended to the first node and clones are appended to the other
-                               nodes.
-
-                               <p><em>String nodespecs cannot be used with XML NodeLists</em></p>
-
-                       @param {String | Element | glow.dom.NodeList} nodespec HTML string, Element or NodeList to append to each node.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // ends every paragraph with '...'
-                               glow.dom.get('p').append(
-                                       '<span>...</span>'
-                               );
-                       */
-                       append: function (nodeSpec) {
-                               var that = this,
-                                       j = 0,
-                                       i = 1,
-                                       length = that.length,
-                                       nodes;
-
-                               if (length == 0) { return that; }
-                               nodes = typeof nodeSpec == "string" ? nodelistToArray(stringToNodes(nodeSpec)) :
-                                               nodeSpec.nodeType ? [nodeSpec] : nodelistToArray(nodeSpec);
-
-                               for (; nodes[j]; j++) {
-                                       that[0].appendChild(nodes[j]);
-                               }
-                               for (; i < length; i++) {
-                                       for (j = 0; nodes[j]; j++) {
-                                               that[i].appendChild(nodes[j].cloneNode(true));
-                                       }
-                               }
-                               return that;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#prepend
-                       @function
-                       @description Prepends the given elements to each node.
-
-                               If there is more than one node in the NodeList, then the given elements
-                               are prepended to the first node and clones are prepended to the other
-                               nodes.
-
-                               <p><em>String nodespecs cannot be used with XML NodeLists</em></p>
-
-                       @param {String | Element | glow.dom.NodeList} nodespec HTML string, Element or NodeList to prepend to each node.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // prepends every paragraph with 'Paragraph: '
-                               glow.dom.get('p').prepend(
-                                       '<span>Paragraph: </span>'
-                               );
-                       */
-                       prepend: function (nodeSpec) {
-                               var that = this,
-                                       j = 0,
-                                       i = 1,
-                                       length = that.length,
-                                       nodes,
-                                       first;
-
-                               if (length == 0) { return that; }
-
-                               nodes = typeof nodeSpec == "string" ? nodelistToArray(stringToNodes(nodeSpec)) :
-                                               nodeSpec.nodeType ? [nodeSpec] : nodelistToArray(nodeSpec);
-
-                               first = that[0].firstChild;
-
-                               for (; nodes[j]; j++) {
-                                       that[0].insertBefore(nodes[j], first);
-                               }
-
-                               for (; i < length; i++) {
-                                       first = that[i].firstChild;
-                                       for (j = 0; nodes[j]; j++) {
-                                               that[i].insertBefore(nodes[j].cloneNode(true), first);
-                                       }
-                               }
-                               return that;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#appendTo
-                       @function
-                       @description Appends the NodeList to elements.
-
-                               If more than one element is given (i.e. if the nodespec argument
-                               is an array of nodes or a NodeList) the NodeList will be
-                               appended to the first element and clones to each subsequent
-                               element.
-
-                       @param {String | Element | glow.dom.NodeList} nodespec CSS selector string, Element or NodeList to append the NodeList to.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // appends '...' to every paragraph
-                               glow.dom.create('<span>...</span>').appendTo('p');
-                       */
-                       appendTo: function (nodes) {
-                               if (! (nodes instanceof r.NodeList)) { nodes = r.get(nodes); }
-                               nodes.append(this);
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#prependTo
-                       @function
-                       @description Prepends the NodeList to elements.
-
-                               If more than one element is given (i.e. if the nodespec argument
-                               is an array of nodes or a NodeList) the NodeList will be
-                               prepended to the first element and clones to each subsequent
-                               element.
-
-                       @param {String | Element | glow.dom.NodeList} nodespec CSS selector string, Element or NodeList to prepend the NodeList to.
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // prepends 'Paragraph: ' to every paragraph
-                               glow.dom.create('<span>Paragraph: </span>').prependTo('p');
-                       */
-                       prependTo: function (nodes) {
-                               if (! (nodes instanceof r.NodeList)) { nodes = r.get(nodes); }
-                               nodes.prepend(this);
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#after
-                       @function
-                       @description Inserts elements after each node.
-
-                               If there is more than one node in the NodeList, the elements
-                               will be inserted after the first node and clones inserted
-                               after each subsequent node.
-
-                       @param {String | Element | glow.dom.NodeList} nodespec HTML string, Element or NodeList to insert after each node
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // adds a paragraph after each heading
-                               glow.dom.get('h1, h2, h3').after('<p>...</p>');
-                       */
-                       after: function (nodeSpec) {
-                               var that = this,
-                                       length = that.length,
-                                       nodes,
-                                       nodesLen,
-                                       j,
-                                       i = 1,
-                                       cloned;
-
-                               if (length == 0) { return that; }
-
-                               nodes = typeof nodeSpec == "string" ? r.create(nodeSpec) :
-                                       nodeSpec instanceof r.NodeList ? nodeSpec :
-                                       r.get(nodeSpec);
-
-                               nodesLen = nodes.length;
-
-                               for (j = nodesLen - 1; j >= 0; j--) {
-                                       that[0].parentNode.insertBefore(nodes[j], that[0].nextSibling);
-                               }
-                               for (; i < length; i++) {
-                                       cloned = nodes.clone();
-
-                                       for (j = nodesLen - 1; j >= 0; j--) {
-                                               that[i].parentNode.insertBefore(cloned[j], that[i].nextSibling);
-                                       }
-                               }
-                               return that;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#before
-                       @function
-                       @description Inserts elements before each node.
-
-                               If there is more than one node in the NodeList, the elements
-                               will be inserted before the first node and clones inserted
-                               before each subsequent node.
-
-                       @param {String | Element | glow.dom.NodeList} nodespec HTML string, Element or NodeList to insert before each node
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // adds a heading before each
-                               glow.dom.get('p').before('<h1>Paragraph:</h1>');
-                       */
-                       before: function (nodeSpec) {
-                               var that = this,
-                                       length = that.length,
-                                       j = 0,
-                                       i = 1,
-                                       nodes,
-                                       nodesLen,
-                                       cloned;
-
-                               if (length == 0) { return that; }
-
-                               nodes = typeof nodeSpec == "string" ? r.create(nodeSpec) :
-                                       nodeSpec instanceof r.NodeList ? nodeSpec :
-                                       r.get(nodeSpec);
-
-                               nodesLen = nodes.length;
-
-                               for (; j < nodesLen; j++) {
-                                       that[0].parentNode.insertBefore(nodes[j], that[0]);
-                               }
-                               for (; i < length; i++) {
-                                       cloned = nodes.clone();
-                                       for (j = 0; j < nodesLen; j++) {
-                                               that[i].parentNode.insertBefore(cloned[j], that[i]);
-                                       }
-                               }
-                               return that;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#insertAfter
-                       @function
-                       @description Insert the NodeList after each of the given elements.
-
-                               If more than one element is passed in, the NodeList will be
-                               inserted after the first element and clones inserted after each
-                               subsequent element.
-
-                       @param {String | Element | glow.dom.NodeList} nodespec CSS selector string, Element or NodeList to insert the NodeList after
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // adds a paragraph after each heading
-                               glow.dom.create('<p>HAI!</p>').insertAfter('h1, h2, h3');
-                       */
-                       insertAfter: function (nodes) {
-                               if (! (nodes instanceof r.NodeList)) { nodes = r.get(nodes); }
-                               nodes.after(this);
-                               return this;
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#insertBefore
-                       @function
-                       @description Insert the NodeList before each of the given elements.
-
-                               If more than one element is passed in, the NodeList will be
-                               inserted before the first element and clones inserted before each
-                               subsequent element.
-
-                       @param {String | Element | glow.dom.NodeList} nodespec CSS selector string, Element or NodeList to insert the NodeList before
-
-                       @returns {glow.dom.NodeList}
-
-                       @example
-                               // adds a heading before each paragraph
-                               glow.dom.create('<h1>Paragraph:</h1>').insertBefore('p');
-                       */
-                       insertBefore: function (nodes) {
-                               if (! (nodes instanceof r.NodeList)) { nodes = r.get(nodes); }
-                               nodes.before(this);
-                               return this;
-                       },
-
-
-                       /**
-                       @name glow.dom.NodeList#replaceWith
-                       @function
-                       @description Replace nodes on the page with given elements.
-
-                       @param {glow.dom.NodeList | String} nodespec Elements to insert into the document.
-
-                               If more than one node is to be replaced then nodespec will be
-                               cloned for additional elements. If a string is provided it will
-                               be treated as HTML and converted into elements.
-
-                       @returns {glow.dom.NodeList}
-                               Returns a new NodeList containing the nodes which have been removed
-                       */
-                       replaceWith: function (nodeSpec) {
-                               /*
-                                we need to put a placeholder in first in case the new stuff
-                                has the same ids as stuff being replaced. This causes issues
-                                in safari 2, the new element can't be picked up with getElementById
-                               */
-                               if (env.webkit < 500) {
-                                       this.after(placeholderElm).remove();
-                                       r.get("u.glow-placeholder").after(nodeSpec).remove();
-                               } else {
-                                       this.after(nodeSpec).remove()
-                               }
-                               return this;
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#data
-                       @function
-                       @description Use this to safely attach arbitrary data to any DOM Element.
-                       
-                       This method is useful when you wish to avoid memory leaks that are possible when adding your own data directly to DOM Elements.
-                       
-                       When called with no arguments, will return glow's entire data store for the first item in the NodeList.
-                       
-                       Otherwise, when given a stringy key, will return the associated value from the first item in the NodeList.
-                       
-                       When given both a key and a value, will store that data on every item in the NodeList.
-                       
-                       Optionally you can pass in a single object composed of multiple key, value pairs.
-                       
-                       @param {String|Object} [key] The name of the value in glow's data store for the NodeList item.
-                       @param {Object} [val] The the value you wish to associate with the given key.
-                       @see glow.dom.NodeList#removeData
-                       @example
-                       
-                       glow.dom.get("p").data("tea", "milky");
-                       var colour = glow.dom.get("p").data("tea"); // milky
-                       @returns {Object} When setting a value this method can be chained, as in that case it will return itself.
-                       */
-                       data: function (key, val) { /*debug*///console.log("data("+key+", "+val+")");
-                               if (typeof key === "object") { // setting many values
-                                       for (var prop in key) { this.data(prop, key[prop]); }
-                                       return this; // chainable with ({key: val}) signature
-                               }
-                               
-                               var index,
-                                       elm;
-                                       // uses private class-scoped variables: dataCache, dataPropName, dataIndex
-                               
-                               switch (arguments.length) {
-                                       case 0: // getting entire cache from first node
-                                               if (this[0] === undefined) { return undefined; }
-                                               index = this[0][dataPropName] || dataIndex++;
-                                               return dataCache[index] || (dataCache[index] = {}); // create a new cache when reading entire cache
-                                       case 1:  // getting val from first node
-                                               if (this[0] === undefined) { return undefined; }
-                                               index = this[0][dataPropName]; // don't create a new cache when reading just a specific val
-                                               return index? dataCache[index][key] : undefined;
-                                       case 2: // setting key:val on every node
-                                               // TODO - need to defend against reserved words being used as keys?
-                                               for (var i = this.length; i--;) {
-                                                       elm = this[i];
-                                                       
-                                                       if ( !(index = elm[dataPropName]) ) { // assumes index is always > 0
-                                                               index = dataIndex++;
-                                                               
-                                                               elm[dataPropName] = index;
-                                                               dataCache[index] = {};
-                                                       }
-                                                       dataCache[index][key] = val;
-                                               }
-                                               
-                                               return this; // chainable with (key, val) signature
-                                       default:
-                                               throw new Error("glow.dom.NodeList#data expects 2 or less arguments, not "+arguments.length+".");
-                               }
-                       },
-                       
-                       /**
-                       @name glow.dom.NodeList#removeData
-                       @function
-                       @description Removes data previously added by {@link glow.dom.NodeList#data} from items in a NodeList.
-                       
-                       When called with no arguments, will delete glow's entire data store for every item in the NodeList.
-                       
-                       Otherwise, when given a key, will delete the associated value from every item in the NodeList.
-                       
-                       @param {String} [key] The name of the value in glow's data store for the NodeList item.
-                       */
-                       removeData: function (key) { /*debug*///console.log("removeData("+key+")");
-                               var elm,
-                                       i = this.length,
-                                       index;
-                                       // uses private class-scoped variables: dataCache, dataPropName
-                               
-                               while (i--) {
-                                       elm = this[i];
-                                       index = elm[dataPropName];
-                                       
-                                       if (index !== undefined) {
-                                               switch (arguments.length) {
-                                                       case 0:
-                                                               dataCache[index] = undefined;
-                                                               elm[dataPropName] = undefined;
-                                                               try {
-                                                                       delete elm[dataPropName]; // IE 6 goes wobbly here
-                                                               }
-                                                               catch(e) { // remove expando from IE 6
-                                                                       elm.removeAttribute && elm.removeAttribute(dataPropName);
-                                                               }
-                                                               break;
-                                                       case 1:
-                                                               dataCache[index][key] = undefined;
-                                                               delete dataCache[index][key];
-                                                               break;
-                                                       default:
-                                                               throw new Error("glow.dom.NodeList#removeData expects 1 or less arguments, not "+arguments.length+".");
-                                               }
-                                       }
-                               }
-                               
-                               return this; // chainable
-                       },
-
-                       /**
-                       @name glow.dom.NodeList#get
-                       @function
-                       @description Gets decendents of nodes that match a CSS selector.
-
-                       @param {String} selector CSS selector
-
-                       @returns {glow.dom.NodeList}
-                               Returns a new NodeList containing matched elements
-
-                       @example
-                               // create a new NodeList
-                               var myNodeList = glow.dom.create("<div><a href='s.html'>Link</a></div>");
-
-                               // get 'a' tags that are decendants of the NodeList nodes
-                               myNewNodeList = myNodeList.get("a");
-                       */
-                       get: function() {
-
-                               /*
-                               PrivateFunction: compileSelector
-                                       Compile a CSS selector to an AST.
-
-                               Arguments:
-                                       sSelector - A string containing the CSS selector (or comma separated group of selectors).
-
-                               Returns:
-                                       An array containing an AST for each selector in the group.
-                               */
-                               function compileSelector(sSelector) {
-                                       //return from cache if possible
-                                       if (cssCache[sSelector]) {
-                                               return cssCache[sSelector];
-                                       }
-
-                                       var r = [], //array of result objects
-                                               ri = 0, //results index
-                                               comb, //current combinator
-                                               tagTmp,
-                                               idTmp,
-                                               aRx, //temp regex result
-                                               matchedCondition, //have we matched a condition?
-                                               sLastSelector, //holds last copy of selector to prevent infinite loop
-                                               firstLoop = true,
-                                               originalSelector = sSelector;
-
-                                       while (sSelector && sSelector != sLastSelector) {
-                                               tagTmp = "";
-                                               idTmp = "";
-                                               //protect us from infinite loop
-                                               sLastSelector = sSelector;
-
-                                               //start by getting the scope (combinator)
-                                               if (aRx = cssRegex.combinator.exec(sSelector)) {
-                                                       comb = aRx[1];
-                                                       sSelector = sSelector.slice(aRx[0].length);
-                                               }
-                                               //look for optimal id & tag searching
-                                               if (aRx = cssRegex.tagName.exec(sSelector)) {
-                                                       tagTmp = aRx[1];
-                                                       sSelector = sSelector.slice(aRx[0].length);
-                                               }
-                                               if (aRx = cssRegex.classNameOrId.exec(sSelector)) {
-                                                       if (aRx[1] == "#") {
-                                                               idTmp = aRx[2];
-                                                               sSelector = sSelector.slice(aRx[0].length);
-                                                       }
-                                               }
-                                               if (!comb) { //use native stuff
-                                                       if (idTmp && firstLoop) {
-                                                               r[ri++] = [getByIdQuick, [idTmp.replace(/\\/g, ""), tagTmp || "*", null]];
-                                                       } else {
-                                                               r[ri++] = [getByTagName, [tagTmp || "*", null]];
-                                                               if (idTmp) {
-                                                                       r[ri++] = [hasId, [idTmp.replace(/\\/g, ""), null]];
-                                                               }
-                                                       }
-                                               } else if (comb == ">") {
-                                                       r[ri++] = [getChildren, [null]];
-                                                       if (idTmp) {
-                                                               r[ri++] = [hasId, [idTmp.replace(/\\/g, ""), null]];
-                                                       }
-                                                       if (tagTmp && tagTmp != "*") { //uses tag
-                                                               r[ri++] = [isTag, [tagTmp, null]];
-                                                       }
-                                               }
-
-                                               //other conditions can appear in any order, so here we go:
-                                               matchedCondition = true;
-                                               while (matchedCondition) {
-                                                       //look for class or ID
-                                                       if (sSelector.charAt(0) == "#" || sSelector.charAt(0) == ".") {
-                                                               if (aRx = cssRegex.classNameOrId.exec(sSelector)) {
-                                                                       if (sSelector.charAt(0) == "#") { //is ID
-                                                                               //define ID, remove escape chars
-                                                                               r[ri++] = [hasId, [aRx[2].replace(/\\/g, ""), null]];
-                                                                       } else { //is class
-                                                                               r[ri++] = [hasClassName, [aRx[2].replace(/\\/g, ""), null]];
-                                                                       }
-                                                                       sSelector = sSelector.slice(aRx[0].length);
-                                                               } else {
-                                                                       throw new Error("Invalid Selector " + originalSelector);
-                                                               }
-                                                       } else {
-                                                               matchedCondition = false;
-                                                       }
-                                               }
-
-                                               firstLoop = false;
-                                       }
-
-                                       if (sSelector !== "") {
-                                               throw new Error("Invalid Selector " + originalSelector);
-                                       }
-
-                                       //add to cache and return
-                                       return cssCache[sSelector] = r;
-                               }
-
-                               /*
-                               PrivateFunction: fetchElements
-                                       Get elements which match array of compiled conditions based on
-                                       an initial context.
-
-                               Arguments:
-                                       a - (object) CSS selector AST object.
-                                       initialContext - DOM Element or DOM Document to search within.
-
-                               Returns:
-                                       An array of matching elements.
-                               */
-                               function fetchElements(a, initialContext) {
-                                       var context = initialContext; //elements to look within
-
-                                       for (var i = 0, al = a.length; i < al; i++) {
-                                               a[i][1][a[i][1].length - 1] = context;
-                                               context = a[i][0].apply(this, a[i][1]);
-                                       }
-                                       return context;
-                               }
-
-                               /*
-                               PrivateFunction: getByIdQuick
-                                       Get an element with a specific tag name, within a context.
-
-                               Arguments:
-                                       id - (string) the id of the element.
-                                       tagName - (string) the name of the element.
-                                       context - DOM Element or DOM Document in which to find the element.
-
-                               Returns:
-                                       A DOM Element matching the specified criteria.
-                               */
-                               function getByIdQuick(id, tagName, context) {
-                                       var r = [], ri = 0, notQuick = [], notQuicki = 0, tmpNode;
-                                       for (var i = 0, length = context.length; i < length; i++) {
-                                               if (context[i].getElementById) {
-                                                       tmpNode = context[i].getElementById(id);
-                                                       if (tmpNode && (tmpNode.tagName == tagName.toUpperCase() || tagName == "*" || tmpNode.tagName == tagName)) {
-                                                               r[ri++] = tmpNode;
-                                                       }
-                                               } else {
-                                                       notQuick[notQuicki++] = context[i];
-                                               }
-                                       }
-                                       //deal with the ones we couldn't do quick
-                                       if (notQuick[0]) {
-                                               notQuick = getByTagName(tagName, notQuick);
-                                               notQuick = hasId(id, notQuick);
-                                       }
-                                       return r.concat(notQuick);
-                               }
-
-                               function getChildren(context) {
-                                       var r = [],
-                                               i = 0,
-                                               len = context.length;
-                                               
-                                       for (; i < len; i++) {
-                                               append( r, getChildElms(context[i]) );
-                                       }
-                                       return r;
-                               }
-
-                               function hasId(id, context) {
-                                       for (var i = 0, length = context.length; i < length; i++) {
-                                               if (context[i].id == id) {
-                                                       //is this a safe optimisation?
-                                                       return [context[i]];
-                                               }
-                                       }
-                                       return [];
-                               }
-
-                               /*
-                               PrivateFunction: isTag
-                                       Get an array of elements within an array that have a given tag name.
-
-                               Arguments:
-                                       tagName - (string) the name of the element.
-                                       context - (array) elements to match.
-
-                               Returns:
-                                       An array of matching elements.
-                               */
-                               function isTag(tagName, context) {
-                                       var r = [], ri = 0;
-                                       for (var i = 0, length = context.length; i < length; i++) {
-                                               if (context[i].tagName == tagName.toUpperCase() || context[i].tagName == tagName) {
-                                                       r[ri++] = context[i];
-                                               }
-                                       }
-                                       return r;
-                               }
-
-                               /*
-                               PrivateFunction: hasClassName
-                                       Get elements that have a given class name from a provided array of elements.
-
-                               Arguments:
-                                       className - (string) the name of the class.
-                                       context - (array) the DOM Elements to match.
-
-                               Returns:
-                                       An array of matching DOM Elements.
-                               */
-                               function hasClassName(className, context) {
-                                       var r = [], ri = 0;
-                                       for (var i = 0, length = context.length; i < length; i++) {
-                                               if ((" " + context[i].className + " ").indexOf(" " + className + " ") != -1) {
-                                                       r[ri++] = context[i];
-                                               }
-                                       }
-                                       return r;
-                               }
-
-                               /*
-                               PrivateFunction: getBySelector
-                                       Get elements within a context by a CSS selector.
-
-                               Arugments:
-                                       sSelector - (string) CSS selector.
-                                       context - DOM Document or DOM Element to search within.
-
-                               Returns:
-                                       An array of DOM Elements.
-                               */
-                               function getBySelector(sSelector, context) {
-                                       var aCompiledCSS; // holds current compiled css statement
-                                       var r = [];
-                                       //split multiple selectors up
-                                       var aSelectors = sSelector.split(",");
-                                       //process each
-                                       for (var i = 0, nSelLen = aSelectors.length; i < nSelLen; i++) {
-                                               aCompiledCSS = compileSelector(glow.lang.trim(aSelectors[i]));
-                                               //get elements from DOM
-                                               r = r.concat(fetchElements(aCompiledCSS, context));
-                                       }
-                                       return r;
-                               }
-
-                               /*
-                               PrivateFunction: getIfWithinContext
-                                       Get elements from a set of elements that are within at least one of another
-                                       set of DOM Elements.
-
-                               Arguments:
-                                       nodes - DOM Elements to take the results from.
-                                       context - DOM Elements that returned elements must be within.
-
-                               Returns:
-                                       An array of DOM Elements.
-                               */
-                               function getIfWithinContext(nodes, context) {
-                                       nodes = nodes.length ? nodes : [nodes];
-                                       var r = []; //to return
-                                       var nl;
-
-                                       //loop through nodes
-                                       for (var i = 0; nodes[i]; i++) {
-                                               nl = glow.dom.get(nodes[i]);
-                                               //loop through context nodes
-                                               for (var n = 0; context[n]; n++) {
-                                                       if (nl.isWithin(context[n])) {
-                                                               r[r.length] = nl[0];
-                                                               break;
-                                                       }
-                                               }
-                                       }
-                                       return r;
-                               }
-                               
-                               // main implementation
-                               return function(sSelector) {
-                                       // no point trying if there's no current context
-                                       if (!this.length) { return this; }
-
-                                       var r = []; //nodes to return
-                                       // decide what to do by arg
-                                       for (var i = 0, argLen = arguments.length; i < argLen; i++) {
-                                               if (typeof arguments[i] == "string") { // css selector string
-                                                       r = r.concat(getBySelector(arguments[i], this));
-                                                       // append(r, getBySelector(arguments[i], this));
-                                               } else { // nodelist, array, node
-                                                       r = r.concat(getIfWithinContext(arguments[i], this));
-                                                       // append(r, getIfWithinContext(arguments[i], this));
-                                               }
-                                       }
-
-                                       // strip out duplicates, wrap in nodelist
-                                       return glow.dom.get(unique(r));
-                               };
-                       }()
-               };
-
-               //some init stuff. Using u to make it quicker to get by tag name :)
-               placeholderElm = r.create('<u class="glow-placeholder"></u>');
-               //set up glow.dom
-               glow.dom = r;
-
-       }
-});
-/**
-@name glow.events
-@namespace
-@description Native browser and custom events
-@see <a href="../furtherinfo/events/">Using event listeners</a>
-@see <a href="../furtherinfo/events/firing_events.shtml">Firing event listeners</a>
-@see <a href="../furtherinfo/events/removing_event_listeners.shtml">Removing event listeners</a>
-*/
-(window.gloader || glow).module({
-       name: "glow.events",
-       library: ["glow", "1.7.0"],
-       depends: [["glow", "1.7.0", 'glow.dom']],
-       builder: function(glow) {
-               
-               var $ = glow.dom.get;
-               var r = {};
-               var eventid = 1;
-               var objid = 1;
-               // object (keyed by obj id), containing object (keyed by event name), containing arrays of listeners
-               var listenersByObjId = {};
-               // object (keyed by ident) containing listeners
-               var listenersByEventId = {};
-               var domListeners = {};
-               var psuedoPrivateEventKey = '__eventId' + glow.UID;
-               var psuedoPreventDefaultKey = psuedoPrivateEventKey + 'PreventDefault';
-               var psuedoStopPropagationKey = psuedoPrivateEventKey + 'StopPropagation';
-
-               var topKeyListeners = {};
-               var keyListenerId = 1;
-               var keyListeners = {};
-               var keyTypes = {};
-
-               var CTRL = 1;
-               var ALT = 2;
-               var SHIFT = 4;
-
-               var specialPrintables = {
-                       TAB      : '\t',
-                       SPACE    : ' ',
-                       ENTER    : '\n',
-                       BACKTICK : '`'
-               };
-
-               var keyNameAliases = {
-                       '96' : 223
-               };
-
-               var keyNameToCode = {
-                       CAPSLOCK : 20, NUMLOCK : 144, SCROLLLOCK : 145, BREAK : 19,
-                       BACKTICK : 223, BACKSPACE : 8, PRINTSCREEN : 44, MENU : 93, SPACE : 32,
-                       SHIFT : 16,  CTRL : 17,  ALT : 18,
-                       ESC   : 27,  TAB  : 9,   META     : 91,  RIGHTMETA : 92, ENTER : 13,
-                       F1    : 112, F2   : 113, F3       : 114, F4        : 115,
-                       F5    : 116, F6   : 117, F7       : 118, F8        : 119,
-                       F9    : 120, F10  : 121, F11      : 122, F12       : 123,
-                       INS   : 45,  HOME : 36,  PAGEUP   : 33,
-                       DEL   : 46,  END  : 35,  PAGEDOWN : 34,
-                       LEFT  : 37,  UP   : 38,  RIGHT    : 39,  DOWN      : 40
-               };
-               var codeToKeyName = {};
-               for (var i in keyNameToCode) {
-                       codeToKeyName['' + keyNameToCode[i]] = i;
-               }
-
-               var operaBrokenChars = '0123456789=;\'\\\/#,.-';
-
-               /*
-               PrivateMethod: removeKeyListener
-                       Removes a listener for a key combination.
-               
-               Arguments:
-                       ident - identifier returned from addKeyListener.
-               */
-
-               function removeKeyListener (ident) {
-                       var keyType = keyTypes[ident];
-                       if (! keyType) { return false; }
-                       var listeners = keyListeners[keyType];
-                       if (! listeners) { return false; }
-                       for (var i = 0, len = listeners.length; i < len; i++) {
-                               if (listeners[i][0] == ident) {
-                                       listeners.splice(i, 1);
-                                       return true;
-                               }
-                       }
-                       return false;
-               }
-
-               /*
-               PrivateMethod: initTopKeyListner
-                       Adds an event listener for keyboard events, for key listeners added by addKeyListener.
-
-               Arguments:
-                       type - press|down|up - the type of key event.
-               */
-
-               function initTopKeyListener (type) {
-                       topKeyListeners[type] = r.addListener(document, 'key' + type, function (e) {
-                               var mods = 0;
-                               if (e.ctrlKey) { mods += CTRL; }
-                               if (e.altKey) { mods += ALT; }
-                               if (e.shiftKey) { mods += SHIFT; }
-                               var keyType = e.chr ? e.chr.toLowerCase() : e.key ? e.key.toLowerCase() : e.keyCode;
-                               var eventType = mods + ':' + keyType + ':' + type;
-                               var listeners = keyListeners[eventType] ? keyListeners[eventType].slice(0) : [];
-                               // if the user pressed shift, but event didn't specify that, include it
-                               if (e.shiftKey) { // upper-case letter, should match regardless of shift
-                                       var shiftEventType = (mods & ~ SHIFT) + ':' + keyType + ':' + type;
-                                       if (keyListeners[shiftEventType]) {
-                                               for (var i = 0, len = keyListeners[shiftEventType].length; i < len; i++) {
-                                                       listeners[listeners.length] = keyListeners[shiftEventType][i];
-                                               }
-                                       }
-                               }
-                               
-                               if (! listeners) { return; }
-                               
-                               for (var i = 0, len = listeners.length; i < len; i++) {
-                                       //call listener and look out for preventing the default
-                                       if (listeners[i][2].call(listeners[i][3] || this, e) === false) {
-                                               e.preventDefault();
-                                       }
-                               }
-                               return !e.defaultPrevented();
-                       });
-               }
-               
-               /*
-               PrivateMethod: clearEvents
-                       Removes all current listeners to avoid IE mem leakage
-               */
-               function clearEvents() {
-                       var ident;
-                       for (ident in listenersByEventId) {
-                               r.removeListener(ident);
-                       }
-               }
-
-               // for opera madness
-               var previousKeyDownKeyCode;
-
-               var operaResizeListener,
-                       operaDocScrollListener;
-
-               /*
-               PrivateMethod: addDomListener
-                       Adds an event listener to a browser object. Manages differences with certain events.
-
-               Arguments:
-                       attachTo - the browser object to attach the event to.
-                       name - the generic name of the event (inc. mousewheel)
-               */
-               function addDomListener (attachTo, name, capturingMode) {
-                       var wheelEventName;
-
-                       capturingMode = !!capturingMode;
-                       
-                       if (glow.env.opera) {
-                               if (name.toLowerCase() == 'resize' && !operaResizeListener && attachTo == window) {
-                                       operaResizeListener = r.addListener(window.document.body, 'resize', function (e) { r.fire(window, 'resize', e); });
-                               } else if (name.toLowerCase() == 'scroll' && !operaDocScrollListener && attachTo == window) {
-                                       operaDocScrollListener = r.addListener(window.document, 'scroll', function (e) { r.fire(window, 'scroll', e); });
-                               }
-                       }
-                       
-                       var callback = function (e) {
-                               if (! e) { e = window.event; }
-                               var event = new r.Event(),
-                                       lowerCaseName = name.toLowerCase();
-                               event.nativeEvent = e;
-                               event.source = e.target || e.srcElement;
-
-                               event.relatedTarget = e.relatedTarget || (lowerCaseName == "mouseover" ? e.fromElement : e.toElement);
-                           event.button = glow.env.ie ? (e.button & 1 ? 0 : e.button & 2 ? 2 : 1) : e.button;
-                               if (e.pageX || e.pageY) {
-                                       event.pageX = e.pageX;
-                                       event.pageY = e.pageY;
-                               } else if (e.clientX || e.clientY)      {
-                                       event.pageX = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
-                                       event.pageY = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
-                               }
-                               if (lowerCaseName == 'mousewheel') {
-                                       // this works in latest opera, but have read that it needs to be switched in direction
-                                       // if there was an opera bug, I can't find which version it was fixed in
-                                       event.wheelDelta =
-                                               e.wheelDelta ? e.wheelDelta / 120 :
-                                               e.detail ? - e.detail / 3 :
-                                                       0;
-                                       if (event.wheelDelta == 0) { return; }
-                               }
-                               if (lowerCaseName.indexOf("key") != -1) {
-                                       event.altKey = !! e.altKey;
-                                       event.ctrlKey = !! e.ctrlKey;
-                                       event.shiftKey = !! e.shiftKey;
-
-                                       if (name == 'keydown') {
-                                               previousKeyDownKeyCode = e.keyCode;
-                                       }
-
-                                       event.charCode = e.keyCode && e.charCode !== 0 ? undefined : e.charCode;
-
-                                       if (lowerCaseName == 'keypress') {
-                                               if (typeof(event.charCode) == 'undefined') {
-                                                       event.charCode = e.keyCode;
-                                               }
-
-                                               if (glow.env.opera && event.charCode && event.charCode == previousKeyDownKeyCode &&
-                                                       operaBrokenChars.indexOf(String.fromCharCode(event.charCode)) == -1
-                                               ) {
-                                                       event.charCode = undefined;
-                                                       event.keyCode = previousKeyDownKeyCode;
-                                               }
-                                       }
-                                       
-                                       // make things a little more sane in opera
-                                       if (event.charCode && event.charCode <= 49) { event.charCode = undefined; }
-
-                                       if (event.charCode) {
-                                               event.chr = String.fromCharCode(event.charCode);
-                                       }
-                                       else if (e.keyCode) {
-                                               event.charCode = undefined;
-                                               event.keyCode = keyNameAliases[e.keyCode.toString()] || e.keyCode;
-                                               event.key = codeToKeyName[event.keyCode];
-                                               if (specialPrintables[event.key]) {
-                                                       event.chr = specialPrintables[event.key];
-                                                       event.charCode = event.chr.charCodeAt(0);
-                                               }
-                                       }
-
-                                       if (event.chr) {
-                                               event.capsLock =
-                                                       event.chr.toUpperCase() != event.chr ? // is lower case
-                                                               event.shiftKey :
-                                                       event.chr.toLowerCase() != event.chr ? // is upper case
-                                                               ! event.shiftKey :
-                                                               undefined; // can only tell for keys with case
-                                       }
-                               }
-
-                               r.fire(this, name, event);
-                               if (event.defaultPrevented()) {
-                                       return false;
-                               }
-                       };
-
-
-                       if (attachTo.addEventListener && (!glow.env.webkit || glow.env.webkit > 418)) {
-
-                               // This is to fix an issue between Opera and everything else.
-                               // Opera needs to have an empty eventListener attached to the parent
-                               // in order to fire a captured event (in our case we are using capture if
-                               // the event is focus/blur) on an element when the element is the eventTarget.
-                               //
-                               // It is only happening in Opera 9, Opera 10 doesn't show this behaviour.
-                               // It looks like Opera has a bug, but according to the W3C Opera is correct...
-                               //
-                               // "A capturing EventListener will not be triggered by events dispatched 
-                               // directly to the EventTarget upon which it is registered."
-                               // http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-capture
-                               if (
-                                       ( name == 'focus' || name == 'blur' )
-                                       && (glow.env.opera)
-                               ) {
-                                       attachTo.parentNode.addEventListener(name, function(){}, true);
-                               }
-
-                               attachTo.addEventListener(name.toLowerCase() == 'mousewheel' && glow.env.gecko ? 'DOMMouseScroll' : name, callback, capturingMode);
-
-                       } else {
-
-                               var onName = 'on' + name;
-                               var existing = attachTo[onName];
-                               if (existing) {
-                                       attachTo[onName] = function () {
-                                               // we still need to return false if either the existing or new callback returns false
-                                               var existingReturn = existing.apply(this, arguments),
-                                                       callbackReturn = callback.apply(this, arguments);
-                                               
-                                               return (existingReturn !== false) && (callbackReturn !== false);
-                                       };
-                               } else {
-                                       attachTo[onName] = callback;
-                               }
-
-                       }
-
-                       attachTo = null;
-
-               }
-               
-               /**
-               Add mouseEnter or mouseLeave 'event' to an element
-               @private
-               @param {HTMLElement} attachTo Element to create mouseenter / mouseleave for
-               @param {Boolean} isLeave Create mouseleave or mouseenter?
-               */
-               function addMouseEnterLeaveEvent(attachTo, isLeave) {
-                       var elm = $(attachTo),
-                               listenFor = isLeave ? "mouseout" : "mouseover",
-                               toFire = isLeave ? "mouseleave" : "mouseenter";
-                       
-                       r.addListener(attachTo, listenFor, function(e) {
-                               var relatedTarget = $(e.relatedTarget);
-                               // if the mouse has come from outside elm...
-                               if ( !relatedTarget.eq(elm) && !relatedTarget.isWithin(elm) ) {
-                                       // return false if default is prevented by mouseEnter event
-                                       return !r.fire(elm[0], toFire, e).defaultPrevented();
-                               }
-                       })
-               }
-               
-               /**
-               @name glow.events._copyListeners 
-               @function
-               @private
-               @description Maps event listeners from one set of nodes to another in the order they appear in each NodeList.
-                       Note, it doesn't copy events from a node's children.
-               
-               
-               @param {NodeList} from NodeList to copy events from
-               @param {NodeList} to NodeList to copy events to
-       
-               @returns {Boolean}
-               
-               @example
-                       var listener = glow.events.addListener(...);
-                       glow.events.removeListener(listener);
-               */
-               r._copyListeners = function(from, to) {
-                       // grab all the elements (including children)
-                       var i = from.length,
-                               // events attached to a particular element
-                               elementEvents,
-                               // name of the current event we're looking at
-                               eventName,
-                               // current listener index
-                               listenerIndex,
-                               // number of listeners to an event
-                               listenersLen,
-                               // listener definition from listenersByObjId
-                               listener;
-                       
-                       // loop through all items
-                       while(i--) {
-                               // has a glow event been assigned to this node?
-                               if ( from[i][psuedoPrivateEventKey] ) {
-                                       // get listeners for that event
-                                       elementEvents = listenersByObjId[ from[i][psuedoPrivateEventKey] ];
-                                       // loop through event names
-                                       for (eventName in elementEvents) {
-                                               listenerIndex = 0;
-                                               listenersLen = elementEvents[eventName].length;
-                                               // loop through listeners to that event
-                                               for (; listenerIndex < listenersLen; listenerIndex++) {
-                                                       listener = elementEvents[eventName][listenerIndex];
-                                                       // listen to them on the clone
-                                                       r.addListener(to[i], eventName, listener[2], listener[3]);
-                                               }
-                                       }
-                               }
-                       }
-               }
-
-               /**
-               @name glow.events.addListener
-               @function
-               @description Adds an event listener to an object (e.g. a DOM Element or Glow widget).
-               
-                       Some non-standard dom events are available:
-                       
-                       <dl>
-                               <dt>mouseenter</dt>
-                               <dd>Fires when the mouse enters this element specifically, does not bubble</dd>
-                               <dt>mouseleave/dt>
-                               <dd>Fires when the mouse leaves this element specifically, does not bubble</dd>
-                       </dl>
-               
-               @param {String | NodeList | Object} attachTo The object to attach the event listener to.
-               
-                       If the parameter is a string, then it is treated as a CSS selector 
-                       and the listener is attached to all matching elements.
-                       
-                       If the parameter is a {@link glow.dom.NodeList}, then the listener 
-                       is attached to all elements in the NodeList.
-               
-               @param {String} name The event name. 
-               
-                       Listeners for DOM events should not begin with 'on' (i.e. 'click' 
-                       rather than 'onclick')
-                                  
-               @param {Function} callback The function to be called when the event fires.
-                       
-               @param {Object} [context] The execution scope of the callback.
-               
-                       If this parameter is not passed then the attachTo object will be the 
-                       scope of the callback.
-               
-               @returns {Number | Undefined}
-               
-                       A unique identifier for the event suitable for passing to 
-                       {@link glow.events.removeListener}. If an empty NodeList or CSS 
-                       selector that returns no elements is passed, then undefined is returned.
-               
-               @example
-                       glow.events.addListener('#nav', 'click', function () {
-                               alert('nav clicked');
-                       });
-
-                       glow.events.addListener(myLightBox, 'close', this.showSurvey, this);
-               */
-               r.addListener = function (attachTo, name, callback, context) {
-                       var capturingMode = false;
-                       if (! attachTo) { throw 'no attachTo paramter passed to addListener'; }
-
-                       if (typeof attachTo == 'string') {
-                               if (! glow.dom) { throw "glow.dom must be loaded to use a selector as the first argument to glow.events.addListener"; }
-                               attachTo = $(attachTo);
-                       }
-                       
-                       if (glow.dom && attachTo instanceof glow.dom.NodeList) {
-                               var listenerIds = [],
-                                       i = attachTo.length;
-
-                               //attach the event for each element, return an array of listener ids
-                               while (i--) {
-                                       listenerIds[i] = r.addListener(attachTo[i], name, callback, context);
-                               }
-                               
-                               return listenerIds;
-                       }
-       
-                       var objIdent;
-                       if (! (objIdent = attachTo[psuedoPrivateEventKey])) {
-                               objIdent = attachTo[psuedoPrivateEventKey] = objid++;
-                       }
-                       var ident = eventid++;
-                       var listener = [ objIdent, name, callback, context, ident ];
-                       listenersByEventId[ident] = listener;
-
-                       var objListeners = listenersByObjId[objIdent];
-                       if (! objListeners) { objListeners = listenersByObjId[objIdent] = {}; }
-                       var objEventListeners = objListeners[name];
-                       if (! objEventListeners) { objEventListeners = objListeners[name] = []; }
-                       objEventListeners[objEventListeners.length] = listener;
-                       
-                       if ((attachTo.addEventListener || attachTo.attachEvent) && ! domListeners[objIdent + ':' + name]) {
-                               // handle 'special' dom events (ie, ones that aren't directly mapped to real dom events)
-                               // we don't actually add a dom listener for these event names
-                               switch (name) {
-                                       case "mouseenter":
-                                               addMouseEnterLeaveEvent(attachTo, false);
-                                               return ident;
-                                       case "mouseleave":
-                                               addMouseEnterLeaveEvent(attachTo, true);
-                                               return ident;
-
-                                       // Focus and blur events:
-                                       // Convert focus/blur events to use capturing.
-                                       // This allows form elements to be used with event delegation.
-
-                                       case "focus":
-                                               // IE
-                                               // If IE then change focus/blur events to focusin/focusout events.
-                                               // This allows input elements to bubble, so form elements work with event delegation.
-                                               if (glow.env.ie) {
-                                                       addFocusInOutEvent(attachTo, true);
-                                                       return ident;
-                                               }
-                                               // Everything else
-                                               else {
-                                                       capturingMode = true
-                                               }
-                                               break;
-
-                                       case "blur":
-                                               // IE
-                                               // If IE then change focus/blur events to focusin/focusout events.
-                                               // This allows input elements to bubble, so form elements work with event delegation.
-                                               if (glow.env.ie) {
-                                                       addFocusInOutEvent(attachTo, false);
-                                                       return ident;
-                                               }
-                                               // Everything else
-                                               else {
-                                                       capturingMode = true
-                                               }
-                                               break;
-
-                               }
-                               
-                               addDomListener(attachTo, name, capturingMode);
-                               domListeners[objIdent + ':' + name] = true;
-                       }
-                       return ident;
-               };
-
-               /**
-               Add focusIn or focusOut 'event' to an element
-               @private
-               @param {HTMLElement} attachTo Element to create focusIn / focusOut for
-               @param {Boolean} event Create focusIn or focusOut?
-               */
-               function addFocusInOutEvent(attachTo, event) {
-                       var listenFor = event ? 'focusin' : 'focusout',
-                               toFire    = event ? 'focus'   : 'blur';
-                       r.addListener(attachTo, listenFor, function(e) {
-                               return !r.fire(attachTo, toFire, e).defaultPrevented();
-                       });
-               }
-
-               /**
-               @name glow.events.removeListener 
-               @function
-               @description Removes a listener created with addListener
-
-               @param {Number} ident An identifier returned from {@link glow.events.addListener}.
-       
-               @returns {Boolean}
-               
-               @example
-                       var listener = glow.events.addListener(...);
-                       glow.events.removeListener(listener);
-               */
-               r.removeListener = function (ident) {
-                       if (ident && ident.toString().indexOf('k:') != -1) {
-                               return removeKeyListener(ident);
-                       }
-                       if (ident instanceof Array) {
-                               //call removeListener for each array member
-                               var i = ident.length; while(i--) {
-                                       r.removeListener(ident[i]);
-                               }
-                               return true;
-                       }
-                       var listener = listenersByEventId[ident];
-                       if (! listener) { return false; }
-                       delete listenersByEventId[ident];
-                       var listeners = listenersByObjId[listener[0]][listener[1]];
-                       for (var i = 0, len = listeners.length; i < len; i++) {
-                               if (listeners[i] == listener) {
-                                       listeners.splice(i, 1);
-                                       break;
-                               }
-                       }
-                       if (! listeners.length) {
-                               delete listenersByObjId[listener[0]][listener[1]];
-                       }
-                       var listenersLeft = false;
-                       for (var i in listenersByObjId[listener[0]]) { listenersLeft = true; break;     }
-                       if (! listenersLeft) {
-                               delete listenersByObjId[listener[0]];
-                       }
-                       return true;
-               };
-               
-               /**
-               @name glow.events.removeAllListeners 
-               @function
-               @description Removes all listeners attached to a given object
-
-               @param {String | glow.dom.NodeList | Object | Object[] } detachFrom The object(s) to remove listeners from.
-               
-                       If the parameter is a string, then it is treated as a CSS selector,
-                       listeners are removed from all nodes.
-               
-               @returns glow.events
-               
-               @example
-                       glow.events.removeAllListeners("#myDiv");
-               */
-               r.removeAllListeners = function(obj) {
-                       var i,
-                               objId,
-                               listenerIds = [],
-                               listenerIdsLen = 0,
-                               eventName,
-                               events;
-                       
-                       // cater for selector
-                       if (typeof obj == "string") {
-                               // get nodes
-                               obj = $(obj);
-                       }
-                       // cater for arrays & nodelists
-                       if (obj instanceof Array || obj instanceof glow.dom.NodeList) {
-                               //call removeAllListeners for each array member
-                               i = obj.length; while(i--) {
-                                       r.removeAllListeners(obj[i]);
-                               }
-                               return r;
-                       }
-                       
-                       // get the objects id
-                       objId = obj[psuedoPrivateEventKey];
-                       
-                       // if it doesn't have an id it doesn't have events... return
-                       if (!objId) {
-                               return r;
-                       }
-                       events = listenersByObjId[objId];
-                       for (eventName in events) {
-                               i = events[eventName].length; while(i--) {
-                                       listenerIds[listenerIdsLen++] = events[eventName][i][4];
-                               }
-                       }
-                       // remove listeners for that object
-                       if (listenerIds.length) {
-                               r.removeListener( listenerIds );
-                       }
-                       return r;
-               }
-
-               /**
-               @name glow.events.fire
-               @function
-               @description Fires an event on an object.
-
-               @param {Object} attachedTo The object that the event is associated with.
-               
-               @param {String} name The name of the event.
-               
-                       Event names should not start with the word 'on'.
-                       
-               @param {Object | glow.events.Event} [event] An event object or properties to add to a default event object
-               
-                       If not specified, a generic event object is created. If you provide a simple
-                       object, a default Event will be created with the properties from the provided object.
-       
-               @returns {Object}
-               
-                       The event object.
-               
-               @example
-                       // firing a custom event
-                       Ball.prototype.move = function () {
-                               // move the ball...
-                               // check its position
-                               if (this._height == 0) {
-                                       var event = glow.events.fire(this, 'bounce', {
-                                               bounceCount: this._bounceCount
-                                       });
-                                       
-                                       // handle what to do if a listener returned false
-                                       if ( event.defaultPrevented() ) {
-                                               this.stopMoving();
-                                       }
-                               }
-                       };
-                       
-               @example
-                       // listening to a custom event
-                       var myBall = new Ball();
-                       
-                       glow.events.addListener(myBall, "bounce", function(event) {
-                               if (event.bounceCount == 3) {
-                                       // stop bouncing after 3 bounces
-                                       return false;
-                               }
-                       });
-               */
-               r.fire = function (attachedTo, name, e) {
-                       if (! attachedTo) throw 'glow.events.fire: required parameter attachedTo not passed (name: ' + name + ')';
-                       if (! name) throw 'glow.events.fire: required parameter name not passed';
-                       if (! e) { e = new r.Event(); }
-                       if ( e.constructor === Object ) { e = new r.Event( e ) }
-
-                       if (typeof attachedTo == 'string') {
-                               if (! glow.dom) { throw "glow.dom must be loaded to use a selector as the first argument to glow.events.addListener"; }
-                               attachedTo = $(attachedTo);
-                       }
-
-                       e.type = name;
-                       e.attachedTo = attachedTo;
-                       if (! e.source) { e.source = attachedTo; }
-
-                       if (attachedTo instanceof glow.dom.NodeList) {
-
-                               attachedTo.each(function(i){
-
-                                       callListeners(attachedTo[i], e);
-
-                               });
-
-                       } else {
-
-                               callListeners(attachedTo, e);
-
-                       }
-
-                       return e;
-               };
-
-               function callListeners(attachedTo, e) {
-                       
-                       var objIdent,
-                               objListeners,
-                               objEventListeners = objListeners && objListeners[e.type];
-
-                       // 3 assignments, but stop assigning if any of them are false
-                       (objIdent = attachedTo[psuedoPrivateEventKey]) &&
-                       (objListeners = listenersByObjId[objIdent]) &&
-                       (objEventListeners = objListeners[e.type]);
-
-                       if (! objEventListeners) { return e; }
-
-                       var listener;
-                       var listeners = objEventListeners.slice(0);
-
-                       // we make a copy of the listeners before calling them, as the event handlers may
-                       // remove themselves (took me a while to track this one down)
-                       for (var i = 0, len = listeners.length; i < len; i++) {
-                               listener = listeners[i];
-                               if ( listener[2].call(listener[3] || attachedTo, e) === false ) {
-                                       e.preventDefault();
-                               }
-                       }
-
-               }
-
-               /**
-               @private
-               @name glow.events.addKeyListener
-               @deprecated
-               @function
-               @description Adds an event listener for a keyboard event HELLO.
-               
-                       <p><em>Notes for Opera</em></p>
-                       
-                       It is currently impossible to differentiate certain key events in 
-                       Opera (for example the RIGHT (the right arrow key) and the 
-                       apostrope (') result in the same code). For this reason pressing 
-                       either of these keys will result in key listeners specified as 
-                       "RIGHT" and/or "'" to be fired.
-                       
-                       <p><em>Key Identifiers</em></p>
-                       
-                       The key param uses the following strings to refer to special keys, 
-                       i.e. non alpha-numeric keys.
-                       
-                       <ul>
-                       <li>CAPSLOCK</li>
-                       <li>NUMLOCK</li>
-                       <li>SCROLLLOCK</li>
-                       <li>BREAK</li>
-                       <li>BACKTICK</li>
-                       <li>BACKSPACE</li>
-                       <li>PRINTSCREEN</li>
-                       <li>MENU</li>
-                       <li>SPACE</li>
-                       <li>ESC</li>
-                       <li>TAB</li>
-                       <li>META</li>
-                       <li>RIGHTMETA</li>
-                       <li>ENTER</li>
-                       <li>F1</li>
-                       <li>F2</li>
-                       <li>F3</li>
-                       <li>F4</li>
-                       <li>F5</li>
-                       <li>F6</li>
-                       <li>F7</li>
-                       <li>F8</li>
-                       <li>F9</li>
-                       <li>F10</li>
-                       <li>F11</li>
-                       <li>F12</li>
-                       <li>INS</li>
-                       <li>HOME</li>
-                       <li>PAGEUP</li>
-                       <li>DEL</li>
-                       <li>END</li>
-                       <li>PAGEDOWN</li>
-                       <li>LEFT</li>
-                       <li>UP</li>
-                       <li>RIGHT</li>
-                       <li>DOWN</li>
-                       </ul>
-
-               @param {String} key The key or key combination to listen to. 
-               
-                       This parameter starts with modifier keys 'CTRL', 'ALT' and 
-                       'SHIFT'. Modifiers can appear in any combination and order and are 
-                       separated by a '+'.
-                       
-                       Following any modifiers is the key character. To specify a 
-                       character code, use the appropriate escape sequence (e.g. 
-                       "CTRL+\u0065" = CTRL+e"). 
-                       
-                       To specify a special key, the key character should be replaced with 
-                       a key identifier, see description below (e.g. "RIGHT" specifies the 
-                       right arrow key).
-                       
-               @param {String} type The type of key press to listen to.
-                       
-                       Possible values for this parameter are:
-                       
-                       <dl>
-                       <dt>press</dt><dd>the key is pressed (comparable to a mouse click)</dd>
-                       <dt>down</dt><dd>the key is pushed down</dd>
-                       <dt>up</dt><dd>the key is released</dd>
-                       </dl>
-               
-               @param {Function} callback The function to be called when the event fires.
-                       
-               @param {Object} [context] The execution scope of the callback.
-       
-                       If this parameter is not passed then the attachTo object will be the 
-                       context of the callback.
-       
-               @returns {Number}
-               
-                       A unique identifier for the event suitable for passing to 
-                       {@link glow.events.removeListener}.
-               
-               @example
-                       glow.events.addKeyListener("CTRL+ALT+a", "press",
-                       function () { alert("CTRL+ALT+a pressed"); }
-                   );
-                       glow.events.addKeyListener("SHIFT+\u00A9", "down",
-                               function () { alert("SHIFT+© pushed") }
-                       );
-               */
-               var keyRegex = /^((?:(?:ctrl|alt|shift)\+)*)(?:(\w+|.)|[\n\r])$/i;
-               r.addKeyListener = function (key, type, callback, context) {
-                       type.replace(/^key/i, "");
-                       type = type.toLowerCase();
-                       if (! (type == 'press' || type == 'down' || type == 'up')) {
-                               throw 'event type must be press, down or up';
-                       }
-                       if (! topKeyListeners[type]) { initTopKeyListener(type); }
-                       var res = key.match(keyRegex),
-                               mods = 0,
-                               charCode;
-                       if (! res) { throw 'key format not recognised'; }
-                       if (res[1].toLowerCase().indexOf('ctrl') != -1)  { mods += CTRL;  }
-                       if (res[1].toLowerCase().indexOf('alt') != -1)   { mods += ALT;   }
-                       if (res[1].toLowerCase().indexOf('shift') != -1) { mods += SHIFT; }
-                       var eventKey = mods + ':' + (res[2] ? res[2].toLowerCase() : '\n') + ':' + type;
-                       var ident = 'k:' + keyListenerId++;
-                       keyTypes[ident] = eventKey;
-                       var listeners = keyListeners[eventKey];
-                       if (! listeners) { listeners = keyListeners[eventKey] = []; }
-                       listeners[listeners.length] = [ident, type, callback, context];
-                       return ident;
-               };
-
-               /**
-               @name  glow.events.Event
-               @class
-               @param {Object} [properties] Properties to add to the Event instance.
-                       Each key-value pair in the object will be added to the Event as
-                       properties
-               @description Object passed into all events
-                       
-                       Some of the properties described below are only available for 
-                       certain event types. These are listed in the property descriptions 
-                       where applicable.
-                       
-                       <p><em>Notes for Opera</em></p>
-                       
-                       The information returned from Opera about key events does not allow 
-                       certain keys to be differentiated. This mainly applies to special 
-                       keys, such as the arrow keys, function keys, etc. which conflict 
-                       with some printable characters.
-                       
-               */
-               r.Event = function ( obj ) {
-                       if( obj ) {
-                               glow.lang.apply( this, obj );
-                       }
-               };
-               
-               /**
-               @name glow.events.Event#attachedTo
-               @type Object | Element
-               @description The object/element that the listener is attached to.
-               
-                       See the description for 'source' for more details.
-               */
-               
-               /**
-               @name glow.events.Event#source
-               @type Element
-               @description The actual object/element that the event originated from.
-                       
-                       For example, you could attach a listener to an 'ol' element to 
-                       listen for clicks. If the user clicked on an 'li' the source property 
-                       would be the 'li' element, and 'attachedTo' would be the 'ol'.
-               */
-               
-               /**
-               @name glow.events.Event#pageX
-               @type Number
-               @description The horizontal position of the mouse pointer in the page in pixels.
-               
-                       <p><em>Only available for mouse events.</em></p>
-               */
-               
-               /**
-               @name glow.events.Event#pageY
-               @type Number
-               @description The vertical position of the mouse pointer in the page in pixels.
-               
-                       <p><em>Only available for mouse events.</em></p>
-               */
-               
-               /**
-               @name glow.events.Event#button
-               @type Number
-               @description  A number representing which button was pressed.
-               
-                       <p><em>Only available for mouse events.</em></p>
-                       
-                       0 for the left button, 1 for the middle button or 2 for the right button.
-               */
-
-               /**
-               @name glow.events.Event#relatedTarget
-               @type Element
-               @description The element that the mouse has come from or is going to.
-               
-                       <p><em>Only available for mouse over/out events.</em></p>
-               */
-               
-               /**
-               @name glow.events.Event#wheelDelta
-               @type Number
-               @description The number of clicks up (positive) or down (negative) that the user moved the wheel.
-               
-                       <p><em>Only available for mouse wheel events.</em></p>
-               */
-               
-               /**
-               @name glow.events.Event#ctrlKey
-               @type Boolean
-               @description Whether the ctrl key was pressed during the key event.
-               
-                       <p><em>Only available for keyboard events.</em></p>
-               */
-               
-               /**
-               @name glow.events.Event#shiftKey
-               @type Boolean
-               @description  Whether the shift key was pressed during the key event.
-               
-                       <p><em>Only available for keyboard events.</em></p>
-               */
-               
-               /**
-               @name glow.events.Event#altKey
-               @type Boolean
-               @description Whether the alt key was pressed during the key event.
-               
-                       <p><em>Only available for keyboard events.</em></p>
-               */
-               
-               /**
-               @name glow.events.Event#capsLock                        
-               @type Boolean | Undefined
-               @description Whether caps-lock was on during the key event
-               
-                       <p><em>Only available for keyboard events.</em></p>
-               
-                       If the key is not alphabetic, this property will be undefined 
-                       as it is not possible to tell if caps-lock is on in this scenario.
-               */
-               
-               /**
-               @name glow.events.Event#keyCode
-               @type Number
-               @description An integer number represention of the keyboard key that was pressed.
-               
-                       <p><em>Only available for keyboard events.</em></p>
-               */
-               
-               /**
-               @name glow.events.Event#key
-               @type String | Undefined
-               @description  A short identifier for the key for special keys.
-               
-                       <p><em>Only available for keyboard events.</em></p>
-                       
-                       If the key was not a special key this property will be undefined.
-                       
-                       See the list of key identifiers in {@link glow.events.addKeyListener}
-               */
-               
-               /**
-               @name glow.events.Event#charCode
-               @type Number | Undefined
-               @description The unicode character code for a printable character.
-               
-                       <p><em>Only available for keyboard events.</em></p>
-                       
-                       This will be undefined if the key was not a printable character.
-               */
-               
-               /**
-               @name glow.events.Event#chr
-               @type String
-               @description A printable character string.
-               
-                       <p><em>Only available for keyboard events.</em></p>
-                       
-                       The string of the key that was pressed, for example 'j' or 's'.
-                       
-                       This will be undefined if the key was not a printable character.
-               */
-               
-
-               /**
-               @name glow.events.Event#preventDefault
-               @function
-               @description Prevent the default action for events. 
-               
-                       This can also be achieved by returning false from an event callback
-               
-               */
-               r.Event.prototype.preventDefault = function () {
-                       if (this[psuedoPreventDefaultKey]) { return; }
-                       this[psuedoPreventDefaultKey] = true;
-                       if (this.nativeEvent && this.nativeEvent.preventDefault) {
-                               this.nativeEvent.preventDefault();
-                               this.nativeEvent.returnValue = false;
-                       }
-               };
-
-               /**
-               @name glow.events.Event#defaultPrevented
-               @function
-               @description Test if the default action has been prevented.
-               
-               @returns {Boolean}
-               
-                       True if the default action has been prevented.
-               */
-               r.Event.prototype.defaultPrevented = function () {
-                       return !! this[psuedoPreventDefaultKey];
-               };
-
-               /**
-               @name glow.events.Event#stopPropagation
-               @function
-               @description Stops the event propagating. 
-               
-                       For DOM events, this stops the event bubbling up through event 
-                       listeners added to parent elements. The event object is marked as
-                       having had propagation stopped (see 
-                       {@link glow.events.Event#propagationStopped propagationStopped}).
-               
-               @example
-                       // catch all click events that are not links
-                       glow.events.addListener(
-                               document,
-                               'click',
-                               function () { alert('document clicked'); }
-                       );
-
-                       glow.events.addListener(
-                               'a',
-                               'click',
-                               function (e) { e.stopPropagation(); }
-                       );
-               */
-               r.Event.prototype.stopPropagation = function () {
-                       if (this[psuedoStopPropagationKey]) { return; }
-                       this[psuedoStopPropagationKey] = true;
-                       var e = this.nativeEvent;
-                       if (e) {
-                               e.cancelBubble = true;
-                               if (e.stopPropagation) { e.stopPropagation(); }
-                       }
-               };
-
-               /**
-               @name glow.events.Event#propagationStopped
-               @function
-               @description Tests if propagation has been stopped for this event.
-               
-               @returns {Boolean}
-               
-                       True if event propagation has been prevented.
-
-               */
-               r.Event.prototype.propagationStopped = function () {
-                       return !! this[psuedoStopPropagationKey];
-               };
-               
-               //cleanup to avoid mem leaks in IE
-               if (glow.env.ie < 8 || glow.env.webkit < 500) {
-                       r.addListener(window, "unload", clearEvents);
-               }
-
-               glow.events = r;
-               glow.events.listenersByObjId = listenersByObjId;
-       }
-});/**
-@name glow.data
-@namespace
-@description Serialising and de-serialising data
-@see <a href="../furtherinfo/data/data.shtml">Using glow.data</a>
-*/
-(window.gloader || glow).module({
-       name: "glow.data",
-       library: ["glow", "1.7.0"],
-       depends: [["glow", "1.7.0", "glow.dom"]],
-       builder: function(glow) {
-               //private
-
-               /*
-               PrivateProperty: TYPES
-                       hash of strings representing data types
-               */
-               var TYPES = {
-                       UNDEFINED : "undefined",
-                       OBJECT    : "object",
-                       NUMBER    : "number",
-                       BOOLEAN   : "boolean",
-                       STRING    : "string",
-                       ARRAY     : "array",
-                       FUNCTION  : "function",
-                       NULL      : "null"
-               }
-
-               /*
-               PrivateProperty: TEXT
-                       hash of strings used in encoding/decoding
-               */
-               var TEXT = {
-                       AT    : "@",
-                       EQ    : "=",
-                       DOT   : ".",
-                       EMPTY : "",
-                       AND   : "&",
-                       OPEN  : "(",
-                       CLOSE : ")"
-               }
-
-               /*
-               PrivateProperty: JSON
-                       nested hash of strings and regular expressions used in encoding/decoding Json
-               */
-               var JSON = {
-                       HASH : {
-                               START     : "{",
-                               END       : "}",
-                               SHOW_KEYS : true
-                       },
-
-                       ARRAY : {
-                               START     : "[",
-                               END       : "]",
-                               SHOW_KEYS : false
-                       },
-
-                       DATA_SEPARATOR   : ",",
-                       KEY_SEPARATOR    : ":",
-                       KEY_DELIMITER    : "\"",
-                       STRING_DELIMITER : "\"",
-
-                       SAFE_PT1 : /^[\],:{}\s]*$/,
-                       SAFE_PT2 : /\\./g,
-                       SAFE_PT3 : /\"[^\"\\\n\r]*\"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,
-                       SAFE_PT4 : /(?:^|:|,)(?:\s*\[)+/g
-               }
-
-               /*
-               PrivateProperty: SLASHES
-                       hash of strings and regular expressions used in encoding strings
-               */
-               var SLASHES = {
-                       TEST : /[\b\n\r\t\\\f\"]/g,
-                       B : {PLAIN : "\b", ESC : "\\b"},
-                       N : {PLAIN : "\n", ESC : "\\n"},
-                       R : {PLAIN : "\r", ESC : "\\r"},
-                       T : {PLAIN : "\t", ESC : "\\t"},
-                       F : {PLAIN : "\f", ESC : "\\f"},
-                       SL : {PLAIN : "\\", ESC : "\\\\"},
-                       QU : {PLAIN : "\"", ESC : "\\\""}
-               }
-
-               /*
-               PrivateMethod: _replaceSlashes
-                       Callback function for glow.lang.replace to escape appropriate characters
-
-               Arguments:
-                       s - the regex match to be tested
-
-               Returns:
-                       The escaped version of the input.
-               */
-               function _replaceSlashes(s) {
-                       switch (s) {
-                               case SLASHES.B.PLAIN: return SLASHES.B.ESC;
-                               case SLASHES.N.PLAIN: return SLASHES.N.ESC;
-                               case SLASHES.R.PLAIN: return SLASHES.R.ESC;
-                               case SLASHES.T.PLAIN: return SLASHES.T.ESC;
-                               case SLASHES.F.PLAIN: return SLASHES.F.ESC;
-                               case SLASHES.SL.PLAIN: return SLASHES.SL.ESC;
-                               case SLASHES.QU.PLAIN: return SLASHES.QU.ESC;
-                               default: return s;
-                       }
-               }
-
-               /*
-               PrivateMethod: _getType
-                       Returns the data type of the object
-
-               Arguments:
-                       object - the object to be tested
-
-               Returns:
-                       A one of the TYPES constant properties that represents the data type of the object.
-               */
-               function _getType(object) {
-                       if((typeof object) == TYPES.OBJECT) {
-                               if (object == null) {
-                                       return TYPES.NULL;
-                               } else {
-                                       return (object instanceof Array)?TYPES.ARRAY:TYPES.OBJECT;
-                               }
-                       } else {
-                               return (typeof object);
-                       }
-               }
-
-               //public
-               glow.data = {
-                       /**
-                       @name glow.data.encodeUrl
-                       @function
-                       @description Encodes an object for use as a query string.
-                       
-                               Returns a string representing the object suitable for use 
-                               as a query string, with all values suitably escaped.
-                               It does not include the initial question mark. Where the 
-                               input field was an array, the key is repeated in the output.
-                       
-                       @param {Object} object The object to be encoded.
-                       
-                               This must be a hash whose values can only be primitives or 
-                               arrays of primitives.
-                       
-                       @returns {String}
-                       
-                       @example
-                               var getRef = glow.data.encodeUrl({foo: "Foo", bar: ["Bar 1", "Bar2"]});
-                               // will return "foo=Foo&bar=Bar%201&bar=Bar2"
-                       */
-                       encodeUrl : function (object) {
-                               var objectType = _getType(object);
-                               var paramsList = [];
-                               var listLength = 0;
-
-                               if (objectType != TYPES.OBJECT) {
-                                       throw new Error("glow.data.encodeUrl: cannot encode item");
-                               } else {
-                                       for (var key in object) {
-                                               switch(_getType(object[key])) {
-                                                       case TYPES.FUNCTION:
-                                                       case TYPES.OBJECT:
-                                                               throw new Error("glow.data.encodeUrl: cannot encode item");
-                                                               break;
-                                                       case TYPES.ARRAY:
-                                                               for(var i = 0, l = object[key].length; i < l; i++) {
-                                                                       switch(_getType(object[key])[i]) {
-                                                                               case TYPES.FUNCTION:
-                                                                               case TYPES.OBJECT:
-                                                                               case TYPES.ARRAY:
-                                                                                       throw new Error("glow.data.encodeUrl: cannot encode item");
-                                                                                       break;
-                                                                               default:
-                                                                                       paramsList[listLength++] = key + TEXT.EQ + encodeURIComponent(object[key][i]);
-                                                                       }
-                                                               }
-                                                               break;
-                                                       default:
-                                                               paramsList[listLength++] = key + TEXT.EQ + encodeURIComponent(object[key]);
-                                               }
-                                       }
-
-                                       return paramsList.join(TEXT.AND);
-                               }
-                       },
-                       /**
-                       @name glow.data.decodeUrl
-                       @function
-                       @description Decodes a query string into an object.
-                       
-                               Returns an object representing the data given by the query 
-                               string, with all values suitably unescaped. All keys in the 
-                               query string are keys of the object. Repeated keys result 
-                               in an array.
-                       
-                       @param {String} string The query string to be decoded.
-                       
-                               It should not include the initial question mark.
-                       
-                       @returns {Object}
-                       
-                       @example
-                               var getRef = glow.data.decodeUrl("foo=Foo&bar=Bar%201&bar=Bar2");
-                               // will return the object {foo: "Foo", bar: ["Bar 1", "Bar2"]}
-                       */
-                       decodeUrl : function (text) {
-                               if(_getType(text) != TYPES.STRING) {
-                                       throw new Error("glow.data.decodeUrl: cannot decode item");
-                               } else if (text === "") {
-                                       return {};
-                               }
-
-                               var result = {};
-                               var keyValues = text.split(/[&;]/);
-
-                               var thisPair, key, value;
-
-                               for(var i = 0, l = keyValues.length; i < l; i++) {
-                                       thisPair = keyValues[i].split(TEXT.EQ);
-                                       if(thisPair.length != 2) {
-                                               throw new Error("glow.data.decodeUrl: cannot decode item");
-                                       } else {
-                                               key   = glow.lang.trim( decodeURIComponent(thisPair[0]) );
-                                               value = glow.lang.trim( decodeURIComponent(thisPair[1]) );
-
-                                               switch (_getType(result[key])) {
-                                                       case TYPES.ARRAY:
-                                                               result[key][result[key].length] = value;
-                                                               break;
-                                                       case TYPES.UNDEFINED:
-                                                               result[key] = value;
-                                                               break;
-                                                       default:
-                                                               result[key] = [result[key], value];
-                                               }
-                                       }
-                               }
-
-                               return result;
-                       },
-                       /**
-                       @name glow.data.encodeJson
-                       @function
-                       @description Encodes an object into a string JSON representation.
-                       
-                               Returns a string representing the object as JSON.
-                       
-                       @param {Object} object The object to be encoded.
-                        
-                               This can be arbitrarily nested, but must not contain 
-                               functions or cyclical structures.
-                       
-                       @returns {Object}
-                       
-                       @example
-                               var myObj = {foo: "Foo", bar: ["Bar 1", "Bar2"]};
-                               var getRef = glow.data.encodeJson(myObj);
-                               // will return '{"foo": "Foo", "bar": ["Bar 1", "Bar2"]}'
-                       */
-                       encodeJson : function (object, options) {
-                               function _encode(object, options)
-                               {
-                                       if(_getType(object) == TYPES.ARRAY) {
-                                               var type = JSON.ARRAY;
-                                       } else {
-                                               var type = JSON.HASH;
-                                       }
-
-                                       var serial = [type.START];
-                                       var len = 1;
-                                       var dataType;
-                                       var notFirst = false;
-
-                                       for(var key in object) {
-                                               dataType = _getType(object[key]);
-
-                                               if(dataType != TYPES.UNDEFINED) { /* ignore undefined data */
-                                                       if(notFirst) {
-                                                               serial[len++] = JSON.DATA_SEPARATOR;
-                                                       }
-                                                       notFirst = true;
-
-                                                       if(type.SHOW_KEYS) {
-                                                               serial[len++] = JSON.KEY_DELIMITER;
-                                                               serial[len++] = key;
-                                                               serial[len++] = JSON.KEY_DELIMITER;
-                                                               serial[len++] = JSON.KEY_SEPARATOR;
-                                                       }
-
-                                                       switch(dataType) {
-                                                               case TYPES.FUNCTION:
-                                                                       throw new Error("glow.data.encodeJson: cannot encode item");
-                                                                       break;
-                                                               case TYPES.STRING:
-                                                               default:
-                                                                       serial[len++] = JSON.STRING_DELIMITER;
-                                                                       serial[len++] = glow.lang.replace(object[key], SLASHES.TEST, _replaceSlashes);
-                                                                       serial[len++] = JSON.STRING_DELIMITER;
-                                                                       break;
-                                                               case TYPES.NUMBER:
-                                                               case TYPES.BOOLEAN:
-                                                                       serial[len++] = object[key];
-                                                                       break;
-                                                               case TYPES.OBJECT:
-                                                               case TYPES.ARRAY:
-                                                                       serial[len++] = _encode(object[key], options);
-                                                                       break;
-                                                               case TYPES.NULL:
-                                                                       serial[len++] = TYPES.NULL;
-                                                                       break;
-                                                       }
-                                               }
-                                       }
-                                       serial[len++] = type.END;
-
-                                       return serial.join(TEXT.EMPTY);
-                               }
-
-                               options = options || {};
-                               var type = _getType(object);
-
-                               if((type == TYPES.OBJECT) || (type == TYPES.ARRAY)) {
-                                       return _encode(object, options);
-                               } else {
-                                       throw new Error("glow.data.encodeJson: cannot encode item");
-                               }
-                       },
-                       /**
-                       @name glow.data.decodeJson
-                       @function
-                       @description Decodes a string JSON representation into an object.
-                               
-                               Returns a JavaScript object that mirrors the data given.
-                       
-                       @param {String} string The string to be decoded.
-                               Must be valid JSON. 
-                       
-                       @param {Object} opts
-                       
-                                       Zero or more of the following as properties of an object:
-                                       @param {Boolean} [opts.safeMode=false] Whether the string should only be decoded if it is  deemed "safe". 
-                                       The json.org regular expression checks are used. 
-                       
-                       @returns {Object}
-                       
-                       @example
-                               var getRef = glow.data.decodeJson('{foo: "Foo", bar: ["Bar 1", "Bar2"]}');
-                               // will return {foo: "Foo", bar: ["Bar 1", "Bar2"]}
-                       
-                               var getRef = glow.data.decodeJson('foobar', {safeMode: true});
-                               // will throw an error
-                       */
-                       decodeJson : function (text, options) {
-                               if(_getType(text) != TYPES.STRING) {
-                                       throw new Error("glow.data.decodeJson: cannot decode item");
-                               }
-
-                               options = options || {};
-                               options.safeMode = options.safeMode || false;
-
-                               var canEval = true;
-
-                               if(options.safeMode) {
-                                       canEval = (JSON.SAFE_PT1.test(text.replace(JSON.SAFE_PT2, TEXT.AT).replace(JSON.SAFE_PT3, JSON.ARRAY.END).replace(JSON.SAFE_PT4, TEXT.EMPTY)));
-                               }
-
-                               if(canEval) {
-                                       try {
-                                               return eval(TEXT.OPEN + text + TEXT.CLOSE);
-                                       }
-                                       catch(e) {/* continue to error */}
-                               }
-
-                               throw new Error("glow.data.decodeJson: cannot decode item");
-                       },
-                       /**
-                       @name glow.data.escapeHTML
-                       @function
-                       @description Escape HTML entities.
-                       
-                               Returns a string with HTML entities escaped.
-                       
-                       @param {String} string The string to be escaped.
-                       
-                       @returns {String}
-                       
-                       @example
-                               // useful for protecting against XSS attacks:
-                               var fieldName = '" onclick="alert(\'hacked\')" name="';
-                       
-                               // but should be used in all cases like this:
-                               glow.dom.create('<input name="' + glow.data.escapeHTML(untrustedString) + '"/>');
-                        */
-                       escapeHTML : function (html) {
-                               return glow.dom.create('<div></div>').text(html).html();
-                       }                  
-               };
-       }
-});
-/**
-@name glow.net
-@namespace
-@description Sending data to & from the server
-@see <a href="../furtherinfo/net/net.shtml">Using glow.net</a>
-*/
-(window.gloader || glow).module({
-       name: "glow.net",
-       library: ["glow", "1.7.0"],
-       depends: [["glow", "1.7.0", "glow.data", "glow.events"]],
-       builder: function(glow) {
-               //private
-
-               var STR = {
-                               XML_ERR:"Cannot get response as XML, check the mime type of the data",
-                               POST_DEFAULT_CONTENT_TYPE:'application/x-www-form-urlencoded;'
-                       },
-                       endsPlusXml = /\+xml$/,
-                       /**
-                        * @name glow.net.scriptElements
-                        * @private
-                        * @description Script elements that have been added via {@link glow.net.loadScript loadScript}
-                        * @type Array
-                        */
-                       scriptElements = [],
-                       /**
-                        * @name glow.net.callbackPrefix
-                        * @private
-                        * @description Callbacks in _jsonCbs will be named this + a number
-                        * @type String
-                        */
-                       callbackPrefix = "c",
-                       /**
-                        * @name glow.net.globalObjectName
-                        * @private
-                        * @description Name of the global object used to store loadScript callbacks
-                        * @type String
-                        */
-                       globalObjectName = "_" + glow.UID + "loadScriptCbs",
-                       $ = glow.dom.get,
-                       events = glow.events,
-                       emptyFunc = function(){};
-
-               /**
-                * @name glow.net.xmlHTTPRequest
-                * @private
-                * @function
-                * @description Creates an xmlHTTPRequest transport
-                * @returns Object
-                */
-               function xmlHTTPRequest() {
-                       //try IE first. IE7's xmlhttprequest and XMLHTTP6 are broken. Avoid avoid avoid!
-                       if (window.ActiveXObject) {
-                               return (xmlHTTPRequest = function() { return new ActiveXObject("Microsoft.XMLHTTP"); })();
-                       } else {
-                               return (xmlHTTPRequest = function() { return new XMLHttpRequest(); })();
-                       }
-               }
-
-               /**
-                * @name glow.net.populateOptions
-                * @private
-                * @function
-                * @description Adds defaults to get / post option object
-                * @param {Object} opts Object to add defaults to
-                * @returns Object
-                */
-               function populateOptions(opts) {
-                       return glow.lang.apply(
-                               {
-                                       onLoad: emptyFunc,
-                                       onError: emptyFunc,
-                                       onAbort: emptyFunc,
-                                       headers: {},
-                                       async: true,
-                                       useCache: false,
-                                       data: null,
-                                       defer: false,
-                                       forceXml: false
-                               },
-                               opts || {}
-                       );
-               }
-
-               /*
-               PrivateMethod: noCacheUrl
-                       Adds random numbers to the querystring of a url so the browser doesn't use a cached version
-               */
-
-               function noCacheUrl(url) {
-                       return [url, (/\?/.test(url) ? "&" : "?"), "a", new Date().getTime(), parseInt(Math.random()*100000)].join("");
-               }
-
-               /*
-               PrivateMethod: makeXhrRequest
-                       Makes an http request
-               */
-               /**
-                * @name glow.net.makeXhrRequest
-                * @private
-                * @function
-                * @description Makes an xhr http request
-                * @param {String} method HTTP Method
-                * @param {String} url URL of the request
-                * @param {Object} Options, see options for {@link glow.net.get}
-                * @returns Object
-                */
-               function makeXhrRequest(method, url, opts) {
-                       var req = xmlHTTPRequest(), //request object
-                               data = opts.data && (typeof opts.data == "string" ? opts.data : glow.data.encodeUrl(opts.data)),
-                               i,
-                               request = new Request(req, opts);
-
-                       if (!opts.useCache) {
-                               url = noCacheUrl(url);
-                       }
-
-                       //open needs to go first to maintain cross-browser support for readystates
-                       req.open(method, url, opts.async);
-
-                       //add custom headers
-                       for (i in opts.headers) {
-                               req.setRequestHeader(i, opts.headers[i]);
-                       }
-
-                       function send() {
-                               request.send = emptyFunc;
-                               if (opts.async) {
-                                       //sort out the timeout if there is one
-                                       if (opts.timeout) {
-                                               request._timeout = setTimeout(function() {
-                                                       abortRequest(request);
-                                                       var response = new Response(req, true, request);
-                                                       events.fire(request, "error", response);
-                                               }, opts.timeout * 1000);
-                                       }
-
-                                       req.onreadystatechange = function() {
-                                               if (req.readyState == 4) {
-                                                       //clear the timeout
-                                                       request._timeout && clearTimeout(request._timeout);
-                                                       //set as completed
-                                                       request.completed = true;
-                                                       var response = new Response(req, false, request);
-                                                       if (response.wasSuccessful) {
-                                                               events.fire(request, "load", response);
-                                                       } else {
-                                                               events.fire(request, "error", response);
-                                                       }
-                                                       // prevent parent scopes leaking (cross-page) in IE
-                                                       req.onreadystatechange = new Function();
-                                               }
-                                       };
-                                       req.send(data);
-                                       return request;
-                               } else {
-                                       req.send(data);
-                                       request.completed = true;
-                                       var response = new Response(req, false, request);
-                                       if (response.wasSuccessful) {
-                                               events.fire(request, "load", response);
-                                       } else {
-                                               events.fire(request, "error", response);
-                                       }
-                                       return response;
-                               }
-                       }
-
-                       request.send = send;
-                       return opts.defer ? request : send();
-               }
-
-               //public
-               var r = {}; //the module
-
-               /**
-               @name glow.net.get
-               @function
-               @description Makes an HTTP GET request to a given url
-
-               @param {String} url
-                       Url to make the request to. This can be a relative path. You cannot make requests
-                       for files on other domains, to do that you must put your data in a javascript
-                       file and use {@link glow.net.loadScript} to fetch it.
-               @param {Object} opts
-                       Options Object of options.
-                       @param {Function} [opts.onLoad] Callback to execute when the request has sucessfully loaded
-                               The callback is passed a Response object as its first parameter.
-                       @param {Function} [opts.onError] Callback to execute if the request was unsucessful
-                               The callback is passed a Response object as its first parameter.
-                               This callback will also be run if a request times out.
-                       @param {Function} [opts.onAbort] Callback to execute if the request is aborted
-                       @param {Object} [opts.headers] A hash of headers to send along with the request
-                               Eg {"Accept-Language": "en-gb"}
-                       @param {Boolean} [opts.async=true] Should the request be performed asynchronously?
-                       @param {Boolean} [opts.useCache=false] Allow a cached response
-                               If false, a random number is added to the query string to ensure a fresh version of the file is being fetched
-                       @param {Number} [opts.timeout] Time to allow for the request in seconds
-                               No timeout is set by default. Only applies for async requests. Once
-                               the time is reached, the error event will fire with a "408" status code.
-                       @param {Boolean} [opts.defer=false] Do not send the request straight away
-                               Deferred requests need to be triggered later using myRequest.send()
-                       @param {Boolean} [opts.forceXml=false] Treat the response as XML.
-                               This will allow you to use {@link glow.net.Response#xml response.xml()}
-                               even if the response has a non-XML mime type.
-
-               @returns {glow.net.Request|glow.net.Response}
-                       A response object for non-defered sync requests, otherwise a
-                       request object is returned
-
-               @example
-                       var request = glow.net.get("myFile.html", {
-                               onLoad: function(response) {
-                                       alert("Got file:\n\n" + response.text());
-                               },
-                               onError: function(response) {
-                                       alert("Error getting file: " + response.statusText());
-                               }
-                       });
-               */
-               r.get = function(url, o) {
-                       o = populateOptions(o);
-                       return makeXhrRequest('GET', url, o);
-               };
-
-               /**
-               @name glow.net.post
-               @function
-               @description Makes an HTTP POST request to a given url
-
-               @param {String} url
-                       Url to make the request to. This can be a relative path. You cannot make requests
-                       for files on other domains, to do that you must put your data in a javascript
-                       file and use {@link glow.net.loadScript} to fetch it.
-               @param {Object|String} data
-                       Data to post, either as a JSON-style object or a urlEncoded string
-               @param {Object} opts
-                       Same options as {@link glow.net.get}
-
-               @returns {Number|glow.net.Response}
-                       An integer identifying the async request, or the response object for sync requests
-
-               @example
-                       var postRef = glow.net.post("myFile.html",
-                               {key:"value", otherkey:["value1", "value2"]},
-                               {
-                                       onLoad: function(response) {
-                                               alert("Got file:\n\n" + response.text());
-                                       },
-                                       onError: function(response) {
-                                               alert("Error getting file: " + response.statusText());
-                                       }
-                               }
-                       );
-               */
-               r.post = function(url, data, o) {
-                       o = populateOptions(o);
-                       o.data = data;
-                       if (!o.headers["Content-Type"]) {
-                               o.headers["Content-Type"] = STR.POST_DEFAULT_CONTENT_TYPE;
-                       }
-                       return makeXhrRequest('POST', url, o);
-               };
-
-               /**
-               @name glow.net.loadScript
-               @function
-               @description Loads data by adding a script element to the end of the page
-                       This can be used cross domain, but should only be used with trusted
-                       sources as any javascript included in the script will be executed.
-
-               @param {String} url
-                       Url of the script. Use "{callback}" in the querystring as the callback
-                       name if the data source supports it, then you can use the options below
-               @param {Object} [opts]
-                       An object of options to use if "{callback}" is specified in the url.
-                       @param {Function} [opts.onLoad] Called when loadScript succeeds.
-                               The parameters are passed in by the external data source
-                       @param {Function} [opts.onError] Called on timeout
-                               No parameters are passed
-                       @param {Function} [opts.onAbort] Called if the request is aborted
-                       @param {Boolean} [opts.useCache=false] Allow a cached response
-                       @param {Number} [opts.timeout] Time to allow for the request in seconds
-                       @param {String} [opts.charset] Charset attribute value for the script
-
-               @returns {glow.net.Request}
-
-               @example
-                       glow.net.loadScript("http://www.server.com/json/tvshows.php?jsoncallback={callback}", {
-                               onLoad: function(data) {
-                                       alert("Data loaded");
-                               }
-                       });
-               */
-               r.loadScript = function(url, opts) {
-                       //id of the request
-                       var newIndex = scriptElements.length,
-                               //script element that gets inserted on the page
-                               script,
-                               //generated name of the callback, may not be used
-                               callbackName = callbackPrefix + newIndex,
-                               opts = populateOptions(opts),
-                               request = new Request(newIndex, opts),
-                               url = opts.useCache ? url : noCacheUrl(url),
-                               //the global property used to hide callbacks
-                               globalObject = window[globalObjectName] || (window[globalObjectName] = {});
-
-                       //assign onload
-                       if (opts.onLoad != emptyFunc) {
-                               globalObject[callbackName] = function() {
-                                       //clear the timeout
-                                       request._timeout && clearTimeout(request._timeout);
-                                       //set as completed
-                                       request.completed = true;
-                                       // call the user's callback
-                                       opts.onLoad.apply(this, arguments);
-                                       // cleanup references to prevent leaks
-                                       request.destroy();
-                                       script = globalObject[callbackName] = undefined;
-                                       delete globalObject[callbackName];
-                               };
-                               url = glow.lang.interpolate(url, {callback: globalObjectName + "." + callbackName});
-                       }
-
-                       script = scriptElements[newIndex] = document.createElement("script");
-
-                       if (opts.charset) {
-                               script.charset = opts.charset;
-                       }
-
-                       //add abort event
-                       events.addListener(request, "abort", opts.onAbort);
-
-                       glow.ready(function() {
-                               //sort out the timeout
-                               if (opts.timeout) {
-                                       request._timeout = setTimeout(function() {
-                                               abortRequest(request);
-                                               opts.onError();
-                                       }, opts.timeout * 1000);
-                               }
-                               //using setTimeout to stop Opera 9.0 - 9.26 from running the loaded script before other code
-                               //in the current script block
-                               if (glow.env.opera) {
-                                       setTimeout(function() {
-                                               if (script) { //script may have been removed already
-                                                       script.src = url;
-                                               }
-                                       }, 0);
-                               } else {
-                                       script.src = url;
-                               }
-                               //add script to page
-                               document.body.appendChild(script);
-                       });
-
-                       return request;
-               }
-
-               /**
-                *      @name glow.net.abortRequest
-                *      @private
-                *      @function
-                *      @description Aborts the request
-                *              Doesn't trigger any events
-                *
-                *      @param {glow.net.Request} req Request Object
-                *      @returns this
-                */
-               function abortRequest(req) {
-                       var nativeReq = req.nativeRequest,
-                               callbackIndex = req._callbackIndex;
-
-                       //clear timeout
-                       req._timeout && clearTimeout(req._timeout);
-                       //different if request came from loadScript
-                       if (nativeReq) {
-                               //clear listeners
-                               // prevent parent scopes leaking (cross-page) in IE
-                               nativeReq.onreadystatechange = new Function();
-                               nativeReq.abort();
-                       } else if (callbackIndex) {
-                               //clear callback
-                               window[globalObjectName][callbackPrefix + callbackIndex] = emptyFunc;
-                               //remove script element
-                               glow.dom.get(scriptElements[callbackIndex]).destroy();
-                       }
-               }
-
-               /**
-                * @name glow.net.Request
-                * @class
-                * @description Returned by {@link glow.net.post post}, {@link glow.net.get get} async requests and {@link glow.net.loadScript loadScript}
-                * @glowPrivateConstructor There is no direct constructor, since {@link glow.net.post post} and {@link glow.net.get get} create the instances.
-                */
-                
-               /**
-                * @name glow.net.Request#event:load
-                * @event
-                * @param {glow.events.Event} event Event Object
-                * @description Fired when the request is sucessful
-                *   For a get / post request, this will be fired when request returns
-                *   with an HTTP code of 2xx. loadScript requests will fire 'load' only
-                *   if {callback} is used in the URL.
-                */
-                
-               /**
-                * @name glow.net.Request#event:abort
-                * @event
-                * @param {glow.events.Event} event Event Object
-                * @description Fired when the request is aborted
-                *   If you cancel the default (eg, by returning false) the request
-                *   will continue.
-                * @description Returned by {@link glow.net.post glow.net.post}, {@link glow.net.get glow.net.get} async requests and {@link glow.net.loadScript glow.net.loadScript}
-                * @see <a href="../furtherinfo/net/net.shtml">Using glow.net</a>
-                * @glowPrivateConstructor There is no direct constructor, since {@link glow.net.post glow.net.post} and {@link glow.net.get glow.net.get} create the instances.
-                */
-                
-               /**
-                * @name glow.net.Request#event:error
-                * @event
-                * @param {glow.events.Event} event Event Object
-                * @description Fired when the request is unsucessful
-                *   For a get/post request, this will be fired when request returns
-                *   with an HTTP code which isn't 2xx or the request times out. loadScript
-                *   calls will fire 'error' only if the request times out.
-                */
-                
-                
-               /*
-                We don't want users to create instances of this class, so the constructor is documented
-                out of view of jsdoc
-
-                @param {Object} requestObj
-                       Object which represents the request type.
-                       For XHR requests it should be an XmlHttpRequest object, for loadScript
-                       requests it should be a number, the Index of the callback in glow.net._jsonCbs
-                @param {Object} opts
-                       Zero or more of the following as properties of an object:
-                       @param {Function} [opts.onLoad] Called when the request is sucessful
-                       @param {Function} [opts.onError] Called when a request is unsucessful
-                       @param {Function} [opts.onAbort] Called when a request is aborted
-
-               */
-               function Request(requestObj, opts) {
-                       /**
-                        * @name glow.net.Request#_timeout
-                        * @private
-                        * @description timeout ID. This is set by makeXhrRequest or loadScript
-                        * @type Number
-                        */
-                       this._timeout = null;
-                       
-                       /*
-                        @name glow.net.Request#_forceXml
-                        @private
-                        @type Boolean
-                        @description Force the response to be treated as xml
-                       */
-                       this._forceXml = opts.forceXml;
-                       
-                       // force the reponse to be treated as xml
-                       // IE doesn't support overrideMineType, we need to deal with that in {@link glow.net.Response#xml}
-                       if (opts.forceXml && requestObj.overrideMimeType) {
-                               requestObj.overrideMimeType('application/xml');
-                       }
-                       
-                       /**
-                        * @name glow.net.Request#complete
-                        * @description Boolean indicating whether the request has completed
-                        * @example
-                               // request.complete with an asynchronous call
-                               var request = glow.net.get(
-                                       "myFile.html", 
-                                       {
-                                               async: true,
-                                               onload: function(response) {
-                                                       alert(request.complete); // returns true
-                                               }
-                                       }
-                               );
-                               alert(request.complete); // returns boolean depending on timing of asynchronous call
-
-                               // request.complete with a synchronous call
-                               var request = glow.net.get("myFile.html", {async: false;});
-                               alert(request.complete); // returns true
-                        * @type Boolean
-                        */
-                       this.complete = false;
-
-                       if (typeof requestObj == "number") {
-                               /**
-                                * @name glow.net.Request#_callbackIndex
-                                * @private
-                                * @description Index of the callback in glow.net._jsonCbs
-                                *   This is only relavent for requests made via loadscript using the
-                                *   {callback} placeholder
-                                * @type Number
-                                */
-                               this._callbackIndex = requestObj;
-                       } else {
-                               /**
-                                * @name glow.net.Request#nativeRequest
-                                * @description The request object from the browser.
-                                *   This may not have the same properties and methods across user agents.
-                                *   Also, this will be undefined if the request originated from loadScript.
-                                * @example
-                               var request = glow.net.get(
-                                       "myFile.html", 
-                                       {
-                                               async: true,
-                                               onload: function(response) {
-                                                       alert(request.NativeObject); // returns Object()
-                                               }
-                                       }
-                               );
-                                * @type Object
-                                */
-                               this.nativeRequest = requestObj;
-                       }
-
-                       //assign events
-                       var eventNames = ["Load", "Error", "Abort"], i=0;
-
-                       for (; i < 3; i++) {
-                               events.addListener(this, eventNames[i].toLowerCase(), opts["on" + eventNames[i]]);
-                       }
-
-               }
-               Request.prototype = {
-                       /**
-                       @name glow.net.Request#send
-                       @function
-                       @description Sends the request.
-                               This is done automatically unless the defer option is set
-                       @example
-                               var request = glow.net.get(
-                                       "myFile.html", 
-                                       {
-                                               onload : function(response) {alert("Loaded");},
-                                               defer: true
-                                       }
-                               );
-                               request.send(); // returns "Loaded"
-                       @returns {Object}
-                               This for async requests or a response object for sync requests
-                       */
-                       //this function is assigned by makeXhrRequest
-                       send: function() {},
-                       /**
-                        *      @name glow.net.Request#abort
-                        *      @function
-                        *      @description Aborts an async request
-                        *              The load & error events will not fire. If the request has been
-                        *              made using {@link glow.net.loadScript loadScript}, the script
-                        *              may still be loaded but the callback will not be fired.
-                        * @example
-                               var request = glow.net.get(
-                                       "myFile.html", 
-                                       {
-                                               async: true,
-                                               defer: true,
-                                               onabort: function() {
-                                                       alert("Something bad happened.  The request was aborted.");
-                                               }
-                                       }
-                               );
-                               request.abort(); // returns "Something bad happened.  The request was aborted"
-                        *      @returns this
-                        */
-                       abort: function() {
-                               if (!this.completed && !events.fire(this, "abort").defaultPrevented()) {
-                                       abortRequest(this);
-                               }
-                               return this;
-                       },
-                       /**
-                        @name glow.net.Request#destroy
-                        @function
-                        @description Release memory from a {@link glow.net.loadScript} call.
-                               
-                               This is called automatically by {@link glow.net.loadScript loadScript}
-                               calls that have {callback} in the URL. However, if you are not using
-                               {callback}, you can use this method manually to release memory when
-                               the request has finished.
-                        
-                        @example
-                               var request = glow.net.loadScript('http://www.bbc.co.uk/whatever.js');
-                       
-                        @returns this
-                       */
-                       destroy: function() {
-                               if (this._callbackIndex !== undefined) {
-                                       // set timeout is used here to prevent a crash in IE7 (possibly other version) when the script is from the filesystem
-                                       setTimeout(function() {
-                                               $( scriptElements[this._callbackIndex] ).destroy();
-                                               scriptElements[this._callbackIndex] = undefined;
-                                               delete scriptElements[this._callbackIndex];
-                                       }, 0);
-                               }
-                               return this;
-                       }
-               };
-
-               /**
-               @name glow.net.Response
-               @class
-               @description Provided in callbacks to {@link glow.net.post glow.net.post} and {@link glow.net.get glow.net.get}
-               @see <a href="../furtherinfo/net/net.shtml">Using glow.net</a>
-
-               @glowPrivateConstructor There is no direct constructor, since {@link glow.net.post glow.net.post} and {@link glow.net.get glow.net.get} create the instances.
-               */
-               /*
-                These params are hidden as we don't want users to try and create instances of this...
-
-                @param {XMLHttpRequest} nativeResponse
-                @param {Boolean} [timedOut=false] Set to true if the response timed out
-                @param {glow.net.Request} [request] Original request object
-               */
-               function Response(nativeResponse, timedOut, request) {
-                       //run Event constructor
-                       events.Event.call(this);
-                       
-                       /**
-                       @name glow.net.Response#_request
-                       @private
-                       @description Original request object
-                       @type glow.net.Request
-                       */
-                       this._request = request;
-                       
-                       /**
-                       @name glow.net.Response#nativeResponse
-                       @description The response object from the browser.
-                               This may not have the same properties and methods across user agents.
-                       @type Object
-                       */
-                       this.nativeResponse = nativeResponse;
-                       /**
-                       @name glow.net.Response#status
-                       @description HTTP status code of the response
-                       @type Number
-                       */
-                       //IE reports status as 1223 rather than 204, for laffs
-                       this.status = timedOut ? 408 :
-                               nativeResponse.status == 1223 ? 204 : nativeResponse.status;
-
-                       /**
-                        * @name glow.net.Response#timedOut
-                        * @description Boolean indicating if the requests time out was reached.
-                        * @type Boolean
-                        */
-                       this.timedOut = !!timedOut;
-
-                       /**
-                        * @name glow.net.Response#wasSuccessful
-                        * @description  Boolean indicating if the request returned successfully.
-                        * @type Boolean
-                        */
-                       this.wasSuccessful = (this.status >= 200 && this.status < 300) ||
-                               //from cache
-                               this.status == 304 ||
-                               //watch our for requests from file://
-                               (this.status == 0 && nativeResponse.responseText);
-
-               }
-               
-               /**
-               @name glow.net-shouldParseAsXml
-               @function
-               @description Should the response be treated as xml? This function is used by IE only
-                       'this' is the response object
-               @returns {Boolean}
-               */
-               function shouldParseAsXml() {
-                       var contentType = this.header("Content-Type");
-                       // IE 6 & 7 fail to recognise Content-Types ending +xml (eg application/rss+xml)
-                       // Files from the filesystem don't have a content type, but could be xml files, parse them to be safe
-                       return endsPlusXml.test(contentType) || contentType === '';
-               }
-               
-               //don't want to document this inheritance, it'll just confuse the user
-               glow.lang.extend(Response, events.Event, {
-                       /**
-                       @name glow.net.Response#text
-                       @function
-                       @description Gets the body of the response as plain text
-                       @returns {String}
-                               Response as text
-                       */
-                       text: function() {
-                               return this.nativeResponse.responseText;
-                       },
-                       /**
-                       @name glow.net.Response#xml
-                       @function
-                       @description Gets the body of the response as xml
-                       @returns {xml}
-                               Response as XML
-                       */
-                       xml: function() {
-                               var nativeResponse = this.nativeResponse;
-                               
-                               if (
-                                       // IE fails to recognise the doc as XML in some cases
-                                       ( glow.env.ie && shouldParseAsXml.call(this) )
-                                       // If the _forceXml option is set, we need to turn the response text into xml
-                                       || ( this._request._forceXml && !this._request.nativeRequest.overrideMimeType && window.ActiveXObject )
-                               ) {
-                                       var doc = new ActiveXObject("Microsoft.XMLDOM");
-                    doc.loadXML( nativeResponse.responseText );
-                                       return doc;
-                               }
-                               else {
-                                       // check property exists
-                                       if (!nativeResponse.responseXML) {
-                                               throw new Error(STR.XML_ERR);
-                                       }
-                                       return nativeResponse.responseXML;
-                               }                               
-                       },
-
-                       /**
-                       @name glow.net.Response#json
-                       @function
-                       @description Gets the body of the response as a json object
-
-                       @param {Boolean} [safeMode=false]
-                               If true, the response will be parsed using a string parser which
-                               will filter out non-JSON javascript, this will be slower but
-                               recommended if you do not trust the data source.
-
-                       @returns {Object}
-                       */
-                       json: function(safe) {
-                               return glow.data.decodeJson(this.text(), {safeMode:safe});
-                       },
-
-                       /**
-                       @name glow.net.Response#header
-                       @function
-                       @description Gets a header from the response
-
-                       @param {String} name
-                               Header name
-
-                       @returns {String}
-                               Header value
-
-                       @example var contentType = myResponse.header("Content-Type");
-                       */
-                       header: function(name) {
-                               return this.nativeResponse.getResponseHeader(name);
-                       },
-
-                       /**
-                       @name glow.net.Response#statusText
-                       @function
-                       @description Gets the meaning of {@link glow.net.Response#status myResponse.status}
-
-                       @returns {String}
-                       */
-                       statusText: function() {
-                               return this.timedOut ? "Request Timeout" : this.nativeResponse.statusText;
-                       }
-               })
-
-               glow.net = r;
-       }
-});
-
-/**
-@name glow.tweens
-@namespace
-@description Functions for modifying animations
-@see <a href="../furtherinfo/tweens">What are tweens?</a>
-
-*/
-(window.gloader || glow).module({
-       name: "glow.tweens",
-       library: ["glow", "1.7.0"],
-       depends: [],
-       builder: function(glow) {
-
-               /*
-               PrivateMethod: _reverse
-                       Takes a tween function and returns a function which does the reverse
-               */
-               function _reverse(tween) {
-                       return function(t) {
-                               return 1 - tween(1 - t);
-                       }
-               }
-
-               glow.tweens = {
-                       /**
-                       @name glow.tweens.linear
-                       @function
-                       @description Returns linear tween.
-
-                               Will transition values from start to finish with no
-                               acceleration or deceleration.
-
-                       @returns {Function}
-                       */
-                       linear: function() {
-                               return function(t) { return t; };
-                       },
-                       /**
-                       @name glow.tweens.easeIn
-                       @function
-                       @description Creates a tween which starts off slowly and accelerates.
-
-                       @param {Number} [strength=2] How strong the easing is.
-
-                               A higher number means the animation starts off slower and
-                               ends quicker.
-
-                       @returns {Function}
-                       */
-                       easeIn: function(strength) {
-                               strength = strength || 2;
-                               return function(t) {
-                                       return Math.pow(1, strength - 1) * Math.pow(t, strength);
-                               }
-                       },
-                       /**
-                       @name glow.tweens.easeOut
-                       @function
-                       @description Creates a tween which starts off fast and decelerates.
-
-                       @param {Number} [strength=2] How strong the easing is.
-
-                               A higher number means the animation starts off faster and
-                               ends slower
-
-                       @returns {Function}
-                        */
-                       easeOut: function(strength) {
-                               return _reverse(this.easeIn(strength));
-                       },
-                       /**
-                       @name glow.tweens.easeBoth
-                       @function
-                       @description Creates a tween which starts off slowly, accelerates then decelerates after the half way point.
-
-                               This produces a smooth and natural looking transition.
-
-                       @param {Number} [strength=2] How strong the easing is.
-
-                               A higher number produces a greater difference between
-                               start / end speed and the mid speed.
-
-                       @returns {Function}
-                       */
-                       easeBoth: function(strength) {
-                               return this.combine(this.easeIn(strength), this.easeOut(strength));
-                       },
-                       /**
-                       @name glow.tweens.overshootIn
-                       @function
-                       @description Returns the reverse of {@link glow.tweens.overshootOut overshootOut}
-
-                       @param {Number} [amount=1.70158] How much to overshoot.
-
-                               The default is 1.70158 which results in a 10% overshoot.
-
-                       @returns {Function}
-                       */
-                       overshootIn: function(amount) {
-                               return _reverse(this.overshootOut(amount));
-                       },
-                       /**
-                       @name glow.tweens.overshootOut
-                       @function
-                       @description Creates a tween which overshoots its end point then returns to its end point.
-
-                       @param {Number} [amount=1.70158] How much to overshoot.
-
-                               The default is 1.70158 which results in a 10% overshoot.
-
-                       @returns {Function}
-                       */
-                       overshootOut: function(amount) {
-                               amount = amount || 1.70158;
-                               return function(t) {
-                                       if (t == 0 || t == 1) { return t; }
-                                       return ((t -= 1)* t * ((amount + 1) * t + amount) + 1);
-                               }
-                       },
-                       /**
-                       @name glow.tweens.overshootBoth
-                       @function
-                       @description Returns a combination of {@link glow.tweens.overshootIn overshootIn} and {@link glow.tweens.overshootOut overshootOut}
-
-                       @param {Number} [amount=1.70158] How much to overshoot.
-
-                               The default is 1.70158 which results in a 10% overshoot.
-
-                       @returns {Function}
-                       */
-                       overshootBoth: function(amount) {
-                               return this.combine(this.overshootIn(amount), this.overshootOut(amount));
-                       },
-                       /**
-                       @name glow.tweens.bounceIn
-                       @function
-                       @description Returns the reverse of {@link glow.tweens.bounceOut bounceOut}
-
-                       @returns {Function}
-                       */
-                       bounceIn: function() {
-                               return _reverse(this.bounceOut());
-                       },
-                       /**
-                       @name glow.tweens.bounceOut
-                       @function
-                       @description Returns a tween which bounces against the final value 3 times before stopping
-
-                       @returns {Function}
-                       */
-                       bounceOut: function() {
-                               return function(t) {
-                                       if (t < (1 / 2.75)) {
-                                               return 7.5625 * t * t;
-                                       } else if (t < (2 / 2.75)) {
-                                               return (7.5625 * (t -= (1.5 / 2.75)) * t + .75);
-                                       } else if (t < (2.5 / 2.75)) {
-                                               return (7.5625 * (t -= (2.25 / 2.75)) * t + .9375);
-                                       } else {
-                                               return (7.5625 * (t -= (2.625 / 2.75)) * t + .984375);
-                                       }
-                               };
-                       },
-                       /**
-                       @name glow.tweens.bounceBoth
-                       @function
-                       @description Returns a combination of {@link glow.tweens.bounceIn bounceIn} and {@link glow.tweens.bounceOut bounceOut}
-
-                       @returns {Function}
-                       */
-                       bounceBoth: function() {
-                               return this.combine(this.bounceIn(), this.bounceOut());
-                       },
-                       /**
-                       @name glow.tweens.elasticIn
-                       @function
-                       @description Returns the reverse of {@link glow.tweens.elasticOut elasticOut}
-
-                       @param {Number} [amplitude=1] How strong the elasticity is.
-
-                       @param {Number} [period=0.3] The frequency period.
-
-                       @returns {Function}
-                       */
-                       elasticIn: function(a, p) {
-                               return _reverse(this.elasticOut(a, p));
-                       },
-                       /**
-                       @name glow.tweens.elasticOut
-                       @function
-                       @description Creates a tween which has an elastic movement.
-
-                               You can tweak the tween using the parameters but you'll
-                               probably find the defaults sufficient.
-
-                       @param {Number} [amplitude=1] How strong the elasticity is.
-
-                       @param {Number} [period=0.3] The frequency period.
-
-                       @returns {Function}
-                       */
-                       elasticOut: function(a, p) {
-                               return function (t) {
-                                       if (t == 0 || t == 1) {
-                                               return t;
-                                       }
-                                       if (!p) {
-                                               p = 0.3;
-                                       }
-                                       if (!a || a < 1) {
-                                               a = 1;
-                                               var s = p / 4;
-                                       } else {
-                                               var s = p / (2 * Math.PI) * Math.asin(1 / a);
-                                       }
-                                       return a * Math.pow(2, -10 * t) * Math.sin( (t-s) * (2 * Math.PI) / p) + 1;
-                               }
-                       },
-                       /**
-                       @name glow.tweens.elasticBoth
-                       @function
-                       @description Returns a combination of {@link glow.tweens.elasticIn elasticIn} and {@link glow.tweens.elasticOut elasticOut}
-
-                       @param {Number} [amplitude=1] How strong the elasticity is.
-
-                       @param {Number} [period=0.3] The frequency period.
-
-                       @returns {Function}
-                       */
-                       elasticBoth: function(a, p) {
-                               p = p || 0.45;
-                               return this.combine(this.elasticIn(a, p), this.elasticOut(a, p));
-                       },
-                       /**
-                       @name glow.tweens.combine
-                       @function
-                       @description Create a tween from two tweens.
-
-                               This can be useful to make custom tweens which, for example,
-                               start with an easeIn and end with an overshootOut. To keep
-                               the motion natural, you should configure your tweens so the
-                               first ends and the same velocity that the second starts.
-
-                       @param {Function} tweenIn Tween to use for the first half
-
-                       @param {Function} tweenOut Tween to use for the second half
-
-                       @example
-                               // 4.5 has been chosen for the easeIn strength so it
-                               // ends at the same velocity as overshootOut starts.
-                               var myTween = glow.tweens.combine(
-                                       glow.tweens.easeIn(4.5),
-                                       glow.tweens.overshootOut()
-                               );
-
-                       @returns {Function}
-                       */
-                       combine: function(tweenIn, tweenOut) {
-                               return function (t) {
-                                       if (t < 0.5) {
-                                               return tweenIn(t * 2) / 2;
-                                       } else {
-                                               return tweenOut((t - 0.5) * 2) / 2 + 0.5;
-                                       }
-                               }
-                       }
-               };
-       }
-});
-/**
-@name glow.anim
-@namespace
-@description Simple and powerful animations.
-@requires glow, glow.tweens, glow.events, glow.dom
-@see <a href="../furtherinfo/tweens/">What are tweens?</a>
-@see <a href="../furtherinfo/anim/">Guide to creating animations, with interactive examples</a>
-*/
-(window.gloader || glow).module({
-       name: "glow.anim",
-       library: ["glow", "1.7.0"],
-       depends: [["glow", "1.7.0", "glow.tweens", "glow.events", "glow.dom"]],
-       builder: function(glow) {
-               //private
-               var $ = glow.dom.get,
-                       manager,
-                       events = glow.events,
-                       dom = glow.dom,
-                       get = dom.get,
-                       hasUnits = /width|height|top$|bottom$|left$|right$|spacing$|indent$|font-size/,
-                       noNegatives = /width|height|padding|opacity/,
-                       usesYAxis = /height|top/,
-                       getUnit = /(\D+)$/,
-                       testElement = dom.create('<div style="position:absolute;visibility:hidden"></div>');
-               
-               /*
-                 Converts event shortcuts in an options object to real events
-                 instance - the object to add events to
-                 opts - the options object containing the listener functions
-                 eventProps - an array of property names of potential listeners, eg ['onFrame', 'onComplete']
-               */
-               function addEventsFromOpts(instance, opts, eventProps) {
-                       for (var i = 0, len = eventProps.length; i < len; i++) {
-                               // does opts.onWhatever exist?
-                               if (opts[ eventProps[i] ]) {
-                                       events.addListener(
-                                               instance,
-                                               // convert "onWhatever" to "whatever"
-                                               eventProps[i].slice(2).toLowerCase(),
-                                               opts[ eventProps[i] ]
-                                       );
-                               }
-                       }
-               }
-               
-               (function() {
-                       var queue = [], //running animations
-                               queueLen = 0,
-                               intervalTime = 1, //ms between intervals
-                               interval; //holds the number for the interval
-                       manager = {
-                               /**
-                               @name glow.anim-manager.addToQueue
-                               @private
-                               @function
-                               @description Adds an animation to the queue.
-                               */
-                               addToQueue: function(anim) {
-                                       //add the item to the queue
-                                       queue[queueLen++] = anim;
-                                       anim._playing = true;
-                                       anim._timeAnchor = anim._timeAnchor || new Date().valueOf();
-                                       if (!interval) {
-                                               this.startInterval();
-                                       }
-                               },
-                               /**
-                               @name glow.anim-manager.removeFromQueue
-                               @private
-                               @function
-                               @description Removes an animation from the queue.
-                               */
-                               removeFromQueue: function(anim) {
-                                       for (var i = 0; i < queueLen; i++) {
-                                               if (queue[i] == anim) {
-                                                       queue.splice(i, 1);
-                                                       anim._timeAnchor = null;
-                                                       anim._playing = false;
-                                                       //stop the queue if there's nothing in it anymore
-                                                       if (--queueLen == 0) {
-                                                               this.stopInterval();
-                                                       }
-                                                       return;
-                                               }
-                                       }
-                               },
-                               /**
-                               @name glow.anim-manager.startInterval
-                               @private
-                               @function
-                               @description Start processing the queue every interval.
-                               */
-                               startInterval: function() {
-                                       interval = window.setInterval(this.processQueue, intervalTime);
-                               },
-                               /**
-                               @name glow.anim-manager.stopInterval
-                               @private
-                               @function
-                               @description Stop processing the queue.
-                               */
-                               stopInterval: function() {
-                                       window.clearInterval(interval);
-                                       interval = null;
-                               },
-                               /**
-                               @name glow.anim-manager.processQueue
-                               @private
-                               @function
-                               @description Animate each animation in the queue.
-                               */
-                               processQueue: function() {
-                                       var anim, i, now = new Date().valueOf();
-                                       for (i = 0; i < queueLen; i++) {
-                                               anim = queue[i];
-                                               if (anim.position == anim.duration) {
-                                                       manager.removeFromQueue(anim);
-                                                       //need to decrement the index because we've just removed an item from the queue
-                                                       i--;
-                                                       events.fire(anim, "complete");
-                                                       if (anim._opts.destroyOnComplete) {
-                                                               anim.destroy();
-                                                       }
-                                                       continue;
-                                               }
-                                               if (anim.useSeconds) {
-                                                       anim.position = (now - anim._timeAnchor) / 1000;
-                                                       if (anim.position > anim.duration) {
-                                                               anim.position = anim.duration;
-                                                       }
-                                               } else {
-                                                       anim.position++;
-                                               }
-                                               anim.value = anim.tween(anim.position / anim.duration);
-                                               events.fire(anim, "frame");
-                                       }
-                               }
-                       };
-               })();
-
-               /**
-               @name glow.anim.convertCssUnit
-               @private
-               @function
-               @param {nodelist} element
-               @param {string|number} fromValue Assumed pixels.
-               @param {string} toUnit (em|%|pt...)
-               @param {string} axis (x|y)
-               @description Converts a css unit.
-
-               We need to know the axis for calculating relative values, since they're
-               relative to the width / height of the parent element depending
-               on the situation.
-
-               */
-               function convertCssUnit(element, fromValue, toUnit, axis) {
-                       var elmStyle = testElement[0].style,
-                               axisProp = (axis == "x") ? "width" : "height",
-                               startPixelValue,
-                               toUnitPixelValue;
-                       //reset stuff that may affect the width / height
-                       elmStyle.margin = elmStyle.padding = elmStyle.border = "0";
-                       startPixelValue = testElement.css(axisProp, fromValue).insertAfter(element)[axisProp]();
-                       //using 10 of the unit then dividing by 10 to increase accuracy
-                       toUnitPixelValue = testElement.css(axisProp, 10 + toUnit)[axisProp]() / 10;
-                       testElement.remove();
-                       return startPixelValue / toUnitPixelValue;
-               }
-
-               /**
-               @name glow.anim.keepWithinRange
-               @private
-               @function
-               @param num
-               @param [start]
-               @param [end]
-               @description
-               Takes a number then an (optional) lower range and an (optional) upper range. If the number
-               is outside the range the nearest range boundary is returned, else the number is returned.
-               */
-               function keepWithinRange(num, start, end) {
-                       if (start !== undefined && num < start) {
-                               return start;
-                       }
-                       if (end !== undefined && num > end) {
-                               return end;
-                       }
-                       return num;
-               }
-
-               /**
-               @name glow.anim.buildAnimFunction
-               @private
-               @function
-               @param element
-               @param spec
-               @description Builds a function for an animation.
-               */
-               function buildAnimFunction(element, spec) {
-                       var cssProp,
-                               r = ["a=(function(){"],
-                               rLen = 1,
-                               fromUnit,
-                               unitDefault = [0,"px"],
-                               to,
-                               from,
-                               unit,
-                               a;
-
-                       for (cssProp in spec) {
-                               r[rLen++] = 'element.css("' + cssProp + '", ';
-                               //fill in the blanks
-                               if (typeof spec[cssProp] != "object") {
-                                       to = spec[cssProp];
-                               } else {
-                                       to = spec[cssProp].to;
-                               }
-                               if ((from = spec[cssProp].from) === undefined) {
-                                       if (cssProp == "font-size" || cssProp == "background-position") {
-                                               throw new Error("From value must be set for " + cssProp);
-                                       }
-                                       from = element.css(cssProp);
-                               }
-                               //TODO help some multi value things?
-                               if (hasUnits.test(cssProp)) {
-                                       //normalise the units for unit-ed values
-                                       unit = (getUnit.exec(to) || unitDefault)[1];
-                                       fromUnit = (getUnit.exec(from) || unitDefault)[1];
-                                       //make them numbers, we have the units seperate
-                                       from = parseFloat(from) || 0;
-                                       to = parseFloat(to) || 0;
-                                       //if the units don't match, we need to have a play
-                                       if (from && unit != fromUnit) {
-                                               if (cssProp == "font-size") {
-                                                       throw new Error("Units must be the same for font-size");
-                                               }
-                                               from = convertCssUnit(element, from + fromUnit, unit, usesYAxis.test(cssProp) ? "y" : "x");
-                                       }
-                                       if (noNegatives.test(cssProp)) {
-                                               r[rLen++] = 'keepWithinRange((' + (to - from) + ' * this.value) + ' + from + ', 0) + "' + unit + '"';
-                                       } else {
-                                               r[rLen++] = '(' + (to - from) + ' * this.value) + ' + from + ' + "' + unit + '"';
-                                       }
-                               } else if (! (isNaN(from) || isNaN(to))) { //both pure numbers
-                                       from = Number(from);
-                                       to = Number(to);
-                                       r[rLen++] = '(' + (to - from) + ' * this.value) + ' + from;
-                               } else if (cssProp.indexOf("color") != -1) {
-                                       to = dom.parseCssColor(to);
-                                       if (! glow.lang.hasOwnProperty(from, "r")) {
-                                               from = dom.parseCssColor(from);
-                                       }
-                                       r[rLen++] = '"rgb(" + keepWithinRange(Math.round(' + (to.r - from.r) + ' * this.value + ' + from.r +
-                                               '), 0, 255) + "," + keepWithinRange(Math.round(' + (to.g - from.g) + ' * this.value + ' + from.g +
-                                               '), 0, 255) + "," + keepWithinRange(Math.round(' + (to.b - from.b) + ' * this.value + ' + from.b +
-                                               '), 0, 255) + ")"';
-                               } else if (cssProp == "background-position") {
-                                       var vals = {},
-                                               fromTo = ["from", "to"],
-                                               unit = (getUnit.exec(from) || unitDefault)[1];
-                                       vals.fromOrig = from.toString().split(/\s/);
-                                       vals.toOrig = to.toString().split(/\s/);
-
-                                       if (vals.fromOrig[1] === undefined) {
-                                               vals.fromOrig[1] = "50%";
-                                       }
-                                       if (vals.toOrig[1] === undefined) {
-                                               vals.toOrig[1] = "50%";
-                                       }
-
-                                       for (var i = 0; i < 2; i++) {
-                                               vals[fromTo[i] + "X"] = parseFloat(vals[fromTo[i] + "Orig"][0]);
-                                               vals[fromTo[i] + "Y"] = parseFloat(vals[fromTo[i] + "Orig"][1]);
-                                               vals[fromTo[i] + "XUnit"] = (getUnit.exec(vals[fromTo[i] + "Orig"][0]) || unitDefault)[1];
-                                               vals[fromTo[i] + "YUnit"] = (getUnit.exec(vals[fromTo[i] + "Orig"][1]) || unitDefault)[1];
-                                       }
-
-                                       if ((vals.fromXUnit !== vals.toXUnit) || (vals.fromYUnit !== vals.toYUnit)) {
-                                               throw new Error("Mismatched axis units cannot be used for " + cssProp);
-                                       }
-
-                                       r[rLen++] = '(' + (vals.toX - vals.fromX) + ' * this.value + ' + vals.fromX + ') + "' + vals.fromXUnit + ' " + (' +
-                                                               (vals.toY - vals.fromY) + ' * this.value + ' + vals.fromY + ') + "' + vals.fromYUnit + '"';
-                               }
-                               r[rLen++] = ');';
-                       }
-                       r[rLen++] = "})";
-                       return eval(r.join(""));
-               }
-
-               //public
-               var r = {}; //return object
-
-               /**
-               @name glow.anim.css
-               @function
-               @description Animates CSS properties of an element.
-               @param {String | glow.dom.NodeList | Element} element Element to animate.
-
-                       This can be a CSS selector (first match will be used),
-                       {@link glow.dom.NodeList} (first node will be used), or a DOM element.
-
-               @param {Number} duration Animation duration, in seconds by default.
-
-               @param {Object} spec An object describing the properties to animate.
-
-                       This object should consist of property names corresponding to the
-                       CSS properties you wish to animate, and values which are objects
-                       with 'from' and 'to' properties with the values to animate between
-                       or a number/string representing the value to animate to.
-
-                       If the 'from' property is absent, the elements current CSS value
-                       will be used instead.
-
-                       See the spec example below for more information.
-
-               @param {Object} opts Optional options object.
-
-               @param {Boolean} [opts.useSeconds=true] Specifies whether duration should be in seconds rather than frames.
-
-               @param {Function} [opts.tween=linear tween] The way the value moves through time. See {@link glow.tweens}.
-               
-               @param {Boolean} [opts.destroyOnComplete=false] Destroy the animation once it completes?
-                       This will free any DOM references the animation may have created. Once
-                       the animation completes, you won't be able to start it again.
-                       
-               @param {Function} [opts.onStart] Shortcut for adding a "start" event listener
-               @param {Function} [opts.onFrame] Shortcut for adding a "frame" event listener
-               @param {Function} [opts.onStop] Shortcut for adding a "stop" event listener
-               @param {Function} [opts.onComplete] Shortcut for adding a "complete" event listener
-               @param {Function} [opts.onResume] Shortcut for adding a "resume" event listener
-               
-               @example
-               // an example of an spec object
-               {
-                       "height": {from: "10px", to: "100px"},
-                       "width": "100px",
-                       "font-size": {from: "0.5em", to: "1.3em"}
-               }
-
-               @example
-               // animate an elements height and opacity to 0 from current values over 1 second
-               glow.anim.css("#myElement", 1, {
-                       "height" : 0,
-                       "opacity" : 0
-               }).start();
-
-               @returns {glow.anim.Animation}
-               */
-               r.css = function(element, duration, spec, opts) {
-
-                       element = get(element);
-
-                       var anim = new r.Animation(duration, opts);
-
-                       // Fix for trac 156 - glow.anim.css should fail better if the element doesn't exist
-                       if (element[0]) {
-                               events.addListener(anim, "frame", buildAnimFunction(element, spec));
-                       }
-                       return anim;
-               };
-               
-               /**
-               @name glow.anim-slideElement
-               @private
-               @function
-               @param {String | glow.dom.NodeList} element Element to animate. CSS Selector can be used.
-               @param {Number} duration Animation duration in seconds.
-               @param {Function} [opts.tween=easeBoth tween] The way the value moves through time. See {@link glow.tweens}.
-               @param {Function} [opts.onStart] The function to be called when the first element in the NodeList starts the animation.  
-               @param {Function} [opts.onComplete] The function to be called when the first element in the NodeList completes the animation.
-               @description Builds a function for an animation.
-               */
-               slideElement = function slideElement(element, duration, action, opts) {
-                       duration = duration || 0.5;
-                       // normalise 'element' to NodeList
-                       element = $(element);
-                       
-                       opts = glow.lang.apply({
-                               tween: glow.tweens.easeBoth(),
-                               onStart: function(){},
-                               onComplete: function(){}
-                       }, opts);
-                       
-                       var i = 0,
-                               thatlength = element.length,
-                               completeHeight,
-                               fromHeight,
-                               channels = [],
-                               timeline;
-                       
-                       for(; i < thatlength; i++) {
-                               if (action == "up" || (action == "toggle" && element.slice(i, i+1).height() > 0)) {
-                                       element[i].style.overflow = 'hidden';
-                                       // give the element layout in IE
-                                       if (glow.env.ie < 8) {
-                                               element[i].style.zoom = 1;
-                                       }
-                                       completeHeight = 0;
-                                       fromHeight = element.slice(i, i+1).height();
-                               } else if (action == "down" || (action == "toggle" && element.slice(i, i+1).height() == 0)) {
-                                       fromHeight = element.slice(i, i+1).height();
-                                       element[i].style.height = "auto";
-                                       completeHeight = element.slice(i, i+1).height();
-                                       element[i].style.height = fromHeight + "px";
-                               }
-
-                               channels[i] = [
-                                       glow.anim.css(element[i], duration, {
-                                               'height': {from: fromHeight, to: completeHeight}
-                                       }, { tween: opts.tween })
-                               ];
-
-                       }
-                       
-                       timeline = new glow.anim.Timeline(channels, {
-                               destroyOnComplete: true
-                       });
-                       
-                       events.addListener(timeline, "complete", function() {
-                               // return heights to "auto" for slide down
-                               element.each(function() {
-                                       if (this.style.height != "0px") {
-                                               this.style.height = "auto";
-                                       }
-                               })
-                       });
-                       
-                       events.addListener(timeline, "start", opts.onStart);
-                       events.addListener(timeline, "complete", opts.onComplete);
-                       
-                       // return & start our new timeline
-                       return timeline.start();
-               };
-
-               /**
-               @name glow.anim.slideDown
-               @function
-               @description Slide a NodeList down from a height of 0 
-               
-               @param {String | glow.dom.NodeList} element Element to animate. CSS Selector can be used.
-               
-               @param {Number} duration Animation duration in seconds.
-               
-               @param {Function} opts Object
-                
-               @param {Function} [opts.tween=easeBoth tween] The way the value moves through time. See {@link glow.tweens}.
-                 
-               @param {Function} [opts.onStart] The function to be called when the first element in the NodeList starts the animation.  
-                
-               @param {Function} [opts.onComplete] The function to be called when the first element in the NodeList completes the animation.
-               
-               @returns {glow.anim.Timeline}
-               
-                       A started timeline
-               
-               @example
-               
-                       glow.anim.slideDown("#menu", 1);
-                                
-               **/     
-               r.slideDown = function(element, duration, opts) {
-                       return slideElement(element, duration, 'down', opts);
-               };
-
-               /**
-               @name glow.anim.slideUp
-               @function
-               @description Slide a NodeList up to a height of 0 
-               
-               @param {String | glow.dom.NodeList} element Element to animate. CSS Selector can be used.
-               
-               @param {Number} duration Animation duration in seconds.
-               
-               @param {Function} opts Object
-                
-               @param {Function} [opts.tween=easeBoth tween] The way the value moves through time. See {@link glow.tweens}.
-                 
-               @param {Function} [opts.onStart] The function to be called when the first element in the NodeList starts the animation.  
-                
-               @param {Function} [opts.onComplete] The function to be called when the first element in the NodeList completes the animation.
-               
-               @returns {glow.anim.Timeline}
-               
-                       A started timeline
-               
-               @example
-                               
-                       glow.anim.slideUp("#menu", 1);
-                                
-               **/             
-               r.slideUp = function(element, duration, opts) {
-                       return slideElement(element, duration, 'up', opts);
-               };
-               
-               /**
-               @name glow.anim.slideToggle
-               @function
-               @description Toggle a NodeList Up or Down depending on it's present state. 
-               
-               @param {String | glow.dom.NodeList} element Element to animate. CSS Selector can be used.
-               
-               @param {Number} duration Animation duration in seconds.
-               
-               @param {Function} opts Object
-                
-               @param {Function} [opts.tween=easeBoth tween] The way the value moves through time. See {@link glow.tweens}.
-                 
-               @param {Function} [opts.onStart] The function to be called when the first element in the NodeList starts the animation.  
-                
-               @param {Function} [opts.onComplete] The function to be called when the first element in the NodeList completes the animation.
-               
-               @returns {glow.anim.Timeline}
-               
-                       A started timeline
-               
-               @example
-                               
-                       glow.anim.slideToggle("#menu", 1);
-                                
-               **/                     
-               r.slideToggle = function(element, duration, opts) {
-                       return slideElement(element, duration, 'toggle', opts);
-               };
-
-
-               /**
-               @name glow.anim.fadeOut
-               @function
-               @description Fade out a set of elements 
-               
-               @param {String | glow.dom.NodeList} element Element to animate. CSS Selector can be used.
-               
-               @param {Number} duration Animation duration in seconds.
-               
-               @param {Function} opts Object
-                
-               @param {Function} [opts.tween=easeBoth tween] The way the value moves through time. See {@link glow.tweens}.
-                 
-               @param {Function} [opts.onStart] The function to be called when the first element in the NodeList starts the animation.  
-                
-               @param {Function} [opts.onComplete] The function to be called when the first element in the NodeList completes the animation.
-               
-               @returns {glow.anim.Timeline}
-               
-                       A started timeline
-               
-               @example
-                               
-                       glow.anim.fadeOut("#menu", 1);
-                                
-               **/
-               r.fadeOut = function(element, duration, opts) {
-                       return r.fadeTo(element, 0, duration, opts)
-        };
-               
-               /**
-               @name glow.anim.fadeIn
-               @function
-               @description Fade in a set of elements 
-                
-               @param {String | glow.dom.NodeList} element Element to animate. CSS Selector can be used.
-               
-               @param {Number} duration Animation duration in seconds.
-                 
-               @param {Function} opts Object
-                
-               @param {Function} [opts.tween=easeBoth tween] The way the value moves through time. See {@link glow.tweens}.
-                 
-               @param {Function} [opts.onStart] The function to be called when the first element in the NodeList starts the animation.  
-                
-               @param {Function} [opts.onComplete] The function to be called when the first element in the NodeList completes the animation.
-               
-               @returns {glow.anim.Timeline}
-               
-                       A started timeline
-               
-               @example
-                               
-                       glow.anim.fadeIn("#menu", 1);
-                                
-               **/
-               r.fadeIn = function(element, duration, opts){
-                       r.fadeTo(element, 1, duration, opts);
-        };
-               
-               /**
-               @name glow.anim.fadeTo
-               @function
-               @description Fade a set of elements to a given opacity
-                
-               @param {String | glow.dom.NodeList} element Element to animate. CSS Selector can be used.
-                
-               @param {Number} opacity fade to opacity level between 0 & 1. 
-                
-               @param {Number} duration Animation duration in seconds.
-                 
-               @param {Function} opts Object
-                
-               @param {Function} [opts.tween=easeBoth tween] The way the value moves through time. See {@link glow.tweens}.
-                 
-               @param {Function} [opts.onStart] The function to be called when the first element in the NodeList starts the animation.  
-                
-               @param {Function} [opts.onComplete] The function to be called when the first element in the NodeList completes the animation.
-               
-               @returns {glow.anim.Timeline}
-               
-                       A started timeline
-               
-               @example
-                               
-                       glow.anim.fadeTo("#menu", 0.5, 1);
-                                
-               **/
-               r.fadeTo = function(element, opacity, duration, opts){
-                       duration = duration || 0.5;
-                       // normalise 'element' to NodeList
-                       element = $(element);
-                       
-                       opts = glow.lang.apply({
-                               tween: glow.tweens.easeBoth(),
-                               onStart: function(){},
-                               onComplete: function(){}
-                       }, opts);
-                       
-                       var i = 0,
-                               thatlength = element.length,
-                               channels = [],
-                               timeline;
-                       
-                       for(; i < thatlength; i++) {
-                               channels[i] = [
-                                       glow.anim.css(element[i], duration, {
-                                               'opacity': opacity
-                                       }, { tween: opts.tween })
-                               ];
-                       }
-                       
-                       timeline = new glow.anim.Timeline(channels, {
-                               destroyOnComplete: true
-                       });
-                       
-                       events.addListener(timeline, "start", opts.onStart);
-                       events.addListener(timeline, "complete", opts.onComplete);
-                       
-                       // return & start our new timeline
-                       return timeline.start();
-        };
-        
-
-               /**
-               @name glow.anim.highlight
-               @function
-               @description    Highlight an element by fading the background colour
-                
-               @param {String | glow.dom.NodeList} element Element to animate. CSS Selector can be used.
-               
-               @param {String} highlightColour highlight colour in hex, "rgb(r, g, b)" or css colour name. 
-                
-               @param {Number} duration Animation duration in seconds.
-                 
-               @param {Function} opts Object
-                
-               @param {Function} [opts.completeColour] The background colour of the element once the highlight is complete.
-               
-                                                 If none supplied Glow assumes the element's existing background color (e.g. #336699),
-                                                 if the element has no background color specified (e.g. Transparent)
-                                                 the highlight will transition to white.
-               
-               @param {Function} [opts.tween=easeBoth tween] The way the value moves through time. See {@link glow.tweens}.
-                 
-               @param {Function} [opts.onStart] The function to be called when the first element in the NodeList starts the animation.  
-                
-               @param {Function} [opts.onComplete] The function to be called when the first element in the NodeList completes the animation.
-               
-               @returns {glow.anim.Timeline}
-               
-                       A started timeline
-               
-               @example
-                               
-                       glow.anim.highlight("#textInput", "#ff0", 1);
-               **/
-               r.highlight = function(element, highlightColour, duration, opts){
-                       // normalise element
-                       element = $(element);
-                       
-                       duration = duration || 1;
-                       highlightColour = highlightColour || '#ffff99';
-                       
-                       opts = glow.lang.apply({
-                               tween: glow.tweens.easeBoth(),
-                               onStart: function(){},
-                               onComplete: function(){}
-                       }, opts);
-                       
-                       var i = 0, 
-                               transArray = [],
-                               elmsLength = element.length,
-                               completeColour,
-                               channels = [],
-                               timeline;
-                       
-                       for(; i < elmsLength; i++) {
-                               
-                               completeColour = opts.completeColour || element.slice(i, i+1).css("background-color");
-
-                               if (completeColour == "transparent" || completeColour == "") { 
-                                       completeColour = "#fff";
-                               }
-                               channels[i] = [
-                                       r.css(element[i], duration, {
-                                               "background-color" : {from:highlightColour, to:completeColour}
-                                       }, {tween: opts.tween})
-                               ];
-                       }
-                       
-                       timeline = new glow.anim.Timeline(channels, {
-                               destroyOnComplete: true
-                       });
-                       
-                       events.addListener(timeline, "start", opts.onStart);
-                       events.addListener(timeline, "complete", opts.onComplete);
-                       return timeline.start();
-        };
-
-               /**
-               @name glow.anim.Animation
-               @class
-               @description Controls modifying values over time.
-
-                       You can create an animtion instance using the constructor, or use
-                       one of the helper methods in {@link glow.anim}.
-
-                       Once you have created your animation instance, you can use
-                       events such as "frame" to change values over time.
-
-               @param {Number} duration Length of the animation in seconds / frames.
-
-                       Animations which are given a duration in seconds may drop frames to
-                       finish in the given time.
-
-               @param {Object} opts Object of options.
-
-               @param {Boolean} [opts.useSeconds=true] Specifies whether duration should be in seconds rather than frames.
-
-               @param {Function} [opts.tween=linear tween] The way the value moves through time.
-
-                       See {@link glow.tweens}.
-                       
-               @param {Boolean} [opts.destroyOnComplete=false] Destroy the animation once it completes?
-                       This will free any DOM references the animation may have created. Once
-                       the animation completes, you won't be able to start it again.
-                       
-               @param {Function} [opts.onStart] Shortcut for adding a "start" event listener
-               @param {Function} [opts.onFrame] Shortcut for adding a "frame" event listener
-               @param {Function} [opts.onStop] Shortcut for adding a "stop" event listener
-               @param {Function} [opts.onComplete] Shortcut for adding a "complete" event listener
-               @param {Function} [opts.onResume] Shortcut for adding a "resume" event listener
-
-               @example
-                       var myAnim = new glow.anim.Animation(5, {
-                               tween:glow.tweens.easeBoth()
-                       });
-
-               */
-
-               /**
-               @name glow.anim.Animation#event:start
-               @event
-               @description Fired when the animation is started from the beginning.
-               @param {glow.events.Event} event Event Object
-               @example
-                       var myAnim = new glow.anim.Animation(5, {
-                               tween:glow.tweens.easeBoth()
-                       });
-                       glow.events.addListener(myAnim, "start", function() {
-                               alert("Started animation which lasts " + this.duration + " seconds");
-                       });
-                       myAnim.start();
-               */
-
-               /**
-               @name glow.anim.Animation#event:frame
-               @event
-               @description Fired in each frame of the animation.
-
-                       This is where you'll specify what your animation does.
-               
-               @param {glow.events.Event} event Event Object
-               @example
-                       var myAnim = new glow.anim.Animation(5, {
-                               tween:glow.tweens.easeBoth()
-                       });
-                       
-                       var myDiv = glow.dom.get("#myDiv"),
-                           divStartHeight = myDiv.height(),
-                           divEndHeight = 500,
-                           divHeightChange = divEndHeight - divStartHeight;
-
-                       glow.events.addListener(myAnim, "frame", function() {
-                               myDiv.height(divStartHeight + (divHeightChange * this.value));
-                       });
-                       myAnim.start();
-               */
-
-               /**
-               @name glow.anim.Animation#event:stop
-               @event
-               @description Fired when the animation is stopped before its end.
-
-                       If your listener prevents the default action (for instance,
-                       by returning false) the animtion will not be stopped.
-               
-               @param {glow.events.Event} event Event Object
-               */
-
-               /**
-               @name glow.anim.Animation#event:complete
-               @event
-               @description Fired when the animation ends.
-               @param {glow.events.Event} event Event Object
-               */
-
-               /**
-               @name glow.anim.Animation#event:resume
-               @event
-               @description Fired when the animation resumes after being stopped.
-
-                       If your listener prevents the default action (for instance, by
-                       returning false) the animation will not be resumed.
-
-               @param {glow.events.Event} event Event Object
-               */
-               // constructor items that relate to events
-               var animationEventConstructorNames = ["onStart", "onStop", "onComplete", "onResume", "onFrame"];
-               
-               r.Animation = function(duration, opts) {
-                       this._opts = opts = glow.lang.apply({
-                               useSeconds: true,
-                               tween: glow.tweens.linear(),
-                               destroyOnComplete: false,
-                               onStart: null,
-                               onStop: null,
-                               onComplete: null,
-                               onResume: null,
-                               onFrame: null
-                       }, opts);
-
-                       /**
-                       @name glow.anim.Animation#_playing
-                       @type Boolean
-                       @private
-                       @default false
-                       @description Indicates whether the animation is playing.
-                       */
-                       this._playing = false;
-
-                       /**
-                       @name glow.anim.Animation#_timeAnchor
-                       @type Number
-                       @private
-                       @default null
-                       @description A timestamp used to keep the animation in the right position.
-                       */
-                       this._timeAnchor = null;
-
-                       /**
-                       @name glow.anim.Animation#duration
-                       @type Number
-                       @description Length of the animation in seconds / frames.
-                       */
-                       this.duration = duration;
-
-                       /**
-                       @name glow.anim.Animation#useSeconds
-                       @type Boolean
-                       @description Indicates whether duration is in seconds rather than frames.
-                       */
-                       this.useSeconds = opts.useSeconds;
-
-                       /**
-                       @name glow.anim.Animation#tween
-                       @type Function
-                       @description The tween used by the animation.
-                       */
-                       this.tween = opts.tween;
-
-                       /**
-                       @name glow.anim.Animation#position
-                       @type Number
-                       @default 0
-                       @description Seconds since starting, or current frame.
-                       */
-                       this.position = 0;
-
-                       /**
-                       @name glow.anim.Animation#value
-                       @type Number
-                       @default 0
-                       @description Current tweened value of the animtion, usually between 0 & 1.
-                               The value may become greater than 1 or less than 0 depending
-                               on the tween used.
-                               
-                               {@link glow.tweens.elasticOut} for instance will result
-                               in values higher than 1, but will still end at 1.
-                       */
-                       this.value = 0;
-                       
-                       // add events from constructor opts
-                       addEventsFromOpts(this, opts, animationEventConstructorNames);
-               };
-               r.Animation.prototype = {
-
-                       /**
-                       @name glow.anim.Animation#start
-                       @function
-                       @description Starts playing the animation from the beginning.
-                       @example
-                               var myAnim = new glow.anim.Animation(5, {
-                                       tween:glow.tweens.easeBoth()
-                               });
-                               //attach events here
-                               myAnim.start();
-                       @returns {glow.anim.Animation}
-                       */
-                       start: function() {
-                               if (this._playing) {
-                                       this.stop();
-                               }
-                               var e = events.fire(this, "start");
-                               if (e.defaultPrevented()) { return this; }
-                               this._timeAnchor = null;
-                               this.position = 0;
-                               manager.addToQueue(this);
-
-                               return this;
-                       },
-
-                       /**
-                       @name glow.anim.Animation#stop
-                       @function
-                       @description Stops the animation playing.
-                       @returns {glow.anim.Animation}
-                       */
-                       stop: function() {
-                               if (this._playing) {
-                                       var e = events.fire(this, "stop");
-                                       if (e.defaultPrevented()) { return this; }
-                                       manager.removeFromQueue(this);
-                               }
-                               return this;
-                       },
-                       
-                       /**
-                       @name glow.anim.Animation#destroy
-                       @function
-                       @description Destroys the animation & detatches references to DOM nodes
-                               Call this on animations you no longer need to free memory.
-                       @returns {glow.anim.Animation}
-                       */
-                       destroy: function() {
-                               // stop the animation in case it's still playing
-                               this.stop();
-                               events.removeAllListeners(this);
-                               return this;
-                       },
-
-                       /**
-                       @name glow.anim.Animation#resume
-                       @function
-                       @description Resumes the animation from where it was stopped.
-                       @returns {glow.anim.Animation}
-                       */
-                       resume: function() {
-                               if (! this._playing) {
-                                       var e = events.fire(this, "resume");
-                                       if (e.defaultPrevented()) { return this; }
-                                       //set the start time to cater for the pause
-                                       this._timeAnchor = new Date().valueOf() - (this.position * 1000);
-                                       manager.addToQueue(this);
-                               }
-                               return this;
-                       },
-
-                       /**
-                       @name glow.anim.Animation#isPlaying
-                       @function
-                       @description Returns true if the animation is playing.
-                       @returns {Boolean}
-                       */
-                       isPlaying: function() {
-                               return this._playing;
-                       },
-                       /**
-                       @name glow.anim.Animation#goTo
-                       @function
-                       @description Goes to a specific point in the animation.
-                       @param {Number} pos Position in the animation to go to.
-
-                               This should be in the same units as the duration of your
-                               animation (seconds or frames).
-
-                       @example
-                               var myAnim = new glow.anim.Animation(5, {
-                                       tween:glow.tweens.easeBoth()
-                               });
-                               //attach events here
-                               //start the animation from half way through
-                               myAnim.goTo(2.5).resume();
-                       @returns this
-                       */
-                       goTo: function(pos) {
-                               this._timeAnchor = new Date().valueOf() - ((this.position = pos) * 1000);
-                               this.value = this.tween(this.duration && this.position / this.duration);
-                               events.fire(this, "frame");
-                               return this;
-                       }
-               };
-
-               /**
-               @name glow.anim.Timeline
-               @class
-               @description Synchronises and chains animations.
-               @param {Array | Array[]} channels An array of channels or a single channel.
-
-                       A channel is defined as an array containing numbers, animations and
-                       functions.
-
-                       Numbers indicate a number of seconds to wait before proceeding to
-                       the next item. Animations will be played, when the animation is
-                       complete the next item is processed. Functions will be called, then
-                       the next item is processed.
-
-               @param {Object} opts An object of options.
-               @param {Boolean} [opts.loop=false] Specifies whether the timeline loops.
-
-                       The "complete" event does not fire for looping animations.
-                       
-               @param {Boolean} [opts.destroyOnComplete=false] Destroy the animation once it completes?
-                       This will free any DOM references the animation may have created. Once
-                       the animation completes, you won't be able to start it again.
-                       
-               @param {Function} [opts.onStart] Shortcut for adding a "start" event listener
-               @param {Function} [opts.onStop] Shortcut for adding a "stop" event listener
-               @param {Function} [opts.onComplete] Shortcut for adding a "complete" event listener
-               @param {Function} [opts.onResume] Shortcut for adding a "resume" event listener
-
-               @example
-                       // in the simplest form, a timeline can be used to
-                       // string multiple animations together:
-                       
-
-                       // make our animations
-                       var moveUp = glow.anim.css(myDiv, 2, {
-                               "top": {to:"0"}
-                       });
-                       var moveDown = glow.anim.css(myDiv, 1, {
-                               "top": {to:"100px"}
-                       });
-                       // string them together
-                       new glow.anim.Timeline([moveUp, moveDown]).start();
-
-               @example
-                       // if you wanted a one second gap between the animations, the last line would be:
-                       new glow.anim.Timeline([moveUp, 1, moveDown]).start();
-
-               @example
-                       // you can run animations simutainiously with multiple channels.
-                       new glow.anim.Timeline([
-                               [moveDivUp, 1, moveDivDown],
-                               [moveListDown, 1, moveListUp]
-                       ]).start();
-               @see <a href="../furtherinfo/animtimeline/">Creating a mexican wave with an animation timeline</a>
-               */
-               /**
-               @name glow.anim.Timeline#event:start
-               @event
-               @description Fired when the timeline is started from the beginning.
-
-                       This event will also trigger during each loop of a looping animation.
-                       If your listener prevents the default action (for instance, by
-                       returning false) the timeline will not start.
-               
-               @param {glow.events.Event} event Event Object
-               @example
-                       var myTimeline = new glow.anim.Timeline([anim1, anim2]);
-                       glow.events.addListener(myTimeline, "start", function() {
-                               alert("Started timeline");
-                       });
-                       myTimeline.start();
-               */
-               /**
-               @name glow.anim.Timeline#event:stop
-               @event
-               @description Fired when the timeline is stopped before its end.
-
-                       If your listener prevents the default action (for instance, by
-                       returning false) the timeline will not stop.
-               
-               @param {glow.events.Event} event Event Object
-               */
-               /**
-               @name glow.anim.Timeline#event:complete
-               @event
-               @description Fired when the timeline ends.
-
-                       This event does not fire on looping timelines.
-               
-               @param {glow.events.Event} event Event Object
-               */
-               /**
-               @name glow.anim.Timeline#event:resume
-               @event
-               @description Fired when the timeline resumes after being stopped.
-
-                       If your listener prevents the default action (for instance, by
-                       returning false) the timeline will not resume.
-               
-               @param {glow.events.Event} event Event Object
-               */
-               var timelineEventConstructorNames = ["onStart", "onStop", "onComplete", "onResume"];
-               r.Timeline = function(channels, opts) {
-                       this._opts = opts = glow.lang.apply({
-                               loop: false,
-                               destroyOnComplete: false,
-                               onStart: null,
-                               onStop: null,
-                               onComplete: null,
-                               onResume: null
-                       }, opts);
-                       /*
-                       PrivateProperty: _channels
-                               Array of channels
-                       */
-                       //normalise channels so it's always an array of array(s)
-                       this._channels = (channels[0] && channels[0].push) ? channels : [channels];
-                       /*
-                       PrivateProperty: _channelPos
-                               index of each currently playing animation
-                       */
-                       this._channelPos = [];
-                       /*
-                       PrivateProperty: _playing
-                               Is the timeline playing?
-                       */
-                       this._playing = false;
-
-                       /**
-                       @name glow.anim.Timeline#loop
-                       @type Boolean
-                       @description Inidcates whether the timeline loops.
-
-                               The "complete" event does not fire for looping animations.
-                               This can be set while a timeline is playing.
-                       */
-                       this.loop = opts.loop;
-
-                       var i, j, iLen, jLen,
-                               channel,
-                               allChannels = this._channels,
-                               totalDuration = 0,
-                               channelDuration;
-
-                       //process channels
-                       for (i = 0, iLen = allChannels.length; i < iLen; i++) {
-                               channel = allChannels[i];
-                               channelDuration = 0;
-                               for (j = 0, jLen = channel.length; j < jLen; j++) {
-                                       //create a blank animation for time waiting
-                                       if (typeof channel[j] == "number") {
-                                               channel[j] = new r.Animation(channel[j]);
-                                       }
-                                       if (channel[j] instanceof r.Animation) {
-                                               if (! channel[j].useSeconds) {
-                                                       throw new Error("Timelined animations must be timed in seconds");
-                                               }
-                                               channel[j]._timelineOffset = channelDuration * 1000;
-                                               channelDuration += channel[j].duration;
-                                               channel[j]._channelIndex = i;
-                                       }
-                               }
-                               /**
-                               @name glow.anim.Timeline#duration
-                               @type Number
-                               @description Length of the animation in seconds
-                               */
-                               this.duration = totalDuration = Math.max(channelDuration, totalDuration);
-                       }
-                       /*
-                       PrivateProperty: _controlAnim
-                               This is used to keep the animation in time
-                       */
-                       this._controlAnim = new r.Animation(totalDuration);
-                       events.addListener(this._controlAnim, "frame", this._processFrame, this);
-                       events.addListener(this._controlAnim, "complete", this._complete, this);
-                       
-                       // add events from constructor
-                       addEventsFromOpts(this, opts, timelineEventConstructorNames);
-               };
-               r.Timeline.prototype = {
-                       /*
-                       PrivateMethod: _advanceChannel
-                               Move to the next position in a particular channel
-                       */
-                       _advanceChannel: function(i) {
-                               //is there a next animation in the channel?
-                               var currentAnim = this._channels[i][this._channelPos[i]],
-                                       nextAnim = this._channels[i][++this._channelPos[i]];
-
-                               if (currentAnim && currentAnim._playing) {
-                                       currentAnim._playing = false;
-                                       events.fire(currentAnim, "complete");
-                                       if (currentAnim._opts.destroyOnComplete) {
-                                               currentAnim.destroy();
-                                       }
-                               }
-                               if ((nextAnim) !== undefined) {
-                                       if (typeof nextAnim == "function") {
-                                               nextAnim();
-                                               this._advanceChannel(i);
-                                       } else {
-                                               nextAnim.position = 0;
-                                               nextAnim._channelIndex = i;
-                                               events.fire(nextAnim, "start");
-                                               nextAnim._playing = true;
-                                       }
-                               }
-                       },
-                       _complete: function() {
-                               if (this.loop) {
-                                       this.start();
-                                       return;
-                               }
-                               this._playing = false;
-                               events.fire(this, "complete");
-                               if (this._opts.destroyOnComplete) {
-                                       this.destroy();
-                               }
-                       },
-                       _processFrame: function() {
-                               var i, len, anim, controlAnim = this._controlAnim,
-                                       msFromStart = (new Date().valueOf()) - controlAnim._timeAnchor;
-
-                               for (i = 0, len = this._channels.length; i < len; i++) {
-                                       if (! (anim = this._channels[i][this._channelPos[i]])) { continue; }
-                                       anim.position = (msFromStart - anim._timelineOffset) / 1000;
-                                       if (anim.position > anim.duration) {
-                                               anim.position = anim.duration;
-                                       }
-                                       anim.value = anim.tween(anim.position / anim.duration);
-                                       events.fire(anim, "frame");
-                                       if (anim.position == anim.duration) {
-                                               this._advanceChannel(i);
-                                       }
-                               }
-                       },
-
-                       /**
-                       @name glow.anim.Timeline#start
-                       @function
-                       @description Starts playing the timeline from the beginning.
-                       @returns this
-                       */
-                       start: function() {
-                               var e = events.fire(this, "start");
-                               if (e.defaultPrevented()) { return this; }
-                               var i, iLen, j, jLen, anim;
-                               this._playing = true;
-                               for (i = 0, iLen = this._channels.length; i < iLen; i++) {
-                                       this._channelPos[i] = -1;
-                                       this._advanceChannel(i);
-                                       for (j = this._channels[i].length; j; j--) {
-                                               anim = this._channels[i][j];
-                                               if (anim instanceof r.Animation) {
-                                                       anim.goTo(0);
-                                               }
-                                       }
-                               }
-                               this._controlAnim.start();
-                               return this;
-                       },
-
-                       /**
-                       @name glow.anim.Timeline#stop
-                       @function
-                       @description Stops the timeline.
-                       @returns this
-                       */
-                       stop: function() {
-                               if (this._playing) {
-                                       var e = events.fire(this, "stop");
-                                       if (e.defaultPrevented()) { return this; }
-                                       this._playing = false;
-                                       var anim;
-                                       for (var i = 0, len = this._channels.length; i<len; i++) {
-                                               anim = this._channels[i][this._channelPos[i]];
-                                               if (anim instanceof r.Animation && anim._playing) {
-                                                       events.fire(anim, "stop");
-                                                       anim._playing = false;
-                                               }
-                                       }
-                                       this._controlAnim.stop();
-                               }
-                               return this;
-                       },
-                       
-                       /**
-                       @name glow.anim.Timeline#destroy
-                       @function
-                       @description Destroys the timeline & animations within it
-                               Call this on timeline you no longer need to free memory.
-                       @returns this
-                       */
-                       destroy: function() {
-                               var i, j;
-                               // stop the animation in case it's still playing
-                               this.stop();
-                               events.removeAllListeners(this);
-                               this._controlAnim.destroy();
-                               
-                               // loop through all the channels
-                               i = this._channels.length; while (i--) {
-                                       // loop through all the animations
-                                       j = this._channels[i].length; while (j--) {
-                                               // check it has a destroy method (making sure it's an animation & not a function)
-                                               if (this._channels[i][j].destroy) {
-                                                       // DESTROYYYYY!
-                                                       this._channels[i][j].destroy();
-                                               }
-                                       }
-                               }
-                               return this;
-                       },
-
-                       /**
-                       @name glow.anim.Timeline#resume
-                       @function
-                       @description Resumes the timeline from wherever it was stopped.
-                       @returns this
-                       */
-                       resume: function() {
-                               if (! this._playing) {
-                                       var e = events.fire(this, "resume");
-                                       if (e.defaultPrevented()) { return this; }
-                                       this._playing = true;
-                                       var anim;
-                                       for (var i = 0, len = this._channels.length; i<len; i++) {
-                                               anim = this._channels[i][ this._channelPos[i] ];
-                                               if (anim instanceof r.Animation && !anim._playing) {
-                                                       events.fire(anim, "resume");
-                                                       anim._playing = true;
-                                               }
-                                       }
-                                       this._controlAnim.resume();
-                               }
-                               return this;
-                       },
-
-                       /**
-                       @name glow.anim.Timeline#isPlaying
-                       @function
-                       @returns {Boolean}
-                       @description Returns true if the timeline is playing.
-                       */
-                       isPlaying: function() {
-                               return this._playing;
-                       },
-                       
-                       /**
-                       @name glow.anim.Timeline#goTo
-                       @function
-                       @returns this
-                       @description Go to a specific point in the timeline
-                       @param {Number|glow.anim.Animation} pos Position in the timeline to go to.
-
-                               You can go to a specific point in time (in seconds) or provide
-                               a reference to a particular animation to begin at.
-
-                       @example
-                               var myTimeline = new glow.anim.Timeline([anim1, anim2]);
-                               
-                               //start the Timeline 2.5 seconds in
-                               myTimeline.goTo(2.5).resume();
-                               
-                       @example
-                               var myTimeline = new glow.anim.Timeline([anim1, anim2]);
-                               
-                               //start the Timeline from anim2
-                               myTimeline.goTo(anim2).resume();
-                       */
-                       goTo: function(pos) {
-                               var i,
-                                       j,
-                                       k,
-                                       channelsLen = this._channels.length,
-                                       channelLen,
-                                       // holding var for an anim
-                                       anim,
-                                       runningDuration;
-                               
-                               if (typeof pos == "number") {
-                                       
-                                       if (pos > this.duration) {
-                                               // if the position is greater than the total, 'loop' the value
-                                               if (this.loop) {
-                                                       pos = pos % this.duration;
-                                               } else {
-                                                       pos = this.duration;
-                                               }
-                                       }
-                                       
-                                       // advance the control anim
-                                       this._controlAnim.goTo(pos);
-                                       
-                                       // loop through the animations in all the channels, find out which
-                                       // one to start playing from
-                                       for (i = 0; i < channelsLen; i++) {
-
-                                               runningDuration = 0;
-                                               // go through animations in that channel
-                                               for (j = 0, channelLen = this._channels[i].length; j < channelLen; j++) {
-                                                       anim = this._channels[i][j];
-                                                       
-                                                       if (anim instanceof r.Animation) {
-                                                               // we found an animation we should be playing
-                                                               if ( (runningDuration + anim.duration) > pos) {
-                                                                       // record its position and leave the loop
-                                                                       this._channelPos[i] = j;
-                                                                       anim.goTo(pos - runningDuration);
-                                                                       break;
-                                                               }
-                                                               // we're moving to a position where this animation has
-                                                               // finished playing, need to fire its final frame
-                                                               anim.goTo(anim.duration);
-                                                               // add that anim to the running total
-                                                               runningDuration += anim.duration;
-                                                       }
-                                                       
-                                               }
-                                               // right, now we need to move all animations after this
-                                               // one to the start...
-                                               for (k = channelLen; k > j; k--) {
-                                                       anim.goTo(0);
-                                               }
-                                       }
-                               } else {
-                                       // ok, we've been provided with an object rather than a number of seconds
-                                       // Let's convert it to seconds and rerun this function
-                                       for (i = 0; i < channelsLen; i++) {
-                                               // let's count this to find out what "time" the item the user wants to play is at
-                                               runningDuration = 0;
-                                               
-                                               // let's loop through animations in that channel
-                                               for (j = 0, channelLen = this._channels[i].length; j < channelLen; j++) {
-                                                       anim = this._channels[i][j];
-                                                       
-                                                       if (anim === pos) {
-                                                               // oh! We've found the thing they want to play
-                                                               return this.goTo(runningDuration);
-                                                       }
-                                                       if (anim instanceof r.Animation) {
-                                                               // add that anim to the running total
-                                                               runningDuration += anim.duration;
-                                                       }
-                                               }
-                                       }
-                                       throw "Animation not found in animation channels";
-                               }
-                               return this;
-                       }
-               };
-               glow.anim = r;
-       }
-});
-/**
-       @name glow.forms
-       @namespace
-       @see <a href="../furtherinfo/forms/">Validating Forms</a>
-       @see <a href="../furtherinfo/forms/defaultfeedback/">Using default form feedback</a>
-       @see <a href="../furtherinfo/forms/example.shtml">Working example</a>
-       @description Validating HTML Forms.
-               To get started, you'll need to create a {@link glow.forms.Form Form instance}.
- */
-(window.gloader || glow).module({
-       name: "glow.forms",
-       library: ["glow", "1.7.0"],
-       depends: [["glow", "1.7.0", 'glow.dom', 'glow.events', 'glow.anim', 'glow.net', 'glow.i18n']],
-       builder: function(glow) {
-
-       var $i18n = glow.i18n,
-               $interpolate = glow.lang.interpolate;
-
-       $i18n.addLocaleModule("GLOW_FORMS", "en", {
-               TEST_MESSAGE_REQUIRED  : "Value is required",
-               TEST_MESSAGE_IS_NUMBER : "Must be a number.",
-               TEST_MESSAGE_MIN       : "The value must be at least {arg}.",
-               TEST_MESSAGE_MAX       : "The value must be less than {arg}.",
-               TEST_MESSAGE_RANGE     : "The value must be {min} or greater, and less than {max}.",
-               TEST_MESSAGE_MIN_COUNT : "Must be have at least {arg} values.",
-               TEST_MESSAGE_MAX_COUNT : "Must be have at most {arg} values.",
-               TEST_MESSAGE_COUNT     : "Must have {arg} values.",
-               TEST_MESSAGE_REGEX     : "Must be in the correct format.",
-               TEST_MESSAGE_MIN_LEN   : "Must be at least {arg} characters.",
-               TEST_MESSAGE_MAX_LEN   : "Must be at most {arg} characters.",
-               TEST_MESSAGE_IS_EMAIL  : "Must be a valid email address.",
-               TEST_MESSAGE_SAME_AS   : "Must be the same as: {arg}",
-               TEST_MESSAGE_AJAX      : "server responded",
-               TEST_MESSAGE_IS        : "Must be {arg}",
-               TEST_MESSAGE_IS_NOT    : "Must not be {arg}"
-       });
-
-glow.forms = {};
-
-/**
-       @name glow.forms.Form
-       @constructor
-       @description Create an object to add tests to.
-       @see <a href="../furtherinfo/forms/">Validating Forms</a>
-       @see <a href="../furtherinfo/forms/defaultfeedback/">Using default form feedback</a>
-       @param {glow.dom.NodeList | Selector} formNode
-       @param {Object} [opts]
-       @param {Function} [opts.onValidate] Handles the 'validate' event when all tests are complete. Default is glow.forms.feedback.defaultFeedback.
-       @example
-       myForm = new glow.forms.Form(
-               glow.dom.get("#htmlFormId"),
-               {
-                       onValidate: function(results) {
-                               // ...
-                       }
-               }
-       );
- */
-glow.forms.Form = function(formNode, opts) { /*debug*///console.log("glow.forms.Form#new("+formNode+", "+opts+")");
-       /**
-       @name glow.forms.Form#formNode
-       @type glow.dom.NodeList
-       @description NodeList containing the form element
-       */
-       this.formNode = glow.dom.get(formNode);
-       if (!this.formNode[0]) throw "Could not find form. Possibly run before DOM ready.";
-       this._fields = [];
-       this._result = null;
-       this.opts = opts || {};
-       glow.events.addListener(this, "validate", this.opts.onValidate || feedback.defaultFeedback);
-
-       this._idleTimer = null;
-       
-       this._localeModule = $i18n.getLocaleModule("GLOW_FORMS");
-
-       // add event listener to form
-       var thisForm = this;
-       glow.events.addListener(
-               this.formNode,
-               "submit",
-               function() {
-                       thisForm.validate('submit');
-                       return false; // submit() will be called from the nextField method instead
-               }
-       );
-}
-
-/**
-       @name glow.forms.Form#event:validate
-       @event
-       @description Fired whenever the glow tries to validate a form.
-       
-       If you prefer you can set a handler for this event via the <code>onValidate</code> option of the glow.forms.Form constructor.
-       
-       @param {glow.forms.ValidateResult} event A specialised Event object.
-       @example
-       
-       glow.events.addListener(myForm, "validate", function(e) {
-               if (e.eventName == 'submit') {
-                       if (e.errorCount == 0) { alert("Well done!"); }
-                       else { e.preventDefault(); } // stop the submit from happening
-               }
-       });
- */
-
-/**
-       @name glow.forms.Form#validate
-       @function
-       @description Run validation tests.
-               This is called automatically depending on the tests added to the form.
-               However, you can trigger validation manually
-       @param {String} [eventName='submit'] Run only tests tied to this eventname.
-       @param {String} [fieldName] Run only tests attached to the form element with this name.
- */
-glow.forms.Form.prototype.validate = function(eventName, fieldName) { /*debug*///console.log("glow.forms.Form#validate("+eventName+", "+fieldName+")");
-       this.eventName = eventName || 'submit'; // default
-       this._result = new glow.forms.ValidateResult(this.eventName);
-       this._result.form = this;
-
-       this._fieldCur = 0;
-       this._testCur = -1;
-
-       this._fieldName = fieldName;
-       nextTest.call(this);
-}
-
-/**
-       Advance the test cursor to get the next test in the queue and then run it.
-       @function
-       @name nextTest
-       @this {glow.forms.Form}
-       @calledBy glow.forms.Form#validate
-       @calledBy onTestResult
-       @private
- */
-var nextTest = function() { /*debug*///console.log("glow.forms.Form#nextTest()");
-       this._testCur++;
-       if (this._testCur >= this._fields[this._fieldCur]._tests.length) { // run out of tests for the current field?
-               if (!nextField.call(this)) return;
-       }
-
-       var currentTest = this._fields[this._fieldCur]._tests[this._testCur]; // shortcut
-
-       // get value from form element, normalize into an array
-       var fieldValue;
-       if (currentTest.opts.field) { // a conditional test
-               fieldValue = this.formNode.val()[currentTest.opts.field] || "";
-               currentTest.isConditional = true;
-       }
-       else {
-               fieldValue = this.formNode.val()[this._fields[this._fieldCur].name] || "";
-       }
-
-       // values should always be an array
-       if (!fieldValue.join) fieldValue = [fieldValue];
-
-       var callback = function(that) { // closure
-               return function() { onTestResult.apply(that, arguments) };
-       }(this);
-
-       // only run tests that are tied to the eventName being validated
-       currentTest.opts.on = currentTest.opts.on || "submit";
-       if (
-               this._result.eventName
-               && (" "+currentTest.opts.on+" ").indexOf(" "+this._result.eventName+" ") != -1 // assume space delimited event names
-       ) {
-               // skip tests that are not tied to the fieldName being validated
-               if (this._fieldName && this._fieldName != currentTest.name) {
-                       nextTest.call(this);
-                       return;
-               }
-
-               // run the test, if it exists
-               if (typeof glow.forms.tests[currentTest.type] != "function") {
-                       throw "Unimplemented test: no test exists of type '"+currentTest.type+"'.";
-               }
-               
-               currentTest.opts._localeModule = this._localeModule;
-               glow.forms.tests[currentTest.type](fieldValue, currentTest.opts, callback, this.formNode.val());
-       }
-       else {
-               nextTest.call(this);
-       }
-}
-
-/**
-       Advance the field cursor to get the next field in the queue.
-       @function
-       @name nextField
-       @this {glow.forms.Form}
-       @calledBy glow.forms.Form#nextTest
-       @private
- */
-var nextField = function() { /*debug*///console.log("glow.forms.Form#nextField()");
-       // start at the beginning of the next field
-       this._fieldCur++;
-       this._testCur = 0;
-
-       if (this._fieldCur >= this._fields.length) { // run out of fields?
-               this._fieldCur = 0;
-               // ready to fire the validate event now
-               glow.events.fire(this, "validate", this._result);
-               
-               if ( this.eventName == "submit" && this._result && !this._result.defaultPrevented() ) { // ready to submit now
-                       try {
-                               // we cannot initiate a form submit by simply returning true or false from
-                               // this event handler because there may be asynchronous tests still pending at this point,
-                               // so we must call submit ourselves, after the last field has finally been tested
-                               this.formNode[0].submit();
-                       }
-                       catch(e) {
-                               throw new Error("Glow can't submit the form because the submit function can't be called. Perhaps that form's submit was replaced by an input element named 'submit'?");
-                       }
-               }
-               
-               return false; // don't keep going
-       }
-
-       return true; // do keep going
-}
-
-/**
-       @name onTestResult
-       @function
-       @this {glow.forms.Form}
-       @calledBy glow.forms.tests.*
-       @param {Number} result One of: glow.forms.PASS, glow.forms.FAIL
-       @param {String} message
-       @private
- */
-var onTestResult = function(result, message) { /*debug*///console.log("glow.forms.Form#onTestResult("+result+", "+message+")");
-       // convert result from a boolean to glow.forms.FAIL / glow.forms.PASS
-       if (typeof result == "boolean") result = (result)? glow.forms.PASS : glow.forms.FAIL;
-
-       // a conditional test has failed?
-       if (this._fields[this._fieldCur]._tests[this._testCur].isConditional && result === glow.forms.FAIL) {
-               result = glow.forms.SKIP; // failure of a conditional test becomes a skip
-       }
-
-       this._result.fields.push(
-               {
-                       name: this._fields[this._fieldCur].name,
-                       result: result,
-                       message: message
-               }
-       );
-
-       if (result !== glow.forms.PASS) { // might be a fail or a skip
-               if (result === glow.forms.FAIL) this._result.errorCount++;
-
-               // skip over all further tests for this field
-               this._testCur = this._fields[this._fieldCur]._tests.length;
-       }
-
-       nextTest.call(this);
-}
-
-/**
-       @name glow.forms.Form#addTests
-       @function
-       @description Add one or more tests to a field.
-       @param {String} fieldName The name of the field to add tests to.
-       @param {Array} [spec]
-       
-               Test specifications identify the type of test to be run on a field to
-               determine whether it contains desired data. See docs on the
-               {@link glow.forms.tests types of tests}.
-       
-       @example
-       //pattern for a test specification
-       [
-         "testName", //name of the test to run
-         {
-           arg     : 5,                //an argument for the test, not all tests need this
-           on      : "submit change",  //when should this test be run?
-           message : "Incorrect value" //a custom error message to display
-         }
-       ]
-       
-       @example
-       //setting a form up for validation
-       var myForm = new glow.forms.Form(glow.dom.get("#myFormId"))
-               .addTests(
-                       "username",
-                       ["required"],
-                       ["maxLen", {
-                               arg: 12,
-                               message: "Name must be les than 12 characters long."
-                       }]
-               )
-               .addTests(
-                       "email",
-                       ["isEmail"]
-               );
- */
-glow.forms.Form.prototype.addTests = function(fieldName /*...*/) { /*debug*///console.log("glow.forms.Form#addTests("+fieldName+", ...)");
-       var field = {name: fieldName, _tests:[]};
-
-       var changeCallback = function(that) {
-               return function() {
-                       that.validate.apply(that, ["change", fieldName])
-               };
-       }(this);
-
-       var clickCallback = function(that) {
-               return function() {
-                       that.validate.apply(that, ["click", fieldName])
-               };
-       }(this);
-
-       var idleCallback = function(that) {
-               return function() {
-                       that.validate.apply(that, ["idle", fieldName]);
-               };
-       }(this);
-
-       // loop over test specifications
-       for (var i = 1; i < arguments.length; i++) {
-               var testType = arguments[i][0];
-               var testOpts = (arguments[i].length > 1)? arguments[i][1] : {}; // default opts
-
-               field._tests.push({name: fieldName, type: testType, opts: testOpts});
-
-               // add event listeners to form fields for change events
-               if (!changeCallback.added && (" "+testOpts.on+" ").indexOf(" change ") != -1) {
-                       var inputs = this.formNode.get("*").each(function (i) {
-                               if (this.name == fieldName) {
-                                       glow.events.addListener(this, "change", changeCallback);
-                                       changeCallback.added = true;
-                               }
-                       });
-               }
-
-               // add event listeners to form fields for click events
-               if (!clickCallback.added && (" "+testOpts.on+" ").indexOf(" click ") != -1) {
-                       var inputs = this.formNode.get("*").each(function (i) {
-                               if (this.name == fieldName) {
-                                       glow.events.addListener(this, "click", clickCallback);
-                                       clickCallback.added = true;
-                               }
-                       });
-               }
-
-               if (!idleCallback.added && (" "+testOpts.on+" ").indexOf(" idle ") != -1) {
-                       var idleDelay = (typeof testOpts.delay != "undefined")? parseInt(testOpts.delay) : 1000; // default delay before idle handler is run
-
-                       var inputs = this.formNode.get("*").each(function (i) {
-                               if (this.name == fieldName) {
-                                       // FIXME: adding idleTimeoutID to HTML element, is this the best way?
-                                       glow.events.addListener(this, "keyup", function(t){ return function() {window.clearTimeout(this.idleTimeoutID); if (this.value) this.idleTimeoutID = window.setTimeout(idleCallback, t)} }(idleDelay));
-                                       glow.events.addListener(this, "blur", function() {window.clearTimeout(this.idleTimeoutID)});
-
-                                       idleCallback.added = true;
-                               }
-                       });
-               }
-       }
-
-       this._fields.push(field);
-
-       return this; // chained
-}
-
-/**
-       @name glow.forms.ValidateResult
-       @constructor
-       @extends glow.events.Event
-       @description The overall result returned by an attempt to validate the current state of the form.
-       
-       The ValidateResult object is used by glow.forms.Form to accumulate and record the test results as they are run. It is created automatically by the running validation so it is not necessary for the user to instantiate it directly, but it is useful to know the properties and their meanings as these will likely be referred to when a custom <code>onValidate</code> handler is run.
-       @param {String} eventName
-       @property {String} eventName The name of the event that was associated with this validation event.
-       
-       Validation can happen based on one of several different user interactions, this property allows you to identify the type of interaction that initiated this validation. Examples are:
-       
-               <dl>
-                       <dt>submit</dt>
-                       <dd>The user has done something to submit the form, for example by pressing the Submit button.</dd>
-                       <dt>change</dt>
-                       <dd>The user has modified the value of a form field.</dd>
-                       <dt>idle</dt>
-                       <dd>The user is typing in a form field but has paused for a moment (by default 1 second).</dd>
-                       <dt>click</dt>
-                       <dd>The user has clicked the mouse on or in a form field.</dd>
-               </dl>
-       
-       Which user interaction is associated with which tests is determined by the options you used when you added the test. See the documentation for {@link glow.forms.Form#addTests} for more information. 
-       
-       @property {Object[]} fields Each object in this array has a name of a field, a test result such as glow.forms.PASS, glow.forms.FAIL or glow.forms.SKIP, and a message describing the test result.
-       
-       The effect of validation is that the value or state of each field in the form is compared to the tests the developer has added to the fields. In each tested field a determination is made that the current value either passes or fails (or, if the test wasn't run at all, is skipped). The <code>fields</code> property provides information on the overall result of the validation, on each field that was tested and the results.
-       
-       @property {Number} errorCount The number of fields that had a failing test.
-       
-       From the <code>fields</code> property you can determine how many fields have failing or passing values; this is property is simply a more convenient way to access the total failing count of tests that fail. If no tests fail then this value will be 0 and you can consider the form to have validated.
-       
- */
-glow.forms.ValidateResult = function(eventName) {
-       glow.events.Event.apply(this);
-
-       this.eventName = eventName;
-       this.errorCount = 0;
-       this.value = undefined;
-       this.fields = [];
-}
-
-glow.lang.extend(glow.forms.ValidateResult, glow.events.Event);
-
-/**
-       @name glow.forms.PASS
-       @type Number
-       @description Constant for a passed test.
-               This indicates that the value in a field passes all the tests associated with it. You can use this when creating {@link glow.forms.tests.custom custom tests}
- */
-glow.forms.PASS =  1;
-/**
-       @name glow.forms.FAIL
-       @type Number
-       @description Constant for a failing test.
-               This indicates that the value in a field fails at least one of the tests associated with it. You can use this when creating {@link glow.forms.tests.custom custom tests}
- */
-glow.forms.FAIL =  0;
-/**
-       @name glow.forms.SKIP
-       @type Number
-       @description Constant for a skipped test.
-               This indicates that there was some unmet condition associated with the applied tests, so they were not run. This state is not considered a fail, and will not affect glow.forms.ValidateResult#errorCount. You can use this when creating {@link glow.forms.tests.custom custom tests}.
- */
-glow.forms.SKIP = -1;
-
-/**
-       @name glow.forms.tests
-       @namespace
-       @see <a href="../furtherinfo/forms/">Validating Forms</a>
-       @see <a href="../furtherinfo/forms/example.shtml">Working example</a>
-       @description Collection of built-in tests that can be added to any form field as a way of validating that field's value.
-
-       <p>You do not need to call these functions directly, the devloper use a test by passing its name to the {@link glow.forms.Form#addTests addTests} method.</p>
-
-       <p>For more information about tests, how to create your own custom tests, or to see what arguments these tests take, you may refer to the <a href="../furtherinfo/forms/#custom_tests">Creating
-       Custom Tests</a> section of the Validating Forms user guide.</p>
- */
-glow.forms.tests = {
-       /**
-               @name glow.forms.tests.required
-               @function
-               @description The value must contain at least one non-whitespace character.
-               
-               A text input field that is empty, or contains only spaces for example will fail this test.
-               
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["required"]
-               );
-        */
-       required: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.required()");
-               var message = opts.message || opts._localeModule.TEST_MESSAGE_REQUIRED;
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (/^\s*$/.test(values[i])) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.isNumber
-               @function
-               @description The value must be a valid number.
-               
-               A field that is empty, or contains a value that is not a number like 1 or 3.14 will fail this test.
-               
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["isNumber"]
-               );
-        */
-       isNumber: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.isNumber()");
-               var message = opts.message || opts._localeModule.TEST_MESSAGE_IS_NUMBER;
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (values[i] == "" || isNaN(values[i])) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.min
-               @function
-               @description The numeric value must be at least the given value.
-               
-               A field whose value, when converted to a number, is not less than the given arg will fail this test.
-               
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["min", {
-                               arg: "1"
-                       }]
-               );
-        */
-       min: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.min()");
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_MIN, {arg: opts.arg});
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (Number(values[i]) < Number(opts.arg)) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.max
-               @function
-               @description The numeric value must be no more than the given value.
-               
-               A field whose value, when converted to a number, is not more than the given arg will fail this test.
-               
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["max", {
-                               arg: "100"
-                       }]
-               );
-        */
-       max: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.max()");
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_MAX, {arg: opts.arg});
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (Number(values[i]) > Number(opts.arg)) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.range
-               @function
-               @description The numeric value must be between x..y.
-               
-               A field whose value, when converted to a number, is not more than x and less than y will fail this test.
-               
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["range", {
-                               arg: "18..118"
-                       }]
-               );
-        */
-       range: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.range()");
-               var minmax = opts.arg.split(".."); // like "0..10"
-               if (typeof minmax[0] == "undefined" || typeof minmax[1] == "undefined") {
-                       throw "Range test requires a parameter like 0..10."
-               }
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_RANGE, {min: minmax[0], max : minmax[1]});
-
-               // cast to numbers to avoid stringy comparisons
-               minmax[0] *= 1;
-               minmax[1] *= 1;
-
-               // reverse if the order is hi..lo
-               if (minmax[0] > minmax[1]) {
-                       var temp = minmax[0];
-                       minmax[0] = minmax[1];
-                       minmax[1] = temp;
-               }
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (values[i] < minmax[0] || values[i] > minmax[1]) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.minCount
-               @function
-               @description There must be at least the given number of values submitted with this name.
-                       This is useful for multiple selects and checkboxes that have the same name.
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["minCount", {
-                               arg: "1"
-                       }]
-               );
-        */
-       minCount: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.minCount()");
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_MIN_COUNT, {arg: opts.arg});
-
-               var count = 0;
-
-               for (var i = 0; i < values.length; i++ ) {
-                       if (values[i] != "") count++;
-               }
-
-               if (count < opts.arg) {
-                       callback(glow.forms.FAIL, message);
-                       return;
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.maxCount
-               @function
-               @description There must be no more than the given number of values submitted with this name.
-                       This is useful for multiple selects and checkboxes that have the same name.
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["maxCount", {
-                               arg: "10"
-                       }]
-               );
-        */
-       maxCount: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.maxCount()");
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_MAX_COUNT, {arg: opts.arg});
-
-               var count = 0;
-
-               for (var i = 0; i < values.length; i++ ) {
-                       if (values[i] != "") count++;
-               }
-
-               if (count > opts.arg) {
-                       callback(glow.forms.FAIL, message);
-                       return;
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.count
-               @function
-               @description There must be exactly the given number of values submitted with this name.
-                       This is useful for multiple selects and checkboxes that have the same name.
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["count", {
-                               arg: "2"
-                       }]
-               );
-        */
-       count: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.count()");
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_COUNT, {arg: opts.arg});
-
-               var count = 0;
-
-               for (var i = 0; i < values.length; i++ ) {
-                       if (values[i] != "") count++;
-               }
-
-               if (count != opts.arg) {
-                       callback(glow.forms.FAIL, message);
-                       return;
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.regex
-               @function
-               @description The value must match the given regular expression.
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["regex", {
-                               arg: /^[A-Z0-9]*$/
-                       }]
-               );
-        */
-       regex: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.regex()");
-               var message = opts.message || opts._localeModule.TEST_MESSAGE_REGEX;
-
-               var regex = (typeof opts.arg == "string")? new RegExp(opts.arg) : opts.arg; // if its not a string assume its a regex literal
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (!regex.test(values[i])) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.minLen
-               @function
-               @description The value must be at least the given number of characters long.
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["minLen", {
-                               arg: "3"
-                       }]
-               );
-        */
-       minLen: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.minLen()");
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_MIN_LEN, {arg: opts.arg});
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (values[i].length < opts.arg) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.maxLen
-               @function
-               @description The value must be at most the given number of characters long.
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["maxLen", {
-                               arg: "24"
-                       }]
-               );
-        */
-       maxLen: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.maxLen()");
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_MAX_LEN, {arg: opts.arg});
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (values[i].length > opts.arg) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.isEmail
-               @function
-               @description The value must be a valid email address.
-                       This checks the formatting of the address, not whether the address
-                       exists.
-               @example
-               myForm.addTests(
-                       "fieldName",
-                       ["isEmail"]
-               );
-        */
-       isEmail: function(values, opts, callback) { /*debug*///console.log("glow.forms.tests.isEmail()");
-               var message = opts.message || opts._localeModule.TEST_MESSAGE_IS_EMAIL;
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (!/^\s*[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}\s*$/i.test(values[i])) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.sameAs
-               @function
-               @description The value must be the same as the value in the given field.
-               @example
-               myForm.addTests(
-                       "email_confirm",
-                       ["sameAs", {
-                               arg: "email"
-                       }]
-               );
-        */
-       sameAs: function(values, opts, callback, formValues) { /*debug*///console.log("glow.forms.tests.sameAs()");
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_SAME_AS, {arg: opts.arg});
-               var compareTo = formValues[opts.arg];
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (values[i] != compareTo) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.ajax
-               @function
-               @description Send the data to the server for testing.
-                       A request to the given URL will be made and the response will be passed to the given callback.
-                       
-                       'arg' is the function to handle the response from the server.
-                       
-                       This function should return a truthy value to indicate whether the server 
-                       response should be considered a PASS or a FAIL. Optionally you can include a bespoke
-                       error message by returning an array of two elements, the first being
-                       the PASS or FAIL verdict, and the second being the error message to display.
-                       
-                       'url' is the url to call. You can use placeholders in here for form values (see example).
-               @example
-               
-               myForm.addTests(
-                       "username",
-                       ["ajax", {
-                               url: "/cgi/checkname.cgi?name={username}",
-                               arg: function (response) {
-                                       if (response.text() == "OK") {
-                                               return glow.forms.PASS;
-                                       } else {
-                                               return [glow.forms.FAIL, "That name is already taken."];
-                                       }
-                               },
-                               message: "The server responded: that name is not permitted."
-                       }]
-               );
-        */
-       ajax: function(values, opts, callback, formValues) { /*debug*///console.log("glow.forms.tests.ajax() - "+opts.url);
-               var queryValues = {},
-                   message = (opts.message || opts._localeModule.TEST_MESSAGE_AJAX);
-                   
-               for (var p in formValues) {
-                       if (typeof formValues[p] == "string") {
-                               queryValues[p] = escape(formValues[p]);
-                       }
-                       else if (typeof formValues[p].push != "undefined") {
-                               queryValues[p] = glow.lang.map(formValues[p], function(i) { return escape(i); }).join(",");
-                       }
-               }
-               var url = glow.lang.interpolate(opts.url, queryValues);
-
-               var request = glow.net.get(url, {
-                       onLoad: function(response) { /*debug*///console.log("glow.forms.tests.ajax - onLoad()");
-                               var verdict = opts.arg(response);
-                               if (typeof verdict.push == "undefined") verdict = [verdict, message];
-                               callback(verdict[0], verdict[1]);
-                       },
-                       onError: function(response) {
-                               alert("Error getting file: "+url);
-                       }
-               });
-       }
-       ,
-       /**
-               @name glow.forms.tests.custom
-               @function
-               @description Create a custom test.
-               
-                       'arg' is a function which tests the form value.
-                       
-                       The function is given the following parameters:
-                       
-                       <dl>
-                               <dt>values</dt>
-                               <dd>
-                                       An array of values submitted for that form field. If you
-                                       are only expecting one value, it can be accessed via values[0]
-                               </dd>
-                               <dt>opts</dt>
-                               <dd>
-                                       An object of any additional data included with the test
-                               </dd>
-                               <dt>callback</dt>
-                               <dd>
-                                       This is a function used to tell Glow whether the test has
-                                       passed or not. A callback is used rather than 'return' to
-                                       allow async tests. The first parameter is either glow.forms.PASS
-                                       or glow.forms.FAIL, the second is the success or failure message.
-                               </dd>
-                               <dt>formData</dt>
-                               <dd>
-                                       This is an object of all values captured in the form.
-                               </dd>
-                       </dl>
-               
-               @example
-               myForm.addTests(
-                       "username",
-                       ["custom", {
-                               arg: function(values, opts, callback, formData) {
-                                       for (var i = 0, len = values.length; i < len; i++) {
-                                               if (values[i] == "Jake") {
-                                                       callback(glow.forms.FAIL, "The name Jake is not allowed.");
-                                                       return;
-                                               }
-                                       }
-                                       callback(glow.forms.PASS, "Good name.");
-                               }
-                       }]
-               );
-        */
-       custom: function(values, opts, callback) {  /*debug*///console.log("glow.forms.tests.custom()");
-               opts.arg.apply(this, arguments);
-       }
-       ,
-       /**
-               @name glow.forms.tests.is
-               @function
-               @description The value must be equal to a particular value
-               @example
-               // this test ensures "other" is required *if* the "reason" field is equal to "otherReason"
-               myForm.addTests(
-                       "other",
-                       ["is", {
-                               field: "reason",
-                               arg: "otherReason"
-                       }],
-                       ["required"]
-               );
-        */
-       "is": function(values, opts, callback) {
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_IS, {arg: opts.arg});
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (values[i] != opts.arg) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-       ,
-       /**
-               @name glow.forms.tests.isNot
-               @function
-               @description The value must not be equal to a particular value
-               @example
-               // you may have a dropdown select where the first option is "none" for serverside reasons
-               myForm.addTests(
-                       "gender",
-                       ["isNot", {
-                               arg: "none"
-                       }]
-               );
-        */
-       "isNot": function(values, opts, callback) {
-               var message = opts.message || $interpolate(opts._localeModule.TEST_MESSAGE_IS_NOT, {arg: opts.arg});
-
-               for (var i = 0, len = values.length; i < len; i++) {
-                       if (values[i] == opts.arg) {
-                               callback(glow.forms.FAIL, message);
-                               return;
-                       }
-               }
-               callback(glow.forms.PASS, message);
-       }
-}
-
-
-/**
-@name glow.forms.feedback
-@namespace
-@description Collection of functions for displaying validation results to the user
-
-  <p>These functions should be used as handlers for {@link glow.forms.Form}'s validate event. At the
-  moment there is only one provided handler, more may be added in the future.</p>
-
-  <p>Of course, you don't have to use any of the methods here, you can provide your own.</p>
-
-@see <a href="../furtherinfo/forms/defaultfeedback">Using the default form feedback</a>
-*/
-
-var feedback = glow.forms.feedback = {};
-
-/**
-@name glow.forms.feedback.defaultFeedback
-@function
-@description Default handler used by {@link glow.forms.Form}.
-
-  <p>This method outputs messages to the user informing them which fields
-  contain invalid data. The output is unstyled and flexible.</p>
-
-@param {glow.forms.ValidateResult} result Object provided by the validate event
-
-@see <a href="../furtherinfo/forms/defaultfeedback">Using the default form feedback</a>
-*/
-feedback.defaultFeedback = (function() {
-       
-       //a hidden form element used to update a screenreader's buffer
-       var screenReaderBufferUpdater;
-       
-       //attempts to update the buffer of the screen reader
-       function updateScreenReaderBuffer() {
-               if (!screenReaderBufferUpdater) {
-                       screenReaderBufferUpdater = glow.dom.create('<input type="hidden" value="0" name="1.7.0" id="1.7.0" />').appendTo(document.body);
-               }
-               screenReaderBufferUpdater[0].value++;
-       }
-       
-       //write out the messages which appear next to (or near) the fields
-       function inlineErrors(response) {
-               var fields = response.fields, //field test results
-                       fieldElm, //holder for the field element(s) being processed
-                       msgContainer, //holder for contextual message holder
-                       labelError, //error holder within label element
-                       i, len;
-
-               for (i = 0, len = fields.length; i < len; i++) {
-                       fieldElm = glow.dom.get(response.form.formNode[0].elements[fields[i].name]);
-                       //here's where we get the error container, which is the label by default
-                       //also we need to escape invalid css chars CSS
-                       msgContainer = glow.dom.get("." + fields[i].name.replace(/(\W)/g, "\\$1") + "-msgContainer");
-                       if (!msgContainer[0] && fieldElm.length == 1) {
-                               //none found, try and get the label
-                               msgContainer = response.form.formNode.get("label").filter(function() { return this.htmlFor == fieldElm[0].id })
-                       }
-
-                       labelError = msgContainer.get("span.glow-errorMsg");
-
-                       if (fields[i].result) {
-                               //clear error messages & classes
-                               labelError.remove();
-                               fieldElm.removeClass("glow-invalid");
-                       } else {
-                               if (msgContainer.length) {
-                                       //add the error span to the label if it isn't already there
-                                       if (!labelError[0]) {
-                                               msgContainer.append( (labelError = glow.dom.create('<span class="glow-errorMsg"></span>')) );
-                                       }
-                                       labelError.text(fields[i].message);
-                                       fieldElm.addClass("glow-invalid");
-                               }
-                       }
-               }
-       }
-
-       //write out a list of errors to appear at the top of the form
-       function summaryError(response) {
-               var fields = response.fields, //field test results
-                       fieldElm, //holder for the field element(s) being processed
-                       errorSummary, //div containing error summary
-                       errorList, //list of errors inside the error summary
-                       promptContainer, //holds the 'question' of the field
-                       prompt, //text to prefix each error line with
-                       i,
-                       len;
-
-               //remove existing summary
-               response.form.formNode.get("div.glow-errorSummary").remove();
-               //create a summary div
-               errorSummary = glow.dom.create('<div class="glow-errorSummary" tabindex="-1"><ul></ul></div>');
-               errorList = errorSummary.get("ul");
-               for (i = 0, len = fields.length; i < len; i++) {
-                       fieldElm = glow.dom.get(response.form.formNode[0].elements[fields[i].name]);
-                       promptContainer = glow.dom.get("." + fields[i].name.replace(/(\W)/g, "\\$1") + "-prompt");
-                       if (!promptContainer[0] && fieldElm.length == 1) {
-                               //we don't have a default, get the label
-                               promptContainer = response.form.formNode.get("label").filter(function() { return this.htmlFor == fieldElm[0].id })
-                       }
-                       //did we get a prompt container?
-                       if (promptContainer[0]) {
-                               //get rid of superflous content in the prompt container (such as errors)
-                               promptContainer.get("span.glow-errorMsg").remove();
-                               prompt = glow.lang.trim(promptContainer.text());
-                               if (prompt.slice(-1) == ":") {
-                                       prompt = prompt.slice(0, -1);
-                               }
-                       } else {
-                               //else we just use the field name
-                               prompt = fields[i].name.replace(/^\w/, function(s) { return s.toUpperCase() } );
-                       }
-
-                       if (!fields[i].result) {
-                               errorList.append( glow.dom.create("<li></li>").text(prompt + ": " + fields[i].message) );
-                       }
-               }
-               response.form.formNode.prepend(errorSummary.css("opacity", "0"));
-               glow.anim.css(errorSummary, "0.5", {
-                       opacity: {from: 0, to: 1}
-               }, {tween: glow.tweens.easeOut()}).start();
-               
-               // if the error summary has been hidden, IE7 throws an exception here
-               try {           
-                       errorSummary[0].focus();
-               } catch (e) {}
-               
-               updateScreenReaderBuffer();
-       }
-
-       return function(response) {
-               if (response.eventName == "submit") {
-                       //do we have any errors?
-                       if (!response.errorCount) {
-                               //remove existing summary
-                               response.form.formNode.get("div.glow-errorSummary").remove();
-                               return;
-                       }
-                       summaryError(response);
-               }
-               // display inline errors
-               // we put this inside setTimeout to avoid an IE bug that can result
-               // in the cursor appearing outside the form element
-               setTimeout(function() {
-                       inlineErrors(response);
-               }, 0);
-               
-               return false;
-       }
-}());
-
-       }
-});
-/**
-@name glow.embed
-@namespace
-@description Detect and embed Flash objects
-@see <a href="../furtherinfo/embed/">Flash embedding</a>
-*/
-(window.gloader || glow).module({
-       name: "glow.embed",
-       library: ["glow", "1.7.0"],
-       depends: [["glow", "1.7.0", "glow.dom", "glow.data", "glow.i18n"]],
-       builder: function(glow) {
-
-               var $i18n = glow.i18n;
-               
-               $i18n.addLocaleModule("GLOW_EMBED", "en", {
-                       FLASH_MESSAGE : "This content requires Flash Player version {min} (installed version: {installed})",
-                       NO_PLAYER_MESSAGE : "No Flash Flayer installed, or version is pre 6.0.0"
-               });
-
-               /**
-               @name to_attributes
-               @private
-               @function
-               @param object
-               @returns attribute string suitable for inclusion within Flash embed/object tag
-               @description converts a hash to a space delimited string of attribute assignments
-
-                       Simple values are assumed for the object properties, with the exception of
-                       'flashVars' which is treated as a special case. If 'flashVars' is itself an object,
-                       it will be serialised in querystring format.
-                       returns string representation of object as attribute assignments eg:
-                       {id:"myId",name:"my-name"}  becomes  'id="myId" name="my-name"'
-
-               */
-               function to_attributes(object){
-
-                       var attributes = "";
-
-                       for (var $param in object){
-                               if ($param.toLowerCase() == "flashvars" && typeof object[$param] == "object"){
-                                       attributes += ' FlashVars="' + glow.data.encodeUrl(object[$param]) + '"';
-                               }
-                               else {
-                                       attributes += ' ' + $param + '="' + object[$param] + '"';
-                               }
-                       }
-                       return attributes;
-               }
-
-               /**
-               @name toParams
-               @private
-               @function
-               @param object
-               @returns string of param tags or an object element
-               @description converts a hash to a string of param tags
-
-                       Simple values are assumed for the object properties, with the exception of
-                       'flashVars' which is treated as a special case. If 'flashVars' is itself an object,
-                       it will be serialised in querystring format.
-               */
-               function toParams(object) {
-                       var r = "",
-                               key,
-                               value;
-
-                       for (key in object) {
-                               if (key.toLowerCase() == "flashvars" && typeof object[key] == "object"){
-                                       value = glow.data.encodeUrl(object[key]);
-                               } else {
-                                       value = object[key];
-                               }
-
-                               r += '<param name="' + key + '" value="' + value + '" />\n';
-                       }
-                       return r;
-               }
-
-               /**
-               @name _set_defaults
-               @private
-               @function
-               @param target
-               @param options
-               @returns
-               @description applies a hash of default property values to a target object
-
-                       Properties on the defaults object are copied to the target object if no such property is present.
-
-               */
-               function _set_defaults(target,defaults){
-                       target = target || {};
-
-                       for (var param in defaults) {
-                               if (typeof target[param] == "undefined") {
-                                       // is it safe to assign an object reference or should it be cloned ?
-                                       target[param] = defaults[param];
-                               }
-                               else if (typeof defaults[param] == "object") {
-                                       target[param] = _set_defaults(target[param],defaults[param]);
-                               }
-                       }
-
-                       return target;
-               }
-
-               /**
-                @name _platform
-                @private
-                @returns {string} 'win' or 'mac' or 'other'
-                @description identify the operating system
-                */
-               function _platform(){
-                       var platform = (navigator.platform || navigator.userAgent);
-                       return platform.match(/win/i) ? "win" : platform.match(/mac/i) ? "mac" : "other";
-               }
-
-               /**
-               @name _askFlashPlayerForVersion
-               @private
-               @function
-               @param {Shockwave.Flash} flash_player a reference to an ActiveX Shockwave Flash player object
-               @returns version object with structure: {major:n,minor:n,release:n,actual:"string"}
-               @description returns flash_player version, as reported by the GetVariable("$version") method
-               */
-               function _askFlashPlayerForVersion(flash_player){
-
-                       var $regexFLASH_VERSION = /^WIN (\d+),(\d+),(\d+),\d+$/;
-                       var $version = flash_player.GetVariable("$version");
-                       if ($match = $regexFLASH_VERSION.exec($version)){
-                               return {
-                                       major   : parseInt($match[1]),
-                                       minor   : parseInt($match[2]),
-                                       release : parseInt($match[3]),
-                                       actual  : $version
-                               };
-                       }
-                       else {
-                               // throw an exception, something very strange going on if flash player returns version in any other format ?
-
-                       }
-               }
-
-               /**
-               @name _getFlashPlayerVersion
-               @private
-               @function
-               @returns version object with structure: {major:n,minor:n,release:n,actual:"string"}
-               @description returns flash_player version
-
-                       Query installed Flash player version, using either ActiveX object creation (for Internet Explorer) or
-                       navigator plugins collection.
-
-               */
-               function _getFlashPlayerVersion(){
-                       var $match, flash_player, NO_FLASH = {major : 0, minor : 0, release : 0}, result = NO_FLASH;
-                       
-                       if (glow.env.ie){
-                               try {
-                                       flash_player = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
-                                       result = _askFlashPlayerForVersion(flash_player);
-                               }
-                               catch(e){
-                                       // Version 6 needs kid-glove treatment as releases 21 thru 29 crash if GetVariable("$version") is called
-                                       try {
-                                               flash_player = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
-                                               try {
-                                                       // This works from release 47 onward...(first public release after 29)
-                                                       flash_player.AllowScriptAccess = "always";
-                                                       result = _askFlashPlayerForVersion(flash_player);
-                                               }
-                                               catch(e){
-                                                       // we cannot safely test between releases 21...29, so assume the latest and hope for the best...
-                                                       result = {major:6,minor:0,release:29};
-                                               }
-                                       }
-                                       catch (e){
-                                               // nothing more we can do, either no flash installed, flash player version is ancient or ActiveX is disabled
-                                       }
-                               }
-                       }
-                       else {
-                               var regexFLASH_VERSION = /^Shockwave Flash\s*(\d+)\.(\d+)\s*\w(\d+)$/;
-
-                               if ((flash_player = navigator.plugins["Shockwave Flash"]) && ($match = regexFLASH_VERSION.exec(flash_player.description))){
-                                       result = {
-                                               major   : parseInt($match[1]),
-                                               minor   : parseInt($match[2]),
-                                               release : parseInt($match[3]),
-                                               actual  : flash_player.description
-                                       };
-                               }
-                       }
-
-                       result.toString = function(){return this.major ? [this.major,this.minor,this.release].join(".") : $i18n.getLocaleModule("GLOW_EMBED").NO_PLAYER_MESSAGE};
-
-                       return result;
-
-               }
-
-               /**
-                @name installed_flash_player
-                @private
-                @description version of installed Flash player, initialised at startup.
-                */
-               var installed_flash_player = _getFlashPlayerVersion();
-
-
-               /**
-               @name _meetsVersionRequirements
-               @private
-               @function
-               @param {string|object} requiredVersion string or version object
-
-                       major version must be specified. minor version is optional. release is optional, but both major and
-                       minor versions must also be supplied if release is specified.
-                       eg, as string:  "9.0.0",  "9.1",  "9"
-                       or, as object:  {major:9,minor:0,release:0},  {major:9,minor:0}, {major:9}
-
-               @returns {boolean}.
-               @description returns true if installed Flash player version meets requested version requirements
-
-               */
-               function _meetsVersionRequirements(requiredVersion){
-
-                       if (typeof requiredVersion != "object"){
-                               var match = String(requiredVersion).match(/^(\d+)(?:\.(\d+)(?:\.(\d+))?)?$/);
-                               if (!match){
-                                       throw new Error('glow.embed._meetsVersionRequirements: invalid format for version string, require "n.n.n" or "n.n" or simply "n" where n is a numeric value');
-                               }
-
-                               requiredVersion = {
-                                       major   : parseInt(match[1],10),
-                                       minor   : parseInt(match[2]||0,10),
-                                       release : parseInt(match[3]||0,10)
-                               }
-                       }
-
-                       var v = installed_flash_player, rv = requiredVersion;
-
-                       // return true if we meet the minimum version requirement...
-                       return (v.major > rv.major ||
-                          (v.major == rv.major && v.minor > rv.minor) ||
-                          (v.major == rv.major && v.minor == rv.minor && v.release >= rv.release));
-
-               }
-
-               /**
-               @name _wrap_embedding_tag
-               @private
-               @function
-               @param {string} src
-               @param {object} attributes Hash of attributes to be included
-               @param {string} params Hash of params to be included. These will be included as attributes for all but IE
-               @returns {string} object or embed tag
-               @description returns a complete object or embed tag, as appropriate (ie browser dependent)
-               */
-               var _wrap_embedding_tag = glow.env.ie ? _wrap_object_tag : _wrap_embed_tag;
-               function _wrap_embed_tag(src, attributes, params){
-                       return '<embed type="application/x-shockwave-flash" src="' + src + '"' + to_attributes(attributes) + to_attributes(params) + '></embed>';
-               }
-               function _wrap_object_tag(src, attributes, params){
-                       return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' + to_attributes(attributes) + '><param name="movie" value="' + src + '" />' + toParams(params) + '</object>';
-               }
-
-               var r = {},
-                       idIndex = 0; // Used with private function _getId()
-
-               /**
-               @name _getId()
-               @private
-               @function
-               @returns {string} unique string to use for id of a flash object
-               @description Returns a unique to the page string to use for the id of the flash object.  This function ensures that all flash objects embedded into the page get an id.
-               */
-               function _getId() {
-                       return glow.UID + "FlashEmbed" + (idIndex++);
-               }
-
-               /**
-               @name glow.embed.Flash
-               @class
-               @description A wrapper for a Flash movie so it can be embedded into a page
-               @see <a href="../furtherinfo/embed/">Flash embedding</a>
-
-               @param {String} src Absolute or relative URL of a Flash movie file to embed
-               @param {selector | glow.dom.NodeList} container The element to embed the movie into
-
-                       <p>If a CSS selector is provided then the first matching element is used as the
-                       container.</p>
-
-                       <p>If the parameter is a {@link glow.dom.NodeList}, then the first
-                       element of the list is used as the container.</p>
-
-               @param {String|Object} minVersion The minimum required version of the Flash plugin.
-
-                       <p>The Flash plugin has a version numbering scheme comprising of  major, minor and
-                       release numbers.</p>
-
-                       <p>This param can be a string with the major number only, major plus minor numbers, or
-                       full three-part version number, e.g. "9",  "9.1" , "6.0.55" are all valid values.</p>
-
-                       <p>If minVersion is set as an object, it must use a similar structure to the object
-                       returned by the {@link glow.embed.Flash#version} method, e.g: <code>{major: 9, minor:0,
-                       release:0}</code>.</p>
-
-               @param {Object} [opts]
-
-                       Hash of optional parameters.
-
-                       @param {String} [opts.width] Width of the Flash movie. Defaults to "100%"
-                       @param {String} [opts.height] Height of the Flash movie. Defaults to "100%"
-                       @param {String} [opts.id] Unique id to be assigned to Flash movie instance.
-                       @param {String} [opts.className] CSS class to be assigned to the embedding element.
-                       @param {Object} [opts.attributes] A hash of attributes to assign to the embedded element tag.
-                       @param {Object} [opts.params] A hash of optional Flash-specific parameters.
-                               For example quality, wmode, bgcolor, flashvars.
-                       @param {String|Function} [opts.message] Error handling message or function.
-
-                               A message to display in the event that the Flash player is either not
-                               installed or is an earlier version than the specified minVersion. This message will
-                               be written into the container element instead of the Flash movie.
-
-                               If a function is supplied, it will be invoked and any return value will be used
-                               as the message to write into the container.
-
-                       @example
-                               var myFlash = new glow.embed.Flash("/path/to/flash.swf", "#flashContainer", "9");
-
-                       @example
-                               var myFlash = new glow.embed.Flash("/path/to/flash.swf", "#flashContainer", "9", {
-                                       width: "400px",
-                                       height: "300px"
-                               });
-
-                       @example
-                               var myFlash = new glow.embed.Flash("/path/to/flash.swf", "#flashContainer", "9", {
-                                       width: "400px",
-                                       height: "300px",
-                                       params: {
-                                               wmode: "transparent",
-                                               flashvars: {
-                                                       navColour: "red",
-                                                       username: "Frankie"
-                                               }
-                                       }
-                               });
-                */
-               r.Flash = function(src, container, minVersion, opts){
-
-                       opts = _set_defaults(opts,{
-                                       width   : "100%",
-                                       height  : "100%",
-                                       params  : {
-                                               allowscriptaccess       : "always",
-                                               allowfullscreen         : "true",
-                                               quality                         : "high"
-                                       },
-                                       attributes : {},
-                                       //expressInstall : false, // TODO add this in a later release
-                                       message : glow.lang.interpolate($i18n.getLocaleModule("GLOW_EMBED").FLASH_MESSAGE, {min: minVersion, installed: installed_flash_player}),
-                                       // create a default ID one hasn't been created as an attribute
-                                       id : (opts && opts.attributes && opts.attributes.id) || _getId() // Fix for trac 165
-                               }
-                       );
-
-                       /**
-                        @name glow.embed.Flash#container
-                        @type glow.dom.NodeList
-                        @description The element containing the embedded movie.
-                        */
-                       container = glow.dom.get(container);
-                       if (!container.length){
-                               throw new Error("glow.embed.Flash unable to locate container");
-                       }
-                       this.container = container;
-
-                       //this.expressInstall = opts.expressInstall; // TODO add this in a later release
-
-                       /**
-                        @name glow.embed.Flash#movie
-                        @type Element
-                        @description A reference to the actual Flash movie element, for direct script access.
-                        @example
-                               myFlash.movie.exposedFlashMethod();
-                        */
-                       this.movie = null;
-
-                       this._displayErrorMessage = typeof opts.message == "function" ? opts.message : function(){return opts.message};
-
-                       /**
-                        @name glow.embed.Flash#isSupported
-                        @type Boolean
-                        @description Does the user have the correct version of Flash?
-                               This will be false if the user has an earler version of Flash
-                               installed than this movie requires, or the user doesn't have
-                               any version of Flash instaled.
-                        @example
-                               if ( !myFlash.isSupported ) {
-                                       alert('Please download the latest version of Flash');
-                               }
-                       */
-                       this.isSupported;
-
-                       // Check that the min version requirement is satisfied and store this status, so we don't later try to embed the thing
-                       // if we don't can't meet the version requirements.
-
-                       if (this.isSupported = _meetsVersionRequirements(minVersion)){
-                               var attrs = opts.attributes,
-                                       overwrites = ["id", "width", "height"],
-                                       i = overwrites.length;
-
-                               // copies stuff like opts.id to attr.id
-                               while (i--) {
-                                       if (opts[overwrites[i]]) { attrs[overwrites[i]] = opts[overwrites[i]]; }
-                               }
-
-                               if (opts.className) { attrs["class"] = opts.className; }
-                               this._embed_tag = _wrap_embedding_tag(src, attrs, opts.params);
-                       }
-                       /*
-                       else if (this.expressInstall && _meetsVersionRequirements("6.0.65") && _platform().match(/^win|mac$/)) {
-
-                               // Callback to be invokes in case of express install error
-                               window[glow.UID + "flashExpressInstallCancelled"] = function(){
-                                       alert("Flash update cancelled");
-                               }
-                               window[glow.UID + "flashExpressInstallFailed"] = function(){
-                                       alert("Unable to complete update, please go to adobe.com...");
-                               }
-                               window[glow.UID + "flashExpressInstallComplete"] = function(){
-
-                                       alert("New version of flash installed");
-
-                               }
-
-                               new glow.embed.Flash("expressInstall.swf",
-                                       this.container,
-                                       "6.0.65", {
-                                       //TODO check minimum width/height
-                                               width:opts.width,
-                                               height:opts.height,
-                                               params : {
-                                                       flashVars : {
-                                                               MMredirectURL :  window.location.toString(),
-                                                               MMplayerType : glow.env.ie ? "ActiveX" : "PlugIn",
-                                                               MMdoctitle : document.title,
-                                                               GlowCallback : glow.UID + "flashExpressInstall"
-                                                       }
-                                               }
-                                       }
-                               ).embed();
-
-                               this.expressInstalling = true;
-                       }*/
-               };
-
-               /**
-                @name glow.embed.Flash.version
-                @function
-                @description Get details of the current users Flash plugin
-                @returns An object with details of the currently installed Flash plugin.
-
-                       <dl>
-                               <dt>major (number)</dt><dd>Flash player major version mumber</dd>
-                               <dt>minor (number)</dt><dd>Flash player minor version mumber.</dd>
-                               <dt>release (number)</dt><dd>Flash player release version mumber.</dd>
-                               <dt>actual (string)</dt><dd>The Flash version exactly as reported by the Flash player.</dd>
-                               <dt>toString (function)</dt><dd>toString implementation in the form "major.minor.release" Eg "9.0.2"</dd>
-                       </dl>
-
-               @example
-                       var version = glow.embed.Flash.version();
-                       alert("curr = " + version.major) // "curr = 9"
-                       alert("curr = " + version) // "curr = 9.0.2"
-                */
-               r.Flash.version = function(){
-                       return installed_flash_player;
-               };
-
-               /**
-                @name glow.embed.Flash#embed
-                @function
-                @description Embed the Flash movie into the document
-                @returns {glow.embed.Flash}
-
-                @example
-                       var myFlash = new glow.embed.Flash(...);
-                       myFlash.embed();
-               */
-               r.Flash.prototype.embed = function(){
-                       var containerElm = this.container[0];
-                       if (this.isSupported){
-
-                               containerElm.innerHTML = this._embed_tag;
-
-                               this.movie = containerElm.firstChild;
-
-                       }/*
-                       else if (this.expressInstalling){
-                               // wait for expressInstall to complete
-
-                       }*/
-                       else {
-                               var message = this._displayErrorMessage();
-                               if (message){
-                                       containerElm.innerHTML = message;
-                               }
-                       }
-
-                       return this;
-
-               };
-
-               glow.embed = r;
-
-       }
-});
-/**
-@name glow.dragdrop
-@namespace
-@description Simplifying drag and drop behaviour
-*/
-(window.gloader || glow).module({
-       name: "glow.dragdrop",
-       library: ["glow", "1.7.0"],
-       depends: [["glow", "1.7.0", "glow.tweens", "glow.events", "glow.dom", "glow.anim"]],
-       builder: function(glow) {
-               var events                 = glow.events,
-                       addListener        = events.addListener,
-                       fire               = events.fire,
-                       removeListener = events.removeListener,
-                       dom                        = glow.dom,
-                       $                          = dom.get,
-                       create             = dom.create;
-
-               //public
-               var r = {},
-                       _zIndex = 1000,
-                       _ieStrict = (document.compatMode == "CSS1Compat" && glow.env.ie >= 5) ? true : false,
-                       _ieTrans= (document.compatMode != "CSS1Compat" && glow.env.ie >= 5) ? true : false,
-                       _ie = glow.env.ie >= 5,
-                       sides = ['top', 'right', 'bottom', 'left'];
-
-               /*
-               PrivateFunction: memoize(clss, name)
-
-               Replace a method with a version that caches the result after the first run.
-
-               Arguments:
-
-                       *clss* (function)
-
-                       The class whose method is being memoized.
-
-                       *name*
-
-                       The name of the method to memoize.
-               */
-
-               function memoize (clss, name) {
-                       var orig = clss.prototype[name];
-                       var cachedName = 'cached_' + name;
-                       clss.prototype[name] = function () {
-                               if (cachedName in this) return this[cachedName];
-                               return this[cachedName] = orig.apply(this, arguments);
-                       };
-               }
-               
-               /*
-                Copy margins from one element to another
-               */
-               function copyMargins(to, from) {
-                       var i = sides.length, margin;
-                       
-                       while (i--) {
-                               margin = 'margin-' + sides[i];
-                               to.css(margin, from.css(margin));
-                       }
-               }
-
-               /*
-               PrivateFunction: memoizeNamed(clss, methodName)
-
-               Replace a method that takes a name with a version that caches the result for each name after the first run.
-
-               Arguments:
-
-                       *clss* (function)
-
-                       The class whose method is being memoized.
-
-                       *methodName*
-
-                       The name of the method to memoize.
-               */
-
-               function memoizeNamed (clss, methodName) {
-                       var orig = clss.prototype[methodName];
-                       var cachedName = 'cached_' + methodName;
-                       clss.prototype[methodName] = function (name) {
-                               if (! this[cachedName]) this[cachedName] = {};
-                               if (name in this[cachedName]) return this[cachedName][name];
-                               return this[cachedName][name] = orig.apply(this, arguments);
-                       };
-               }
-
-               /*
-               PrivateFunction: reset(obj, names)
-
-               Remove cached values for a set of memoized methods.
-
-               Arguments:
-
-                       *obj* (object)
-
-                       The object containing cached values.
-
-                       *names* (array of strings)
-
-                       The names of methods whose values have been cached.
-               */
-
-               function reset (obj, names) {
-                       for (var i = 0, l = names.length; i < l; i++) {
-                               delete obj['cached_' + names[i]];
-                       }
-               }
-
-               /*
-               PrivateFunction: resetNamed(obj, meth, names)
-
-               Remove cached values for a set of named properties for a method.
-
-               Arguments:
-
-                       *obj* (object)
-
-                       The object containing cached values.
-
-                       *meth* (string)
-
-                       The name of the method whose values have been cached.
-
-                       *names* (array of strings)
-
-                       The names of the cached properties.
-
-               function resetNamed (obj, meth, names) {
-                       var cache = obj['cached_' + meth];
-                       if (! cache) return;
-                       for (var i = 0, l = names.length; i < l; i++) {
-                               delete cache[names[i]];
-                       }
-               }
-               */
-
-               /*
-               PrivateClass: Box
-
-               Calculates and caches information about an element in the box model.
-
-               Constructor:
-
-                        (code)
-                        new Box(el)
-                        (end)
-
-               Arguments:
-
-                       *el* (glow.dom.NodeList)
-
-                       The element that calculations will be performed on.
-               */
-
-               var Box = function (el) {
-                       this.el = el;
-               };
-
-               Box.prototype = {
-
-                       /*
-                       PrivateMethod: val
-
-                       Get an pixel value for a CSS style.
-
-                       Arguments:
-
-                               *style* (string)
-
-                               The name of a CSS style (e.g. "margin-top".
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       val: function (style) {
-                               var val = parseInt(this.el.css(style));
-                               // TODO - fix dom so margin-left return value is always defined?
-//                             if (isNaN(val)) throw 'got NaN in val for ' + style + ': ' + this.el.css(style);
-                               return val || 0;
-//                             return val;
-                       },
-
-                       /*
-                       PrivateMethod: width
-
-                       Get the width of the element.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       width: function () {
-                               return this.borderWidth()
-                                        - this.val('border-left-width')
-                                        - this.val('border-right-width');
-                       },
-
-                       /*
-                       PrivateMethod: height
-
-                       Get the height of the element.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       height: function () {
-                               return this.borderHeight()
-                                        - this.val('border-top-width')
-                                        - this.val('border-bottom-width');
-                       },
-
-                       /*
-                       PrivateMethod: offsetParentPageTop
-
-                       Get the number of pixels from the top of nearest element with absolute, relative or fixed position to the
-                       top of the page.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-                       offsetParentPageTop: function () {
-                               var el = this.el[0], pos, top;
-                               while (el = el.offsetParent) {
-                                       if ( $(el).css('position') != 'static' ) {
-                                               break;
-                                       }
-                               }
-                               return el ?
-                                       $(el).offset().top :
-                                       0;
-                       },
-
-                       /*
-                       PrivateMethod: offsetTop
-
-                       This gets what CSS 'top' would be if the element were position "absolute"
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-                       offsetTop: function () {
-                               return this.el.position().top;
-                       },
-
-                       /*
-                       PrivateMethod: offsetLeft
-
-                       This gets what CSS 'left' would be if the element were position "absolute"
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-                       offsetLeft: function () {
-                               return this.el.position().left;
-                       },
-
-                       /*
-                       PrivateMethod: borderWidth
-
-                       Get the width of the element from the left edge of the left border to the right
-                       edge of the right border.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       borderWidth: function () {
-                               var width = this.el[0].offsetWidth;
-                               if (glow.env.khtml) {
-                                       width -= this.val('margin-left')
-                                                       + this.val('margin-right')
-                                                       + this.val('border-left-width')
-                                                       + this.val('border-right-width');
-                               }
-                               return width;
-                       },
-
-                       /*
-                       PrivateMethod: borderHeight
-
-                       Get the height of an element from the top edge of the top border to the bottom
-                       edge of the bottom border.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       borderHeight: function () {
-                               if (this._logicalBottom) {
-                                       return this._logicalBottom - this.offsetTop();
-                               }
-                               var height = this.el[0].offsetHeight;
-                               if (glow.env.khtml) {
-                                       height -= this.val('margin-top')
-                                                       + this.val('margin-bottom')
-                                                       + this.val('border-top-width')
-                                                       + this.val('border-bottom-width');
-                               }
-                               return height;
-                       },
-
-
-                       /*
-                       PrivateMethod: outerWidth
-
-                       Get the width of the element in including margin, borders and padding.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       outerWidth: function () {
-                               return this.borderWidth() + this.val('margin-left') + this.val('margin-right');
-                       },
-
-                       /*
-                       PrivateMethod: outerHeight
-
-                       Get the height of the element in including margin, borders and padding. This
-                       does not take account of collapsable margins (i.e. it assumes the margins are
-                       present).
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       outerHeight: function () {
-                               return this.borderHeight() + this.val('margin-top') + this.val('margin-bottom');
-                       },
-
-                       /*
-                       PrivateMethod: innerLeftPos
-
-                       Get the offset of the left edge of the content of the box (i.e. excluding
-                       margin, border and padding).
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       innerLeftPos: function () {
-                               return this.offsetLeft()
-                                        + this.val('margin-left')
-                                        + this.val('border-left-width')
-                                        + this.val('padding-left');
-                       },
-
-                       /*
-                       PrivateMethod: innerTopPos
-
-                       Get the offset of the top edge of the content of the box (i.e. excluding
-                       margin, border and padding).
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       innerTopPos: function () {
-                               return this.offsetTop()
-                                        + this.val('margin-top')
-                                        + this.val('border-top-width')
-                                        + this.val('padding-top');
-                       },
-
-                       /*
-                       PrivateMethod: surroundWidth
-
-                       Get the combined width of the horizontal margins, borders and paddings.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       surroundWidth: function () {
-                               return this.val('border-left-width')
-                                        + this.val('padding-left')
-                                        + this.val('padding-right')
-                                        + this.val('border-right-width');
-                       },
-
-                       /*
-                       PrivateMethod: surroundHeight
-
-                       Get the combined height of the horizontal margins, borders and paddings.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       surroundHeight: function () {
-                               return this.val('border-top-width')
-                                        + this.val('padding-top')
-                                        + this.val('padding-bottom')
-                                        + this.val('border-bottom-width');
-                       },
-
-                       /*
-                       PrivateMethod: verticalCenter
-
-                       Get the vertical offset of the center of the element from it's offset parent.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       verticalCenter: function () {
-                               return this.offsetTop() + (this.outerHeight() / 2);
-                       },
-
-                       /*
-                       PrivateMethod: verticalCenter
-
-                       Get the vertical offset of the center of the element from it's offset parent.
-
-                       Returns:
-                               An integer number of pixels.
-                       */
-
-                       horizontalCenter: function () {
-                               return this.offsetTop() + (this.outerWidth() / 2);
-                       }
-
-               };
-
-               for (var i in Box.prototype) {
-                       if (i == 'val') memoizeNamed(Box, i);
-                       else memoize(Box, i);
-               }
-
-               glow.lang.apply(Box.prototype, {
-
-                       /*
-                       PrivateMethod: resetPosition
-
-                       Reset cached position values for the element.
-                       */
-
-                       resetPosition: function () {
-                               reset(this, [
-                                       'offsetTop',
-                                       'offsetLeft',
-                                       'borderTopPos',
-                                       'borderLeftPos',
-                                       'innerTopPos',
-                                       'innerLeftPos',
-                                       'verticalCenter',
-                                       'horizontalCenter'
-                               ]);
-                       },
-
-                       /*
-                       PrivateMethod: setLogicalBottom
-
-                       Set the logical value for the position of the bottom of the border (offsetTop + offsetHeight).
-
-                       Arguments:
-
-                               *bottom* (integer)
-
-                               The value to use for the bottom of the box.
-                       */
-                       setLogicalBottom: function (bottom) {
-                               this._logicalBottom = bottom;
-                       },
-
-                       /*
-                       PrivateMethod: boundsFor
-
-                       Get the the bounds for the left and top css properties of a child box to
-                       ensure that it stays within this element.
-
-                       Arguments:
-
-                               *childBox* (Box)
-
-                               A Box object representing the space taken up by the child element.
-
-                       Returns:
-                               An array of top, right, bottom and left pixel bounds for the top and left
-                               css properties of the child element.
-                       */
-
-                       boundsFor: function (childBox) {
-                               var top, left, pos = this.el.css('position');
-                               if (pos != 'static') {
-                                   top = left = 0;
-                               }
-                               else {
-                                       top = this.innerTopPos();
-                                       left = this.innerLeftPos();
-                               }
-                               return [
-                                       top,                                                                               // top
-                                       left + this.width() - childBox.outerWidth(),   // right
-                                       top  + this.height() - childBox.outerHeight(), // bottom
-                                       left                                                                               // left
-                               ];
-                       },
-
-                       /*
-                       PrivateMethod: outerBounds
-
-                       Get the top, right, bottom and left offsets of the outside edge of the border
-                       of the box.
-
-                       Returns:
-                               An array of integer pixel offsets for the top, right, bottom, left edges of the
-                               boxes border.
-                       */
-
-                       outerBounds: function () {
-                               var offset = this.el.offset(),
-                                       left = offset.left,
-                                       top = offset.top;
-                               return [
-                                       top,
-                                       left + this.borderWidth(),
-                                       top + this.borderHeight(),
-                                       left
-                               ];
-                       },
-
-                       /*
-                       PrivateMethod: intersectSize
-
-                       Get the intersection of this box with another box.
-
-                       Arguments:
-
-                               *that* (Box)
-
-                               A Box object to test for intersection with this box.
-
-                               *touches* (boolean)
-
-                               If true, then the boxes don't have to intersect but can merely touch.
-
-                       Returns:
-                               An integer number of square pixels that the the outside of the
-                               edge of the border of this box intersects with that of the passed
-                               in box.
-                       */
-
-                       intersectSize: function (that, touches) {
-                               var a = this.outerBounds(), b = that.outerBounds();
-                               
-                               if (touches) {
-                                       a[1]++; b[1]++; a[2]++; b[2]++;
-                               }
-                               return (
-                                       a[2] < b[0] ? 0 :
-                                       b[2] < a[0] ? 0 :
-                                       a[0] < b[0] ? (a[2] < b[2] ? a[2] - b[0] : b[2] - b[0]) :
-                                       b[2] < a[2] ? b[2] - a[0] : a[2] - a[0]
-                               ) * (
-                                       a[1] < b[3] ? 0 :
-                                       b[1] < a[3] ? 0 :
-                                       a[3] < b[3] ? (a[1] < b[1] ? a[1] - b[3] : b[1] - b[3]) :
-                                       b[1] < a[1] ? b[1] - a[3] : a[1] - a[3]
-                               );
-                       },
-
-                       /*
-                       PrivateMethod: sizePlaceholder
-
-                       Size and position a placeholder/drop indicator element to match that
-                       of the element.
-
-                       Arguments:
-
-                               *placeholder* (glow.dom.NodeList)
-
-                               The element that will be sized.
-
-                               *pos* (optional string)
-
-                               The value for the placeholder's CSS position. Defaults to the position
-                               of this element.
-
-                               *startLeft* (integer)
-
-                               The original left position of the element.
-
-                               *startTop* (integer)
-
-                               The original top position of the element.
-                       */
-
-                       sizePlaceholder: function (placeholder, pos, startLeft, startTop) {
-                               var placeholderBox = new Box(placeholder),
-                                       el = this.el,
-                                       position = pos || el.css('position');
-                               
-                               placeholder.css('display', 'none');
-                               
-                               el.after(placeholder);
-                               
-                               placeholder.css('width', (el[0].offsetWidth - placeholderBox.surroundWidth()) + 'px')
-                                       .css('height', (el[0].offsetHeight - placeholderBox.surroundHeight()) + 'px');
-                               
-                               // copy margin values
-                               copyMargins(placeholder, el);
-                               
-                               placeholder.remove();
-                               
-                               placeholder.css('display', 'block');
-                               
-                               if (position != 'static') {
-                                       placeholder.css('left', startLeft + 'px');
-                                       placeholder.css('top', startTop + 'px');
-                               }
-                               placeholder.css('position', position);
-                       },
-
-                       /*
-                       PrivateMethod: contains
-
-                       Check if a box is contained within this box.
-
-                       Arguments:
-
-                               *box* (Box)
-
-                               The box to test.
-
-                       Returns:
-                               Boolean, true if contained.
-                       */
-
-                       contains: function (box) {
-                               var bounds = this.boundsFor(box),
-                                       position = box.el.position(),
-                                       top = position.top,
-                                       left = position.left;
-                               
-                               return top  >= bounds[0]  // top
-                                       && left <= bounds[1]  // right
-                                       && top  <= bounds[2]  // bottom
-                                       && left >= bounds[3]; // left
-                       },
-
-                       /*
-                       PrivateMethod: containsPoint
-
-                       Arguments:
-
-                               *offset* (object)
-
-                               The offset to check - an object containing x and y integer pixel values.
-
-                       Returns:
-                               Boolean, true if the point over the visible part of the element (i.e. including the borders).
-                       */
-
-                       containsPoint: function (offset) {
-                               var elementOffset = this.el.offset();
-                               return offset.x >= elementOffset.left
-                                       && offset.y >= elementOffset.top
-                                       && offset.x <= elementOffset.left + this.borderWidth()
-                                       && offset.y <= elementOffset.top  + this.borderHeight();
-                       },
-
-                       /*
-                       PrivateMethod: positionedAncestorBox
-
-                       Get a new Box for nearest ancestor of the element that has position 'absolute', 'fixed' or 'relative'.
-
-                       Returns:
-                               An integer pixel offset.
-                       */
-
-                       positionedAncestorBox: function () {
-                               var el = this.el.parent(), pos;
-                               while (el[0]) {
-                                       pos = el.css('position') || 'static';
-                                       if (pos == 'relative' || pos == 'absolute' || pos == 'fixed')
-                                               return new Box(el);
-                                       el = el.parent();
-                               }
-                               return null;
-                       }
-               });
-
-               function placeholderElement (el) {
-                       var tag = el[0].tagName.toLowerCase() == 'li' ? 'li' : 'div';
-                       var placeholder = create('<' + tag + '></' + tag + '>');
-                       if (tag == 'li') placeholder.css('list-style-type', 'none');
-                       return placeholder;
-               }
-
-               /**
-               @name glow.dragdrop.Draggable
-               @class
-               @description An element that can be dragged using the mouse.
-               @see <a href="../furtherinfo/dragdrop/draggables.shtml">Draggable examples</a>
-
-               @param {String | Element | glow.dom.NodeList} element The element or CSS selector for an element to be made draggable.
-
-                       If a {@link glow.dom.NodeList NodeList} or CSS selector matching
-                       multiple elements is passed only the first element is made draggable.
-
-               @param {Object} [opts]
-
-                       An object of options.
-
-                       The opts object allows you to pass in functions to use as event
-                       listeners. This is purely for convenience, you can also use
-                       {@link glow.events.addListener} to add them the normal way.
-
-               @param {String} [opts.placeholder=spacer] Defines what to leave in place of the draggable whilst being dragged.
-
-                       Possible values for this param are:
-
-                       <dl>
-                       <dt>spacer</dt><dd>an empty div is created where the draggable started.</dd>
-                       <dt>clone</dt><dd>an exact clone of the original element.</dd>
-                       <dt>none</dt><dd>no placeholder will be created.</dd>
-                       </dl>
-
-               @param {String} [opts.placeholderClass=glow-dragdrop-placeholder] A class be applied to the placeholder element.
-
-                       This can be used to to add styling for indicating where the element
-                       has been dragged from, add opacity, etc.
-
-               @param {Selector | Element | glow.dom.NodeList} [opts.handle] Restrict the drag 'handle' to an element within the draggable.
-
-               @param {Selector | Element | glow.dom.NodeList} [opts.container] Constrain dragging to within the bounds of the specified element.
-
-               @param {Array} [opts.dropTargets] An array of {@link glow.dragdrop.DropTarget DropTargets}.
-
-                       Specifies which {@link glow.dragdrop.DropTarget DropTargets} this draggable is associated with.
-
-               @param {String} [opts.axis] Restrict dragging to an axis.
-
-                       Possible values for this param are:
-
-                       <dl>
-                       <dt>x</dt><dd>Restricts dragging to the x-axis</dd>
-                       <dt>y</dt><dd>Restricts dragging to the y-axis</dd>
-                       </dl>
-
-               @param {String[]} [opts.dragPrevention=input, textarea, button, select, option, a] Disables dragging from the specified array of element names
-
-                       By default dragging will not work when the user clicks in form
-                       elements, otherwise these elements would be unusable.
-                       
-               @param {Number|Object} [opts.step=1] The pixel interval the draggable snaps to.
-                       If a number, the draggable will step by that number of pixels on the x and y axis. You
-                       can provide an object in the form <code>{x:2, y:4}</code> to set different steps to each
-                       axis.
-
-               @param {Function} [opts.onDrag] An event listener that fires when the draggable starts being dragged.
-
-               @param {Function} [opts.onEnter] An event listener that fires when the draggable is dragged over a drop target.
-
-               @param {Function} [opts.onLeave] An event listener that fires when the draggable is dragged out of a drop target.
-
-               @param {Function} [opts.onDrop] An event listener that fires when the draggable is dropped.
-               
-               @param {Function} [opts.onAfterDrop] An event listener that fires after the element has dropped, including any animations
-
-                       The default action is to animate the draggable back to it's start
-                       position. This can be cancelled by returning false from the listener
-                       or calling {@link glow.events.Event.preventDefault} on the
-                       {@link glow.events.Event} param.
-                       
-               @example
-                       // create a draggable element with a corresponding DropTarget,
-                       // container and two event listeners
-                       var myDraggable = new glow.dragdrop.Draggable('#draggable', {
-                               dropTargets : [ myDropTarget ],
-                               container : '#container',
-                               onDrag : function () {
-                                       this.element.css('opacity', '0.7');
-                               },
-                               onDrop : function () {
-                                       this.element.css('opacity', '1');
-                               }
-                       });
-       */
-       /**
-               @name glow.dragdrop.Draggable#event:drag
-               @event
-               @description Fired when the draggable starts being dragged.
-
-                       Concelling this event results in the user being unable to pick up
-                       the draggable.
-               
-               @param {glow.events.Event} event Event Object
-       */
-       /**
-               @name glow.dragdrop.Draggable#event:enter
-               @event
-               @description Fired when the draggable is dragged over a drop target.
-               @param {glow.events.Event} event Event Object
-       */
-       /**
-               @name glow.dragdrop.Draggable#event:leave
-               @event
-               @description Fired when the draggable is dragged out of a drop target.
-               @param {glow.events.Event} event Event Object
-       */
-       /**
-               @name glow.dragdrop.Draggable#event:drop
-               @event
-               @description Fired when the draggable is dropped.
-               @param {glow.events.Event} event Event Object
-       */
-       /**
-               @name glow.dragdrop.Draggable#event:afterDrop
-               @event
-               @description Fired after the element has dropped, including any animations
-               @param {glow.events.Event} event Event Object
-       */
-               r.Draggable = function (el, opts) {
-
-                       /**
-                       @name glow.dragdrop.Draggable#element
-                       @type glow.dom.NodeList
-                       @description glow.dom.NodeList containing the draggable element
-                       */
-                       this.element = $(el);
-                       this._opts = opts = glow.lang.apply({
-                               dragPrevention   : ['input', 'textarea', 'button', 'select', 'option', 'a'],
-                               placeholder          : 'spacer',
-                               placeholderClass : 'glow-dragdrop-placeholder',
-                               step                     : {x:1, y:1}
-                       }, opts || {});
-                       
-                       //normalise the step param to an object
-                       if (typeof opts.step == "number") {
-                               opts.step = {x: opts.step, y: opts.step};
-                       } else {
-                               opts.step.x = opts.step.x || 1;
-                               opts.step.y = opts.step.y || 1;
-                       }
-
-                       this._preventDrag = [];
-                       for (var i = 0, l = opts.dragPrevention.length; i < l; i++) {
-                               this._preventDrag[i] = opts.dragPrevention[i].toLowerCase();
-                       }
-
-                       if (opts.container) { this.container = $(opts.container); }
-                       this._handle = opts.handle && this.element.get(opts.handle) || this.element;
-
-                       if (opts.dropTargets) this.dropTargets = $(opts.dropTargets);
-
-                               //used for IE literal edge case bug fix
-                               //this._mouseUp = true;
-                               //bug fix to get document.body.scrollTop to return true value (not 0) if using transitional 4.01 doctype
-                               //get('body')[0].style.overflow = 'auto';
-                               //this._opts = o, this._targetCoords = [], this.isOverTarget = false;
-
-                       var listeners = this._listeners = [],
-                               i = 0;
-
-                       if (opts.onDrag)  listeners[i++] = addListener(this, 'drag',  this._opts.onDrag,  this);
-                       if (opts.onEnter) listeners[i++] = addListener(this, 'enter', this._opts.onEnter, this);
-                       if (opts.onLeave) listeners[i++] = addListener(this, 'leave', this._opts.onLeave, this);
-                       if (opts.onDrop)  listeners[i++] = addListener(this, 'drop',  this._opts.onDrop,  this);
-
-                       this._dragListener = addListener(this._handle, 'mousedown', this._startDragMouse, this);
-
-                       return;
-               };
-
-
-               /*
-               Group: Methods
-               */
-
-               //var applyFloatBugfix = glow.env.ie;
-
-               r.Draggable.prototype = {
-
-                       /*
-                       PrivateMethod: _createPlaceholder
-
-                       Create an element that occupies the space where the draggable has been dragged from.
-                       */
-
-                       _createPlaceholder: function () {
-                               var el = this.element,
-                                       placeholder,
-                                       box = this._box;
-
-                               if (this._opts.placeholder == 'clone') {
-                                       placeholder = el.clone();
-                               }
-                               else { // placeholder == 'spacer'
-                                       placeholder = placeholderElement(el);
-                               }
-                               if (this._opts.placeholderClass) {
-                                       placeholder.addClass(this._opts.placeholderClass);
-                               }
-                               box.sizePlaceholder(placeholder, null, this._startLeft, this._startTop);
-                               el.after(placeholder);
-                               this._placeholder = placeholder;
-                       },
-
-                       /*
-                       PrivateMethod: _removePlaceholder
-
-                       Removes the placeholder (see above) from the document.
-                       */
-
-                       _removePlaceholder: function () {
-                               this._placeholder.remove();
-                       },
-
-                       /*
-                       PrivateMethod: _resetPosition
-
-                       Sets the position CSS property to what it started as without moving the draggable. If the
-                       original position was 'static' and making it 'static' again would mean moving the draggable,
-                       then the position is set to 'relative'.
-                       */
-
-                       _resetPosition: function () {
-                               var origPos = this._preDragPosition,
-                                       el = this.element,
-                                       box = this._box,
-                                       startOffset = this._startOffset,
-                                       pos = el.css('position'),
-                                       newLeft,
-                                       newTop;
-                               
-                               box.resetPosition();
-                               
-                               var position = box.el.position(),
-                                       offset = {
-                                               x: position.left,
-                                               y: position.top
-                                       };
-
-                               if (this._placeholder || this._dropIndicator) {
-                                       el.remove();
-                               }
-                               
-                               if (origPos == 'static' && offset.y == startOffset.y && offset.x == startOffset.x) {
-                                       el.css('position', 'static');
-                                       el.css('left', '');
-                                       el.css('top', '');
-                               }
-                               else {
-                                       el.css('z-index', this._preDragZIndex);
-                                       el.css('position', origPos == 'static' ? 'relative' : origPos);
-                                       if (origPos == 'static') {
-                                               newLeft = offset.x - startOffset.x;
-                                               newTop = offset.y - startOffset.y;
-                                       }
-                                       else if (origPos == 'relative' && pos != 'relative') {
-                                               newLeft = this._startLeft + (offset.x - startOffset.x);
-                                               newTop = this._startTop + (offset.y - startOffset.y);
-                                       }
-                                       if (pos != origPos) {
-                                               el.css('left', newLeft ? newLeft + 'px' : '');
-                                               el.css('top', newTop ? newTop + 'px' : '');
-                                       }
-                               }
-                               if (this._dropIndicator) {
-                                       var parent = this._dropIndicator.parent()[0];
-                                       if (parent)     parent.replaceChild(el[0], this._dropIndicator[0]);
-                                       delete this._dropIndicator;
-                                       if (this._placeholder) {
-                                               this._placeholder.remove();
-                                               delete this._placeholder;
-                                       }
-                                       // this is canceling out some of the stuff done in the if statement above, could be done better
-                                       el.css('position', origPos);
-                                       if (origPos == 'relative' && pos != 'relative') {
-                                               el.css('left', this._startLeft);
-                                               el.css('top', this._startTop);
-                                       }
-                               }
-                               else if (this._placeholder) {
-                                       var parent = this._placeholder.parent()[0];
-                                       if (parent)     parent.replaceChild(el[0], this._placeholder[0]);
-                                       delete this._placeholder;
-                               }
-                       },
-
-                       /*
-                       PrivateFunction: _startDragMouse
-
-                       Start the draggable dragging when the mousedown event is fired.
-
-                       Arguments:
-
-                               *e* (glow.events.Event)
-
-                               The mousedown event that caused the listener to be fired.
-                       */
-
-                       _startDragMouse: function (e) {
-                               var preventDrag = this._preventDrag,
-                                       source = e.source,
-                                       tag = source.tagName.toLowerCase();
-
-                               for (var i = 0, l = preventDrag.length; i < l; i++) {
-                                       if (preventDrag[i] == tag) {
-                                               return;
-                                       }
-                               }
-                               
-                               //fire the drag event
-                               if (fire(this, 'drag').defaultPrevented()) {
-                                       //the default action was prevented, don't do any dragging
-                                       return;
-                               }
-
-                               if (this._dragging == 1)
-                                       return this.endDrag();
-                               else if (this._dragging)
-                                       return;
-
-                               // _dragging set to 1 during drag, 2 while ending drag and back to 0 when ready for new drag
-                               this._dragging = 1;
-
-                               var el = this.element,
-                                       container = this.container,
-                                       opts = this._opts,
-                                       box = this._box = new Box(el),
-                                       step = opts.step;
-
-                               this._preDragPosition = el.css('position');
-                               
-                               var position = box.el.position(), 
-                                       startOffset = this._startOffset = {
-                                               x: position.left,
-                                               y: position.top
-                                       };
-                               
-                               if (container) {
-                                       this._containerBox = new Box(container);
-                                       this._bounds = this._containerBox.boundsFor(box);
-                                       //we may need to decrease the bounds to keep the element in step (if it's using stepped dragging)
-                                       //basically makes the bounding box smaller to fit in with the stepping
-                                       if (step.x != 1) {
-                                               this._bounds[3] -= (this._bounds[3] - startOffset.x) % step.x;
-                                               this._bounds[1] -= (this._bounds[1] - startOffset.x) % step.x;
-                                       }
-                                       if (step.y != 1) {
-                                               this._bounds[0] -= (this._bounds[0] - startOffset.y) % step.y;
-                                               this._bounds[2] -= (this._bounds[2] - startOffset.y) % step.y;
-                                       }
-                               }
-                               else {
-                                       delete this._bounds;
-                               }
-
-                               this._mouseStart = {
-                                       x: e.pageX,
-                                       y: e.pageY
-                               };
-
-                               
-
-                               this._preDragStyle = el.attr('style');
-
-                               this._preDragZIndex = el.css('z-index');
-
-                               el.css('z-index', _zIndex++);
-
-                               this._startLeft = el[0].style.left ? parseInt(el[0].style.left) : 0;
-                               this._startTop = el[0].style.top ? parseInt(el[0].style.top) : 0;
-
-
-                               if (opts.placeholder && opts.placeholder != 'none') {
-                                       this._createPlaceholder();
-                               }
-
-                               el.css('position', 'absolute');
-                               el.css('left', startOffset.x + 'px');
-                               el.css('top', startOffset.y + 'px');
-
-                               if(_ieStrict) {
-                                       this._scrollY = document.documentElement.scrollTop;
-                                       this._innerHeight = document.documentElement.clientHeight;
-                               }
-                               else if(_ieTrans){
-                                       this._scrollY = document.body.scrollTop;
-                                       this._innerHeight = document.body.clientHeight;
-                               }
-                               else {
-                                       this._scrollY = window.scrollY;
-                                       this._innerHeight = window.innerHeight;
-                               }
-
-                               var cancelFunc = function () { return false },
-                                       doc = document.documentElement;
-
-                               if (this.dropTargets) {
-                                       var event = new events.Event();
-                                       event.draggable = this;
-                                       for (var i = 0, l = this.dropTargets.length; i < l; i++) {
-                                               fire(this.dropTargets[i], 'active', event);
-                                       }
-
-                                       this._mousePos = {
-                                               x: e.pageX,
-                                               y: e.pageY
-                                       };
-                                       this._testForDropTargets();
-                               }
-
-                               this._dragListeners = [
-                                       addListener(doc, 'selectstart', cancelFunc),
-                                       addListener(doc, 'dragstart',   cancelFunc),
-                                       addListener(doc, 'mousedown',   cancelFunc),
-                                       addListener(doc, 'mousemove',   this._dragMouse, this),
-                                       addListener(doc, 'mouseup',      this._releaseElement, this)
-                               ];
-                               return false;
-                       },
-
-                       /*
-                       PrivateFunction: _dragMouse
-
-                       Move the draggable when a mousemove event is received.
-
-                       Arguments:
-
-                               *e* (glow.events.Event)
-
-                               The mousedown event that caused the listener to be fired.
-                       */
-
-                       _dragMouse: function (e) {
-                               var element = this.element,
-                                       axis = this._opts.axis,
-                                       //do we need to do axis here, or just not apply the newX/Y if axis is used? May be faster
-                                       newX = axis == 'y' ?
-                                               this._startOffset.x:
-                                               (this._startOffset.x + e.pageX - this._mouseStart.x),
-                                       newY = axis == 'x' ?
-                                               this._startOffset.y:
-                                               (this._startOffset.y + e.pageY - this._mouseStart.y),
-                                       bounds = this._bounds,
-                                       step = this._opts.step;
-                               
-                               
-                               //round position to the nearest step
-                               if (step.x != 1) {
-                                       newX = Math.round((newX - this._startOffset.x) / step.x) * step.x + this._startOffset.x;
-                               }
-                               if (step.y != 1) {
-                                       newY = Math.round((newY - this._startOffset.y) / step.y) * step.y + this._startOffset.y;
-                               }
-                               
-                               // only pay for the function call if we have a container or an axis
-                               if (bounds) {
-                                       // only apply bounds on the axis we're using
-                                       if (axis != 'y') {
-                                               newX = newX < bounds[3] ? bounds[3] : newX > bounds[1] ? bounds[1] : newX;
-                                       }
-                                       if (axis != 'x') {
-                                               newY = newY < bounds[0] ? bounds[0] : newY > bounds[2] ? bounds[2] : newY;
-                                       }
-                               }
-                               
-                               // set the new position
-                               element[0].style.left = newX + 'px';
-                               element[0].style.top = newY + 'px';
-
-                               //if there are dragTargets check if the draggable is over the target
-                               if (this.dropTargets) {
-                                       this._mousePos = { x: e.pageX, y: e.pageY };
-                               }
-                               // check for IE mouseup outside of page boundary
-                               if(_ie && e.nativeEvent.button == 0) {
-                                       this._releaseElement(e);
-                                       return false;
-                               };
-                               return false;
-                       },
-
-                       /*
-                       PrivateFunction: _testForDropTarget
-
-                       Check if the draggable is over a drop target. Sets the activeTarget property of the draggable
-                       to the drop target that the draggable is over, if any.
-
-                       Arguments:
-
-                               *mousePos* (object)
-
-                               The position of the mouse pointer relative to the document. The object has x and y integer
-                               pixel properties.
-                       */
-                       _testForDropTargets: function (fromTimeout) {
-
-                               if (! this._lock) this._lock = 0;
-                               if (fromTimeout) this._lock--;
-                               else if (this.lock) return;
-
-                               if (this._dragging != 1) return;
-
-                               var previousTarget = this.activeTarget,
-                                       activeTarget,
-                                       targets = this.dropTargets,
-                                       target,
-                                       targetBox,
-                                       box = this._box,
-                                       mousePos = this._mousePos;
-
-                               box.resetPosition();
-
-                               var maxIntersectSize = 0;
-                               for (var i = 0, l = targets.length; i < l; i++) {
-                                       target = targets[i];
-                                       targetBox = target._box;
-                                       if (target._opts.tolerance == 'contained') {
-                                               if (targetBox.contains(box)) {
-                                                       activeTarget = target;
-                                                       break;
-                                               }
-                                       }
-                                       else if (target._opts.tolerance == 'cursor') {
-                                               if (targetBox.containsPoint(mousePos)) {
-                                                       activeTarget = target;
-                                                       break;
-                                               }
-                                       }
-                                       else {
-                                               var intersectSize = targetBox.intersectSize(box, true);
-                                               if (intersectSize > maxIntersectSize) {
-                                                       maxIntersectSize = intersectSize;
-                                                       activeTarget = target;
-                                               }
-                                       }
-                               }
-                               this.activeTarget = activeTarget;
-
-                               // enter events
-                               if (activeTarget !== previousTarget) {
-                                       if (activeTarget) {
-                                               // enter on the target
-                                               var draggableEnterEvent = new events.Event();
-                                               draggableEnterEvent.draggable = this;
-                                               fire(activeTarget, 'enter', draggableEnterEvent);
-
-                                               // enter on this (the draggable)
-                                               var enterTargetEvent = new events.Event();
-                                               enterTargetEvent.dropTarget = activeTarget;
-                                               fire(this, 'enter', enterTargetEvent);
-                                       }
-
-                                       if (previousTarget) {
-                                               // leave on target
-                                               var draggableLeaveEvent = new events.Event();
-                                               draggableLeaveEvent.draggable = this;
-                                               fire(previousTarget, 'leave', draggableLeaveEvent);
-
-                                               // leave on this (draggable)
-                                               var leaveTargetEvent = new events.Event();
-                                               leaveTargetEvent.dropTarget = previousTarget;
-                                               fire(this, 'leave', leaveTargetEvent);
-                                       }
-                               }
-                               // place the drop indicator in the drop target (not in the drop target class for speed)
-                               if (activeTarget && activeTarget._opts.dropIndicator != 'none') {
-                                       var childBox,
-                                               childBoxes = activeTarget._childBoxes,
-                                               children = activeTarget._children;
-                                       box.resetPosition();
-                                       var totalHeight = activeTarget._box.innerTopPos();
-                                       var draggablePosition = mousePos.y - box.offsetParentPageTop();
-                                       var placed = 0;
-                                       for (var i = 0, l = childBoxes.length; i < l; i++) {
-                                               if (children[i] == this.element[0]) continue;
-                                               childBox = childBoxes[i];
-                                               totalHeight += childBox.outerHeight();
-                                               if (draggablePosition <= totalHeight) {
-                                                       if (activeTarget._dropIndicatorAt != i) {
-                                                               $(childBox.el).before(activeTarget._dropIndicator);
-                                                               activeTarget._dropIndicatorAt = i;
-                                                       }
-                                                       placed = 1;
-                                                       break;
-                                               }
-                                       }
-                                       if (! placed) {
-                                               if (childBox) {
-                                                       $(childBox.el).after(activeTarget._dropIndicator);
-                                                       activeTarget._dropIndicatorAt = i + 1;
-                                               }
-                                               else {
-                                                       activeTarget.element.append(activeTarget._dropIndicator);
-                                                       activeTarget._dropIndicatorAt = 0;
-                                               }
-                                       }
-                               }
-
-                               this._lock++;
-                               var this_ = this;
-                               setTimeout(function () { this_._testForDropTargets(1) }, 100);
-                       },
-
-                       /*
-                       PrivateMethod: releaseElement
-
-                       Finish the drag when a mouseup event is recieved.
-
-                       Arguments:
-
-                               *e* (glow.events.Event)
-
-                               The mouseup event that caused the listener to be fired.
-                       */
-
-                       _releaseElement: function () {
-                               if (this._dragging != 1) return;
-                               this._dragging = 2;
-
-                               var i, l;
-
-                               //call the onInactive function on all the dropTargets for this draggable
-                               var dropTargets = this.dropTargets,
-                                       activeTarget = this.activeTarget;
-
-                               if (dropTargets) {
-                                       for (i = 0, l = dropTargets.length; i < l; i++) {
-                                               var event = new events.Event();
-                                               event.draggable = this;
-                                               event.droppedOnThis = activeTarget && activeTarget == dropTargets[i];
-                                               fire(dropTargets[i], 'inactive', event);
-                                       }
-                               }
-
-                               if (activeTarget) {
-                                       var event = new events.Event();
-                                       event.draggable = this;
-                                       fire(activeTarget, 'drop', event);
-                               }
-
-                               var dragListeners = this._dragListeners;
-                               for (i = 0, l = dragListeners.length; i < l; i++) {
-                                       events.removeListener(dragListeners[i]);
-                               }
-
-                               var dropEvent = fire(this, "drop");
-                               if (! dropEvent.defaultPrevented() && this.dropTargets) {
-                                       this.returnHome();
-                               }
-                               else {
-                                       this.endDrag();
-                               }
-
-                       },
-
-                       /*
-                       Method: endDrag
-
-                       Finishes dragging the draggable. Removes the placeholder (if any) and resets the position CSS property
-                       of the draggable.
-
-                       TODO - revist this code example
-
-                       N.B. This is called by default but if you overwrite the onDrop function then you will have to call it youoriginal
-                       (code)
-                       // empty NodeList
-                       var myDraggable = new glow.dragdrop.Draggable('#draggable', {
-                               onDrop = function(e){
-                                       do some stuff that takes a while.....
-                                       this.endDrag();
-                                       false;
-                               }
-                       });
-                       (end)
-                       */
-
-                       endDrag: function(){
-                               if (this._dragging != 2) return;
-                               this._dragging = 0;
-
-                               //remove any helpers/placeholders
-                               
-                               if (this._reset) {
-                                       this._reset();
-                                       delete this._reset;
-                               }
-                               
-                               if (this.placeholder) {
-                                       this.placeholder.remove();
-                               }
-                               this._resetPosition();
-                               delete this.activeTarget;
-                               fire(this, "afterDrop");
-                       },
-
-                       /*
-                       Event: returnHome
-
-                       Animates the Draggable back to it's start position and calls endDrag() at the end of the
-                       transition. This is called by default when the Draggable, that has a DragTarget, is dropped.
-                       However if you override the default onDrop function you may want to call this function your
-                       original
-
-                       Arguments
-                               tween (function)
-                               The animation you wish to used for easing the Draggable. See <glow.tweens>. This is optional, the default is a linear tween. e.g. glow.tweens.easeboth
-                       */
-
-                       returnHome: function(tween){
-                               var mytween = (tween) ? tween : glow.tweens.linear(),
-                                       leftDestination,
-                                       topDestination,
-                                       el = this.element,
-                                       position = this._box.el.position(),
-                                       distance = Math.pow(
-                                               Math.pow(this._startOffset.x - position.left, 2)
-                                               + Math.pow(this._startOffset.y - position.top, 2),
-                                               0.5
-                                       ),
-                                       duration = 0.3 + (distance / 1000);
-                               
-                               var channels = [[
-                                       glow.anim.css(el, duration, {
-                                               left: this._startOffset.x,
-                                               top : this._startOffset.y
-                                       }, { tween: mytween })
-                               ]];
-
-                               if (this._dropIndicator) {
-                                       channels.push([glow.anim.css(this._dropIndicator, duration - 0.1, { opacity: { to: 0 } })]);
-                               }
-
-                               var timeline = new glow.anim.Timeline(channels);
-                               addListener(timeline, 'complete', function () {
-                                       this.endDrag();
-                               }, this);
-                               timeline.start();
-                               return;
-                       }
-               };
-
-
-               var dropTargetId = 0;
-
-               /**
-               @name glow.dragdrop.DropTarget
-               @class
-               @description An element that can react to Draggables.
-               @see <a href="../furtherinfo/dragdrop/droptargets.shtml">DropTarget examples</a>
-
-               @param {String | Element | glow.dom.NodeList} element The element or CSS selector for an element to be made droppable.
-
-                       If a {@link glow.dom.NodeList NodeList} or CSS selector matching
-                       multiple elements is passed only the first element is made droppable.
-
-               @param {Object} [opts]
-
-                       An object of options.
-
-                       The opts object allows you to pass in functions to use as event
-                       listeners. This is purely for convenience, you can also use
-                       {@link glow.events.addListener} to add them the normal way.
-
-               @param {String} [opts.tolerance=intersect] The point at which the target becomes active when a draggable moves over it.
-
-                       Possible values for this param are:
-
-                       <dl>
-                       <dt>intersect</dt><dd>The target becomes active as soon as any part of the draggable is over the target.</dd>
-                       <dt>cursor</dt><dd>The target becomes active when the cursor is over the target.</dd>
-                       <dt>contained</dt><dd>The target only becomes active once the whole draggable is within the target.</dd>
-                       </dl>
-
-               @param {String} [opts.dropIndicator=none] Whether to create an element when a Draggable is over the DropTarget.
-
-                       Possible values for this param are:
-
-                       <dl>
-                       <dt>spacer</dt><dd>an empty div will be added to the drop target to indicate where the Draggable will be dropped.</dd>
-                       <dt>none</dt><dd>no drop indicator will be created.</dd>
-                       </dl>
-
-               @param {String} [opts.dropIndicatorClass=glow-dragdrop-dropindicator] The class apply to the dropIndicator element.
-
-                       This is useful if you want to style the drop indicator.
-
-               @param {Function} [opts.onEnter] An event listener to fire when an associated Draggable is dragged over the drop target.
-
-               @param {Function} [opts.onLeave] An event listener to fire when an associated Draggable is dragged out of the drop target.
-
-               @param {Function} [opts.onDrop] An event listener to fire when an associated Draggable is dropped on the drop target.
-
-               @param {Function} [opts.onActive] An event listener to fire when an associated Draggable starts being dragged.
-
-               @param {Function} [opts.onInactive] An event listener to fire when an associated Draggable stops being dragged.
-               
-               @example
-                       var myDropTarget = new glow.dragdrop.DropTarget('#dropTarget', {
-                               onActive: function(e){
-                                               this.element.css('border', '2px solid blue');
-                               },
-                               onInactive: function(e){
-                                               this.element.css('border', '');
-                                               this.element.css('opacity', '1');
-                               },
-                               onEnter: function(e){
-                                               this.element.css('opacity', '0.2');
-                               },
-                               onLeave: function(e){
-                                               this.element.css('opacity', '1');
-                               },
-                               onDrop: function(e){
-                                               this.element.css('backgroundColor', 'green');
-                               }
-                       });
-               */
-               /**
-               @name glow.dragdrop.DropTarget#event:active
-               @event
-               @description Fired when a draggable linked to this drop target starts being dragged.
-               @param {glow.events.Event} event Event Object
-               */
-               /**
-               @name glow.dragdrop.DropTarget#event:inactive
-               @event
-               @description Fired when a draggable linked to this drop target stops dragging.
-               @param {glow.events.Event} event Event Object
-               */
-               /**
-               @name glow.dragdrop.DropTarget#event:enter
-               @event
-               @description Fired when a draggable linked to this drop target is dragged over the target.
-               @param {glow.events.Event} event Event Object
-               */
-               /**
-               @name glow.dragdrop.DropTarget#event:leave
-               @event
-               @description Fired when a draggable linked to this drop target is dragged out of the target.
-               @param {glow.events.Event} event Event Object
-               */
-               /**
-               @name glow.dragdrop.DropTarget#event:drop
-               @event
-               @description Fired when a draggable linked is dropped on this drop target.
-               @param {glow.events.Event} event Event Object
-               */
-               r.DropTarget = function(el, opts) {
-                       /**
-                       @name glow.dragdrop.DropTarget#element
-                       @type glow.dom.NodeList
-                       @description glow.dom.NodeList containing the draggable element
-                       */
-                       el = this.element = $(el);
-                       if (! el.length) throw 'no element passed into DropTarget constuctor';
-                       if (el.length > 1) throw 'more than one element passed into DropTarget constructor';
-
-                       // id is for indexing drop targets in an object for getting to them quickly
-                       this._id = ++dropTargetId;
-
-                       this._opts = opts = glow.lang.apply({
-                               dropIndicator      : 'none',
-                               dropIndicatorClass : 'glow-dragdrop-dropindicator',
-                               tolerance          : 'intersect'
-                       }, opts || {});
-
-                       if (opts.onActive)   addListener(this, 'active',   opts.onActive);
-                       if (opts.onInactive) addListener(this, 'inactive', opts.onInactive);
-                       if (opts.onEnter)        addListener(this, 'enter',     opts.onEnter);
-                       if (opts.onLeave)        addListener(this, 'leave',     opts.onLeave);
-                       if (opts.onDrop)         addListener(this, 'drop',       opts.onDrop);
-
-                       addListener(this, 'active', this._onActive);
-                       addListener(this, 'inactive', this._onInactive);
-
-                       return this;
-               };
-
-
-               r.DropTarget.prototype = {
-
-                       /*
-                       Method: setLogicalBottom(height)
-
-                       Set a bottom pos to use for detecting if a draggable is over the drop target to use
-                       other than the actual bottom of the drop target (offsetTop + offsetHeight).
-
-                       Arguments:
-
-                               *bottom* (integer)
-
-                               The number of pixels to use for the bottom of the drop target.
-                       */
-                       setLogicalBottom: function (bottom) {
-                               this._logicalBottom = bottom;
-                       },
-
-                       /*
-                       PrivateMethod: _onActive
-
-                       Respond to an associated draggable when it starts to be dragged.
-
-                       Arguments:
-
-                               *e* (glow.events.Event)
-
-                               The active event that caused the event listener to be fired.
-                       */
-
-                       _onActive: function (e) {
-                               var draggable = e.draggable;
-
-                               this._box = new Box(this.element);
-                               if (this._logicalBottom) this._box.setLogicalBottom(this._logicalBottom);
-
-                               if (this._opts.dropIndicator == 'none') return;
-
-                               this._onEnterListener = addListener(this, 'enter', this._onEnter);
-                               this._onLeaveListener = addListener(this, 'leave', this._onLeave);
-
-                               this._dropIndicator = placeholderElement(draggable.element);
-
-                               if (this._opts.dropIndicatorClass) {
-                                       this._dropIndicator.addClass(this._opts.dropIndicatorClass);
-                               }
-                               draggable._box.sizePlaceholder(this._dropIndicator, 'relative', 0, 0);
-
-
-                               var children = this._children = $(this.element.children()).filter(function () {
-                                       var el = $(this);
-                                       return (! e.draggable._placeholder || ! el.eq(e.draggable._placeholder))
-                                               && (! this._dropIndicator || ! el.eq(this._dropIndicator));
-                               });
-                               var childBoxes = this._childBoxes = [];
-                               children.each(function (i) {
-                                       childBoxes[i] = new Box($(children[i]));
-                               });
-                       },
-
-                       /*
-                       PrivateMethod: _onInactive
-
-                       Respond to an associated draggable when it finishes being dragged.
-
-                       Arguments:
-
-                               *e* (glow.events.Event)
-
-                               The inactive event that caused the event listener to be fired.
-                       */
-
-                       _onInactive: function (e) {
-                               removeListener(this._onEnterListener);
-                               removeListener(this._onLeaveListener);
-
-                               delete this._box;
-
-                               if (this._opts.dropIndicator == 'none') return;
-
-                               if (! e.droppedOnThis && this._dropIndicator) {
-                                       this._dropIndicator.remove();
-                                       delete this._dropIndicator;
-                               }
-                               delete this._childBoxes;
-                               delete this._children;
-                       },
-
-                       /*
-                       PrivateMethod: _onEnter
-
-                       Respond to an associated draggable being dragged over the drop target.
-
-                       Arguments:
-
-                               *e* (glow.events.Event)
-
-                               The enter event that caused the event listener to be fired.
-                       */
-
-                       _onEnter: function () {
-                               this._dropIndicatorAt = -1;
-                       },
-
-                       /*
-                       PrivateMethod: _onLeave
-
-                       Respond to an associated draggable being dragged out of the drop target.
-
-                       Arguments:
-
-                               *e* (glow.events.Event)
-
-                               The leave event that caused the event listener to be fired.
-                       */
-
-                       _onLeave: function () {
-                               this._dropIndicator.remove();
-                       },
-
-                       /*
-                       Method: moveToPosition
-
-                       Insert the draggable's element within the drop target where the drop indicator currently is. Sets
-                       the start offset of the drag to the position of the drop indicator so that it will be animated
-                       to it's final location, rather than where the drag started.
-                       */
-
-                       moveToPosition : function (draggable) {
-                               var dropIndicator = this._dropIndicator,
-                                       box = new Box(dropIndicator);
-                               //dropIndicator.after(draggable.element);
-                               var marginLeft = parseInt(dropIndicator.css('margin-left')) || 0,
-                                       marginTop  = parseInt(dropIndicator.css('margin-top')) || 0,
-                                       position = box.el.position();
-                                       
-                               draggable._startOffset = {
-                                       x: position.left,
-                                       y: position.top
-                               };
-                               draggable._dropIndicator = dropIndicator;
-                               delete this._dropIndicator;
-                       }
-
-               }
-               glow.dragdrop = r;
-
-
-       }
-});
-/*@end @*/
diff --git a/ricoClient/js/baselibs/jquery-1.3.js b/ricoClient/js/baselibs/jquery-1.3.js
deleted file mode 100644 (file)
index b1ae21d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * jQuery JavaScript Library v1.3.2
- * http://jquery.com/
- *
- * Copyright (c) 2009 John Resig
- * Dual licensed under the MIT and GPL licenses.
- * http://docs.jquery.com/License
- *
- * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
- * Revision: 6246
- */
-(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
-/*
- * Sizzle CSS Selector Engine - v0.9.3
- *  Copyright 2009, The Dojo Foundation
- *  Released under the MIT, BSD, and GPL Licenses.
- *  More information: http://sizzlejs.com/
- */
-(function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa<ab.length;aa++){if(ab[aa]===ab[aa-1]){ab.splice(aa--,1)}}}}}return ab};F.matches=function(T,U){return F(T,null,null,U)};F.find=function(aa,T,ab){var Z,X;if(!aa){return[]}for(var W=0,V=I.order.length;W<V;W++){var Y=I.order[W],X;if((X=I.match[Y].exec(aa))){var U=RegExp.leftContext;if(U.substr(U.length-1)!=="\\"){X[1]=(X[1]||"").replace(/\\/g,"");Z=I.find[Y](X,T,ab);if(Z!=null){aa=aa.replace(I.match[Y],"");break}}}}if(!Z){Z=T.getElementsByTagName("*")}return{set:Z,expr:aa}};F.filter=function(ad,ac,ag,W){var V=ad,ai=[],aa=ac,Y,T,Z=ac&&ac[0]&&Q(ac[0]);while(ad&&ac.length){for(var ab in I.filter){if((Y=I.match[ab].exec(ad))!=null){var U=I.filter[ab],ah,af;T=false;if(aa==ai){ai=[]}if(I.preFilter[ab]){Y=I.preFilter[ab](Y,aa,ag,ai,W,Z);if(!Y){T=ah=true}else{if(Y===true){continue}}}if(Y){for(var X=0;(af=aa[X])!=null;X++){if(af){ah=U(af,Y,X,aa);var ae=W^!!ah;if(ag&&ah!=null){if(ae){T=true}else{aa[X]=false}}else{if(ae){ai.push(af);T=true}}}}}if(ah!==g){if(!ag){aa=ai}ad=ad.replace(I.match[ab],"");if(!T){return[]}break}}}if(ad==V){if(T==null){throw"Syntax error, unrecognized expression: "+ad}else{break}}V=ad}return aa};var I=F.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(T){return T.getAttribute("href")}},relative:{"+":function(aa,T,Z){var X=typeof T==="string",ab=X&&!/\W/.test(T),Y=X&&!ab;if(ab&&!Z){T=T.toUpperCase()}for(var W=0,V=aa.length,U;W<V;W++){if((U=aa[W])){while((U=U.previousSibling)&&U.nodeType!==1){}aa[W]=Y||U&&U.nodeName===T?U||false:U===T}}if(Y){F.filter(T,aa,true)}},">":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){var W=Y.parentNode;Z[V]=W.nodeName===U?W:false}}}else{for(var V=0,T=Z.length;V<T;V++){var Y=Z[V];if(Y){Z[V]=X?Y.parentNode:Y.parentNode===U}}if(X){F.filter(U,Z,true)}}},"":function(W,U,Y){var V=L++,T=S;if(!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("parentNode",U,V,W,X,Y)},"~":function(W,U,Y){var V=L++,T=S;if(typeof U==="string"&&!U.match(/\W/)){var X=U=Y?U:U.toUpperCase();T=P}T("previousSibling",U,V,W,X,Y)}},find:{ID:function(U,V,W){if(typeof V.getElementById!=="undefined"&&!W){var T=V.getElementById(U[1]);return T?[T]:[]}},NAME:function(V,Y,Z){if(typeof Y.getElementsByName!=="undefined"){var U=[],X=Y.getElementsByName(V[1]);for(var W=0,T=X.length;W<T;W++){if(X[W].getAttribute("name")===V[1]){U.push(X[W])}}return U.length===0?null:U}},TAG:function(T,U){return U.getElementsByTagName(T[1])}},preFilter:{CLASS:function(W,U,V,T,Z,aa){W=" "+W[1].replace(/\\/g,"")+" ";if(aa){return W}for(var X=0,Y;(Y=U[X])!=null;X++){if(Y){if(Z^(Y.className&&(" "+Y.className+" ").indexOf(W)>=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return U<T[3]-0},gt:function(V,U,T){return U>T[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W<T;W++){if(Y[W]===Z){return false}}return true}}}},CHILD:function(T,W){var Z=W[1],U=T;switch(Z){case"only":case"first":while(U=U.previousSibling){if(U.nodeType===1){return false}}if(Z=="first"){return true}U=T;case"last":while(U=U.nextSibling){if(U.nodeType===1){return false}}return true;case"nth":var V=W[2],ac=W[3];if(V==1&&ac==0){return true}var Y=W[0],ab=T.parentNode;if(ab&&(ab.sizcache!==Y||!T.nodeIndex)){var X=0;for(U=ab.firstChild;U;U=U.nextSibling){if(U.nodeType===1){U.nodeIndex=++X}}ab.sizcache=Y}var aa=T.nodeIndex-ac;if(V==0){return aa==0}else{return(aa%V==0&&aa/V>=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V<T;V++){U.push(X[V])}}else{for(var V=0;X[V];V++){U.push(X[V])}}}return U}}var G;if(document.documentElement.compareDocumentPosition){G=function(U,T){var V=U.compareDocumentPosition(T)&4?-1:U===T?0:1;if(V===0){hasDuplicate=true}return V}}else{if("sourceIndex" in document.documentElement){G=function(U,T){var V=U.sourceIndex-T.sourceIndex;if(V===0){hasDuplicate=true}return V}}else{if(document.createRange){G=function(W,U){var V=W.ownerDocument.createRange(),T=U.ownerDocument.createRange();V.selectNode(W);V.collapse(true);T.selectNode(U);T.collapse(true);var X=V.compareBoundaryPoints(Range.START_TO_END,T);if(X===0){hasDuplicate=true}return X}}}}(function(){var U=document.createElement("form"),V="script"+(new Date).getTime();U.innerHTML="<input name='"+V+"'/>";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="<a href='#'></a>";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="<p class='TEST'></p>";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="<div class='test e'></div><div class='test'></div>";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1&&!ac){T.sizcache=Y;T.sizset=W}if(T.nodeName===Z){X=T;break}T=T[U]}ad[W]=X}}}function S(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W<V;W++){var T=ad[W];if(T){if(ab&&T.nodeType===1){T.sizcache=Y;T.sizset=W}T=T[U];var X=false;while(T){if(T.sizcache===Y){X=ad[T.sizset];break}if(T.nodeType===1){if(!ac){T.sizcache=Y;T.sizset=W}if(typeof Z!=="string"){if(T===Z){X=true;break}}else{if(F.filter(Z,[T]).length>0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z<U;Z++){F(T,V[Z],W)}return F.filter(X,W)};o.find=F;o.filter=F.filter;o.expr=F.selectors;o.expr[":"]=o.expr.filters;F.selectors.filters.hidden=function(T){return T.offsetWidth===0||T.offsetHeight===0};F.selectors.filters.visible=function(T){return T.offsetWidth>0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F<E.length){o.event.proxy(G,E[F++])}return this.click(o.event.proxy(G,function(H){this.lastToggle=(this.lastToggle||0)%F;H.preventDefault();return E[this.lastToggle++].apply(this,arguments)||false}))},hover:function(E,F){return this.mouseenter(E).mouseleave(F)},ready:function(E){B();if(o.isReady){E.call(document,o)}else{o.readyList.push(E)}return this},live:function(G,F){var E=o.event.proxy(F);E.guid+=this.selector+G;o(document).bind(i(G,this.selector),this.selector,E);return this},die:function(F,E){o(document).unbind(i(F,this.selector),E?{guid:E.guid+this.selector+F}:null);return this}});function c(H){var E=RegExp("(^|\\.)"+H.type+"(\\.|$)"),G=true,F=[];o.each(o.data(this,"events").live||[],function(I,J){if(E.test(J.type)){var K=o(H.target).closest(J.data)[0];if(K){F.push({elem:K,fn:J})}}});F.sort(function(J,I){return o.data(J.elem,"closest")-o.data(I.elem,"closest")});o.each(F,function(){if(this.fn.call(this.elem,H,this.fn.data)===false){return(G=false)}});return G}function i(F,E){return["live",F,E.replace(/\./g,"`").replace(/ /g,"|")].join(".")}o.extend({isReady:false,readyList:[],ready:function(){if(!o.isReady){o.isReady=true;if(o.readyList){o.each(o.readyList,function(){this.call(document,o)});o.readyList=null}o(document).triggerHandler("ready")}}});var x=false;function B(){if(x){return}x=true;if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);o.ready()},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);o.ready()}});if(document.documentElement.doScroll&&l==l.top){(function(){if(o.isReady){return}try{document.documentElement.doScroll("left")}catch(E){setTimeout(arguments.callee,0);return}o.ready()})()}}}o.event.add(l,"load",o.ready)}o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","),function(F,E){o.fn[E]=function(G){return G?this.bind(E,G):this.trigger(E)}});o(l).bind("unload",function(){for(var E in o.cache){if(E!=1&&o.cache[E].handle){o.event.remove(o.cache[E].handle.elem)}}});(function(){o.support={};var F=document.documentElement,G=document.createElement("script"),K=document.createElement("div"),J="script"+(new Date).getTime();K.style.display="none";K.innerHTML='   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';var H=K.getElementsByTagName("*"),E=K.getElementsByTagName("a")[0];if(!H||!H.length||!E){return}o.support={leadingWhitespace:K.firstChild.nodeType==3,tbody:!K.getElementsByTagName("tbody").length,objectAll:!!K.getElementsByTagName("object")[0].getElementsByTagName("*").length,htmlSerialize:!!K.getElementsByTagName("link").length,style:/red/.test(E.getAttribute("style")),hrefNormalized:E.getAttribute("href")==="/a",opacity:E.style.opacity==="0.5",cssFloat:!!E.style.cssFloat,scriptEval:false,noCloneEvent:true,boxModel:null};G.type="text/javascript";try{G.appendChild(document.createTextNode("window."+J+"=1;"))}catch(I){}F.insertBefore(G,F.firstChild);if(l[J]){o.support.scriptEval=true;delete l[J]}F.removeChild(G);if(K.attachEvent&&K.fireEvent){K.attachEvent("onclick",function(){o.support.noCloneEvent=false;K.detachEvent("onclick",arguments.callee)});K.cloneNode(true).fireEvent("onclick")}o(function(){var L=document.createElement("div");L.style.width=L.style.paddingLeft="1px";document.body.appendChild(L);o.boxModel=o.support.boxModel=L.offsetWidth===2;document.body.removeChild(L).style.display="none"})})();var w=o.support.cssFloat?"cssFloat":"styleFloat";o.props={"for":"htmlFor","class":"className","float":w,cssFloat:w,styleFloat:w,readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",tabindex:"tabIndex"};o.fn.extend({_load:o.fn.load,load:function(G,J,K){if(typeof G!=="string"){return this._load(G)}var I=G.indexOf(" ");if(I>=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H<F;H++){var E=o.data(this[H],"olddisplay");this[H].style.display=E||"";if(o.css(this[H],"display")==="none"){var G=this[H].tagName,K;if(m[G]){K=m[G]}else{var I=o("<"+G+" />").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H<F;H++){this[H].style.display=o.data(this[H],"olddisplay")||""}return this}},hide:function(H,I){if(H){return this.animate(t("hide",3),H,I)}else{for(var G=0,F=this.length;G<F;G++){var E=o.data(this[G],"olddisplay");if(!E&&E!=="none"){o.data(this[G],"olddisplay",o.css(this[G],"display"))}}for(var G=0,F=this.length;G<F;G++){this[G].style.display="none"}return this}},_toggle:o.fn.toggle,toggle:function(G,F){var E=typeof G==="boolean";return o.isFunction(G)&&o.isFunction(F)?this._toggle.apply(this,arguments):G==null||E?this.each(function(){var H=E?G:o(this).is(":hidden");o(this)[H?"show":"hide"]()}):this.animate(t("toggle",3),G,F)},fadeTo:function(E,G,F){return this.animate({opacity:G},E,F)},animate:function(I,F,H,G){var E=o.speed(F,H,G);return this[E.queue===false?"each":"queue"](function(){var K=o.extend({},E),M,L=this.nodeType==1&&o(this).is(":hidden"),J=this;for(M in I){if(I[M]=="hide"&&L||I[M]=="show"&&!L){return K.complete.call(this)}if((M=="height"||M=="width")&&this.style){K.display=o.css(this,"display");K.overflow=this.style.overflow}}if(K.overflow!=null){this.style.overflow="hidden"}K.curAnim=o.extend({},I);o.each(I,function(O,S){var R=new o.fx(J,K,O);if(/toggle|show|hide/.test(S)){R[S=="toggle"?L?"show":"hide":S](I)}else{var Q=S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),T=R.cur(true)||0;if(Q){var N=parseFloat(Q[2]),P=Q[3]||"px";if(P!="px"){J.style[O]=(N||1)+P;T=((N||1)/R.cur(true))*T;J.style[O]=T+P}if(Q[1]){N=((Q[1]=="-="?-1:1)*N)+T}R.custom(T,N,P)}else{R.custom(T,S,"")}}});return true})},stop:function(F,E){var G=o.timers;if(F){this.queue([])}this.each(function(){for(var H=G.length-1;H>=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J<K.length;J++){if(!K[J]()){K.splice(J--,1)}}if(!K.length){clearInterval(n);n=g}},13)}},show:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.show=true;this.custom(this.prop=="width"||this.prop=="height"?1:0,this.cur());o(this.elem).show()},hide:function(){this.options.orig[this.prop]=o.attr(this.elem.style,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(H){var G=e();if(H||G>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})();
\ No newline at end of file
diff --git a/ricoClient/js/baselibs/jquery-1.4.js b/ricoClient/js/baselibs/jquery-1.4.js
deleted file mode 100644 (file)
index a448490..0000000
+++ /dev/null
@@ -1,5999 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://docs.jquery.com/License
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Wed Jan 13 15:23:05 2010 -0500
- */
-(function( window, undefined ) {
-
-// Define a local copy of jQuery
-var jQuery = function( selector, context ) {
-               // The jQuery object is actually just the init constructor 'enhanced'
-               return new jQuery.fn.init( selector, context );
-       },
-
-       // Map over jQuery in case of overwrite
-       _jQuery = window.jQuery,
-
-       // Map over the $ in case of overwrite
-       _$ = window.$,
-
-       // Use the correct document accordingly with window argument (sandbox)
-       document = window.document,
-
-       // A central reference to the root jQuery(document)
-       rootjQuery,
-
-       // A simple way to check for HTML strings or ID strings
-       // (both of which we optimize for)
-       quickExpr = /^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,
-
-       // Is it a simple selector
-       isSimple = /^.[^:#\[\.,]*$/,
-
-       // Check if a string has a non-whitespace character in it
-       rnotwhite = /\S/,
-
-       // Used for trimming whitespace
-       rtrim = /^(\s|\u00A0)+|(\s|\u00A0)+$/g,
-
-       // Match a standalone tag
-       rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
-
-       // Keep a UserAgent string for use with jQuery.browser
-       userAgent = navigator.userAgent,
-
-       // For matching the engine and version of the browser
-       browserMatch,
-       
-       // Has the ready events already been bound?
-       readyBound = false,
-       
-       // The functions to execute on DOM ready
-       readyList = [],
-
-       // The ready event handler
-       DOMContentLoaded,
-
-       // Save a reference to some core methods
-       toString = Object.prototype.toString,
-       hasOwnProperty = Object.prototype.hasOwnProperty,
-       push = Array.prototype.push,
-       slice = Array.prototype.slice,
-       indexOf = Array.prototype.indexOf;
-
-jQuery.fn = jQuery.prototype = {
-       init: function( selector, context ) {
-               var match, elem, ret, doc;
-
-               // Handle $(""), $(null), or $(undefined)
-               if ( !selector ) {
-                       return this;
-               }
-
-               // Handle $(DOMElement)
-               if ( selector.nodeType ) {
-                       this.context = this[0] = selector;
-                       this.length = 1;
-                       return this;
-               }
-
-               // Handle HTML strings
-               if ( typeof selector === "string" ) {
-                       // Are we dealing with HTML string or an ID?
-                       match = quickExpr.exec( selector );
-
-                       // Verify a match, and that no context was specified for #id
-                       if ( match && (match[1] || !context) ) {
-
-                               // HANDLE: $(html) -> $(array)
-                               if ( match[1] ) {
-                                       doc = (context ? context.ownerDocument || context : document);
-
-                                       // If a single string is passed in and it's a single tag
-                                       // just do a createElement and skip the rest
-                                       ret = rsingleTag.exec( selector );
-
-                                       if ( ret ) {
-                                               if ( jQuery.isPlainObject( context ) ) {
-                                                       selector = [ document.createElement( ret[1] ) ];
-                                                       jQuery.fn.attr.call( selector, context, true );
-
-                                               } else {
-                                                       selector = [ doc.createElement( ret[1] ) ];
-                                               }
-
-                                       } else {
-                                               ret = buildFragment( [ match[1] ], [ doc ] );
-                                               selector = (ret.cacheable ? ret.fragment.cloneNode(true) : ret.fragment).childNodes;
-                                       }
-
-                               // HANDLE: $("#id")
-                               } else {
-                                       elem = document.getElementById( match[2] );
-
-                                       if ( elem ) {
-                                               // Handle the case where IE and Opera return items
-                                               // by name instead of ID
-                                               if ( elem.id !== match[2] ) {
-                                                       return rootjQuery.find( selector );
-                                               }
-
-                                               // Otherwise, we inject the element directly into the jQuery object
-                                               this.length = 1;
-                                               this[0] = elem;
-                                       }
-
-                                       this.context = document;
-                                       this.selector = selector;
-                                       return this;
-                               }
-
-                       // HANDLE: $("TAG")
-                       } else if ( !context && /^\w+$/.test( selector ) ) {
-                               this.selector = selector;
-                               this.context = document;
-                               selector = document.getElementsByTagName( selector );
-
-                       // HANDLE: $(expr, $(...))
-                       } else if ( !context || context.jquery ) {
-                               return (context || rootjQuery).find( selector );
-
-                       // HANDLE: $(expr, context)
-                       // (which is just equivalent to: $(context).find(expr)
-                       } else {
-                               return jQuery( context ).find( selector );
-                       }
-
-               // HANDLE: $(function)
-               // Shortcut for document ready
-               } else if ( jQuery.isFunction( selector ) ) {
-                       return rootjQuery.ready( selector );
-               }
-
-               if (selector.selector !== undefined) {
-                       this.selector = selector.selector;
-                       this.context = selector.context;
-               }
-
-               return jQuery.isArray( selector ) ?
-                       this.setArray( selector ) :
-                       jQuery.makeArray( selector, this );
-       },
-
-       // Start with an empty selector
-       selector: "",
-
-       // The current version of jQuery being used
-       jquery: "1.4",
-
-       // The default length of a jQuery object is 0
-       length: 0,
-
-       // The number of elements contained in the matched element set
-       size: function() {
-               return this.length;
-       },
-
-       toArray: function() {
-               return slice.call( this, 0 );
-       },
-
-       // Get the Nth element in the matched element set OR
-       // Get the whole matched element set as a clean array
-       get: function( num ) {
-               return num == null ?
-
-                       // Return a 'clean' array
-                       this.toArray() :
-
-                       // Return just the object
-                       ( num < 0 ? this.slice(num)[ 0 ] : this[ num ] );
-       },
-
-       // Take an array of elements and push it onto the stack
-       // (returning the new matched element set)
-       pushStack: function( elems, name, selector ) {
-               // Build a new jQuery matched element set
-               var ret = jQuery( elems || null );
-
-               // Add the old object onto the stack (as a reference)
-               ret.prevObject = this;
-
-               ret.context = this.context;
-
-               if ( name === "find" ) {
-                       ret.selector = this.selector + (this.selector ? " " : "") + selector;
-               } else if ( name ) {
-                       ret.selector = this.selector + "." + name + "(" + selector + ")";
-               }
-
-               // Return the newly-formed element set
-               return ret;
-       },
-
-       // Force the current matched set of elements to become
-       // the specified array of elements (destroying the stack in the process)
-       // You should use pushStack() in order to do this, but maintain the stack
-       setArray: function( elems ) {
-               // Resetting the length to 0, then using the native Array push
-               // is a super-fast way to populate an object with array-like properties
-               this.length = 0;
-               push.apply( this, elems );
-
-               return this;
-       },
-
-       // Execute a callback for every element in the matched set.
-       // (You can seed the arguments with an array of args, but this is
-       // only used internally.)
-       each: function( callback, args ) {
-               return jQuery.each( this, callback, args );
-       },
-       
-       ready: function( fn ) {
-               // Attach the listeners
-               jQuery.bindReady();
-
-               // If the DOM is already ready
-               if ( jQuery.isReady ) {
-                       // Execute the function immediately
-                       fn.call( document, jQuery );
-
-               // Otherwise, remember the function for later
-               } else if ( readyList ) {
-                       // Add the function to the wait list
-                       readyList.push( fn );
-               }
-
-               return this;
-       },
-       
-       eq: function( i ) {
-               return i === -1 ?
-                       this.slice( i ) :
-                       this.slice( i, +i + 1 );
-       },
-
-       first: function() {
-               return this.eq( 0 );
-       },
-
-       last: function() {
-               return this.eq( -1 );
-       },
-
-       slice: function() {
-               return this.pushStack( slice.apply( this, arguments ),
-                       "slice", slice.call(arguments).join(",") );
-       },
-
-       map: function( callback ) {
-               return this.pushStack( jQuery.map(this, function( elem, i ) {
-                       return callback.call( elem, i, elem );
-               }));
-       },
-       
-       end: function() {
-               return this.prevObject || jQuery(null);
-       },
-
-       // For internal use only.
-       // Behaves like an Array's method, not like a jQuery method.
-       push: push,
-       sort: [].sort,
-       splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
-       // copy reference to target object
-       var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options, name, src, copy;
-
-       // Handle a deep copy situation
-       if ( typeof target === "boolean" ) {
-               deep = target;
-               target = arguments[1] || {};
-               // skip the boolean and the target
-               i = 2;
-       }
-
-       // Handle case when target is a string or something (possible in deep copy)
-       if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
-               target = {};
-       }
-
-       // extend jQuery itself if only one argument is passed
-       if ( length === i ) {
-               target = this;
-               --i;
-       }
-
-       for ( ; i < length; i++ ) {
-               // Only deal with non-null/undefined values
-               if ( (options = arguments[ i ]) != null ) {
-                       // Extend the base object
-                       for ( name in options ) {
-                               src = target[ name ];
-                               copy = options[ name ];
-
-                               // Prevent never-ending loop
-                               if ( target === copy ) {
-                                       continue;
-                               }
-
-                               // Recurse if we're merging object literal values or arrays
-                               if ( deep && copy && ( jQuery.isPlainObject(copy) || jQuery.isArray(copy) ) ) {
-                                       var clone = src && ( jQuery.isPlainObject(src) || jQuery.isArray(src) ) ? src
-                                               : jQuery.isArray(copy) ? [] : {};
-
-                                       // Never move original objects, clone them
-                                       target[ name ] = jQuery.extend( deep, clone, copy );
-
-                               // Don't bring in undefined values
-                               } else if ( copy !== undefined ) {
-                                       target[ name ] = copy;
-                               }
-                       }
-               }
-       }
-
-       // Return the modified object
-       return target;
-};
-
-jQuery.extend({
-       noConflict: function( deep ) {
-               window.$ = _$;
-
-               if ( deep ) {
-                       window.jQuery = _jQuery;
-               }
-
-               return jQuery;
-       },
-       
-       // Is the DOM ready to be used? Set to true once it occurs.
-       isReady: false,
-       
-       // Handle when the DOM is ready
-       ready: function() {
-               // Make sure that the DOM is not already loaded
-               if ( !jQuery.isReady ) {
-                       // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
-                       if ( !document.body ) {
-                               return setTimeout( jQuery.ready, 13 );
-                       }
-
-                       // Remember that the DOM is ready
-                       jQuery.isReady = true;
-
-                       // If there are functions bound, to execute
-                       if ( readyList ) {
-                               // Execute all of them
-                               var fn, i = 0;
-                               while ( (fn = readyList[ i++ ]) ) {
-                                       fn.call( document, jQuery );
-                               }
-
-                               // Reset the list of functions
-                               readyList = null;
-                       }
-
-                       // Trigger any bound ready events
-                       if ( jQuery.fn.triggerHandler ) {
-                               jQuery( document ).triggerHandler( "ready" );
-                       }
-               }
-       },
-       
-       bindReady: function() {
-               if ( readyBound ) {
-                       return;
-               }
-
-               readyBound = true;
-
-               // Catch cases where $(document).ready() is called after the
-               // browser event has already occurred.
-               if ( document.readyState === "complete" ) {
-                       return jQuery.ready();
-               }
-
-               // Mozilla, Opera and webkit nightlies currently support this event
-               if ( document.addEventListener ) {
-                       // Use the handy event callback
-                       document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-                       
-                       // A fallback to window.onload, that will always work
-                       window.addEventListener( "load", jQuery.ready, false );
-
-               // If IE event model is used
-               } else if ( document.attachEvent ) {
-                       // ensure firing before onload,
-                       // maybe late but safe also for iframes
-                       document.attachEvent("onreadystatechange", DOMContentLoaded);
-                       
-                       // A fallback to window.onload, that will always work
-                       window.attachEvent( "onload", jQuery.ready );
-
-                       // If IE and not a frame
-                       // continually check to see if the document is ready
-                       var toplevel = false;
-
-                       try {
-                               toplevel = window.frameElement == null;
-                       } catch(e) {}
-
-                       if ( document.documentElement.doScroll && toplevel ) {
-                               doScrollCheck();
-                       }
-               }
-       },
-
-       // See test/unit/core.js for details concerning isFunction.
-       // Since version 1.3, DOM methods and functions like alert
-       // aren't supported. They return false on IE (#2968).
-       isFunction: function( obj ) {
-               return toString.call(obj) === "[object Function]";
-       },
-
-       isArray: function( obj ) {
-               return toString.call(obj) === "[object Array]";
-       },
-
-       isPlainObject: function( obj ) {
-               // Must be an Object.
-               // Because of IE, we also have to check the presence of the constructor property.
-               // Make sure that DOM nodes and window objects don't pass through, as well
-               if ( !obj || toString.call(obj) !== "[object Object]" || obj.nodeType || obj.setInterval ) {
-                       return false;
-               }
-               
-               // Not own constructor property must be Object
-               if ( obj.constructor
-                       && !hasOwnProperty.call(obj, "constructor")
-                       && !hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf") ) {
-                       return false;
-               }
-               
-               // Own properties are enumerated firstly, so to speed up,
-               // if last one is own, then all properties are own.
-       
-               var key;
-               for ( key in obj ) {}
-               
-               return key === undefined || hasOwnProperty.call( obj, key );
-       },
-
-       isEmptyObject: function( obj ) {
-               for ( var name in obj ) {
-                       return false;
-               }
-               return true;
-       },
-
-       noop: function() {},
-
-       // Evalulates a script in a global context
-       globalEval: function( data ) {
-               if ( data && rnotwhite.test(data) ) {
-                       // Inspired by code by Andrea Giammarchi
-                       // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
-                       var head = document.getElementsByTagName("head")[0] || document.documentElement,
-                               script = document.createElement("script");
-
-                       script.type = "text/javascript";
-
-                       if ( jQuery.support.scriptEval ) {
-                               script.appendChild( document.createTextNode( data ) );
-                       } else {
-                               script.text = data;
-                       }
-
-                       // Use insertBefore instead of appendChild to circumvent an IE6 bug.
-                       // This arises when a base node is used (#2709).
-                       head.insertBefore( script, head.firstChild );
-                       head.removeChild( script );
-               }
-       },
-
-       nodeName: function( elem, name ) {
-               return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase();
-       },
-
-       // args is for internal usage only
-       each: function( object, callback, args ) {
-               var name, i = 0,
-                       length = object.length,
-                       isObj = length === undefined || jQuery.isFunction(object);
-
-               if ( args ) {
-                       if ( isObj ) {
-                               for ( name in object ) {
-                                       if ( callback.apply( object[ name ], args ) === false ) {
-                                               break;
-                                       }
-                               }
-                       } else {
-                               for ( ; i < length; ) {
-                                       if ( callback.apply( object[ i++ ], args ) === false ) {
-                                               break;
-                                       }
-                               }
-                       }
-
-               // A special, fast, case for the most common use of each
-               } else {
-                       if ( isObj ) {
-                               for ( name in object ) {
-                                       if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
-                                               break;
-                                       }
-                               }
-                       } else {
-                               for ( var value = object[0];
-                                       i < length && callback.call( value, i, value ) !== false; value = object[++i] ) {}
-                       }
-               }
-
-               return object;
-       },
-
-       trim: function( text ) {
-               return (text || "").replace( rtrim, "" );
-       },
-
-       // results is for internal usage only
-       makeArray: function( array, results ) {
-               var ret = results || [];
-
-               if ( array != null ) {
-                       // The window, strings (and functions) also have 'length'
-                       // The extra typeof function check is to prevent crashes
-                       // in Safari 2 (See: #3039)
-                       if ( array.length == null || typeof array === "string" || jQuery.isFunction(array) || (typeof array !== "function" && array.setInterval) ) {
-                               push.call( ret, array );
-                       } else {
-                               jQuery.merge( ret, array );
-                       }
-               }
-
-               return ret;
-       },
-
-       inArray: function( elem, array ) {
-               if ( array.indexOf ) {
-                       return array.indexOf( elem );
-               }
-
-               for ( var i = 0, length = array.length; i < length; i++ ) {
-                       if ( array[ i ] === elem ) {
-                               return i;
-                       }
-               }
-
-               return -1;
-       },
-
-       merge: function( first, second ) {
-               var i = first.length, j = 0;
-
-               if ( typeof second.length === "number" ) {
-                       for ( var l = second.length; j < l; j++ ) {
-                               first[ i++ ] = second[ j ];
-                       }
-               } else {
-                       while ( second[j] !== undefined ) {
-                               first[ i++ ] = second[ j++ ];
-                       }
-               }
-
-               first.length = i;
-
-               return first;
-       },
-
-       grep: function( elems, callback, inv ) {
-               var ret = [];
-
-               // Go through the array, only saving the items
-               // that pass the validator function
-               for ( var i = 0, length = elems.length; i < length; i++ ) {
-                       if ( !inv !== !callback( elems[ i ], i ) ) {
-                               ret.push( elems[ i ] );
-                       }
-               }
-
-               return ret;
-       },
-
-       // arg is for internal usage only
-       map: function( elems, callback, arg ) {
-               var ret = [], value;
-
-               // Go through the array, translating each of the items to their
-               // new value (or values).
-               for ( var i = 0, length = elems.length; i < length; i++ ) {
-                       value = callback( elems[ i ], i, arg );
-
-                       if ( value != null ) {
-                               ret[ ret.length ] = value;
-                       }
-               }
-
-               return ret.concat.apply( [], ret );
-       },
-
-       // A global GUID counter for objects
-       guid: 1,
-
-       proxy: function( fn, proxy, thisObject ) {
-               if ( arguments.length === 2 ) {
-                       if ( typeof proxy === "string" ) {
-                               thisObject = fn;
-                               fn = thisObject[ proxy ];
-                               proxy = undefined;
-
-                       } else if ( proxy && !jQuery.isFunction( proxy ) ) {
-                               thisObject = proxy;
-                               proxy = undefined;
-                       }
-               }
-
-               if ( !proxy && fn ) {
-                       proxy = function() {
-                               return fn.apply( thisObject || this, arguments );
-                       };
-               }
-
-               // Set the guid of unique handler to the same of original handler, so it can be removed
-               if ( fn ) {
-                       proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++;
-               }
-
-               // So proxy can be declared as an argument
-               return proxy;
-       },
-
-       // Use of jQuery.browser is frowned upon.
-       // More details: http://docs.jquery.com/Utilities/jQuery.browser
-       uaMatch: function( ua ) {
-               var ret = { browser: "" };
-
-               ua = ua.toLowerCase();
-
-               if ( /webkit/.test( ua ) ) {
-                       ret = { browser: "webkit", version: /webkit[\/ ]([\w.]+)/ };
-
-               } else if ( /opera/.test( ua ) ) {
-                       ret = { browser: "opera", version:  /version/.test( ua ) ? /version[\/ ]([\w.]+)/ : /opera[\/ ]([\w.]+)/ };
-                       
-               } else if ( /msie/.test( ua ) ) {
-                       ret = { browser: "msie", version: /msie ([\w.]+)/ };
-
-               } else if ( /mozilla/.test( ua ) && !/compatible/.test( ua ) ) {
-                       ret = { browser: "mozilla", version: /rv:([\w.]+)/ };
-               }
-
-               ret.version = (ret.version && ret.version.exec( ua ) || [0, "0"])[1];
-
-               return ret;
-       },
-
-       browser: {}
-});
-
-browserMatch = jQuery.uaMatch( userAgent );
-if ( browserMatch.browser ) {
-       jQuery.browser[ browserMatch.browser ] = true;
-       jQuery.browser.version = browserMatch.version;
-}
-
-// Deprecated, use jQuery.browser.webkit instead
-if ( jQuery.browser.webkit ) {
-       jQuery.browser.safari = true;
-}
-
-if ( indexOf ) {
-       jQuery.inArray = function( elem, array ) {
-               return indexOf.call( array, elem );
-       };
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-
-// Cleanup functions for the document ready method
-if ( document.addEventListener ) {
-       DOMContentLoaded = function() {
-               document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-               jQuery.ready();
-       };
-
-} else if ( document.attachEvent ) {
-       DOMContentLoaded = function() {
-               // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
-               if ( document.readyState === "complete" ) {
-                       document.detachEvent( "onreadystatechange", DOMContentLoaded );
-                       jQuery.ready();
-               }
-       };
-}
-
-// The DOM ready check for Internet Explorer
-function doScrollCheck() {
-       if ( jQuery.isReady ) {
-               return;
-       }
-
-       try {
-               // If IE is used, use the trick by Diego Perini
-               // http://javascript.nwbox.com/IEContentLoaded/
-               document.documentElement.doScroll("left");
-       } catch( error ) {
-               setTimeout( doScrollCheck, 1 );
-               return;
-       }
-
-       // and execute any waiting functions
-       jQuery.ready();
-}
-
-if ( indexOf ) {
-       jQuery.inArray = function( elem, array ) {
-               return indexOf.call( array, elem );
-       };
-}
-
-function evalScript( i, elem ) {
-       if ( elem.src ) {
-               jQuery.ajax({
-                       url: elem.src,
-                       async: false,
-                       dataType: "script"
-               });
-       } else {
-               jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
-       }
-
-       if ( elem.parentNode ) {
-               elem.parentNode.removeChild( elem );
-       }
-}
-
-// Mutifunctional method to get and set values to a collection
-// The value/s can be optionally by executed if its a function
-function access( elems, key, value, exec, fn, pass ) {
-       var length = elems.length;
-       
-       // Setting many attributes
-       if ( typeof key === "object" ) {
-               for ( var k in key ) {
-                       access( elems, k, key[k], exec, fn, value );
-               }
-               return elems;
-       }
-       
-       // Setting one attribute
-       if ( value !== undefined ) {
-               // Optionally, function values get executed if exec is true
-               exec = !pass && exec && jQuery.isFunction(value);
-               
-               for ( var i = 0; i < length; i++ ) {
-                       fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
-               }
-               
-               return elems;
-       }
-       
-       // Getting an attribute
-       return length ? fn( elems[0], key ) : null;
-}
-
-function now() {
-       return (new Date).getTime();
-}
-(function() {
-
-       jQuery.support = {};
-
-       var root = document.documentElement,
-               script = document.createElement("script"),
-               div = document.createElement("div"),
-               id = "script" + now();
-
-       div.style.display = "none";
-       div.innerHTML = "   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-
-       var all = div.getElementsByTagName("*"),
-               a = div.getElementsByTagName("a")[0];
-
-       // Can't get basic test support
-       if ( !all || !all.length || !a ) {
-               return;
-       }
-
-       jQuery.support = {
-               // IE strips leading whitespace when .innerHTML is used
-               leadingWhitespace: div.firstChild.nodeType === 3,
-
-               // Make sure that tbody elements aren't automatically inserted
-               // IE will insert them into empty tables
-               tbody: !div.getElementsByTagName("tbody").length,
-
-               // Make sure that link elements get serialized correctly by innerHTML
-               // This requires a wrapper element in IE
-               htmlSerialize: !!div.getElementsByTagName("link").length,
-
-               // Get the style information from getAttribute
-               // (IE uses .cssText insted)
-               style: /red/.test( a.getAttribute("style") ),
-
-               // Make sure that URLs aren't manipulated
-               // (IE normalizes it by default)
-               hrefNormalized: a.getAttribute("href") === "/a",
-
-               // Make sure that element opacity exists
-               // (IE uses filter instead)
-               // Use a regex to work around a WebKit issue. See #5145
-               opacity: /^0.55$/.test( a.style.opacity ),
-
-               // Verify style float existence
-               // (IE uses styleFloat instead of cssFloat)
-               cssFloat: !!a.style.cssFloat,
-
-               // Make sure that if no value is specified for a checkbox
-               // that it defaults to "on".
-               // (WebKit defaults to "" instead)
-               checkOn: div.getElementsByTagName("input")[0].value === "on",
-
-               // Make sure that a selected-by-default option has a working selected property.
-               // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
-               optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
-
-               // Will be defined later
-               scriptEval: false,
-               noCloneEvent: true,
-               boxModel: null
-       };
-
-       script.type = "text/javascript";
-       try {
-               script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
-       } catch(e) {}
-
-       root.insertBefore( script, root.firstChild );
-
-       // Make sure that the execution of code works by injecting a script
-       // tag with appendChild/createTextNode
-       // (IE doesn't support this, fails, and uses .text instead)
-       if ( window[ id ] ) {
-               jQuery.support.scriptEval = true;
-               delete window[ id ];
-       }
-
-       root.removeChild( script );
-
-       if ( div.attachEvent && div.fireEvent ) {
-               div.attachEvent("onclick", function click() {
-                       // Cloning a node shouldn't copy over any
-                       // bound event handlers (IE does this)
-                       jQuery.support.noCloneEvent = false;
-                       div.detachEvent("onclick", click);
-               });
-               div.cloneNode(true).fireEvent("onclick");
-       }
-
-       // Figure out if the W3C box model works as expected
-       // document.body must exist before we can do this
-       // TODO: This timeout is temporary until I move ready into core.js.
-       jQuery(function() {
-               var div = document.createElement("div");
-               div.style.width = div.style.paddingLeft = "1px";
-
-               document.body.appendChild( div );
-               jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
-               document.body.removeChild( div ).style.display = 'none';
-               div = null;
-       });
-
-       // Technique from Juriy Zaytsev
-       // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
-       var eventSupported = function( eventName ) { 
-               var el = document.createElement("div"); 
-               eventName = "on" + eventName; 
-
-               var isSupported = (eventName in el); 
-               if ( !isSupported ) { 
-                       el.setAttribute(eventName, "return;"); 
-                       isSupported = typeof el[eventName] === "function"; 
-               } 
-               el = null; 
-
-               return isSupported; 
-       };
-       
-       jQuery.support.submitBubbles = eventSupported("submit");
-       jQuery.support.changeBubbles = eventSupported("change");
-
-       // release memory in IE
-       root = script = div = all = a = null;
-})();
-
-jQuery.props = {
-       "for": "htmlFor",
-       "class": "className",
-       readonly: "readOnly",
-       maxlength: "maxLength",
-       cellspacing: "cellSpacing",
-       rowspan: "rowSpan",
-       colspan: "colSpan",
-       tabindex: "tabIndex",
-       usemap: "useMap",
-       frameborder: "frameBorder"
-};
-var expando = "jQuery" + now(), uuid = 0, windowData = {};
-var emptyObject = {};
-
-jQuery.extend({
-       cache: {},
-       
-       expando:expando,
-
-       // The following elements throw uncatchable exceptions if you
-       // attempt to add expando properties to them.
-       noData: {
-               "embed": true,
-               "object": true,
-               "applet": true
-       },
-
-       data: function( elem, name, data ) {
-               if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
-                       return;
-               }
-
-               elem = elem == window ?
-                       windowData :
-                       elem;
-
-               var id = elem[ expando ], cache = jQuery.cache, thisCache;
-
-               // Handle the case where there's no name immediately
-               if ( !name && !id ) {
-                       return null;
-               }
-
-               // Compute a unique ID for the element
-               if ( !id ) { 
-                       id = ++uuid;
-               }
-
-               // Avoid generating a new cache unless none exists and we
-               // want to manipulate it.
-               if ( typeof name === "object" ) {
-                       elem[ expando ] = id;
-                       thisCache = cache[ id ] = jQuery.extend(true, {}, name);
-               } else if ( cache[ id ] ) {
-                       thisCache = cache[ id ];
-               } else if ( typeof data === "undefined" ) {
-                       thisCache = emptyObject;
-               } else {
-                       thisCache = cache[ id ] = {};
-               }
-
-               // Prevent overriding the named cache with undefined values
-               if ( data !== undefined ) {
-                       elem[ expando ] = id;
-                       thisCache[ name ] = data;
-               }
-
-               return typeof name === "string" ? thisCache[ name ] : thisCache;
-       },
-
-       removeData: function( elem, name ) {
-               if ( elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()] ) {
-                       return;
-               }
-
-               elem = elem == window ?
-                       windowData :
-                       elem;
-
-               var id = elem[ expando ], cache = jQuery.cache, thisCache = cache[ id ];
-
-               // If we want to remove a specific section of the element's data
-               if ( name ) {
-                       if ( thisCache ) {
-                               // Remove the section of cache data
-                               delete thisCache[ name ];
-
-                               // If we've removed all the data, remove the element's cache
-                               if ( jQuery.isEmptyObject(thisCache) ) {
-                                       jQuery.removeData( elem );
-                               }
-                       }
-
-               // Otherwise, we want to remove all of the element's data
-               } else {
-                       // Clean up the element expando
-                       try {
-                               delete elem[ expando ];
-                       } catch( e ) {
-                               // IE has trouble directly removing the expando
-                               // but it's ok with using removeAttribute
-                               if ( elem.removeAttribute ) {
-                                       elem.removeAttribute( expando );
-                               }
-                       }
-
-                       // Completely remove the data cache
-                       delete cache[ id ];
-               }
-       }
-});
-
-jQuery.fn.extend({
-       data: function( key, value ) {
-               if ( typeof key === "undefined" && this.length ) {
-                       return jQuery.data( this[0] );
-
-               } else if ( typeof key === "object" ) {
-                       return this.each(function() {
-                               jQuery.data( this, key );
-                       });
-               }
-
-               var parts = key.split(".");
-               parts[1] = parts[1] ? "." + parts[1] : "";
-
-               if ( value === undefined ) {
-                       var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
-
-                       if ( data === undefined && this.length ) {
-                               data = jQuery.data( this[0], key );
-                       }
-                       return data === undefined && parts[1] ?
-                               this.data( parts[0] ) :
-                               data;
-               } else {
-                       return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function() {
-                               jQuery.data( this, key, value );
-                       });
-               }
-       },
-
-       removeData: function( key ) {
-               return this.each(function() {
-                       jQuery.removeData( this, key );
-               });
-       }
-});
-jQuery.extend({
-       queue: function( elem, type, data ) {
-               if ( !elem ) {
-                       return;
-               }
-
-               type = (type || "fx") + "queue";
-               var q = jQuery.data( elem, type );
-
-               // Speed up dequeue by getting out quickly if this is just a lookup
-               if ( !data ) {
-                       return q || [];
-               }
-
-               if ( !q || jQuery.isArray(data) ) {
-                       q = jQuery.data( elem, type, jQuery.makeArray(data) );
-
-               } else {
-                       q.push( data );
-               }
-
-               return q;
-       },
-
-       dequeue: function( elem, type ) {
-               type = type || "fx";
-
-               var queue = jQuery.queue( elem, type ), fn = queue.shift();
-
-               // If the fx queue is dequeued, always remove the progress sentinel
-               if ( fn === "inprogress" ) {
-                       fn = queue.shift();
-               }
-
-               if ( fn ) {
-                       // Add a progress sentinel to prevent the fx queue from being
-                       // automatically dequeued
-                       if ( type === "fx" ) {
-                               queue.unshift("inprogress");
-                       }
-
-                       fn.call(elem, function() {
-                               jQuery.dequeue(elem, type);
-                       });
-               }
-       }
-});
-
-jQuery.fn.extend({
-       queue: function( type, data ) {
-               if ( typeof type !== "string" ) {
-                       data = type;
-                       type = "fx";
-               }
-
-               if ( data === undefined ) {
-                       return jQuery.queue( this[0], type );
-               }
-               return this.each(function( i, elem ) {
-                       var queue = jQuery.queue( this, type, data );
-
-                       if ( type === "fx" && queue[0] !== "inprogress" ) {
-                               jQuery.dequeue( this, type );
-                       }
-               });
-       },
-       dequeue: function( type ) {
-               return this.each(function() {
-                       jQuery.dequeue( this, type );
-               });
-       },
-
-       // Based off of the plugin by Clint Helfers, with permission.
-       // http://blindsignals.com/index.php/2009/07/jquery-delay/
-       delay: function( time, type ) {
-               time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
-               type = type || "fx";
-
-               return this.queue( type, function() {
-                       var elem = this;
-                       setTimeout(function() {
-                               jQuery.dequeue( elem, type );
-                       }, time );
-               });
-       },
-
-       clearQueue: function( type ) {
-               return this.queue( type || "fx", [] );
-       }
-});
-var rclass = /[\n\t]/g,
-       rspace = /\s+/,
-       rreturn = /\r/g,
-       rspecialurl = /href|src|style/,
-       rtype = /(button|input)/i,
-       rfocusable = /(button|input|object|select|textarea)/i,
-       rclickable = /^(a|area)$/i,
-       rradiocheck = /radio|checkbox/;
-
-jQuery.fn.extend({
-       attr: function( name, value ) {
-               return access( this, name, value, true, jQuery.attr );
-       },
-
-       removeAttr: function( name, fn ) {
-               return this.each(function(){
-                       jQuery.attr( this, name, "" );
-                       if ( this.nodeType === 1 ) {
-                               this.removeAttribute( name );
-                       }
-               });
-       },
-
-       addClass: function( value ) {
-               if ( jQuery.isFunction(value) ) {
-                       return this.each(function(i) {
-                               var self = jQuery(this);
-                               self.addClass( value.call(this, i, self.attr("class")) );
-                       });
-               }
-
-               if ( value && typeof value === "string" ) {
-                       var classNames = (value || "").split( rspace );
-
-                       for ( var i = 0, l = this.length; i < l; i++ ) {
-                               var elem = this[i];
-
-                               if ( elem.nodeType === 1 ) {
-                                       if ( !elem.className ) {
-                                               elem.className = value;
-
-                                       } else {
-                                               var className = " " + elem.className + " ";
-                                               for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
-                                                       if ( className.indexOf( " " + classNames[c] + " " ) < 0 ) {
-                                                               elem.className += " " + classNames[c];
-                                                       }
-                                               }
-                                       }
-                               }
-                       }
-               }
-
-               return this;
-       },
-
-       removeClass: function( value ) {
-               if ( jQuery.isFunction(value) ) {
-                       return this.each(function(i) {
-                               var self = jQuery(this);
-                               self.removeClass( value.call(this, i, self.attr("class")) );
-                       });
-               }
-
-               if ( (value && typeof value === "string") || value === undefined ) {
-                       var classNames = (value || "").split(rspace);
-
-                       for ( var i = 0, l = this.length; i < l; i++ ) {
-                               var elem = this[i];
-
-                               if ( elem.nodeType === 1 && elem.className ) {
-                                       if ( value ) {
-                                               var className = (" " + elem.className + " ").replace(rclass, " ");
-                                               for ( var c = 0, cl = classNames.length; c < cl; c++ ) {
-                                                       className = className.replace(" " + classNames[c] + " ", " ");
-                                               }
-                                               elem.className = className.substring(1, className.length - 1);
-
-                                       } else {
-                                               elem.className = "";
-                                       }
-                               }
-                       }
-               }
-
-               return this;
-       },
-
-       toggleClass: function( value, stateVal ) {
-               var type = typeof value, isBool = typeof stateVal === "boolean";
-
-               if ( jQuery.isFunction( value ) ) {
-                       return this.each(function(i) {
-                               var self = jQuery(this);
-                               self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
-                       });
-               }
-
-               return this.each(function() {
-                       if ( type === "string" ) {
-                               // toggle individual class names
-                               var className, i = 0, self = jQuery(this),
-                                       state = stateVal,
-                                       classNames = value.split( rspace );
-
-                               while ( (className = classNames[ i++ ]) ) {
-                                       // check each className given, space seperated list
-                                       state = isBool ? state : !self.hasClass( className );
-                                       self[ state ? "addClass" : "removeClass" ]( className );
-                               }
-
-                       } else if ( type === "undefined" || type === "boolean" ) {
-                               if ( this.className ) {
-                                       // store className if set
-                                       jQuery.data( this, "__className__", this.className );
-                               }
-
-                               // toggle whole className
-                               this.className = this.className || value === false ? "" : jQuery.data( this, "__className__" ) || "";
-                       }
-               });
-       },
-
-       hasClass: function( selector ) {
-               var className = " " + selector + " ";
-               for ( var i = 0, l = this.length; i < l; i++ ) {
-                       if ( (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) {
-                               return true;
-                       }
-               }
-
-               return false;
-       },
-
-       val: function( value ) {
-               if ( value === undefined ) {
-                       var elem = this[0];
-
-                       if ( elem ) {
-                               if ( jQuery.nodeName( elem, "option" ) ) {
-                                       return (elem.attributes.value || {}).specified ? elem.value : elem.text;
-                               }
-
-                               // We need to handle select boxes special
-                               if ( jQuery.nodeName( elem, "select" ) ) {
-                                       var index = elem.selectedIndex,
-                                               values = [],
-                                               options = elem.options,
-                                               one = elem.type === "select-one";
-
-                                       // Nothing was selected
-                                       if ( index < 0 ) {
-                                               return null;
-                                       }
-
-                                       // Loop through all the selected options
-                                       for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
-                                               var option = options[ i ];
-
-                                               if ( option.selected ) {
-                                                       // Get the specifc value for the option
-                                                       value = jQuery(option).val();
-
-                                                       // We don't need an array for one selects
-                                                       if ( one ) {
-                                                               return value;
-                                                       }
-
-                                                       // Multi-Selects return an array
-                                                       values.push( value );
-                                               }
-                                       }
-
-                                       return values;
-                               }
-
-                               // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
-                               if ( rradiocheck.test( elem.type ) && !jQuery.support.checkOn ) {
-                                       return elem.getAttribute("value") === null ? "on" : elem.value;
-                               }
-                               
-
-                               // Everything else, we just grab the value
-                               return (elem.value || "").replace(rreturn, "");
-
-                       }
-
-                       return undefined;
-               }
-
-               var isFunction = jQuery.isFunction(value);
-
-               return this.each(function(i) {
-                       var self = jQuery(this), val = value;
-
-                       if ( this.nodeType !== 1 ) {
-                               return;
-                       }
-
-                       if ( isFunction ) {
-                               val = value.call(this, i, self.val());
-                       }
-
-                       // Typecast each time if the value is a Function and the appended
-                       // value is therefore different each time.
-                       if ( typeof val === "number" ) {
-                               val += "";
-                       }
-
-                       if ( jQuery.isArray(val) && rradiocheck.test( this.type ) ) {
-                               this.checked = jQuery.inArray( self.val(), val ) >= 0;
-
-                       } else if ( jQuery.nodeName( this, "select" ) ) {
-                               var values = jQuery.makeArray(val);
-
-                               jQuery( "option", this ).each(function() {
-                                       this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
-                               });
-
-                               if ( !values.length ) {
-                                       this.selectedIndex = -1;
-                               }
-
-                       } else {
-                               this.value = val;
-                       }
-               });
-       }
-});
-
-jQuery.extend({
-       attrFn: {
-               val: true,
-               css: true,
-               html: true,
-               text: true,
-               data: true,
-               width: true,
-               height: true,
-               offset: true
-       },
-               
-       attr: function( elem, name, value, pass ) {
-               // don't set attributes on text and comment nodes
-               if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
-                       return undefined;
-               }
-
-               if ( pass && name in jQuery.attrFn ) {
-                       return jQuery(elem)[name](value);
-               }
-
-               var notxml = elem.nodeType !== 1 || !jQuery.isXMLDoc( elem ),
-                       // Whether we are setting (or getting)
-                       set = value !== undefined;
-
-               // Try to normalize/fix the name
-               name = notxml && jQuery.props[ name ] || name;
-
-               // Only do all the following if this is a node (faster for style)
-               if ( elem.nodeType === 1 ) {
-                       // These attributes require special treatment
-                       var special = rspecialurl.test( name );
-
-                       // Safari mis-reports the default selected property of an option
-                       // Accessing the parent's selectedIndex property fixes it
-                       if ( name === "selected" && !jQuery.support.optSelected ) {
-                               var parent = elem.parentNode;
-                               if ( parent ) {
-                                       parent.selectedIndex;
-       
-                                       // Make sure that it also works with optgroups, see #5701
-                                       if ( parent.parentNode ) {
-                                               parent.parentNode.selectedIndex;
-                                       }
-                               }
-                       }
-
-                       // If applicable, access the attribute via the DOM 0 way
-                       if ( name in elem && notxml && !special ) {
-                               if ( set ) {
-                                       // We can't allow the type property to be changed (since it causes problems in IE)
-                                       if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
-                                               throw "type property can't be changed";
-                                       }
-
-                                       elem[ name ] = value;
-                               }
-
-                               // browsers index elements by id/name on forms, give priority to attributes.
-                               if ( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) ) {
-                                       return elem.getAttributeNode( name ).nodeValue;
-                               }
-
-                               // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
-                               // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
-                               if ( name === "tabIndex" ) {
-                                       var attributeNode = elem.getAttributeNode( "tabIndex" );
-
-                                       return attributeNode && attributeNode.specified ?
-                                               attributeNode.value :
-                                               rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
-                                                       0 :
-                                                       undefined;
-                               }
-
-                               return elem[ name ];
-                       }
-
-                       if ( !jQuery.support.style && notxml && name === "style" ) {
-                               if ( set ) {
-                                       elem.style.cssText = "" + value;
-                               }
-
-                               return elem.style.cssText;
-                       }
-
-                       if ( set ) {
-                               // convert the value to a string (all browsers do this but IE) see #1070
-                               elem.setAttribute( name, "" + value );
-                       }
-
-                       var attr = !jQuery.support.hrefNormalized && notxml && special ?
-                                       // Some attributes require a special call on IE
-                                       elem.getAttribute( name, 2 ) :
-                                       elem.getAttribute( name );
-
-                       // Non-existent attributes return null, we normalize to undefined
-                       return attr === null ? undefined : attr;
-               }
-
-               // elem is actually elem.style ... set the style
-               // Using attr for specific style information is now deprecated. Use style insead.
-               return jQuery.style( elem, name, value );
-       }
-});
-var fcleanup = function( nm ) {
-       return nm.replace(/[^\w\s\.\|`]/g, function( ch ) {
-               return "\\" + ch;
-       });
-};
-
-/*
- * A number of helper functions used for managing events.
- * Many of the ideas behind this code originated from
- * Dean Edwards' addEvent library.
- */
-jQuery.event = {
-
-       // Bind an event to an element
-       // Original by Dean Edwards
-       add: function( elem, types, handler, data ) {
-               if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
-                       return;
-               }
-
-               // For whatever reason, IE has trouble passing the window object
-               // around, causing it to be cloned in the process
-               if ( elem.setInterval && ( elem !== window && !elem.frameElement ) ) {
-                       elem = window;
-               }
-
-               // Make sure that the function being executed has a unique ID
-               if ( !handler.guid ) {
-                       handler.guid = jQuery.guid++;
-               }
-
-               // if data is passed, bind to handler
-               if ( data !== undefined ) {
-                       // Create temporary function pointer to original handler
-                       var fn = handler;
-
-                       // Create unique handler function, wrapped around original handler
-                       handler = jQuery.proxy( fn );
-
-                       // Store data in unique handler
-                       handler.data = data;
-               }
-
-               // Init the element's event structure
-               var events = jQuery.data( elem, "events" ) || jQuery.data( elem, "events", {} ),
-                       handle = jQuery.data( elem, "handle" ), eventHandle;
-
-               if ( !handle ) {
-                       eventHandle = function() {
-                               // Handle the second event of a trigger and when
-                               // an event is called after a page has unloaded
-                               return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
-                                       jQuery.event.handle.apply( eventHandle.elem, arguments ) :
-                                       undefined;
-                       };
-
-                       handle = jQuery.data( elem, "handle", eventHandle );
-               }
-
-               // If no handle is found then we must be trying to bind to one of the
-               // banned noData elements
-               if ( !handle ) {
-                       return;
-               }
-
-               // Add elem as a property of the handle function
-               // This is to prevent a memory leak with non-native
-               // event in IE.
-               handle.elem = elem;
-
-               // Handle multiple events separated by a space
-               // jQuery(...).bind("mouseover mouseout", fn);
-               types = types.split( /\s+/ );
-               var type, i=0;
-               while ( (type = types[ i++ ]) ) {
-                       // Namespaced event handlers
-                       var namespaces = type.split(".");
-                       type = namespaces.shift();
-                       handler.type = namespaces.slice(0).sort().join(".");
-
-                       // Get the current list of functions bound to this event
-                       var handlers = events[ type ],
-                               special = this.special[ type ] || {};
-
-                       
-
-                       // Init the event handler queue
-                       if ( !handlers ) {
-                               handlers = events[ type ] = {};
-
-                               // Check for a special event handler
-                               // Only use addEventListener/attachEvent if the special
-                               // events handler returns false
-                               if ( !special.setup || special.setup.call( elem, data, namespaces, handler) === false ) {
-                                       // Bind the global event handler to the element
-                                       if ( elem.addEventListener ) {
-                                               elem.addEventListener( type, handle, false );
-                                       } else if ( elem.attachEvent ) {
-                                               elem.attachEvent( "on" + type, handle );
-                                       }
-                               }
-                       }
-                       
-                       if ( special.add ) { 
-                               var modifiedHandler = special.add.call( elem, handler, data, namespaces, handlers ); 
-                               if ( modifiedHandler && jQuery.isFunction( modifiedHandler ) ) { 
-                                       modifiedHandler.guid = modifiedHandler.guid || handler.guid; 
-                                       handler = modifiedHandler; 
-                               } 
-                       } 
-                       
-                       // Add the function to the element's handler list
-                       handlers[ handler.guid ] = handler;
-
-                       // Keep track of which events have been used, for global triggering
-                       this.global[ type ] = true;
-               }
-
-               // Nullify elem to prevent memory leaks in IE
-               elem = null;
-       },
-
-       global: {},
-
-       // Detach an event or set of events from an element
-       remove: function( elem, types, handler ) {
-               // don't do events on text and comment nodes
-               if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
-                       return;
-               }
-
-               var events = jQuery.data( elem, "events" ), ret, type, fn;
-
-               if ( events ) {
-                       // Unbind all events for the element
-                       if ( types === undefined || (typeof types === "string" && types.charAt(0) === ".") ) {
-                               for ( type in events ) {
-                                       this.remove( elem, type + (types || "") );
-                               }
-                       } else {
-                               // types is actually an event object here
-                               if ( types.type ) {
-                                       handler = types.handler;
-                                       types = types.type;
-                               }
-
-                               // Handle multiple events separated by a space
-                               // jQuery(...).unbind("mouseover mouseout", fn);
-                               types = types.split(/\s+/);
-                               var i = 0;
-                               while ( (type = types[ i++ ]) ) {
-                                       // Namespaced event handlers
-                                       var namespaces = type.split(".");
-                                       type = namespaces.shift();
-                                       var all = !namespaces.length,
-                                               cleaned = jQuery.map( namespaces.slice(0).sort(), fcleanup ),
-                                               namespace = new RegExp("(^|\\.)" + cleaned.join("\\.(?:.*\\.)?") + "(\\.|$)"),
-                                               special = this.special[ type ] || {};
-
-                                       if ( events[ type ] ) {
-                                               // remove the given handler for the given type
-                                               if ( handler ) {
-                                                       fn = events[ type ][ handler.guid ];
-                                                       delete events[ type ][ handler.guid ];
-
-                                               // remove all handlers for the given type
-                                               } else {
-                                                       for ( var handle in events[ type ] ) {
-                                                               // Handle the removal of namespaced events
-                                                               if ( all || namespace.test( events[ type ][ handle ].type ) ) {
-                                                                       delete events[ type ][ handle ];
-                                                               }
-                                                       }
-                                               }
-
-                                               if ( special.remove ) {
-                                                       special.remove.call( elem, namespaces, fn);
-                                               }
-
-                                               // remove generic event handler if no more handlers exist
-                                               for ( ret in events[ type ] ) {
-                                                       break;
-                                               }
-                                               if ( !ret ) {
-                                                       if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
-                                                               if ( elem.removeEventListener ) {
-                                                                       elem.removeEventListener( type, jQuery.data( elem, "handle" ), false );
-                                                               } else if ( elem.detachEvent ) {
-                                                                       elem.detachEvent( "on" + type, jQuery.data( elem, "handle" ) );
-                                                               }
-                                                       }
-                                                       ret = null;
-                                                       delete events[ type ];
-                                               }
-                                       }
-                               }
-                       }
-
-                       // Remove the expando if it's no longer used
-                       for ( ret in events ) {
-                               break;
-                       }
-                       if ( !ret ) {
-                               var handle = jQuery.data( elem, "handle" );
-                               if ( handle ) {
-                                       handle.elem = null;
-                               }
-                               jQuery.removeData( elem, "events" );
-                               jQuery.removeData( elem, "handle" );
-                       }
-               }
-       },
-
-       // bubbling is internal
-       trigger: function( event, data, elem /*, bubbling */ ) {
-               // Event object or event type
-               var type = event.type || event,
-                       bubbling = arguments[3];
-
-               if ( !bubbling ) {
-                       event = typeof event === "object" ?
-                               // jQuery.Event object
-                               event[expando] ? event :
-                               // Object literal
-                               jQuery.extend( jQuery.Event(type), event ) :
-                               // Just the event type (string)
-                               jQuery.Event(type);
-
-                       if ( type.indexOf("!") >= 0 ) {
-                               event.type = type = type.slice(0, -1);
-                               event.exclusive = true;
-                       }
-
-                       // Handle a global trigger
-                       if ( !elem ) {
-                               // Don't bubble custom events when global (to avoid too much overhead)
-                               event.stopPropagation();
-
-                               // Only trigger if we've ever bound an event for it
-                               if ( this.global[ type ] ) {
-                                       jQuery.each( jQuery.cache, function() {
-                                               if ( this.events && this.events[type] ) {
-                                                       jQuery.event.trigger( event, data, this.handle.elem );
-                                               }
-                                       });
-                               }
-                       }
-
-                       // Handle triggering a single element
-
-                       // don't do events on text and comment nodes
-                       if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
-                               return undefined;
-                       }
-
-                       // Clean up in case it is reused
-                       event.result = undefined;
-                       event.target = elem;
-
-                       // Clone the incoming data, if any
-                       data = jQuery.makeArray( data );
-                       data.unshift( event );
-               }
-
-               event.currentTarget = elem;
-
-               // Trigger the event, it is assumed that "handle" is a function
-               var handle = jQuery.data( elem, "handle" );
-               if ( handle ) {
-                       handle.apply( elem, data );
-               }
-
-               var nativeFn, nativeHandler;
-               try {
-                       if ( !(elem && elem.nodeName && jQuery.noData[elem.nodeName.toLowerCase()]) ) {
-                               nativeFn = elem[ type ];
-                               nativeHandler = elem[ "on" + type ];
-                       }
-               // prevent IE from throwing an error for some elements with some event types, see #3533
-               } catch (e) {}
-
-               var isClick = jQuery.nodeName(elem, "a") && type === "click";
-
-               // Trigger the native events (except for clicks on links)
-               if ( !bubbling && nativeFn && !event.isDefaultPrevented() && !isClick ) {
-                       this.triggered = true;
-                       try {
-                               elem[ type ]();
-                       // prevent IE from throwing an error for some hidden elements
-                       } catch (e) {}
-
-               // Handle triggering native .onfoo handlers
-               } else if ( nativeHandler && elem[ "on" + type ].apply( elem, data ) === false ) {
-                       event.result = false;
-               }
-
-               this.triggered = false;
-
-               if ( !event.isPropagationStopped() ) {
-                       var parent = elem.parentNode || elem.ownerDocument;
-                       if ( parent ) {
-                               jQuery.event.trigger( event, data, parent, true );
-                       }
-               }
-       },
-
-       handle: function( event ) {
-               // returned undefined or false
-               var all, handlers;
-
-               event = arguments[0] = jQuery.event.fix( event || window.event );
-               event.currentTarget = this;
-
-               // Namespaced event handlers
-               var namespaces = event.type.split(".");
-               event.type = namespaces.shift();
-
-               // Cache this now, all = true means, any handler
-               all = !namespaces.length && !event.exclusive;
-
-               var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
-
-               handlers = ( jQuery.data(this, "events") || {} )[ event.type ];
-
-               for ( var j in handlers ) {
-                       var handler = handlers[ j ];
-
-                       // Filter the functions by class
-                       if ( all || namespace.test(handler.type) ) {
-                               // Pass in a reference to the handler function itself
-                               // So that we can later remove it
-                               event.handler = handler;
-                               event.data = handler.data;
-
-                               var ret = handler.apply( this, arguments );
-
-                               if ( ret !== undefined ) {
-                                       event.result = ret;
-                                       if ( ret === false ) {
-                                               event.preventDefault();
-                                               event.stopPropagation();
-                                       }
-                               }
-
-                               if ( event.isImmediatePropagationStopped() ) {
-                                       break;
-                               }
-
-                       }
-               }
-
-               return event.result;
-       },
-
-       props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-
-       fix: function( event ) {
-               if ( event[ expando ] ) {
-                       return event;
-               }
-
-               // store a copy of the original event object
-               // and "clone" to set read-only properties
-               var originalEvent = event;
-               event = jQuery.Event( originalEvent );
-
-               for ( var i = this.props.length, prop; i; ) {
-                       prop = this.props[ --i ];
-                       event[ prop ] = originalEvent[ prop ];
-               }
-
-               // Fix target property, if necessary
-               if ( !event.target ) {
-                       event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
-               }
-
-               // check if target is a textnode (safari)
-               if ( event.target.nodeType === 3 ) {
-                       event.target = event.target.parentNode;
-               }
-
-               // Add relatedTarget, if necessary
-               if ( !event.relatedTarget && event.fromElement ) {
-                       event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement;
-               }
-
-               // Calculate pageX/Y if missing and clientX/Y available
-               if ( event.pageX == null && event.clientX != null ) {
-                       var doc = document.documentElement, body = document.body;
-                       event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);
-                       event.pageY = event.clientY + (doc && doc.scrollTop  || body && body.scrollTop  || 0) - (doc && doc.clientTop  || body && body.clientTop  || 0);
-               }
-
-               // Add which for key events
-               if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) ) {
-                       event.which = event.charCode || event.keyCode;
-               }
-
-               // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
-               if ( !event.metaKey && event.ctrlKey ) {
-                       event.metaKey = event.ctrlKey;
-               }
-
-               // Add which for click: 1 === left; 2 === middle; 3 === right
-               // Note: button is not normalized, so don't use it
-               if ( !event.which && event.button !== undefined ) {
-                       event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
-               }
-
-               return event;
-       },
-
-       // Deprecated, use jQuery.guid instead
-       guid: 1E8,
-
-       // Deprecated, use jQuery.proxy instead
-       proxy: jQuery.proxy,
-
-       special: {
-               ready: {
-                       // Make sure the ready event is setup
-                       setup: jQuery.bindReady,
-                       teardown: jQuery.noop
-               },
-
-               live: {
-                       add: function( proxy, data, namespaces, live ) {
-                               jQuery.extend( proxy, data || {} );
-
-                               proxy.guid += data.selector + data.live; 
-                               jQuery.event.add( this, data.live, liveHandler, data ); 
-                               
-                       },
-
-                       remove: function( namespaces ) {
-                               if ( namespaces.length ) {
-                                       var remove = 0, name = new RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
-
-                                       jQuery.each( (jQuery.data(this, "events").live || {}), function() {
-                                               if ( name.test(this.type) ) {
-                                                       remove++;
-                                               }
-                                       });
-
-                                       if ( remove < 1 ) {
-                                               jQuery.event.remove( this, namespaces[0], liveHandler );
-                                       }
-                               }
-                       },
-                       special: {}
-               },
-               beforeunload: {
-                       setup: function( data, namespaces, fn ) {
-                               // We only want to do this special case on windows
-                               if ( this.setInterval ) {
-                                       this.onbeforeunload = fn;
-                               }
-
-                               return false;
-                       },
-                       teardown: function( namespaces, fn ) {
-                               if ( this.onbeforeunload === fn ) {
-                                       this.onbeforeunload = null;
-                               }
-                       }
-               }
-       }
-};
-
-jQuery.Event = function( src ) {
-       // Allow instantiation without the 'new' keyword
-       if ( !this.preventDefault ) {
-               return new jQuery.Event( src );
-       }
-
-       // Event object
-       if ( src && src.type ) {
-               this.originalEvent = src;
-               this.type = src.type;
-       // Event type
-       } else {
-               this.type = src;
-       }
-
-       // timeStamp is buggy for some events on Firefox(#3843)
-       // So we won't rely on the native value
-       this.timeStamp = now();
-
-       // Mark it as fixed
-       this[ expando ] = true;
-};
-
-function returnFalse() {
-       return false;
-}
-function returnTrue() {
-       return true;
-}
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
-       preventDefault: function() {
-               this.isDefaultPrevented = returnTrue;
-
-               var e = this.originalEvent;
-               if ( !e ) {
-                       return;
-               }
-               
-               // if preventDefault exists run it on the original event
-               if ( e.preventDefault ) {
-                       e.preventDefault();
-               }
-               // otherwise set the returnValue property of the original event to false (IE)
-               e.returnValue = false;
-       },
-       stopPropagation: function() {
-               this.isPropagationStopped = returnTrue;
-
-               var e = this.originalEvent;
-               if ( !e ) {
-                       return;
-               }
-               // if stopPropagation exists run it on the original event
-               if ( e.stopPropagation ) {
-                       e.stopPropagation();
-               }
-               // otherwise set the cancelBubble property of the original event to true (IE)
-               e.cancelBubble = true;
-       },
-       stopImmediatePropagation: function() {
-               this.isImmediatePropagationStopped = returnTrue;
-               this.stopPropagation();
-       },
-       isDefaultPrevented: returnFalse,
-       isPropagationStopped: returnFalse,
-       isImmediatePropagationStopped: returnFalse
-};
-
-// Checks if an event happened on an element within another element
-// Used in jQuery.event.special.mouseenter and mouseleave handlers
-var withinElement = function( event ) {
-       // Check if mouse(over|out) are still within the same parent element
-       var parent = event.relatedTarget;
-
-       // Traverse up the tree
-       while ( parent && parent !== this ) {
-               // Firefox sometimes assigns relatedTarget a XUL element
-               // which we cannot access the parentNode property of
-               try {
-                       parent = parent.parentNode;
-
-               // assuming we've left the element since we most likely mousedover a xul element
-               } catch(e) {
-                       break;
-               }
-       }
-
-       if ( parent !== this ) {
-               // set the correct event type
-               event.type = event.data;
-
-               // handle event if we actually just moused on to a non sub-element
-               jQuery.event.handle.apply( this, arguments );
-       }
-
-},
-
-// In case of event delegation, we only need to rename the event.type,
-// liveHandler will take care of the rest.
-delegate = function( event ) {
-       event.type = event.data;
-       jQuery.event.handle.apply( this, arguments );
-};
-
-// Create mouseenter and mouseleave events
-jQuery.each({
-       mouseenter: "mouseover",
-       mouseleave: "mouseout"
-}, function( orig, fix ) {
-       jQuery.event.special[ orig ] = {
-               setup: function( data ) {
-                       jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig );
-               },
-               teardown: function( data ) {
-                       jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement );
-               }
-       };
-});
-
-// submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
-jQuery.event.special.submit = {
-       setup: function( data, namespaces, fn ) {
-               if ( this.nodeName.toLowerCase() !== "form" ) {
-                       jQuery.event.add(this, "click.specialSubmit." + fn.guid, function( e ) {
-                               var elem = e.target, type = elem.type;
-
-                               if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) {
-                                       return trigger( "submit", this, arguments );
-                               }
-                       });
-        
-                       jQuery.event.add(this, "keypress.specialSubmit." + fn.guid, function( e ) {
-                               var elem = e.target, type = elem.type;
-
-                               if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) {
-                                       return trigger( "submit", this, arguments );
-                               }
-                       });
-
-               } else {
-                       return false;
-               }
-       },
-
-       remove: function( namespaces, fn ) {
-               jQuery.event.remove( this, "click.specialSubmit" + (fn ? "."+fn.guid : "") );
-               jQuery.event.remove( this, "keypress.specialSubmit" + (fn ? "."+fn.guid : "") );
-       }
-};
-
-}
-
-// change delegation, happens here so we have bind.
-if ( !jQuery.support.changeBubbles ) {
-
-var formElems = /textarea|input|select/i;
-
-function getVal( elem ) {
-       var type = elem.type, val = elem.value;
-
-       if ( type === "radio" || type === "checkbox" ) {
-               val = elem.checked;
-
-       } else if ( type === "select-multiple" ) {
-               val = elem.selectedIndex > -1 ?
-                       jQuery.map( elem.options, function( elem ) {
-                               return elem.selected;
-                       }).join("-") :
-                       "";
-
-       } else if ( elem.nodeName.toLowerCase() === "select" ) {
-               val = elem.selectedIndex;
-       }
-
-       return val;
-}
-
-function testChange( e ) {
-               var elem = e.target, data, val;
-
-               if ( !formElems.test( elem.nodeName ) || elem.readOnly ) {
-                       return;
-               }
-
-               data = jQuery.data( elem, "_change_data" );
-               val = getVal(elem);
-
-               if ( val === data ) {
-                       return;
-               }
-
-               // the current data will be also retrieved by beforeactivate
-               if ( e.type !== "focusout" || elem.type !== "radio" ) {
-                       jQuery.data( elem, "_change_data", val );
-               }
-
-               if ( elem.type !== "select" && (data != null || val) ) {
-                       e.type = "change";
-                       return jQuery.event.trigger( e, arguments[1], this );
-               }
-}
-
-jQuery.event.special.change = {
-       filters: {
-               focusout: testChange, 
-
-               click: function( e ) {
-                       var elem = e.target, type = elem.type;
-
-                       if ( type === "radio" || type === "checkbox" || elem.nodeName.toLowerCase() === "select" ) {
-                               return testChange.call( this, e );
-                       }
-               },
-
-               // Change has to be called before submit
-               // Keydown will be called before keypress, which is used in submit-event delegation
-               keydown: function( e ) {
-                       var elem = e.target, type = elem.type;
-
-                       if ( (e.keyCode === 13 && elem.nodeName.toLowerCase() !== "textarea") ||
-                               (e.keyCode === 32 && (type === "checkbox" || type === "radio")) ||
-                               type === "select-multiple" ) {
-                               return testChange.call( this, e );
-                       }
-               },
-
-               // Beforeactivate happens also before the previous element is blurred
-               // with this event you can't trigger a change event, but you can store
-               // information/focus[in] is not needed anymore
-               beforeactivate: function( e ) {
-                       var elem = e.target;
-
-                       if ( elem.nodeName.toLowerCase() === "input" && elem.type === "radio" ) {
-                               jQuery.data( elem, "_change_data", getVal(elem) );
-                       }
-               }
-       },
-       setup: function( data, namespaces, fn ) {
-               for ( var type in changeFilters ) {
-                       jQuery.event.add( this, type + ".specialChange." + fn.guid, changeFilters[type] );
-               }
-
-               return formElems.test( this.nodeName );
-       },
-       remove: function( namespaces, fn ) {
-               for ( var type in changeFilters ) {
-                       jQuery.event.remove( this, type + ".specialChange" + (fn ? "."+fn.guid : ""), changeFilters[type] );
-               }
-
-               return formElems.test( this.nodeName );
-       }
-};
-
-var changeFilters = jQuery.event.special.change.filters;
-
-}
-
-function trigger( type, elem, args ) {
-       args[0].type = type;
-       return jQuery.event.handle.apply( elem, args );
-}
-
-// Create "bubbling" focus and blur events
-if ( document.addEventListener ) {
-       jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-               jQuery.event.special[ fix ] = {
-                       setup: function() {
-                               this.addEventListener( orig, handler, true );
-                       }, 
-                       teardown: function() { 
-                               this.removeEventListener( orig, handler, true );
-                       }
-               };
-
-               function handler( e ) { 
-                       e = jQuery.event.fix( e );
-                       e.type = fix;
-                       return jQuery.event.handle.call( this, e );
-               }
-       });
-}
-
-jQuery.each(["bind", "one"], function( i, name ) {
-       jQuery.fn[ name ] = function( type, data, fn ) {
-               // Handle object literals
-               if ( typeof type === "object" ) {
-                       for ( var key in type ) {
-                               this[ name ](key, data, type[key], fn);
-                       }
-                       return this;
-               }
-               
-               if ( jQuery.isFunction( data ) ) {
-                       thisObject = fn;
-                       fn = data;
-                       data = undefined;
-               }
-
-               var handler = name === "one" ? jQuery.proxy( fn, function( event ) {
-                       jQuery( this ).unbind( event, handler );
-                       return fn.apply( this, arguments );
-               }) : fn;
-
-               return type === "unload" && name !== "one" ?
-                       this.one( type, data, fn, thisObject ) :
-                       this.each(function() {
-                               jQuery.event.add( this, type, handler, data );
-                       });
-       };
-});
-
-jQuery.fn.extend({
-       unbind: function( type, fn ) {
-               // Handle object literals
-               if ( typeof type === "object" && !type.preventDefault ) {
-                       for ( var key in type ) {
-                               this.unbind(key, type[key]);
-                       }
-                       return this;
-               }
-
-               return this.each(function() {
-                       jQuery.event.remove( this, type, fn );
-               });
-       },
-       trigger: function( type, data ) {
-               return this.each(function() {
-                       jQuery.event.trigger( type, data, this );
-               });
-       },
-
-       triggerHandler: function( type, data ) {
-               if ( this[0] ) {
-                       var event = jQuery.Event( type );
-                       event.preventDefault();
-                       event.stopPropagation();
-                       jQuery.event.trigger( event, data, this[0] );
-                       return event.result;
-               }
-       },
-
-       toggle: function( fn ) {
-               // Save reference to arguments for access in closure
-               var args = arguments, i = 1;
-
-               // link all the functions, so any of them can unbind this click handler
-               while ( i < args.length ) {
-                       jQuery.proxy( fn, args[ i++ ] );
-               }
-
-               return this.click( jQuery.proxy( fn, function( event ) {
-                       // Figure out which function to execute
-                       var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i;
-                       jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 );
-
-                       // Make sure that clicks stop
-                       event.preventDefault();
-
-                       // and execute the function
-                       return args[ lastToggle ].apply( this, arguments ) || false;
-               }));
-       },
-
-       hover: function( fnOver, fnOut ) {
-               return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
-       },
-
-       live: function( type, data, fn ) {
-               if ( jQuery.isFunction( data ) ) {
-                       fn = data;
-                       data = undefined;
-               }
-
-               jQuery( this.context ).bind( liveConvert( type, this.selector ), {
-                       data: data, selector: this.selector, live: type
-               }, fn );
-
-               return this;
-       },
-
-       die: function( type, fn ) {
-               jQuery( this.context ).unbind( liveConvert( type, this.selector ), fn ? { guid: fn.guid + this.selector + type } : null );
-               return this;
-       }
-});
-
-function liveHandler( event ) {
-       var stop = true, elems = [], selectors = [], args = arguments,
-               related, match, fn, elem, j, i, data,
-               live = jQuery.extend({}, jQuery.data( this, "events" ).live);
-
-       for ( j in live ) {
-               fn = live[j];
-               if ( fn.live === event.type ||
-                               fn.altLive && jQuery.inArray(event.type, fn.altLive) > -1 ) {
-
-                       data = fn.data;
-                       if ( !(data.beforeFilter && data.beforeFilter[event.type] && 
-                                       !data.beforeFilter[event.type](event)) ) {
-                               selectors.push( fn.selector );
-                       }
-               } else {
-                       delete live[j];
-               }
-       }
-
-       match = jQuery( event.target ).closest( selectors, event.currentTarget );
-
-       for ( i = 0, l = match.length; i < l; i++ ) {
-               for ( j in live ) {
-                       fn = live[j];
-                       elem = match[i].elem;
-                       related = null;
-
-                       if ( match[i].selector === fn.selector ) {
-                               // Those two events require additional checking
-                               if ( fn.live === "mouseenter" || fn.live === "mouseleave" ) {
-                                       related = jQuery( event.relatedTarget ).closest( fn.selector )[0];
-                               }
-
-                               if ( !related || related !== elem ) {
-                                       elems.push({ elem: elem, fn: fn });
-                               }
-                       }
-               }
-       }
-
-       for ( i = 0, l = elems.length; i < l; i++ ) {
-               match = elems[i];
-               event.currentTarget = match.elem;
-               event.data = match.fn.data;
-               if ( match.fn.apply( match.elem, args ) === false ) {
-                       stop = false;
-                       break;
-               }
-       }
-
-       return stop;
-}
-
-function liveConvert( type, selector ) {
-       return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "&")].join(".");
-}
-
-jQuery.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").split(" "), function( i, name ) {
-
-       // Handle event binding
-       jQuery.fn[ name ] = function( fn ) {
-               return fn ? this.bind( name, fn ) : this.trigger( name );
-       };
-
-       if ( jQuery.attrFn ) {
-               jQuery.attrFn[ name ] = true;
-       }
-});
-
-// Prevent memory leaks in IE
-// Window isn't included so as not to unbind existing unload events
-// More info:
-//  - http://isaacschlueter.com/2006/10/msie-memory-leaks/
-if ( window.attachEvent && !window.addEventListener ) {
-       window.attachEvent("onunload", function() {
-               for ( var id in jQuery.cache ) {
-                       if ( jQuery.cache[ id ].handle ) {
-                               // Try/Catch is to handle iframes being unloaded, see #4280
-                               try {
-                                       jQuery.event.remove( jQuery.cache[ id ].handle.elem );
-                               } catch(e) {}
-                       }
-               }
-       });
-}
-/*!
- * Sizzle CSS Selector Engine - v1.0
- *  Copyright 2009, The Dojo Foundation
- *  Released under the MIT, BSD, and GPL Licenses.
- *  More information: http://sizzlejs.com/
- */
-(function(){
-
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-       done = 0,
-       toString = Object.prototype.toString,
-       hasDuplicate = false,
-       baseHasDuplicate = true;
-
-// Here we check if the JavaScript engine is using some sort of
-// optimization where it does not always call our comparision
-// function. If that is the case, discard the hasDuplicate value.
-//   Thus far that includes Google Chrome.
-[0, 0].sort(function(){
-       baseHasDuplicate = false;
-       return 0;
-});
-
-var Sizzle = function(selector, context, results, seed) {
-       results = results || [];
-       var origContext = context = context || document;
-
-       if ( context.nodeType !== 1 && context.nodeType !== 9 ) {
-               return [];
-       }
-       
-       if ( !selector || typeof selector !== "string" ) {
-               return results;
-       }
-
-       var parts = [], m, set, checkSet, extra, prune = true, contextXML = isXML(context),
-               soFar = selector;
-       
-       // Reset the position of the chunker regexp (start from head)
-       while ( (chunker.exec(""), m = chunker.exec(soFar)) !== null ) {
-               soFar = m[3];
-               
-               parts.push( m[1] );
-               
-               if ( m[2] ) {
-                       extra = m[3];
-                       break;
-               }
-       }
-
-       if ( parts.length > 1 && origPOS.exec( selector ) ) {
-               if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
-                       set = posProcess( parts[0] + parts[1], context );
-               } else {
-                       set = Expr.relative[ parts[0] ] ?
-                               [ context ] :
-                               Sizzle( parts.shift(), context );
-
-                       while ( parts.length ) {
-                               selector = parts.shift();
-
-                               if ( Expr.relative[ selector ] ) {
-                                       selector += parts.shift();
-                               }
-                               
-                               set = posProcess( selector, set );
-                       }
-               }
-       } else {
-               // Take a shortcut and set the context if the root selector is an ID
-               // (but not if it'll be faster if the inner selector is an ID)
-               if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML &&
-                               Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) {
-                       var ret = Sizzle.find( parts.shift(), context, contextXML );
-                       context = ret.expr ? Sizzle.filter( ret.expr, ret.set )[0] : ret.set[0];
-               }
-
-               if ( context ) {
-                       var ret = seed ?
-                               { expr: parts.pop(), set: makeArray(seed) } :
-                               Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML );
-                       set = ret.expr ? Sizzle.filter( ret.expr, ret.set ) : ret.set;
-
-                       if ( parts.length > 0 ) {
-                               checkSet = makeArray(set);
-                       } else {
-                               prune = false;
-                       }
-
-                       while ( parts.length ) {
-                               var cur = parts.pop(), pop = cur;
-
-                               if ( !Expr.relative[ cur ] ) {
-                                       cur = "";
-                               } else {
-                                       pop = parts.pop();
-                               }
-
-                               if ( pop == null ) {
-                                       pop = context;
-                               }
-
-                               Expr.relative[ cur ]( checkSet, pop, contextXML );
-                       }
-               } else {
-                       checkSet = parts = [];
-               }
-       }
-
-       if ( !checkSet ) {
-               checkSet = set;
-       }
-
-       if ( !checkSet ) {
-               throw "Syntax error, unrecognized expression: " + (cur || selector);
-       }
-
-       if ( toString.call(checkSet) === "[object Array]" ) {
-               if ( !prune ) {
-                       results.push.apply( results, checkSet );
-               } else if ( context && context.nodeType === 1 ) {
-                       for ( var i = 0; checkSet[i] != null; i++ ) {
-                               if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
-                                       results.push( set[i] );
-                               }
-                       }
-               } else {
-                       for ( var i = 0; checkSet[i] != null; i++ ) {
-                               if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
-                                       results.push( set[i] );
-                               }
-                       }
-               }
-       } else {
-               makeArray( checkSet, results );
-       }
-
-       if ( extra ) {
-               Sizzle( extra, origContext, results, seed );
-               Sizzle.uniqueSort( results );
-       }
-
-       return results;
-};
-
-Sizzle.uniqueSort = function(results){
-       if ( sortOrder ) {
-               hasDuplicate = baseHasDuplicate;
-               results.sort(sortOrder);
-
-               if ( hasDuplicate ) {
-                       for ( var i = 1; i < results.length; i++ ) {
-                               if ( results[i] === results[i-1] ) {
-                                       results.splice(i--, 1);
-                               }
-                       }
-               }
-       }
-
-       return results;
-};
-
-Sizzle.matches = function(expr, set){
-       return Sizzle(expr, null, null, set);
-};
-
-Sizzle.find = function(expr, context, isXML){
-       var set, match;
-
-       if ( !expr ) {
-               return [];
-       }
-
-       for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
-               var type = Expr.order[i], match;
-               
-               if ( (match = Expr.leftMatch[ type ].exec( expr )) ) {
-                       var left = match[1];
-                       match.splice(1,1);
-
-                       if ( left.substr( left.length - 1 ) !== "\\" ) {
-                               match[1] = (match[1] || "").replace(/\\/g, "");
-                               set = Expr.find[ type ]( match, context, isXML );
-                               if ( set != null ) {
-                                       expr = expr.replace( Expr.match[ type ], "" );
-                                       break;
-                               }
-                       }
-               }
-       }
-
-       if ( !set ) {
-               set = context.getElementsByTagName("*");
-       }
-
-       return {set: set, expr: expr};
-};
-
-Sizzle.filter = function(expr, set, inplace, not){
-       var old = expr, result = [], curLoop = set, match, anyFound,
-               isXMLFilter = set && set[0] && isXML(set[0]);
-
-       while ( expr && set.length ) {
-               for ( var type in Expr.filter ) {
-                       if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) {
-                               var filter = Expr.filter[ type ], found, item, left = match[1];
-                               anyFound = false;
-
-                               match.splice(1,1);
-
-                               if ( left.substr( left.length - 1 ) === "\\" ) {
-                                       continue;
-                               }
-
-                               if ( curLoop === result ) {
-                                       result = [];
-                               }
-
-                               if ( Expr.preFilter[ type ] ) {
-                                       match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
-
-                                       if ( !match ) {
-                                               anyFound = found = true;
-                                       } else if ( match === true ) {
-                                               continue;
-                                       }
-                               }
-
-                               if ( match ) {
-                                       for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
-                                               if ( item ) {
-                                                       found = filter( item, match, i, curLoop );
-                                                       var pass = not ^ !!found;
-
-                                                       if ( inplace && found != null ) {
-                                                               if ( pass ) {
-                                                                       anyFound = true;
-                                                               } else {
-                                                                       curLoop[i] = false;
-                                                               }
-                                                       } else if ( pass ) {
-                                                               result.push( item );
-                                                               anyFound = true;
-                                                       }
-                                               }
-                                       }
-                               }
-
-                               if ( found !== undefined ) {
-                                       if ( !inplace ) {
-                                               curLoop = result;
-                                       }
-
-                                       expr = expr.replace( Expr.match[ type ], "" );
-
-                                       if ( !anyFound ) {
-                                               return [];
-                                       }
-
-                                       break;
-                               }
-                       }
-               }
-
-               // Improper expression
-               if ( expr === old ) {
-                       if ( anyFound == null ) {
-                               throw "Syntax error, unrecognized expression: " + expr;
-                       } else {
-                               break;
-                       }
-               }
-
-               old = expr;
-       }
-
-       return curLoop;
-};
-
-var Expr = Sizzle.selectors = {
-       order: [ "ID", "NAME", "TAG" ],
-       match: {
-               ID: /#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
-               CLASS: /\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
-               NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,
-               ATTR: /\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
-               TAG: /^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,
-               CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
-               POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
-               PSEUDO: /:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
-       },
-       leftMatch: {},
-       attrMap: {
-               "class": "className",
-               "for": "htmlFor"
-       },
-       attrHandle: {
-               href: function(elem){
-                       return elem.getAttribute("href");
-               }
-       },
-       relative: {
-               "+": function(checkSet, part){
-                       var isPartStr = typeof part === "string",
-                               isTag = isPartStr && !/\W/.test(part),
-                               isPartStrNotTag = isPartStr && !isTag;
-
-                       if ( isTag ) {
-                               part = part.toLowerCase();
-                       }
-
-                       for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
-                               if ( (elem = checkSet[i]) ) {
-                                       while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
-
-                                       checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ?
-                                               elem || false :
-                                               elem === part;
-                               }
-                       }
-
-                       if ( isPartStrNotTag ) {
-                               Sizzle.filter( part, checkSet, true );
-                       }
-               },
-               ">": function(checkSet, part){
-                       var isPartStr = typeof part === "string";
-
-                       if ( isPartStr && !/\W/.test(part) ) {
-                               part = part.toLowerCase();
-
-                               for ( var i = 0, l = checkSet.length; i < l; i++ ) {
-                                       var elem = checkSet[i];
-                                       if ( elem ) {
-                                               var parent = elem.parentNode;
-                                               checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false;
-                                       }
-                               }
-                       } else {
-                               for ( var i = 0, l = checkSet.length; i < l; i++ ) {
-                                       var elem = checkSet[i];
-                                       if ( elem ) {
-                                               checkSet[i] = isPartStr ?
-                                                       elem.parentNode :
-                                                       elem.parentNode === part;
-                                       }
-                               }
-
-                               if ( isPartStr ) {
-                                       Sizzle.filter( part, checkSet, true );
-                               }
-                       }
-               },
-               "": function(checkSet, part, isXML){
-                       var doneName = done++, checkFn = dirCheck;
-
-                       if ( typeof part === "string" && !/\W/.test(part) ) {
-                               var nodeCheck = part = part.toLowerCase();
-                               checkFn = dirNodeCheck;
-                       }
-
-                       checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
-               },
-               "~": function(checkSet, part, isXML){
-                       var doneName = done++, checkFn = dirCheck;
-
-                       if ( typeof part === "string" && !/\W/.test(part) ) {
-                               var nodeCheck = part = part.toLowerCase();
-                               checkFn = dirNodeCheck;
-                       }
-
-                       checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
-               }
-       },
-       find: {
-               ID: function(match, context, isXML){
-                       if ( typeof context.getElementById !== "undefined" && !isXML ) {
-                               var m = context.getElementById(match[1]);
-                               return m ? [m] : [];
-                       }
-               },
-               NAME: function(match, context){
-                       if ( typeof context.getElementsByName !== "undefined" ) {
-                               var ret = [], results = context.getElementsByName(match[1]);
-
-                               for ( var i = 0, l = results.length; i < l; i++ ) {
-                                       if ( results[i].getAttribute("name") === match[1] ) {
-                                               ret.push( results[i] );
-                                       }
-                               }
-
-                               return ret.length === 0 ? null : ret;
-                       }
-               },
-               TAG: function(match, context){
-                       return context.getElementsByTagName(match[1]);
-               }
-       },
-       preFilter: {
-               CLASS: function(match, curLoop, inplace, result, not, isXML){
-                       match = " " + match[1].replace(/\\/g, "") + " ";
-
-                       if ( isXML ) {
-                               return match;
-                       }
-
-                       for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
-                               if ( elem ) {
-                                       if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n]/g, " ").indexOf(match) >= 0) ) {
-                                               if ( !inplace ) {
-                                                       result.push( elem );
-                                               }
-                                       } else if ( inplace ) {
-                                               curLoop[i] = false;
-                                       }
-                               }
-                       }
-
-                       return false;
-               },
-               ID: function(match){
-                       return match[1].replace(/\\/g, "");
-               },
-               TAG: function(match, curLoop){
-                       return match[1].toLowerCase();
-               },
-               CHILD: function(match){
-                       if ( match[1] === "nth" ) {
-                               // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
-                               var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
-                                       match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" ||
-                                       !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
-
-                               // calculate the numbers (first)n+(last) including if they are negative
-                               match[2] = (test[1] + (test[2] || 1)) - 0;
-                               match[3] = test[3] - 0;
-                       }
-
-                       // TODO: Move to normal caching system
-                       match[0] = done++;
-
-                       return match;
-               },
-               ATTR: function(match, curLoop, inplace, result, not, isXML){
-                       var name = match[1].replace(/\\/g, "");
-                       
-                       if ( !isXML && Expr.attrMap[name] ) {
-                               match[1] = Expr.attrMap[name];
-                       }
-
-                       if ( match[2] === "~=" ) {
-                               match[4] = " " + match[4] + " ";
-                       }
-
-                       return match;
-               },
-               PSEUDO: function(match, curLoop, inplace, result, not){
-                       if ( match[1] === "not" ) {
-                               // If we're dealing with a complex expression, or a simple one
-                               if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) {
-                                       match[3] = Sizzle(match[3], null, null, curLoop);
-                               } else {
-                                       var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
-                                       if ( !inplace ) {
-                                               result.push.apply( result, ret );
-                                       }
-                                       return false;
-                               }
-                       } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
-                               return true;
-                       }
-                       
-                       return match;
-               },
-               POS: function(match){
-                       match.unshift( true );
-                       return match;
-               }
-       },
-       filters: {
-               enabled: function(elem){
-                       return elem.disabled === false && elem.type !== "hidden";
-               },
-               disabled: function(elem){
-                       return elem.disabled === true;
-               },
-               checked: function(elem){
-                       return elem.checked === true;
-               },
-               selected: function(elem){
-                       // Accessing this property makes selected-by-default
-                       // options in Safari work properly
-                       elem.parentNode.selectedIndex;
-                       return elem.selected === true;
-               },
-               parent: function(elem){
-                       return !!elem.firstChild;
-               },
-               empty: function(elem){
-                       return !elem.firstChild;
-               },
-               has: function(elem, i, match){
-                       return !!Sizzle( match[3], elem ).length;
-               },
-               header: function(elem){
-                       return /h\d/i.test( elem.nodeName );
-               },
-               text: function(elem){
-                       return "text" === elem.type;
-               },
-               radio: function(elem){
-                       return "radio" === elem.type;
-               },
-               checkbox: function(elem){
-                       return "checkbox" === elem.type;
-               },
-               file: function(elem){
-                       return "file" === elem.type;
-               },
-               password: function(elem){
-                       return "password" === elem.type;
-               },
-               submit: function(elem){
-                       return "submit" === elem.type;
-               },
-               image: function(elem){
-                       return "image" === elem.type;
-               },
-               reset: function(elem){
-                       return "reset" === elem.type;
-               },
-               button: function(elem){
-                       return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
-               },
-               input: function(elem){
-                       return /input|select|textarea|button/i.test(elem.nodeName);
-               }
-       },
-       setFilters: {
-               first: function(elem, i){
-                       return i === 0;
-               },
-               last: function(elem, i, match, array){
-                       return i === array.length - 1;
-               },
-               even: function(elem, i){
-                       return i % 2 === 0;
-               },
-               odd: function(elem, i){
-                       return i % 2 === 1;
-               },
-               lt: function(elem, i, match){
-                       return i < match[3] - 0;
-               },
-               gt: function(elem, i, match){
-                       return i > match[3] - 0;
-               },
-               nth: function(elem, i, match){
-                       return match[3] - 0 === i;
-               },
-               eq: function(elem, i, match){
-                       return match[3] - 0 === i;
-               }
-       },
-       filter: {
-               PSEUDO: function(elem, match, i, array){
-                       var name = match[1], filter = Expr.filters[ name ];
-
-                       if ( filter ) {
-                               return filter( elem, i, match, array );
-                       } else if ( name === "contains" ) {
-                               return (elem.textContent || elem.innerText || getText([ elem ]) || "").indexOf(match[3]) >= 0;
-                       } else if ( name === "not" ) {
-                               var not = match[3];
-
-                               for ( var i = 0, l = not.length; i < l; i++ ) {
-                                       if ( not[i] === elem ) {
-                                               return false;
-                                       }
-                               }
-
-                               return true;
-                       } else {
-                               throw "Syntax error, unrecognized expression: " + name;
-                       }
-               },
-               CHILD: function(elem, match){
-                       var type = match[1], node = elem;
-                       switch (type) {
-                               case 'only':
-                               case 'first':
-                                       while ( (node = node.previousSibling) )  {
-                                               if ( node.nodeType === 1 ) { 
-                                                       return false; 
-                                               }
-                                       }
-                                       if ( type === "first" ) { 
-                                               return true; 
-                                       }
-                                       node = elem;
-                               case 'last':
-                                       while ( (node = node.nextSibling) )      {
-                                               if ( node.nodeType === 1 ) { 
-                                                       return false; 
-                                               }
-                                       }
-                                       return true;
-                               case 'nth':
-                                       var first = match[2], last = match[3];
-
-                                       if ( first === 1 && last === 0 ) {
-                                               return true;
-                                       }
-                                       
-                                       var doneName = match[0],
-                                               parent = elem.parentNode;
-       
-                                       if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
-                                               var count = 0;
-                                               for ( node = parent.firstChild; node; node = node.nextSibling ) {
-                                                       if ( node.nodeType === 1 ) {
-                                                               node.nodeIndex = ++count;
-                                                       }
-                                               } 
-                                               parent.sizcache = doneName;
-                                       }
-                                       
-                                       var diff = elem.nodeIndex - last;
-                                       if ( first === 0 ) {
-                                               return diff === 0;
-                                       } else {
-                                               return ( diff % first === 0 && diff / first >= 0 );
-                                       }
-                       }
-               },
-               ID: function(elem, match){
-                       return elem.nodeType === 1 && elem.getAttribute("id") === match;
-               },
-               TAG: function(elem, match){
-                       return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match;
-               },
-               CLASS: function(elem, match){
-                       return (" " + (elem.className || elem.getAttribute("class")) + " ")
-                               .indexOf( match ) > -1;
-               },
-               ATTR: function(elem, match){
-                       var name = match[1],
-                               result = Expr.attrHandle[ name ] ?
-                                       Expr.attrHandle[ name ]( elem ) :
-                                       elem[ name ] != null ?
-                                               elem[ name ] :
-                                               elem.getAttribute( name ),
-                               value = result + "",
-                               type = match[2],
-                               check = match[4];
-
-                       return result == null ?
-                               type === "!=" :
-                               type === "=" ?
-                               value === check :
-                               type === "*=" ?
-                               value.indexOf(check) >= 0 :
-                               type === "~=" ?
-                               (" " + value + " ").indexOf(check) >= 0 :
-                               !check ?
-                               value && result !== false :
-                               type === "!=" ?
-                               value !== check :
-                               type === "^=" ?
-                               value.indexOf(check) === 0 :
-                               type === "$=" ?
-                               value.substr(value.length - check.length) === check :
-                               type === "|=" ?
-                               value === check || value.substr(0, check.length + 1) === check + "-" :
-                               false;
-               },
-               POS: function(elem, match, i, array){
-                       var name = match[2], filter = Expr.setFilters[ name ];
-
-                       if ( filter ) {
-                               return filter( elem, i, match, array );
-                       }
-               }
-       }
-};
-
-var origPOS = Expr.match.POS;
-
-for ( var type in Expr.match ) {
-       Expr.match[ type ] = new RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
-       Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, function(all, num){
-               return "\\" + (num - 0 + 1);
-       }));
-}
-
-var makeArray = function(array, results) {
-       array = Array.prototype.slice.call( array, 0 );
-
-       if ( results ) {
-               results.push.apply( results, array );
-               return results;
-       }
-       
-       return array;
-};
-
-// Perform a simple check to determine if the browser is capable of
-// converting a NodeList to an array using builtin methods.
-try {
-       Array.prototype.slice.call( document.documentElement.childNodes, 0 );
-
-// Provide a fallback method if it does not work
-} catch(e){
-       makeArray = function(array, results) {
-               var ret = results || [];
-
-               if ( toString.call(array) === "[object Array]" ) {
-                       Array.prototype.push.apply( ret, array );
-               } else {
-                       if ( typeof array.length === "number" ) {
-                               for ( var i = 0, l = array.length; i < l; i++ ) {
-                                       ret.push( array[i] );
-                               }
-                       } else {
-                               for ( var i = 0; array[i]; i++ ) {
-                                       ret.push( array[i] );
-                               }
-                       }
-               }
-
-               return ret;
-       };
-}
-
-var sortOrder;
-
-if ( document.documentElement.compareDocumentPosition ) {
-       sortOrder = function( a, b ) {
-               if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) {
-                       if ( a == b ) {
-                               hasDuplicate = true;
-                       }
-                       return a.compareDocumentPosition ? -1 : 1;
-               }
-
-               var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
-               if ( ret === 0 ) {
-                       hasDuplicate = true;
-               }
-               return ret;
-       };
-} else if ( "sourceIndex" in document.documentElement ) {
-       sortOrder = function( a, b ) {
-               if ( !a.sourceIndex || !b.sourceIndex ) {
-                       if ( a == b ) {
-                               hasDuplicate = true;
-                       }
-                       return a.sourceIndex ? -1 : 1;
-               }
-
-               var ret = a.sourceIndex - b.sourceIndex;
-               if ( ret === 0 ) {
-                       hasDuplicate = true;
-               }
-               return ret;
-       };
-} else if ( document.createRange ) {
-       sortOrder = function( a, b ) {
-               if ( !a.ownerDocument || !b.ownerDocument ) {
-                       if ( a == b ) {
-                               hasDuplicate = true;
-                       }
-                       return a.ownerDocument ? -1 : 1;
-               }
-
-               var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
-               aRange.setStart(a, 0);
-               aRange.setEnd(a, 0);
-               bRange.setStart(b, 0);
-               bRange.setEnd(b, 0);
-               var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
-               if ( ret === 0 ) {
-                       hasDuplicate = true;
-               }
-               return ret;
-       };
-}
-
-// Utility function for retreiving the text value of an array of DOM nodes
-function getText( elems ) {
-       var ret = "", elem;
-
-       for ( var i = 0; elems[i]; i++ ) {
-               elem = elems[i];
-
-               // Get the text from text nodes and CDATA nodes
-               if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
-                       ret += elem.nodeValue;
-
-               // Traverse everything else, except comment nodes
-               } else if ( elem.nodeType !== 8 ) {
-                       ret += getText( elem.childNodes );
-               }
-       }
-
-       return ret;
-}
-
-// Check to see if the browser returns elements by name when
-// querying by getElementById (and provide a workaround)
-(function(){
-       // We're going to inject a fake input element with a specified name
-       var form = document.createElement("div"),
-               id = "script" + (new Date).getTime();
-       form.innerHTML = "<a name='" + id + "'/>";
-
-       // Inject it into the root element, check its status, and remove it quickly
-       var root = document.documentElement;
-       root.insertBefore( form, root.firstChild );
-
-       // The workaround has to do additional checks after a getElementById
-       // Which slows things down for other browsers (hence the branching)
-       if ( document.getElementById( id ) ) {
-               Expr.find.ID = function(match, context, isXML){
-                       if ( typeof context.getElementById !== "undefined" && !isXML ) {
-                               var m = context.getElementById(match[1]);
-                               return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
-                       }
-               };
-
-               Expr.filter.ID = function(elem, match){
-                       var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
-                       return elem.nodeType === 1 && node && node.nodeValue === match;
-               };
-       }
-
-       root.removeChild( form );
-       root = form = null; // release memory in IE
-})();
-
-(function(){
-       // Check to see if the browser returns only elements
-       // when doing getElementsByTagName("*")
-
-       // Create a fake element
-       var div = document.createElement("div");
-       div.appendChild( document.createComment("") );
-
-       // Make sure no comments are found
-       if ( div.getElementsByTagName("*").length > 0 ) {
-               Expr.find.TAG = function(match, context){
-                       var results = context.getElementsByTagName(match[1]);
-
-                       // Filter out possible comments
-                       if ( match[1] === "*" ) {
-                               var tmp = [];
-
-                               for ( var i = 0; results[i]; i++ ) {
-                                       if ( results[i].nodeType === 1 ) {
-                                               tmp.push( results[i] );
-                                       }
-                               }
-
-                               results = tmp;
-                       }
-
-                       return results;
-               };
-       }
-
-       // Check to see if an attribute returns normalized href attributes
-       div.innerHTML = "<a href='#'></a>";
-       if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
-                       div.firstChild.getAttribute("href") !== "#" ) {
-               Expr.attrHandle.href = function(elem){
-                       return elem.getAttribute("href", 2);
-               };
-       }
-
-       div = null; // release memory in IE
-})();
-
-if ( document.querySelectorAll ) {
-       (function(){
-               var oldSizzle = Sizzle, div = document.createElement("div");
-               div.innerHTML = "<p class='TEST'></p>";
-
-               // Safari can't handle uppercase or unicode characters when
-               // in quirks mode.
-               if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
-                       return;
-               }
-       
-               Sizzle = function(query, context, extra, seed){
-                       context = context || document;
-
-                       // Only use querySelectorAll on non-XML documents
-                       // (ID selectors don't work in non-HTML documents)
-                       if ( !seed && context.nodeType === 9 && !isXML(context) ) {
-                               try {
-                                       return makeArray( context.querySelectorAll(query), extra );
-                               } catch(e){}
-                       }
-               
-                       return oldSizzle(query, context, extra, seed);
-               };
-
-               for ( var prop in oldSizzle ) {
-                       Sizzle[ prop ] = oldSizzle[ prop ];
-               }
-
-               div = null; // release memory in IE
-       })();
-}
-
-(function(){
-       var div = document.createElement("div");
-
-       div.innerHTML = "<div class='test e'></div><div class='test'></div>";
-
-       // Opera can't find a second classname (in 9.6)
-       // Also, make sure that getElementsByClassName actually exists
-       if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) {
-               return;
-       }
-
-       // Safari caches class attributes, doesn't catch changes (in 3.2)
-       div.lastChild.className = "e";
-
-       if ( div.getElementsByClassName("e").length === 1 ) {
-               return;
-       }
-       
-       Expr.order.splice(1, 0, "CLASS");
-       Expr.find.CLASS = function(match, context, isXML) {
-               if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
-                       return context.getElementsByClassName(match[1]);
-               }
-       };
-
-       div = null; // release memory in IE
-})();
-
-function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
-       for ( var i = 0, l = checkSet.length; i < l; i++ ) {
-               var elem = checkSet[i];
-               if ( elem ) {
-                       elem = elem[dir];
-                       var match = false;
-
-                       while ( elem ) {
-                               if ( elem.sizcache === doneName ) {
-                                       match = checkSet[elem.sizset];
-                                       break;
-                               }
-
-                               if ( elem.nodeType === 1 && !isXML ){
-                                       elem.sizcache = doneName;
-                                       elem.sizset = i;
-                               }
-
-                               if ( elem.nodeName.toLowerCase() === cur ) {
-                                       match = elem;
-                                       break;
-                               }
-
-                               elem = elem[dir];
-                       }
-
-                       checkSet[i] = match;
-               }
-       }
-}
-
-function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
-       for ( var i = 0, l = checkSet.length; i < l; i++ ) {
-               var elem = checkSet[i];
-               if ( elem ) {
-                       elem = elem[dir];
-                       var match = false;
-
-                       while ( elem ) {
-                               if ( elem.sizcache === doneName ) {
-                                       match = checkSet[elem.sizset];
-                                       break;
-                               }
-
-                               if ( elem.nodeType === 1 ) {
-                                       if ( !isXML ) {
-                                               elem.sizcache = doneName;
-                                               elem.sizset = i;
-                                       }
-                                       if ( typeof cur !== "string" ) {
-                                               if ( elem === cur ) {
-                                                       match = true;
-                                                       break;
-                                               }
-
-                                       } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
-                                               match = elem;
-                                               break;
-                                       }
-                               }
-
-                               elem = elem[dir];
-                       }
-
-                       checkSet[i] = match;
-               }
-       }
-}
-
-var contains = document.compareDocumentPosition ? function(a, b){
-       return a.compareDocumentPosition(b) & 16;
-} : function(a, b){
-       return a !== b && (a.contains ? a.contains(b) : true);
-};
-
-var isXML = function(elem){
-       // documentElement is verified for cases where it doesn't yet exist
-       // (such as loading iframes in IE - #4833) 
-       var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement;
-       return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-var posProcess = function(selector, context){
-       var tmpSet = [], later = "", match,
-               root = context.nodeType ? [context] : context;
-
-       // Position selectors must be done after the filter
-       // And so must :not(positional) so we move all PSEUDOs to the end
-       while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
-               later += match[0];
-               selector = selector.replace( Expr.match.PSEUDO, "" );
-       }
-
-       selector = Expr.relative[selector] ? selector + "*" : selector;
-
-       for ( var i = 0, l = root.length; i < l; i++ ) {
-               Sizzle( selector, root[i], tmpSet );
-       }
-
-       return Sizzle.filter( later, tmpSet );
-};
-
-// EXPOSE
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.filters;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.getText = getText;
-jQuery.isXMLDoc = isXML;
-jQuery.contains = contains;
-
-return;
-
-window.Sizzle = Sizzle;
-
-})();
-var runtil = /Until$/,
-       rparentsprev = /^(?:parents|prevUntil|prevAll)/,
-       // Note: This RegExp should be improved, or likely pulled from Sizzle
-       rmultiselector = /,/,
-       slice = Array.prototype.slice;
-
-// Implement the identical functionality for filter and not
-var winnow = function( elements, qualifier, keep ) {
-       if ( jQuery.isFunction( qualifier ) ) {
-               return jQuery.grep(elements, function( elem, i ) {
-                       return !!qualifier.call( elem, i, elem ) === keep;
-               });
-
-       } else if ( qualifier.nodeType ) {
-               return jQuery.grep(elements, function( elem, i ) {
-                       return (elem === qualifier) === keep;
-               });
-
-       } else if ( typeof qualifier === "string" ) {
-               var filtered = jQuery.grep(elements, function( elem ) {
-                       return elem.nodeType === 1;
-               });
-
-               if ( isSimple.test( qualifier ) ) {
-                       return jQuery.filter(qualifier, filtered, !keep);
-               } else {
-                       qualifier = jQuery.filter( qualifier, elements );
-               }
-       }
-
-       return jQuery.grep(elements, function( elem, i ) {
-               return (jQuery.inArray( elem, qualifier ) >= 0) === keep;
-       });
-};
-
-jQuery.fn.extend({
-       find: function( selector ) {
-               var ret = this.pushStack( "", "find", selector ), length = 0;
-
-               for ( var i = 0, l = this.length; i < l; i++ ) {
-                       length = ret.length;
-                       jQuery.find( selector, this[i], ret );
-
-                       if ( i > 0 ) {
-                               // Make sure that the results are unique
-                               for ( var n = length; n < ret.length; n++ ) {
-                                       for ( var r = 0; r < length; r++ ) {
-                                               if ( ret[r] === ret[n] ) {
-                                                       ret.splice(n--, 1);
-                                                       break;
-                                               }
-                                       }
-                               }
-                       }
-               }
-
-               return ret;
-       },
-
-       has: function( target ) {
-               var targets = jQuery( target );
-               return this.filter(function() {
-                       for ( var i = 0, l = targets.length; i < l; i++ ) {
-                               if ( jQuery.contains( this, targets[i] ) ) {
-                                       return true;
-                               }
-                       }
-               });
-       },
-
-       not: function( selector ) {
-               return this.pushStack( winnow(this, selector, false), "not", selector);
-       },
-
-       filter: function( selector ) {
-               return this.pushStack( winnow(this, selector, true), "filter", selector );
-       },
-       
-       is: function( selector ) {
-               return !!selector && jQuery.filter( selector, this ).length > 0;
-       },
-
-       closest: function( selectors, context ) {
-               if ( jQuery.isArray( selectors ) ) {
-                       var ret = [], cur = this[0], match, matches = {}, selector;
-
-                       if ( cur && selectors.length ) {
-                               for ( var i = 0, l = selectors.length; i < l; i++ ) {
-                                       selector = selectors[i];
-
-                                       if ( !matches[selector] ) {
-                                               matches[selector] = jQuery.expr.match.POS.test( selector ) ? 
-                                                       jQuery( selector, context || this.context ) :
-                                                       selector;
-                                       }
-                               }
-
-                               while ( cur && cur.ownerDocument && cur !== context ) {
-                                       for ( selector in matches ) {
-                                               match = matches[selector];
-
-                                               if ( match.jquery ? match.index(cur) > -1 : jQuery(cur).is(match) ) {
-                                                       ret.push({ selector: selector, elem: cur });
-                                                       delete matches[selector];
-                                               }
-                                       }
-                                       cur = cur.parentNode;
-                               }
-                       }
-
-                       return ret;
-               }
-
-               var pos = jQuery.expr.match.POS.test( selectors ) ? 
-                       jQuery( selectors, context || this.context ) : null;
-
-               return this.map(function( i, cur ) {
-                       while ( cur && cur.ownerDocument && cur !== context ) {
-                               if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selectors) ) {
-                                       return cur;
-                               }
-                               cur = cur.parentNode;
-                       }
-                       return null;
-               });
-       },
-       
-       // Determine the position of an element within
-       // the matched set of elements
-       index: function( elem ) {
-               if ( !elem || typeof elem === "string" ) {
-                       return jQuery.inArray( this[0],
-                               // If it receives a string, the selector is used
-                               // If it receives nothing, the siblings are used
-                               elem ? jQuery( elem ) : this.parent().children() );
-               }
-               // Locate the position of the desired element
-               return jQuery.inArray(
-                       // If it receives a jQuery object, the first element is used
-                       elem.jquery ? elem[0] : elem, this );
-       },
-
-       add: function( selector, context ) {
-               var set = typeof selector === "string" ?
-                               jQuery( selector, context || this.context ) :
-                               jQuery.makeArray( selector ),
-                       all = jQuery.merge( this.get(), set );
-
-               return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ?
-                       all :
-                       jQuery.unique( all ) );
-       },
-
-       andSelf: function() {
-               return this.add( this.prevObject );
-       }
-});
-
-// A painfully simple check to see if an element is disconnected
-// from a document (should be improved, where feasible).
-function isDisconnected( node ) {
-       return !node || !node.parentNode || node.parentNode.nodeType === 11;
-}
-
-jQuery.each({
-       parent: function( elem ) {
-               var parent = elem.parentNode;
-               return parent && parent.nodeType !== 11 ? parent : null;
-       },
-       parents: function( elem ) {
-               return jQuery.dir( elem, "parentNode" );
-       },
-       parentsUntil: function( elem, i, until ) {
-               return jQuery.dir( elem, "parentNode", until );
-       },
-       next: function( elem ) {
-               return jQuery.nth( elem, 2, "nextSibling" );
-       },
-       prev: function( elem ) {
-               return jQuery.nth( elem, 2, "previousSibling" );
-       },
-       nextAll: function( elem ) {
-               return jQuery.dir( elem, "nextSibling" );
-       },
-       prevAll: function( elem ) {
-               return jQuery.dir( elem, "previousSibling" );
-       },
-       nextUntil: function( elem, i, until ) {
-               return jQuery.dir( elem, "nextSibling", until );
-       },
-       prevUntil: function( elem, i, until ) {
-               return jQuery.dir( elem, "previousSibling", until );
-       },
-       siblings: function( elem ) {
-               return jQuery.sibling( elem.parentNode.firstChild, elem );
-       },
-       children: function( elem ) {
-               return jQuery.sibling( elem.firstChild );
-       },
-       contents: function( elem ) {
-               return jQuery.nodeName( elem, "iframe" ) ?
-                       elem.contentDocument || elem.contentWindow.document :
-                       jQuery.makeArray( elem.childNodes );
-       }
-}, function( name, fn ) {
-       jQuery.fn[ name ] = function( until, selector ) {
-               var ret = jQuery.map( this, fn, until );
-               
-               if ( !runtil.test( name ) ) {
-                       selector = until;
-               }
-
-               if ( selector && typeof selector === "string" ) {
-                       ret = jQuery.filter( selector, ret );
-               }
-
-               ret = this.length > 1 ? jQuery.unique( ret ) : ret;
-
-               if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) {
-                       ret = ret.reverse();
-               }
-
-               return this.pushStack( ret, name, slice.call(arguments).join(",") );
-       };
-});
-
-jQuery.extend({
-       filter: function( expr, elems, not ) {
-               if ( not ) {
-                       expr = ":not(" + expr + ")";
-               }
-
-               return jQuery.find.matches(expr, elems);
-       },
-       
-       dir: function( elem, dir, until ) {
-               var matched = [], cur = elem[dir];
-               while ( cur && cur.nodeType !== 9 && (until === undefined || !jQuery( cur ).is( until )) ) {
-                       if ( cur.nodeType === 1 ) {
-                               matched.push( cur );
-                       }
-                       cur = cur[dir];
-               }
-               return matched;
-       },
-
-       nth: function( cur, result, dir, elem ) {
-               result = result || 1;
-               var num = 0;
-
-               for ( ; cur; cur = cur[dir] ) {
-                       if ( cur.nodeType === 1 && ++num === result ) {
-                               break;
-                       }
-               }
-
-               return cur;
-       },
-
-       sibling: function( n, elem ) {
-               var r = [];
-
-               for ( ; n; n = n.nextSibling ) {
-                       if ( n.nodeType === 1 && n !== elem ) {
-                               r.push( n );
-                       }
-               }
-
-               return r;
-       }
-});
-var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
-       rleadingWhitespace = /^\s+/,
-       rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
-       rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
-       rtagName = /<([\w:]+)/,
-       rtbody = /<tbody/i,
-       rhtml = /<|&\w+;/,
-       fcloseTag = function( all, front, tag ) {
-               return rselfClosing.test( tag ) ?
-                       all :
-                       front + "></" + tag + ">";
-       },
-       wrapMap = {
-               option: [ 1, "<select multiple='multiple'>", "</select>" ],
-               legend: [ 1, "<fieldset>", "</fieldset>" ],
-               thead: [ 1, "<table>", "</table>" ],
-               tr: [ 2, "<table><tbody>", "</tbody></table>" ],
-               td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-               col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
-               area: [ 1, "<map>", "</map>" ],
-               _default: [ 0, "", "" ]
-       };
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-// IE can't serialize <link> and <script> tags normally
-if ( !jQuery.support.htmlSerialize ) {
-       wrapMap._default = [ 1, "div<div>", "</div>" ];
-}
-
-jQuery.fn.extend({
-       text: function( text ) {
-               if ( jQuery.isFunction(text) ) {
-                       return this.each(function(i) {
-                               var self = jQuery(this);
-                               return self.text( text.call(this, i, self.text()) );
-                       });
-               }
-
-               if ( typeof text !== "object" && text !== undefined ) {
-                       return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
-               }
-
-               return jQuery.getText( this );
-       },
-
-       wrapAll: function( html ) {
-               if ( jQuery.isFunction( html ) ) {
-                       return this.each(function(i) {
-                               jQuery(this).wrapAll( html.call(this, i) );
-                       });
-               }
-
-               if ( this[0] ) {
-                       // The elements to wrap the target around
-                       var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
-                       if ( this[0].parentNode ) {
-                               wrap.insertBefore( this[0] );
-                       }
-
-                       wrap.map(function() {
-                               var elem = this;
-
-                               while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
-                                       elem = elem.firstChild;
-                               }
-
-                               return elem;
-                       }).append(this);
-               }
-
-               return this;
-       },
-
-       wrapInner: function( html ) {
-               return this.each(function() {
-                       var self = jQuery( this ), contents = self.contents();
-
-                       if ( contents.length ) {
-                               contents.wrapAll( html );
-
-                       } else {
-                               self.append( html );
-                       }
-               });
-       },
-
-       wrap: function( html ) {
-               return this.each(function() {
-                       jQuery( this ).wrapAll( html );
-               });
-       },
-
-       unwrap: function() {
-               return this.parent().each(function() {
-                       if ( !jQuery.nodeName( this, "body" ) ) {
-                               jQuery( this ).replaceWith( this.childNodes );
-                       }
-               }).end();
-       },
-
-       append: function() {
-               return this.domManip(arguments, true, function( elem ) {
-                       if ( this.nodeType === 1 ) {
-                               this.appendChild( elem );
-                       }
-               });
-       },
-
-       prepend: function() {
-               return this.domManip(arguments, true, function( elem ) {
-                       if ( this.nodeType === 1 ) {
-                               this.insertBefore( elem, this.firstChild );
-                       }
-               });
-       },
-
-       before: function() {
-               if ( this[0] && this[0].parentNode ) {
-                       return this.domManip(arguments, false, function( elem ) {
-                               this.parentNode.insertBefore( elem, this );
-                       });
-               } else if ( arguments.length ) {
-                       var set = jQuery(arguments[0]);
-                       set.push.apply( set, this.toArray() );
-                       return this.pushStack( set, "before", arguments );
-               }
-       },
-
-       after: function() {
-               if ( this[0] && this[0].parentNode ) {
-                       return this.domManip(arguments, false, function( elem ) {
-                               this.parentNode.insertBefore( elem, this.nextSibling );
-                       });
-               } else if ( arguments.length ) {
-                       var set = this.pushStack( this, "after", arguments );
-                       set.push.apply( set, jQuery(arguments[0]).toArray() );
-                       return set;
-               }
-       },
-
-       clone: function( events ) {
-               // Do the clone
-               var ret = this.map(function() {
-                       if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
-                               // IE copies events bound via attachEvent when
-                               // using cloneNode. Calling detachEvent on the
-                               // clone will also remove the events from the orignal
-                               // In order to get around this, we use innerHTML.
-                               // Unfortunately, this means some modifications to
-                               // attributes in IE that are actually only stored
-                               // as properties will not be copied (such as the
-                               // the name attribute on an input).
-                               var html = this.outerHTML, ownerDocument = this.ownerDocument;
-                               if ( !html ) {
-                                       var div = ownerDocument.createElement("div");
-                                       div.appendChild( this.cloneNode(true) );
-                                       html = div.innerHTML;
-                               }
-
-                               return jQuery.clean([html.replace(rinlinejQuery, "")
-                                       .replace(rleadingWhitespace, "")], ownerDocument)[0];
-                       } else {
-                               return this.cloneNode(true);
-                       }
-               });
-
-               // Copy the events from the original to the clone
-               if ( events === true ) {
-                       cloneCopyEvent( this, ret );
-                       cloneCopyEvent( this.find("*"), ret.find("*") );
-               }
-
-               // Return the cloned set
-               return ret;
-       },
-
-       html: function( value ) {
-               if ( value === undefined ) {
-                       return this[0] && this[0].nodeType === 1 ?
-                               this[0].innerHTML.replace(rinlinejQuery, "") :
-                               null;
-
-               // See if we can take a shortcut and just use innerHTML
-               } else if ( typeof value === "string" && !/<script/i.test( value ) &&
-                       (jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value )) &&
-                       !wrapMap[ (rtagName.exec( value ) || ["", ""])[1].toLowerCase() ] ) {
-
-                       try {
-                               for ( var i = 0, l = this.length; i < l; i++ ) {
-                                       // Remove element nodes and prevent memory leaks
-                                       if ( this[i].nodeType === 1 ) {
-                                               cleanData( this[i].getElementsByTagName("*") );
-                                               this[i].innerHTML = value;
-                                       }
-                               }
-
-                       // If using innerHTML throws an exception, use the fallback method
-                       } catch(e) {
-                               this.empty().append( value );
-                       }
-
-               } else if ( jQuery.isFunction( value ) ) {
-                       this.each(function(i){
-                               var self = jQuery(this), old = self.html();
-                               self.empty().append(function(){
-                                       return value.call( this, i, old );
-                               });
-                       });
-
-               } else {
-                       this.empty().append( value );
-               }
-
-               return this;
-       },
-
-       replaceWith: function( value ) {
-               if ( this[0] && this[0].parentNode ) {
-                       // Make sure that the elements are removed from the DOM before they are inserted
-                       // this can help fix replacing a parent with child elements
-                       if ( !jQuery.isFunction( value ) ) {
-                               value = jQuery( value ).detach();
-                       }
-
-                       return this.each(function() {
-                               var next = this.nextSibling, parent = this.parentNode;
-
-                               jQuery(this).remove();
-
-                               if ( next ) {
-                                       jQuery(next).before( value );
-                               } else {
-                                       jQuery(parent).append( value );
-                               }
-                       });
-               } else {
-                       return this.pushStack( jQuery(jQuery.isFunction(value) ? value() : value), "replaceWith", value );
-               }
-       },
-
-       detach: function( selector ) {
-               return this.remove( selector, true );
-       },
-
-       domManip: function( args, table, callback ) {
-               var results, first, value = args[0], scripts = [];
-
-               if ( jQuery.isFunction(value) ) {
-                       return this.each(function(i) {
-                               var self = jQuery(this);
-                               args[0] = value.call(this, i, table ? self.html() : undefined);
-                               return self.domManip( args, table, callback );
-                       });
-               }
-
-               if ( this[0] ) {
-                       // If we're in a fragment, just use that instead of building a new one
-                       if ( args[0] && args[0].parentNode && args[0].parentNode.nodeType === 11 ) {
-                               results = { fragment: args[0].parentNode };
-                       } else {
-                               results = buildFragment( args, this, scripts );
-                       }
-
-                       first = results.fragment.firstChild;
-
-                       if ( first ) {
-                               table = table && jQuery.nodeName( first, "tr" );
-
-                               for ( var i = 0, l = this.length; i < l; i++ ) {
-                                       callback.call(
-                                               table ?
-                                                       root(this[i], first) :
-                                                       this[i],
-                                               results.cacheable || this.length > 1 || i > 0 ?
-                                                       results.fragment.cloneNode(true) :
-                                                       results.fragment
-                                       );
-                               }
-                       }
-
-                       if ( scripts ) {
-                               jQuery.each( scripts, evalScript );
-                       }
-               }
-
-               return this;
-
-               function root( elem, cur ) {
-                       return jQuery.nodeName(elem, "table") ?
-                               (elem.getElementsByTagName("tbody")[0] ||
-                               elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
-                               elem;
-               }
-       }
-});
-
-function cloneCopyEvent(orig, ret) {
-       var i = 0;
-
-       ret.each(function() {
-               if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
-                       return;
-               }
-
-               var oldData = jQuery.data( orig[i++] ), curData = jQuery.data( this, oldData ), events = oldData && oldData.events;
-
-               if ( events ) {
-                       delete curData.handle;
-                       curData.events = {};
-
-                       for ( var type in events ) {
-                               for ( var handler in events[ type ] ) {
-                                       jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
-                               }
-                       }
-               }
-       });
-}
-
-function buildFragment( args, nodes, scripts ) {
-       var fragment, cacheable, cached, cacheresults, doc;
-
-       if ( args.length === 1 && typeof args[0] === "string" && args[0].length < 512 && args[0].indexOf("<option") < 0 ) {
-               cacheable = true;
-               cacheresults = jQuery.fragments[ args[0] ];
-               if ( cacheresults ) {
-                       if ( cacheresults !== 1 ) {
-                               fragment = cacheresults;
-                       }
-                       cached = true;
-               }
-       }
-
-       if ( !fragment ) {
-               doc = (nodes && nodes[0] ? nodes[0].ownerDocument || nodes[0] : document);
-               fragment = doc.createDocumentFragment();
-               jQuery.clean( args, doc, fragment, scripts );
-       }
-
-       if ( cacheable ) {
-               jQuery.fragments[ args[0] ] = cacheresults ? fragment : 1;
-       }
-
-       return { fragment: fragment, cacheable: cacheable };
-}
-
-jQuery.fragments = {};
-
-jQuery.each({
-       appendTo: "append",
-       prependTo: "prepend",
-       insertBefore: "before",
-       insertAfter: "after",
-       replaceAll: "replaceWith"
-}, function( name, original ) {
-       jQuery.fn[ name ] = function( selector ) {
-               var ret = [], insert = jQuery( selector );
-
-               for ( var i = 0, l = insert.length; i < l; i++ ) {
-                       var elems = (i > 0 ? this.clone(true) : this).get();
-                       jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
-                       ret = ret.concat( elems );
-               }
-               return this.pushStack( ret, name, insert.selector );
-       };
-});
-
-jQuery.each({
-       // keepData is for internal use only--do not document
-       remove: function( selector, keepData ) {
-               if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
-                       if ( !keepData && this.nodeType === 1 ) {
-                               cleanData( this.getElementsByTagName("*") );
-                               cleanData( [ this ] );
-                       }
-
-                       if ( this.parentNode ) {
-                                this.parentNode.removeChild( this );
-                       }
-               }
-       },
-
-       empty: function() {
-               // Remove element nodes and prevent memory leaks
-               if ( this.nodeType === 1 ) {
-                       cleanData( this.getElementsByTagName("*") );
-               }
-
-               // Remove any remaining nodes
-               while ( this.firstChild ) {
-                       this.removeChild( this.firstChild );
-               }
-       }
-}, function( name, fn ) {
-       jQuery.fn[ name ] = function() {
-               return this.each( fn, arguments );
-       };
-});
-
-jQuery.extend({
-       clean: function( elems, context, fragment, scripts ) {
-               context = context || document;
-
-               // !context.createElement fails in IE with an error but returns typeof 'object'
-               if ( typeof context.createElement === "undefined" ) {
-                       context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
-               }
-
-               var ret = [];
-
-               jQuery.each(elems, function( i, elem ) {
-                       if ( typeof elem === "number" ) {
-                               elem += "";
-                       }
-
-                       if ( !elem ) {
-                               return;
-                       }
-
-                       // Convert html string into DOM nodes
-                       if ( typeof elem === "string" && !rhtml.test( elem ) ) {
-                               elem = context.createTextNode( elem );
-
-                       } else if ( typeof elem === "string" ) {
-                               // Fix "XHTML"-style tags in all browsers
-                               elem = elem.replace(rxhtmlTag, fcloseTag);
-
-                               // Trim whitespace, otherwise indexOf won't work as expected
-                               var tag = (rtagName.exec( elem ) || ["", ""])[1].toLowerCase(),
-                                       wrap = wrapMap[ tag ] || wrapMap._default,
-                                       depth = wrap[0],
-                                       div = context.createElement("div");
-
-                               // Go to html and back, then peel off extra wrappers
-                               div.innerHTML = wrap[1] + elem + wrap[2];
-
-                               // Move to the right depth
-                               while ( depth-- ) {
-                                       div = div.lastChild;
-                               }
-
-                               // Remove IE's autoinserted <tbody> from table fragments
-                               if ( !jQuery.support.tbody ) {
-
-                                       // String was a <table>, *may* have spurious <tbody>
-                                       var hasBody = rtbody.test(elem),
-                                               tbody = tag === "table" && !hasBody ?
-                                                       div.firstChild && div.firstChild.childNodes :
-
-                                                       // String was a bare <thead> or <tfoot>
-                                                       wrap[1] === "<table>" && !hasBody ?
-                                                               div.childNodes :
-                                                               [];
-
-                                       for ( var j = tbody.length - 1; j >= 0 ; --j ) {
-                                               if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
-                                                       tbody[ j ].parentNode.removeChild( tbody[ j ] );
-                                               }
-                                       }
-
-                               }
-
-                               // IE completely kills leading whitespace when innerHTML is used
-                               if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
-                                       div.insertBefore( context.createTextNode( rleadingWhitespace.exec(elem)[0] ), div.firstChild );
-                               }
-
-                               elem = jQuery.makeArray( div.childNodes );
-                       }
-
-                       if ( elem.nodeType ) {
-                               ret.push( elem );
-                       } else {
-                               ret = jQuery.merge( ret, elem );
-                       }
-
-               });
-
-               if ( fragment ) {
-                       for ( var i = 0; ret[i]; i++ ) {
-                               if ( scripts && jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
-                                       scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
-                               } else {
-                                       if ( ret[i].nodeType === 1 ) {
-                                               ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
-                                       }
-                                       fragment.appendChild( ret[i] );
-                               }
-                       }
-               }
-
-               return ret;
-       }
-});
-
-function cleanData( elems ) {
-       for ( var i = 0, elem, id; (elem = elems[i]) != null; i++ ) {
-               if ( !jQuery.noData[elem.nodeName.toLowerCase()] && (id = elem[expando]) ) {
-                       delete jQuery.cache[ id ];
-               }
-       }
-}
-// exclude the following css properties to add px
-var rexclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
-       ralpha = /alpha\([^)]*\)/,
-       ropacity = /opacity=([^)]*)/,
-       rfloat = /float/i,
-       rdashAlpha = /-([a-z])/ig,
-       rupper = /([A-Z])/g,
-       rnumpx = /^-?\d+(?:px)?$/i,
-       rnum = /^-?\d/,
-
-       cssShow = { position: "absolute", visibility: "hidden", display:"block" },
-       cssWidth = [ "Left", "Right" ],
-       cssHeight = [ "Top", "Bottom" ],
-
-       // cache check for defaultView.getComputedStyle
-       getComputedStyle = document.defaultView && document.defaultView.getComputedStyle,
-       // normalize float css property
-       styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat",
-       fcamelCase = function( all, letter ) {
-               return letter.toUpperCase();
-       };
-
-jQuery.fn.css = function( name, value ) {
-       return access( this, name, value, true, function( elem, name, value ) {
-               if ( value === undefined ) {
-                       return jQuery.curCSS( elem, name );
-               }
-               
-               if ( typeof value === "number" && !rexclude.test(name) ) {
-                       value += "px";
-               }
-
-               jQuery.style( elem, name, value );
-       });
-};
-
-jQuery.extend({
-       style: function( elem, name, value ) {
-               // don't set styles on text and comment nodes
-               if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 ) {
-                       return undefined;
-               }
-
-               // ignore negative width and height values #1599
-               if ( (name === "width" || name === "height") && parseFloat(value) < 0 ) {
-                       value = undefined;
-               }
-
-               var style = elem.style || elem, set = value !== undefined;
-
-               // IE uses filters for opacity
-               if ( !jQuery.support.opacity && name === "opacity" ) {
-                       if ( set ) {
-                               // IE has trouble with opacity if it does not have layout
-                               // Force it by setting the zoom level
-                               style.zoom = 1;
-
-                               // Set the alpha filter to set the opacity
-                               var opacity = parseInt( value, 10 ) + "" === "NaN" ? "" : "alpha(opacity=" + value * 100 + ")";
-                               var filter = style.filter || jQuery.curCSS( elem, "filter" ) || "";
-                               style.filter = ralpha.test(filter) ? filter.replace(ralpha, opacity) : opacity;
-                       }
-
-                       return style.filter && style.filter.indexOf("opacity=") >= 0 ?
-                               (parseFloat( ropacity.exec(style.filter)[1] ) / 100) + "":
-                               "";
-               }
-
-               // Make sure we're using the right name for getting the float value
-               if ( rfloat.test( name ) ) {
-                       name = styleFloat;
-               }
-
-               name = name.replace(rdashAlpha, fcamelCase);
-
-               if ( set ) {
-                       style[ name ] = value;
-               }
-
-               return style[ name ];
-       },
-
-       css: function( elem, name, force, extra ) {
-               if ( name === "width" || name === "height" ) {
-                       var val, props = cssShow, which = name === "width" ? cssWidth : cssHeight;
-
-                       function getWH() {
-                               val = name === "width" ? elem.offsetWidth : elem.offsetHeight;
-
-                               if ( extra === "border" ) {
-                                       return;
-                               }
-
-                               jQuery.each( which, function() {
-                                       if ( !extra ) {
-                                               val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
-                                       }
-
-                                       if ( extra === "margin" ) {
-                                               val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
-                                       } else {
-                                               val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
-                                       }
-                               });
-                       }
-
-                       if ( elem.offsetWidth !== 0 ) {
-                               getWH();
-                       } else {
-                               jQuery.swap( elem, props, getWH );
-                       }
-
-                       return Math.max(0, Math.round(val));
-               }
-
-               return jQuery.curCSS( elem, name, force );
-       },
-
-       curCSS: function( elem, name, force ) {
-               var ret, style = elem.style, filter;
-
-               // IE uses filters for opacity
-               if ( !jQuery.support.opacity && name === "opacity" && elem.currentStyle ) {
-                       ret = ropacity.test(elem.currentStyle.filter || "") ?
-                               (parseFloat(RegExp.$1) / 100) + "" :
-                               "";
-
-                       return ret === "" ?
-                               "1" :
-                               ret;
-               }
-
-               // Make sure we're using the right name for getting the float value
-               if ( rfloat.test( name ) ) {
-                       name = styleFloat;
-               }
-
-               if ( !force && style && style[ name ] ) {
-                       ret = style[ name ];
-
-               } else if ( getComputedStyle ) {
-
-                       // Only "float" is needed here
-                       if ( rfloat.test( name ) ) {
-                               name = "float";
-                       }
-
-                       name = name.replace( rupper, "-$1" ).toLowerCase();
-
-                       var defaultView = elem.ownerDocument.defaultView;
-
-                       if ( !defaultView ) {
-                               return null;
-                       }
-
-                       var computedStyle = defaultView.getComputedStyle( elem, null );
-
-                       if ( computedStyle ) {
-                               ret = computedStyle.getPropertyValue( name );
-                       }
-
-                       // We should always get a number back from opacity
-                       if ( name === "opacity" && ret === "" ) {
-                               ret = "1";
-                       }
-
-               } else if ( elem.currentStyle ) {
-                       var camelCase = name.replace(rdashAlpha, fcamelCase);
-
-                       ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
-
-                       // From the awesome hack by Dean Edwards
-                       // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
-                       // If we're not dealing with a regular pixel number
-                       // but a number that has a weird ending, we need to convert it to pixels
-                       if ( !rnumpx.test( ret ) && rnum.test( ret ) ) {
-                               // Remember the original values
-                               var left = style.left, rsLeft = elem.runtimeStyle.left;
-
-                               // Put in the new values to get a computed value out
-                               elem.runtimeStyle.left = elem.currentStyle.left;
-                               style.left = camelCase === "fontSize" ? "1em" : (ret || 0);
-                               ret = style.pixelLeft + "px";
-
-                               // Revert the changed values
-                               style.left = left;
-                               elem.runtimeStyle.left = rsLeft;
-                       }
-               }
-
-               return ret;
-       },
-
-       // A method for quickly swapping in/out CSS properties to get correct calculations
-       swap: function( elem, options, callback ) {
-               var old = {};
-
-               // Remember the old values, and insert the new ones
-               for ( var name in options ) {
-                       old[ name ] = elem.style[ name ];
-                       elem.style[ name ] = options[ name ];
-               }
-
-               callback.call( elem );
-
-               // Revert the old values
-               for ( var name in options ) {
-                       elem.style[ name ] = old[ name ];
-               }
-       }
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
-       jQuery.expr.filters.hidden = function( elem ) {
-               var width = elem.offsetWidth, height = elem.offsetHeight,
-                       skip = elem.nodeName.toLowerCase() === "tr";
-
-               return width === 0 && height === 0 && !skip ?
-                       true :
-                       width > 0 && height > 0 && !skip ?
-                               false :
-                               jQuery.curCSS(elem, "display") === "none";
-       };
-
-       jQuery.expr.filters.visible = function( elem ) {
-               return !jQuery.expr.filters.hidden( elem );
-       };
-}
-var jsc = now(),
-       rscript = /<script(.|\s)*?\/script>/gi,
-       rselectTextarea = /select|textarea/i,
-       rinput = /color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,
-       jsre = /=\?(&|$)/,
-       rquery = /\?/,
-       rts = /(\?|&)_=.*?(&|$)/,
-       rurl = /^(\w+:)?\/\/([^\/?#]+)/,
-       r20 = /%20/g;
-
-jQuery.fn.extend({
-       // Keep a copy of the old load
-       _load: jQuery.fn.load,
-
-       load: function( url, params, callback ) {
-               if ( typeof url !== "string" ) {
-                       return this._load( url );
-
-               // Don't do a request if no elements are being requested
-               } else if ( !this.length ) {
-                       return this;
-               }
-
-               var off = url.indexOf(" ");
-               if ( off >= 0 ) {
-                       var selector = url.slice(off, url.length);
-                       url = url.slice(0, off);
-               }
-
-               // Default to a GET request
-               var type = "GET";
-
-               // If the second parameter was provided
-               if ( params ) {
-                       // If it's a function
-                       if ( jQuery.isFunction( params ) ) {
-                               // We assume that it's the callback
-                               callback = params;
-                               params = null;
-
-                       // Otherwise, build a param string
-                       } else if ( typeof params === "object" ) {
-                               params = jQuery.param( params, jQuery.ajaxSettings.traditional );
-                               type = "POST";
-                       }
-               }
-
-               // Request the remote document
-               jQuery.ajax({
-                       url: url,
-                       type: type,
-                       dataType: "html",
-                       data: params,
-                       context:this,
-                       complete: function( res, status ) {
-                               // If successful, inject the HTML into all the matched elements
-                               if ( status === "success" || status === "notmodified" ) {
-                                       // See if a selector was specified
-                                       this.html( selector ?
-                                               // Create a dummy div to hold the results
-                                               jQuery("<div />")
-                                                       // inject the contents of the document in, removing the scripts
-                                                       // to avoid any 'Permission Denied' errors in IE
-                                                       .append(res.responseText.replace(rscript, ""))
-
-                                                       // Locate the specified elements
-                                                       .find(selector) :
-
-                                               // If not, just inject the full result
-                                               res.responseText );
-                               }
-
-                               if ( callback ) {
-                                       this.each( callback, [res.responseText, status, res] );
-                               }
-                       }
-               });
-
-               return this;
-       },
-
-       serialize: function() {
-               return jQuery.param(this.serializeArray());
-       },
-       serializeArray: function() {
-               return this.map(function() {
-                       return this.elements ? jQuery.makeArray(this.elements) : this;
-               })
-               .filter(function() {
-                       return this.name && !this.disabled &&
-                               (this.checked || rselectTextarea.test(this.nodeName) ||
-                                       rinput.test(this.type));
-               })
-               .map(function( i, elem ) {
-                       var val = jQuery(this).val();
-
-                       return val == null ?
-                               null :
-                               jQuery.isArray(val) ?
-                                       jQuery.map( val, function( val, i ) {
-                                               return { name: elem.name, value: val };
-                                       }) :
-                                       { name: elem.name, value: val };
-               }).get();
-       }
-});
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function( i, o ) {
-       jQuery.fn[o] = function( f ) {
-               return this.bind(o, f);
-       };
-});
-
-jQuery.extend({
-
-       get: function( url, data, callback, type ) {
-               // shift arguments if data argument was omited
-               if ( jQuery.isFunction( data ) ) {
-                       type = type || callback;
-                       callback = data;
-                       data = null;
-               }
-
-               return jQuery.ajax({
-                       type: "GET",
-                       url: url,
-                       data: data,
-                       success: callback,
-                       dataType: type
-               });
-       },
-
-       getScript: function( url, callback ) {
-               return jQuery.get(url, null, callback, "script");
-       },
-
-       getJSON: function( url, data, callback ) {
-               return jQuery.get(url, data, callback, "json");
-       },
-
-       post: function( url, data, callback, type ) {
-               // shift arguments if data argument was omited
-               if ( jQuery.isFunction( data ) ) {
-                       type = type || callback;
-                       callback = data;
-                       data = {};
-               }
-
-               return jQuery.ajax({
-                       type: "POST",
-                       url: url,
-                       data: data,
-                       success: callback,
-                       dataType: type
-               });
-       },
-
-       ajaxSetup: function( settings ) {
-               jQuery.extend( jQuery.ajaxSettings, settings );
-       },
-
-       ajaxSettings: {
-               url: location.href,
-               global: true,
-               type: "GET",
-               contentType: "application/x-www-form-urlencoded",
-               processData: true,
-               async: true,
-               /*
-               timeout: 0,
-               data: null,
-               username: null,
-               password: null,
-               traditional: false,
-               */
-               // Create the request object; Microsoft failed to properly
-               // implement the XMLHttpRequest in IE7 (can't request local files),
-               // so we use the ActiveXObject when it is available
-               // This function can be overriden by calling jQuery.ajaxSetup
-               xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
-                       function() {
-                               return new window.XMLHttpRequest();
-                       } :
-                       function() {
-                               try {
-                                       return new window.ActiveXObject("Microsoft.XMLHTTP");
-                               } catch(e) {}
-                       },
-               accepts: {
-                       xml: "application/xml, text/xml",
-                       html: "text/html",
-                       script: "text/javascript, application/javascript",
-                       json: "application/json, text/javascript",
-                       text: "text/plain",
-                       _default: "*/*"
-               }
-       },
-
-       // Last-Modified header cache for next request
-       lastModified: {},
-       etag: {},
-
-       ajax: function( origSettings ) {
-               var s = jQuery.extend(true, {}, jQuery.ajaxSettings, origSettings);
-               
-               var jsonp, status, data,
-                       callbackContext = s.context || s,
-                       type = s.type.toUpperCase();
-
-               // convert data if not already a string
-               if ( s.data && s.processData && typeof s.data !== "string" ) {
-                       s.data = jQuery.param( s.data, s.traditional );
-               }
-
-               // Handle JSONP Parameter Callbacks
-               if ( s.dataType === "jsonp" ) {
-                       if ( type === "GET" ) {
-                               if ( !jsre.test( s.url ) ) {
-                                       s.url += (rquery.test( s.url ) ? "&" : "?") + (s.jsonp || "callback") + "=?";
-                               }
-                       } else if ( !s.data || !jsre.test(s.data) ) {
-                               s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
-                       }
-                       s.dataType = "json";
-               }
-
-               // Build temporary JSONP function
-               if ( s.dataType === "json" && (s.data && jsre.test(s.data) || jsre.test(s.url)) ) {
-                       jsonp = s.jsonpCallback || ("jsonp" + jsc++);
-
-                       // Replace the =? sequence both in the query string and the data
-                       if ( s.data ) {
-                               s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
-                       }
-
-                       s.url = s.url.replace(jsre, "=" + jsonp + "$1");
-
-                       // We need to make sure
-                       // that a JSONP style response is executed properly
-                       s.dataType = "script";
-
-                       // Handle JSONP-style loading
-                       window[ jsonp ] = window[ jsonp ] || function( tmp ) {
-                               data = tmp;
-                               success();
-                               complete();
-                               // Garbage collect
-                               window[ jsonp ] = undefined;
-
-                               try {
-                                       delete window[ jsonp ];
-                               } catch(e) {}
-
-                               if ( head ) {
-                                       head.removeChild( script );
-                               }
-                       };
-               }
-
-               if ( s.dataType === "script" && s.cache === null ) {
-                       s.cache = false;
-               }
-
-               if ( s.cache === false && type === "GET" ) {
-                       var ts = now();
-
-                       // try replacing _= if it is there
-                       var ret = s.url.replace(rts, "$1_=" + ts + "$2");
-
-                       // if nothing was replaced, add timestamp to the end
-                       s.url = ret + ((ret === s.url) ? (rquery.test(s.url) ? "&" : "?") + "_=" + ts : "");
-               }
-
-               // If data is available, append data to url for get requests
-               if ( s.data && type === "GET" ) {
-                       s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
-               }
-
-               // Watch for a new set of requests
-               if ( s.global && ! jQuery.active++ ) {
-                       jQuery.event.trigger( "ajaxStart" );
-               }
-
-               // Matches an absolute URL, and saves the domain
-               var parts = rurl.exec( s.url ),
-                       remote = parts && (parts[1] && parts[1] !== location.protocol || parts[2] !== location.host);
-
-               // If we're requesting a remote document
-               // and trying to load JSON or Script with a GET
-               if ( s.dataType === "script" && type === "GET" && remote ) {
-                       var head = document.getElementsByTagName("head")[0] || document.documentElement;
-                       var script = document.createElement("script");
-                       script.src = s.url;
-                       if ( s.scriptCharset ) {
-                               script.charset = s.scriptCharset;
-                       }
-
-                       // Handle Script loading
-                       if ( !jsonp ) {
-                               var done = false;
-
-                               // Attach handlers for all browsers
-                               script.onload = script.onreadystatechange = function() {
-                                       if ( !done && (!this.readyState ||
-                                                       this.readyState === "loaded" || this.readyState === "complete") ) {
-                                               done = true;
-                                               success();
-                                               complete();
-
-                                               // Handle memory leak in IE
-                                               script.onload = script.onreadystatechange = null;
-                                               if ( head && script.parentNode ) {
-                                                       head.removeChild( script );
-                                               }
-                                       }
-                               };
-                       }
-
-                       // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
-                       // This arises when a base node is used (#2709 and #4378).
-                       head.insertBefore( script, head.firstChild );
-
-                       // We handle everything using the script element injection
-                       return undefined;
-               }
-
-               var requestDone = false;
-
-               // Create the request object
-               var xhr = s.xhr();
-
-               if ( !xhr ) {
-                       return;
-               }
-
-               // Open the socket
-               // Passing null username, generates a login popup on Opera (#2865)
-               if ( s.username ) {
-                       xhr.open(type, s.url, s.async, s.username, s.password);
-               } else {
-                       xhr.open(type, s.url, s.async);
-               }
-
-               // Need an extra try/catch for cross domain requests in Firefox 3
-               try {
-                       // Set the correct header, if data is being sent
-                       if ( s.data || origSettings && origSettings.contentType ) {
-                               xhr.setRequestHeader("Content-Type", s.contentType);
-                       }
-
-                       // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
-                       if ( s.ifModified ) {
-                               if ( jQuery.lastModified[s.url] ) {
-                                       xhr.setRequestHeader("If-Modified-Since", jQuery.lastModified[s.url]);
-                               }
-
-                               if ( jQuery.etag[s.url] ) {
-                                       xhr.setRequestHeader("If-None-Match", jQuery.etag[s.url]);
-                               }
-                       }
-
-                       // Set header so the called script knows that it's an XMLHttpRequest
-                       // Only send the header if it's not a remote XHR
-                       if ( !remote ) {
-                               xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
-                       }
-
-                       // Set the Accepts header for the server, depending on the dataType
-                       xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
-                               s.accepts[ s.dataType ] + ", */*" :
-                               s.accepts._default );
-               } catch(e) {}
-
-               // Allow custom headers/mimetypes and early abort
-               if ( s.beforeSend && s.beforeSend.call(callbackContext, xhr, s) === false ) {
-                       // Handle the global AJAX counter
-                       if ( s.global && ! --jQuery.active ) {
-                               jQuery.event.trigger( "ajaxStop" );
-                       }
-
-                       // close opended socket
-                       xhr.abort();
-                       return false;
-               }
-
-               if ( s.global ) {
-                       trigger("ajaxSend", [xhr, s]);
-               }
-
-               // Wait for a response to come back
-               var onreadystatechange = xhr.onreadystatechange = function( isTimeout ) {
-                       // The request was aborted
-                       if ( !xhr || xhr.readyState === 0 ) {
-                               // Opera doesn't call onreadystatechange before this point
-                               // so we simulate the call
-                               if ( !requestDone ) {
-                                       complete();
-                               }
-
-                               requestDone = true;
-                               if ( xhr ) {
-                                       xhr.onreadystatechange = jQuery.noop;
-                               }
-
-                       // The transfer is complete and the data is available, or the request timed out
-                       } else if ( !requestDone && xhr && (xhr.readyState === 4 || isTimeout === "timeout") ) {
-                               requestDone = true;
-                               xhr.onreadystatechange = jQuery.noop;
-
-                               status = isTimeout === "timeout" ?
-                                       "timeout" :
-                                       !jQuery.httpSuccess( xhr ) ?
-                                               "error" :
-                                               s.ifModified && jQuery.httpNotModified( xhr, s.url ) ?
-                                                       "notmodified" :
-                                                       "success";
-
-                               if ( status === "success" ) {
-                                       // Watch for, and catch, XML document parse errors
-                                       try {
-                                               // process the data (runs the xml through httpData regardless of callback)
-                                               data = jQuery.httpData( xhr, s.dataType, s );
-                                       } catch(e) {
-                                               status = "parsererror";
-                                       }
-                               }
-
-                               // Make sure that the request was successful or notmodified
-                               if ( status === "success" || status === "notmodified" ) {
-                                       // JSONP handles its own success callback
-                                       if ( !jsonp ) {
-                                               success();
-                                       }
-                               } else {
-                                       jQuery.handleError(s, xhr, status);
-                               }
-
-                               // Fire the complete handlers
-                               complete();
-
-                               if ( isTimeout === "timeout" ) {
-                                       xhr.abort();
-                               }
-
-                               // Stop memory leaks
-                               if ( s.async ) {
-                                       xhr = null;
-                               }
-                       }
-               };
-
-               // Override the abort handler, if we can (IE doesn't allow it, but that's OK)
-               // Opera doesn't fire onreadystatechange at all on abort
-               try {
-                       var oldAbort = xhr.abort;
-                       xhr.abort = function() {
-                               if ( xhr ) {
-                                       oldAbort.call( xhr );
-                                       if ( xhr ) {
-                                               xhr.readyState = 0;
-                                       }
-                               }
-
-                               onreadystatechange();
-                       };
-               } catch(e) { }
-
-               // Timeout checker
-               if ( s.async && s.timeout > 0 ) {
-                       setTimeout(function() {
-                               // Check to see if the request is still happening
-                               if ( xhr && !requestDone ) {
-                                       onreadystatechange( "timeout" );
-                               }
-                       }, s.timeout);
-               }
-
-               // Send the data
-               try {
-                       xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
-               } catch(e) {
-                       jQuery.handleError(s, xhr, null, e);
-                       // Fire the complete handlers
-                       complete();
-               }
-
-               // firefox 1.5 doesn't fire statechange for sync requests
-               if ( !s.async ) {
-                       onreadystatechange();
-               }
-
-               function success() {
-                       // If a local callback was specified, fire it and pass it the data
-                       if ( s.success ) {
-                               s.success.call( callbackContext, data, status, xhr );
-                       }
-
-                       // Fire the global callback
-                       if ( s.global ) {
-                               trigger( "ajaxSuccess", [xhr, s] );
-                       }
-               }
-
-               function complete() {
-                       // Process result
-                       if ( s.complete ) {
-                               s.complete.call( callbackContext, xhr, status);
-                       }
-
-                       // The request was completed
-                       if ( s.global ) {
-                               trigger( "ajaxComplete", [xhr, s] );
-                       }
-
-                       // Handle the global AJAX counter
-                       if ( s.global && ! --jQuery.active ) {
-                               jQuery.event.trigger( "ajaxStop" );
-                       }
-               }
-               
-               function trigger(type, args) {
-                       (s.context ? jQuery(s.context) : jQuery.event).trigger(type, args);
-               }
-
-               // return XMLHttpRequest to allow aborting the request etc.
-               return xhr;
-       },
-
-       handleError: function( s, xhr, status, e ) {
-               // If a local callback was specified, fire it
-               if ( s.error ) {
-                       s.error.call( s.context || window, xhr, status, e );
-               }
-
-               // Fire the global callback
-               if ( s.global ) {
-                       (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
-               }
-       },
-
-       // Counter for holding the number of active queries
-       active: 0,
-
-       // Determines if an XMLHttpRequest was successful or not
-       httpSuccess: function( xhr ) {
-               try {
-                       // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
-                       return !xhr.status && location.protocol === "file:" ||
-                               // Opera returns 0 when status is 304
-                               ( xhr.status >= 200 && xhr.status < 300 ) ||
-                               xhr.status === 304 || xhr.status === 1223 || xhr.status === 0;
-               } catch(e) {}
-
-               return false;
-       },
-
-       // Determines if an XMLHttpRequest returns NotModified
-       httpNotModified: function( xhr, url ) {
-               var lastModified = xhr.getResponseHeader("Last-Modified"),
-                       etag = xhr.getResponseHeader("Etag");
-
-               if ( lastModified ) {
-                       jQuery.lastModified[url] = lastModified;
-               }
-
-               if ( etag ) {
-                       jQuery.etag[url] = etag;
-               }
-
-               // Opera returns 0 when status is 304
-               return xhr.status === 304 || xhr.status === 0;
-       },
-
-       httpData: function( xhr, type, s ) {
-               var ct = xhr.getResponseHeader("content-type") || "",
-                       xml = type === "xml" || !type && ct.indexOf("xml") >= 0,
-                       data = xml ? xhr.responseXML : xhr.responseText;
-
-               if ( xml && data.documentElement.nodeName === "parsererror" ) {
-                       throw "parsererror";
-               }
-
-               // Allow a pre-filtering function to sanitize the response
-               // s is checked to keep backwards compatibility
-               if ( s && s.dataFilter ) {
-                       data = s.dataFilter( data, type );
-               }
-
-               // The filter can actually parse the response
-               if ( typeof data === "string" ) {
-                       // Get the JavaScript object, if JSON is used.
-                       if ( type === "json" || !type && ct.indexOf("json") >= 0 ) {
-                               // Make sure the incoming data is actual JSON
-                               // Logic borrowed from http://json.org/json2.js
-                               if (/^[\],:{}\s]*$/.test(data.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, "@")
-                                       .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]")
-                                       .replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) {
-
-                                       // Try to use the native JSON parser first
-                                       if ( window.JSON && window.JSON.parse ) {
-                                               data = window.JSON.parse( data );
-
-                                       } else {
-                                               data = (new Function("return " + data))();
-                                       }
-
-                               } else {
-                                       throw "Invalid JSON: " + data;
-                               }
-
-                       // If the type is "script", eval it in global context
-                       } else if ( type === "script" || !type && ct.indexOf("javascript") >= 0 ) {
-                               jQuery.globalEval( data );
-                       }
-               }
-
-               return data;
-       },
-
-       // Serialize an array of form elements or a set of
-       // key/values into a query string
-       param: function( a, traditional ) {
-               
-               var s = [];
-               
-               // Set traditional to true for jQuery <= 1.3.2 behavior.
-               if ( traditional === undefined ) {
-                       traditional = jQuery.ajaxSettings.traditional;
-               }
-               
-               function add( key, value ) {
-                       // If value is a function, invoke it and return its value
-                       value = jQuery.isFunction(value) ? value() : value;
-                       s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value);
-               }
-               
-               // If an array was passed in, assume that it is an array of form elements.
-               if ( jQuery.isArray(a) || a.jquery ) {
-                       // Serialize the form elements
-                       jQuery.each( a, function() {
-                               add( this.name, this.value );
-                       });
-                       
-               } else {
-                       // If traditional, encode the "old" way (the way 1.3.2 or older
-                       // did it), otherwise encode params recursively.
-                       jQuery.each( a, function buildParams( prefix, obj ) {
-                               
-                               if ( jQuery.isArray(obj) ) {
-                                       // Serialize array item.
-                                       jQuery.each( obj, function( i, v ) {
-                                               if ( traditional ) {
-                                                       // Treat each array item as a scalar.
-                                                       add( prefix, v );
-                                               } else {
-                                                       // If array item is non-scalar (array or object), encode its
-                                                       // numeric index to resolve deserialization ambiguity issues.
-                                                       // Note that rack (as of 1.0.0) can't currently deserialize
-                                                       // nested arrays properly, and attempting to do so may cause
-                                                       // a server error. Possible fixes are to modify rack's
-                                                       // deserialization algorithm or to provide an option or flag
-                                                       // to force array serialization to be shallow.
-                                                       buildParams( prefix + "[" + ( typeof v === "object" || jQuery.isArray(v) ? i : "" ) + "]", v );
-                                               }
-                                       });
-                                       
-                               } else if ( !traditional && obj != null && typeof obj === "object" ) {
-                                       // Serialize object item.
-                                       jQuery.each( obj, function( k, v ) {
-                                               buildParams( prefix + "[" + k + "]", v );
-                                       });
-                                       
-                               } else {
-                                       // Serialize scalar item.
-                                       add( prefix, obj );
-                               }
-                       });
-               }
-               
-               // Return the resulting serialization
-               return s.join("&").replace(r20, "+");
-       }
-
-});
-var elemdisplay = {},
-       rfxtypes = /toggle|show|hide/,
-       rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
-       timerId,
-       fxAttrs = [
-               // height animations
-               [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
-               // width animations
-               [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
-               // opacity animations
-               [ "opacity" ]
-       ];
-
-jQuery.fn.extend({
-       show: function( speed, callback ) {
-               if ( speed != null ) {
-                       return this.animate( genFx("show", 3), speed, callback);
-
-               } else {
-                       for ( var i = 0, l = this.length; i < l; i++ ) {
-                               var old = jQuery.data(this[i], "olddisplay");
-
-                               this[i].style.display = old || "";
-
-                               if ( jQuery.css(this[i], "display") === "none" ) {
-                                       var nodeName = this[i].nodeName, display;
-
-                                       if ( elemdisplay[ nodeName ] ) {
-                                               display = elemdisplay[ nodeName ];
-
-                                       } else {
-                                               var elem = jQuery("<" + nodeName + " />").appendTo("body");
-
-                                               display = elem.css("display");
-
-                                               if ( display === "none" ) {
-                                                       display = "block";
-                                               }
-
-                                               elem.remove();
-
-                                               elemdisplay[ nodeName ] = display;
-                                       }
-
-                                       jQuery.data(this[i], "olddisplay", display);
-                               }
-                       }
-
-                       // Set the display of the elements in a second loop
-                       // to avoid the constant reflow
-                       for ( var j = 0, k = this.length; j < k; j++ ) {
-                               this[j].style.display = jQuery.data(this[j], "olddisplay") || "";
-                       }
-
-                       return this;
-               }
-       },
-
-       hide: function( speed, callback ) {
-               if ( speed != null ) {
-                       return this.animate( genFx("hide", 3), speed, callback);
-
-               } else {
-                       for ( var i = 0, l = this.length; i < l; i++ ) {
-                               var old = jQuery.data(this[i], "olddisplay");
-                               if ( !old && old !== "none" ) {
-                                       jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
-                               }
-                       }
-
-                       // Set the display of the elements in a second loop
-                       // to avoid the constant reflow
-                       for ( var j = 0, k = this.length; j < k; j++ ) {
-                               this[j].style.display = "none";
-                       }
-
-                       return this;
-               }
-       },
-
-       // Save the old toggle function
-       _toggle: jQuery.fn.toggle,
-
-       toggle: function( fn, fn2 ) {
-               var bool = typeof fn === "boolean";
-
-               if ( jQuery.isFunction(fn) && jQuery.isFunction(fn2) ) {
-                       this._toggle.apply( this, arguments );
-
-               } else if ( fn == null || bool ) {
-                       this.each(function() {
-                               var state = bool ? fn : jQuery(this).is(":hidden");
-                               jQuery(this)[ state ? "show" : "hide" ]();
-                       });
-
-               } else {
-                       this.animate(genFx("toggle", 3), fn, fn2);
-               }
-
-               return this;
-       },
-
-       fadeTo: function( speed, to, callback ) {
-               return this.filter(":hidden").css("opacity", 0).show().end()
-                                       .animate({opacity: to}, speed, callback);
-       },
-
-       animate: function( prop, speed, easing, callback ) {
-               var optall = jQuery.speed(speed, easing, callback);
-
-               if ( jQuery.isEmptyObject( prop ) ) {
-                       return this.each( optall.complete );
-               }
-
-               return this[ optall.queue === false ? "each" : "queue" ](function() {
-                       var opt = jQuery.extend({}, optall), p,
-                               hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
-                               self = this;
-
-                       for ( p in prop ) {
-                               var name = p.replace(rdashAlpha, fcamelCase);
-
-                               if ( p !== name ) {
-                                       prop[ name ] = prop[ p ];
-                                       delete prop[ p ];
-                                       p = name;
-                               }
-
-                               if ( prop[p] === "hide" && hidden || prop[p] === "show" && !hidden ) {
-                                       return opt.complete.call(this);
-                               }
-
-                               if ( ( p === "height" || p === "width" ) && this.style ) {
-                                       // Store display property
-                                       opt.display = jQuery.css(this, "display");
-
-                                       // Make sure that nothing sneaks out
-                                       opt.overflow = this.style.overflow;
-                               }
-
-                               if ( jQuery.isArray( prop[p] ) ) {
-                                       // Create (if needed) and add to specialEasing
-                                       (opt.specialEasing = opt.specialEasing || {})[p] = prop[p][1];
-                                       prop[p] = prop[p][0];
-                               }
-                       }
-
-                       if ( opt.overflow != null ) {
-                               this.style.overflow = "hidden";
-                       }
-
-                       opt.curAnim = jQuery.extend({}, prop);
-
-                       jQuery.each( prop, function( name, val ) {
-                               var e = new jQuery.fx( self, opt, name );
-
-                               if ( rfxtypes.test(val) ) {
-                                       e[ val === "toggle" ? hidden ? "show" : "hide" : val ]( prop );
-
-                               } else {
-                                       var parts = rfxnum.exec(val),
-                                               start = e.cur(true) || 0;
-
-                                       if ( parts ) {
-                                               var end = parseFloat( parts[2] ),
-                                                       unit = parts[3] || "px";
-
-                                               // We need to compute starting value
-                                               if ( unit !== "px" ) {
-                                                       self.style[ name ] = (end || 1) + unit;
-                                                       start = ((end || 1) / e.cur(true)) * start;
-                                                       self.style[ name ] = start + unit;
-                                               }
-
-                                               // If a +=/-= token was provided, we're doing a relative animation
-                                               if ( parts[1] ) {
-                                                       end = ((parts[1] === "-=" ? -1 : 1) * end) + start;
-                                               }
-
-                                               e.custom( start, end, unit );
-
-                                       } else {
-                                               e.custom( start, val, "" );
-                                       }
-                               }
-                       });
-
-                       // For JS strict compliance
-                       return true;
-               });
-       },
-
-       stop: function( clearQueue, gotoEnd ) {
-               var timers = jQuery.timers;
-
-               if ( clearQueue ) {
-                       this.queue([]);
-               }
-
-               this.each(function() {
-                       // go in reverse order so anything added to the queue during the loop is ignored
-                       for ( var i = timers.length - 1; i >= 0; i-- ) {
-                               if ( timers[i].elem === this ) {
-                                       if (gotoEnd) {
-                                               // force the next step to be the last
-                                               timers[i](true);
-                                       }
-
-                                       timers.splice(i, 1);
-                               }
-                       }
-               });
-
-               // start the next in the queue if the last step wasn't forced
-               if ( !gotoEnd ) {
-                       this.dequeue();
-               }
-
-               return this;
-       }
-
-});
-
-// Generate shortcuts for custom animations
-jQuery.each({
-       slideDown: genFx("show", 1),
-       slideUp: genFx("hide", 1),
-       slideToggle: genFx("toggle", 1),
-       fadeIn: { opacity: "show" },
-       fadeOut: { opacity: "hide" }
-}, function( name, props ) {
-       jQuery.fn[ name ] = function( speed, callback ) {
-               return this.animate( props, speed, callback );
-       };
-});
-
-jQuery.extend({
-       speed: function( speed, easing, fn ) {
-               var opt = speed && typeof speed === "object" ? speed : {
-                       complete: fn || !fn && easing ||
-                               jQuery.isFunction( speed ) && speed,
-                       duration: speed,
-                       easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
-               };
-
-               opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
-                       jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
-
-               // Queueing
-               opt.old = opt.complete;
-               opt.complete = function() {
-                       if ( opt.queue !== false ) {
-                               jQuery(this).dequeue();
-                       }
-                       if ( jQuery.isFunction( opt.old ) ) {
-                               opt.old.call( this );
-                       }
-               };
-
-               return opt;
-       },
-
-       easing: {
-               linear: function( p, n, firstNum, diff ) {
-                       return firstNum + diff * p;
-               },
-               swing: function( p, n, firstNum, diff ) {
-                       return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
-               }
-       },
-
-       timers: [],
-
-       fx: function( elem, options, prop ) {
-               this.options = options;
-               this.elem = elem;
-               this.prop = prop;
-
-               if ( !options.orig ) {
-                       options.orig = {};
-               }
-       }
-
-});
-
-jQuery.fx.prototype = {
-       // Simple function for setting a style value
-       update: function() {
-               if ( this.options.step ) {
-                       this.options.step.call( this.elem, this.now, this );
-               }
-
-               (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
-
-               // Set display property to block for height/width animations
-               if ( ( this.prop === "height" || this.prop === "width" ) && this.elem.style ) {
-                       this.elem.style.display = "block";
-               }
-       },
-
-       // Get the current size
-       cur: function( force ) {
-               if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
-                       return this.elem[ this.prop ];
-               }
-
-               var r = parseFloat(jQuery.css(this.elem, this.prop, force));
-               return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
-       },
-
-       // Start an animation from one number to another
-       custom: function( from, to, unit ) {
-               this.startTime = now();
-               this.start = from;
-               this.end = to;
-               this.unit = unit || this.unit || "px";
-               this.now = this.start;
-               this.pos = this.state = 0;
-
-               var self = this;
-               function t( gotoEnd ) {
-                       return self.step(gotoEnd);
-               }
-
-               t.elem = this.elem;
-
-               if ( t() && jQuery.timers.push(t) && !timerId ) {
-                       timerId = setInterval(jQuery.fx.tick, 13);
-               }
-       },
-
-       // Simple 'show' function
-       show: function() {
-               // Remember where we started, so that we can go back to it later
-               this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
-               this.options.show = true;
-
-               // Begin the animation
-               // Make sure that we start at a small width/height to avoid any
-               // flash of content
-               this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur());
-
-               // Start by showing the element
-               jQuery( this.elem ).show();
-       },
-
-       // Simple 'hide' function
-       hide: function() {
-               // Remember where we started, so that we can go back to it later
-               this.options.orig[this.prop] = jQuery.style( this.elem, this.prop );
-               this.options.hide = true;
-
-               // Begin the animation
-               this.custom(this.cur(), 0);
-       },
-
-       // Each step of an animation
-       step: function( gotoEnd ) {
-               var t = now(), done = true;
-
-               if ( gotoEnd || t >= this.options.duration + this.startTime ) {
-                       this.now = this.end;
-                       this.pos = this.state = 1;
-                       this.update();
-
-                       this.options.curAnim[ this.prop ] = true;
-
-                       for ( var i in this.options.curAnim ) {
-                               if ( this.options.curAnim[i] !== true ) {
-                                       done = false;
-                               }
-                       }
-
-                       if ( done ) {
-                               if ( this.options.display != null ) {
-                                       // Reset the overflow
-                                       this.elem.style.overflow = this.options.overflow;
-
-                                       // Reset the display
-                                       var old = jQuery.data(this.elem, "olddisplay");
-                                       this.elem.style.display = old ? old : this.options.display;
-
-                                       if ( jQuery.css(this.elem, "display") === "none" ) {
-                                               this.elem.style.display = "block";
-                                       }
-                               }
-
-                               // Hide the element if the "hide" operation was done
-                               if ( this.options.hide ) {
-                                       jQuery(this.elem).hide();
-                               }
-
-                               // Reset the properties, if the item has been hidden or shown
-                               if ( this.options.hide || this.options.show ) {
-                                       for ( var p in this.options.curAnim ) {
-                                               jQuery.style(this.elem, p, this.options.orig[p]);
-                                       }
-                               }
-
-                               // Execute the complete function
-                               this.options.complete.call( this.elem );
-                       }
-
-                       return false;
-
-               } else {
-                       var n = t - this.startTime;
-                       this.state = n / this.options.duration;
-
-                       // Perform the easing function, defaults to swing
-                       var specialEasing = this.options.specialEasing && this.options.specialEasing[this.prop];
-                       var defaultEasing = this.options.easing || (jQuery.easing.swing ? "swing" : "linear");
-                       this.pos = jQuery.easing[specialEasing || defaultEasing](this.state, n, 0, 1, this.options.duration);
-                       this.now = this.start + ((this.end - this.start) * this.pos);
-
-                       // Perform the next step of the animation
-                       this.update();
-               }
-
-               return true;
-       }
-};
-
-jQuery.extend( jQuery.fx, {
-       tick: function() {
-               var timers = jQuery.timers;
-
-               for ( var i = 0; i < timers.length; i++ ) {
-                       if ( !timers[i]() ) {
-                               timers.splice(i--, 1);
-                       }
-               }
-
-               if ( !timers.length ) {
-                       jQuery.fx.stop();
-               }
-       },
-               
-       stop: function() {
-               clearInterval( timerId );
-               timerId = null;
-       },
-       
-       speeds: {
-               slow: 600,
-               fast: 200,
-               // Default speed
-               _default: 400
-       },
-
-       step: {
-               opacity: function( fx ) {
-                       jQuery.style(fx.elem, "opacity", fx.now);
-               },
-
-               _default: function( fx ) {
-                       if ( fx.elem.style && fx.elem.style[ fx.prop ] != null ) {
-                               fx.elem.style[ fx.prop ] = (fx.prop === "width" || fx.prop === "height" ? Math.max(0, fx.now) : fx.now) + fx.unit;
-                       } else {
-                               fx.elem[ fx.prop ] = fx.now;
-                       }
-               }
-       }
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
-       jQuery.expr.filters.animated = function( elem ) {
-               return jQuery.grep(jQuery.timers, function( fn ) {
-                       return elem === fn.elem;
-               }).length;
-       };
-}
-
-function genFx( type, num ) {
-       var obj = {};
-
-       jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() {
-               obj[ this ] = type;
-       });
-
-       return obj;
-}
-if ( "getBoundingClientRect" in document.documentElement ) {
-       jQuery.fn.offset = function( options ) {
-               var elem = this[0];
-
-               if ( !elem || !elem.ownerDocument ) {
-                       return null;
-               }
-
-               if ( options ) { 
-                       return this.each(function( i ) {
-                               jQuery.offset.setOffset( this, options, i );
-                       });
-               }
-
-               if ( elem === elem.ownerDocument.body ) {
-                       return jQuery.offset.bodyOffset( elem );
-               }
-
-               var box = elem.getBoundingClientRect(), doc = elem.ownerDocument, body = doc.body, docElem = doc.documentElement,
-                       clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
-                       top  = box.top  + (self.pageYOffset || jQuery.support.boxModel && docElem.scrollTop  || body.scrollTop ) - clientTop,
-                       left = box.left + (self.pageXOffset || jQuery.support.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
-
-               return { top: top, left: left };
-       };
-
-} else {
-       jQuery.fn.offset = function( options ) {
-               var elem = this[0];
-
-               if ( !elem || !elem.ownerDocument ) {
-                       return null;
-               }
-
-               if ( options ) { 
-                       return this.each(function( i ) {
-                               jQuery.offset.setOffset( this, options, i );
-                       });
-               }
-
-               if ( elem === elem.ownerDocument.body ) {
-                       return jQuery.offset.bodyOffset( elem );
-               }
-
-               jQuery.offset.initialize();
-
-               var offsetParent = elem.offsetParent, prevOffsetParent = elem,
-                       doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
-                       body = doc.body, defaultView = doc.defaultView,
-                       prevComputedStyle = defaultView ? defaultView.getComputedStyle( elem, null ) : elem.currentStyle,
-                       top = elem.offsetTop, left = elem.offsetLeft;
-
-               while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
-                       if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
-                               break;
-                       }
-
-                       computedStyle = defaultView ? defaultView.getComputedStyle(elem, null) : elem.currentStyle;
-                       top  -= elem.scrollTop;
-                       left -= elem.scrollLeft;
-
-                       if ( elem === offsetParent ) {
-                               top  += elem.offsetTop;
-                               left += elem.offsetLeft;
-
-                               if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.nodeName)) ) {
-                                       top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
-                                       left += parseFloat( computedStyle.borderLeftWidth ) || 0;
-                               }
-
-                               prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
-                       }
-
-                       if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" ) {
-                               top  += parseFloat( computedStyle.borderTopWidth  ) || 0;
-                               left += parseFloat( computedStyle.borderLeftWidth ) || 0;
-                       }
-
-                       prevComputedStyle = computedStyle;
-               }
-
-               if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" ) {
-                       top  += body.offsetTop;
-                       left += body.offsetLeft;
-               }
-
-               if ( jQuery.offset.supportsFixedPosition && prevComputedStyle.position === "fixed" ) {
-                       top  += Math.max( docElem.scrollTop, body.scrollTop );
-                       left += Math.max( docElem.scrollLeft, body.scrollLeft );
-               }
-
-               return { top: top, left: left };
-       };
-}
-
-jQuery.offset = {
-       initialize: function() {
-               var body = document.body, container = document.createElement("div"), innerDiv, checkDiv, table, td, bodyMarginTop = parseFloat( jQuery.curCSS(body, "marginTop", true) ) || 0,
-                       html = "<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
-
-               jQuery.extend( container.style, { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" } );
-
-               container.innerHTML = html;
-               body.insertBefore( container, body.firstChild );
-               innerDiv = container.firstChild;
-               checkDiv = innerDiv.firstChild;
-               td = innerDiv.nextSibling.firstChild.firstChild;
-
-               this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
-               this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
-
-               checkDiv.style.position = "fixed", checkDiv.style.top = "20px";
-               // safari subtracts parent border width here which is 5px
-               this.supportsFixedPosition = (checkDiv.offsetTop === 20 || checkDiv.offsetTop === 15);
-               checkDiv.style.position = checkDiv.style.top = "";
-
-               innerDiv.style.overflow = "hidden", innerDiv.style.position = "relative";
-               this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
-
-               this.doesNotIncludeMarginInBodyOffset = (body.offsetTop !== bodyMarginTop);
-
-               body.removeChild( container );
-               body = container = innerDiv = checkDiv = table = td = null;
-               jQuery.offset.initialize = jQuery.noop;
-       },
-
-       bodyOffset: function( body ) {
-               var top = body.offsetTop, left = body.offsetLeft;
-
-               jQuery.offset.initialize();
-
-               if ( jQuery.offset.doesNotIncludeMarginInBodyOffset ) {
-                       top  += parseFloat( jQuery.curCSS(body, "marginTop",  true) ) || 0;
-                       left += parseFloat( jQuery.curCSS(body, "marginLeft", true) ) || 0;
-               }
-
-               return { top: top, left: left };
-       },
-       
-       setOffset: function( elem, options, i ) {
-               // set position first, in-case top/left are set even on static elem
-               if ( /static/.test( jQuery.curCSS( elem, "position" ) ) ) {
-                       elem.style.position = "relative";
-               }
-               var curElem   = jQuery( elem ),
-                       curOffset = curElem.offset(),
-                       curTop    = parseInt( jQuery.curCSS( elem, "top",  true ), 10 ) || 0,
-                       curLeft   = parseInt( jQuery.curCSS( elem, "left", true ), 10 ) || 0;
-
-               if ( jQuery.isFunction( options ) ) {
-                       options = options.call( elem, i, curOffset );
-               }
-
-               var props = {
-                       top:  (options.top  - curOffset.top)  + curTop,
-                       left: (options.left - curOffset.left) + curLeft
-               };
-               
-               if ( "using" in options ) {
-                       options.using.call( elem, props );
-               } else {
-                       curElem.css( props );
-               }
-       }
-};
-
-
-jQuery.fn.extend({
-       position: function() {
-               if ( !this[0] ) {
-                       return null;
-               }
-
-               var elem = this[0],
-
-               // Get *real* offsetParent
-               offsetParent = this.offsetParent(),
-
-               // Get correct offsets
-               offset       = this.offset(),
-               parentOffset = /^body|html$/i.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
-
-               // Subtract element margins
-               // note: when an element has margin: auto the offsetLeft and marginLeft
-               // are the same in Safari causing offset.left to incorrectly be 0
-               offset.top  -= parseFloat( jQuery.curCSS(elem, "marginTop",  true) ) || 0;
-               offset.left -= parseFloat( jQuery.curCSS(elem, "marginLeft", true) ) || 0;
-
-               // Add offsetParent borders
-               parentOffset.top  += parseFloat( jQuery.curCSS(offsetParent[0], "borderTopWidth",  true) ) || 0;
-               parentOffset.left += parseFloat( jQuery.curCSS(offsetParent[0], "borderLeftWidth", true) ) || 0;
-
-               // Subtract the two offsets
-               return {
-                       top:  offset.top  - parentOffset.top,
-                       left: offset.left - parentOffset.left
-               };
-       },
-
-       offsetParent: function() {
-               return this.map(function() {
-                       var offsetParent = this.offsetParent || document.body;
-                       while ( offsetParent && (!/^body|html$/i.test(offsetParent.nodeName) && jQuery.css(offsetParent, "position") === "static") ) {
-                               offsetParent = offsetParent.offsetParent;
-                       }
-                       return offsetParent;
-               });
-       }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( ["Left", "Top"], function( i, name ) {
-       var method = "scroll" + name;
-
-       jQuery.fn[ method ] = function(val) {
-               var elem = this[0], win;
-               
-               if ( !elem ) {
-                       return null;
-               }
-
-               if ( val !== undefined ) {
-                       // Set the scroll offset
-                       return this.each(function() {
-                               win = getWindow( this );
-
-                               if ( win ) {
-                                       win.scrollTo(
-                                               !i ? val : jQuery(win).scrollLeft(),
-                                                i ? val : jQuery(win).scrollTop()
-                                       );
-
-                               } else {
-                                       this[ method ] = val;
-                               }
-                       });
-               } else {
-                       win = getWindow( elem );
-
-                       // Return the scroll offset
-                       return win ? ("pageXOffset" in win) ? win[ i ? "pageYOffset" : "pageXOffset" ] :
-                               jQuery.support.boxModel && win.document.documentElement[ method ] ||
-                                       win.document.body[ method ] :
-                               elem[ method ];
-               }
-       };
-});
-
-function getWindow( elem ) {
-       return ("scrollTo" in elem && elem.document) ?
-               elem :
-               elem.nodeType === 9 ?
-                       elem.defaultView || elem.parentWindow :
-                       false;
-}
-// Create innerHeight, innerWidth, outerHeight and outerWidth methods
-jQuery.each([ "Height", "Width" ], function( i, name ) {
-
-       var type = name.toLowerCase();
-
-       // innerHeight and innerWidth
-       jQuery.fn["inner" + name] = function() {
-               return this[0] ?
-                       jQuery.css( this[0], type, false, "padding" ) :
-                       null;
-       };
-
-       // outerHeight and outerWidth
-       jQuery.fn["outer" + name] = function( margin ) {
-               return this[0] ?
-                       jQuery.css( this[0], type, false, margin ? "margin" : "border" ) :
-                       null;
-       };
-
-       jQuery.fn[ type ] = function( size ) {
-               // Get window width or height
-               var elem = this[0];
-               if ( !elem ) {
-                       return size == null ? null : this;
-               }
-
-               return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
-                       // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
-                       elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
-                       elem.document.body[ "client" + name ] :
-
-                       // Get document width or height
-                       (elem.nodeType === 9) ? // is it a document
-                               // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
-                               Math.max(
-                                       elem.documentElement["client" + name],
-                                       elem.body["scroll" + name], elem.documentElement["scroll" + name],
-                                       elem.body["offset" + name], elem.documentElement["offset" + name]
-                               ) :
-
-                               // Get or set width or height on the element
-                               size === undefined ?
-                                       // Get width or height on the element
-                                       jQuery.css( elem, type ) :
-
-                                       // Set the width or height on the element (default to pixels if value is unitless)
-                                       this.css( type, typeof size === "string" ? size : size + "px" );
-       };
-
-});
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-})(window);
diff --git a/ricoClient/js/baselibs/jquery.js b/ricoClient/js/baselibs/jquery.js
deleted file mode 100644 (file)
index 5c70e4c..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://docs.jquery.com/License
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Wed Jan 13 15:23:05 2010 -0500
- */
-(function(A,w){function oa(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(oa,1);return}c.ready()}}function La(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function $(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var o in b)$(a,o,b[o],f,e,d);return a}if(d!==w){f=!i&&f&&c.isFunction(d);for(o=0;o<j;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,i);return a}return j?
-e(a[0],b):null}function K(){return(new Date).getTime()}function aa(){return false}function ba(){return true}function pa(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function qa(a){var b=true,d=[],f=[],e=arguments,i,j,o,p,n,t=c.extend({},c.data(this,"events").live);for(p in t){j=t[p];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete t[p]}i=c(a.target).closest(f,a.currentTarget);
-n=0;for(l=i.length;n<l;n++)for(p in t){j=t[p];o=i[n].elem;f=null;if(i[n].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==o)d.push({elem:o,fn:j})}}n=0;for(l=d.length;n<l;n++){i=d[n];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}function ra(a,b){return["live",a,b.replace(/\./g,"`").replace(/ /g,"&")].join(".")}function sa(a){return!a||!a.parentNode||a.parentNode.nodeType===
-11}function ta(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ua(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:s;f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=
-i?f:1;return{fragment:f,cacheable:e}}function T(a){for(var b=0,d,f;(d=a[b])!=null;b++)if(!c.noData[d.nodeName.toLowerCase()]&&(f=d[H]))delete c.cache[f]}function L(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ma=A.jQuery,Na=A.$,s=A.document,U,Oa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Pa=/^.[^:#\[\.,]*$/,Qa=/\S/,
-Ra=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Sa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],M,ca=Object.prototype.toString,da=Object.prototype.hasOwnProperty,ea=Array.prototype.push,R=Array.prototype.slice,V=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Oa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Sa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];
-c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ua([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return U.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a)}else return!b||b.jquery?(b||U).find(a):c(b).find(a);else if(c.isFunction(a))return U.ready(a);if(a.selector!==w){this.selector=a.selector;
-this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,this)},selector:"",jquery:"1.4",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=
-0;ea.apply(this,a);return this},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||
-c(null)},push:ea,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];o=e[i];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(o)?[]:{};a[i]=c.extend(f,j,o)}else if(o!==w)a[i]=
-o}return a};c.extend({noConflict:function(a){A.$=Na;if(a)A.jQuery=Ma;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",M,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",
-M);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&oa()}}},isFunction:function(a){return ca.call(a)==="[object Function]"},isArray:function(a){return ca.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||ca.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!da.call(a,"constructor")&&!da.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===w||da.call(a,b)},
-isEmptyObject:function(a){for(var b in a)return false;return true},noop:function(){},globalEval:function(a){if(a&&Qa.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===w||c.isFunction(a);
-if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Ra,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ea.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=
-0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b===
-"string"){d=a;a=d[b];b=w}else if(b&&!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){var b={browser:""};a=a.toLowerCase();if(/webkit/.test(a))b={browser:"webkit",version:/webkit[\/ ]([\w.]+)/};else if(/opera/.test(a))b={browser:"opera",version:/version/.test(a)?/version[\/ ]([\w.]+)/:/opera[\/ ]([\w.]+)/};else if(/msie/.test(a))b={browser:"msie",version:/msie ([\w.]+)/};else if(/mozilla/.test(a)&&
-!/compatible/.test(a))b={browser:"mozilla",version:/rv:([\w.]+)/};b.version=(b.version&&b.version.exec(a)||[0,"0"])[1];return b},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=true;if(V)c.inArray=function(a,b){return V.call(b,a)};U=c(s);if(s.addEventListener)M=function(){s.removeEventListener("DOMContentLoaded",M,false);c.ready()};else if(s.attachEvent)M=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",
-M);c.ready()}};if(V)c.inArray=function(a,b){return V.call(b,a)};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+K();d.style.display="none";d.innerHTML="   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,
-htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,
-a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function o(){c.support.noCloneEvent=false;d.detachEvent("onclick",o)});d.cloneNode(true).fireEvent("onclick")}c(function(){var o=s.createElement("div");o.style.width=o.style.paddingLeft="1px";s.body.appendChild(o);c.boxModel=c.support.boxModel=o.offsetWidth===2;s.body.removeChild(o).style.display="none"});a=function(o){var p=s.createElement("div");o="on"+o;var n=o in
-p;if(!n){p.setAttribute(o,"return;");n=typeof p[o]==="function"}return n};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var H="jQuery"+K(),Ta=0,ya={},Ua={};c.extend({cache:{},expando:H,noData:{embed:true,object:true,applet:true},data:function(a,
-b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var f=a[H],e=c.cache;if(!b&&!f)return null;f||(f=++Ta);if(typeof b==="object"){a[H]=f;e=e[f]=c.extend(true,{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Ua:(e[f]={});if(d!==w){a[H]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?ya:a;var d=a[H],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[H]}catch(i){a.removeAttribute&&
-a.removeAttribute(H)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,
-a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,
-a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var za=/[\n\t]/g,fa=/\s+/,Va=/\r/g,Wa=/href|src|style/,Xa=/(button|input)/i,Ya=/(button|input|object|select|textarea)/i,Za=/^(a|area)$/i,Aa=/radio|checkbox/;c.fn.extend({attr:function(a,
-b){return $(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.addClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,o=b.length;j<o;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=
-" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(p){var n=c(this);n.removeClass(a.call(this,p,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(fa),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(za," "),j=0,o=b.length;j<o;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,
-b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),o=b,p=a.split(fa);e=p[i++];){o=f?o:!j.hasClass(e);j[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=
-" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(za," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(Aa.test(b.type)&&
-!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Va,"")}return w}var o=c.isFunction(a);return this.each(function(p){var n=c(this),t=a;if(this.nodeType===1){if(o)t=a.call(this,p,n.val());if(typeof t==="number")t+="";if(c.isArray(t)&&Aa.test(this.type))this.checked=c.inArray(n.val(),t)>=0;else if(c.nodeName(this,"select")){var z=c.makeArray(t);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),z)>=0});if(!z.length)this.selectedIndex=
--1}else this.value=t}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Wa.test(b);if(b in a&&f&&!i){if(e){if(b==="type"&&Xa.test(a.nodeName)&&a.parentNode)throw"type property can't be changed";a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;
-if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Ya.test(a.nodeName)||Za.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var $a=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===
-3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;if(!d.guid)d.guid=c.guid++;if(f!==w){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):w};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var o,p=0;o=b[p++];){var n=o.split(".");o=n.shift();d.type=n.slice(0).sort().join(".");var t=e[o],z=this.special[o]||{};if(!t){t=e[o]={};
-if(!z.setup||z.setup.call(a,f,n,d)===false)if(a.addEventListener)a.addEventListener(o,i,false);else a.attachEvent&&a.attachEvent("on"+o,i)}if(z.add)if((n=z.add.call(a,d,f,n,t))&&c.isFunction(n)){n.guid=n.guid||d.guid;d=n}t[d.guid]=d;this.global[o]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===w||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);
-for(var o=0;i=b[o++];){var p=i.split(".");i=p.shift();var n=!p.length,t=c.map(p.slice(0).sort(),$a);t=new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.)?")+"(\\.|$)");var z=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var B in f[i])if(n||t.test(f[i][B].type))delete f[i][B];z.remove&&z.remove.call(a,p,j);for(e in f[i])break;if(!e){if(!z.teardown||z.teardown.call(a,p)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+
-i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(B=c.data(a,"handle"))B.elem=null;c.removeData(a,"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[H]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
-8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;var i=c.data(d,"handle");i&&i.apply(d,b);var j,o;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){j=d[e];o=d["on"+e]}}catch(p){}i=c.nodeName(d,"a")&&e==="click";if(!f&&j&&!a.isDefaultPrevented()&&!i){this.triggered=true;try{d[e]()}catch(n){}}else if(o&&d["on"+e].apply(d,b)===false)a.result=false;this.triggered=false;if(!a.isPropagationStopped())(d=d.parentNode||d.ownerDocument)&&c.event.trigger(a,b,d,true)},
-handle:function(a){var b,d;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},
-props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[H])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||
-s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&
-a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;c.event.add(this,b.live,qa,b)},remove:function(a){if(a.length){var b=0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],qa)}},special:{}},beforeunload:{setup:function(a,
-b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=K();this[H]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ba;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=
-ba;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ba;this.stopPropagation()},isDefaultPrevented:aa,isPropagationStopped:aa,isImmediatePropagationStopped:aa};var Ba=function(a){for(var b=a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ca=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",
-mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ca:Ba,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ca:Ba)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return pa("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+
-d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return pa("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var ga=/textarea|input|select/i;function Da(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>
--1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ha(a,b){var d=a.target,f,e;if(!(!ga.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Da(d);if(e!==f){if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",e);if(d.type!=="select"&&(f!=null||e)){a.type="change";return c.event.trigger(a,b,this)}}}}c.event.special.change={filters:{focusout:ha,click:function(a){var b=a.target,d=b.type;if(d===
-"radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ha.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ha.call(this,a)},beforeactivate:function(a){a=a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Da(a))}},setup:function(a,b,d){for(var f in W)c.event.add(this,f+".specialChange."+d.guid,W[f]);return ga.test(this.nodeName)},
-remove:function(a,b){for(var d in W)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),W[d]);return ga.test(this.nodeName)}};var W=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,
-f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){thisObject=e;e=f;f=w}var j=b==="one"?c.proxy(e,function(o){c(this).unbind(o,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e,thisObject):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,
-b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||
-a)},live:function(a,b,d){if(c.isFunction(b)){d=b;b=w}c(this.context).bind(ra(a,this.selector),{data:b,selector:this.selector,live:a},d);return this},die:function(a,b){c(this.context).unbind(ra(a,this.selector),b?{guid:b.guid+this.selector+a}:null);return this}});c.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".split(" "),function(a,b){c.fn[b]=function(d){return d?
-this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",k,m=0;g[m];m++){k=g[m];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===
-k){y=m[u.sizset];break}if(u.nodeType===1&&!q){u.sizcache=k;u.sizset=r}if(u.nodeName.toLowerCase()===h){y=u;break}u=u[g]}m[r]=y}}}function d(g,h,k,m,r,q){r=0;for(var v=m.length;r<v;r++){var u=m[r];if(u){u=u[g];for(var y=false;u;){if(u.sizcache===k){y=m[u.sizset];break}if(u.nodeType===1){if(!q){u.sizcache=k;u.sizset=r}if(typeof h!=="string"){if(u===h){y=true;break}}else if(p.filter(h,[u]).length>0){y=u;break}}u=u[g]}m[r]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-e=0,i=Object.prototype.toString,j=false,o=true;[0,0].sort(function(){o=false;return 0});var p=function(g,h,k,m){k=k||[];var r=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return k;for(var q=[],v,u,y,S,I=true,N=x(h),J=g;(f.exec(""),v=f.exec(J))!==null;){J=v[3];q.push(v[1]);if(v[2]){S=v[3];break}}if(q.length>1&&t.exec(g))if(q.length===2&&n.relative[q[0]])u=ia(q[0]+q[1],h);else for(u=n.relative[q[0]]?[h]:p(q.shift(),h);q.length;){g=q.shift();if(n.relative[g])g+=q.shift();
-u=ia(g,u)}else{if(!m&&q.length>1&&h.nodeType===9&&!N&&n.match.ID.test(q[0])&&!n.match.ID.test(q[q.length-1])){v=p.find(q.shift(),h,N);h=v.expr?p.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:q.pop(),set:B(m)}:p.find(q.pop(),q.length===1&&(q[0]==="~"||q[0]==="+")&&h.parentNode?h.parentNode:h,N);u=v.expr?p.filter(v.expr,v.set):v.set;if(q.length>0)y=B(u);else I=false;for(;q.length;){var E=q.pop();v=E;if(n.relative[E])v=q.pop();else E="";if(v==null)v=h;n.relative[E](y,v,N)}}else y=[]}y||(y=u);if(!y)throw"Syntax error, unrecognized expression: "+
-(E||g);if(i.call(y)==="[object Array]")if(I)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&F(h,y[g])))k.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&k.push(u[g]);else k.push.apply(k,y);else B(y,k);if(S){p(S,r,k,m);p.uniqueSort(k)}return k};p.uniqueSort=function(g){if(D){j=o;g.sort(D);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};p.matches=function(g,h){return p(g,null,null,h)};p.find=function(g,h,k){var m,r;if(!g)return[];
-for(var q=0,v=n.order.length;q<v;q++){var u=n.order[q];if(r=n.leftMatch[u].exec(g)){var y=r[1];r.splice(1,1);if(y.substr(y.length-1)!=="\\"){r[1]=(r[1]||"").replace(/\\/g,"");m=n.find[u](r,h,k);if(m!=null){g=g.replace(n.match[u],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};p.filter=function(g,h,k,m){for(var r=g,q=[],v=h,u,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var I in n.filter)if((u=n.leftMatch[I].exec(g))!=null&&u[2]){var N=n.filter[I],J,E;E=u[1];y=false;u.splice(1,1);if(E.substr(E.length-
-1)!=="\\"){if(v===q)q=[];if(n.preFilter[I])if(u=n.preFilter[I](u,v,k,q,m,S)){if(u===true)continue}else y=J=true;if(u)for(var X=0;(E=v[X])!=null;X++)if(E){J=N(E,u,X,v);var Ea=m^!!J;if(k&&J!=null)if(Ea)y=true;else v[X]=false;else if(Ea){q.push(E);y=true}}if(J!==w){k||(v=q);g=g.replace(n.match[I],"");if(!y)return[];break}}}if(g===r)if(y==null)throw"Syntax error, unrecognized expression: "+g;else break;r=g}return v};var n=p.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
-CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
-relative:{"+":function(g,h){var k=typeof h==="string",m=k&&!/\W/.test(h);k=k&&!m;if(m)h=h.toLowerCase();m=0;for(var r=g.length,q;m<r;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=k||q&&q.nodeName.toLowerCase()===h?q||false:q===h}k&&p.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,r=g.length;m<r;m++){var q=g[m];if(q){k=q.parentNode;g[m]=k.nodeName.toLowerCase()===h?k:false}}}else{m=0;for(r=g.length;m<r;m++)if(q=g[m])g[m]=
-k?q.parentNode:q.parentNode===h;k&&p.filter(h,g,true)}},"":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("parentNode",h,m,g,q,k)},"~":function(g,h,k){var m=e++,r=d;if(typeof h==="string"&&!/\W/.test(h)){var q=h=h.toLowerCase();r=b}r("previousSibling",h,m,g,q,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];
-h=h.getElementsByName(g[1]);for(var m=0,r=h.length;m<r;m++)h[m].getAttribute("name")===g[1]&&k.push(h[m]);return k.length===0?null:k}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,m,r,q){g=" "+g[1].replace(/\\/g,"")+" ";if(q)return g;q=0;for(var v;(v=h[q])!=null;q++)if(v)if(r^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||m.push(v);else if(k)h[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
-CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,m,r,q){h=g[1].replace(/\\/g,"");if(!q&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,m,r){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=p(g[3],null,null,h);else{g=p.filter(g[3],h,k,true^r);k||m.push.apply(m,
-g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!p(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
-text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
-setFilters:{first:function(g,h){return h===0},last:function(g,h,k,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,m){var r=h[1],q=n.filters[r];if(q)return q(g,k,h,m);else if(r==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(r==="not"){h=
-h[3];k=0;for(m=h.length;k<m;k++)if(h[k]===g)return false;return true}else throw"Syntax error, unrecognized expression: "+r;},CHILD:function(g,h){var k=h[1],m=g;switch(k){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(k==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":k=h[2];var r=h[3];if(k===1&&r===0)return true;h=h[0];var q=g.parentNode;if(q&&(q.sizcache!==h||!g.nodeIndex)){var v=0;for(m=q.firstChild;m;m=
-m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;q.sizcache=h}g=g.nodeIndex-r;return k===0?g===0:g%k===0&&g/k>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=n.attrHandle[k]?n.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?k===h:m==="*="?k.indexOf(h)>=0:m==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:m==="!="?k!==h:m==="^="?k.indexOf(h)===0:m==="$="?k.substr(k.length-h.length)===h:m==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,m){var r=n.setFilters[h[2]];if(r)return r(g,k,h,m)}}},t=n.match.POS;for(var z in n.match){n.match[z]=new RegExp(n.match[z].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[z].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var B=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){B=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,m=g.length;k<m;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var D;if(s.documentElement.compareDocumentPosition)D=function(g,h){if(!g.compareDocumentPosition||
-!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in s.documentElement)D=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(s.createRange)D=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),m=
-h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)j=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=s.documentElement;k.insertBefore(g,k.firstChild);if(s.getElementById(h)){n.find.ID=function(m,r,q){if(typeof r.getElementById!=="undefined"&&!q)return(r=r.getElementById(m[1]))?r.id===m[1]||typeof r.getAttributeNode!=="undefined"&&
-r.getAttributeNode("id").nodeValue===m[1]?[r]:w:[]};n.filter.ID=function(m,r){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===r}}k.removeChild(g);k=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;k[m];m++)k[m].nodeType===1&&h.push(k[m]);k=h}return k};g.innerHTML="<a href='#'></a>";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=p,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){p=function(m,r,q,v){r=r||s;if(!v&&r.nodeType===9&&!x(r))try{return B(r.querySelectorAll(m),q)}catch(u){}return g(m,r,q,v)};for(var k in g)p[k]=g[k];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,k,m){if(typeof k.getElementsByClassName!=="undefined"&&!m)return k.getElementsByClassName(h[1])};g=null}}})();var F=s.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,
-h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ia=function(g,h){var k=[],m="",r;for(h=h.nodeType?[h]:h;r=n.match.PSEUDO.exec(g);){m+=r[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;r=0;for(var q=h.length;r<q;r++)p(g,h[r],k);return p.filter(m,k)};c.find=p;c.expr=p.selectors;c.expr[":"]=c.expr.filters;c.unique=p.uniqueSort;c.getText=a;c.isXMLDoc=x;c.contains=F})();var ab=/Until$/,bb=/^(?:parents|prevUntil|prevAll)/,
-cb=/,/;R=Array.prototype.slice;var Fa=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Pa.test(b))return c.filter(b,f,!d);else b=c.filter(b,a)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
-c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Fa(this,a,false),"not",a)},filter:function(a){return this.pushStack(Fa(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i=
-{},j;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var p=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,t){for(;t&&t.ownerDocument&&t!==b;){if(p?p.index(t)>-1:c(t).is(a))return t;t=t.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(sa(a[0])||sa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);ab.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||cb.test(f))&&bb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ga=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,db=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,hb=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},G={option:[1,"<select multiple='multiple'>","</select>"],
-legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};G.optgroup=G.option;G.tbody=G.tfoot=G.colgroup=G.caption=G.thead;G.th=G.td;if(!c.support.htmlSerialize)G._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);
-return d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&
-this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,
-"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ga,"").replace(Y,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ta(this,b);ta(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===
-1?this[0].innerHTML.replace(Ga,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!Y.test(a))&&!G[(Ha.exec(a)||["",""])[1].toLowerCase()])try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){T(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
-this[0].parentNode){c.isFunction(a)||(a=c(a).detach());return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(t){return c.nodeName(t,"table")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}var e,i,j=a[0],o=[];if(c.isFunction(j))return this.each(function(t){var z=
-c(this);a[0]=j.call(this,t,b?z.html():w);return z.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ua(a,this,o);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var p=0,n=this.length;p<n;p++)d.call(b?f(this[p],i):this[p],e.cacheable||this.length>1||p>0?e.fragment.cloneNode(true):e.fragment)}o&&c.each(o,La)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},
-function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){T(this.getElementsByTagName("*"));T([this])}this.parentNode&&this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&T(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},
-function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j==="string"){j=j.replace(db,hb);var o=(Ha.exec(j)||["",""])[1].toLowerCase(),p=G[o]||G._default,n=p[0];i=b.createElement("div");for(i.innerHTML=p[1]+j+p[2];n--;)i=i.lastChild;
-if(!c.support.tbody){n=fb.test(j);o=o==="table"&&!n?i.firstChild&&i.firstChild.childNodes:p[1]==="<table>"&&!n?i.childNodes:[];for(p=o.length-1;p>=0;--p)c.nodeName(o[p],"tbody")&&!o[p].childNodes.length&&o[p].parentNode.removeChild(o[p])}!c.support.leadingWhitespace&&Y.test(j)&&i.insertBefore(b.createTextNode(Y.exec(j)[0]),i.firstChild);j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()===
-"text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e}});var ib=/z-?index|font-?weight|opacity|zoom|line-?height/i,Ia=/alpha\([^)]*\)/,Ja=/opacity=([^)]*)/,ja=/float/i,ka=/-([a-z])/ig,jb=/([A-Z])/g,kb=/^-?\d+(?:px)?$/i,lb=/^-?\d/,mb={position:"absolute",visibility:"hidden",display:"block"},nb=["Left","Right"],ob=["Top","Bottom"],pb=s.defaultView&&
-s.defaultView.getComputedStyle,Ka=c.support.cssFloat?"cssFloat":"styleFloat",la=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return $(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!ib.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""===
-"NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ia.test(a)?a.replace(Ia,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ja.exec(f.filter)[1])/100+"":""}if(ja.test(b))b=Ka;b=b.replace(ka,la);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?nb:ob;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=
-parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,mb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Ja.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ja.test(b))b=Ka;if(!d&&e&&e[b])f=e[b];else if(pb){if(ja.test(b))b="float";b=b.replace(jb,"-$1").toLowerCase();e=
-a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ka,la);f=a.currentStyle[b]||a.currentStyle[d];if(!kb.test(f)&&lb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=
-f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var qb=K(),rb=/<script(.|\s)*?\/script>/gi,sb=/select|textarea/i,tb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,O=/=\?(&|$)/,ma=/\?/,ub=/(\?|&)_=.*?(&|$)/,vb=/^(\w+:)?\/\/([^\/?#]+)/,
-wb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}c.ajax({url:a,type:f,dataType:"html",data:b,context:this,complete:function(i,j){if(j==="success"||j==="notmodified")this.html(e?c("<div />").append(i.responseText.replace(rb,
-"")).find(e):i.responseText);d&&this.each(d,[i.responseText,j,i])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||sb.test(this.nodeName)||tb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});
-c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},
-ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",
-text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(p,o,j,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(p,x,j);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(r,q){(e.context?c(e.context):c.event).trigger(r,q)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,o,p=e.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,
-e.traditional);if(e.dataType==="jsonp"){if(n==="GET")O.test(e.url)||(e.url+=(ma.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!O.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&O.test(e.data)||O.test(e.url))){i=e.jsonpCallback||"jsonp"+qb++;if(e.data)e.data=(e.data+"").replace(O,"="+i+"$1");e.url=e.url.replace(O,"="+i+"$1");e.dataType="script";A[i]=A[i]||function(r){o=r;b();d();A[i]=w;try{delete A[i]}catch(q){}B&&
-B.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&n==="GET"){var t=K(),z=e.url.replace(ub,"$1_="+t+"$2");e.url=z+(z===e.url?(ma.test(e.url)?"&":"?")+"_="+t:"")}if(e.data&&n==="GET")e.url+=(ma.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");t=(t=vb.exec(e.url))&&(t[1]&&t[1]!==location.protocol||t[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&t){var B=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");
-C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!i){var D=false;C.onload=C.onreadystatechange=function(){if(!D&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){D=true;b();d();C.onload=C.onreadystatechange=null;B&&C.parentNode&&B.removeChild(C)}}}B.insertBefore(C,B.firstChild);return w}var F=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",
-e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}t||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ia){}if(e.beforeSend&&e.beforeSend.call(p,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",
-[x,e]);var g=x.onreadystatechange=function(r){if(!x||x.readyState===0){F||d();F=true;if(x)x.onreadystatechange=c.noop}else if(!F&&x&&(x.readyState===4||r==="timeout")){F=true;x.onreadystatechange=c.noop;j=r==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";if(j==="success")try{o=c.httpData(x,e.dataType,e)}catch(q){j="parsererror"}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,x,j);d();r==="timeout"&&x.abort();if(e.async)x=
-null}};try{var h=x.abort;x.abort=function(){if(x){h.call(x);if(x)x.readyState=0}g()}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){x&&!F&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||A,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol===
-"file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;if(e&&a.documentElement.nodeName==="parsererror")throw"parsererror";if(d&&
-d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))a=A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+a))();else throw"Invalid JSON: "+a;else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(e,i){i=
-c.isFunction(i)?i():i;f[f.length]=encodeURIComponent(e)+"="+encodeURIComponent(i)}var f=[];if(b===w)b=c.ajaxSettings.traditional;c.isArray(a)||a.jquery?c.each(a,function(){d(this.name,this.value)}):c.each(a,function e(i,j){if(c.isArray(j))c.each(j,function(o,p){b?d(i,p):e(i+"["+(typeof p==="object"||c.isArray(p)?o:"")+"]",p)});else!b&&j!=null&&typeof j==="object"?c.each(j,function(o,p){e(i+"["+o+"]",p)}):d(i,j)});return f.join("&").replace(wb,"+")}});var na={},xb=/toggle|show|hide/,yb=/^([+-]=)?([\d+-.]+)(.*)$/,
-Z,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a!=null)return this.animate(L("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(na[d])f=na[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
-na[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a!=null)return this.animate(L("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
-c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(L("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,o=this.nodeType===1&&c(this).is(":hidden"),
-p=this;for(j in a){var n=j.replace(ka,la);if(j!==n){a[n]=a[j];delete a[j];j=n}if(a[j]==="hide"&&o||a[j]==="show"&&!o)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(t,z){var B=new c.fx(p,i,t);if(xb.test(z))B[z==="toggle"?o?"show":"hide":z](a);
-else{var C=yb.exec(z),D=B.cur(true)||0;if(C){z=parseFloat(C[2]);var F=C[3]||"px";if(F!=="px"){p.style[t]=(z||1)+F;D=(z||1)/B.cur(true)*D;p.style[t]=D+F}if(C[1])z=(C[1]==="-="?-1:1)*z+D;B.custom(D,z,F)}else B.custom(D,z,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:L("show",1),slideUp:L("hide",1),slideToggle:L("toggle",
-1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
-b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==
-null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=K();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!Z)Z=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
-"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=K(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
-this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
-c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(Z);Z=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
-null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
-f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(!b||!b.ownerDocument)return null;if(a)return this.each(function(t){c.offset.setOffset(this,a,t)});if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
-b,e=b.ownerDocument,i,j=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var p=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;p-=b.scrollTop;n-=b.scrollLeft;if(b===d){p+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){p+=parseFloat(i.borderTopWidth)||
-0;n+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){p+=parseFloat(i.borderTopWidth)||0;n+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){p+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){p+=Math.max(j.scrollTop,o.scrollTop);n+=Math.max(j.scrollLeft,o.scrollLeft)}return{top:p,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),
-d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
-d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
-bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
-e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
-this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==w)return this.each(function(){if(i=wa(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=wa(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
-c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+
-b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/ricoClient/js/baselibs/mootools.js b/ricoClient/js/baselibs/mootools.js
deleted file mode 100644 (file)
index 0098571..0000000
+++ /dev/null
@@ -1,4329 +0,0 @@
-/*
----
-
-script: Core.js
-
-description: The core of MooTools, contains all the base functions and the Native and Hash implementations. Required by all the other scripts.
-
-license: MIT-style license.
-
-copyright: Copyright (c) 2006-2008 [Valerio Proietti](http://mad4milk.net/).
-
-authors: The MooTools production team (http://mootools.net/developers/)
-
-inspiration:
-- Class implementation inspired by [Base.js](http://dean.edwards.name/weblog/2006/03/base/) Copyright (c) 2006 Dean Edwards, [GNU Lesser General Public License](http://opensource.org/licenses/lgpl-license.php)
-- Some functionality inspired by [Prototype.js](http://prototypejs.org) Copyright (c) 2005-2007 Sam Stephenson, [MIT License](http://opensource.org/licenses/mit-license.php)
-
-provides: [Mootools, Native, Hash.base, Array.each, $util]
-
-...
-*/
-
-var MooTools = {
-       'version': '1.2.4',
-       'build': '0d9113241a90b9cd5643b926795852a2026710d4'
-};
-
-var Native = function(options){
-       options = options || {};
-       var name = options.name;
-       var legacy = options.legacy;
-       var protect = options.protect;
-       var methods = options.implement;
-       var generics = options.generics;
-       var initialize = options.initialize;
-       var afterImplement = options.afterImplement || function(){};
-       var object = initialize || legacy;
-       generics = generics !== false;
-
-       object.constructor = Native;
-       object.$family = {name: 'native'};
-       if (legacy && initialize) object.prototype = legacy.prototype;
-       object.prototype.constructor = object;
-
-       if (name){
-               var family = name.toLowerCase();
-               object.prototype.$family = {name: family};
-               Native.typize(object, family);
-       }
-
-       var add = function(obj, name, method, force){
-               if (!protect || force || !obj.prototype[name]) obj.prototype[name] = method;
-               if (generics) Native.genericize(obj, name, protect);
-               afterImplement.call(obj, name, method);
-               return obj;
-       };
-
-       object.alias = function(a1, a2, a3){
-               if (typeof a1 == 'string'){
-                       var pa1 = this.prototype[a1];
-                       if ((a1 = pa1)) return add(this, a2, a1, a3);
-               }
-               for (var a in a1) this.alias(a, a1[a], a2);
-               return this;
-       };
-
-       object.implement = function(a1, a2, a3){
-               if (typeof a1 == 'string') return add(this, a1, a2, a3);
-               for (var p in a1) add(this, p, a1[p], a2);
-               return this;
-       };
-
-       if (methods) object.implement(methods);
-
-       return object;
-};
-
-Native.genericize = function(object, property, check){
-       if ((!check || !object[property]) && typeof object.prototype[property] == 'function') object[property] = function(){
-               var args = Array.prototype.slice.call(arguments);
-               return object.prototype[property].apply(args.shift(), args);
-       };
-};
-
-Native.implement = function(objects, properties){
-       for (var i = 0, l = objects.length; i < l; i++) objects[i].implement(properties);
-};
-
-Native.typize = function(object, family){
-       if (!object.type) object.type = function(item){
-               return ($type(item) === family);
-       };
-};
-
-(function(){
-       var natives = {'Array': Array, 'Date': Date, 'Function': Function, 'Number': Number, 'RegExp': RegExp, 'String': String};
-       for (var n in natives) new Native({name: n, initialize: natives[n], protect: true});
-
-       var types = {'boolean': Boolean, 'native': Native, 'object': Object};
-       for (var t in types) Native.typize(types[t], t);
-
-       var generics = {
-               'Array': ["concat", "indexOf", "join", "lastIndexOf", "pop", "push", "reverse", "shift", "slice", "sort", "splice", "toString", "unshift", "valueOf"],
-               'String': ["charAt", "charCodeAt", "concat", "indexOf", "lastIndexOf", "match", "replace", "search", "slice", "split", "substr", "substring", "toLowerCase", "toUpperCase", "valueOf"]
-       };
-       for (var g in generics){
-               for (var i = generics[g].length; i--;) Native.genericize(natives[g], generics[g][i], true);
-       }
-})();
-
-var Hash = new Native({
-
-       name: 'Hash',
-
-       initialize: function(object){
-               if ($type(object) == 'hash') object = $unlink(object.getClean());
-               for (var key in object) this[key] = object[key];
-               return this;
-       }
-
-});
-
-Hash.implement({
-
-       forEach: function(fn, bind){
-               for (var key in this){
-                       if (this.hasOwnProperty(key)) fn.call(bind, this[key], key, this);
-               }
-       },
-
-       getClean: function(){
-               var clean = {};
-               for (var key in this){
-                       if (this.hasOwnProperty(key)) clean[key] = this[key];
-               }
-               return clean;
-       },
-
-       getLength: function(){
-               var length = 0;
-               for (var key in this){
-                       if (this.hasOwnProperty(key)) length++;
-               }
-               return length;
-       }
-
-});
-
-Hash.alias('forEach', 'each');
-
-Array.implement({
-
-       forEach: function(fn, bind){
-               for (var i = 0, l = this.length; i < l; i++) fn.call(bind, this[i], i, this);
-       }
-
-});
-
-Array.alias('forEach', 'each');
-
-function $A(iterable){
-       if (iterable.item){
-               var l = iterable.length, array = new Array(l);
-               while (l--) array[l] = iterable[l];
-               return array;
-       }
-       return Array.prototype.slice.call(iterable);
-};
-
-function $arguments(i){
-       return function(){
-               return arguments[i];
-       };
-};
-
-function $chk(obj){
-       return !!(obj || obj === 0);
-};
-
-function $clear(timer){
-       clearTimeout(timer);
-       clearInterval(timer);
-       return null;
-};
-
-function $defined(obj){
-       return (obj != undefined);
-};
-
-function $each(iterable, fn, bind){
-       var type = $type(iterable);
-       ((type == 'arguments' || type == 'collection' || type == 'array') ? Array : Hash).each(iterable, fn, bind);
-};
-
-function $empty(){};
-
-function $extend(original, extended){
-       for (var key in (extended || {})) original[key] = extended[key];
-       return original;
-};
-
-function $H(object){
-       return new Hash(object);
-};
-
-function $lambda(value){
-       return ($type(value) == 'function') ? value : function(){
-               return value;
-       };
-};
-
-function $merge(){
-       var args = Array.slice(arguments);
-       args.unshift({});
-       return $mixin.apply(null, args);
-};
-
-function $mixin(mix){
-       for (var i = 1, l = arguments.length; i < l; i++){
-               var object = arguments[i];
-               if ($type(object) != 'object') continue;
-               for (var key in object){
-                       var op = object[key], mp = mix[key];
-                       mix[key] = (mp && $type(op) == 'object' && $type(mp) == 'object') ? $mixin(mp, op) : $unlink(op);
-               }
-       }
-       return mix;
-};
-
-function $pick(){
-       for (var i = 0, l = arguments.length; i < l; i++){
-               if (arguments[i] != undefined) return arguments[i];
-       }
-       return null;
-};
-
-function $random(min, max){
-       return Math.floor(Math.random() * (max - min + 1) + min);
-};
-
-function $splat(obj){
-       var type = $type(obj);
-       return (type) ? ((type != 'array' && type != 'arguments') ? [obj] : obj) : [];
-};
-
-var $time = Date.now || function(){
-       return +new Date;
-};
-
-function $try(){
-       for (var i = 0, l = arguments.length; i < l; i++){
-               try {
-                       return arguments[i]();
-               } catch(e){}
-       }
-       return null;
-};
-
-function $type(obj){
-       if (obj == undefined) return false;
-       if (obj.$family) return (obj.$family.name == 'number' && !isFinite(obj)) ? false : obj.$family.name;
-       if (obj.nodeName){
-               switch (obj.nodeType){
-                       case 1: return 'element';
-                       case 3: return (/\S/).test(obj.nodeValue) ? 'textnode' : 'whitespace';
-               }
-       } else if (typeof obj.length == 'number'){
-               if (obj.callee) return 'arguments';
-               else if (obj.item) return 'collection';
-       }
-       return typeof obj;
-};
-
-function $unlink(object){
-       var unlinked;
-       switch ($type(object)){
-               case 'object':
-                       unlinked = {};
-                       for (var p in object) unlinked[p] = $unlink(object[p]);
-               break;
-               case 'hash':
-                       unlinked = new Hash(object);
-               break;
-               case 'array':
-                       unlinked = [];
-                       for (var i = 0, l = object.length; i < l; i++) unlinked[i] = $unlink(object[i]);
-               break;
-               default: return object;
-       }
-       return unlinked;
-};
-
-
-/*
----
-
-script: Browser.js
-
-description: The Browser Core. Contains Browser initialization, Window and Document, and the Browser Hash.
-
-license: MIT-style license.
-
-requires: 
-- /Native
-- /$util
-
-provides: [Browser, Window, Document, $exec]
-
-...
-*/
-
-var Browser = $merge({
-
-       Engine: {name: 'unknown', version: 0},
-
-       Platform: {name: (window.orientation != undefined) ? 'ipod' : (navigator.platform.match(/mac|win|linux/i) || ['other'])[0].toLowerCase()},
-
-       Features: {xpath: !!(document.evaluate), air: !!(window.runtime), query: !!(document.querySelector)},
-
-       Plugins: {},
-
-       Engines: {
-
-               presto: function(){
-                       return (!window.opera) ? false : ((arguments.callee.caller) ? 960 : ((document.getElementsByClassName) ? 950 : 925));
-               },
-
-               trident: function(){
-                       return (!window.ActiveXObject) ? false : ((window.XMLHttpRequest) ? ((document.querySelectorAll) ? 6 : 5) : 4);
-               },
-
-               webkit: function(){
-                       return (navigator.taintEnabled) ? false : ((Browser.Features.xpath) ? ((Browser.Features.query) ? 525 : 420) : 419);
-               },
-
-               gecko: function(){
-                       return (!document.getBoxObjectFor && window.mozInnerScreenX == null) ? false : ((document.getElementsByClassName) ? 19 : 18);
-               }
-
-       }
-
-}, Browser || {});
-
-Browser.Platform[Browser.Platform.name] = true;
-
-Browser.detect = function(){
-
-       for (var engine in this.Engines){
-               var version = this.Engines[engine]();
-               if (version){
-                       this.Engine = {name: engine, version: version};
-                       this.Engine[engine] = this.Engine[engine + version] = true;
-                       break;
-               }
-       }
-
-       return {name: engine, version: version};
-
-};
-
-Browser.detect();
-
-Browser.Request = function(){
-       return $try(function(){
-               return new XMLHttpRequest();
-       }, function(){
-               return new ActiveXObject('MSXML2.XMLHTTP');
-       }, function(){
-               return new ActiveXObject('Microsoft.XMLHTTP');
-       });
-};
-
-Browser.Features.xhr = !!(Browser.Request());
-
-Browser.Plugins.Flash = (function(){
-       var version = ($try(function(){
-               return navigator.plugins['Shockwave Flash'].description;
-       }, function(){
-               return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable('$version');
-       }) || '0 r0').match(/\d+/g);
-       return {version: parseInt(version[0] || 0 + '.' + version[1], 10) || 0, build: parseInt(version[2], 10) || 0};
-})();
-
-function $exec(text){
-       if (!text) return text;
-       if (window.execScript){
-               window.execScript(text);
-       } else {
-               var script = document.createElement('script');
-               script.setAttribute('type', 'text/javascript');
-               script[(Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerText' : 'text'] = text;
-               document.head.appendChild(script);
-               document.head.removeChild(script);
-       }
-       return text;
-};
-
-Native.UID = 1;
-
-var $uid = (Browser.Engine.trident) ? function(item){
-       return (item.uid || (item.uid = [Native.UID++]))[0];
-} : function(item){
-       return item.uid || (item.uid = Native.UID++);
-};
-
-var Window = new Native({
-
-       name: 'Window',
-
-       legacy: (Browser.Engine.trident) ? null: window.Window,
-
-       initialize: function(win){
-               $uid(win);
-               if (!win.Element){
-                       win.Element = $empty;
-                       if (Browser.Engine.webkit) win.document.createElement("iframe"); //fixes safari 2
-                       win.Element.prototype = (Browser.Engine.webkit) ? window["[[DOMElement.prototype]]"] : {};
-               }
-               win.document.window = win;
-               return $extend(win, Window.Prototype);
-       },
-
-       afterImplement: function(property, value){
-               window[property] = Window.Prototype[property] = value;
-       }
-
-});
-
-Window.Prototype = {$family: {name: 'window'}};
-
-new Window(window);
-
-var Document = new Native({
-
-       name: 'Document',
-
-       legacy: (Browser.Engine.trident) ? null: window.Document,
-
-       initialize: function(doc){
-               $uid(doc);
-               doc.head = doc.getElementsByTagName('head')[0];
-               doc.html = doc.getElementsByTagName('html')[0];
-               if (Browser.Engine.trident && Browser.Engine.version <= 4) $try(function(){
-                       doc.execCommand("BackgroundImageCache", false, true);
-               });
-               if (Browser.Engine.trident) doc.window.attachEvent('onunload', function(){
-                       doc.window.detachEvent('onunload', arguments.callee);
-                       doc.head = doc.html = doc.window = null;
-               });
-               return $extend(doc, Document.Prototype);
-       },
-
-       afterImplement: function(property, value){
-               document[property] = Document.Prototype[property] = value;
-       }
-
-});
-
-Document.Prototype = {$family: {name: 'document'}};
-
-new Document(document);
-
-
-/*
----
-
-script: Array.js
-
-description: Contains Array Prototypes like each, contains, and erase.
-
-license: MIT-style license.
-
-requires:
-- /$util
-- /Array.each
-
-provides: [Array]
-
-...
-*/
-
-Array.implement({
-
-       every: function(fn, bind){
-               for (var i = 0, l = this.length; i < l; i++){
-                       if (!fn.call(bind, this[i], i, this)) return false;
-               }
-               return true;
-       },
-
-       filter: function(fn, bind){
-               var results = [];
-               for (var i = 0, l = this.length; i < l; i++){
-                       if (fn.call(bind, this[i], i, this)) results.push(this[i]);
-               }
-               return results;
-       },
-
-       clean: function(){
-               return this.filter($defined);
-       },
-
-       indexOf: function(item, from){
-               var len = this.length;
-               for (var i = (from < 0) ? Math.max(0, len + from) : from || 0; i < len; i++){
-                       if (this[i] === item) return i;
-               }
-               return -1;
-       },
-
-       map: function(fn, bind){
-               var results = [];
-               for (var i = 0, l = this.length; i < l; i++) results[i] = fn.call(bind, this[i], i, this);
-               return results;
-       },
-
-       some: function(fn, bind){
-               for (var i = 0, l = this.length; i < l; i++){
-                       if (fn.call(bind, this[i], i, this)) return true;
-               }
-               return false;
-       },
-
-       associate: function(keys){
-               var obj = {}, length = Math.min(this.length, keys.length);
-               for (var i = 0; i < length; i++) obj[keys[i]] = this[i];
-               return obj;
-       },
-
-       link: function(object){
-               var result = {};
-               for (var i = 0, l = this.length; i < l; i++){
-                       for (var key in object){
-                               if (object[key](this[i])){
-                                       result[key] = this[i];
-                                       delete object[key];
-                                       break;
-                               }
-                       }
-               }
-               return result;
-       },
-
-       contains: function(item, from){
-               return this.indexOf(item, from) != -1;
-       },
-
-       extend: function(array){
-               for (var i = 0, j = array.length; i < j; i++) this.push(array[i]);
-               return this;
-       },
-       
-       getLast: function(){
-               return (this.length) ? this[this.length - 1] : null;
-       },
-
-       getRandom: function(){
-               return (this.length) ? this[$random(0, this.length - 1)] : null;
-       },
-
-       include: function(item){
-               if (!this.contains(item)) this.push(item);
-               return this;
-       },
-
-       combine: function(array){
-               for (var i = 0, l = array.length; i < l; i++) this.include(array[i]);
-               return this;
-       },
-
-       erase: function(item){
-               for (var i = this.length; i--; i){
-                       if (this[i] === item) this.splice(i, 1);
-               }
-               return this;
-       },
-
-       empty: function(){
-               this.length = 0;
-               return this;
-       },
-
-       flatten: function(){
-               var array = [];
-               for (var i = 0, l = this.length; i < l; i++){
-                       var type = $type(this[i]);
-                       if (!type) continue;
-                       array = array.concat((type == 'array' || type == 'collection' || type == 'arguments') ? Array.flatten(this[i]) : this[i]);
-               }
-               return array;
-       },
-
-       hexToRgb: function(array){
-               if (this.length != 3) return null;
-               var rgb = this.map(function(value){
-                       if (value.length == 1) value += value;
-                       return value.toInt(16);
-               });
-               return (array) ? rgb : 'rgb(' + rgb + ')';
-       },
-
-       rgbToHex: function(array){
-               if (this.length < 3) return null;
-               if (this.length == 4 && this[3] == 0 && !array) return 'transparent';
-               var hex = [];
-               for (var i = 0; i < 3; i++){
-                       var bit = (this[i] - 0).toString(16);
-                       hex.push((bit.length == 1) ? '0' + bit : bit);
-               }
-               return (array) ? hex : '#' + hex.join('');
-       }
-
-});
-
-
-/*
----
-
-script: Function.js
-
-description: Contains Function Prototypes like create, bind, pass, and delay.
-
-license: MIT-style license.
-
-requires:
-- /Native
-- /$util
-
-provides: [Function]
-
-...
-*/
-
-Function.implement({
-
-       extend: function(properties){
-               for (var property in properties) this[property] = properties[property];
-               return this;
-       },
-
-       create: function(options){
-               var self = this;
-               options = options || {};
-               return function(event){
-                       var args = options.arguments;
-                       args = (args != undefined) ? $splat(args) : Array.slice(arguments, (options.event) ? 1 : 0);
-                       if (options.event) args = [event || window.event].extend(args);
-                       var returns = function(){
-                               return self.apply(options.bind || null, args);
-                       };
-                       if (options.delay) return setTimeout(returns, options.delay);
-                       if (options.periodical) return setInterval(returns, options.periodical);
-                       if (options.attempt) return $try(returns);
-                       return returns();
-               };
-       },
-
-       run: function(args, bind){
-               return this.apply(bind, $splat(args));
-       },
-
-       pass: function(args, bind){
-               return this.create({bind: bind, arguments: args});
-       },
-
-       bind: function(bind, args){
-               return this.create({bind: bind, arguments: args});
-       },
-
-       bindWithEvent: function(bind, args){
-               return this.create({bind: bind, arguments: args, event: true});
-       },
-
-       attempt: function(args, bind){
-               return this.create({bind: bind, arguments: args, attempt: true})();
-       },
-
-       delay: function(delay, bind, args){
-               return this.create({bind: bind, arguments: args, delay: delay})();
-       },
-
-       periodical: function(periodical, bind, args){
-               return this.create({bind: bind, arguments: args, periodical: periodical})();
-       }
-
-});
-
-
-/*
----
-
-script: Number.js
-
-description: Contains Number Prototypes like limit, round, times, and ceil.
-
-license: MIT-style license.
-
-requires:
-- /Native
-- /$util
-
-provides: [Number]
-
-...
-*/
-
-Number.implement({
-
-       limit: function(min, max){
-               return Math.min(max, Math.max(min, this));
-       },
-
-       round: function(precision){
-               precision = Math.pow(10, precision || 0);
-               return Math.round(this * precision) / precision;
-       },
-
-       times: function(fn, bind){
-               for (var i = 0; i < this; i++) fn.call(bind, i, this);
-       },
-
-       toFloat: function(){
-               return parseFloat(this);
-       },
-
-       toInt: function(base){
-               return parseInt(this, base || 10);
-       }
-
-});
-
-Number.alias('times', 'each');
-
-(function(math){
-       var methods = {};
-       math.each(function(name){
-               if (!Number[name]) methods[name] = function(){
-                       return Math[name].apply(null, [this].concat($A(arguments)));
-               };
-       });
-       Number.implement(methods);
-})(['abs', 'acos', 'asin', 'atan', 'atan2', 'ceil', 'cos', 'exp', 'floor', 'log', 'max', 'min', 'pow', 'sin', 'sqrt', 'tan']);
-
-
-/*
----
-
-script: String.js
-
-description: Contains String Prototypes like camelCase, capitalize, test, and toInt.
-
-license: MIT-style license.
-
-requires:
-- /Native
-
-provides: [String]
-
-...
-*/
-
-String.implement({
-
-       test: function(regex, params){
-               return ((typeof regex == 'string') ? new RegExp(regex, params) : regex).test(this);
-       },
-
-       contains: function(string, separator){
-               return (separator) ? (separator + this + separator).indexOf(separator + string + separator) > -1 : this.indexOf(string) > -1;
-       },
-
-       trim: function(){
-               return this.replace(/^\s+|\s+$/g, '');
-       },
-
-       clean: function(){
-               return this.replace(/\s+/g, ' ').trim();
-       },
-
-       camelCase: function(){
-               return this.replace(/-\D/g, function(match){
-                       return match.charAt(1).toUpperCase();
-               });
-       },
-
-       hyphenate: function(){
-               return this.replace(/[A-Z]/g, function(match){
-                       return ('-' + match.charAt(0).toLowerCase());
-               });
-       },
-
-       capitalize: function(){
-               return this.replace(/\b[a-z]/g, function(match){
-                       return match.toUpperCase();
-               });
-       },
-
-       escapeRegExp: function(){
-               return this.replace(/([-.*+?^${}()|[\]\/\\])/g, '\\$1');
-       },
-
-       toInt: function(base){
-               return parseInt(this, base || 10);
-       },
-
-       toFloat: function(){
-               return parseFloat(this);
-       },
-
-       hexToRgb: function(array){
-               var hex = this.match(/^#?(\w{1,2})(\w{1,2})(\w{1,2})$/);
-               return (hex) ? hex.slice(1).hexToRgb(array) : null;
-       },
-
-       rgbToHex: function(array){
-               var rgb = this.match(/\d{1,3}/g);
-               return (rgb) ? rgb.rgbToHex(array) : null;
-       },
-
-       stripScripts: function(option){
-               var scripts = '';
-               var text = this.replace(/<script[^>]*>([\s\S]*?)<\/script>/gi, function(){
-                       scripts += arguments[1] + '\n';
-                       return '';
-               });
-               if (option === true) $exec(scripts);
-               else if ($type(option) == 'function') option(scripts, text);
-               return text;
-       },
-
-       substitute: function(object, regexp){
-               return this.replace(regexp || (/\\?\{([^{}]+)\}/g), function(match, name){
-                       if (match.charAt(0) == '\\') return match.slice(1);
-                       return (object[name] != undefined) ? object[name] : '';
-               });
-       }
-
-});
-
-
-/*
----
-
-script: Hash.js
-
-description: Contains Hash Prototypes. Provides a means for overcoming the JavaScript practical impossibility of extending native Objects.
-
-license: MIT-style license.
-
-requires:
-- /Hash.base
-
-provides: [Hash]
-
-...
-*/
-
-Hash.implement({
-
-       has: Object.prototype.hasOwnProperty,
-
-       keyOf: function(value){
-               for (var key in this){
-                       if (this.hasOwnProperty(key) && this[key] === value) return key;
-               }
-               return null;
-       },
-
-       hasValue: function(value){
-               return (Hash.keyOf(this, value) !== null);
-       },
-
-       extend: function(properties){
-               Hash.each(properties || {}, function(value, key){
-                       Hash.set(this, key, value);
-               }, this);
-               return this;
-       },
-
-       combine: function(properties){
-               Hash.each(properties || {}, function(value, key){
-                       Hash.include(this, key, value);
-               }, this);
-               return this;
-       },
-
-       erase: function(key){
-               if (this.hasOwnProperty(key)) delete this[key];
-               return this;
-       },
-
-       get: function(key){
-               return (this.hasOwnProperty(key)) ? this[key] : null;
-       },
-
-       set: function(key, value){
-               if (!this[key] || this.hasOwnProperty(key)) this[key] = value;
-               return this;
-       },
-
-       empty: function(){
-               Hash.each(this, function(value, key){
-                       delete this[key];
-               }, this);
-               return this;
-       },
-
-       include: function(key, value){
-               if (this[key] == undefined) this[key] = value;
-               return this;
-       },
-
-       map: function(fn, bind){
-               var results = new Hash;
-               Hash.each(this, function(value, key){
-                       results.set(key, fn.call(bind, value, key, this));
-               }, this);
-               return results;
-       },
-
-       filter: function(fn, bind){
-               var results = new Hash;
-               Hash.each(this, function(value, key){
-                       if (fn.call(bind, value, key, this)) results.set(key, value);
-               }, this);
-               return results;
-       },
-
-       every: function(fn, bind){
-               for (var key in this){
-                       if (this.hasOwnProperty(key) && !fn.call(bind, this[key], key)) return false;
-               }
-               return true;
-       },
-
-       some: function(fn, bind){
-               for (var key in this){
-                       if (this.hasOwnProperty(key) && fn.call(bind, this[key], key)) return true;
-               }
-               return false;
-       },
-
-       getKeys: function(){
-               var keys = [];
-               Hash.each(this, function(value, key){
-                       keys.push(key);
-               });
-               return keys;
-       },
-
-       getValues: function(){
-               var values = [];
-               Hash.each(this, function(value){
-                       values.push(value);
-               });
-               return values;
-       },
-
-       toQueryString: function(base){
-               var queryString = [];
-               Hash.each(this, function(value, key){
-                       if (base) key = base + '[' + key + ']';
-                       var result;
-                       switch ($type(value)){
-                               case 'object': result = Hash.toQueryString(value, key); break;
-                               case 'array':
-                                       var qs = {};
-                                       value.each(function(val, i){
-                                               qs[i] = val;
-                                       });
-                                       result = Hash.toQueryString(qs, key);
-                               break;
-                               default: result = key + '=' + encodeURIComponent(value);
-                       }
-                       if (value != undefined) queryString.push(result);
-               });
-
-               return queryString.join('&');
-       }
-
-});
-
-Hash.alias({keyOf: 'indexOf', hasValue: 'contains'});
-
-
-/*
----
-
-script: Event.js
-
-description: Contains the Event Class, to make the event object cross-browser.
-
-license: MIT-style license.
-
-requires:
-- /Window
-- /Document
-- /Hash
-- /Array
-- /Function
-- /String
-
-provides: [Event]
-
-...
-*/
-
-var Event = new Native({
-
-       name: 'Event',
-
-       initialize: function(event, win){
-               win = win || window;
-               var doc = win.document;
-               event = event || win.event;
-               if (event.$extended) return event;
-               this.$extended = true;
-               var type = event.type;
-               var target = event.target || event.srcElement;
-               while (target && target.nodeType == 3) target = target.parentNode;
-
-               if (type.test(/key/)){
-                       var code = event.which || event.keyCode;
-                       var key = Event.Keys.keyOf(code);
-                       if (type == 'keydown'){
-                               var fKey = code - 111;
-                               if (fKey > 0 && fKey < 13) key = 'f' + fKey;
-                       }
-                       key = key || String.fromCharCode(code).toLowerCase();
-               } else if (type.match(/(click|mouse|menu)/i)){
-                       doc = (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body;
-                       var page = {
-                               x: event.pageX || event.clientX + doc.scrollLeft,
-                               y: event.pageY || event.clientY + doc.scrollTop
-                       };
-                       var client = {
-                               x: (event.pageX) ? event.pageX - win.pageXOffset : event.clientX,
-                               y: (event.pageY) ? event.pageY - win.pageYOffset : event.clientY
-                       };
-                       if (type.match(/DOMMouseScroll|mousewheel/)){
-                               var wheel = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3;
-                       }
-                       var rightClick = (event.which == 3) || (event.button == 2);
-                       var related = null;
-                       if (type.match(/over|out/)){
-                               switch (type){
-                                       case 'mouseover': related = event.relatedTarget || event.fromElement; break;
-                                       case 'mouseout': related = event.relatedTarget || event.toElement;
-                               }
-                               if (!(function(){
-                                       while (related && related.nodeType == 3) related = related.parentNode;
-                                       return true;
-                               }).create({attempt: Browser.Engine.gecko})()) related = false;
-                       }
-               }
-
-               return $extend(this, {
-                       event: event,
-                       type: type,
-
-                       page: page,
-                       client: client,
-                       rightClick: rightClick,
-
-                       wheel: wheel,
-
-                       relatedTarget: related,
-                       target: target,
-
-                       code: code,
-                       key: key,
-
-                       shift: event.shiftKey,
-                       control: event.ctrlKey,
-                       alt: event.altKey,
-                       meta: event.metaKey
-               });
-       }
-
-});
-
-Event.Keys = new Hash({
-       'enter': 13,
-       'up': 38,
-       'down': 40,
-       'left': 37,
-       'right': 39,
-       'esc': 27,
-       'space': 32,
-       'backspace': 8,
-       'tab': 9,
-       'delete': 46
-});
-
-Event.implement({
-
-       stop: function(){
-               return this.stopPropagation().preventDefault();
-       },
-
-       stopPropagation: function(){
-               if (this.event.stopPropagation) this.event.stopPropagation();
-               else this.event.cancelBubble = true;
-               return this;
-       },
-
-       preventDefault: function(){
-               if (this.event.preventDefault) this.event.preventDefault();
-               else this.event.returnValue = false;
-               return this;
-       }
-
-});
-
-
-/*
----
-
-script: Class.js
-
-description: Contains the Class Function for easily creating, extending, and implementing reusable Classes.
-
-license: MIT-style license.
-
-requires:
-- /$util
-- /Native
-- /Array
-- /String
-- /Function
-- /Number
-- /Hash
-
-provides: [Class]
-
-...
-*/
-
-function Class(params){
-       
-       if (params instanceof Function) params = {initialize: params};
-       
-       var newClass = function(){
-               Object.reset(this);
-               if (newClass._prototyping) return this;
-               this._current = $empty;
-               var value = (this.initialize) ? this.initialize.apply(this, arguments) : this;
-               delete this._current; delete this.caller;
-               return value;
-       }.extend(this);
-       
-       newClass.implement(params);
-       
-       newClass.constructor = Class;
-       newClass.prototype.constructor = newClass;
-
-       return newClass;
-
-};
-
-Function.prototype.protect = function(){
-       this._protected = true;
-       return this;
-};
-
-Object.reset = function(object, key){
-               
-       if (key == null){
-               for (var p in object) Object.reset(object, p);
-               return object;
-       }
-       
-       delete object[key];
-       
-       switch ($type(object[key])){
-               case 'object':
-                       var F = function(){};
-                       F.prototype = object[key];
-                       var i = new F;
-                       object[key] = Object.reset(i);
-               break;
-               case 'array': object[key] = $unlink(object[key]); break;
-       }
-       
-       return object;
-       
-};
-
-new Native({name: 'Class', initialize: Class}).extend({
-
-       instantiate: function(F){
-               F._prototyping = true;
-               var proto = new F;
-               delete F._prototyping;
-               return proto;
-       },
-       
-       wrap: function(self, key, method){
-               if (method._origin) method = method._origin;
-               
-               return function(){
-                       if (method._protected && this._current == null) throw new Error('The method "' + key + '" cannot be called.');
-                       var caller = this.caller, current = this._current;
-                       this.caller = current; this._current = arguments.callee;
-                       var result = method.apply(this, arguments);
-                       this._current = current; this.caller = caller;
-                       return result;
-               }.extend({_owner: self, _origin: method, _name: key});
-
-       }
-       
-});
-
-Class.implement({
-       
-       implement: function(key, value){
-               
-               if ($type(key) == 'object'){
-                       for (var p in key) this.implement(p, key[p]);
-                       return this;
-               }
-               
-               var mutator = Class.Mutators[key];
-               
-               if (mutator){
-                       value = mutator.call(this, value);
-                       if (value == null) return this;
-               }
-               
-               var proto = this.prototype;
-
-               switch ($type(value)){
-                       
-                       case 'function':
-                               if (value._hidden) return this;
-                               proto[key] = Class.wrap(this, key, value);
-                       break;
-                       
-                       case 'object':
-                               var previous = proto[key];
-                               if ($type(previous) == 'object') $mixin(previous, value);
-                               else proto[key] = $unlink(value);
-                       break;
-                       
-                       case 'array':
-                               proto[key] = $unlink(value);
-                       break;
-                       
-                       default: proto[key] = value;
-
-               }
-               
-               return this;
-
-       }
-       
-});
-
-Class.Mutators = {
-       
-       Extends: function(parent){
-
-               this.parent = parent;
-               this.prototype = Class.instantiate(parent);
-
-               this.implement('parent', function(){
-                       var name = this.caller._name, previous = this.caller._owner.parent.prototype[name];
-                       if (!previous) throw new Error('The method "' + name + '" has no parent.');
-                       return previous.apply(this, arguments);
-               }.protect());
-
-       },
-
-       Implements: function(items){
-               $splat(items).each(function(item){
-                       if (item instanceof Function) item = Class.instantiate(item);
-                       this.implement(item);
-               }, this);
-
-       }
-       
-};
-
-
-/*
----
-
-script: Class.Extras.js
-
-description: Contains Utility Classes that can be implemented into your own Classes to ease the execution of many common tasks.
-
-license: MIT-style license.
-
-requires:
-- /Class
-
-provides: [Chain, Events, Options]
-
-...
-*/
-
-var Chain = new Class({
-
-       $chain: [],
-
-       chain: function(){
-               this.$chain.extend(Array.flatten(arguments));
-               return this;
-       },
-
-       callChain: function(){
-               return (this.$chain.length) ? this.$chain.shift().apply(this, arguments) : false;
-       },
-
-       clearChain: function(){
-               this.$chain.empty();
-               return this;
-       }
-
-});
-
-var Events = new Class({
-
-       $events: {},
-
-       addEvent: function(type, fn, internal){
-               type = Events.removeOn(type);
-               if (fn != $empty){
-                       this.$events[type] = this.$events[type] || [];
-                       this.$events[type].include(fn);
-                       if (internal) fn.internal = true;
-               }
-               return this;
-       },
-
-       addEvents: function(events){
-               for (var type in events) this.addEvent(type, events[type]);
-               return this;
-       },
-
-       fireEvent: function(type, args, delay){
-               type = Events.removeOn(type);
-               if (!this.$events || !this.$events[type]) return this;
-               this.$events[type].each(function(fn){
-                       fn.create({'bind': this, 'delay': delay, 'arguments': args})();
-               }, this);
-               return this;
-       },
-
-       removeEvent: function(type, fn){
-               type = Events.removeOn(type);
-               if (!this.$events[type]) return this;
-               if (!fn.internal) this.$events[type].erase(fn);
-               return this;
-       },
-
-       removeEvents: function(events){
-               var type;
-               if ($type(events) == 'object'){
-                       for (type in events) this.removeEvent(type, events[type]);
-                       return this;
-               }
-               if (events) events = Events.removeOn(events);
-               for (type in this.$events){
-                       if (events && events != type) continue;
-                       var fns = this.$events[type];
-                       for (var i = fns.length; i--; i) this.removeEvent(type, fns[i]);
-               }
-               return this;
-       }
-
-});
-
-Events.removeOn = function(string){
-       return string.replace(/^on([A-Z])/, function(full, first){
-               return first.toLowerCase();
-       });
-};
-
-var Options = new Class({
-
-       setOptions: function(){
-               this.options = $merge.run([this.options].extend(arguments));
-               if (!this.addEvent) return this;
-               for (var option in this.options){
-                       if ($type(this.options[option]) != 'function' || !(/^on[A-Z]/).test(option)) continue;
-                       this.addEvent(option, this.options[option]);
-                       delete this.options[option];
-               }
-               return this;
-       }
-
-});
-
-
-/*
----
-
-script: Element.js
-
-description: One of the most important items in MooTools. Contains the dollar function, the dollars function, and an handful of cross-browser, time-saver methods to let you easily work with HTML Elements.
-
-license: MIT-style license.
-
-requires:
-- /Window
-- /Document
-- /Array
-- /String
-- /Function
-- /Number
-- /Hash
-
-provides: [Element, Elements, $, $$, Iframe]
-
-...
-*/
-
-var Element = new Native({
-
-       name: 'Element',
-
-       legacy: window.Element,
-
-       initialize: function(tag, props){
-               var konstructor = Element.Constructors.get(tag);
-               if (konstructor) return konstructor(props);
-               if (typeof tag == 'string') return document.newElement(tag, props);
-               return document.id(tag).set(props);
-       },
-
-       afterImplement: function(key, value){
-               Element.Prototype[key] = value;
-               if (Array[key]) return;
-               Elements.implement(key, function(){
-                       var items = [], elements = true;
-                       for (var i = 0, j = this.length; i < j; i++){
-                               var returns = this[i][key].apply(this[i], arguments);
-                               items.push(returns);
-                               if (elements) elements = ($type(returns) == 'element');
-                       }
-                       return (elements) ? new Elements(items) : items;
-               });
-       }
-
-});
-
-Element.Prototype = {$family: {name: 'element'}};
-
-Element.Constructors = new Hash;
-
-var IFrame = new Native({
-
-       name: 'IFrame',
-
-       generics: false,
-
-       initialize: function(){
-               var params = Array.link(arguments, {properties: Object.type, iframe: $defined});
-               var props = params.properties || {};
-               var iframe = document.id(params.iframe);
-               var onload = props.onload || $empty;
-               delete props.onload;
-               props.id = props.name = $pick(props.id, props.name, iframe ? (iframe.id || iframe.name) : 'IFrame_' + $time());
-               iframe = new Element(iframe || 'iframe', props);
-               var onFrameLoad = function(){
-                       var host = $try(function(){
-                               return iframe.contentWindow.location.host;
-                       });
-                       if (!host || host == window.location.host){
-                               var win = new Window(iframe.contentWindow);
-                               new Document(iframe.contentWindow.document);
-                               $extend(win.Element.prototype, Element.Prototype);
-                       }
-                       onload.call(iframe.contentWindow, iframe.contentWindow.document);
-               };
-               var contentWindow = $try(function(){
-                       return iframe.contentWindow;
-               });
-               ((contentWindow && contentWindow.document.body) || window.frames[props.id]) ? onFrameLoad() : iframe.addListener('load', onFrameLoad);
-               return iframe;
-       }
-
-});
-
-var Elements = new Native({
-
-       initialize: function(elements, options){
-               options = $extend({ddup: true, cash: true}, options);
-               elements = elements || [];
-               if (options.ddup || options.cash){
-                       var uniques = {}, returned = [];
-                       for (var i = 0, l = elements.length; i < l; i++){
-                               var el = document.id(elements[i], !options.cash);
-                               if (options.ddup){
-                                       if (uniques[el.uid]) continue;
-                                       uniques[el.uid] = true;
-                               }
-                               if (el) returned.push(el);
-                       }
-                       elements = returned;
-               }
-               return (options.cash) ? $extend(elements, this) : elements;
-       }
-
-});
-
-Elements.implement({
-
-       filter: function(filter, bind){
-               if (!filter) return this;
-               return new Elements(Array.filter(this, (typeof filter == 'string') ? function(item){
-                       return item.match(filter);
-               } : filter, bind));
-       }
-
-});
-
-Document.implement({
-
-       newElement: function(tag, props){
-               if (Browser.Engine.trident && props){
-                       ['name', 'type', 'checked'].each(function(attribute){
-                               if (!props[attribute]) return;
-                               tag += ' ' + attribute + '="' + props[attribute] + '"';
-                               if (attribute != 'checked') delete props[attribute];
-                       });
-                       tag = '<' + tag + '>';
-               }
-               return document.id(this.createElement(tag)).set(props);
-       },
-
-       newTextNode: function(text){
-               return this.createTextNode(text);
-       },
-
-       getDocument: function(){
-               return this;
-       },
-
-       getWindow: function(){
-               return this.window;
-       },
-       
-       id: (function(){
-               
-               var types = {
-
-                       string: function(id, nocash, doc){
-                               id = doc.getElementById(id);
-                               return (id) ? types.element(id, nocash) : null;
-                       },
-                       
-                       element: function(el, nocash){
-                               $uid(el);
-                               if (!nocash && !el.$family && !(/^object|embed$/i).test(el.tagName)){
-                                       var proto = Element.Prototype;
-                                       for (var p in proto) el[p] = proto[p];
-                               };
-                               return el;
-                       },
-                       
-                       object: function(obj, nocash, doc){
-                               if (obj.toElement) return types.element(obj.toElement(doc), nocash);
-                               return null;
-                       }
-                       
-               };
-
-               types.textnode = types.whitespace = types.window = types.document = $arguments(0);
-               
-               return function(el, nocash, doc){
-                       if (el && el.$family && el.uid) return el;
-                       var type = $type(el);
-                       return (types[type]) ? types[type](el, nocash, doc || document) : null;
-               };
-
-       })()
-
-});
-
-if (window.$ == null) Window.implement({
-       $: function(el, nc){
-               return document.id(el, nc, this.document);
-       }
-});
-
-Window.implement({
-
-       $$: function(selector){
-               if (arguments.length == 1 && typeof selector == 'string') return this.document.getElements(selector);
-               var elements = [];
-               var args = Array.flatten(arguments);
-               for (var i = 0, l = args.length; i < l; i++){
-                       var item = args[i];
-                       switch ($type(item)){
-                               case 'element': elements.push(item); break;
-                               case 'string': elements.extend(this.document.getElements(item, true));
-                       }
-               }
-               return new Elements(elements);
-       },
-
-       getDocument: function(){
-               return this.document;
-       },
-
-       getWindow: function(){
-               return this;
-       }
-
-});
-
-Native.implement([Element, Document], {
-
-       getElement: function(selector, nocash){
-               return document.id(this.getElements(selector, true)[0] || null, nocash);
-       },
-
-       getElements: function(tags, nocash){
-               tags = tags.split(',');
-               var elements = [];
-               var ddup = (tags.length > 1);
-               tags.each(function(tag){
-                       var partial = this.getElementsByTagName(tag.trim());
-                       (ddup) ? elements.extend(partial) : elements = partial;
-               }, this);
-               return new Elements(elements, {ddup: ddup, cash: !nocash});
-       }
-
-});
-
-(function(){
-
-var collected = {}, storage = {};
-var props = {input: 'checked', option: 'selected', textarea: (Browser.Engine.webkit && Browser.Engine.version < 420) ? 'innerHTML' : 'value'};
-
-var get = function(uid){
-       return (storage[uid] || (storage[uid] = {}));
-};
-
-var clean = function(item, retain){
-       if (!item) return;
-       var uid = item.uid;
-       if (Browser.Engine.trident){
-               if (item.clearAttributes){
-                       var clone = retain && item.cloneNode(false);
-                       item.clearAttributes();
-                       if (clone) item.mergeAttributes(clone);
-               } else if (item.removeEvents){
-                       item.removeEvents();
-               }
-               if ((/object/i).test(item.tagName)){
-                       for (var p in item){
-                               if (typeof item[p] == 'function') item[p] = $empty;
-                       }
-                       Element.dispose(item);
-               }
-       }       
-       if (!uid) return;
-       collected[uid] = storage[uid] = null;
-};
-
-var purge = function(){
-       Hash.each(collected, clean);
-       if (Browser.Engine.trident) $A(document.getElementsByTagName('object')).each(clean);
-       if (window.CollectGarbage) CollectGarbage();
-       collected = storage = null;
-};
-
-var walk = function(element, walk, start, match, all, nocash){
-       var el = element[start || walk];
-       var elements = [];
-       while (el){
-               if (el.nodeType == 1 && (!match || Element.match(el, match))){
-                       if (!all) return document.id(el, nocash);
-                       elements.push(el);
-               }
-               el = el[walk];
-       }
-       return (all) ? new Elements(elements, {ddup: false, cash: !nocash}) : null;
-};
-
-var attributes = {
-       'html': 'innerHTML',
-       'class': 'className',
-       'for': 'htmlFor',
-       'defaultValue': 'defaultValue',
-       'text': (Browser.Engine.trident || (Browser.Engine.webkit && Browser.Engine.version < 420)) ? 'innerText' : 'textContent'
-};
-var bools = ['compact', 'nowrap', 'ismap', 'declare', 'noshade', 'checked', 'disabled', 'readonly', 'multiple', 'selected', 'noresize', 'defer'];
-var camels = ['value', 'type', 'defaultValue', 'accessKey', 'cellPadding', 'cellSpacing', 'colSpan', 'frameBorder', 'maxLength', 'readOnly', 'rowSpan', 'tabIndex', 'useMap'];
-
-bools = bools.associate(bools);
-
-Hash.extend(attributes, bools);
-Hash.extend(attributes, camels.associate(camels.map(String.toLowerCase)));
-
-var inserters = {
-
-       before: function(context, element){
-               if (element.parentNode) element.parentNode.insertBefore(context, element);
-       },
-
-       after: function(context, element){
-               if (!element.parentNode) return;
-               var next = element.nextSibling;
-               (next) ? element.parentNode.insertBefore(context, next) : element.parentNode.appendChild(context);
-       },
-
-       bottom: function(context, element){
-               element.appendChild(context);
-       },
-
-       top: function(context, element){
-               var first = element.firstChild;
-               (first) ? element.insertBefore(context, first) : element.appendChild(context);
-       }
-
-};
-
-inserters.inside = inserters.bottom;
-
-Hash.each(inserters, function(inserter, where){
-
-       where = where.capitalize();
-
-       Element.implement('inject' + where, function(el){
-               inserter(this, document.id(el, true));
-               return this;
-       });
-
-       Element.implement('grab' + where, function(el){
-               inserter(document.id(el, true), this);
-               return this;
-       });
-
-});
-
-Element.implement({
-
-       set: function(prop, value){
-               switch ($type(prop)){
-                       case 'object':
-                               for (var p in prop) this.set(p, prop[p]);
-                               break;
-                       case 'string':
-                               var property = Element.Properties.get(prop);
-                               (property && property.set) ? property.set.apply(this, Array.slice(arguments, 1)) : this.setProperty(prop, value);
-               }
-               return this;
-       },
-
-       get: function(prop){
-               var property = Element.Properties.get(prop);
-               return (property && property.get) ? property.get.apply(this, Array.slice(arguments, 1)) : this.getProperty(prop);
-       },
-
-       erase: function(prop){
-               var property = Element.Properties.get(prop);
-               (property && property.erase) ? property.erase.apply(this) : this.removeProperty(prop);
-               return this;
-       },
-
-       setProperty: function(attribute, value){
-               var key = attributes[attribute];
-               if (value == undefined) return this.removeProperty(attribute);
-               if (key && bools[attribute]) value = !!value;
-               (key) ? this[key] = value : this.setAttribute(attribute, '' + value);
-               return this;
-       },
-
-       setProperties: function(attributes){
-               for (var attribute in attributes) this.setProperty(attribute, attributes[attribute]);
-               return this;
-       },
-
-       getProperty: function(attribute){
-               var key = attributes[attribute];
-               var value = (key) ? this[key] : this.getAttribute(attribute, 2);
-               return (bools[attribute]) ? !!value : (key) ? value : value || null;
-       },
-
-       getProperties: function(){
-               var args = $A(arguments);
-               return args.map(this.getProperty, this).associate(args);
-       },
-
-       removeProperty: function(attribute){
-               var key = attributes[attribute];
-               (key) ? this[key] = (key && bools[attribute]) ? false : '' : this.removeAttribute(attribute);
-               return this;
-       },
-
-       removeProperties: function(){
-               Array.each(arguments, this.removeProperty, this);
-               return this;
-       },
-
-       hasClass: function(className){
-               return this.className.contains(className, ' ');
-       },
-
-       addClass: function(className){
-               if (!this.hasClass(className)) this.className = (this.className + ' ' + className).clean();
-               return this;
-       },
-
-       removeClass: function(className){
-               this.className = this.className.replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)'), '$1');
-               return this;
-       },
-
-       toggleClass: function(className){
-               return this.hasClass(className) ? this.removeClass(className) : this.addClass(className);
-       },
-
-       adopt: function(){
-               Array.flatten(arguments).each(function(element){
-                       element = document.id(element, true);
-                       if (element) this.appendChild(element);
-               }, this);
-               return this;
-       },
-
-       appendText: function(text, where){
-               return this.grab(this.getDocument().newTextNode(text), where);
-       },
-
-       grab: function(el, where){
-               inserters[where || 'bottom'](document.id(el, true), this);
-               return this;
-       },
-
-       inject: function(el, where){
-               inserters[where || 'bottom'](this, document.id(el, true));
-               return this;
-       },
-
-       replaces: function(el){
-               el = document.id(el, true);
-               el.parentNode.replaceChild(this, el);
-               return this;
-       },
-
-       wraps: function(el, where){
-               el = document.id(el, true);
-               return this.replaces(el).grab(el, where);
-       },
-
-       getPrevious: function(match, nocash){
-               return walk(this, 'previousSibling', null, match, false, nocash);
-       },
-
-       getAllPrevious: function(match, nocash){
-               return walk(this, 'previousSibling', null, match, true, nocash);
-       },
-
-       getNext: function(match, nocash){
-               return walk(this, 'nextSibling', null, match, false, nocash);
-       },
-
-       getAllNext: function(match, nocash){
-               return walk(this, 'nextSibling', null, match, true, nocash);
-       },
-
-       getFirst: function(match, nocash){
-               return walk(this, 'nextSibling', 'firstChild', match, false, nocash);
-       },
-
-       getLast: function(match, nocash){
-               return walk(this, 'previousSibling', 'lastChild', match, false, nocash);
-       },
-
-       getParent: function(match, nocash){
-               return walk(this, 'parentNode', null, match, false, nocash);
-       },
-
-       getParents: function(match, nocash){
-               return walk(this, 'parentNode', null, match, true, nocash);
-       },
-       
-       getSiblings: function(match, nocash){
-               return this.getParent().getChildren(match, nocash).erase(this);
-       },
-
-       getChildren: function(match, nocash){
-               return walk(this, 'nextSibling', 'firstChild', match, true, nocash);
-       },
-
-       getWindow: function(){
-               return this.ownerDocument.window;
-       },
-
-       getDocument: function(){
-               return this.ownerDocument;
-       },
-
-       getElementById: function(id, nocash){
-               var el = this.ownerDocument.getElementById(id);
-               if (!el) return null;
-               for (var parent = el.parentNode; parent != this; parent = parent.parentNode){
-                       if (!parent) return null;
-               }
-               return document.id(el, nocash);
-       },
-
-       getSelected: function(){
-               return new Elements($A(this.options).filter(function(option){
-                       return option.selected;
-               }));
-       },
-
-       getComputedStyle: function(property){
-               if (this.currentStyle) return this.currentStyle[property.camelCase()];
-               var computed = this.getDocument().defaultView.getComputedStyle(this, null);
-               return (computed) ? computed.getPropertyValue([property.hyphenate()]) : null;
-       },
-
-       toQueryString: function(){
-               var queryString = [];
-               this.getElements('input, select, textarea', true).each(function(el){
-                       if (!el.name || el.disabled || el.type == 'submit' || el.type == 'reset' || el.type == 'file') return;
-                       var value = (el.tagName.toLowerCase() == 'select') ? Element.getSelected(el).map(function(opt){
-                               return opt.value;
-                       }) : ((el.type == 'radio' || el.type == 'checkbox') && !el.checked) ? null : el.value;
-                       $splat(value).each(function(val){
-                               if (typeof val != 'undefined') queryString.push(el.name + '=' + encodeURIComponent(val));
-                       });
-               });
-               return queryString.join('&');
-       },
-
-       clone: function(contents, keepid){
-               contents = contents !== false;
-               var clone = this.cloneNode(contents);
-               var clean = function(node, element){
-                       if (!keepid) node.removeAttribute('id');
-                       if (Browser.Engine.trident){
-                               node.clearAttributes();
-                               node.mergeAttributes(element);
-                               node.removeAttribute('uid');
-                               if (node.options){
-                                       var no = node.options, eo = element.options;
-                                       for (var j = no.length; j--;) no[j].selected = eo[j].selected;
-                               }
-                       }
-                       var prop = props[element.tagName.toLowerCase()];
-                       if (prop && element[prop]) node[prop] = element[prop];
-               };
-
-               if (contents){
-                       var ce = clone.getElementsByTagName('*'), te = this.getElementsByTagName('*');
-                       for (var i = ce.length; i--;) clean(ce[i], te[i]);
-               }
-
-               clean(clone, this);
-               return document.id(clone);
-       },
-
-       destroy: function(){
-               Element.empty(this);
-               Element.dispose(this);
-               clean(this, true);
-               return null;
-       },
-
-       empty: function(){
-               $A(this.childNodes).each(function(node){
-                       Element.destroy(node);
-               });
-               return this;
-       },
-
-       dispose: function(){
-               return (this.parentNode) ? this.parentNode.removeChild(this) : this;
-       },
-
-       hasChild: function(el){
-               el = document.id(el, true);
-               if (!el) return false;
-               if (Browser.Engine.webkit && Browser.Engine.version < 420) return $A(this.getElementsByTagName(el.tagName)).contains(el);
-               return (this.contains) ? (this != el && this.contains(el)) : !!(this.compareDocumentPosition(el) & 16);
-       },
-
-       match: function(tag){
-               return (!tag || (tag == this) || (Element.get(this, 'tag') == tag));
-       }
-
-});
-
-Native.implement([Element, Window, Document], {
-
-       addListener: function(type, fn){
-               if (type == 'unload'){
-                       var old = fn, self = this;
-                       fn = function(){
-                               self.removeListener('unload', fn);
-                               old();
-                       };
-               } else {
-                       collected[this.uid] = this;
-               }
-               if (this.addEventListener) this.addEventListener(type, fn, false);
-               else this.attachEvent('on' + type, fn);
-               return this;
-       },
-
-       removeListener: function(type, fn){
-               if (this.removeEventListener) this.removeEventListener(type, fn, false);
-               else this.detachEvent('on' + type, fn);
-               return this;
-       },
-
-       retrieve: function(property, dflt){
-               var storage = get(this.uid), prop = storage[property];
-               if (dflt != undefined && prop == undefined) prop = storage[property] = dflt;
-               return $pick(prop);
-       },
-
-       store: function(property, value){
-               var storage = get(this.uid);
-               storage[property] = value;
-               return this;
-       },
-
-       eliminate: function(property){
-               var storage = get(this.uid);
-               delete storage[property];
-               return this;
-       }
-
-});
-
-window.addListener('unload', purge);
-
-})();
-
-Element.Properties = new Hash;
-
-Element.Properties.style = {
-
-       set: function(style){
-               this.style.cssText = style;
-       },
-
-       get: function(){
-               return this.style.cssText;
-       },
-
-       erase: function(){
-               this.style.cssText = '';
-       }
-
-};
-
-Element.Properties.tag = {
-
-       get: function(){
-               return this.tagName.toLowerCase();
-       }
-
-};
-
-Element.Properties.html = (function(){
-       var wrapper = document.createElement('div');
-
-       var translations = {
-               table: [1, '<table>', '</table>'],
-               select: [1, '<select>', '</select>'],
-               tbody: [2, '<table><tbody>', '</tbody></table>'],
-               tr: [3, '<table><tbody><tr>', '</tr></tbody></table>']
-       };
-       translations.thead = translations.tfoot = translations.tbody;
-
-       var html = {
-               set: function(){
-                       var html = Array.flatten(arguments).join('');
-                       var wrap = Browser.Engine.trident && translations[this.get('tag')];
-                       if (wrap){
-                               var first = wrapper;
-                               first.innerHTML = wrap[1] + html + wrap[2];
-                               for (var i = wrap[0]; i--;) first = first.firstChild;
-                               this.empty().adopt(first.childNodes);
-                       } else {
-                               this.innerHTML = html;
-                       }
-               }
-       };
-
-       html.erase = html.set;
-
-       return html;
-})();
-
-if (Browser.Engine.webkit && Browser.Engine.version < 420) Element.Properties.text = {
-       get: function(){
-               if (this.innerText) return this.innerText;
-               var temp = this.ownerDocument.newElement('div', {html: this.innerHTML}).inject(this.ownerDocument.body);
-               var text = temp.innerText;
-               temp.destroy();
-               return text;
-       }
-};
-
-
-/*
----
-
-script: Element.Event.js
-
-description: Contains Element methods for dealing with events. This file also includes mouseenter and mouseleave custom Element Events.
-
-license: MIT-style license.
-
-requires: 
-- /Element
-- /Event
-
-provides: [Element.Event]
-
-...
-*/
-
-Element.Properties.events = {set: function(events){
-       this.addEvents(events);
-}};
-
-Native.implement([Element, Window, Document], {
-
-       addEvent: function(type, fn){
-               var events = this.retrieve('events', {});
-               events[type] = events[type] || {'keys': [], 'values': []};
-               if (events[type].keys.contains(fn)) return this;
-               events[type].keys.push(fn);
-               var realType = type, custom = Element.Events.get(type), condition = fn, self = this;
-               if (custom){
-                       if (custom.onAdd) custom.onAdd.call(this, fn);
-                       if (custom.condition){
-                               condition = function(event){
-                                       if (custom.condition.call(this, event)) return fn.call(this, event);
-                                       return true;
-                               };
-                       }
-                       realType = custom.base || realType;
-               }
-               var defn = function(){
-                       return fn.call(self);
-               };
-               var nativeEvent = Element.NativeEvents[realType];
-               if (nativeEvent){
-                       if (nativeEvent == 2){
-                               defn = function(event){
-                                       event = new Event(event, self.getWindow());
-                                       if (condition.call(self, event) === false) event.stop();
-                               };
-                       }
-                       this.addListener(realType, defn);
-               }
-               events[type].values.push(defn);
-               return this;
-       },
-
-       removeEvent: function(type, fn){
-               var events = this.retrieve('events');
-               if (!events || !events[type]) return this;
-               var pos = events[type].keys.indexOf(fn);
-               if (pos == -1) return this;
-               events[type].keys.splice(pos, 1);
-               var value = events[type].values.splice(pos, 1)[0];
-               var custom = Element.Events.get(type);
-               if (custom){
-                       if (custom.onRemove) custom.onRemove.call(this, fn);
-                       type = custom.base || type;
-               }
-               return (Element.NativeEvents[type]) ? this.removeListener(type, value) : this;
-       },
-
-       addEvents: function(events){
-               for (var event in events) this.addEvent(event, events[event]);
-               return this;
-       },
-
-       removeEvents: function(events){
-               var type;
-               if ($type(events) == 'object'){
-                       for (type in events) this.removeEvent(type, events[type]);
-                       return this;
-               }
-               var attached = this.retrieve('events');
-               if (!attached) return this;
-               if (!events){
-                       for (type in attached) this.removeEvents(type);
-                       this.eliminate('events');
-               } else if (attached[events]){
-                       while (attached[events].keys[0]) this.removeEvent(events, attached[events].keys[0]);
-                       attached[events] = null;
-               }
-               return this;
-       },
-
-       fireEvent: function(type, args, delay){
-               var events = this.retrieve('events');
-               if (!events || !events[type]) return this;
-               events[type].keys.each(function(fn){
-                       fn.create({'bind': this, 'delay': delay, 'arguments': args})();
-               }, this);
-               return this;
-       },
-
-       cloneEvents: function(from, type){
-               from = document.id(from);
-               var fevents = from.retrieve('events');
-               if (!fevents) return this;
-               if (!type){
-                       for (var evType in fevents) this.cloneEvents(from, evType);
-               } else if (fevents[type]){
-                       fevents[type].keys.each(function(fn){
-                               this.addEvent(type, fn);
-                       }, this);
-               }
-               return this;
-       }
-
-});
-
-Element.NativeEvents = {
-       click: 2, dblclick: 2, mouseup: 2, mousedown: 2, contextmenu: 2, //mouse buttons
-       mousewheel: 2, DOMMouseScroll: 2, //mouse wheel
-       mouseover: 2, mouseout: 2, mousemove: 2, selectstart: 2, selectend: 2, //mouse movement
-       keydown: 2, keypress: 2, keyup: 2, //keyboard
-       focus: 2, blur: 2, change: 2, reset: 2, select: 2, submit: 2, //form elements
-       load: 1, unload: 1, beforeunload: 2, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window
-       error: 1, abort: 1, scroll: 1 //misc
-};
-
-(function(){
-
-var $check = function(event){
-       var related = event.relatedTarget;
-       if (related == undefined) return true;
-       if (related === false) return false;
-       return ($type(this) != 'document' && related != this && related.prefix != 'xul' && !this.hasChild(related));
-};
-
-Element.Events = new Hash({
-
-       mouseenter: {
-               base: 'mouseover',
-               condition: $check
-       },
-
-       mouseleave: {
-               base: 'mouseout',
-               condition: $check
-       },
-
-       mousewheel: {
-               base: (Browser.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel'
-       }
-
-});
-
-})();
-
-
-/*
----
-
-script: Element.Style.js
-
-description: Contains methods for interacting with the styles of Elements in a fashionable way.
-
-license: MIT-style license.
-
-requires:
-- /Element
-
-provides: [Element.Style]
-
-...
-*/
-
-Element.Properties.styles = {set: function(styles){
-       this.setStyles(styles);
-}};
-
-Element.Properties.opacity = {
-
-       set: function(opacity, novisibility){
-               if (!novisibility){
-                       if (opacity == 0){
-                               if (this.style.visibility != 'hidden') this.style.visibility = 'hidden';
-                       } else {
-                               if (this.style.visibility != 'visible') this.style.visibility = 'visible';
-                       }
-               }
-               if (!this.currentStyle || !this.currentStyle.hasLayout) this.style.zoom = 1;
-               if (Browser.Engine.trident) this.style.filter = (opacity == 1) ? '' : 'alpha(opacity=' + opacity * 100 + ')';
-               this.style.opacity = opacity;
-               this.store('opacity', opacity);
-       },
-
-       get: function(){
-               return this.retrieve('opacity', 1);
-       }
-
-};
-
-Element.implement({
-
-       setOpacity: function(value){
-               return this.set('opacity', value, true);
-       },
-
-       getOpacity: function(){
-               return this.get('opacity');
-       },
-
-       setStyle: function(property, value){
-               switch (property){
-                       case 'opacity': return this.set('opacity', parseFloat(value));
-                       case 'float': property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat';
-               }
-               property = property.camelCase();
-               if ($type(value) != 'string'){
-                       var map = (Element.Styles.get(property) || '@').split(' ');
-                       value = $splat(value).map(function(val, i){
-                               if (!map[i]) return '';
-                               return ($type(val) == 'number') ? map[i].replace('@', Math.round(val)) : val;
-                       }).join(' ');
-               } else if (value == String(Number(value))){
-                       value = Math.round(value);
-               }
-               this.style[property] = value;
-               return this;
-       },
-
-       getStyle: function(property){
-               switch (property){
-                       case 'opacity': return this.get('opacity');
-                       case 'float': property = (Browser.Engine.trident) ? 'styleFloat' : 'cssFloat';
-               }
-               property = property.camelCase();
-               var result = this.style[property];
-               if (!$chk(result)){
-                       result = [];
-                       for (var style in Element.ShortStyles){
-                               if (property != style) continue;
-                               for (var s in Element.ShortStyles[style]) result.push(this.getStyle(s));
-                               return result.join(' ');
-                       }
-                       result = this.getComputedStyle(property);
-               }
-               if (result){
-                       result = String(result);
-                       var color = result.match(/rgba?\([\d\s,]+\)/);
-                       if (color) result = result.replace(color[0], color[0].rgbToHex());
-               }
-               if (Browser.Engine.presto || (Browser.Engine.trident && !$chk(parseInt(result, 10)))){
-                       if (property.test(/^(height|width)$/)){
-                               var values = (property == 'width') ? ['left', 'right'] : ['top', 'bottom'], size = 0;
-                               values.each(function(value){
-                                       size += this.getStyle('border-' + value + '-width').toInt() + this.getStyle('padding-' + value).toInt();
-                               }, this);
-                               return this['offset' + property.capitalize()] - size + 'px';
-                       }
-                       if ((Browser.Engine.presto) && String(result).test('px')) return result;
-                       if (property.test(/(border(.+)Width|margin|padding)/)) return '0px';
-               }
-               return result;
-       },
-
-       setStyles: function(styles){
-               for (var style in styles) this.setStyle(style, styles[style]);
-               return this;
-       },
-
-       getStyles: function(){
-               var result = {};
-               Array.flatten(arguments).each(function(key){
-                       result[key] = this.getStyle(key);
-               }, this);
-               return result;
-       }
-
-});
-
-Element.Styles = new Hash({
-       left: '@px', top: '@px', bottom: '@px', right: '@px',
-       width: '@px', height: '@px', maxWidth: '@px', maxHeight: '@px', minWidth: '@px', minHeight: '@px',
-       backgroundColor: 'rgb(@, @, @)', backgroundPosition: '@px @px', color: 'rgb(@, @, @)',
-       fontSize: '@px', letterSpacing: '@px', lineHeight: '@px', clip: 'rect(@px @px @px @px)',
-       margin: '@px @px @px @px', padding: '@px @px @px @px', border: '@px @ rgb(@, @, @) @px @ rgb(@, @, @) @px @ rgb(@, @, @)',
-       borderWidth: '@px @px @px @px', borderStyle: '@ @ @ @', borderColor: 'rgb(@, @, @) rgb(@, @, @) rgb(@, @, @) rgb(@, @, @)',
-       zIndex: '@', 'zoom': '@', fontWeight: '@', textIndent: '@px', opacity: '@'
-});
-
-Element.ShortStyles = {margin: {}, padding: {}, border: {}, borderWidth: {}, borderStyle: {}, borderColor: {}};
-
-['Top', 'Right', 'Bottom', 'Left'].each(function(direction){
-       var Short = Element.ShortStyles;
-       var All = Element.Styles;
-       ['margin', 'padding'].each(function(style){
-               var sd = style + direction;
-               Short[style][sd] = All[sd] = '@px';
-       });
-       var bd = 'border' + direction;
-       Short.border[bd] = All[bd] = '@px @ rgb(@, @, @)';
-       var bdw = bd + 'Width', bds = bd + 'Style', bdc = bd + 'Color';
-       Short[bd] = {};
-       Short.borderWidth[bdw] = Short[bd][bdw] = All[bdw] = '@px';
-       Short.borderStyle[bds] = Short[bd][bds] = All[bds] = '@';
-       Short.borderColor[bdc] = Short[bd][bdc] = All[bdc] = 'rgb(@, @, @)';
-});
-
-
-/*
----
-
-script: Element.Dimensions.js
-
-description: Contains methods to work with size, scroll, or positioning of Elements and the window object.
-
-license: MIT-style license.
-
-credits:
-- Element positioning based on the [qooxdoo](http://qooxdoo.org/) code and smart browser fixes, [LGPL License](http://www.gnu.org/licenses/lgpl.html).
-- Viewport dimensions based on [YUI](http://developer.yahoo.com/yui/) code, [BSD License](http://developer.yahoo.com/yui/license.html).
-
-requires:
-- /Element
-
-provides: [Element.Dimensions]
-
-...
-*/
-
-(function(){
-
-Element.implement({
-
-       scrollTo: function(x, y){
-               if (isBody(this)){
-                       this.getWindow().scrollTo(x, y);
-               } else {
-                       this.scrollLeft = x;
-                       this.scrollTop = y;
-               }
-               return this;
-       },
-
-       getSize: function(){
-               if (isBody(this)) return this.getWindow().getSize();
-               return {x: this.offsetWidth, y: this.offsetHeight};
-       },
-
-       getScrollSize: function(){
-               if (isBody(this)) return this.getWindow().getScrollSize();
-               return {x: this.scrollWidth, y: this.scrollHeight};
-       },
-
-       getScroll: function(){
-               if (isBody(this)) return this.getWindow().getScroll();
-               return {x: this.scrollLeft, y: this.scrollTop};
-       },
-
-       getScrolls: function(){
-               var element = this, position = {x: 0, y: 0};
-               while (element && !isBody(element)){
-                       position.x += element.scrollLeft;
-                       position.y += element.scrollTop;
-                       element = element.parentNode;
-               }
-               return position;
-       },
-
-       getOffsetParent: function(){
-               var element = this;
-               if (isBody(element)) return null;
-               if (!Browser.Engine.trident) return element.offsetParent;
-               while ((element = element.parentNode) && !isBody(element)){
-                       if (styleString(element, 'position') != 'static') return element;
-               }
-               return null;
-       },
-
-       getOffsets: function(){
-               if (this.getBoundingClientRect){
-                       var bound = this.getBoundingClientRect(),
-                               html = document.id(this.getDocument().documentElement),
-                               htmlScroll = html.getScroll(),
-                               elemScrolls = this.getScrolls(),
-                               elemScroll = this.getScroll(),
-                               isFixed = (styleString(this, 'position') == 'fixed');
-
-                       return {
-                               x: bound.left.toInt() + elemScrolls.x - elemScroll.x + ((isFixed) ? 0 : htmlScroll.x) - html.clientLeft,
-                               y: bound.top.toInt()  + elemScrolls.y - elemScroll.y + ((isFixed) ? 0 : htmlScroll.y) - html.clientTop
-                       };
-               }
-
-               var element = this, position = {x: 0, y: 0};
-               if (isBody(this)) return position;
-
-               while (element && !isBody(element)){
-                       position.x += element.offsetLeft;
-                       position.y += element.offsetTop;
-
-                       if (Browser.Engine.gecko){
-                               if (!borderBox(element)){
-                                       position.x += leftBorder(element);
-                                       position.y += topBorder(element);
-                               }
-                               var parent = element.parentNode;
-                               if (parent && styleString(parent, 'overflow') != 'visible'){
-                                       position.x += leftBorder(parent);
-                                       position.y += topBorder(parent);
-                               }
-                       } else if (element != this && Browser.Engine.webkit){
-                               position.x += leftBorder(element);
-                               position.y += topBorder(element);
-                       }
-
-                       element = element.offsetParent;
-               }
-               if (Browser.Engine.gecko && !borderBox(this)){
-                       position.x -= leftBorder(this);
-                       position.y -= topBorder(this);
-               }
-               return position;
-       },
-
-       getPosition: function(relative){
-               if (isBody(this)) return {x: 0, y: 0};
-               var offset = this.getOffsets(),
-                               scroll = this.getScrolls();
-               var position = {
-                       x: offset.x - scroll.x,
-                       y: offset.y - scroll.y
-               };
-               var relativePosition = (relative && (relative = document.id(relative))) ? relative.getPosition() : {x: 0, y: 0};
-               return {x: position.x - relativePosition.x, y: position.y - relativePosition.y};
-       },
-
-       getCoordinates: function(element){
-               if (isBody(this)) return this.getWindow().getCoordinates();
-               var position = this.getPosition(element),
-                               size = this.getSize();
-               var obj = {
-                       left: position.x,
-                       top: position.y,
-                       width: size.x,
-                       height: size.y
-               };
-               obj.right = obj.left + obj.width;
-               obj.bottom = obj.top + obj.height;
-               return obj;
-       },
-
-       computePosition: function(obj){
-               return {
-                       left: obj.x - styleNumber(this, 'margin-left'),
-                       top: obj.y - styleNumber(this, 'margin-top')
-               };
-       },
-
-       setPosition: function(obj){
-               return this.setStyles(this.computePosition(obj));
-       }
-
-});
-
-
-Native.implement([Document, Window], {
-
-       getSize: function(){
-               if (Browser.Engine.presto || Browser.Engine.webkit){
-                       var win = this.getWindow();
-                       return {x: win.innerWidth, y: win.innerHeight};
-               }
-               var doc = getCompatElement(this);
-               return {x: doc.clientWidth, y: doc.clientHeight};
-       },
-
-       getScroll: function(){
-               var win = this.getWindow(), doc = getCompatElement(this);
-               return {x: win.pageXOffset || doc.scrollLeft, y: win.pageYOffset || doc.scrollTop};
-       },
-
-       getScrollSize: function(){
-               var doc = getCompatElement(this), min = this.getSize();
-               return {x: Math.max(doc.scrollWidth, min.x), y: Math.max(doc.scrollHeight, min.y)};
-       },
-
-       getPosition: function(){
-               return {x: 0, y: 0};
-       },
-
-       getCoordinates: function(){
-               var size = this.getSize();
-               return {top: 0, left: 0, bottom: size.y, right: size.x, height: size.y, width: size.x};
-       }
-
-});
-
-// private methods
-
-var styleString = Element.getComputedStyle;
-
-function styleNumber(element, style){
-       return styleString(element, style).toInt() || 0;
-};
-
-function borderBox(element){
-       return styleString(element, '-moz-box-sizing') == 'border-box';
-};
-
-function topBorder(element){
-       return styleNumber(element, 'border-top-width');
-};
-
-function leftBorder(element){
-       return styleNumber(element, 'border-left-width');
-};
-
-function isBody(element){
-       return (/^(?:body|html)$/i).test(element.tagName);
-};
-
-function getCompatElement(element){
-       var doc = element.getDocument();
-       return (!doc.compatMode || doc.compatMode == 'CSS1Compat') ? doc.html : doc.body;
-};
-
-})();
-
-//aliases
-Element.alias('setPosition', 'position'); //compatability
-
-Native.implement([Window, Document, Element], {
-
-       getHeight: function(){
-               return this.getSize().y;
-       },
-
-       getWidth: function(){
-               return this.getSize().x;
-       },
-
-       getScrollTop: function(){
-               return this.getScroll().y;
-       },
-
-       getScrollLeft: function(){
-               return this.getScroll().x;
-       },
-
-       getScrollHeight: function(){
-               return this.getScrollSize().y;
-       },
-
-       getScrollWidth: function(){
-               return this.getScrollSize().x;
-       },
-
-       getTop: function(){
-               return this.getPosition().y;
-       },
-
-       getLeft: function(){
-               return this.getPosition().x;
-       }
-
-});
-
-
-/*
----
-
-script: Selectors.js
-
-description: Adds advanced CSS-style querying capabilities for targeting HTML Elements. Includes pseudo selectors.
-
-license: MIT-style license.
-
-requires:
-- /Element
-
-provides: [Selectors]
-
-...
-*/
-
-Native.implement([Document, Element], {
-
-       getElements: function(expression, nocash){
-               expression = expression.split(',');
-               var items, local = {};
-               for (var i = 0, l = expression.length; i < l; i++){
-                       var selector = expression[i], elements = Selectors.Utils.search(this, selector, local);
-                       if (i != 0 && elements.item) elements = $A(elements);
-                       items = (i == 0) ? elements : (items.item) ? $A(items).concat(elements) : items.concat(elements);
-               }
-               return new Elements(items, {ddup: (expression.length > 1), cash: !nocash});
-       }
-
-});
-
-Element.implement({
-
-       match: function(selector){
-               if (!selector || (selector == this)) return true;
-               var tagid = Selectors.Utils.parseTagAndID(selector);
-               var tag = tagid[0], id = tagid[1];
-               if (!Selectors.Filters.byID(this, id) || !Selectors.Filters.byTag(this, tag)) return false;
-               var parsed = Selectors.Utils.parseSelector(selector);
-               return (parsed) ? Selectors.Utils.filter(this, parsed, {}) : true;
-       }
-
-});
-
-var Selectors = {Cache: {nth: {}, parsed: {}}};
-
-Selectors.RegExps = {
-       id: (/#([\w-]+)/),
-       tag: (/^(\w+|\*)/),
-       quick: (/^(\w+|\*)$/),
-       splitter: (/\s*([+>~\s])\s*([a-zA-Z#.*:\[])/g),
-       combined: (/\.([\w-]+)|\[(\w+)(?:([!*^$~|]?=)(["']?)([^\4]*?)\4)?\]|:([\w-]+)(?:\(["']?(.*?)?["']?\)|$)/g)
-};
-
-Selectors.Utils = {
-
-       chk: function(item, uniques){
-               if (!uniques) return true;
-               var uid = $uid(item);
-               if (!uniques[uid]) return uniques[uid] = true;
-               return false;
-       },
-
-       parseNthArgument: function(argument){
-               if (Selectors.Cache.nth[argument]) return Selectors.Cache.nth[argument];
-               var parsed = argument.match(/^([+-]?\d*)?([a-z]+)?([+-]?\d*)?$/);
-               if (!parsed) return false;
-               var inta = parseInt(parsed[1], 10);
-               var a = (inta || inta === 0) ? inta : 1;
-               var special = parsed[2] || false;
-               var b = parseInt(parsed[3], 10) || 0;
-               if (a != 0){
-                       b--;
-                       while (b < 1) b += a;
-                       while (b >= a) b -= a;
-               } else {
-                       a = b;
-                       special = 'index';
-               }
-               switch (special){
-                       case 'n': parsed = {a: a, b: b, special: 'n'}; break;
-                       case 'odd': parsed = {a: 2, b: 0, special: 'n'}; break;
-                       case 'even': parsed = {a: 2, b: 1, special: 'n'}; break;
-                       case 'first': parsed = {a: 0, special: 'index'}; break;
-                       case 'last': parsed = {special: 'last-child'}; break;
-                       case 'only': parsed = {special: 'only-child'}; break;
-                       default: parsed = {a: (a - 1), special: 'index'};
-               }
-
-               return Selectors.Cache.nth[argument] = parsed;
-       },
-
-       parseSelector: function(selector){
-               if (Selectors.Cache.parsed[selector]) return Selectors.Cache.parsed[selector];
-               var m, parsed = {classes: [], pseudos: [], attributes: []};
-               while ((m = Selectors.RegExps.combined.exec(selector))){
-                       var cn = m[1], an = m[2], ao = m[3], av = m[5], pn = m[6], pa = m[7];
-                       if (cn){
-                               parsed.classes.push(cn);
-                       } else if (pn){
-                               var parser = Selectors.Pseudo.get(pn);
-                               if (parser) parsed.pseudos.push({parser: parser, argument: pa});
-                               else parsed.attributes.push({name: pn, operator: '=', value: pa});
-                       } else if (an){
-                               parsed.attributes.push({name: an, operator: ao, value: av});
-                       }
-               }
-               if (!parsed.classes.length) delete parsed.classes;
-               if (!parsed.attributes.length) delete parsed.attributes;
-               if (!parsed.pseudos.length) delete parsed.pseudos;
-               if (!parsed.classes && !parsed.attributes && !parsed.pseudos) parsed = null;
-               return Selectors.Cache.parsed[selector] = parsed;
-       },
-
-       parseTagAndID: function(selector){
-               var tag = selector.match(Selectors.RegExps.tag);
-               var id = selector.match(Selectors.RegExps.id);
-               return [(tag) ? tag[1] : '*', (id) ? id[1] : false];
-       },
-
-       filter: function(item, parsed, local){
-               var i;
-               if (parsed.classes){
-                       for (i = parsed.classes.length; i--; i){
-                               var cn = parsed.classes[i];
-                               if (!Selectors.Filters.byClass(item, cn)) return false;
-                       }
-               }
-               if (parsed.attributes){
-                       for (i = parsed.attributes.length; i--; i){
-                               var att = parsed.attributes[i];
-                               if (!Selectors.Filters.byAttribute(item, att.name, att.operator, att.value)) return false;
-                       }
-               }
-               if (parsed.pseudos){
-                       for (i = parsed.pseudos.length; i--; i){
-                               var psd = parsed.pseudos[i];
-                               if (!Selectors.Filters.byPseudo(item, psd.parser, psd.argument, local)) return false;
-                       }
-               }
-               return true;
-       },
-
-       getByTagAndID: function(ctx, tag, id){
-               if (id){
-                       var item = (ctx.getElementById) ? ctx.getElementById(id, true) : Element.getElementById(ctx, id, true);
-                       return (item && Selectors.Filters.byTag(item, tag)) ? [item] : [];
-               } else {
-                       return ctx.getElementsByTagName(tag);
-               }
-       },
-
-       search: function(self, expression, local){
-               var splitters = [];
-
-               var selectors = expression.trim().replace(Selectors.RegExps.splitter, function(m0, m1, m2){
-                       splitters.push(m1);
-                       return ':)' + m2;
-               }).split(':)');
-
-               var items, filtered, item;
-
-               for (var i = 0, l = selectors.length; i < l; i++){
-
-                       var selector = selectors[i];
-
-                       if (i == 0 && Selectors.RegExps.quick.test(selector)){
-                               items = self.getElementsByTagName(selector);
-                               continue;
-                       }
-
-                       var splitter = splitters[i - 1];
-
-                       var tagid = Selectors.Utils.parseTagAndID(selector);
-                       var tag = tagid[0], id = tagid[1];
-
-                       if (i == 0){
-                               items = Selectors.Utils.getByTagAndID(self, tag, id);
-                       } else {
-                               var uniques = {}, found = [];
-                               for (var j = 0, k = items.length; j < k; j++) found = Selectors.Getters[splitter](found, items[j], tag, id, uniques);
-                               items = found;
-                       }
-
-                       var parsed = Selectors.Utils.parseSelector(selector);
-
-                       if (parsed){
-                               filtered = [];
-                               for (var m = 0, n = items.length; m < n; m++){
-                                       item = items[m];
-                                       if (Selectors.Utils.filter(item, parsed, local)) filtered.push(item);
-                               }
-                               items = filtered;
-                       }
-
-               }
-
-               return items;
-
-       }
-
-};
-
-Selectors.Getters = {
-
-       ' ': function(found, self, tag, id, uniques){
-               var items = Selectors.Utils.getByTagAndID(self, tag, id);
-               for (var i = 0, l = items.length; i < l; i++){
-                       var item = items[i];
-                       if (Selectors.Utils.chk(item, uniques)) found.push(item);
-               }
-               return found;
-       },
-
-       '>': function(found, self, tag, id, uniques){
-               var children = Selectors.Utils.getByTagAndID(self, tag, id);
-               for (var i = 0, l = children.length; i < l; i++){
-                       var child = children[i];
-                       if (child.parentNode == self && Selectors.Utils.chk(child, uniques)) found.push(child);
-               }
-               return found;
-       },
-
-       '+': function(found, self, tag, id, uniques){
-               while ((self = self.nextSibling)){
-                       if (self.nodeType == 1){
-                               if (Selectors.Utils.chk(self, uniques) && Selectors.Filters.byTag(self, tag) && Selectors.Filters.byID(self, id)) found.push(self);
-                               break;
-                       }
-               }
-               return found;
-       },
-
-       '~': function(found, self, tag, id, uniques){
-               while ((self = self.nextSibling)){
-                       if (self.nodeType == 1){
-                               if (!Selectors.Utils.chk(self, uniques)) break;
-                               if (Selectors.Filters.byTag(self, tag) && Selectors.Filters.byID(self, id)) found.push(self);
-                       }
-               }
-               return found;
-       }
-
-};
-
-Selectors.Filters = {
-
-       byTag: function(self, tag){
-               return (tag == '*' || (self.tagName && self.tagName.toLowerCase() == tag));
-       },
-
-       byID: function(self, id){
-               return (!id || (self.id && self.id == id));
-       },
-
-       byClass: function(self, klass){
-               return (self.className && self.className.contains && self.className.contains(klass, ' '));
-       },
-
-       byPseudo: function(self, parser, argument, local){
-               return parser.call(self, argument, local);
-       },
-
-       byAttribute: function(self, name, operator, value){
-               var result = Element.prototype.getProperty.call(self, name);
-               if (!result) return (operator == '!=');
-               if (!operator || value == undefined) return true;
-               switch (operator){
-                       case '=': return (result == value);
-                       case '*=': return (result.contains(value));
-                       case '^=': return (result.substr(0, value.length) == value);
-                       case '$=': return (result.substr(result.length - value.length) == value);
-                       case '!=': return (result != value);
-                       case '~=': return result.contains(value, ' ');
-                       case '|=': return result.contains(value, '-');
-               }
-               return false;
-       }
-
-};
-
-Selectors.Pseudo = new Hash({
-
-       // w3c pseudo selectors
-
-       checked: function(){
-               return this.checked;
-       },
-       
-       empty: function(){
-               return !(this.innerText || this.textContent || '').length;
-       },
-
-       not: function(selector){
-               return !Element.match(this, selector);
-       },
-
-       contains: function(text){
-               return (this.innerText || this.textContent || '').contains(text);
-       },
-
-       'first-child': function(){
-               return Selectors.Pseudo.index.call(this, 0);
-       },
-
-       'last-child': function(){
-               var element = this;
-               while ((element = element.nextSibling)){
-                       if (element.nodeType == 1) return false;
-               }
-               return true;
-       },
-
-       'only-child': function(){
-               var prev = this;
-               while ((prev = prev.previousSibling)){
-                       if (prev.nodeType == 1) return false;
-               }
-               var next = this;
-               while ((next = next.nextSibling)){
-                       if (next.nodeType == 1) return false;
-               }
-               return true;
-       },
-
-       'nth-child': function(argument, local){
-               argument = (argument == undefined) ? 'n' : argument;
-               var parsed = Selectors.Utils.parseNthArgument(argument);
-               if (parsed.special != 'n') return Selectors.Pseudo[parsed.special].call(this, parsed.a, local);
-               var count = 0;
-               local.positions = local.positions || {};
-               var uid = $uid(this);
-               if (!local.positions[uid]){
-                       var self = this;
-                       while ((self = self.previousSibling)){
-                               if (self.nodeType != 1) continue;
-                               count ++;
-                               var position = local.positions[$uid(self)];
-                               if (position != undefined){
-                                       count = position + count;
-                                       break;
-                               }
-                       }
-                       local.positions[uid] = count;
-               }
-               return (local.positions[uid] % parsed.a == parsed.b);
-       },
-
-       // custom pseudo selectors
-
-       index: function(index){
-               var element = this, count = 0;
-               while ((element = element.previousSibling)){
-                       if (element.nodeType == 1 && ++count > index) return false;
-               }
-               return (count == index);
-       },
-
-       even: function(argument, local){
-               return Selectors.Pseudo['nth-child'].call(this, '2n+1', local);
-       },
-
-       odd: function(argument, local){
-               return Selectors.Pseudo['nth-child'].call(this, '2n', local);
-       },
-       
-       selected: function(){
-               return this.selected;
-       },
-       
-       enabled: function(){
-               return (this.disabled === false);
-       }
-
-});
-
-
-/*
----
-
-script: DomReady.js
-
-description: Contains the custom event domready.
-
-license: MIT-style license.
-
-requires:
-- /Element.Event
-
-provides: [DomReady]
-
-...
-*/
-
-Element.Events.domready = {
-
-       onAdd: function(fn){
-               if (Browser.loaded) fn.call(this);
-       }
-
-};
-
-(function(){
-
-       var domready = function(){
-               if (Browser.loaded) return;
-               Browser.loaded = true;
-               window.fireEvent('domready');
-               document.fireEvent('domready');
-       };
-       
-       window.addEvent('load', domready);
-
-       if (Browser.Engine.trident){
-               var temp = document.createElement('div');
-               (function(){
-                       ($try(function(){
-                               temp.doScroll(); // Technique by Diego Perini
-                               return document.id(temp).inject(document.body).set('html', 'temp').dispose();
-                       })) ? domready() : arguments.callee.delay(50);
-               })();
-       } else if (Browser.Engine.webkit && Browser.Engine.version < 525){
-               (function(){
-                       (['loaded', 'complete'].contains(document.readyState)) ? domready() : arguments.callee.delay(50);
-               })();
-       } else {
-               document.addEvent('DOMContentLoaded', domready);
-       }
-
-})();
-
-
-/*
----
-
-script: JSON.js
-
-description: JSON encoder and decoder.
-
-license: MIT-style license.
-
-See Also: <http://www.json.org/>
-
-requires:
-- /Array
-- /String
-- /Number
-- /Function
-- /Hash
-
-provides: [JSON]
-
-...
-*/
-
-var JSON = new Hash(this.JSON && {
-       stringify: JSON.stringify,
-       parse: JSON.parse
-}).extend({
-       
-       $specialChars: {'\b': '\\b', '\t': '\\t', '\n': '\\n', '\f': '\\f', '\r': '\\r', '"' : '\\"', '\\': '\\\\'},
-
-       $replaceChars: function(chr){
-               return JSON.$specialChars[chr] || '\\u00' + Math.floor(chr.charCodeAt() / 16).toString(16) + (chr.charCodeAt() % 16).toString(16);
-       },
-
-       encode: function(obj){
-               switch ($type(obj)){
-                       case 'string':
-                               return '"' + obj.replace(/[\x00-\x1f\\"]/g, JSON.$replaceChars) + '"';
-                       case 'array':
-                               return '[' + String(obj.map(JSON.encode).clean()) + ']';
-                       case 'object': case 'hash':
-                               var string = [];
-                               Hash.each(obj, function(value, key){
-                                       var json = JSON.encode(value);
-                                       if (json) string.push(JSON.encode(key) + ':' + json);
-                               });
-                               return '{' + string + '}';
-                       case 'number': case 'boolean': return String(obj);
-                       case false: return 'null';
-               }
-               return null;
-       },
-
-       decode: function(string, secure){
-               if ($type(string) != 'string' || !string.length) return null;
-               if (secure && !(/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(string.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''))) return null;
-               return eval('(' + string + ')');
-       }
-
-});
-
-Native.implement([Hash, Array, String, Number], {
-
-       toJSON: function(){
-               return JSON.encode(this);
-       }
-
-});
-
-
-/*
----
-
-script: Cookie.js
-
-description: Class for creating, reading, and deleting browser Cookies.
-
-license: MIT-style license.
-
-credits:
-- Based on the functions by Peter-Paul Koch (http://quirksmode.org).
-
-requires:
-- /Options
-
-provides: [Cookie]
-
-...
-*/
-
-var Cookie = new Class({
-
-       Implements: Options,
-
-       options: {
-               path: false,
-               domain: false,
-               duration: false,
-               secure: false,
-               document: document
-       },
-
-       initialize: function(key, options){
-               this.key = key;
-               this.setOptions(options);
-       },
-
-       write: function(value){
-               value = encodeURIComponent(value);
-               if (this.options.domain) value += '; domain=' + this.options.domain;
-               if (this.options.path) value += '; path=' + this.options.path;
-               if (this.options.duration){
-                       var date = new Date();
-                       date.setTime(date.getTime() + this.options.duration * 24 * 60 * 60 * 1000);
-                       value += '; expires=' + date.toGMTString();
-               }
-               if (this.options.secure) value += '; secure';
-               this.options.document.cookie = this.key + '=' + value;
-               return this;
-       },
-
-       read: function(){
-               var value = this.options.document.cookie.match('(?:^|;)\\s*' + this.key.escapeRegExp() + '=([^;]*)');
-               return (value) ? decodeURIComponent(value[1]) : null;
-       },
-
-       dispose: function(){
-               new Cookie(this.key, $merge(this.options, {duration: -1})).write('');
-               return this;
-       }
-
-});
-
-Cookie.write = function(key, value, options){
-       return new Cookie(key, options).write(value);
-};
-
-Cookie.read = function(key){
-       return new Cookie(key).read();
-};
-
-Cookie.dispose = function(key, options){
-       return new Cookie(key, options).dispose();
-};
-
-
-/*
----
-
-script: Swiff.js
-
-description: Wrapper for embedding SWF movies. Supports External Interface Communication.
-
-license: MIT-style license.
-
-credits: 
-- Flash detection & Internet Explorer + Flash Player 9 fix inspired by SWFObject.
-
-requires:
-- /Options
-- /$util
-
-provides: [Swiff]
-
-...
-*/
-
-var Swiff = new Class({
-
-       Implements: [Options],
-
-       options: {
-               id: null,
-               height: 1,
-               width: 1,
-               container: null,
-               properties: {},
-               params: {
-                       quality: 'high',
-                       allowScriptAccess: 'always',
-                       wMode: 'transparent',
-                       swLiveConnect: true
-               },
-               callBacks: {},
-               vars: {}
-       },
-
-       toElement: function(){
-               return this.object;
-       },
-
-       initialize: function(path, options){
-               this.instance = 'Swiff_' + $time();
-
-               this.setOptions(options);
-               options = this.options;
-               var id = this.id = options.id || this.instance;
-               var container = document.id(options.container);
-
-               Swiff.CallBacks[this.instance] = {};
-
-               var params = options.params, vars = options.vars, callBacks = options.callBacks;
-               var properties = $extend({height: options.height, width: options.width}, options.properties);
-
-               var self = this;
-
-               for (var callBack in callBacks){
-                       Swiff.CallBacks[this.instance][callBack] = (function(option){
-                               return function(){
-                                       return option.apply(self.object, arguments);
-                               };
-                       })(callBacks[callBack]);
-                       vars[callBack] = 'Swiff.CallBacks.' + this.instance + '.' + callBack;
-               }
-
-               params.flashVars = Hash.toQueryString(vars);
-               if (Browser.Engine.trident){
-                       properties.classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000';
-                       params.movie = path;
-               } else {
-                       properties.type = 'application/x-shockwave-flash';
-                       properties.data = path;
-               }
-               var build = '<object id="' + id + '"';
-               for (var property in properties) build += ' ' + property + '="' + properties[property] + '"';
-               build += '>';
-               for (var param in params){
-                       if (params[param]) build += '<param name="' + param + '" value="' + params[param] + '" />';
-               }
-               build += '</object>';
-               this.object = ((container) ? container.empty() : new Element('div')).set('html', build).firstChild;
-       },
-
-       replaces: function(element){
-               element = document.id(element, true);
-               element.parentNode.replaceChild(this.toElement(), element);
-               return this;
-       },
-
-       inject: function(element){
-               document.id(element, true).appendChild(this.toElement());
-               return this;
-       },
-
-       remote: function(){
-               return Swiff.remote.apply(Swiff, [this.toElement()].extend(arguments));
-       }
-
-});
-
-Swiff.CallBacks = {};
-
-Swiff.remote = function(obj, fn){
-       var rs = obj.CallFunction('<invoke name="' + fn + '" returntype="javascript">' + __flash__argumentsToXML(arguments, 2) + '</invoke>');
-       return eval(rs);
-};
-
-
-/*
----
-
-script: Fx.js
-
-description: Contains the basic animation logic to be extended by all other Fx Classes.
-
-license: MIT-style license.
-
-requires:
-- /Chain
-- /Events
-- /Options
-
-provides: [Fx]
-
-...
-*/
-
-var Fx = new Class({
-
-       Implements: [Chain, Events, Options],
-
-       options: {
-               /*
-               onStart: $empty,
-               onCancel: $empty,
-               onComplete: $empty,
-               */
-               fps: 50,
-               unit: false,
-               duration: 500,
-               link: 'ignore'
-       },
-
-       initialize: function(options){
-               this.subject = this.subject || this;
-               this.setOptions(options);
-               this.options.duration = Fx.Durations[this.options.duration] || this.options.duration.toInt();
-               var wait = this.options.wait;
-               if (wait === false) this.options.link = 'cancel';
-       },
-
-       getTransition: function(){
-               return function(p){
-                       return -(Math.cos(Math.PI * p) - 1) / 2;
-               };
-       },
-
-       step: function(){
-               var time = $time();
-               if (time < this.time + this.options.duration){
-                       var delta = this.transition((time - this.time) / this.options.duration);
-                       this.set(this.compute(this.from, this.to, delta));
-               } else {
-                       this.set(this.compute(this.from, this.to, 1));
-                       this.complete();
-               }
-       },
-
-       set: function(now){
-               return now;
-       },
-
-       compute: function(from, to, delta){
-               return Fx.compute(from, to, delta);
-       },
-
-       check: function(){
-               if (!this.timer) return true;
-               switch (this.options.link){
-                       case 'cancel': this.cancel(); return true;
-                       case 'chain': this.chain(this.caller.bind(this, arguments)); return false;
-               }
-               return false;
-       },
-
-       start: function(from, to){
-               if (!this.check(from, to)) return this;
-               this.from = from;
-               this.to = to;
-               this.time = 0;
-               this.transition = this.getTransition();
-               this.startTimer();
-               this.onStart();
-               return this;
-       },
-
-       complete: function(){
-               if (this.stopTimer()) this.onComplete();
-               return this;
-       },
-
-       cancel: function(){
-               if (this.stopTimer()) this.onCancel();
-               return this;
-       },
-
-       onStart: function(){
-               this.fireEvent('start', this.subject);
-       },
-
-       onComplete: function(){
-               this.fireEvent('complete', this.subject);
-               if (!this.callChain()) this.fireEvent('chainComplete', this.subject);
-       },
-
-       onCancel: function(){
-               this.fireEvent('cancel', this.subject).clearChain();
-       },
-
-       pause: function(){
-               this.stopTimer();
-               return this;
-       },
-
-       resume: function(){
-               this.startTimer();
-               return this;
-       },
-
-       stopTimer: function(){
-               if (!this.timer) return false;
-               this.time = $time() - this.time;
-               this.timer = $clear(this.timer);
-               return true;
-       },
-
-       startTimer: function(){
-               if (this.timer) return false;
-               this.time = $time() - this.time;
-               this.timer = this.step.periodical(Math.round(1000 / this.options.fps), this);
-               return true;
-       }
-
-});
-
-Fx.compute = function(from, to, delta){
-       return (to - from) * delta + from;
-};
-
-Fx.Durations = {'short': 250, 'normal': 500, 'long': 1000};
-
-
-/*
----
-
-script: Fx.CSS.js
-
-description: Contains the CSS animation logic. Used by Fx.Tween, Fx.Morph, Fx.Elements.
-
-license: MIT-style license.
-
-requires:
-- /Fx
-- /Element.Style
-
-provides: [Fx.CSS]
-
-...
-*/
-
-Fx.CSS = new Class({
-
-       Extends: Fx,
-
-       //prepares the base from/to object
-
-       prepare: function(element, property, values){
-               values = $splat(values);
-               var values1 = values[1];
-               if (!$chk(values1)){
-                       values[1] = values[0];
-                       values[0] = element.getStyle(property);
-               }
-               var parsed = values.map(this.parse);
-               return {from: parsed[0], to: parsed[1]};
-       },
-
-       //parses a value into an array
-
-       parse: function(value){
-               value = $lambda(value)();
-               value = (typeof value == 'string') ? value.split(' ') : $splat(value);
-               return value.map(function(val){
-                       val = String(val);
-                       var found = false;
-                       Fx.CSS.Parsers.each(function(parser, key){
-                               if (found) return;
-                               var parsed = parser.parse(val);
-                               if ($chk(parsed)) found = {value: parsed, parser: parser};
-                       });
-                       found = found || {value: val, parser: Fx.CSS.Parsers.String};
-                       return found;
-               });
-       },
-
-       //computes by a from and to prepared objects, using their parsers.
-
-       compute: function(from, to, delta){
-               var computed = [];
-               (Math.min(from.length, to.length)).times(function(i){
-                       computed.push({value: from[i].parser.compute(from[i].value, to[i].value, delta), parser: from[i].parser});
-               });
-               computed.$family = {name: 'fx:css:value'};
-               return computed;
-       },
-
-       //serves the value as settable
-
-       serve: function(value, unit){
-               if ($type(value) != 'fx:css:value') value = this.parse(value);
-               var returned = [];
-               value.each(function(bit){
-                       returned = returned.concat(bit.parser.serve(bit.value, unit));
-               });
-               return returned;
-       },
-
-       //renders the change to an element
-
-       render: function(element, property, value, unit){
-               element.setStyle(property, this.serve(value, unit));
-       },
-
-       //searches inside the page css to find the values for a selector
-
-       search: function(selector){
-               if (Fx.CSS.Cache[selector]) return Fx.CSS.Cache[selector];
-               var to = {};
-               Array.each(document.styleSheets, function(sheet, j){
-                       var href = sheet.href;
-                       if (href && href.contains('://') && !href.contains(document.domain)) return;
-                       var rules = sheet.rules || sheet.cssRules;
-                       Array.each(rules, function(rule, i){
-                               if (!rule.style) return;
-                               var selectorText = (rule.selectorText) ? rule.selectorText.replace(/^\w+/, function(m){
-                                       return m.toLowerCase();
-                               }) : null;
-                               if (!selectorText || !selectorText.test('^' + selector + '$')) return;
-                               Element.Styles.each(function(value, style){
-                                       if (!rule.style[style] || Element.ShortStyles[style]) return;
-                                       value = String(rule.style[style]);
-                                       to[style] = (value.test(/^rgb/)) ? value.rgbToHex() : value;
-                               });
-                       });
-               });
-               return Fx.CSS.Cache[selector] = to;
-       }
-
-});
-
-Fx.CSS.Cache = {};
-
-Fx.CSS.Parsers = new Hash({
-
-       Color: {
-               parse: function(value){
-                       if (value.match(/^#[0-9a-f]{3,6}$/i)) return value.hexToRgb(true);
-                       return ((value = value.match(/(\d+),\s*(\d+),\s*(\d+)/))) ? [value[1], value[2], value[3]] : false;
-               },
-               compute: function(from, to, delta){
-                       return from.map(function(value, i){
-                               return Math.round(Fx.compute(from[i], to[i], delta));
-                       });
-               },
-               serve: function(value){
-                       return value.map(Number);
-               }
-       },
-
-       Number: {
-               parse: parseFloat,
-               compute: Fx.compute,
-               serve: function(value, unit){
-                       return (unit) ? value + unit : value;
-               }
-       },
-
-       String: {
-               parse: $lambda(false),
-               compute: $arguments(1),
-               serve: $arguments(0)
-       }
-
-});
-
-
-/*
----
-
-script: Fx.Tween.js
-
-description: Formerly Fx.Style, effect to transition any CSS property for an element.
-
-license: MIT-style license.
-
-requires: 
-- /Fx.CSS
-
-provides: [Fx.Tween, Element.fade, Element.highlight]
-
-...
-*/
-
-Fx.Tween = new Class({
-
-       Extends: Fx.CSS,
-
-       initialize: function(element, options){
-               this.element = this.subject = document.id(element);
-               this.parent(options);
-       },
-
-       set: function(property, now){
-               if (arguments.length == 1){
-                       now = property;
-                       property = this.property || this.options.property;
-               }
-               this.render(this.element, property, now, this.options.unit);
-               return this;
-       },
-
-       start: function(property, from, to){
-               if (!this.check(property, from, to)) return this;
-               var args = Array.flatten(arguments);
-               this.property = this.options.property || args.shift();
-               var parsed = this.prepare(this.element, this.property, args);
-               return this.parent(parsed.from, parsed.to);
-       }
-
-});
-
-Element.Properties.tween = {
-
-       set: function(options){
-               var tween = this.retrieve('tween');
-               if (tween) tween.cancel();
-               return this.eliminate('tween').store('tween:options', $extend({link: 'cancel'}, options));
-       },
-
-       get: function(options){
-               if (options || !this.retrieve('tween')){
-                       if (options || !this.retrieve('tween:options')) this.set('tween', options);
-                       this.store('tween', new Fx.Tween(this, this.retrieve('tween:options')));
-               }
-               return this.retrieve('tween');
-       }
-
-};
-
-Element.implement({
-
-       tween: function(property, from, to){
-               this.get('tween').start(arguments);
-               return this;
-       },
-
-       fade: function(how){
-               var fade = this.get('tween'), o = 'opacity', toggle;
-               how = $pick(how, 'toggle');
-               switch (how){
-                       case 'in': fade.start(o, 1); break;
-                       case 'out': fade.start(o, 0); break;
-                       case 'show': fade.set(o, 1); break;
-                       case 'hide': fade.set(o, 0); break;
-                       case 'toggle':
-                               var flag = this.retrieve('fade:flag', this.get('opacity') == 1);
-                               fade.start(o, (flag) ? 0 : 1);
-                               this.store('fade:flag', !flag);
-                               toggle = true;
-                       break;
-                       default: fade.start(o, arguments);
-               }
-               if (!toggle) this.eliminate('fade:flag');
-               return this;
-       },
-
-       highlight: function(start, end){
-               if (!end){
-                       end = this.retrieve('highlight:original', this.getStyle('background-color'));
-                       end = (end == 'transparent') ? '#fff' : end;
-               }
-               var tween = this.get('tween');
-               tween.start('background-color', start || '#ffff88', end).chain(function(){
-                       this.setStyle('background-color', this.retrieve('highlight:original'));
-                       tween.callChain();
-               }.bind(this));
-               return this;
-       }
-
-});
-
-
-/*
----
-
-script: Fx.Morph.js
-
-description: Formerly Fx.Styles, effect to transition any number of CSS properties for an element using an object of rules, or CSS based selector rules.
-
-license: MIT-style license.
-
-requires:
-- /Fx.CSS
-
-provides: [Fx.Morph]
-
-...
-*/
-
-Fx.Morph = new Class({
-
-       Extends: Fx.CSS,
-
-       initialize: function(element, options){
-               this.element = this.subject = document.id(element);
-               this.parent(options);
-       },
-
-       set: function(now){
-               if (typeof now == 'string') now = this.search(now);
-               for (var p in now) this.render(this.element, p, now[p], this.options.unit);
-               return this;
-       },
-
-       compute: function(from, to, delta){
-               var now = {};
-               for (var p in from) now[p] = this.parent(from[p], to[p], delta);
-               return now;
-       },
-
-       start: function(properties){
-               if (!this.check(properties)) return this;
-               if (typeof properties == 'string') properties = this.search(properties);
-               var from = {}, to = {};
-               for (var p in properties){
-                       var parsed = this.prepare(this.element, p, properties[p]);
-                       from[p] = parsed.from;
-                       to[p] = parsed.to;
-               }
-               return this.parent(from, to);
-       }
-
-});
-
-Element.Properties.morph = {
-
-       set: function(options){
-               var morph = this.retrieve('morph');
-               if (morph) morph.cancel();
-               return this.eliminate('morph').store('morph:options', $extend({link: 'cancel'}, options));
-       },
-
-       get: function(options){
-               if (options || !this.retrieve('morph')){
-                       if (options || !this.retrieve('morph:options')) this.set('morph', options);
-                       this.store('morph', new Fx.Morph(this, this.retrieve('morph:options')));
-               }
-               return this.retrieve('morph');
-       }
-
-};
-
-Element.implement({
-
-       morph: function(props){
-               this.get('morph').start(props);
-               return this;
-       }
-
-});
-
-
-/*
----
-
-script: Fx.Transitions.js
-
-description: Contains a set of advanced transitions to be used with any of the Fx Classes.
-
-license: MIT-style license.
-
-credits:
-- Easing Equations by Robert Penner, <http://www.robertpenner.com/easing/>, modified and optimized to be used with MooTools.
-
-requires:
-- /Fx
-
-provides: [Fx.Transitions]
-
-...
-*/
-
-Fx.implement({
-
-       getTransition: function(){
-               var trans = this.options.transition || Fx.Transitions.Sine.easeInOut;
-               if (typeof trans == 'string'){
-                       var data = trans.split(':');
-                       trans = Fx.Transitions;
-                       trans = trans[data[0]] || trans[data[0].capitalize()];
-                       if (data[1]) trans = trans['ease' + data[1].capitalize() + (data[2] ? data[2].capitalize() : '')];
-               }
-               return trans;
-       }
-
-});
-
-Fx.Transition = function(transition, params){
-       params = $splat(params);
-       return $extend(transition, {
-               easeIn: function(pos){
-                       return transition(pos, params);
-               },
-               easeOut: function(pos){
-                       return 1 - transition(1 - pos, params);
-               },
-               easeInOut: function(pos){
-                       return (pos <= 0.5) ? transition(2 * pos, params) / 2 : (2 - transition(2 * (1 - pos), params)) / 2;
-               }
-       });
-};
-
-Fx.Transitions = new Hash({
-
-       linear: $arguments(0)
-
-});
-
-Fx.Transitions.extend = function(transitions){
-       for (var transition in transitions) Fx.Transitions[transition] = new Fx.Transition(transitions[transition]);
-};
-
-Fx.Transitions.extend({
-
-       Pow: function(p, x){
-               return Math.pow(p, x[0] || 6);
-       },
-
-       Expo: function(p){
-               return Math.pow(2, 8 * (p - 1));
-       },
-
-       Circ: function(p){
-               return 1 - Math.sin(Math.acos(p));
-       },
-
-       Sine: function(p){
-               return 1 - Math.sin((1 - p) * Math.PI / 2);
-       },
-
-       Back: function(p, x){
-               x = x[0] || 1.618;
-               return Math.pow(p, 2) * ((x + 1) * p - x);
-       },
-
-       Bounce: function(p){
-               var value;
-               for (var a = 0, b = 1; 1; a += b, b /= 2){
-                       if (p >= (7 - 4 * a) / 11){
-                               value = b * b - Math.pow((11 - 6 * a - 11 * p) / 4, 2);
-                               break;
-                       }
-               }
-               return value;
-       },
-
-       Elastic: function(p, x){
-               return Math.pow(2, 10 * --p) * Math.cos(20 * p * Math.PI * (x[0] || 1) / 3);
-       }
-
-});
-
-['Quad', 'Cubic', 'Quart', 'Quint'].each(function(transition, i){
-       Fx.Transitions[transition] = new Fx.Transition(function(p){
-               return Math.pow(p, [i + 2]);
-       });
-});
-
-
-/*
----
-
-script: Request.js
-
-description: Powerful all purpose Request Class. Uses XMLHTTPRequest.
-
-license: MIT-style license.
-
-requires:
-- /Element
-- /Chain
-- /Events
-- /Options
-- /Browser
-
-provides: [Request]
-
-...
-*/
-
-var Request = new Class({
-
-       Implements: [Chain, Events, Options],
-
-       options: {/*
-               onRequest: $empty,
-               onComplete: $empty,
-               onCancel: $empty,
-               onSuccess: $empty,
-               onFailure: $empty,
-               onException: $empty,*/
-               url: '',
-               data: '',
-               headers: {
-                       'X-Requested-With': 'XMLHttpRequest',
-                       'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
-               },
-               async: true,
-               format: false,
-               method: 'post',
-               link: 'ignore',
-               isSuccess: null,
-               emulation: true,
-               urlEncoded: true,
-               encoding: 'utf-8',
-               evalScripts: false,
-               evalResponse: false,
-               noCache: false
-       },
-
-       initialize: function(options){
-               this.xhr = new Browser.Request();
-               this.setOptions(options);
-               this.options.isSuccess = this.options.isSuccess || this.isSuccess;
-               this.headers = new Hash(this.options.headers);
-       },
-
-       onStateChange: function(){
-               if (this.xhr.readyState != 4 || !this.running) return;
-               this.running = false;
-               this.status = 0;
-               $try(function(){
-                       this.status = this.xhr.status;
-               }.bind(this));
-               this.xhr.onreadystatechange = $empty;
-               if (this.options.isSuccess.call(this, this.status)){
-                       this.response = {text: this.xhr.responseText, xml: this.xhr.responseXML};
-                       this.success(this.response.text, this.response.xml);
-               } else {
-                       this.response = {text: null, xml: null};
-                       this.failure();
-               }
-       },
-
-       isSuccess: function(){
-               return ((this.status >= 200) && (this.status < 300));
-       },
-
-       processScripts: function(text){
-               if (this.options.evalResponse || (/(ecma|java)script/).test(this.getHeader('Content-type'))) return $exec(text);
-               return text.stripScripts(this.options.evalScripts);
-       },
-
-       success: function(text, xml){
-               this.onSuccess(this.processScripts(text), xml);
-       },
-
-       onSuccess: function(){
-               this.fireEvent('complete', arguments).fireEvent('success', arguments).callChain();
-       },
-
-       failure: function(){
-               this.onFailure();
-       },
-
-       onFailure: function(){
-               this.fireEvent('complete').fireEvent('failure', this.xhr);
-       },
-
-       setHeader: function(name, value){
-               this.headers.set(name, value);
-               return this;
-       },
-
-       getHeader: function(name){
-               return $try(function(){
-                       return this.xhr.getResponseHeader(name);
-               }.bind(this));
-       },
-
-       check: function(){
-               if (!this.running) return true;
-               switch (this.options.link){
-                       case 'cancel': this.cancel(); return true;
-                       case 'chain': this.chain(this.caller.bind(this, arguments)); return false;
-               }
-               return false;
-       },
-
-       send: function(options){
-               if (!this.check(options)) return this;
-               this.running = true;
-
-               var type = $type(options);
-               if (type == 'string' || type == 'element') options = {data: options};
-
-               var old = this.options;
-               options = $extend({data: old.data, url: old.url, method: old.method}, options);
-               var data = options.data, url = String(options.url), method = options.method.toLowerCase();
-
-               switch ($type(data)){
-                       case 'element': data = document.id(data).toQueryString(); break;
-                       case 'object': case 'hash': data = Hash.toQueryString(data);
-               }
-
-               if (this.options.format){
-                       var format = 'format=' + this.options.format;
-                       data = (data) ? format + '&' + data : format;
-               }
-
-               if (this.options.emulation && !['get', 'post'].contains(method)){
-                       var _method = '_method=' + method;
-                       data = (data) ? _method + '&' + data : _method;
-                       method = 'post';
-               }
-
-               if (this.options.urlEncoded && method == 'post'){
-                       var encoding = (this.options.encoding) ? '; charset=' + this.options.encoding : '';
-                       this.headers.set('Content-type', 'application/x-www-form-urlencoded' + encoding);
-               }
-
-               if (this.options.noCache){
-                       var noCache = 'noCache=' + new Date().getTime();
-                       data = (data) ? noCache + '&' + data : noCache;
-               }
-
-               var trimPosition = url.lastIndexOf('/');
-               if (trimPosition > -1 && (trimPosition = url.indexOf('#')) > -1) url = url.substr(0, trimPosition);
-
-               if (data && method == 'get'){
-                       url = url + (url.contains('?') ? '&' : '?') + data;
-                       data = null;
-               }
-
-               this.xhr.open(method.toUpperCase(), url, this.options.async);
-
-               this.xhr.onreadystatechange = this.onStateChange.bind(this);
-
-               this.headers.each(function(value, key){
-                       try {
-                               this.xhr.setRequestHeader(key, value);
-                       } catch (e){
-                               this.fireEvent('exception', [key, value]);
-                       }
-               }, this);
-
-               this.fireEvent('request');
-               this.xhr.send(data);
-               if (!this.options.async) this.onStateChange();
-               return this;
-       },
-
-       cancel: function(){
-               if (!this.running) return this;
-               this.running = false;
-               this.xhr.abort();
-               this.xhr.onreadystatechange = $empty;
-               this.xhr = new Browser.Request();
-               this.fireEvent('cancel');
-               return this;
-       }
-
-});
-
-(function(){
-
-var methods = {};
-['get', 'post', 'put', 'delete', 'GET', 'POST', 'PUT', 'DELETE'].each(function(method){
-       methods[method] = function(){
-               var params = Array.link(arguments, {url: String.type, data: $defined});
-               return this.send($extend(params, {method: method}));
-       };
-});
-
-Request.implement(methods);
-
-})();
-
-Element.Properties.send = {
-
-       set: function(options){
-               var send = this.retrieve('send');
-               if (send) send.cancel();
-               return this.eliminate('send').store('send:options', $extend({
-                       data: this, link: 'cancel', method: this.get('method') || 'post', url: this.get('action')
-               }, options));
-       },
-
-       get: function(options){
-               if (options || !this.retrieve('send')){
-                       if (options || !this.retrieve('send:options')) this.set('send', options);
-                       this.store('send', new Request(this.retrieve('send:options')));
-               }
-               return this.retrieve('send');
-       }
-
-};
-
-Element.implement({
-
-       send: function(url){
-               var sender = this.get('send');
-               sender.send({data: this, url: url || sender.options.url});
-               return this;
-       }
-
-});
-
-
-/*
----
-
-script: Request.HTML.js
-
-description: Extends the basic Request Class with additional methods for interacting with HTML responses.
-
-license: MIT-style license.
-
-requires:
-- /Request
-- /Element
-
-provides: [Request.HTML]
-
-...
-*/
-
-Request.HTML = new Class({
-
-       Extends: Request,
-
-       options: {
-               update: false,
-               append: false,
-               evalScripts: true,
-               filter: false
-       },
-
-       processHTML: function(text){
-               var match = text.match(/<body[^>]*>([\s\S]*?)<\/body>/i);
-               text = (match) ? match[1] : text;
-
-               var container = new Element('div');
-
-               return $try(function(){
-                       var root = '<root>' + text + '</root>', doc;
-                       if (Browser.Engine.trident){
-                               doc = new ActiveXObject('Microsoft.XMLDOM');
-                               doc.async = false;
-                               doc.loadXML(root);
-                       } else {
-                               doc = new DOMParser().parseFromString(root, 'text/xml');
-                       }
-                       root = doc.getElementsByTagName('root')[0];
-                       if (!root) return null;
-                       for (var i = 0, k = root.childNodes.length; i < k; i++){
-                               var child = Element.clone(root.childNodes[i], true, true);
-                               if (child) container.grab(child);
-                       }
-                       return container;
-               }) || container.set('html', text);
-       },
-
-       success: function(text){
-               var options = this.options, response = this.response;
-
-               response.html = text.stripScripts(function(script){
-                       response.javascript = script;
-               });
-
-               var temp = this.processHTML(response.html);
-
-               response.tree = temp.childNodes;
-               response.elements = temp.getElements('*');
-
-               if (options.filter) response.tree = response.elements.filter(options.filter);
-               if (options.update) document.id(options.update).empty().set('html', response.html);
-               else if (options.append) document.id(options.append).adopt(temp.getChildren());
-               if (options.evalScripts) $exec(response.javascript);
-
-               this.onSuccess(response.tree, response.elements, response.html, response.javascript);
-       }
-
-});
-
-Element.Properties.load = {
-
-       set: function(options){
-               var load = this.retrieve('load');
-               if (load) load.cancel();
-               return this.eliminate('load').store('load:options', $extend({data: this, link: 'cancel', update: this, method: 'get'}, options));
-       },
-
-       get: function(options){
-               if (options || ! this.retrieve('load')){
-                       if (options || !this.retrieve('load:options')) this.set('load', options);
-                       this.store('load', new Request.HTML(this.retrieve('load:options')));
-               }
-               return this.retrieve('load');
-       }
-
-};
-
-Element.implement({
-
-       load: function(){
-               this.get('load').send(Array.link(arguments, {data: Object.type, url: String.type}));
-               return this;
-       }
-
-});
-
-
-/*
----
-
-script: Request.JSON.js
-
-description: Extends the basic Request Class with additional methods for sending and receiving JSON data.
-
-license: MIT-style license.
-
-requires:
-- /Request JSON
-
-provides: [Request.HTML]
-
-...
-*/
-
-Request.JSON = new Class({
-
-       Extends: Request,
-
-       options: {
-               secure: true
-       },
-
-       initialize: function(options){
-               this.parent(options);
-               this.headers.extend({'Accept': 'application/json', 'X-Request': 'JSON'});
-       },
-
-       success: function(text){
-               this.response.json = JSON.decode(text, this.options.secure);
-               this.onSuccess(this.response.json, text);
-       }
-
-});
diff --git a/ricoClient/js/baselibs/prototype-1.6.js b/ricoClient/js/baselibs/prototype-1.6.js
new file mode 100644 (file)
index 0000000..9fe6e12
--- /dev/null
@@ -0,0 +1,4874 @@
+/*  Prototype JavaScript framework, version 1.6.1
+ *  (c) 2005-2009 Sam Stephenson
+ *
+ *  Prototype is freely distributable under the terms of an MIT-style license.
+ *  For details, see the Prototype web site: http://www.prototypejs.org/
+ *
+ *--------------------------------------------------------------------------*/
+
+var Prototype = {
+  Version: '1.6.1',
+
+  Browser: (function(){
+    var ua = navigator.userAgent;
+    var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
+    return {
+      IE:             !!window.attachEvent && !isOpera,
+      Opera:          isOpera,
+      WebKit:         ua.indexOf('AppleWebKit/') > -1,
+      Gecko:          ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
+      MobileSafari:   /Apple.*Mobile.*Safari/.test(ua)
+    }
+  })(),
+
+  BrowserFeatures: {
+    XPath: !!document.evaluate,
+    SelectorsAPI: !!document.querySelector,
+    ElementExtensions: (function() {
+      var constructor = window.Element || window.HTMLElement;
+      return !!(constructor && constructor.prototype);
+    })(),
+    SpecificElementExtensions: (function() {
+      if (typeof window.HTMLDivElement !== 'undefined')
+        return true;
+
+      var div = document.createElement('div');
+      var form = document.createElement('form');
+      var isSupported = false;
+
+      if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
+        isSupported = true;
+      }
+
+      div = form = null;
+
+      return isSupported;
+    })()
+  },
+
+  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
+  JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
+
+  emptyFunction: function() { },
+  K: function(x) { return x }
+};
+
+if (Prototype.Browser.MobileSafari)
+  Prototype.BrowserFeatures.SpecificElementExtensions = false;
+
+
+var Abstract = { };
+
+
+var Try = {
+  these: function() {
+    var returnValue;
+
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      var lambda = arguments[i];
+      try {
+        returnValue = lambda();
+        break;
+      } catch (e) { }
+    }
+
+    return returnValue;
+  }
+};
+
+/* Based on Alex Arnell's inheritance implementation. */
+
+var Class = (function() {
+  function subclass() {};
+  function create() {
+    var parent = null, properties = $A(arguments);
+    if (Object.isFunction(properties[0]))
+      parent = properties.shift();
+
+    function klass() {
+      this.initialize.apply(this, arguments);
+    }
+
+    Object.extend(klass, Class.Methods);
+    klass.superclass = parent;
+    klass.subclasses = [];
+
+    if (parent) {
+      subclass.prototype = parent.prototype;
+      klass.prototype = new subclass;
+      parent.subclasses.push(klass);
+    }
+
+    for (var i = 0; i < properties.length; i++)
+      klass.addMethods(properties[i]);
+
+    if (!klass.prototype.initialize)
+      klass.prototype.initialize = Prototype.emptyFunction;
+
+    klass.prototype.constructor = klass;
+    return klass;
+  }
+
+  function addMethods(source) {
+    var ancestor   = this.superclass && this.superclass.prototype;
+    var properties = Object.keys(source);
+
+    if (!Object.keys({ toString: true }).length) {
+      if (source.toString != Object.prototype.toString)
+        properties.push("toString");
+      if (source.valueOf != Object.prototype.valueOf)
+        properties.push("valueOf");
+    }
+
+    for (var i = 0, length = properties.length; i < length; i++) {
+      var property = properties[i], value = source[property];
+      if (ancestor && Object.isFunction(value) &&
+          value.argumentNames().first() == "$super") {
+        var method = value;
+        value = (function(m) {
+          return function() { return ancestor[m].apply(this, arguments); };
+        })(property).wrap(method);
+
+        value.valueOf = method.valueOf.bind(method);
+        value.toString = method.toString.bind(method);
+      }
+      this.prototype[property] = value;
+    }
+
+    return this;
+  }
+
+  return {
+    create: create,
+    Methods: {
+      addMethods: addMethods
+    }
+  };
+})();
+(function() {
+
+  var _toString = Object.prototype.toString;
+
+  function extend(destination, source) {
+    for (var property in source)
+      destination[property] = source[property];
+    return destination;
+  }
+
+  function inspect(object) {
+    try {
+      if (isUndefined(object)) return 'undefined';
+      if (object === null) return 'null';
+      return object.inspect ? object.inspect() : String(object);
+    } catch (e) {
+      if (e instanceof RangeError) return '...';
+      throw e;
+    }
+  }
+
+  function toJSON(object) {
+    var type = typeof object;
+    switch (type) {
+      case 'undefined':
+      case 'function':
+      case 'unknown': return;
+      case 'boolean': return object.toString();
+    }
+
+    if (object === null) return 'null';
+    if (object.toJSON) return object.toJSON();
+    if (isElement(object)) return;
+
+    var results = [];
+    for (var property in object) {
+      var value = toJSON(object[property]);
+      if (!isUndefined(value))
+        results.push(property.toJSON() + ': ' + value);
+    }
+
+    return '{' + results.join(', ') + '}';
+  }
+
+  function toQueryString(object) {
+    return $H(object).toQueryString();
+  }
+
+  function toHTML(object) {
+    return object && object.toHTML ? object.toHTML() : String.interpret(object);
+  }
+
+  function keys(object) {
+    var results = [];
+    for (var property in object)
+      results.push(property);
+    return results;
+  }
+
+  function values(object) {
+    var results = [];
+    for (var property in object)
+      results.push(object[property]);
+    return results;
+  }
+
+  function clone(object) {
+    return extend({ }, object);
+  }
+
+  function isElement(object) {
+    return !!(object && object.nodeType == 1);
+  }
+
+  function isArray(object) {
+    return _toString.call(object) == "[object Array]";
+  }
+
+
+  function isHash(object) {
+    return object instanceof Hash;
+  }
+
+  function isFunction(object) {
+    return typeof object === "function";
+  }
+
+  function isString(object) {
+    return _toString.call(object) == "[object String]";
+  }
+
+  function isNumber(object) {
+    return _toString.call(object) == "[object Number]";
+  }
+
+  function isUndefined(object) {
+    return typeof object === "undefined";
+  }
+
+  extend(Object, {
+    extend:        extend,
+    inspect:       inspect,
+    toJSON:        toJSON,
+    toQueryString: toQueryString,
+    toHTML:        toHTML,
+    keys:          keys,
+    values:        values,
+    clone:         clone,
+    isElement:     isElement,
+    isArray:       isArray,
+    isHash:        isHash,
+    isFunction:    isFunction,
+    isString:      isString,
+    isNumber:      isNumber,
+    isUndefined:   isUndefined
+  });
+})();
+Object.extend(Function.prototype, (function() {
+  var slice = Array.prototype.slice;
+
+  function update(array, args) {
+    var arrayLength = array.length, length = args.length;
+    while (length--) array[arrayLength + length] = args[length];
+    return array;
+  }
+
+  function merge(array, args) {
+    array = slice.call(array, 0);
+    return update(array, args);
+  }
+
+  function argumentNames() {
+    var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
+      .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
+      .replace(/\s+/g, '').split(',');
+    return names.length == 1 && !names[0] ? [] : names;
+  }
+
+  function bind(context) {
+    if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
+    var __method = this, args = slice.call(arguments, 1);
+    return function() {
+      var a = merge(args, arguments);
+      return __method.apply(context, a);
+    }
+  }
+
+  function bindAsEventListener(context) {
+    var __method = this, args = slice.call(arguments, 1);
+    return function(event) {
+      var a = update([event || window.event], args);
+      return __method.apply(context, a);
+    }
+  }
+
+  function curry() {
+    if (!arguments.length) return this;
+    var __method = this, args = slice.call(arguments, 0);
+    return function() {
+      var a = merge(args, arguments);
+      return __method.apply(this, a);
+    }
+  }
+
+  function delay(timeout) {
+    var __method = this, args = slice.call(arguments, 1);
+    timeout = timeout * 1000
+    return window.setTimeout(function() {
+      return __method.apply(__method, args);
+    }, timeout);
+  }
+
+  function defer() {
+    var args = update([0.01], arguments);
+    return this.delay.apply(this, args);
+  }
+
+  function wrap(wrapper) {
+    var __method = this;
+    return function() {
+      var a = update([__method.bind(this)], arguments);
+      return wrapper.apply(this, a);
+    }
+  }
+
+  function methodize() {
+    if (this._methodized) return this._methodized;
+    var __method = this;
+    return this._methodized = function() {
+      var a = update([this], arguments);
+      return __method.apply(null, a);
+    };
+  }
+
+  return {
+    argumentNames:       argumentNames,
+    bind:                bind,
+    bindAsEventListener: bindAsEventListener,
+    curry:               curry,
+    delay:               delay,
+    defer:               defer,
+    wrap:                wrap,
+    methodize:           methodize
+  }
+})());
+
+
+Date.prototype.toJSON = function() {
+  return '"' + this.getUTCFullYear() + '-' +
+    (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
+    this.getUTCDate().toPaddedString(2) + 'T' +
+    this.getUTCHours().toPaddedString(2) + ':' +
+    this.getUTCMinutes().toPaddedString(2) + ':' +
+    this.getUTCSeconds().toPaddedString(2) + 'Z"';
+};
+
+
+RegExp.prototype.match = RegExp.prototype.test;
+
+RegExp.escape = function(str) {
+  return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
+};
+var PeriodicalExecuter = Class.create({
+  initialize: function(callback, frequency) {
+    this.callback = callback;
+    this.frequency = frequency;
+    this.currentlyExecuting = false;
+
+    this.registerCallback();
+  },
+
+  registerCallback: function() {
+    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
+  },
+
+  execute: function() {
+    this.callback(this);
+  },
+
+  stop: function() {
+    if (!this.timer) return;
+    clearInterval(this.timer);
+    this.timer = null;
+  },
+
+  onTimerEvent: function() {
+    if (!this.currentlyExecuting) {
+      try {
+        this.currentlyExecuting = true;
+        this.execute();
+        this.currentlyExecuting = false;
+      } catch(e) {
+        this.currentlyExecuting = false;
+        throw e;
+      }
+    }
+  }
+});
+Object.extend(String, {
+  interpret: function(value) {
+    return value == null ? '' : String(value);
+  },
+  specialChar: {
+    '\b': '\\b',
+    '\t': '\\t',
+    '\n': '\\n',
+    '\f': '\\f',
+    '\r': '\\r',
+    '\\': '\\\\'
+  }
+});
+
+Object.extend(String.prototype, (function() {
+
+  function prepareReplacement(replacement) {
+    if (Object.isFunction(replacement)) return replacement;
+    var template = new Template(replacement);
+    return function(match) { return template.evaluate(match) };
+  }
+
+  function gsub(pattern, replacement) {
+    var result = '', source = this, match;
+    replacement = prepareReplacement(replacement);
+
+    if (Object.isString(pattern))
+      pattern = RegExp.escape(pattern);
+
+    if (!(pattern.length || pattern.source)) {
+      replacement = replacement('');
+      return replacement + source.split('').join(replacement) + replacement;
+    }
+
+    while (source.length > 0) {
+      if (match = source.match(pattern)) {
+        result += source.slice(0, match.index);
+        result += String.interpret(replacement(match));
+        source  = source.slice(match.index + match[0].length);
+      } else {
+        result += source, source = '';
+      }
+    }
+    return result;
+  }
+
+  function sub(pattern, replacement, count) {
+    replacement = prepareReplacement(replacement);
+    count = Object.isUndefined(count) ? 1 : count;
+
+    return this.gsub(pattern, function(match) {
+      if (--count < 0) return match[0];
+      return replacement(match);
+    });
+  }
+
+  function scan(pattern, iterator) {
+    this.gsub(pattern, iterator);
+    return String(this);
+  }
+
+  function truncate(length, truncation) {
+    length = length || 30;
+    truncation = Object.isUndefined(truncation) ? '...' : truncation;
+    return this.length > length ?
+      this.slice(0, length - truncation.length) + truncation : String(this);
+  }
+
+  function strip() {
+    return this.replace(/^\s+/, '').replace(/\s+$/, '');
+  }
+
+  function stripTags() {
+    return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
+  }
+
+  function stripScripts() {
+    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
+  }
+
+  function extractScripts() {
+    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
+    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
+    return (this.match(matchAll) || []).map(function(scriptTag) {
+      return (scriptTag.match(matchOne) || ['', ''])[1];
+    });
+  }
+
+  function evalScripts() {
+    return this.extractScripts().map(function(script) { return eval(script) });
+  }
+
+  function escapeHTML() {
+    return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
+  }
+
+  function unescapeHTML() {
+    return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');
+  }
+
+
+  function toQueryParams(separator) {
+    var match = this.strip().match(/([^?#]*)(#.*)?$/);
+    if (!match) return { };
+
+    return match[1].split(separator || '&').inject({ }, function(hash, pair) {
+      if ((pair = pair.split('='))[0]) {
+        var key = decodeURIComponent(pair.shift());
+        var value = pair.length > 1 ? pair.join('=') : pair[0];
+        if (value != undefined) value = decodeURIComponent(value);
+
+        if (key in hash) {
+          if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
+          hash[key].push(value);
+        }
+        else hash[key] = value;
+      }
+      return hash;
+    });
+  }
+
+  function toArray() {
+    return this.split('');
+  }
+
+  function succ() {
+    return this.slice(0, this.length - 1) +
+      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
+  }
+
+  function times(count) {
+    return count < 1 ? '' : new Array(count + 1).join(this);
+  }
+
+  function camelize() {
+    var parts = this.split('-'), len = parts.length;
+    if (len == 1) return parts[0];
+
+    var camelized = this.charAt(0) == '-'
+      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
+      : parts[0];
+
+    for (var i = 1; i < len; i++)
+      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
+
+    return camelized;
+  }
+
+  function capitalize() {
+    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
+  }
+
+  function underscore() {
+    return this.replace(/::/g, '/')
+               .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
+               .replace(/([a-z\d])([A-Z])/g, '$1_$2')
+               .replace(/-/g, '_')
+               .toLowerCase();
+  }
+
+  function dasherize() {
+    return this.replace(/_/g, '-');
+  }
+
+  function inspect(useDoubleQuotes) {
+    var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) {
+      if (character in String.specialChar) {
+        return String.specialChar[character];
+      }
+      return '\\u00' + character.charCodeAt().toPaddedString(2, 16);
+    });
+    if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
+    return "'" + escapedString.replace(/'/g, '\\\'') + "'";
+  }
+
+  function toJSON() {
+    return this.inspect(true);
+  }
+
+  function unfilterJSON(filter) {
+    return this.replace(filter || Prototype.JSONFilter, '$1');
+  }
+
+  function isJSON() {
+    var str = this;
+    if (str.blank()) return false;
+    str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
+    return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
+  }
+
+  function evalJSON(sanitize) {
+    var json = this.unfilterJSON();
+    try {
+      if (!sanitize || json.isJSON()) return eval('(' + json + ')');
+    } catch (e) { }
+    throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
+  }
+
+  function include(pattern) {
+    return this.indexOf(pattern) > -1;
+  }
+
+  function startsWith(pattern) {
+    return this.indexOf(pattern) === 0;
+  }
+
+  function endsWith(pattern) {
+    var d = this.length - pattern.length;
+    return d >= 0 && this.lastIndexOf(pattern) === d;
+  }
+
+  function empty() {
+    return this == '';
+  }
+
+  function blank() {
+    return /^\s*$/.test(this);
+  }
+
+  function interpolate(object, pattern) {
+    return new Template(this, pattern).evaluate(object);
+  }
+
+  return {
+    gsub:           gsub,
+    sub:            sub,
+    scan:           scan,
+    truncate:       truncate,
+    strip:          String.prototype.trim ? String.prototype.trim : strip,
+    stripTags:      stripTags,
+    stripScripts:   stripScripts,
+    extractScripts: extractScripts,
+    evalScripts:    evalScripts,
+    escapeHTML:     escapeHTML,
+    unescapeHTML:   unescapeHTML,
+    toQueryParams:  toQueryParams,
+    parseQuery:     toQueryParams,
+    toArray:        toArray,
+    succ:           succ,
+    times:          times,
+    camelize:       camelize,
+    capitalize:     capitalize,
+    underscore:     underscore,
+    dasherize:      dasherize,
+    inspect:        inspect,
+    toJSON:         toJSON,
+    unfilterJSON:   unfilterJSON,
+    isJSON:         isJSON,
+    evalJSON:       evalJSON,
+    include:        include,
+    startsWith:     startsWith,
+    endsWith:       endsWith,
+    empty:          empty,
+    blank:          blank,
+    interpolate:    interpolate
+  };
+})());
+
+var Template = Class.create({
+  initialize: function(template, pattern) {
+    this.template = template.toString();
+    this.pattern = pattern || Template.Pattern;
+  },
+
+  evaluate: function(object) {
+    if (object && Object.isFunction(object.toTemplateReplacements))
+      object = object.toTemplateReplacements();
+
+    return this.template.gsub(this.pattern, function(match) {
+      if (object == null) return (match[1] + '');
+
+      var before = match[1] || '';
+      if (before == '\\') return match[2];
+
+      var ctx = object, expr = match[3];
+      var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
+      match = pattern.exec(expr);
+      if (match == null) return before;
+
+      while (match != null) {
+        var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1];
+        ctx = ctx[comp];
+        if (null == ctx || '' == match[3]) break;
+        expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
+        match = pattern.exec(expr);
+      }
+
+      return before + String.interpret(ctx);
+    });
+  }
+});
+Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
+
+var $break = { };
+
+var Enumerable = (function() {
+  function each(iterator, context) {
+    var index = 0;
+    try {
+      this._each(function(value) {
+        iterator.call(context, value, index++);
+      });
+    } catch (e) {
+      if (e != $break) throw e;
+    }
+    return this;
+  }
+
+  function eachSlice(number, iterator, context) {
+    var index = -number, slices = [], array = this.toArray();
+    if (number < 1) return array;
+    while ((index += number) < array.length)
+      slices.push(array.slice(index, index+number));
+    return slices.collect(iterator, context);
+  }
+
+  function all(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var result = true;
+    this.each(function(value, index) {
+      result = result && !!iterator.call(context, value, index);
+      if (!result) throw $break;
+    });
+    return result;
+  }
+
+  function any(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var result = false;
+    this.each(function(value, index) {
+      if (result = !!iterator.call(context, value, index))
+        throw $break;
+    });
+    return result;
+  }
+
+  function collect(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var results = [];
+    this.each(function(value, index) {
+      results.push(iterator.call(context, value, index));
+    });
+    return results;
+  }
+
+  function detect(iterator, context) {
+    var result;
+    this.each(function(value, index) {
+      if (iterator.call(context, value, index)) {
+        result = value;
+        throw $break;
+      }
+    });
+    return result;
+  }
+
+  function findAll(iterator, context) {
+    var results = [];
+    this.each(function(value, index) {
+      if (iterator.call(context, value, index))
+        results.push(value);
+    });
+    return results;
+  }
+
+  function grep(filter, iterator, context) {
+    iterator = iterator || Prototype.K;
+    var results = [];
+
+    if (Object.isString(filter))
+      filter = new RegExp(RegExp.escape(filter));
+
+    this.each(function(value, index) {
+      if (filter.match(value))
+        results.push(iterator.call(context, value, index));
+    });
+    return results;
+  }
+
+  function include(object) {
+    if (Object.isFunction(this.indexOf))
+      if (this.indexOf(object) != -1) return true;
+
+    var found = false;
+    this.each(function(value) {
+      if (value == object) {
+        found = true;
+        throw $break;
+      }
+    });
+    return found;
+  }
+
+  function inGroupsOf(number, fillWith) {
+    fillWith = Object.isUndefined(fillWith) ? null : fillWith;
+    return this.eachSlice(number, function(slice) {
+      while(slice.length < number) slice.push(fillWith);
+      return slice;
+    });
+  }
+
+  function inject(memo, iterator, context) {
+    this.each(function(value, index) {
+      memo = iterator.call(context, memo, value, index);
+    });
+    return memo;
+  }
+
+  function invoke(method) {
+    var args = $A(arguments).slice(1);
+    return this.map(function(value) {
+      return value[method].apply(value, args);
+    });
+  }
+
+  function max(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var result;
+    this.each(function(value, index) {
+      value = iterator.call(context, value, index);
+      if (result == null || value >= result)
+        result = value;
+    });
+    return result;
+  }
+
+  function min(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var result;
+    this.each(function(value, index) {
+      value = iterator.call(context, value, index);
+      if (result == null || value < result)
+        result = value;
+    });
+    return result;
+  }
+
+  function partition(iterator, context) {
+    iterator = iterator || Prototype.K;
+    var trues = [], falses = [];
+    this.each(function(value, index) {
+      (iterator.call(context, value, index) ?
+        trues : falses).push(value);
+    });
+    return [trues, falses];
+  }
+
+  function pluck(property) {
+    var results = [];
+    this.each(function(value) {
+      results.push(value[property]);
+    });
+    return results;
+  }
+
+  function reject(iterator, context) {
+    var results = [];
+    this.each(function(value, index) {
+      if (!iterator.call(context, value, index))
+        results.push(value);
+    });
+    return results;
+  }
+
+  function sortBy(iterator, context) {
+    return this.map(function(value, index) {
+      return {
+        value: value,
+        criteria: iterator.call(context, value, index)
+      };
+    }).sort(function(left, right) {
+      var a = left.criteria, b = right.criteria;
+      return a < b ? -1 : a > b ? 1 : 0;
+    }).pluck('value');
+  }
+
+  function toArray() {
+    return this.map();
+  }
+
+  function zip() {
+    var iterator = Prototype.K, args = $A(arguments);
+    if (Object.isFunction(args.last()))
+      iterator = args.pop();
+
+    var collections = [this].concat(args).map($A);
+    return this.map(function(value, index) {
+      return iterator(collections.pluck(index));
+    });
+  }
+
+  function size() {
+    return this.toArray().length;
+  }
+
+  function inspect() {
+    return '#<Enumerable:' + this.toArray().inspect() + '>';
+  }
+
+
+
+
+
+
+
+
+
+  return {
+    each:       each,
+    eachSlice:  eachSlice,
+    all:        all,
+    every:      all,
+    any:        any,
+    some:       any,
+    collect:    collect,
+    map:        collect,
+    detect:     detect,
+    findAll:    findAll,
+    select:     findAll,
+    filter:     findAll,
+    grep:       grep,
+    include:    include,
+    member:     include,
+    inGroupsOf: inGroupsOf,
+    inject:     inject,
+    invoke:     invoke,
+    max:        max,
+    min:        min,
+    partition:  partition,
+    pluck:      pluck,
+    reject:     reject,
+    sortBy:     sortBy,
+    toArray:    toArray,
+    entries:    toArray,
+    zip:        zip,
+    size:       size,
+    inspect:    inspect,
+    find:       detect
+  };
+})();
+function $A(iterable) {
+  if (!iterable) return [];
+  if ('toArray' in Object(iterable)) return iterable.toArray();
+  var length = iterable.length || 0, results = new Array(length);
+  while (length--) results[length] = iterable[length];
+  return results;
+}
+
+function $w(string) {
+  if (!Object.isString(string)) return [];
+  string = string.strip();
+  return string ? string.split(/\s+/) : [];
+}
+
+Array.from = $A;
+
+
+(function() {
+  var arrayProto = Array.prototype,
+      slice = arrayProto.slice,
+      _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available
+
+  function each(iterator) {
+    for (var i = 0, length = this.length; i < length; i++)
+      iterator(this[i]);
+  }
+  if (!_each) _each = each;
+
+  function clear() {
+    this.length = 0;
+    return this;
+  }
+
+  function first() {
+    return this[0];
+  }
+
+  function last() {
+    return this[this.length - 1];
+  }
+
+  function compact() {
+    return this.select(function(value) {
+      return value != null;
+    });
+  }
+
+  function flatten() {
+    return this.inject([], function(array, value) {
+      if (Object.isArray(value))
+        return array.concat(value.flatten());
+      array.push(value);
+      return array;
+    });
+  }
+
+  function without() {
+    var values = slice.call(arguments, 0);
+    return this.select(function(value) {
+      return !values.include(value);
+    });
+  }
+
+  function reverse(inline) {
+    return (inline !== false ? this : this.toArray())._reverse();
+  }
+
+  function uniq(sorted) {
+    return this.inject([], function(array, value, index) {
+      if (0 == index || (sorted ? array.last() != value : !array.include(value)))
+        array.push(value);
+      return array;
+    });
+  }
+
+  function intersect(array) {
+    return this.uniq().findAll(function(item) {
+      return array.detect(function(value) { return item === value });
+    });
+  }
+
+
+  function clone() {
+    return slice.call(this, 0);
+  }
+
+  function size() {
+    return this.length;
+  }
+
+  function inspect() {
+    return '[' + this.map(Object.inspect).join(', ') + ']';
+  }
+
+  function toJSON() {
+    var results = [];
+    this.each(function(object) {
+      var value = Object.toJSON(object);
+      if (!Object.isUndefined(value)) results.push(value);
+    });
+    return '[' + results.join(', ') + ']';
+  }
+
+  function indexOf(item, i) {
+    i || (i = 0);
+    var length = this.length;
+    if (i < 0) i = length + i;
+    for (; i < length; i++)
+      if (this[i] === item) return i;
+    return -1;
+  }
+
+  function lastIndexOf(item, i) {
+    i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
+    var n = this.slice(0, i).reverse().indexOf(item);
+    return (n < 0) ? n : i - n - 1;
+  }
+
+  function concat() {
+    var array = slice.call(this, 0), item;
+    for (var i = 0, length = arguments.length; i < length; i++) {
+      item = arguments[i];
+      if (Object.isArray(item) && !('callee' in item)) {
+        for (var j = 0, arrayLength = item.length; j < arrayLength; j++)
+          array.push(item[j]);
+      } else {
+        array.push(item);
+      }
+    }
+    return array;
+  }
+
+  Object.extend(arrayProto, Enumerable);
+
+  if (!arrayProto._reverse)
+    arrayProto._reverse = arrayProto.reverse;
+
+  Object.extend(arrayProto, {
+    _each:     _each,
+    clear:     clear,
+    first:     first,
+    last:      last,
+    compact:   compact,
+    flatten:   flatten,
+    without:   without,
+    reverse:   reverse,
+    uniq:      uniq,
+    intersect: intersect,
+    clone:     clone,
+    toArray:   clone,
+    size:      size,
+    inspect:   inspect,
+    toJSON:    toJSON
+  });
+
+  var CONCAT_ARGUMENTS_BUGGY = (function() {
+    return [].concat(arguments)[0][0] !== 1;
+  })(1,2)
+
+  if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat;
+
+  if (!arrayProto.indexOf) arrayProto.indexOf = indexOf;
+  if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf;
+})();
+function $H(object) {
+  return new Hash(object);
+};
+
+var Hash = Class.create(Enumerable, (function() {
+  function initialize(object) {
+    this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
+  }
+
+  function _each(iterator) {
+    for (var key in this._object) {
+      var value = this._object[key], pair = [key, value];
+      pair.key = key;
+      pair.value = value;
+      iterator(pair);
+    }
+  }
+
+  function set(key, value) {
+    return this._object[key] = value;
+  }
+
+  function get(key) {
+    if (this._object[key] !== Object.prototype[key])
+      return this._object[key];
+  }
+
+  function unset(key) {
+    var value = this._object[key];
+    delete this._object[key];
+    return value;
+  }
+
+  function toObject() {
+    return Object.clone(this._object);
+  }
+
+  function keys() {
+    return this.pluck('key');
+  }
+
+  function values() {
+    return this.pluck('value');
+  }
+
+  function index(value) {
+    var match = this.detect(function(pair) {
+      return pair.value === value;
+    });
+    return match && match.key;
+  }
+
+  function merge(object) {
+    return this.clone().update(object);
+  }
+
+  function update(object) {
+    return new Hash(object).inject(this, function(result, pair) {
+      result.set(pair.key, pair.value);
+      return result;
+    });
+  }
+
+  function toQueryPair(key, value) {
+    if (Object.isUndefined(value)) return key;
+    return key + '=' + encodeURIComponent(String.interpret(value));
+  }
+
+  function toQueryString() {
+    return this.inject([], function(results, pair) {
+      var key = encodeURIComponent(pair.key), values = pair.value;
+
+      if (values && typeof values == 'object') {
+        if (Object.isArray(values))
+          return results.concat(values.map(toQueryPair.curry(key)));
+      } else results.push(toQueryPair(key, values));
+      return results;
+    }).join('&');
+  }
+
+  function inspect() {
+    return '#<Hash:{' + this.map(function(pair) {
+      return pair.map(Object.inspect).join(': ');
+    }).join(', ') + '}>';
+  }
+
+  function toJSON() {
+    return Object.toJSON(this.toObject());
+  }
+
+  function clone() {
+    return new Hash(this);
+  }
+
+  return {
+    initialize:             initialize,
+    _each:                  _each,
+    set:                    set,
+    get:                    get,
+    unset:                  unset,
+    toObject:               toObject,
+    toTemplateReplacements: toObject,
+    keys:                   keys,
+    values:                 values,
+    index:                  index,
+    merge:                  merge,
+    update:                 update,
+    toQueryString:          toQueryString,
+    inspect:                inspect,
+    toJSON:                 toJSON,
+    clone:                  clone
+  };
+})());
+
+Hash.from = $H;
+Object.extend(Number.prototype, (function() {
+  function toColorPart() {
+    return this.toPaddedString(2, 16);
+  }
+
+  function succ() {
+    return this + 1;
+  }
+
+  function times(iterator, context) {
+    $R(0, this, true).each(iterator, context);
+    return this;
+  }
+
+  function toPaddedString(length, radix) {
+    var string = this.toString(radix || 10);
+    return '0'.times(length - string.length) + string;
+  }
+
+  function toJSON() {
+    return isFinite(this) ? this.toString() : 'null';
+  }
+
+  function abs() {
+    return Math.abs(this);
+  }
+
+  function round() {
+    return Math.round(this);
+  }
+
+  function ceil() {
+    return Math.ceil(this);
+  }
+
+  function floor() {
+    return Math.floor(this);
+  }
+
+  return {
+    toColorPart:    toColorPart,
+    succ:           succ,
+    times:          times,
+    toPaddedString: toPaddedString,
+    toJSON:         toJSON,
+    abs:            abs,
+    round:          round,
+    ceil:           ceil,
+    floor:          floor
+  };
+})());
+
+function $R(start, end, exclusive) {
+  return new ObjectRange(start, end, exclusive);
+}
+
+var ObjectRange = Class.create(Enumerable, (function() {
+  function initialize(start, end, exclusive) {
+    this.start = start;
+    this.end = end;
+    this.exclusive = exclusive;
+  }
+
+  function _each(iterator) {
+    var value = this.start;
+    while (this.include(value)) {
+      iterator(value);
+      value = value.succ();
+    }
+  }
+
+  function include(value) {
+    if (value < this.start)
+      return false;
+    if (this.exclusive)
+      return value < this.end;
+    return value <= this.end;
+  }
+
+  return {
+    initialize: initialize,
+    _each:      _each,
+    include:    include
+  };
+})());
+
+
+
+var Ajax = {
+  getTransport: function() {
+    return Try.these(
+      function() {return new XMLHttpRequest()},
+      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
+      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
+    ) || false;
+  },
+
+  activeRequestCount: 0
+};
+
+Ajax.Responders = {
+  responders: [],
+
+  _each: function(iterator) {
+    this.responders._each(iterator);
+  },
+
+  register: function(responder) {
+    if (!this.include(responder))
+      this.responders.push(responder);
+  },
+
+  unregister: function(responder) {
+    this.responders = this.responders.without(responder);
+  },
+
+  dispatch: function(callback, request, transport, json) {
+    this.each(function(responder) {
+      if (Object.isFunction(responder[callback])) {
+        try {
+          responder[callback].apply(responder, [request, transport, json]);
+        } catch (e) { }
+      }
+    });
+  }
+};
+
+Object.extend(Ajax.Responders, Enumerable);
+
+Ajax.Responders.register({
+  onCreate:   function() { Ajax.activeRequestCount++ },
+  onComplete: function() { Ajax.activeRequestCount-- }
+});
+Ajax.Base = Class.create({
+  initialize: function(options) {
+    this.options = {
+      method:       'post',
+      asynchronous: true,
+      contentType:  'application/x-www-form-urlencoded',
+      encoding:     'UTF-8',
+      parameters:   '',
+      evalJSON:     true,
+      evalJS:       true
+    };
+    Object.extend(this.options, options || { });
+
+    this.options.method = this.options.method.toLowerCase();
+
+    if (Object.isString(this.options.parameters))
+      this.options.parameters = this.options.parameters.toQueryParams();
+    else if (Object.isHash(this.options.parameters))
+      this.options.parameters = this.options.parameters.toObject();
+  }
+});
+Ajax.Request = Class.create(Ajax.Base, {
+  _complete: false,
+
+  initialize: function($super, url, options) {
+    $super(options);
+    this.transport = Ajax.getTransport();
+    this.request(url);
+  },
+
+  request: function(url) {
+    this.url = url;
+    this.method = this.options.method;
+    var params = Object.clone(this.options.parameters);
+
+    if (!['get', 'post'].include(this.method)) {
+      params['_method'] = this.method;
+      this.method = 'post';
+    }
+
+    this.parameters = params;
+
+    if (params = Object.toQueryString(params)) {
+      if (this.method == 'get')
+        this.url += (this.url.include('?') ? '&' : '?') + params;
+      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
+        params += '&_=';
+    }
+
+    try {
+      var response = new Ajax.Response(this);
+      if (this.options.onCreate) this.options.onCreate(response);
+      Ajax.Responders.dispatch('onCreate', this, response);
+
+      this.transport.open(this.method.toUpperCase(), this.url,
+        this.options.asynchronous);
+
+      if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
+
+      this.transport.onreadystatechange = this.onStateChange.bind(this);
+      this.setRequestHeaders();
+
+      this.body = this.method == 'post' ? (this.options.postBody || params) : null;
+      this.transport.send(this.body);
+
+      /* Force Firefox to handle ready state 4 for synchronous requests */
+      if (!this.options.asynchronous && this.transport.overrideMimeType)
+        this.onStateChange();
+
+    }
+    catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  onStateChange: function() {
+    var readyState = this.transport.readyState;
+    if (readyState > 1 && !((readyState == 4) && this._complete))
+      this.respondToReadyState(this.transport.readyState);
+  },
+
+  setRequestHeaders: function() {
+    var headers = {
+      'X-Requested-With': 'XMLHttpRequest',
+      'X-Prototype-Version': Prototype.Version,
+      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
+    };
+
+    if (this.method == 'post') {
+      headers['Content-type'] = this.options.contentType +
+        (this.options.encoding ? '; charset=' + this.options.encoding : '');
+
+      /* Force "Connection: close" for older Mozilla browsers to work
+       * around a bug where XMLHttpRequest sends an incorrect
+       * Content-length header. See Mozilla Bugzilla #246651.
+       */
+      if (this.transport.overrideMimeType &&
+          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
+            headers['Connection'] = 'close';
+    }
+
+    if (typeof this.options.requestHeaders == 'object') {
+      var extras = this.options.requestHeaders;
+
+      if (Object.isFunction(extras.push))
+        for (var i = 0, length = extras.length; i < length; i += 2)
+          headers[extras[i]] = extras[i+1];
+      else
+        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
+    }
+
+    for (var name in headers)
+      this.transport.setRequestHeader(name, headers[name]);
+  },
+
+  success: function() {
+    var status = this.getStatus();
+    return !status || (status >= 200 && status < 300);
+  },
+
+  getStatus: function() {
+    try {
+      return this.transport.status || 0;
+    } catch (e) { return 0 }
+  },
+
+  respondToReadyState: function(readyState) {
+    var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
+
+    if (state == 'Complete') {
+      try {
+        this._complete = true;
+        (this.options['on' + response.status]
+         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
+         || Prototype.emptyFunction)(response, response.headerJSON);
+      } catch (e) {
+        this.dispatchException(e);
+      }
+
+      var contentType = response.getHeader('Content-type');
+      if (this.options.evalJS == 'force'
+          || (this.options.evalJS && this.isSameOrigin() && contentType
+          && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
+        this.evalResponse();
+    }
+
+    try {
+      (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
+      Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
+    } catch (e) {
+      this.dispatchException(e);
+    }
+
+    if (state == 'Complete') {
+      this.transport.onreadystatechange = Prototype.emptyFunction;
+    }
+  },
+
+  isSameOrigin: function() {
+    var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
+    return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
+      protocol: location.protocol,
+      domain: document.domain,
+      port: location.port ? ':' + location.port : ''
+    }));
+  },
+
+  getHeader: function(name) {
+    try {
+      return this.transport.getResponseHeader(name) || null;
+    } catch (e) { return null; }
+  },
+
+  evalResponse: function() {
+    try {
+      return eval((this.transport.responseText || '').unfilterJSON());
+    } catch (e) {
+      this.dispatchException(e);
+    }
+  },
+
+  dispatchException: function(exception) {
+    (this.options.onException || Prototype.emptyFunction)(this, exception);
+    Ajax.Responders.dispatch('onException', this, exception);
+  }
+});
+
+Ajax.Request.Events =
+  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
+
+
+
+
+
+
+
+
+Ajax.Response = Class.create({
+  initialize: function(request){
+    this.request = request;
+    var transport  = this.transport  = request.transport,
+        readyState = this.readyState = transport.readyState;
+
+    if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
+      this.status       = this.getStatus();
+      this.statusText   = this.getStatusText();
+      this.responseText = String.interpret(transport.responseText);
+      this.headerJSON   = this._getHeaderJSON();
+    }
+
+    if(readyState == 4) {
+      var xml = transport.responseXML;
+      this.responseXML  = Object.isUndefined(xml) ? null : xml;
+      this.responseJSON = this._getResponseJSON();
+    }
+  },
+
+  status:      0,
+
+  statusText: '',
+
+  getStatus: Ajax.Request.prototype.getStatus,
+
+  getStatusText: function() {
+    try {
+      return this.transport.statusText || '';
+    } catch (e) { return '' }
+  },
+
+  getHeader: Ajax.Request.prototype.getHeader,
+
+  getAllHeaders: function() {
+    try {
+      return this.getAllResponseHeaders();
+    } catch (e) { return null }
+  },
+
+  getResponseHeader: function(name) {
+    return this.transport.getResponseHeader(name);
+  },
+
+  getAllResponseHeaders: function() {
+    return this.transport.getAllResponseHeaders();
+  },
+
+  _getHeaderJSON: function() {
+    var json = this.getHeader('X-JSON');
+    if (!json) return null;
+    json = decodeURIComponent(escape(json));
+    try {
+      return json.evalJSON(this.request.options.sanitizeJSON ||
+        !this.request.isSameOrigin());
+    } catch (e) {
+      this.request.dispatchException(e);
+    }
+  },
+
+  _getResponseJSON: function() {
+    var options = this.request.options;
+    if (!options.evalJSON || (options.evalJSON != 'force' &&
+      !(this.getHeader('Content-type') || '').include('application/json')) ||
+        this.responseText.blank())
+          return null;
+    try {
+      return this.responseText.evalJSON(options.sanitizeJSON ||
+        !this.request.isSameOrigin());
+    } catch (e) {
+      this.request.dispatchException(e);
+    }
+  }
+});
+
+Ajax.Updater = Class.create(Ajax.Request, {
+  initialize: function($super, container, url, options) {
+    this.container = {
+      success: (container.success || container),
+      failure: (container.failure || (container.success ? null : container))
+    };
+
+    options = Object.clone(options);
+    var onComplete = options.onComplete;
+    options.onComplete = (function(response, json) {
+      this.updateContent(response.responseText);
+      if (Object.isFunction(onComplete)) onComplete(response, json);
+    }).bind(this);
+
+    $super(url, options);
+  },
+
+  updateContent: function(responseText) {
+    var receiver = this.container[this.success() ? 'success' : 'failure'],
+        options = this.options;
+
+    if (!options.evalScripts) responseText = responseText.stripScripts();
+
+    if (receiver = $(receiver)) {
+      if (options.insertion) {
+        if (Object.isString(options.insertion)) {
+          var insertion = { }; insertion[options.insertion] = responseText;
+          receiver.insert(insertion);
+        }
+        else options.insertion(receiver, responseText);
+      }
+      else receiver.update(responseText);
+    }
+  }
+});
+
+Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
+  initialize: function($super, container, url, options) {
+    $super(options);
+    this.onComplete = this.options.onComplete;
+
+    this.frequency = (this.options.frequency || 2);
+    this.decay = (this.options.decay || 1);
+
+    this.updater = { };
+    this.container = container;
+    this.url = url;
+
+    this.start();
+  },
+
+  start: function() {
+    this.options.onComplete = this.updateComplete.bind(this);
+    this.onTimerEvent();
+  },
+
+  stop: function() {
+    this.updater.options.onComplete = undefined;
+    clearTimeout(this.timer);
+    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
+  },
+
+  updateComplete: function(response) {
+    if (this.options.decay) {
+      this.decay = (response.responseText == this.lastText ?
+        this.decay * this.options.decay : 1);
+
+      this.lastText = response.responseText;
+    }
+    this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
+  },
+
+  onTimerEvent: function() {
+    this.updater = new Ajax.Updater(this.container, this.url, this.options);
+  }
+});
+
+
+
+function $(element) {
+  if (arguments.length > 1) {
+    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
+      elements.push($(arguments[i]));
+    return elements;
+  }
+  if (Object.isString(element))
+    element = document.getElementById(element);
+  return Element.extend(element);
+}
+
+if (Prototype.BrowserFeatures.XPath) {
+  document._getElementsByXPath = function(expression, parentElement) {
+    var results = [];
+    var query = document.evaluate(expression, $(parentElement) || document,
+      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+    for (var i = 0, length = query.snapshotLength; i < length; i++)
+      results.push(Element.extend(query.snapshotItem(i)));
+    return results;
+  };
+}
+
+/*--------------------------------------------------------------------------*/
+
+if (!window.Node) var Node = { };
+
+if (!Node.ELEMENT_NODE) {
+  Object.extend(Node, {
+    ELEMENT_NODE: 1,
+    ATTRIBUTE_NODE: 2,
+    TEXT_NODE: 3,
+    CDATA_SECTION_NODE: 4,
+    ENTITY_REFERENCE_NODE: 5,
+    ENTITY_NODE: 6,
+    PROCESSING_INSTRUCTION_NODE: 7,
+    COMMENT_NODE: 8,
+    DOCUMENT_NODE: 9,
+    DOCUMENT_TYPE_NODE: 10,
+    DOCUMENT_FRAGMENT_NODE: 11,
+    NOTATION_NODE: 12
+  });
+}
+
+
+(function(global) {
+
+  var SETATTRIBUTE_IGNORES_NAME = (function(){
+    var elForm = document.createElement("form");
+    var elInput = document.createElement("input");
+    var root = document.documentElement;
+    elInput.setAttribute("name", "test");
+    elForm.appendChild(elInput);
+    root.appendChild(elForm);
+    var isBuggy = elForm.elements
+      ? (typeof elForm.elements.test == "undefined")
+      : null;
+    root.removeChild(elForm);
+    elForm = elInput = null;
+    return isBuggy;
+  })();
+
+  var element = global.Element;
+  global.Element = function(tagName, attributes) {
+    attributes = attributes || { };
+    tagName = tagName.toLowerCase();
+    var cache = Element.cache;
+    if (SETATTRIBUTE_IGNORES_NAME && attributes.name) {
+      tagName = '<' + tagName + ' name="' + attributes.name + '">';
+      delete attributes.name;
+      return Element.writeAttribute(document.createElement(tagName), attributes);
+    }
+    if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
+    return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
+  };
+  Object.extend(global.Element, element || { });
+  if (element) global.Element.prototype = element.prototype;
+})(this);
+
+Element.cache = { };
+Element.idCounter = 1;
+
+Element.Methods = {
+  visible: function(element) {
+    return $(element).style.display != 'none';
+  },
+
+  toggle: function(element) {
+    element = $(element);
+    Element[Element.visible(element) ? 'hide' : 'show'](element);
+    return element;
+  },
+
+
+  hide: function(element) {
+    element = $(element);
+    element.style.display = 'none';
+    return element;
+  },
+
+  show: function(element) {
+    element = $(element);
+    element.style.display = '';
+    return element;
+  },
+
+  remove: function(element) {
+    element = $(element);
+    element.parentNode.removeChild(element);
+    return element;
+  },
+
+  update: (function(){
+
+    var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){
+      var el = document.createElement("select"),
+          isBuggy = true;
+      el.innerHTML = "<option value=\"test\">test</option>";
+      if (el.options && el.options[0]) {
+        isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION";
+      }
+      el = null;
+      return isBuggy;
+    })();
+
+    var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){
+      try {
+        var el = document.createElement("table");
+        if (el && el.tBodies) {
+          el.innerHTML = "<tbody><tr><td>test</td></tr></tbody>";
+          var isBuggy = typeof el.tBodies[0] == "undefined";
+          el = null;
+          return isBuggy;
+        }
+      } catch (e) {
+        return true;
+      }
+    })();
+
+    var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () {
+      var s = document.createElement("script"),
+          isBuggy = false;
+      try {
+        s.appendChild(document.createTextNode(""));
+        isBuggy = !s.firstChild ||
+          s.firstChild && s.firstChild.nodeType !== 3;
+      } catch (e) {
+        isBuggy = true;
+      }
+      s = null;
+      return isBuggy;
+    })();
+
+    function update(element, content) {
+      element = $(element);
+
+      if (content && content.toElement)
+        content = content.toElement();
+
+      if (Object.isElement(content))
+        return element.update().insert(content);
+
+      content = Object.toHTML(content);
+
+      var tagName = element.tagName.toUpperCase();
+
+      if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) {
+        element.text = content;
+        return element;
+      }
+
+      if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) {
+        if (tagName in Element._insertionTranslations.tags) {
+          while (element.firstChild) {
+            element.removeChild(element.firstChild);
+          }
+          Element._getContentFromAnonymousElement(tagName, content.stripScripts())
+            .each(function(node) {
+              element.appendChild(node)
+            });
+        }
+        else {
+          element.innerHTML = content.stripScripts();
+        }
+      }
+      else {
+        element.innerHTML = content.stripScripts();
+      }
+
+      content.evalScripts.bind(content).defer();
+      return element;
+    }
+
+    return update;
+  })(),
+
+  replace: function(element, content) {
+    element = $(element);
+    if (content && content.toElement) content = content.toElement();
+    else if (!Object.isElement(content)) {
+      content = Object.toHTML(content);
+      var range = element.ownerDocument.createRange();
+      range.selectNode(element);
+      content.evalScripts.bind(content).defer();
+      content = range.createContextualFragment(content.stripScripts());
+    }
+    element.parentNode.replaceChild(content, element);
+    return element;
+  },
+
+  insert: function(element, insertions) {
+    element = $(element);
+
+    if (Object.isString(insertions) || Object.isNumber(insertions) ||
+        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
+          insertions = {bottom:insertions};
+
+    var content, insert, tagName, childNodes;
+
+    for (var position in insertions) {
+      content  = insertions[position];
+      position = position.toLowerCase();
+      insert = Element._insertionTranslations[position];
+
+      if (content && content.toElement) content = content.toElement();
+      if (Object.isElement(content)) {
+        insert(element, content);
+        continue;
+      }
+
+      content = Object.toHTML(content);
+
+      tagName = ((position == 'before' || position == 'after')
+        ? element.parentNode : element).tagName.toUpperCase();
+
+      childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+
+      if (position == 'top' || position == 'after') childNodes.reverse();
+      childNodes.each(insert.curry(element));
+
+      content.evalScripts.bind(content).defer();
+    }
+
+    return element;
+  },
+
+  wrap: function(element, wrapper, attributes) {
+    element = $(element);
+    if (Object.isElement(wrapper))
+      $(wrapper).writeAttribute(attributes || { });
+    else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
+    else wrapper = new Element('div', wrapper);
+    if (element.parentNode)
+      element.parentNode.replaceChild(wrapper, element);
+    wrapper.appendChild(element);
+    return wrapper;
+  },
+
+  inspect: function(element) {
+    element = $(element);
+    var result = '<' + element.tagName.toLowerCase();
+    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
+      var property = pair.first(), attribute = pair.last();
+      var value = (element[property] || '').toString();
+      if (value) result += ' ' + attribute + '=' + value.inspect(true);
+    });
+    return result + '>';
+  },
+
+  recursivelyCollect: function(element, property) {
+    element = $(element);
+    var elements = [];
+    while (element = element[property])
+      if (element.nodeType == 1)
+        elements.push(Element.extend(element));
+    return elements;
+  },
+
+  ancestors: function(element) {
+    return Element.recursivelyCollect(element, 'parentNode');
+  },
+
+  descendants: function(element) {
+    return Element.select(element, "*");
+  },
+
+  firstDescendant: function(element) {
+    element = $(element).firstChild;
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    return $(element);
+  },
+
+  immediateDescendants: function(element) {
+    if (!(element = $(element).firstChild)) return [];
+    while (element && element.nodeType != 1) element = element.nextSibling;
+    if (element) return [element].concat($(element).nextSiblings());
+    return [];
+  },
+
+  previousSiblings: function(element) {
+    return Element.recursivelyCollect(element, 'previousSibling');
+  },
+
+  nextSiblings: function(element) {
+    return Element.recursivelyCollect(element, 'nextSibling');
+  },
+
+  siblings: function(element) {
+    element = $(element);
+    return Element.previousSiblings(element).reverse()
+      .concat(Element.nextSiblings(element));
+  },
+
+  match: function(element, selector) {
+    if (Object.isString(selector))
+      selector = new Selector(selector);
+    return selector.match($(element));
+  },
+
+  up: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(element.parentNode);
+    var ancestors = Element.ancestors(element);
+    return Object.isNumber(expression) ? ancestors[expression] :
+      Selector.findElement(ancestors, expression, index);
+  },
+
+  down: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return Element.firstDescendant(element);
+    return Object.isNumber(expression) ? Element.descendants(element)[expression] :
+      Element.select(element, expression)[index || 0];
+  },
+
+  previous: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
+    var previousSiblings = Element.previousSiblings(element);
+    return Object.isNumber(expression) ? previousSiblings[expression] :
+      Selector.findElement(previousSiblings, expression, index);
+  },
+
+  next: function(element, expression, index) {
+    element = $(element);
+    if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
+    var nextSiblings = Element.nextSiblings(element);
+    return Object.isNumber(expression) ? nextSiblings[expression] :
+      Selector.findElement(nextSiblings, expression, index);
+  },
+
+
+  select: function(element) {
+    var args = Array.prototype.slice.call(arguments, 1);
+    return Selector.findChildElements(element, args);
+  },
+
+  adjacent: function(element) {
+    var args = Array.prototype.slice.call(arguments, 1);
+    return Selector.findChildElements(element.parentNode, args).without(element);
+  },
+
+  identify: function(element) {
+    element = $(element);
+    var id = Element.readAttribute(element, 'id');
+    if (id) return id;
+    do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id));
+    Element.writeAttribute(element, 'id', id);
+    return id;
+  },
+
+  readAttribute: function(element, name) {
+    element = $(element);
+    if (Prototype.Browser.IE) {
+      var t = Element._attributeTranslations.read;
+      if (t.values[name]) return t.values[name](element, name);
+      if (t.names[name]) name = t.names[name];
+      if (name.include(':')) {
+        return (!element.attributes || !element.attributes[name]) ? null :
+         element.attributes[name].value;
+      }
+    }
+    return element.getAttribute(name);
+  },
+
+  writeAttribute: function(element, name, value) {
+    element = $(element);
+    var attributes = { }, t = Element._attributeTranslations.write;
+
+    if (typeof name == 'object') attributes = name;
+    else attributes[name] = Object.isUndefined(value) ? true : value;
+
+    for (var attr in attributes) {
+      name = t.names[attr] || attr;
+      value = attributes[attr];
+      if (t.values[attr]) name = t.values[attr](element, value);
+      if (value === false || value === null)
+        element.removeAttribute(name);
+      else if (value === true)
+        element.setAttribute(name, name);
+      else element.setAttribute(name, value);
+    }
+    return element;
+  },
+
+  getHeight: function(element) {
+    return Element.getDimensions(element).height;
+  },
+
+  getWidth: function(element) {
+    return Element.getDimensions(element).width;
+  },
+
+  classNames: function(element) {
+    return new Element.ClassNames(element);
+  },
+
+  hasClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    var elementClassName = element.className;
+    return (elementClassName.length > 0 && (elementClassName == className ||
+      new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
+  },
+
+  addClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    if (!Element.hasClassName(element, className))
+      element.className += (element.className ? ' ' : '') + className;
+    return element;
+  },
+
+  removeClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    element.className = element.className.replace(
+      new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
+    return element;
+  },
+
+  toggleClassName: function(element, className) {
+    if (!(element = $(element))) return;
+    return Element[Element.hasClassName(element, className) ?
+      'removeClassName' : 'addClassName'](element, className);
+  },
+
+  cleanWhitespace: function(element) {
+    element = $(element);
+    var node = element.firstChild;
+    while (node) {
+      var nextNode = node.nextSibling;
+      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
+        element.removeChild(node);
+      node = nextNode;
+    }
+    return element;
+  },
+
+  empty: function(element) {
+    return $(element).innerHTML.blank();
+  },
+
+  descendantOf: function(element, ancestor) {
+    element = $(element), ancestor = $(ancestor);
+
+    if (element.compareDocumentPosition)
+      return (element.compareDocumentPosition(ancestor) & 8) === 8;
+
+    if (ancestor.contains)
+      return ancestor.contains(element) && ancestor !== element;
+
+    while (element = element.parentNode)
+      if (element == ancestor) return true;
+
+    return false;
+  },
+
+  scrollTo: function(element) {
+    element = $(element);
+    var pos = Element.cumulativeOffset(element);
+    window.scrollTo(pos[0], pos[1]);
+    return element;
+  },
+
+  getStyle: function(element, style) {
+    element = $(element);
+    style = style == 'float' ? 'cssFloat' : style.camelize();
+    var value = element.style[style];
+    if (!value || value == 'auto') {
+      var css = document.defaultView.getComputedStyle(element, null);
+      value = css ? css[style] : null;
+    }
+    if (style == 'opacity') return value ? parseFloat(value) : 1.0;
+    return value == 'auto' ? null : value;
+  },
+
+  getOpacity: function(element) {
+    return $(element).getStyle('opacity');
+  },
+
+  setStyle: function(element, styles) {
+    element = $(element);
+    var elementStyle = element.style, match;
+    if (Object.isString(styles)) {
+      element.style.cssText += ';' + styles;
+      return styles.include('opacity') ?
+        element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
+    }
+    for (var property in styles)
+      if (property == 'opacity') element.setOpacity(styles[property]);
+      else
+        elementStyle[(property == 'float' || property == 'cssFloat') ?
+          (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
+            property] = styles[property];
+
+    return element;
+  },
+
+  setOpacity: function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1 || value === '') ? '' :
+      (value < 0.00001) ? 0 : value;
+    return element;
+  },
+
+  getDimensions: function(element) {
+    element = $(element);
+    var display = Element.getStyle(element, 'display');
+    if (display != 'none' && display != null) // Safari bug
+      return {width: element.offsetWidth, height: element.offsetHeight};
+
+    var els = element.style;
+    var originalVisibility = els.visibility;
+    var originalPosition = els.position;
+    var originalDisplay = els.display;
+    els.visibility = 'hidden';
+    if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari
+      els.position = 'absolute';
+    els.display = 'block';
+    var originalWidth = element.clientWidth;
+    var originalHeight = element.clientHeight;
+    els.display = originalDisplay;
+    els.position = originalPosition;
+    els.visibility = originalVisibility;
+    return {width: originalWidth, height: originalHeight};
+  },
+
+  makePositioned: function(element) {
+    element = $(element);
+    var pos = Element.getStyle(element, 'position');
+    if (pos == 'static' || !pos) {
+      element._madePositioned = true;
+      element.style.position = 'relative';
+      if (Prototype.Browser.Opera) {
+        element.style.top = 0;
+        element.style.left = 0;
+      }
+    }
+    return element;
+  },
+
+  undoPositioned: function(element) {
+    element = $(element);
+    if (element._madePositioned) {
+      element._madePositioned = undefined;
+      element.style.position =
+        element.style.top =
+        element.style.left =
+        element.style.bottom =
+        element.style.right = '';
+    }
+    return element;
+  },
+
+  makeClipping: function(element) {
+    element = $(element);
+    if (element._overflow) return element;
+    element._overflow = Element.getStyle(element, 'overflow') || 'auto';
+    if (element._overflow !== 'hidden')
+      element.style.overflow = 'hidden';
+    return element;
+  },
+
+  undoClipping: function(element) {
+    element = $(element);
+    if (!element._overflow) return element;
+    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
+    element._overflow = null;
+    return element;
+  },
+
+  cumulativeOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  positionedOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      element = element.offsetParent;
+      if (element) {
+        if (element.tagName.toUpperCase() == 'BODY') break;
+        var p = Element.getStyle(element, 'position');
+        if (p !== 'static') break;
+      }
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  absolutize: function(element) {
+    element = $(element);
+    if (Element.getStyle(element, 'position') == 'absolute') return element;
+
+    var offsets = Element.positionedOffset(element);
+    var top     = offsets[1];
+    var left    = offsets[0];
+    var width   = element.clientWidth;
+    var height  = element.clientHeight;
+
+    element._originalLeft   = left - parseFloat(element.style.left  || 0);
+    element._originalTop    = top  - parseFloat(element.style.top || 0);
+    element._originalWidth  = element.style.width;
+    element._originalHeight = element.style.height;
+
+    element.style.position = 'absolute';
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.width  = width + 'px';
+    element.style.height = height + 'px';
+    return element;
+  },
+
+  relativize: function(element) {
+    element = $(element);
+    if (Element.getStyle(element, 'position') == 'relative') return element;
+
+    element.style.position = 'relative';
+    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
+    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
+
+    element.style.top    = top + 'px';
+    element.style.left   = left + 'px';
+    element.style.height = element._originalHeight;
+    element.style.width  = element._originalWidth;
+    return element;
+  },
+
+  cumulativeScrollOffset: function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.scrollTop  || 0;
+      valueL += element.scrollLeft || 0;
+      element = element.parentNode;
+    } while (element);
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  getOffsetParent: function(element) {
+    if (element.offsetParent) return $(element.offsetParent);
+    if (element == document.body) return $(element);
+
+    while ((element = element.parentNode) && element != document.body)
+      if (Element.getStyle(element, 'position') != 'static')
+        return $(element);
+
+    return $(document.body);
+  },
+
+  viewportOffset: function(forElement) {
+    var valueT = 0, valueL = 0;
+
+    var element = forElement;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+
+      if (element.offsetParent == document.body &&
+        Element.getStyle(element, 'position') == 'absolute') break;
+
+    } while (element = element.offsetParent);
+
+    element = forElement;
+    do {
+      if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
+        valueT -= element.scrollTop  || 0;
+        valueL -= element.scrollLeft || 0;
+      }
+    } while (element = element.parentNode);
+
+    return Element._returnOffset(valueL, valueT);
+  },
+
+  clonePosition: function(element, source) {
+    var options = Object.extend({
+      setLeft:    true,
+      setTop:     true,
+      setWidth:   true,
+      setHeight:  true,
+      offsetTop:  0,
+      offsetLeft: 0
+    }, arguments[2] || { });
+
+    source = $(source);
+    var p = Element.viewportOffset(source);
+
+    element = $(element);
+    var delta = [0, 0];
+    var parent = null;
+    if (Element.getStyle(element, 'position') == 'absolute') {
+      parent = Element.getOffsetParent(element);
+      delta = Element.viewportOffset(parent);
+    }
+
+    if (parent == document.body) {
+      delta[0] -= document.body.offsetLeft;
+      delta[1] -= document.body.offsetTop;
+    }
+
+    if (options.setLeft)   element.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
+    if (options.setTop)    element.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
+    if (options.setWidth)  element.style.width = source.offsetWidth + 'px';
+    if (options.setHeight) element.style.height = source.offsetHeight + 'px';
+    return element;
+  }
+};
+
+Object.extend(Element.Methods, {
+  getElementsBySelector: Element.Methods.select,
+
+  childElements: Element.Methods.immediateDescendants
+});
+
+Element._attributeTranslations = {
+  write: {
+    names: {
+      className: 'class',
+      htmlFor:   'for'
+    },
+    values: { }
+  }
+};
+
+if (Prototype.Browser.Opera) {
+  Element.Methods.getStyle = Element.Methods.getStyle.wrap(
+    function(proceed, element, style) {
+      switch (style) {
+        case 'left': case 'top': case 'right': case 'bottom':
+          if (proceed(element, 'position') === 'static') return null;
+        case 'height': case 'width':
+          if (!Element.visible(element)) return null;
+
+          var dim = parseInt(proceed(element, style), 10);
+
+          if (dim !== element['offset' + style.capitalize()])
+            return dim + 'px';
+
+          var properties;
+          if (style === 'height') {
+            properties = ['border-top-width', 'padding-top',
+             'padding-bottom', 'border-bottom-width'];
+          }
+          else {
+            properties = ['border-left-width', 'padding-left',
+             'padding-right', 'border-right-width'];
+          }
+          return properties.inject(dim, function(memo, property) {
+            var val = proceed(element, property);
+            return val === null ? memo : memo - parseInt(val, 10);
+          }) + 'px';
+        default: return proceed(element, style);
+      }
+    }
+  );
+
+  Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
+    function(proceed, element, attribute) {
+      if (attribute === 'title') return element.title;
+      return proceed(element, attribute);
+    }
+  );
+}
+
+else if (Prototype.Browser.IE) {
+  Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
+    function(proceed, element) {
+      element = $(element);
+      try { element.offsetParent }
+      catch(e) { return $(document.body) }
+      var position = element.getStyle('position');
+      if (position !== 'static') return proceed(element);
+      element.setStyle({ position: 'relative' });
+      var value = proceed(element);
+      element.setStyle({ position: position });
+      return value;
+    }
+  );
+
+  $w('positionedOffset viewportOffset').each(function(method) {
+    Element.Methods[method] = Element.Methods[method].wrap(
+      function(proceed, element) {
+        element = $(element);
+        try { element.offsetParent }
+        catch(e) { return Element._returnOffset(0,0) }
+        var position = element.getStyle('position');
+        if (position !== 'static') return proceed(element);
+        var offsetParent = element.getOffsetParent();
+        if (offsetParent && offsetParent.getStyle('position') === 'fixed')
+          offsetParent.setStyle({ zoom: 1 });
+        element.setStyle({ position: 'relative' });
+        var value = proceed(element);
+        element.setStyle({ position: position });
+        return value;
+      }
+    );
+  });
+
+  Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
+    function(proceed, element) {
+      try { element.offsetParent }
+      catch(e) { return Element._returnOffset(0,0) }
+      return proceed(element);
+    }
+  );
+
+  Element.Methods.getStyle = function(element, style) {
+    element = $(element);
+    style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
+    var value = element.style[style];
+    if (!value && element.currentStyle) value = element.currentStyle[style];
+
+    if (style == 'opacity') {
+      if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
+        if (value[1]) return parseFloat(value[1]) / 100;
+      return 1.0;
+    }
+
+    if (value == 'auto') {
+      if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
+        return element['offset' + style.capitalize()] + 'px';
+      return null;
+    }
+    return value;
+  };
+
+  Element.Methods.setOpacity = function(element, value) {
+    function stripAlpha(filter){
+      return filter.replace(/alpha\([^\)]*\)/gi,'');
+    }
+    element = $(element);
+    var currentStyle = element.currentStyle;
+    if ((currentStyle && !currentStyle.hasLayout) ||
+      (!currentStyle && element.style.zoom == 'normal'))
+        element.style.zoom = 1;
+
+    var filter = element.getStyle('filter'), style = element.style;
+    if (value == 1 || value === '') {
+      (filter = stripAlpha(filter)) ?
+        style.filter = filter : style.removeAttribute('filter');
+      return element;
+    } else if (value < 0.00001) value = 0;
+    style.filter = stripAlpha(filter) +
+      'alpha(opacity=' + (value * 100) + ')';
+    return element;
+  };
+
+  Element._attributeTranslations = (function(){
+
+    var classProp = 'className';
+    var forProp = 'for';
+
+    var el = document.createElement('div');
+
+    el.setAttribute(classProp, 'x');
+
+    if (el.className !== 'x') {
+      el.setAttribute('class', 'x');
+      if (el.className === 'x') {
+        classProp = 'class';
+      }
+    }
+    el = null;
+
+    el = document.createElement('label');
+    el.setAttribute(forProp, 'x');
+    if (el.htmlFor !== 'x') {
+      el.setAttribute('htmlFor', 'x');
+      if (el.htmlFor === 'x') {
+        forProp = 'htmlFor';
+      }
+    }
+    el = null;
+
+    return {
+      read: {
+        names: {
+          'class':      classProp,
+          'className':  classProp,
+          'for':        forProp,
+          'htmlFor':    forProp
+        },
+        values: {
+          _getAttr: function(element, attribute) {
+            return element.getAttribute(attribute);
+          },
+          _getAttr2: function(element, attribute) {
+            return element.getAttribute(attribute, 2);
+          },
+          _getAttrNode: function(element, attribute) {
+            var node = element.getAttributeNode(attribute);
+            return node ? node.value : "";
+          },
+          _getEv: (function(){
+
+            var el = document.createElement('div');
+            el.onclick = Prototype.emptyFunction;
+            var value = el.getAttribute('onclick');
+            var f;
+
+            if (String(value).indexOf('{') > -1) {
+              f = function(element, attribute) {
+                attribute = element.getAttribute(attribute);
+                if (!attribute) return null;
+                attribute = attribute.toString();
+                attribute = attribute.split('{')[1];
+                attribute = attribute.split('}')[0];
+                return attribute.strip();
+              };
+            }
+            else if (value === '') {
+              f = function(element, attribute) {
+                attribute = element.getAttribute(attribute);
+                if (!attribute) return null;
+                return attribute.strip();
+              };
+            }
+            el = null;
+            return f;
+          })(),
+          _flag: function(element, attribute) {
+            return $(element).hasAttribute(attribute) ? attribute : null;
+          },
+          style: function(element) {
+            return element.style.cssText.toLowerCase();
+          },
+          title: function(element) {
+            return element.title;
+          }
+        }
+      }
+    }
+  })();
+
+  Element._attributeTranslations.write = {
+    names: Object.extend({
+      cellpadding: 'cellPadding',
+      cellspacing: 'cellSpacing'
+    }, Element._attributeTranslations.read.names),
+    values: {
+      checked: function(element, value) {
+        element.checked = !!value;
+      },
+
+      style: function(element, value) {
+        element.style.cssText = value ? value : '';
+      }
+    }
+  };
+
+  Element._attributeTranslations.has = {};
+
+  $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
+      'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
+    Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
+    Element._attributeTranslations.has[attr.toLowerCase()] = attr;
+  });
+
+  (function(v) {
+    Object.extend(v, {
+      href:        v._getAttr2,
+      src:         v._getAttr2,
+      type:        v._getAttr,
+      action:      v._getAttrNode,
+      disabled:    v._flag,
+      checked:     v._flag,
+      readonly:    v._flag,
+      multiple:    v._flag,
+      onload:      v._getEv,
+      onunload:    v._getEv,
+      onclick:     v._getEv,
+      ondblclick:  v._getEv,
+      onmousedown: v._getEv,
+      onmouseup:   v._getEv,
+      onmouseover: v._getEv,
+      onmousemove: v._getEv,
+      onmouseout:  v._getEv,
+      onfocus:     v._getEv,
+      onblur:      v._getEv,
+      onkeypress:  v._getEv,
+      onkeydown:   v._getEv,
+      onkeyup:     v._getEv,
+      onsubmit:    v._getEv,
+      onreset:     v._getEv,
+      onselect:    v._getEv,
+      onchange:    v._getEv
+    });
+  })(Element._attributeTranslations.read.values);
+
+  if (Prototype.BrowserFeatures.ElementExtensions) {
+    (function() {
+      function _descendants(element) {
+        var nodes = element.getElementsByTagName('*'), results = [];
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node.tagName !== "!") // Filter out comment nodes.
+            results.push(node);
+        return results;
+      }
+
+      Element.Methods.down = function(element, expression, index) {
+        element = $(element);
+        if (arguments.length == 1) return element.firstDescendant();
+        return Object.isNumber(expression) ? _descendants(element)[expression] :
+          Element.select(element, expression)[index || 0];
+      }
+    })();
+  }
+
+}
+
+else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
+  Element.Methods.setOpacity = function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1) ? 0.999999 :
+      (value === '') ? '' : (value < 0.00001) ? 0 : value;
+    return element;
+  };
+}
+
+else if (Prototype.Browser.WebKit) {
+  Element.Methods.setOpacity = function(element, value) {
+    element = $(element);
+    element.style.opacity = (value == 1 || value === '') ? '' :
+      (value < 0.00001) ? 0 : value;
+
+    if (value == 1)
+      if(element.tagName.toUpperCase() == 'IMG' && element.width) {
+        element.width++; element.width--;
+      } else try {
+        var n = document.createTextNode(' ');
+        element.appendChild(n);
+        element.removeChild(n);
+      } catch (e) { }
+
+    return element;
+  };
+
+  Element.Methods.cumulativeOffset = function(element) {
+    var valueT = 0, valueL = 0;
+    do {
+      valueT += element.offsetTop  || 0;
+      valueL += element.offsetLeft || 0;
+      if (element.offsetParent == document.body)
+        if (Element.getStyle(element, 'position') == 'absolute') break;
+
+      element = element.offsetParent;
+    } while (element);
+
+    return Element._returnOffset(valueL, valueT);
+  };
+}
+
+if ('outerHTML' in document.documentElement) {
+  Element.Methods.replace = function(element, content) {
+    element = $(element);
+
+    if (content && content.toElement) content = content.toElement();
+    if (Object.isElement(content)) {
+      element.parentNode.replaceChild(content, element);
+      return element;
+    }
+
+    content = Object.toHTML(content);
+    var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
+
+    if (Element._insertionTranslations.tags[tagName]) {
+      var nextSibling = element.next();
+      var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
+      parent.removeChild(element);
+      if (nextSibling)
+        fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
+      else
+        fragments.each(function(node) { parent.appendChild(node) });
+    }
+    else element.outerHTML = content.stripScripts();
+
+    content.evalScripts.bind(content).defer();
+    return element;
+  };
+}
+
+Element._returnOffset = function(l, t) {
+  var result = [l, t];
+  result.left = l;
+  result.top = t;
+  return result;
+};
+
+Element._getContentFromAnonymousElement = function(tagName, html) {
+  var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
+  if (t) {
+    div.innerHTML = t[0] + html + t[1];
+    t[2].times(function() { div = div.firstChild });
+  } else div.innerHTML = html;
+  return $A(div.childNodes);
+};
+
+Element._insertionTranslations = {
+  before: function(element, node) {
+    element.parentNode.insertBefore(node, element);
+  },
+  top: function(element, node) {
+    element.insertBefore(node, element.firstChild);
+  },
+  bottom: function(element, node) {
+    element.appendChild(node);
+  },
+  after: function(element, node) {
+    element.parentNode.insertBefore(node, element.nextSibling);
+  },
+  tags: {
+    TABLE:  ['<table>',                '</table>',                   1],
+    TBODY:  ['<table><tbody>',         '</tbody></table>',           2],
+    TR:     ['<table><tbody><tr>',     '</tr></tbody></table>',      3],
+    TD:     ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
+    SELECT: ['<select>',               '</select>',                  1]
+  }
+};
+
+(function() {
+  var tags = Element._insertionTranslations.tags;
+  Object.extend(tags, {
+    THEAD: tags.TBODY,
+    TFOOT: tags.TBODY,
+    TH:    tags.TD
+  });
+})();
+
+Element.Methods.Simulated = {
+  hasAttribute: function(element, attribute) {
+    attribute = Element._attributeTranslations.has[attribute] || attribute;
+    var node = $(element).getAttributeNode(attribute);
+    return !!(node && node.specified);
+  }
+};
+
+Element.Methods.ByTag = { };
+
+Object.extend(Element, Element.Methods);
+
+(function(div) {
+
+  if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) {
+    window.HTMLElement = { };
+    window.HTMLElement.prototype = div['__proto__'];
+    Prototype.BrowserFeatures.ElementExtensions = true;
+  }
+
+  div = null;
+
+})(document.createElement('div'))
+
+Element.extend = (function() {
+
+  function checkDeficiency(tagName) {
+    if (typeof window.Element != 'undefined') {
+      var proto = window.Element.prototype;
+      if (proto) {
+        var id = '_' + (Math.random()+'').slice(2);
+        var el = document.createElement(tagName);
+        proto[id] = 'x';
+        var isBuggy = (el[id] !== 'x');
+        delete proto[id];
+        el = null;
+        return isBuggy;
+      }
+    }
+    return false;
+  }
+
+  function extendElementWith(element, methods) {
+    for (var property in methods) {
+      var value = methods[property];
+      if (Object.isFunction(value) && !(property in element))
+        element[property] = value.methodize();
+    }
+  }
+
+  var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object');
+
+  if (Prototype.BrowserFeatures.SpecificElementExtensions) {
+    if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) {
+      return function(element) {
+        if (element && typeof element._extendedByPrototype == 'undefined') {
+          var t = element.tagName;
+          if (t && (/^(?:object|applet|embed)$/i.test(t))) {
+            extendElementWith(element, Element.Methods);
+            extendElementWith(element, Element.Methods.Simulated);
+            extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]);
+          }
+        }
+        return element;
+      }
+    }
+    return Prototype.K;
+  }
+
+  var Methods = { }, ByTag = Element.Methods.ByTag;
+
+  var extend = Object.extend(function(element) {
+    if (!element || typeof element._extendedByPrototype != 'undefined' ||
+        element.nodeType != 1 || element == window) return element;
+
+    var methods = Object.clone(Methods),
+        tagName = element.tagName.toUpperCase();
+
+    if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
+
+    extendElementWith(element, methods);
+
+    element._extendedByPrototype = Prototype.emptyFunction;
+    return element;
+
+  }, {
+    refresh: function() {
+      if (!Prototype.BrowserFeatures.ElementExtensions) {
+        Object.extend(Methods, Element.Methods);
+        Object.extend(Methods, Element.Methods.Simulated);
+      }
+    }
+  });
+
+  extend.refresh();
+  return extend;
+})();
+
+Element.hasAttribute = function(element, attribute) {
+  if (element.hasAttribute) return element.hasAttribute(attribute);
+  return Element.Methods.Simulated.hasAttribute(element, attribute);
+};
+
+Element.addMethods = function(methods) {
+  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
+
+  if (!methods) {
+    Object.extend(Form, Form.Methods);
+    Object.extend(Form.Element, Form.Element.Methods);
+    Object.extend(Element.Methods.ByTag, {
+      "FORM":     Object.clone(Form.Methods),
+      "INPUT":    Object.clone(Form.Element.Methods),
+      "SELECT":   Object.clone(Form.Element.Methods),
+      "TEXTAREA": Object.clone(Form.Element.Methods)
+    });
+  }
+
+  if (arguments.length == 2) {
+    var tagName = methods;
+    methods = arguments[1];
+  }
+
+  if (!tagName) Object.extend(Element.Methods, methods || { });
+  else {
+    if (Object.isArray(tagName)) tagName.each(extend);
+    else extend(tagName);
+  }
+
+  function extend(tagName) {
+    tagName = tagName.toUpperCase();
+    if (!Element.Methods.ByTag[tagName])
+      Element.Methods.ByTag[tagName] = { };
+    Object.extend(Element.Methods.ByTag[tagName], methods);
+  }
+
+  function copy(methods, destination, onlyIfAbsent) {
+    onlyIfAbsent = onlyIfAbsent || false;
+    for (var property in methods) {
+      var value = methods[property];
+      if (!Object.isFunction(value)) continue;
+      if (!onlyIfAbsent || !(property in destination))
+        destination[property] = value.methodize();
+    }
+  }
+
+  function findDOMClass(tagName) {
+    var klass;
+    var trans = {
+      "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
+      "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
+      "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
+      "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
+      "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
+      "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
+      "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
+      "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
+      "FrameSet", "IFRAME": "IFrame"
+    };
+    if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
+    if (window[klass]) return window[klass];
+    klass = 'HTML' + tagName + 'Element';
+    if (window[klass]) return window[klass];
+    klass = 'HTML' + tagName.capitalize() + 'Element';
+    if (window[klass]) return window[klass];
+
+    var element = document.createElement(tagName);
+    var proto = element['__proto__'] || element.constructor.prototype;
+    element = null;
+    return proto;
+  }
+
+  var elementPrototype = window.HTMLElement ? HTMLElement.prototype :
+   Element.prototype;
+
+  if (F.ElementExtensions) {
+    copy(Element.Methods, elementPrototype);
+    copy(Element.Methods.Simulated, elementPrototype, true);
+  }
+
+  if (F.SpecificElementExtensions) {
+    for (var tag in Element.Methods.ByTag) {
+      var klass = findDOMClass(tag);
+      if (Object.isUndefined(klass)) continue;
+      copy(T[tag], klass.prototype);
+    }
+  }
+
+  Object.extend(Element, Element.Methods);
+  delete Element.ByTag;
+
+  if (Element.extend.refresh) Element.extend.refresh();
+  Element.cache = { };
+};
+
+
+document.viewport = {
+
+  getDimensions: function() {
+    return { width: this.getWidth(), height: this.getHeight() };
+  },
+
+  getScrollOffsets: function() {
+    return Element._returnOffset(
+      window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
+      window.pageYOffset || document.documentElement.scrollTop  || document.body.scrollTop);
+  }
+};
+
+(function(viewport) {
+  var B = Prototype.Browser, doc = document, element, property = {};
+
+  function getRootElement() {
+    if (B.WebKit && !doc.evaluate)
+      return document;
+
+    if (B.Opera && window.parseFloat(window.opera.version()) < 9.5)
+      return document.body;
+
+    return document.documentElement;
+  }
+
+  function define(D) {
+    if (!element) element = getRootElement();
+
+    property[D] = 'client' + D;
+
+    viewport['get' + D] = function() { return element[property[D]] };
+    return viewport['get' + D]();
+  }
+
+  viewport.getWidth  = define.curry('Width');
+
+  viewport.getHeight = define.curry('Height');
+})(document.viewport);
+
+
+Element.Storage = {
+  UID: 1
+};
+
+Element.addMethods({
+  getStorage: function(element) {
+    if (!(element = $(element))) return;
+
+    var uid;
+    if (element === window) {
+      uid = 0;
+    } else {
+      if (typeof element._prototypeUID === "undefined")
+        element._prototypeUID = [Element.Storage.UID++];
+      uid = element._prototypeUID[0];
+    }
+
+    if (!Element.Storage[uid])
+      Element.Storage[uid] = $H();
+
+    return Element.Storage[uid];
+  },
+
+  store: function(element, key, value) {
+    if (!(element = $(element))) return;
+
+    if (arguments.length === 2) {
+      Element.getStorage(element).update(key);
+    } else {
+      Element.getStorage(element).set(key, value);
+    }
+
+    return element;
+  },
+
+  retrieve: function(element, key, defaultValue) {
+    if (!(element = $(element))) return;
+    var hash = Element.getStorage(element), value = hash.get(key);
+
+    if (Object.isUndefined(value)) {
+      hash.set(key, defaultValue);
+      value = defaultValue;
+    }
+
+    return value;
+  },
+
+  clone: function(element, deep) {
+    if (!(element = $(element))) return;
+    var clone = element.cloneNode(deep);
+    clone._prototypeUID = void 0;
+    if (deep) {
+      var descendants = Element.select(clone, '*'),
+          i = descendants.length;
+      while (i--) {
+        descendants[i]._prototypeUID = void 0;
+      }
+    }
+    return Element.extend(clone);
+  }
+});
+/* Portions of the Selector class are derived from Jack Slocum's DomQuery,
+ * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
+ * license.  Please see http://www.yui-ext.com/ for more information. */
+
+var Selector = Class.create({
+  initialize: function(expression) {
+    this.expression = expression.strip();
+
+    if (this.shouldUseSelectorsAPI()) {
+      this.mode = 'selectorsAPI';
+    } else if (this.shouldUseXPath()) {
+      this.mode = 'xpath';
+      this.compileXPathMatcher();
+    } else {
+      this.mode = "normal";
+      this.compileMatcher();
+    }
+
+  },
+
+  shouldUseXPath: (function() {
+
+    var IS_DESCENDANT_SELECTOR_BUGGY = (function(){
+      var isBuggy = false;
+      if (document.evaluate && window.XPathResult) {
+        var el = document.createElement('div');
+        el.innerHTML = '<ul><li></li></ul><div><ul><li></li></ul></div>';
+
+        var xpath = ".//*[local-name()='ul' or local-name()='UL']" +
+          "//*[local-name()='li' or local-name()='LI']";
+
+        var result = document.evaluate(xpath, el, null,
+          XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
+
+        isBuggy = (result.snapshotLength !== 2);
+        el = null;
+      }
+      return isBuggy;
+    })();
+
+    return function() {
+      if (!Prototype.BrowserFeatures.XPath) return false;
+
+      var e = this.expression;
+
+      if (Prototype.Browser.WebKit &&
+       (e.include("-of-type") || e.include(":empty")))
+        return false;
+
+      if ((/(\[[\w-]*?:|:checked)/).test(e))
+        return false;
+
+      if (IS_DESCENDANT_SELECTOR_BUGGY) return false;
+
+      return true;
+    }
+
+  })(),
+
+  shouldUseSelectorsAPI: function() {
+    if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
+
+    if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false;
+
+    if (!Selector._div) Selector._div = new Element('div');
+
+    try {
+      Selector._div.querySelector(this.expression);
+    } catch(e) {
+      return false;
+    }
+
+    return true;
+  },
+
+  compileMatcher: function() {
+    var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
+        c = Selector.criteria, le, p, m, len = ps.length, name;
+
+    if (Selector._cache[e]) {
+      this.matcher = Selector._cache[e];
+      return;
+    }
+
+    this.matcher = ["this.matcher = function(root) {",
+                    "var r = root, h = Selector.handlers, c = false, n;"];
+
+    while (e && le != e && (/\S/).test(e)) {
+      le = e;
+      for (var i = 0; i<len; i++) {
+        p = ps[i].re;
+        name = ps[i].name;
+        if (m = e.match(p)) {
+          this.matcher.push(Object.isFunction(c[name]) ? c[name](m) :
+            new Template(c[name]).evaluate(m));
+          e = e.replace(m[0], '');
+          break;
+        }
+      }
+    }
+
+    this.matcher.push("return h.unique(n);\n}");
+    eval(this.matcher.join('\n'));
+    Selector._cache[this.expression] = this.matcher;
+  },
+
+  compileXPathMatcher: function() {
+    var e = this.expression, ps = Selector.patterns,
+        x = Selector.xpath, le, m, len = ps.length, name;
+
+    if (Selector._cache[e]) {
+      this.xpath = Selector._cache[e]; return;
+    }
+
+    this.matcher = ['.//*'];
+    while (e && le != e && (/\S/).test(e)) {
+      le = e;
+      for (var i = 0; i<len; i++) {
+        name = ps[i].name;
+        if (m = e.match(ps[i].re)) {
+          this.matcher.push(Object.isFunction(x[name]) ? x[name](m) :
+            new Template(x[name]).evaluate(m));
+          e = e.replace(m[0], '');
+          break;
+        }
+      }
+    }
+
+    this.xpath = this.matcher.join('');
+    Selector._cache[this.expression] = this.xpath;
+  },
+
+  findElements: function(root) {
+    root = root || document;
+    var e = this.expression, results;
+
+    switch (this.mode) {
+      case 'selectorsAPI':
+        if (root !== document) {
+          var oldId = root.id, id = $(root).identify();
+          id = id.replace(/([\.:])/g, "\\$1");
+          e = "#" + id + " " + e;
+        }
+
+        results = $A(root.querySelectorAll(e)).map(Element.extend);
+        root.id = oldId;
+
+        return results;
+      case 'xpath':
+        return document._getElementsByXPath(this.xpath, root);
+      default:
+       return this.matcher(root);
+    }
+  },
+
+  match: function(element) {
+    this.tokens = [];
+
+    var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
+    var le, p, m, len = ps.length, name;
+
+    while (e && le !== e && (/\S/).test(e)) {
+      le = e;
+      for (var i = 0; i<len; i++) {
+        p = ps[i].re;
+        name = ps[i].name;
+        if (m = e.match(p)) {
+          if (as[name]) {
+            this.tokens.push([name, Object.clone(m)]);
+            e = e.replace(m[0], '');
+          } else {
+            return this.findElements(document).include(element);
+          }
+        }
+      }
+    }
+
+    var match = true, name, matches;
+    for (var i = 0, token; token = this.tokens[i]; i++) {
+      name = token[0], matches = token[1];
+      if (!Selector.assertions[name](element, matches)) {
+        match = false; break;
+      }
+    }
+
+    return match;
+  },
+
+  toString: function() {
+    return this.expression;
+  },
+
+  inspect: function() {
+    return "#<Selector:" + this.expression.inspect() + ">";
+  }
+});
+
+if (Prototype.BrowserFeatures.SelectorsAPI &&
+ document.compatMode === 'BackCompat') {
+  Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){
+    var div = document.createElement('div'),
+     span = document.createElement('span');
+
+    div.id = "prototype_test_id";
+    span.className = 'Test';
+    div.appendChild(span);
+    var isIgnored = (div.querySelector('#prototype_test_id .test') !== null);
+    div = span = null;
+    return isIgnored;
+  })();
+}
+
+Object.extend(Selector, {
+  _cache: { },
+
+  xpath: {
+    descendant:   "//*",
+    child:        "/*",
+    adjacent:     "/following-sibling::*[1]",
+    laterSibling: '/following-sibling::*',
+    tagName:      function(m) {
+      if (m[1] == '*') return '';
+      return "[local-name()='" + m[1].toLowerCase() +
+             "' or local-name()='" + m[1].toUpperCase() + "']";
+    },
+    className:    "[contains(concat(' ', @class, ' '), ' #{1} ')]",
+    id:           "[@id='#{1}']",
+    attrPresence: function(m) {
+      m[1] = m[1].toLowerCase();
+      return new Template("[@#{1}]").evaluate(m);
+    },
+    attr: function(m) {
+      m[1] = m[1].toLowerCase();
+      m[3] = m[5] || m[6];
+      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
+    },
+    pseudo: function(m) {
+      var h = Selector.xpath.pseudos[m[1]];
+      if (!h) return '';
+      if (Object.isFunction(h)) return h(m);
+      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
+    },
+    operators: {
+      '=':  "[@#{1}='#{3}']",
+      '!=': "[@#{1}!='#{3}']",
+      '^=': "[starts-with(@#{1}, '#{3}')]",
+      '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
+      '*=': "[contains(@#{1}, '#{3}')]",
+      '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
+      '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
+    },
+    pseudos: {
+      'first-child': '[not(preceding-sibling::*)]',
+      'last-child':  '[not(following-sibling::*)]',
+      'only-child':  '[not(preceding-sibling::* or following-sibling::*)]',
+      'empty':       "[count(*) = 0 and (count(text()) = 0)]",
+      'checked':     "[@checked]",
+      'disabled':    "[(@disabled) and (@type!='hidden')]",
+      'enabled':     "[not(@disabled) and (@type!='hidden')]",
+      'not': function(m) {
+        var e = m[6], p = Selector.patterns,
+            x = Selector.xpath, le, v, len = p.length, name;
+
+        var exclusion = [];
+        while (e && le != e && (/\S/).test(e)) {
+          le = e;
+          for (var i = 0; i<len; i++) {
+            name = p[i].name
+            if (m = e.match(p[i].re)) {
+              v = Object.isFunction(x[name]) ? x[name](m) : new Template(x[name]).evaluate(m);
+              exclusion.push("(" + v.substring(1, v.length - 1) + ")");
+              e = e.replace(m[0], '');
+              break;
+            }
+          }
+        }
+        return "[not(" + exclusion.join(" and ") + ")]";
+      },
+      'nth-child':      function(m) {
+        return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
+      },
+      'nth-last-child': function(m) {
+        return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
+      },
+      'nth-of-type':    function(m) {
+        return Selector.xpath.pseudos.nth("position() ", m);
+      },
+      'nth-last-of-type': function(m) {
+        return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
+      },
+      'first-of-type':  function(m) {
+        m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
+      },
+      'last-of-type':   function(m) {
+        m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
+      },
+      'only-of-type':   function(m) {
+        var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
+      },
+      nth: function(fragment, m) {
+        var mm, formula = m[6], predicate;
+        if (formula == 'even') formula = '2n+0';
+        if (formula == 'odd')  formula = '2n+1';
+        if (mm = formula.match(/^(\d+)$/)) // digit only
+          return '[' + fragment + "= " + mm[1] + ']';
+        if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+          if (mm[1] == "-") mm[1] = -1;
+          var a = mm[1] ? Number(mm[1]) : 1;
+          var b = mm[2] ? Number(mm[2]) : 0;
+          predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
+          "((#{fragment} - #{b}) div #{a} >= 0)]";
+          return new Template(predicate).evaluate({
+            fragment: fragment, a: a, b: b });
+        }
+      }
+    }
+  },
+
+  criteria: {
+    tagName:      'n = h.tagName(n, r, "#{1}", c);      c = false;',
+    className:    'n = h.className(n, r, "#{1}", c);    c = false;',
+    id:           'n = h.id(n, r, "#{1}", c);           c = false;',
+    attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
+    attr: function(m) {
+      m[3] = (m[5] || m[6]);
+      return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
+    },
+    pseudo: function(m) {
+      if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
+      return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
+    },
+    descendant:   'c = "descendant";',
+    child:        'c = "child";',
+    adjacent:     'c = "adjacent";',
+    laterSibling: 'c = "laterSibling";'
+  },
+
+  patterns: [
+    { name: 'laterSibling', re: /^\s*~\s*/ },
+    { name: 'child',        re: /^\s*>\s*/ },
+    { name: 'adjacent',     re: /^\s*\+\s*/ },
+    { name: 'descendant',   re: /^\s/ },
+
+    { name: 'tagName',      re: /^\s*(\*|[\w\-]+)(\b|$)?/ },
+    { name: 'id',           re: /^#([\w\-\*]+)(\b|$)/ },
+    { name: 'className',    re: /^\.([\w\-\*]+)(\b|$)/ },
+    { name: 'pseudo',       re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ },
+    { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ },
+    { name: 'attr',         re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ }
+  ],
+
+  assertions: {
+    tagName: function(element, matches) {
+      return matches[1].toUpperCase() == element.tagName.toUpperCase();
+    },
+
+    className: function(element, matches) {
+      return Element.hasClassName(element, matches[1]);
+    },
+
+    id: function(element, matches) {
+      return element.id === matches[1];
+    },
+
+    attrPresence: function(element, matches) {
+      return Element.hasAttribute(element, matches[1]);
+    },
+
+    attr: function(element, matches) {
+      var nodeValue = Element.readAttribute(element, matches[1]);
+      return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
+    }
+  },
+
+  handlers: {
+    concat: function(a, b) {
+      for (var i = 0, node; node = b[i]; i++)
+        a.push(node);
+      return a;
+    },
+
+    mark: function(nodes) {
+      var _true = Prototype.emptyFunction;
+      for (var i = 0, node; node = nodes[i]; i++)
+        node._countedByPrototype = _true;
+      return nodes;
+    },
+
+    unmark: (function(){
+
+      var PROPERTIES_ATTRIBUTES_MAP = (function(){
+        var el = document.createElement('div'),
+            isBuggy = false,
+            propName = '_countedByPrototype',
+            value = 'x'
+        el[propName] = value;
+        isBuggy = (el.getAttribute(propName) === value);
+        el = null;
+        return isBuggy;
+      })();
+
+      return PROPERTIES_ATTRIBUTES_MAP ?
+        function(nodes) {
+          for (var i = 0, node; node = nodes[i]; i++)
+            node.removeAttribute('_countedByPrototype');
+          return nodes;
+        } :
+        function(nodes) {
+          for (var i = 0, node; node = nodes[i]; i++)
+            node._countedByPrototype = void 0;
+          return nodes;
+        }
+    })(),
+
+    index: function(parentNode, reverse, ofType) {
+      parentNode._countedByPrototype = Prototype.emptyFunction;
+      if (reverse) {
+        for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
+          var node = nodes[i];
+          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+        }
+      } else {
+        for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
+          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
+      }
+    },
+
+    unique: function(nodes) {
+      if (nodes.length == 0) return nodes;
+      var results = [], n;
+      for (var i = 0, l = nodes.length; i < l; i++)
+        if (typeof (n = nodes[i])._countedByPrototype == 'undefined') {
+          n._countedByPrototype = Prototype.emptyFunction;
+          results.push(Element.extend(n));
+        }
+      return Selector.handlers.unmark(results);
+    },
+
+    descendant: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        h.concat(results, node.getElementsByTagName('*'));
+      return results;
+    },
+
+    child: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        for (var j = 0, child; child = node.childNodes[j]; j++)
+          if (child.nodeType == 1 && child.tagName != '!') results.push(child);
+      }
+      return results;
+    },
+
+    adjacent: function(nodes) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        var next = this.nextElementSibling(node);
+        if (next) results.push(next);
+      }
+      return results;
+    },
+
+    laterSibling: function(nodes) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        h.concat(results, Element.nextSiblings(node));
+      return results;
+    },
+
+    nextElementSibling: function(node) {
+      while (node = node.nextSibling)
+        if (node.nodeType == 1) return node;
+      return null;
+    },
+
+    previousElementSibling: function(node) {
+      while (node = node.previousSibling)
+        if (node.nodeType == 1) return node;
+      return null;
+    },
+
+    tagName: function(nodes, root, tagName, combinator) {
+      var uTagName = tagName.toUpperCase();
+      var results = [], h = Selector.handlers;
+      if (nodes) {
+        if (combinator) {
+          if (combinator == "descendant") {
+            for (var i = 0, node; node = nodes[i]; i++)
+              h.concat(results, node.getElementsByTagName(tagName));
+            return results;
+          } else nodes = this[combinator](nodes);
+          if (tagName == "*") return nodes;
+        }
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node.tagName.toUpperCase() === uTagName) results.push(node);
+        return results;
+      } else return root.getElementsByTagName(tagName);
+    },
+
+    id: function(nodes, root, id, combinator) {
+      var targetNode = $(id), h = Selector.handlers;
+
+      if (root == document) {
+        if (!targetNode) return [];
+        if (!nodes) return [targetNode];
+      } else {
+        if (!root.sourceIndex || root.sourceIndex < 1) {
+          var nodes = root.getElementsByTagName('*');
+          for (var j = 0, node; node = nodes[j]; j++) {
+            if (node.id === id) return [node];
+          }
+        }
+      }
+
+      if (nodes) {
+        if (combinator) {
+          if (combinator == 'child') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (targetNode.parentNode == node) return [targetNode];
+          } else if (combinator == 'descendant') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (Element.descendantOf(targetNode, node)) return [targetNode];
+          } else if (combinator == 'adjacent') {
+            for (var i = 0, node; node = nodes[i]; i++)
+              if (Selector.handlers.previousElementSibling(targetNode) == node)
+                return [targetNode];
+          } else nodes = h[combinator](nodes);
+        }
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node == targetNode) return [targetNode];
+        return [];
+      }
+      return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
+    },
+
+    className: function(nodes, root, className, combinator) {
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      return Selector.handlers.byClassName(nodes, root, className);
+    },
+
+    byClassName: function(nodes, root, className) {
+      if (!nodes) nodes = Selector.handlers.descendant([root]);
+      var needle = ' ' + className + ' ';
+      for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
+        nodeClassName = node.className;
+        if (nodeClassName.length == 0) continue;
+        if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
+          results.push(node);
+      }
+      return results;
+    },
+
+    attrPresence: function(nodes, root, attr, combinator) {
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      var results = [];
+      for (var i = 0, node; node = nodes[i]; i++)
+        if (Element.hasAttribute(node, attr)) results.push(node);
+      return results;
+    },
+
+    attr: function(nodes, root, attr, value, operator, combinator) {
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      var handler = Selector.operators[operator], results = [];
+      for (var i = 0, node; node = nodes[i]; i++) {
+        var nodeValue = Element.readAttribute(node, attr);
+        if (nodeValue === null) continue;
+        if (handler(nodeValue, value)) results.push(node);
+      }
+      return results;
+    },
+
+    pseudo: function(nodes, name, value, root, combinator) {
+      if (nodes && combinator) nodes = this[combinator](nodes);
+      if (!nodes) nodes = root.getElementsByTagName("*");
+      return Selector.pseudos[name](nodes, value, root);
+    }
+  },
+
+  pseudos: {
+    'first-child': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        if (Selector.handlers.previousElementSibling(node)) continue;
+          results.push(node);
+      }
+      return results;
+    },
+    'last-child': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        if (Selector.handlers.nextElementSibling(node)) continue;
+          results.push(node);
+      }
+      return results;
+    },
+    'only-child': function(nodes, value, root) {
+      var h = Selector.handlers;
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
+          results.push(node);
+      return results;
+    },
+    'nth-child':        function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root);
+    },
+    'nth-last-child':   function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, true);
+    },
+    'nth-of-type':      function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, false, true);
+    },
+    'nth-last-of-type': function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, formula, root, true, true);
+    },
+    'first-of-type':    function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, "1", root, false, true);
+    },
+    'last-of-type':     function(nodes, formula, root) {
+      return Selector.pseudos.nth(nodes, "1", root, true, true);
+    },
+    'only-of-type':     function(nodes, formula, root) {
+      var p = Selector.pseudos;
+      return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
+    },
+
+    getIndices: function(a, b, total) {
+      if (a == 0) return b > 0 ? [b] : [];
+      return $R(1, total).inject([], function(memo, i) {
+        if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
+        return memo;
+      });
+    },
+
+    nth: function(nodes, formula, root, reverse, ofType) {
+      if (nodes.length == 0) return [];
+      if (formula == 'even') formula = '2n+0';
+      if (formula == 'odd')  formula = '2n+1';
+      var h = Selector.handlers, results = [], indexed = [], m;
+      h.mark(nodes);
+      for (var i = 0, node; node = nodes[i]; i++) {
+        if (!node.parentNode._countedByPrototype) {
+          h.index(node.parentNode, reverse, ofType);
+          indexed.push(node.parentNode);
+        }
+      }
+      if (formula.match(/^\d+$/)) { // just a number
+        formula = Number(formula);
+        for (var i = 0, node; node = nodes[i]; i++)
+          if (node.nodeIndex == formula) results.push(node);
+      } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
+        if (m[1] == "-") m[1] = -1;
+        var a = m[1] ? Number(m[1]) : 1;
+        var b = m[2] ? Number(m[2]) : 0;
+        var indices = Selector.pseudos.getIndices(a, b, nodes.length);
+        for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
+          for (var j = 0; j < l; j++)
+            if (node.nodeIndex == indices[j]) results.push(node);
+        }
+      }
+      h.unmark(nodes);
+      h.unmark(indexed);
+      return results;
+    },
+
+    'empty': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++) {
+        if (node.tagName == '!' || node.firstChild) continue;
+        results.push(node);
+      }
+      return results;
+    },
+
+    'not': function(nodes, selector, root) {
+      var h = Selector.handlers, selectorType, m;
+      var exclusions = new Selector(selector).findElements(root);
+      h.mark(exclusions);
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!node._countedByPrototype) results.push(node);
+      h.unmark(exclusions);
+      return results;
+    },
+
+    'enabled': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (!node.disabled && (!node.type || node.type !== 'hidden'))
+          results.push(node);
+      return results;
+    },
+
+    'disabled': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (node.disabled) results.push(node);
+      return results;
+    },
+
+    'checked': function(nodes, value, root) {
+      for (var i = 0, results = [], node; node = nodes[i]; i++)
+        if (node.checked) results.push(node);
+      return results;
+    }
+  },
+
+  operators: {
+    '=':  function(nv, v) { return nv == v; },
+    '!=': function(nv, v) { return nv != v; },
+    '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
+    '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
+    '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
+    '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
+    '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
+     '-').include('-' + (v || "").toUpperCase() + '-'); }
+  },
+
+  split: function(expression) {
+    var expressions = [];
+    expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
+      expressions.push(m[1].strip());
+    });
+    return expressions;
+  },
+
+  matchElements: function(elements, expression) {
+    var matches = $$(expression), h = Selector.handlers;
+    h.mark(matches);
+    for (var i = 0, results = [], element; element = elements[i]; i++)
+      if (element._countedByPrototype) results.push(element);
+    h.unmark(matches);
+    return results;
+  },
+
+  findElement: function(elements, expression, index) {
+    if (Object.isNumber(expression)) {
+      index = expression; expression = false;
+    }
+    return Selector.matchElements(elements, expression || '*')[index || 0];
+  },
+
+  findChildElements: function(element, expressions) {
+    expressions = Selector.split(expressions.join(','));
+    var results = [], h = Selector.handlers;
+    for (var i = 0, l = expressions.length, selector; i < l; i++) {
+      selector = new Selector(expressions[i].strip());
+      h.concat(results, selector.findElements(element));
+    }
+    return (l > 1) ? h.unique(results) : results;
+  }
+});
+
+if (Prototype.Browser.IE) {
+  Object.extend(Selector.handlers, {
+    concat: function(a, b) {
+      for (var i = 0, node; node = b[i]; i++)
+        if (node.tagName !== "!") a.push(node);
+      return a;
+    }
+  });
+}
+
+function $$() {
+  return Selector.findChildElements(document, $A(arguments));
+}
+
+var Form = {
+  reset: function(form) {
+    form = $(form);
+    form.reset();
+    return form;
+  },
+
+  serializeElements: function(elements, options) {
+    if (typeof options != 'object') options = { hash: !!options };
+    else if (Object.isUndefined(options.hash)) options.hash = true;
+    var key, value, submitted = false, submit = options.submit;
+
+    var data = elements.inject({ }, function(result, element) {
+      if (!element.disabled && element.name) {
+        key = element.name; value = $(element).getValue();
+        if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
+            submit !== false && (!submit || key == submit) && (submitted = true)))) {
+          if (key in result) {
+            if (!Object.isArray(result[key])) result[key] = [result[key]];
+            result[key].push(value);
+          }
+          else result[key] = value;
+        }
+      }
+      return result;
+    });
+
+    return options.hash ? data : Object.toQueryString(data);
+  }
+};
+
+Form.Methods = {
+  serialize: function(form, options) {
+    return Form.serializeElements(Form.getElements(form), options);
+  },
+
+  getElements: function(form) {
+    var elements = $(form).getElementsByTagName('*'),
+        element,
+        arr = [ ],
+        serializers = Form.Element.Serializers;
+    for (var i = 0; element = elements[i]; i++) {
+      arr.push(element);
+    }
+    return arr.inject([], function(elements, child) {
+      if (serializers[child.tagName.toLowerCase()])
+        elements.push(Element.extend(child));
+      return elements;
+    })
+  },
+
+  getInputs: function(form, typeName, name) {
+    form = $(form);
+    var inputs = form.getElementsByTagName('input');
+
+    if (!typeName && !name) return $A(inputs).map(Element.extend);
+
+    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
+      var input = inputs[i];
+      if ((typeName && input.type != typeName) || (name && input.name != name))
+        continue;
+      matchingInputs.push(Element.extend(input));
+    }
+
+    return matchingInputs;
+  },
+
+  disable: function(form) {
+    form = $(form);
+    Form.getElements(form).invoke('disable');
+    return form;
+  },
+
+  enable: function(form) {
+    form = $(form);
+    Form.getElements(form).invoke('enable');
+    return form;
+  },
+
+  findFirstElement: function(form) {
+    var elements = $(form).getElements().findAll(function(element) {
+      return 'hidden' != element.type && !element.disabled;
+    });
+    var firstByIndex = elements.findAll(function(element) {
+      return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
+    }).sortBy(function(element) { return element.tabIndex }).first();
+
+    return firstByIndex ? firstByIndex : elements.find(function(element) {
+      return /^(?:input|select|textarea)$/i.test(element.tagName);
+    });
+  },
+
+  focusFirstElement: function(form) {
+    form = $(form);
+    form.findFirstElement().activate();
+    return form;
+  },
+
+  request: function(form, options) {
+    form = $(form), options = Object.clone(options || { });
+
+    var params = options.parameters, action = form.readAttribute('action') || '';
+    if (action.blank()) action = window.location.href;
+    options.parameters = form.serialize(true);
+
+    if (params) {
+      if (Object.isString(params)) params = params.toQueryParams();
+      Object.extend(options.parameters, params);
+    }
+
+    if (form.hasAttribute('method') && !options.method)
+      options.method = form.method;
+
+    return new Ajax.Request(action, options);
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+
+Form.Element = {
+  focus: function(element) {
+    $(element).focus();
+    return element;
+  },
+
+  select: function(element) {
+    $(element).select();
+    return element;
+  }
+};
+
+Form.Element.Methods = {
+
+  serialize: function(element) {
+    element = $(element);
+    if (!element.disabled && element.name) {
+      var value = element.getValue();
+      if (value != undefined) {
+        var pair = { };
+        pair[element.name] = value;
+        return Object.toQueryString(pair);
+      }
+    }
+    return '';
+  },
+
+  getValue: function(element) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    return Form.Element.Serializers[method](element);
+  },
+
+  setValue: function(element, value) {
+    element = $(element);
+    var method = element.tagName.toLowerCase();
+    Form.Element.Serializers[method](element, value);
+    return element;
+  },
+
+  clear: function(element) {
+    $(element).value = '';
+    return element;
+  },
+
+  present: function(element) {
+    return $(element).value != '';
+  },
+
+  activate: function(element) {
+    element = $(element);
+    try {
+      element.focus();
+      if (element.select && (element.tagName.toLowerCase() != 'input' ||
+          !(/^(?:button|reset|submit)$/i.test(element.type))))
+        element.select();
+    } catch (e) { }
+    return element;
+  },
+
+  disable: function(element) {
+    element = $(element);
+    element.disabled = true;
+    return element;
+  },
+
+  enable: function(element) {
+    element = $(element);
+    element.disabled = false;
+    return element;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+var Field = Form.Element;
+
+var $F = Form.Element.Methods.getValue;
+
+/*--------------------------------------------------------------------------*/
+
+Form.Element.Serializers = {
+  input: function(element, value) {
+    switch (element.type.toLowerCase()) {
+      case 'checkbox':
+      case 'radio':
+        return Form.Element.Serializers.inputSelector(element, value);
+      default:
+        return Form.Element.Serializers.textarea(element, value);
+    }
+  },
+
+  inputSelector: function(element, value) {
+    if (Object.isUndefined(value)) return element.checked ? element.value : null;
+    else element.checked = !!value;
+  },
+
+  textarea: function(element, value) {
+    if (Object.isUndefined(value)) return element.value;
+    else element.value = value;
+  },
+
+  select: function(element, value) {
+    if (Object.isUndefined(value))
+      return this[element.type == 'select-one' ?
+        'selectOne' : 'selectMany'](element);
+    else {
+      var opt, currentValue, single = !Object.isArray(value);
+      for (var i = 0, length = element.length; i < length; i++) {
+        opt = element.options[i];
+        currentValue = this.optionValue(opt);
+        if (single) {
+          if (currentValue == value) {
+            opt.selected = true;
+            return;
+          }
+        }
+        else opt.selected = value.include(currentValue);
+      }
+    }
+  },
+
+  selectOne: function(element) {
+    var index = element.selectedIndex;
+    return index >= 0 ? this.optionValue(element.options[index]) : null;
+  },
+
+  selectMany: function(element) {
+    var values, length = element.length;
+    if (!length) return null;
+
+    for (var i = 0, values = []; i < length; i++) {
+      var opt = element.options[i];
+      if (opt.selected) values.push(this.optionValue(opt));
+    }
+    return values;
+  },
+
+  optionValue: function(opt) {
+    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+
+Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
+  initialize: function($super, element, frequency, callback) {
+    $super(callback, frequency);
+    this.element   = $(element);
+    this.lastValue = this.getValue();
+  },
+
+  execute: function() {
+    var value = this.getValue();
+    if (Object.isString(this.lastValue) && Object.isString(value) ?
+        this.lastValue != value : String(this.lastValue) != String(value)) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  }
+});
+
+Form.Element.Observer = Class.create(Abstract.TimedObserver, {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.Observer = Class.create(Abstract.TimedObserver, {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+
+/*--------------------------------------------------------------------------*/
+
+Abstract.EventObserver = Class.create({
+  initialize: function(element, callback) {
+    this.element  = $(element);
+    this.callback = callback;
+
+    this.lastValue = this.getValue();
+    if (this.element.tagName.toLowerCase() == 'form')
+      this.registerFormCallbacks();
+    else
+      this.registerCallback(this.element);
+  },
+
+  onElementEvent: function() {
+    var value = this.getValue();
+    if (this.lastValue != value) {
+      this.callback(this.element, value);
+      this.lastValue = value;
+    }
+  },
+
+  registerFormCallbacks: function() {
+    Form.getElements(this.element).each(this.registerCallback, this);
+  },
+
+  registerCallback: function(element) {
+    if (element.type) {
+      switch (element.type.toLowerCase()) {
+        case 'checkbox':
+        case 'radio':
+          Event.observe(element, 'click', this.onElementEvent.bind(this));
+          break;
+        default:
+          Event.observe(element, 'change', this.onElementEvent.bind(this));
+          break;
+      }
+    }
+  }
+});
+
+Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
+  getValue: function() {
+    return Form.Element.getValue(this.element);
+  }
+});
+
+Form.EventObserver = Class.create(Abstract.EventObserver, {
+  getValue: function() {
+    return Form.serialize(this.element);
+  }
+});
+(function() {
+
+  var Event = {
+    KEY_BACKSPACE: 8,
+    KEY_TAB:       9,
+    KEY_RETURN:   13,
+    KEY_ESC:      27,
+    KEY_LEFT:     37,
+    KEY_UP:       38,
+    KEY_RIGHT:    39,
+    KEY_DOWN:     40,
+    KEY_DELETE:   46,
+    KEY_HOME:     36,
+    KEY_END:      35,
+    KEY_PAGEUP:   33,
+    KEY_PAGEDOWN: 34,
+    KEY_INSERT:   45,
+
+    cache: {}
+  };
+
+  var docEl = document.documentElement;
+  var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl
+    && 'onmouseleave' in docEl;
+
+  var _isButton;
+  if (Prototype.Browser.IE) {
+    var buttonMap = { 0: 1, 1: 4, 2: 2 };
+    _isButton = function(event, code) {
+      return event.button === buttonMap[code];
+    };
+  } else if (Prototype.Browser.WebKit) {
+    _isButton = function(event, code) {
+      switch (code) {
+        case 0: return event.which == 1 && !event.metaKey;
+        case 1: return event.which == 1 && event.metaKey;
+        default: return false;
+      }
+    };
+  } else {
+    _isButton = function(event, code) {
+      return event.which ? (event.which === code + 1) : (event.button === code);
+    };
+  }
+
+  function isLeftClick(event)   { return _isButton(event, 0) }
+
+  function isMiddleClick(event) { return _isButton(event, 1) }
+
+  function isRightClick(event)  { return _isButton(event, 2) }
+
+  function element(event) {
+    event = Event.extend(event);
+
+    var node = event.target, type = event.type,
+     currentTarget = event.currentTarget;
+
+    if (currentTarget && currentTarget.tagName) {
+      if (type === 'load' || type === 'error' ||
+        (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
+          && currentTarget.type === 'radio'))
+            node = currentTarget;
+    }
+
+    if (node.nodeType == Node.TEXT_NODE)
+      node = node.parentNode;
+
+    return Element.extend(node);
+  }
+
+  function findElement(event, expression) {
+    var element = Event.element(event);
+    if (!expression) return element;
+    var elements = [element].concat(element.ancestors());
+    return Selector.findElement(elements, expression, 0);
+  }
+
+  function pointer(event) {
+    return { x: pointerX(event), y: pointerY(event) };
+  }
+
+  function pointerX(event) {
+    var docElement = document.documentElement,
+     body = document.body || { scrollLeft: 0 };
+
+    return event.pageX || (event.clientX +
+      (docElement.scrollLeft || body.scrollLeft) -
+      (docElement.clientLeft || 0));
+  }
+
+  function pointerY(event) {
+    var docElement = document.documentElement,
+     body = document.body || { scrollTop: 0 };
+
+    return  event.pageY || (event.clientY +
+       (docElement.scrollTop || body.scrollTop) -
+       (docElement.clientTop || 0));
+  }
+
+
+  function stop(event) {
+    Event.extend(event);
+    event.preventDefault();
+    event.stopPropagation();
+
+    event.stopped = true;
+  }
+
+  Event.Methods = {
+    isLeftClick: isLeftClick,
+    isMiddleClick: isMiddleClick,
+    isRightClick: isRightClick,
+
+    element: element,
+    findElement: findElement,
+
+    pointer: pointer,
+    pointerX: pointerX,
+    pointerY: pointerY,
+
+    stop: stop
+  };
+
+
+  var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
+    m[name] = Event.Methods[name].methodize();
+    return m;
+  });
+
+  if (Prototype.Browser.IE) {
+    function _relatedTarget(event) {
+      var element;
+      switch (event.type) {
+        case 'mouseover': element = event.fromElement; break;
+        case 'mouseout':  element = event.toElement;   break;
+        default: return null;
+      }
+      return Element.extend(element);
+    }
+
+    Object.extend(methods, {
+      stopPropagation: function() { this.cancelBubble = true },
+      preventDefault:  function() { this.returnValue = false },
+      inspect: function() { return '[object Event]' }
+    });
+
+    Event.extend = function(event, element) {
+      if (!event) return false;
+      if (event._extendedByPrototype) return event;
+
+      event._extendedByPrototype = Prototype.emptyFunction;
+      var pointer = Event.pointer(event);
+
+      Object.extend(event, {
+        target: event.srcElement || element,
+        relatedTarget: _relatedTarget(event),
+        pageX:  pointer.x,
+        pageY:  pointer.y
+      });
+
+      return Object.extend(event, methods);
+    };
+  } else {
+    Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__;
+    Object.extend(Event.prototype, methods);
+    Event.extend = Prototype.K;
+  }
+
+  function _createResponder(element, eventName, handler) {
+    var registry = Element.retrieve(element, 'prototype_event_registry');
+
+    if (Object.isUndefined(registry)) {
+      CACHE.push(element);
+      registry = Element.retrieve(element, 'prototype_event_registry', $H());
+    }
+
+    var respondersForEvent = registry.get(eventName);
+    if (Object.isUndefined(respondersForEvent)) {
+      respondersForEvent = [];
+      registry.set(eventName, respondersForEvent);
+    }
+
+    if (respondersForEvent.pluck('handler').include(handler)) return false;
+
+    var responder;
+    if (eventName.include(":")) {
+      responder = function(event) {
+        if (Object.isUndefined(event.eventName))
+          return false;
+
+        if (event.eventName !== eventName)
+          return false;
+
+        Event.extend(event, element);
+        handler.call(element, event);
+      };
+    } else {
+      if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED &&
+       (eventName === "mouseenter" || eventName === "mouseleave")) {
+        if (eventName === "mouseenter" || eventName === "mouseleave") {
+          responder = function(event) {
+            Event.extend(event, element);
+
+            var parent = event.relatedTarget;
+            while (parent && parent !== element) {
+              try { parent = parent.parentNode; }
+              catch(e) { parent = element; }
+            }
+
+            if (parent === element) return;
+
+            handler.call(element, event);
+          };
+        }
+      } else {
+        responder = function(event) {
+          Event.extend(event, element);
+          handler.call(element, event);
+        };
+      }
+    }
+
+    responder.handler = handler;
+    respondersForEvent.push(responder);
+    return responder;
+  }
+
+  function _destroyCache() {
+    for (var i = 0, length = CACHE.length; i < length; i++) {
+      Event.stopObserving(CACHE[i]);
+      CACHE[i] = null;
+    }
+  }
+
+  var CACHE = [];
+
+  if (Prototype.Browser.IE)
+    window.attachEvent('onunload', _destroyCache);
+
+  if (Prototype.Browser.WebKit)
+    window.addEventListener('unload', Prototype.emptyFunction, false);
+
+
+  var _getDOMEventName = Prototype.K;
+
+  if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) {
+    _getDOMEventName = function(eventName) {
+      var translations = { mouseenter: "mouseover", mouseleave: "mouseout" };
+      return eventName in translations ? translations[eventName] : eventName;
+    };
+  }
+
+  function observe(element, eventName, handler) {
+    element = $(element);
+
+    var responder = _createResponder(element, eventName, handler);
+
+    if (!responder) return element;
+
+    if (eventName.include(':')) {
+      if (element.addEventListener)
+        element.addEventListener("dataavailable", responder, false);
+      else {
+        element.attachEvent("ondataavailable", responder);
+        element.attachEvent("onfilterchange", responder);
+      }
+    } else {
+      var actualEventName = _getDOMEventName(eventName);
+
+      if (element.addEventListener)
+        element.addEventListener(actualEventName, responder, false);
+      else
+        element.attachEvent("on" + actualEventName, responder);
+    }
+
+    return element;
+  }
+
+  function stopObserving(element, eventName, handler) {
+    element = $(element);
+
+    var registry = Element.retrieve(element, 'prototype_event_registry');
+
+    if (Object.isUndefined(registry)) return element;
+
+    if (eventName && !handler) {
+      var responders = registry.get(eventName);
+
+      if (Object.isUndefined(responders)) return element;
+
+      responders.each( function(r) {
+        Element.stopObserving(element, eventName, r.handler);
+      });
+      return element;
+    } else if (!eventName) {
+      registry.each( function(pair) {
+        var eventName = pair.key, responders = pair.value;
+
+        responders.each( function(r) {
+          Element.stopObserving(element, eventName, r.handler);
+        });
+      });
+      return element;
+    }
+
+    var responders = registry.get(eventName);
+
+    if (!responders) return;
+
+    var responder = responders.find( function(r) { return r.handler === handler; });
+    if (!responder) return element;
+
+    var actualEventName = _getDOMEventName(eventName);
+
+    if (eventName.include(':')) {
+      if (element.removeEventListener)
+        element.removeEventListener("dataavailable", responder, false);
+      else {
+        element.detachEvent("ondataavailable", responder);
+        element.detachEvent("onfilterchange",  responder);
+      }
+    } else {
+      if (element.removeEventListener)
+        element.removeEventListener(actualEventName, responder, false);
+      else
+        element.detachEvent('on' + actualEventName, responder);
+    }
+
+    registry.set(eventName, responders.without(responder));
+
+    return element;
+  }
+
+  function fire(element, eventName, memo, bubble) {
+    element = $(element);
+
+    if (Object.isUndefined(bubble))
+      bubble = true;
+
+    if (element == document && document.createEvent && !element.dispatchEvent)
+      element = document.documentElement;
+
+    var event;
+    if (document.createEvent) {
+      event = document.createEvent('HTMLEvents');
+      event.initEvent('dataavailable', true, true);
+    } else {
+      event = document.createEventObject();
+      event.eventType = bubble ? 'ondataavailable' : 'onfilterchange';
+    }
+
+    event.eventName = eventName;
+    event.memo = memo || { };
+
+    if (document.createEvent)
+      element.dispatchEvent(event);
+    else
+      element.fireEvent(event.eventType, event);
+
+    return Event.extend(event);
+  }
+
+
+  Object.extend(Event, Event.Methods);
+
+  Object.extend(Event, {
+    fire:          fire,
+    observe:       observe,
+    stopObserving: stopObserving
+  });
+
+  Element.addMethods({
+    fire:          fire,
+
+    observe:       observe,
+
+    stopObserving: stopObserving
+  });
+
+  Object.extend(document, {
+    fire:          fire.methodize(),
+
+    observe:       observe.methodize(),
+
+    stopObserving: stopObserving.methodize(),
+
+    loaded:        false
+  });
+
+  if (window.Event) Object.extend(window.Event, Event);
+  else window.Event = Event;
+})();
+
+(function() {
+  /* Support for the DOMContentLoaded event is based on work by Dan Webb,
+     Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */
+
+  var timer;
+
+  function fireContentLoadedEvent() {
+    if (document.loaded) return;
+    if (timer) window.clearTimeout(timer);
+    document.loaded = true;
+    document.fire('dom:loaded');
+  }
+
+  function checkReadyState() {
+    if (document.readyState === 'complete') {
+      document.stopObserving('readystatechange', checkReadyState);
+      fireContentLoadedEvent();
+    }
+  }
+
+  function pollDoScroll() {
+    try { document.documentElement.doScroll('left'); }
+    catch(e) {
+      timer = pollDoScroll.defer();
+      return;
+    }
+    fireContentLoadedEvent();
+  }
+
+  if (document.addEventListener) {
+    document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
+  } else {
+    document.observe('readystatechange', checkReadyState);
+    if (window == top)
+      timer = pollDoScroll.defer();
+  }
+
+  Event.observe(window, 'load', fireContentLoadedEvent);
+})();
+
+Element.addMethods();
+
+/*------------------------------- DEPRECATED -------------------------------*/
+
+Hash.toQueryString = Object.toQueryString;
+
+var Toggle = { display: Element.toggle };
+
+Element.Methods.childOf = Element.Methods.descendantOf;
+
+var Insertion = {
+  Before: function(element, content) {
+    return Element.insert(element, {before:content});
+  },
+
+  Top: function(element, content) {
+    return Element.insert(element, {top:content});
+  },
+
+  Bottom: function(element, content) {
+    return Element.insert(element, {bottom:content});
+  },
+
+  After: function(element, content) {
+    return Element.insert(element, {after:content});
+  }
+};
+
+var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
+
+var Position = {
+  includeScrollOffsets: false,
+
+  prepare: function() {
+    this.deltaX =  window.pageXOffset
+                || document.documentElement.scrollLeft
+                || document.body.scrollLeft
+                || 0;
+    this.deltaY =  window.pageYOffset
+                || document.documentElement.scrollTop
+                || document.body.scrollTop
+                || 0;
+  },
+
+  within: function(element, x, y) {
+    if (this.includeScrollOffsets)
+      return this.withinIncludingScrolloffsets(element, x, y);
+    this.xcomp = x;
+    this.ycomp = y;
+    this.offset = Element.cumulativeOffset(element);
+
+    return (y >= this.offset[1] &&
+            y <  this.offset[1] + element.offsetHeight &&
+            x >= this.offset[0] &&
+            x <  this.offset[0] + element.offsetWidth);
+  },
+
+  withinIncludingScrolloffsets: function(element, x, y) {
+    var offsetcache = Element.cumulativeScrollOffset(element);
+
+    this.xcomp = x + offsetcache[0] - this.deltaX;
+    this.ycomp = y + offsetcache[1] - this.deltaY;
+    this.offset = Element.cumulativeOffset(element);
+
+    return (this.ycomp >= this.offset[1] &&
+            this.ycomp <  this.offset[1] + element.offsetHeight &&
+            this.xcomp >= this.offset[0] &&
+            this.xcomp <  this.offset[0] + element.offsetWidth);
+  },
+
+  overlap: function(mode, element) {
+    if (!mode) return 0;
+    if (mode == 'vertical')
+      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
+        element.offsetHeight;
+    if (mode == 'horizontal')
+      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
+        element.offsetWidth;
+  },
+
+
+  cumulativeOffset: Element.Methods.cumulativeOffset,
+
+  positionedOffset: Element.Methods.positionedOffset,
+
+  absolutize: function(element) {
+    Position.prepare();
+    return Element.absolutize(element);
+  },
+
+  relativize: function(element) {
+    Position.prepare();
+    return Element.relativize(element);
+  },
+
+  realOffset: Element.Methods.cumulativeScrollOffset,
+
+  offsetParent: Element.Methods.getOffsetParent,
+
+  page: Element.Methods.viewportOffset,
+
+  clone: function(source, target, options) {
+    options = options || { };
+    return Element.clonePosition(target, source, options);
+  }
+};
+
+/*--------------------------------------------------------------------------*/
+
+if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
+  function iter(name) {
+    return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
+  }
+
+  instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
+  function(element, className) {
+    className = className.toString().strip();
+    var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
+    return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
+  } : function(element, className) {
+    className = className.toString().strip();
+    var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
+    if (!classNames && !className) return elements;
+
+    var nodes = $(element).getElementsByTagName('*');
+    className = ' ' + className + ' ';
+
+    for (var i = 0, child, cn; child = nodes[i]; i++) {
+      if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
+          (classNames && classNames.all(function(name) {
+            return !name.toString().blank() && cn.include(' ' + name + ' ');
+          }))))
+        elements.push(Element.extend(child));
+    }
+    return elements;
+  };
+
+  return function(className, parentElement) {
+    return $(parentElement || document.body).getElementsByClassName(className);
+  };
+}(Element.Methods);
+
+/*--------------------------------------------------------------------------*/
+
+Element.ClassNames = Class.create();
+Element.ClassNames.prototype = {
+  initialize: function(element) {
+    this.element = $(element);
+  },
+
+  _each: function(iterator) {
+    this.element.className.split(/\s+/).select(function(name) {
+      return name.length > 0;
+    })._each(iterator);
+  },
+
+  set: function(className) {
+    this.element.className = className;
+  },
+
+  add: function(classNameToAdd) {
+    if (this.include(classNameToAdd)) return;
+    this.set($A(this).concat(classNameToAdd).join(' '));
+  },
+
+  remove: function(classNameToRemove) {
+    if (!this.include(classNameToRemove)) return;
+    this.set($A(this).without(classNameToRemove).join(' '));
+  },
+
+  toString: function() {
+    return $A(this).join(' ');
+  }
+};
+
+Object.extend(Element.ClassNames.prototype, Enumerable);
+
+/*--------------------------------------------------------------------------*/
diff --git a/ricoClient/js/baselibs/prototype.js b/ricoClient/js/baselibs/prototype.js
deleted file mode 100644 (file)
index 9fe6e12..0000000
+++ /dev/null
@@ -1,4874 +0,0 @@
-/*  Prototype JavaScript framework, version 1.6.1
- *  (c) 2005-2009 Sam Stephenson
- *
- *  Prototype is freely distributable under the terms of an MIT-style license.
- *  For details, see the Prototype web site: http://www.prototypejs.org/
- *
- *--------------------------------------------------------------------------*/
-
-var Prototype = {
-  Version: '1.6.1',
-
-  Browser: (function(){
-    var ua = navigator.userAgent;
-    var isOpera = Object.prototype.toString.call(window.opera) == '[object Opera]';
-    return {
-      IE:             !!window.attachEvent && !isOpera,
-      Opera:          isOpera,
-      WebKit:         ua.indexOf('AppleWebKit/') > -1,
-      Gecko:          ua.indexOf('Gecko') > -1 && ua.indexOf('KHTML') === -1,
-      MobileSafari:   /Apple.*Mobile.*Safari/.test(ua)
-    }
-  })(),
-
-  BrowserFeatures: {
-    XPath: !!document.evaluate,
-    SelectorsAPI: !!document.querySelector,
-    ElementExtensions: (function() {
-      var constructor = window.Element || window.HTMLElement;
-      return !!(constructor && constructor.prototype);
-    })(),
-    SpecificElementExtensions: (function() {
-      if (typeof window.HTMLDivElement !== 'undefined')
-        return true;
-
-      var div = document.createElement('div');
-      var form = document.createElement('form');
-      var isSupported = false;
-
-      if (div['__proto__'] && (div['__proto__'] !== form['__proto__'])) {
-        isSupported = true;
-      }
-
-      div = form = null;
-
-      return isSupported;
-    })()
-  },
-
-  ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
-  JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
-
-  emptyFunction: function() { },
-  K: function(x) { return x }
-};
-
-if (Prototype.Browser.MobileSafari)
-  Prototype.BrowserFeatures.SpecificElementExtensions = false;
-
-
-var Abstract = { };
-
-
-var Try = {
-  these: function() {
-    var returnValue;
-
-    for (var i = 0, length = arguments.length; i < length; i++) {
-      var lambda = arguments[i];
-      try {
-        returnValue = lambda();
-        break;
-      } catch (e) { }
-    }
-
-    return returnValue;
-  }
-};
-
-/* Based on Alex Arnell's inheritance implementation. */
-
-var Class = (function() {
-  function subclass() {};
-  function create() {
-    var parent = null, properties = $A(arguments);
-    if (Object.isFunction(properties[0]))
-      parent = properties.shift();
-
-    function klass() {
-      this.initialize.apply(this, arguments);
-    }
-
-    Object.extend(klass, Class.Methods);
-    klass.superclass = parent;
-    klass.subclasses = [];
-
-    if (parent) {
-      subclass.prototype = parent.prototype;
-      klass.prototype = new subclass;
-      parent.subclasses.push(klass);
-    }
-
-    for (var i = 0; i < properties.length; i++)
-      klass.addMethods(properties[i]);
-
-    if (!klass.prototype.initialize)
-      klass.prototype.initialize = Prototype.emptyFunction;
-
-    klass.prototype.constructor = klass;
-    return klass;
-  }
-
-  function addMethods(source) {
-    var ancestor   = this.superclass && this.superclass.prototype;
-    var properties = Object.keys(source);
-
-    if (!Object.keys({ toString: true }).length) {
-      if (source.toString != Object.prototype.toString)
-        properties.push("toString");
-      if (source.valueOf != Object.prototype.valueOf)
-        properties.push("valueOf");
-    }
-
-    for (var i = 0, length = properties.length; i < length; i++) {
-      var property = properties[i], value = source[property];
-      if (ancestor && Object.isFunction(value) &&
-          value.argumentNames().first() == "$super") {
-        var method = value;
-        value = (function(m) {
-          return function() { return ancestor[m].apply(this, arguments); };
-        })(property).wrap(method);
-
-        value.valueOf = method.valueOf.bind(method);
-        value.toString = method.toString.bind(method);
-      }
-      this.prototype[property] = value;
-    }
-
-    return this;
-  }
-
-  return {
-    create: create,
-    Methods: {
-      addMethods: addMethods
-    }
-  };
-})();
-(function() {
-
-  var _toString = Object.prototype.toString;
-
-  function extend(destination, source) {
-    for (var property in source)
-      destination[property] = source[property];
-    return destination;
-  }
-
-  function inspect(object) {
-    try {
-      if (isUndefined(object)) return 'undefined';
-      if (object === null) return 'null';
-      return object.inspect ? object.inspect() : String(object);
-    } catch (e) {
-      if (e instanceof RangeError) return '...';
-      throw e;
-    }
-  }
-
-  function toJSON(object) {
-    var type = typeof object;
-    switch (type) {
-      case 'undefined':
-      case 'function':
-      case 'unknown': return;
-      case 'boolean': return object.toString();
-    }
-
-    if (object === null) return 'null';
-    if (object.toJSON) return object.toJSON();
-    if (isElement(object)) return;
-
-    var results = [];
-    for (var property in object) {
-      var value = toJSON(object[property]);
-      if (!isUndefined(value))
-        results.push(property.toJSON() + ': ' + value);
-    }
-
-    return '{' + results.join(', ') + '}';
-  }
-
-  function toQueryString(object) {
-    return $H(object).toQueryString();
-  }
-
-  function toHTML(object) {
-    return object && object.toHTML ? object.toHTML() : String.interpret(object);
-  }
-
-  function keys(object) {
-    var results = [];
-    for (var property in object)
-      results.push(property);
-    return results;
-  }
-
-  function values(object) {
-    var results = [];
-    for (var property in object)
-      results.push(object[property]);
-    return results;
-  }
-
-  function clone(object) {
-    return extend({ }, object);
-  }
-
-  function isElement(object) {
-    return !!(object && object.nodeType == 1);
-  }
-
-  function isArray(object) {
-    return _toString.call(object) == "[object Array]";
-  }
-
-
-  function isHash(object) {
-    return object instanceof Hash;
-  }
-
-  function isFunction(object) {
-    return typeof object === "function";
-  }
-
-  function isString(object) {
-    return _toString.call(object) == "[object String]";
-  }
-
-  function isNumber(object) {
-    return _toString.call(object) == "[object Number]";
-  }
-
-  function isUndefined(object) {
-    return typeof object === "undefined";
-  }
-
-  extend(Object, {
-    extend:        extend,
-    inspect:       inspect,
-    toJSON:        toJSON,
-    toQueryString: toQueryString,
-    toHTML:        toHTML,
-    keys:          keys,
-    values:        values,
-    clone:         clone,
-    isElement:     isElement,
-    isArray:       isArray,
-    isHash:        isHash,
-    isFunction:    isFunction,
-    isString:      isString,
-    isNumber:      isNumber,
-    isUndefined:   isUndefined
-  });
-})();
-Object.extend(Function.prototype, (function() {
-  var slice = Array.prototype.slice;
-
-  function update(array, args) {
-    var arrayLength = array.length, length = args.length;
-    while (length--) array[arrayLength + length] = args[length];
-    return array;
-  }
-
-  function merge(array, args) {
-    array = slice.call(array, 0);
-    return update(array, args);
-  }
-
-  function argumentNames() {
-    var names = this.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1]
-      .replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g, '')
-      .replace(/\s+/g, '').split(',');
-    return names.length == 1 && !names[0] ? [] : names;
-  }
-
-  function bind(context) {
-    if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
-    var __method = this, args = slice.call(arguments, 1);
-    return function() {
-      var a = merge(args, arguments);
-      return __method.apply(context, a);
-    }
-  }
-
-  function bindAsEventListener(context) {
-    var __method = this, args = slice.call(arguments, 1);
-    return function(event) {
-      var a = update([event || window.event], args);
-      return __method.apply(context, a);
-    }
-  }
-
-  function curry() {
-    if (!arguments.length) return this;
-    var __method = this, args = slice.call(arguments, 0);
-    return function() {
-      var a = merge(args, arguments);
-      return __method.apply(this, a);
-    }
-  }
-
-  function delay(timeout) {
-    var __method = this, args = slice.call(arguments, 1);
-    timeout = timeout * 1000
-    return window.setTimeout(function() {
-      return __method.apply(__method, args);
-    }, timeout);
-  }
-
-  function defer() {
-    var args = update([0.01], arguments);
-    return this.delay.apply(this, args);
-  }
-
-  function wrap(wrapper) {
-    var __method = this;
-    return function() {
-      var a = update([__method.bind(this)], arguments);
-      return wrapper.apply(this, a);
-    }
-  }
-
-  function methodize() {
-    if (this._methodized) return this._methodized;
-    var __method = this;
-    return this._methodized = function() {
-      var a = update([this], arguments);
-      return __method.apply(null, a);
-    };
-  }
-
-  return {
-    argumentNames:       argumentNames,
-    bind:                bind,
-    bindAsEventListener: bindAsEventListener,
-    curry:               curry,
-    delay:               delay,
-    defer:               defer,
-    wrap:                wrap,
-    methodize:           methodize
-  }
-})());
-
-
-Date.prototype.toJSON = function() {
-  return '"' + this.getUTCFullYear() + '-' +
-    (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
-    this.getUTCDate().toPaddedString(2) + 'T' +
-    this.getUTCHours().toPaddedString(2) + ':' +
-    this.getUTCMinutes().toPaddedString(2) + ':' +
-    this.getUTCSeconds().toPaddedString(2) + 'Z"';
-};
-
-
-RegExp.prototype.match = RegExp.prototype.test;
-
-RegExp.escape = function(str) {
-  return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
-};
-var PeriodicalExecuter = Class.create({
-  initialize: function(callback, frequency) {
-    this.callback = callback;
-    this.frequency = frequency;
-    this.currentlyExecuting = false;
-
-    this.registerCallback();
-  },
-
-  registerCallback: function() {
-    this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
-  },
-
-  execute: function() {
-    this.callback(this);
-  },
-
-  stop: function() {
-    if (!this.timer) return;
-    clearInterval(this.timer);
-    this.timer = null;
-  },
-
-  onTimerEvent: function() {
-    if (!this.currentlyExecuting) {
-      try {
-        this.currentlyExecuting = true;
-        this.execute();
-        this.currentlyExecuting = false;
-      } catch(e) {
-        this.currentlyExecuting = false;
-        throw e;
-      }
-    }
-  }
-});
-Object.extend(String, {
-  interpret: function(value) {
-    return value == null ? '' : String(value);
-  },
-  specialChar: {
-    '\b': '\\b',
-    '\t': '\\t',
-    '\n': '\\n',
-    '\f': '\\f',
-    '\r': '\\r',
-    '\\': '\\\\'
-  }
-});
-
-Object.extend(String.prototype, (function() {
-
-  function prepareReplacement(replacement) {
-    if (Object.isFunction(replacement)) return replacement;
-    var template = new Template(replacement);
-    return function(match) { return template.evaluate(match) };
-  }
-
-  function gsub(pattern, replacement) {
-    var result = '', source = this, match;
-    replacement = prepareReplacement(replacement);
-
-    if (Object.isString(pattern))
-      pattern = RegExp.escape(pattern);
-
-    if (!(pattern.length || pattern.source)) {
-      replacement = replacement('');
-      return replacement + source.split('').join(replacement) + replacement;
-    }
-
-    while (source.length > 0) {
-      if (match = source.match(pattern)) {
-        result += source.slice(0, match.index);
-        result += String.interpret(replacement(match));
-        source  = source.slice(match.index + match[0].length);
-      } else {
-        result += source, source = '';
-      }
-    }
-    return result;
-  }
-
-  function sub(pattern, replacement, count) {
-    replacement = prepareReplacement(replacement);
-    count = Object.isUndefined(count) ? 1 : count;
-
-    return this.gsub(pattern, function(match) {
-      if (--count < 0) return match[0];
-      return replacement(match);
-    });
-  }
-
-  function scan(pattern, iterator) {
-    this.gsub(pattern, iterator);
-    return String(this);
-  }
-
-  function truncate(length, truncation) {
-    length = length || 30;
-    truncation = Object.isUndefined(truncation) ? '...' : truncation;
-    return this.length > length ?
-      this.slice(0, length - truncation.length) + truncation : String(this);
-  }
-
-  function strip() {
-    return this.replace(/^\s+/, '').replace(/\s+$/, '');
-  }
-
-  function stripTags() {
-    return this.replace(/<\w+(\s+("[^"]*"|'[^']*'|[^>])+)?>|<\/\w+>/gi, '');
-  }
-
-  function stripScripts() {
-    return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
-  }
-
-  function extractScripts() {
-    var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
-    var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
-    return (this.match(matchAll) || []).map(function(scriptTag) {
-      return (scriptTag.match(matchOne) || ['', ''])[1];
-    });
-  }
-
-  function evalScripts() {
-    return this.extractScripts().map(function(script) { return eval(script) });
-  }
-
-  function escapeHTML() {
-    return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
-  }
-
-  function unescapeHTML() {
-    return this.stripTags().replace(/&lt;/g,'<').replace(/&gt;/g,'>').replace(/&amp;/g,'&');
-  }
-
-
-  function toQueryParams(separator) {
-    var match = this.strip().match(/([^?#]*)(#.*)?$/);
-    if (!match) return { };
-
-    return match[1].split(separator || '&').inject({ }, function(hash, pair) {
-      if ((pair = pair.split('='))[0]) {
-        var key = decodeURIComponent(pair.shift());
-        var value = pair.length > 1 ? pair.join('=') : pair[0];
-        if (value != undefined) value = decodeURIComponent(value);
-
-        if (key in hash) {
-          if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
-          hash[key].push(value);
-        }
-        else hash[key] = value;
-      }
-      return hash;
-    });
-  }
-
-  function toArray() {
-    return this.split('');
-  }
-
-  function succ() {
-    return this.slice(0, this.length - 1) +
-      String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
-  }
-
-  function times(count) {
-    return count < 1 ? '' : new Array(count + 1).join(this);
-  }
-
-  function camelize() {
-    var parts = this.split('-'), len = parts.length;
-    if (len == 1) return parts[0];
-
-    var camelized = this.charAt(0) == '-'
-      ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
-      : parts[0];
-
-    for (var i = 1; i < len; i++)
-      camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
-
-    return camelized;
-  }
-
-  function capitalize() {
-    return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
-  }
-
-  function underscore() {
-    return this.replace(/::/g, '/')
-               .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2')
-               .replace(/([a-z\d])([A-Z])/g, '$1_$2')
-               .replace(/-/g, '_')
-               .toLowerCase();
-  }
-
-  function dasherize() {
-    return this.replace(/_/g, '-');
-  }
-
-  function inspect(useDoubleQuotes) {
-    var escapedString = this.replace(/[\x00-\x1f\\]/g, function(character) {
-      if (character in String.specialChar) {
-        return String.specialChar[character];
-      }
-      return '\\u00' + character.charCodeAt().toPaddedString(2, 16);
-    });
-    if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
-    return "'" + escapedString.replace(/'/g, '\\\'') + "'";
-  }
-
-  function toJSON() {
-    return this.inspect(true);
-  }
-
-  function unfilterJSON(filter) {
-    return this.replace(filter || Prototype.JSONFilter, '$1');
-  }
-
-  function isJSON() {
-    var str = this;
-    if (str.blank()) return false;
-    str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
-    return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
-  }
-
-  function evalJSON(sanitize) {
-    var json = this.unfilterJSON();
-    try {
-      if (!sanitize || json.isJSON()) return eval('(' + json + ')');
-    } catch (e) { }
-    throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
-  }
-
-  function include(pattern) {
-    return this.indexOf(pattern) > -1;
-  }
-
-  function startsWith(pattern) {
-    return this.indexOf(pattern) === 0;
-  }
-
-  function endsWith(pattern) {
-    var d = this.length - pattern.length;
-    return d >= 0 && this.lastIndexOf(pattern) === d;
-  }
-
-  function empty() {
-    return this == '';
-  }
-
-  function blank() {
-    return /^\s*$/.test(this);
-  }
-
-  function interpolate(object, pattern) {
-    return new Template(this, pattern).evaluate(object);
-  }
-
-  return {
-    gsub:           gsub,
-    sub:            sub,
-    scan:           scan,
-    truncate:       truncate,
-    strip:          String.prototype.trim ? String.prototype.trim : strip,
-    stripTags:      stripTags,
-    stripScripts:   stripScripts,
-    extractScripts: extractScripts,
-    evalScripts:    evalScripts,
-    escapeHTML:     escapeHTML,
-    unescapeHTML:   unescapeHTML,
-    toQueryParams:  toQueryParams,
-    parseQuery:     toQueryParams,
-    toArray:        toArray,
-    succ:           succ,
-    times:          times,
-    camelize:       camelize,
-    capitalize:     capitalize,
-    underscore:     underscore,
-    dasherize:      dasherize,
-    inspect:        inspect,
-    toJSON:         toJSON,
-    unfilterJSON:   unfilterJSON,
-    isJSON:         isJSON,
-    evalJSON:       evalJSON,
-    include:        include,
-    startsWith:     startsWith,
-    endsWith:       endsWith,
-    empty:          empty,
-    blank:          blank,
-    interpolate:    interpolate
-  };
-})());
-
-var Template = Class.create({
-  initialize: function(template, pattern) {
-    this.template = template.toString();
-    this.pattern = pattern || Template.Pattern;
-  },
-
-  evaluate: function(object) {
-    if (object && Object.isFunction(object.toTemplateReplacements))
-      object = object.toTemplateReplacements();
-
-    return this.template.gsub(this.pattern, function(match) {
-      if (object == null) return (match[1] + '');
-
-      var before = match[1] || '';
-      if (before == '\\') return match[2];
-
-      var ctx = object, expr = match[3];
-      var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
-      match = pattern.exec(expr);
-      if (match == null) return before;
-
-      while (match != null) {
-        var comp = match[1].startsWith('[') ? match[2].replace(/\\\\]/g, ']') : match[1];
-        ctx = ctx[comp];
-        if (null == ctx || '' == match[3]) break;
-        expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
-        match = pattern.exec(expr);
-      }
-
-      return before + String.interpret(ctx);
-    });
-  }
-});
-Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
-
-var $break = { };
-
-var Enumerable = (function() {
-  function each(iterator, context) {
-    var index = 0;
-    try {
-      this._each(function(value) {
-        iterator.call(context, value, index++);
-      });
-    } catch (e) {
-      if (e != $break) throw e;
-    }
-    return this;
-  }
-
-  function eachSlice(number, iterator, context) {
-    var index = -number, slices = [], array = this.toArray();
-    if (number < 1) return array;
-    while ((index += number) < array.length)
-      slices.push(array.slice(index, index+number));
-    return slices.collect(iterator, context);
-  }
-
-  function all(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var result = true;
-    this.each(function(value, index) {
-      result = result && !!iterator.call(context, value, index);
-      if (!result) throw $break;
-    });
-    return result;
-  }
-
-  function any(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var result = false;
-    this.each(function(value, index) {
-      if (result = !!iterator.call(context, value, index))
-        throw $break;
-    });
-    return result;
-  }
-
-  function collect(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var results = [];
-    this.each(function(value, index) {
-      results.push(iterator.call(context, value, index));
-    });
-    return results;
-  }
-
-  function detect(iterator, context) {
-    var result;
-    this.each(function(value, index) {
-      if (iterator.call(context, value, index)) {
-        result = value;
-        throw $break;
-      }
-    });
-    return result;
-  }
-
-  function findAll(iterator, context) {
-    var results = [];
-    this.each(function(value, index) {
-      if (iterator.call(context, value, index))
-        results.push(value);
-    });
-    return results;
-  }
-
-  function grep(filter, iterator, context) {
-    iterator = iterator || Prototype.K;
-    var results = [];
-
-    if (Object.isString(filter))
-      filter = new RegExp(RegExp.escape(filter));
-
-    this.each(function(value, index) {
-      if (filter.match(value))
-        results.push(iterator.call(context, value, index));
-    });
-    return results;
-  }
-
-  function include(object) {
-    if (Object.isFunction(this.indexOf))
-      if (this.indexOf(object) != -1) return true;
-
-    var found = false;
-    this.each(function(value) {
-      if (value == object) {
-        found = true;
-        throw $break;
-      }
-    });
-    return found;
-  }
-
-  function inGroupsOf(number, fillWith) {
-    fillWith = Object.isUndefined(fillWith) ? null : fillWith;
-    return this.eachSlice(number, function(slice) {
-      while(slice.length < number) slice.push(fillWith);
-      return slice;
-    });
-  }
-
-  function inject(memo, iterator, context) {
-    this.each(function(value, index) {
-      memo = iterator.call(context, memo, value, index);
-    });
-    return memo;
-  }
-
-  function invoke(method) {
-    var args = $A(arguments).slice(1);
-    return this.map(function(value) {
-      return value[method].apply(value, args);
-    });
-  }
-
-  function max(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var result;
-    this.each(function(value, index) {
-      value = iterator.call(context, value, index);
-      if (result == null || value >= result)
-        result = value;
-    });
-    return result;
-  }
-
-  function min(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var result;
-    this.each(function(value, index) {
-      value = iterator.call(context, value, index);
-      if (result == null || value < result)
-        result = value;
-    });
-    return result;
-  }
-
-  function partition(iterator, context) {
-    iterator = iterator || Prototype.K;
-    var trues = [], falses = [];
-    this.each(function(value, index) {
-      (iterator.call(context, value, index) ?
-        trues : falses).push(value);
-    });
-    return [trues, falses];
-  }
-
-  function pluck(property) {
-    var results = [];
-    this.each(function(value) {
-      results.push(value[property]);
-    });
-    return results;
-  }
-
-  function reject(iterator, context) {
-    var results = [];
-    this.each(function(value, index) {
-      if (!iterator.call(context, value, index))
-        results.push(value);
-    });
-    return results;
-  }
-
-  function sortBy(iterator, context) {
-    return this.map(function(value, index) {
-      return {
-        value: value,
-        criteria: iterator.call(context, value, index)
-      };
-    }).sort(function(left, right) {
-      var a = left.criteria, b = right.criteria;
-      return a < b ? -1 : a > b ? 1 : 0;
-    }).pluck('value');
-  }
-
-  function toArray() {
-    return this.map();
-  }
-
-  function zip() {
-    var iterator = Prototype.K, args = $A(arguments);
-    if (Object.isFunction(args.last()))
-      iterator = args.pop();
-
-    var collections = [this].concat(args).map($A);
-    return this.map(function(value, index) {
-      return iterator(collections.pluck(index));
-    });
-  }
-
-  function size() {
-    return this.toArray().length;
-  }
-
-  function inspect() {
-    return '#<Enumerable:' + this.toArray().inspect() + '>';
-  }
-
-
-
-
-
-
-
-
-
-  return {
-    each:       each,
-    eachSlice:  eachSlice,
-    all:        all,
-    every:      all,
-    any:        any,
-    some:       any,
-    collect:    collect,
-    map:        collect,
-    detect:     detect,
-    findAll:    findAll,
-    select:     findAll,
-    filter:     findAll,
-    grep:       grep,
-    include:    include,
-    member:     include,
-    inGroupsOf: inGroupsOf,
-    inject:     inject,
-    invoke:     invoke,
-    max:        max,
-    min:        min,
-    partition:  partition,
-    pluck:      pluck,
-    reject:     reject,
-    sortBy:     sortBy,
-    toArray:    toArray,
-    entries:    toArray,
-    zip:        zip,
-    size:       size,
-    inspect:    inspect,
-    find:       detect
-  };
-})();
-function $A(iterable) {
-  if (!iterable) return [];
-  if ('toArray' in Object(iterable)) return iterable.toArray();
-  var length = iterable.length || 0, results = new Array(length);
-  while (length--) results[length] = iterable[length];
-  return results;
-}
-
-function $w(string) {
-  if (!Object.isString(string)) return [];
-  string = string.strip();
-  return string ? string.split(/\s+/) : [];
-}
-
-Array.from = $A;
-
-
-(function() {
-  var arrayProto = Array.prototype,
-      slice = arrayProto.slice,
-      _each = arrayProto.forEach; // use native browser JS 1.6 implementation if available
-
-  function each(iterator) {
-    for (var i = 0, length = this.length; i < length; i++)
-      iterator(this[i]);
-  }
-  if (!_each) _each = each;
-
-  function clear() {
-    this.length = 0;
-    return this;
-  }
-
-  function first() {
-    return this[0];
-  }
-
-  function last() {
-    return this[this.length - 1];
-  }
-
-  function compact() {
-    return this.select(function(value) {
-      return value != null;
-    });
-  }
-
-  function flatten() {
-    return this.inject([], function(array, value) {
-      if (Object.isArray(value))
-        return array.concat(value.flatten());
-      array.push(value);
-      return array;
-    });
-  }
-
-  function without() {
-    var values = slice.call(arguments, 0);
-    return this.select(function(value) {
-      return !values.include(value);
-    });
-  }
-
-  function reverse(inline) {
-    return (inline !== false ? this : this.toArray())._reverse();
-  }
-
-  function uniq(sorted) {
-    return this.inject([], function(array, value, index) {
-      if (0 == index || (sorted ? array.last() != value : !array.include(value)))
-        array.push(value);
-      return array;
-    });
-  }
-
-  function intersect(array) {
-    return this.uniq().findAll(function(item) {
-      return array.detect(function(value) { return item === value });
-    });
-  }
-
-
-  function clone() {
-    return slice.call(this, 0);
-  }
-
-  function size() {
-    return this.length;
-  }
-
-  function inspect() {
-    return '[' + this.map(Object.inspect).join(', ') + ']';
-  }
-
-  function toJSON() {
-    var results = [];
-    this.each(function(object) {
-      var value = Object.toJSON(object);
-      if (!Object.isUndefined(value)) results.push(value);
-    });
-    return '[' + results.join(', ') + ']';
-  }
-
-  function indexOf(item, i) {
-    i || (i = 0);
-    var length = this.length;
-    if (i < 0) i = length + i;
-    for (; i < length; i++)
-      if (this[i] === item) return i;
-    return -1;
-  }
-
-  function lastIndexOf(item, i) {
-    i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
-    var n = this.slice(0, i).reverse().indexOf(item);
-    return (n < 0) ? n : i - n - 1;
-  }
-
-  function concat() {
-    var array = slice.call(this, 0), item;
-    for (var i = 0, length = arguments.length; i < length; i++) {
-      item = arguments[i];
-      if (Object.isArray(item) && !('callee' in item)) {
-        for (var j = 0, arrayLength = item.length; j < arrayLength; j++)
-          array.push(item[j]);
-      } else {
-        array.push(item);
-      }
-    }
-    return array;
-  }
-
-  Object.extend(arrayProto, Enumerable);
-
-  if (!arrayProto._reverse)
-    arrayProto._reverse = arrayProto.reverse;
-
-  Object.extend(arrayProto, {
-    _each:     _each,
-    clear:     clear,
-    first:     first,
-    last:      last,
-    compact:   compact,
-    flatten:   flatten,
-    without:   without,
-    reverse:   reverse,
-    uniq:      uniq,
-    intersect: intersect,
-    clone:     clone,
-    toArray:   clone,
-    size:      size,
-    inspect:   inspect,
-    toJSON:    toJSON
-  });
-
-  var CONCAT_ARGUMENTS_BUGGY = (function() {
-    return [].concat(arguments)[0][0] !== 1;
-  })(1,2)
-
-  if (CONCAT_ARGUMENTS_BUGGY) arrayProto.concat = concat;
-
-  if (!arrayProto.indexOf) arrayProto.indexOf = indexOf;
-  if (!arrayProto.lastIndexOf) arrayProto.lastIndexOf = lastIndexOf;
-})();
-function $H(object) {
-  return new Hash(object);
-};
-
-var Hash = Class.create(Enumerable, (function() {
-  function initialize(object) {
-    this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
-  }
-
-  function _each(iterator) {
-    for (var key in this._object) {
-      var value = this._object[key], pair = [key, value];
-      pair.key = key;
-      pair.value = value;
-      iterator(pair);
-    }
-  }
-
-  function set(key, value) {
-    return this._object[key] = value;
-  }
-
-  function get(key) {
-    if (this._object[key] !== Object.prototype[key])
-      return this._object[key];
-  }
-
-  function unset(key) {
-    var value = this._object[key];
-    delete this._object[key];
-    return value;
-  }
-
-  function toObject() {
-    return Object.clone(this._object);
-  }
-
-  function keys() {
-    return this.pluck('key');
-  }
-
-  function values() {
-    return this.pluck('value');
-  }
-
-  function index(value) {
-    var match = this.detect(function(pair) {
-      return pair.value === value;
-    });
-    return match && match.key;
-  }
-
-  function merge(object) {
-    return this.clone().update(object);
-  }
-
-  function update(object) {
-    return new Hash(object).inject(this, function(result, pair) {
-      result.set(pair.key, pair.value);
-      return result;
-    });
-  }
-
-  function toQueryPair(key, value) {
-    if (Object.isUndefined(value)) return key;
-    return key + '=' + encodeURIComponent(String.interpret(value));
-  }
-
-  function toQueryString() {
-    return this.inject([], function(results, pair) {
-      var key = encodeURIComponent(pair.key), values = pair.value;
-
-      if (values && typeof values == 'object') {
-        if (Object.isArray(values))
-          return results.concat(values.map(toQueryPair.curry(key)));
-      } else results.push(toQueryPair(key, values));
-      return results;
-    }).join('&');
-  }
-
-  function inspect() {
-    return '#<Hash:{' + this.map(function(pair) {
-      return pair.map(Object.inspect).join(': ');
-    }).join(', ') + '}>';
-  }
-
-  function toJSON() {
-    return Object.toJSON(this.toObject());
-  }
-
-  function clone() {
-    return new Hash(this);
-  }
-
-  return {
-    initialize:             initialize,
-    _each:                  _each,
-    set:                    set,
-    get:                    get,
-    unset:                  unset,
-    toObject:               toObject,
-    toTemplateReplacements: toObject,
-    keys:                   keys,
-    values:                 values,
-    index:                  index,
-    merge:                  merge,
-    update:                 update,
-    toQueryString:          toQueryString,
-    inspect:                inspect,
-    toJSON:                 toJSON,
-    clone:                  clone
-  };
-})());
-
-Hash.from = $H;
-Object.extend(Number.prototype, (function() {
-  function toColorPart() {
-    return this.toPaddedString(2, 16);
-  }
-
-  function succ() {
-    return this + 1;
-  }
-
-  function times(iterator, context) {
-    $R(0, this, true).each(iterator, context);
-    return this;
-  }
-
-  function toPaddedString(length, radix) {
-    var string = this.toString(radix || 10);
-    return '0'.times(length - string.length) + string;
-  }
-
-  function toJSON() {
-    return isFinite(this) ? this.toString() : 'null';
-  }
-
-  function abs() {
-    return Math.abs(this);
-  }
-
-  function round() {
-    return Math.round(this);
-  }
-
-  function ceil() {
-    return Math.ceil(this);
-  }
-
-  function floor() {
-    return Math.floor(this);
-  }
-
-  return {
-    toColorPart:    toColorPart,
-    succ:           succ,
-    times:          times,
-    toPaddedString: toPaddedString,
-    toJSON:         toJSON,
-    abs:            abs,
-    round:          round,
-    ceil:           ceil,
-    floor:          floor
-  };
-})());
-
-function $R(start, end, exclusive) {
-  return new ObjectRange(start, end, exclusive);
-}
-
-var ObjectRange = Class.create(Enumerable, (function() {
-  function initialize(start, end, exclusive) {
-    this.start = start;
-    this.end = end;
-    this.exclusive = exclusive;
-  }
-
-  function _each(iterator) {
-    var value = this.start;
-    while (this.include(value)) {
-      iterator(value);
-      value = value.succ();
-    }
-  }
-
-  function include(value) {
-    if (value < this.start)
-      return false;
-    if (this.exclusive)
-      return value < this.end;
-    return value <= this.end;
-  }
-
-  return {
-    initialize: initialize,
-    _each:      _each,
-    include:    include
-  };
-})());
-
-
-
-var Ajax = {
-  getTransport: function() {
-    return Try.these(
-      function() {return new XMLHttpRequest()},
-      function() {return new ActiveXObject('Msxml2.XMLHTTP')},
-      function() {return new ActiveXObject('Microsoft.XMLHTTP')}
-    ) || false;
-  },
-
-  activeRequestCount: 0
-};
-
-Ajax.Responders = {
-  responders: [],
-
-  _each: function(iterator) {
-    this.responders._each(iterator);
-  },
-
-  register: function(responder) {
-    if (!this.include(responder))
-      this.responders.push(responder);
-  },
-
-  unregister: function(responder) {
-    this.responders = this.responders.without(responder);
-  },
-
-  dispatch: function(callback, request, transport, json) {
-    this.each(function(responder) {
-      if (Object.isFunction(responder[callback])) {
-        try {
-          responder[callback].apply(responder, [request, transport, json]);
-        } catch (e) { }
-      }
-    });
-  }
-};
-
-Object.extend(Ajax.Responders, Enumerable);
-
-Ajax.Responders.register({
-  onCreate:   function() { Ajax.activeRequestCount++ },
-  onComplete: function() { Ajax.activeRequestCount-- }
-});
-Ajax.Base = Class.create({
-  initialize: function(options) {
-    this.options = {
-      method:       'post',
-      asynchronous: true,
-      contentType:  'application/x-www-form-urlencoded',
-      encoding:     'UTF-8',
-      parameters:   '',
-      evalJSON:     true,
-      evalJS:       true
-    };
-    Object.extend(this.options, options || { });
-
-    this.options.method = this.options.method.toLowerCase();
-
-    if (Object.isString(this.options.parameters))
-      this.options.parameters = this.options.parameters.toQueryParams();
-    else if (Object.isHash(this.options.parameters))
-      this.options.parameters = this.options.parameters.toObject();
-  }
-});
-Ajax.Request = Class.create(Ajax.Base, {
-  _complete: false,
-
-  initialize: function($super, url, options) {
-    $super(options);
-    this.transport = Ajax.getTransport();
-    this.request(url);
-  },
-
-  request: function(url) {
-    this.url = url;
-    this.method = this.options.method;
-    var params = Object.clone(this.options.parameters);
-
-    if (!['get', 'post'].include(this.method)) {
-      params['_method'] = this.method;
-      this.method = 'post';
-    }
-
-    this.parameters = params;
-
-    if (params = Object.toQueryString(params)) {
-      if (this.method == 'get')
-        this.url += (this.url.include('?') ? '&' : '?') + params;
-      else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
-        params += '&_=';
-    }
-
-    try {
-      var response = new Ajax.Response(this);
-      if (this.options.onCreate) this.options.onCreate(response);
-      Ajax.Responders.dispatch('onCreate', this, response);
-
-      this.transport.open(this.method.toUpperCase(), this.url,
-        this.options.asynchronous);
-
-      if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
-
-      this.transport.onreadystatechange = this.onStateChange.bind(this);
-      this.setRequestHeaders();
-
-      this.body = this.method == 'post' ? (this.options.postBody || params) : null;
-      this.transport.send(this.body);
-
-      /* Force Firefox to handle ready state 4 for synchronous requests */
-      if (!this.options.asynchronous && this.transport.overrideMimeType)
-        this.onStateChange();
-
-    }
-    catch (e) {
-      this.dispatchException(e);
-    }
-  },
-
-  onStateChange: function() {
-    var readyState = this.transport.readyState;
-    if (readyState > 1 && !((readyState == 4) && this._complete))
-      this.respondToReadyState(this.transport.readyState);
-  },
-
-  setRequestHeaders: function() {
-    var headers = {
-      'X-Requested-With': 'XMLHttpRequest',
-      'X-Prototype-Version': Prototype.Version,
-      'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
-    };
-
-    if (this.method == 'post') {
-      headers['Content-type'] = this.options.contentType +
-        (this.options.encoding ? '; charset=' + this.options.encoding : '');
-
-      /* Force "Connection: close" for older Mozilla browsers to work
-       * around a bug where XMLHttpRequest sends an incorrect
-       * Content-length header. See Mozilla Bugzilla #246651.
-       */
-      if (this.transport.overrideMimeType &&
-          (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
-            headers['Connection'] = 'close';
-    }
-
-    if (typeof this.options.requestHeaders == 'object') {
-      var extras = this.options.requestHeaders;
-
-      if (Object.isFunction(extras.push))
-        for (var i = 0, length = extras.length; i < length; i += 2)
-          headers[extras[i]] = extras[i+1];
-      else
-        $H(extras).each(function(pair) { headers[pair.key] = pair.value });
-    }
-
-    for (var name in headers)
-      this.transport.setRequestHeader(name, headers[name]);
-  },
-
-  success: function() {
-    var status = this.getStatus();
-    return !status || (status >= 200 && status < 300);
-  },
-
-  getStatus: function() {
-    try {
-      return this.transport.status || 0;
-    } catch (e) { return 0 }
-  },
-
-  respondToReadyState: function(readyState) {
-    var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
-
-    if (state == 'Complete') {
-      try {
-        this._complete = true;
-        (this.options['on' + response.status]
-         || this.options['on' + (this.success() ? 'Success' : 'Failure')]
-         || Prototype.emptyFunction)(response, response.headerJSON);
-      } catch (e) {
-        this.dispatchException(e);
-      }
-
-      var contentType = response.getHeader('Content-type');
-      if (this.options.evalJS == 'force'
-          || (this.options.evalJS && this.isSameOrigin() && contentType
-          && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
-        this.evalResponse();
-    }
-
-    try {
-      (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
-      Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
-    } catch (e) {
-      this.dispatchException(e);
-    }
-
-    if (state == 'Complete') {
-      this.transport.onreadystatechange = Prototype.emptyFunction;
-    }
-  },
-
-  isSameOrigin: function() {
-    var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
-    return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
-      protocol: location.protocol,
-      domain: document.domain,
-      port: location.port ? ':' + location.port : ''
-    }));
-  },
-
-  getHeader: function(name) {
-    try {
-      return this.transport.getResponseHeader(name) || null;
-    } catch (e) { return null; }
-  },
-
-  evalResponse: function() {
-    try {
-      return eval((this.transport.responseText || '').unfilterJSON());
-    } catch (e) {
-      this.dispatchException(e);
-    }
-  },
-
-  dispatchException: function(exception) {
-    (this.options.onException || Prototype.emptyFunction)(this, exception);
-    Ajax.Responders.dispatch('onException', this, exception);
-  }
-});
-
-Ajax.Request.Events =
-  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
-
-
-
-
-
-
-
-
-Ajax.Response = Class.create({
-  initialize: function(request){
-    this.request = request;
-    var transport  = this.transport  = request.transport,
-        readyState = this.readyState = transport.readyState;
-
-    if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
-      this.status       = this.getStatus();
-      this.statusText   = this.getStatusText();
-      this.responseText = String.interpret(transport.responseText);
-      this.headerJSON   = this._getHeaderJSON();
-    }
-
-    if(readyState == 4) {
-      var xml = transport.responseXML;
-      this.responseXML  = Object.isUndefined(xml) ? null : xml;
-      this.responseJSON = this._getResponseJSON();
-    }
-  },
-
-  status:      0,
-
-  statusText: '',
-
-  getStatus: Ajax.Request.prototype.getStatus,
-
-  getStatusText: function() {
-    try {
-      return this.transport.statusText || '';
-    } catch (e) { return '' }
-  },
-
-  getHeader: Ajax.Request.prototype.getHeader,
-
-  getAllHeaders: function() {
-    try {
-      return this.getAllResponseHeaders();
-    } catch (e) { return null }
-  },
-
-  getResponseHeader: function(name) {
-    return this.transport.getResponseHeader(name);
-  },
-
-  getAllResponseHeaders: function() {
-    return this.transport.getAllResponseHeaders();
-  },
-
-  _getHeaderJSON: function() {
-    var json = this.getHeader('X-JSON');
-    if (!json) return null;
-    json = decodeURIComponent(escape(json));
-    try {
-      return json.evalJSON(this.request.options.sanitizeJSON ||
-        !this.request.isSameOrigin());
-    } catch (e) {
-      this.request.dispatchException(e);
-    }
-  },
-
-  _getResponseJSON: function() {
-    var options = this.request.options;
-    if (!options.evalJSON || (options.evalJSON != 'force' &&
-      !(this.getHeader('Content-type') || '').include('application/json')) ||
-        this.responseText.blank())
-          return null;
-    try {
-      return this.responseText.evalJSON(options.sanitizeJSON ||
-        !this.request.isSameOrigin());
-    } catch (e) {
-      this.request.dispatchException(e);
-    }
-  }
-});
-
-Ajax.Updater = Class.create(Ajax.Request, {
-  initialize: function($super, container, url, options) {
-    this.container = {
-      success: (container.success || container),
-      failure: (container.failure || (container.success ? null : container))
-    };
-
-    options = Object.clone(options);
-    var onComplete = options.onComplete;
-    options.onComplete = (function(response, json) {
-      this.updateContent(response.responseText);
-      if (Object.isFunction(onComplete)) onComplete(response, json);
-    }).bind(this);
-
-    $super(url, options);
-  },
-
-  updateContent: function(responseText) {
-    var receiver = this.container[this.success() ? 'success' : 'failure'],
-        options = this.options;
-
-    if (!options.evalScripts) responseText = responseText.stripScripts();
-
-    if (receiver = $(receiver)) {
-      if (options.insertion) {
-        if (Object.isString(options.insertion)) {
-          var insertion = { }; insertion[options.insertion] = responseText;
-          receiver.insert(insertion);
-        }
-        else options.insertion(receiver, responseText);
-      }
-      else receiver.update(responseText);
-    }
-  }
-});
-
-Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
-  initialize: function($super, container, url, options) {
-    $super(options);
-    this.onComplete = this.options.onComplete;
-
-    this.frequency = (this.options.frequency || 2);
-    this.decay = (this.options.decay || 1);
-
-    this.updater = { };
-    this.container = container;
-    this.url = url;
-
-    this.start();
-  },
-
-  start: function() {
-    this.options.onComplete = this.updateComplete.bind(this);
-    this.onTimerEvent();
-  },
-
-  stop: function() {
-    this.updater.options.onComplete = undefined;
-    clearTimeout(this.timer);
-    (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
-  },
-
-  updateComplete: function(response) {
-    if (this.options.decay) {
-      this.decay = (response.responseText == this.lastText ?
-        this.decay * this.options.decay : 1);
-
-      this.lastText = response.responseText;
-    }
-    this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
-  },
-
-  onTimerEvent: function() {
-    this.updater = new Ajax.Updater(this.container, this.url, this.options);
-  }
-});
-
-
-
-function $(element) {
-  if (arguments.length > 1) {
-    for (var i = 0, elements = [], length = arguments.length; i < length; i++)
-      elements.push($(arguments[i]));
-    return elements;
-  }
-  if (Object.isString(element))
-    element = document.getElementById(element);
-  return Element.extend(element);
-}
-
-if (Prototype.BrowserFeatures.XPath) {
-  document._getElementsByXPath = function(expression, parentElement) {
-    var results = [];
-    var query = document.evaluate(expression, $(parentElement) || document,
-      null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
-    for (var i = 0, length = query.snapshotLength; i < length; i++)
-      results.push(Element.extend(query.snapshotItem(i)));
-    return results;
-  };
-}
-
-/*--------------------------------------------------------------------------*/
-
-if (!window.Node) var Node = { };
-
-if (!Node.ELEMENT_NODE) {
-  Object.extend(Node, {
-    ELEMENT_NODE: 1,
-    ATTRIBUTE_NODE: 2,
-    TEXT_NODE: 3,
-    CDATA_SECTION_NODE: 4,
-    ENTITY_REFERENCE_NODE: 5,
-    ENTITY_NODE: 6,
-    PROCESSING_INSTRUCTION_NODE: 7,
-    COMMENT_NODE: 8,
-    DOCUMENT_NODE: 9,
-    DOCUMENT_TYPE_NODE: 10,
-    DOCUMENT_FRAGMENT_NODE: 11,
-    NOTATION_NODE: 12
-  });
-}
-
-
-(function(global) {
-
-  var SETATTRIBUTE_IGNORES_NAME = (function(){
-    var elForm = document.createElement("form");
-    var elInput = document.createElement("input");
-    var root = document.documentElement;
-    elInput.setAttribute("name", "test");
-    elForm.appendChild(elInput);
-    root.appendChild(elForm);
-    var isBuggy = elForm.elements
-      ? (typeof elForm.elements.test == "undefined")
-      : null;
-    root.removeChild(elForm);
-    elForm = elInput = null;
-    return isBuggy;
-  })();
-
-  var element = global.Element;
-  global.Element = function(tagName, attributes) {
-    attributes = attributes || { };
-    tagName = tagName.toLowerCase();
-    var cache = Element.cache;
-    if (SETATTRIBUTE_IGNORES_NAME && attributes.name) {
-      tagName = '<' + tagName + ' name="' + attributes.name + '">';
-      delete attributes.name;
-      return Element.writeAttribute(document.createElement(tagName), attributes);
-    }
-    if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
-    return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
-  };
-  Object.extend(global.Element, element || { });
-  if (element) global.Element.prototype = element.prototype;
-})(this);
-
-Element.cache = { };
-Element.idCounter = 1;
-
-Element.Methods = {
-  visible: function(element) {
-    return $(element).style.display != 'none';
-  },
-
-  toggle: function(element) {
-    element = $(element);
-    Element[Element.visible(element) ? 'hide' : 'show'](element);
-    return element;
-  },
-
-
-  hide: function(element) {
-    element = $(element);
-    element.style.display = 'none';
-    return element;
-  },
-
-  show: function(element) {
-    element = $(element);
-    element.style.display = '';
-    return element;
-  },
-
-  remove: function(element) {
-    element = $(element);
-    element.parentNode.removeChild(element);
-    return element;
-  },
-
-  update: (function(){
-
-    var SELECT_ELEMENT_INNERHTML_BUGGY = (function(){
-      var el = document.createElement("select"),
-          isBuggy = true;
-      el.innerHTML = "<option value=\"test\">test</option>";
-      if (el.options && el.options[0]) {
-        isBuggy = el.options[0].nodeName.toUpperCase() !== "OPTION";
-      }
-      el = null;
-      return isBuggy;
-    })();
-
-    var TABLE_ELEMENT_INNERHTML_BUGGY = (function(){
-      try {
-        var el = document.createElement("table");
-        if (el && el.tBodies) {
-          el.innerHTML = "<tbody><tr><td>test</td></tr></tbody>";
-          var isBuggy = typeof el.tBodies[0] == "undefined";
-          el = null;
-          return isBuggy;
-        }
-      } catch (e) {
-        return true;
-      }
-    })();
-
-    var SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING = (function () {
-      var s = document.createElement("script"),
-          isBuggy = false;
-      try {
-        s.appendChild(document.createTextNode(""));
-        isBuggy = !s.firstChild ||
-          s.firstChild && s.firstChild.nodeType !== 3;
-      } catch (e) {
-        isBuggy = true;
-      }
-      s = null;
-      return isBuggy;
-    })();
-
-    function update(element, content) {
-      element = $(element);
-
-      if (content && content.toElement)
-        content = content.toElement();
-
-      if (Object.isElement(content))
-        return element.update().insert(content);
-
-      content = Object.toHTML(content);
-
-      var tagName = element.tagName.toUpperCase();
-
-      if (tagName === 'SCRIPT' && SCRIPT_ELEMENT_REJECTS_TEXTNODE_APPENDING) {
-        element.text = content;
-        return element;
-      }
-
-      if (SELECT_ELEMENT_INNERHTML_BUGGY || TABLE_ELEMENT_INNERHTML_BUGGY) {
-        if (tagName in Element._insertionTranslations.tags) {
-          while (element.firstChild) {
-            element.removeChild(element.firstChild);
-          }
-          Element._getContentFromAnonymousElement(tagName, content.stripScripts())
-            .each(function(node) {
-              element.appendChild(node)
-            });
-        }
-        else {
-          element.innerHTML = content.stripScripts();
-        }
-      }
-      else {
-        element.innerHTML = content.stripScripts();
-      }
-
-      content.evalScripts.bind(content).defer();
-      return element;
-    }
-
-    return update;
-  })(),
-
-  replace: function(element, content) {
-    element = $(element);
-    if (content && content.toElement) content = content.toElement();
-    else if (!Object.isElement(content)) {
-      content = Object.toHTML(content);
-      var range = element.ownerDocument.createRange();
-      range.selectNode(element);
-      content.evalScripts.bind(content).defer();
-      content = range.createContextualFragment(content.stripScripts());
-    }
-    element.parentNode.replaceChild(content, element);
-    return element;
-  },
-
-  insert: function(element, insertions) {
-    element = $(element);
-
-    if (Object.isString(insertions) || Object.isNumber(insertions) ||
-        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
-          insertions = {bottom:insertions};
-
-    var content, insert, tagName, childNodes;
-
-    for (var position in insertions) {
-      content  = insertions[position];
-      position = position.toLowerCase();
-      insert = Element._insertionTranslations[position];
-
-      if (content && content.toElement) content = content.toElement();
-      if (Object.isElement(content)) {
-        insert(element, content);
-        continue;
-      }
-
-      content = Object.toHTML(content);
-
-      tagName = ((position == 'before' || position == 'after')
-        ? element.parentNode : element).tagName.toUpperCase();
-
-      childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
-
-      if (position == 'top' || position == 'after') childNodes.reverse();
-      childNodes.each(insert.curry(element));
-
-      content.evalScripts.bind(content).defer();
-    }
-
-    return element;
-  },
-
-  wrap: function(element, wrapper, attributes) {
-    element = $(element);
-    if (Object.isElement(wrapper))
-      $(wrapper).writeAttribute(attributes || { });
-    else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
-    else wrapper = new Element('div', wrapper);
-    if (element.parentNode)
-      element.parentNode.replaceChild(wrapper, element);
-    wrapper.appendChild(element);
-    return wrapper;
-  },
-
-  inspect: function(element) {
-    element = $(element);
-    var result = '<' + element.tagName.toLowerCase();
-    $H({'id': 'id', 'className': 'class'}).each(function(pair) {
-      var property = pair.first(), attribute = pair.last();
-      var value = (element[property] || '').toString();
-      if (value) result += ' ' + attribute + '=' + value.inspect(true);
-    });
-    return result + '>';
-  },
-
-  recursivelyCollect: function(element, property) {
-    element = $(element);
-    var elements = [];
-    while (element = element[property])
-      if (element.nodeType == 1)
-        elements.push(Element.extend(element));
-    return elements;
-  },
-
-  ancestors: function(element) {
-    return Element.recursivelyCollect(element, 'parentNode');
-  },
-
-  descendants: function(element) {
-    return Element.select(element, "*");
-  },
-
-  firstDescendant: function(element) {
-    element = $(element).firstChild;
-    while (element && element.nodeType != 1) element = element.nextSibling;
-    return $(element);
-  },
-
-  immediateDescendants: function(element) {
-    if (!(element = $(element).firstChild)) return [];
-    while (element && element.nodeType != 1) element = element.nextSibling;
-    if (element) return [element].concat($(element).nextSiblings());
-    return [];
-  },
-
-  previousSiblings: function(element) {
-    return Element.recursivelyCollect(element, 'previousSibling');
-  },
-
-  nextSiblings: function(element) {
-    return Element.recursivelyCollect(element, 'nextSibling');
-  },
-
-  siblings: function(element) {
-    element = $(element);
-    return Element.previousSiblings(element).reverse()
-      .concat(Element.nextSiblings(element));
-  },
-
-  match: function(element, selector) {
-    if (Object.isString(selector))
-      selector = new Selector(selector);
-    return selector.match($(element));
-  },
-
-  up: function(element, expression, index) {
-    element = $(element);
-    if (arguments.length == 1) return $(element.parentNode);
-    var ancestors = Element.ancestors(element);
-    return Object.isNumber(expression) ? ancestors[expression] :
-      Selector.findElement(ancestors, expression, index);
-  },
-
-  down: function(element, expression, index) {
-    element = $(element);
-    if (arguments.length == 1) return Element.firstDescendant(element);
-    return Object.isNumber(expression) ? Element.descendants(element)[expression] :
-      Element.select(element, expression)[index || 0];
-  },
-
-  previous: function(element, expression, index) {
-    element = $(element);
-    if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
-    var previousSiblings = Element.previousSiblings(element);
-    return Object.isNumber(expression) ? previousSiblings[expression] :
-      Selector.findElement(previousSiblings, expression, index);
-  },
-
-  next: function(element, expression, index) {
-    element = $(element);
-    if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
-    var nextSiblings = Element.nextSiblings(element);
-    return Object.isNumber(expression) ? nextSiblings[expression] :
-      Selector.findElement(nextSiblings, expression, index);
-  },
-
-
-  select: function(element) {
-    var args = Array.prototype.slice.call(arguments, 1);
-    return Selector.findChildElements(element, args);
-  },
-
-  adjacent: function(element) {
-    var args = Array.prototype.slice.call(arguments, 1);
-    return Selector.findChildElements(element.parentNode, args).without(element);
-  },
-
-  identify: function(element) {
-    element = $(element);
-    var id = Element.readAttribute(element, 'id');
-    if (id) return id;
-    do { id = 'anonymous_element_' + Element.idCounter++ } while ($(id));
-    Element.writeAttribute(element, 'id', id);
-    return id;
-  },
-
-  readAttribute: function(element, name) {
-    element = $(element);
-    if (Prototype.Browser.IE) {
-      var t = Element._attributeTranslations.read;
-      if (t.values[name]) return t.values[name](element, name);
-      if (t.names[name]) name = t.names[name];
-      if (name.include(':')) {
-        return (!element.attributes || !element.attributes[name]) ? null :
-         element.attributes[name].value;
-      }
-    }
-    return element.getAttribute(name);
-  },
-
-  writeAttribute: function(element, name, value) {
-    element = $(element);
-    var attributes = { }, t = Element._attributeTranslations.write;
-
-    if (typeof name == 'object') attributes = name;
-    else attributes[name] = Object.isUndefined(value) ? true : value;
-
-    for (var attr in attributes) {
-      name = t.names[attr] || attr;
-      value = attributes[attr];
-      if (t.values[attr]) name = t.values[attr](element, value);
-      if (value === false || value === null)
-        element.removeAttribute(name);
-      else if (value === true)
-        element.setAttribute(name, name);
-      else element.setAttribute(name, value);
-    }
-    return element;
-  },
-
-  getHeight: function(element) {
-    return Element.getDimensions(element).height;
-  },
-
-  getWidth: function(element) {
-    return Element.getDimensions(element).width;
-  },
-
-  classNames: function(element) {
-    return new Element.ClassNames(element);
-  },
-
-  hasClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    var elementClassName = element.className;
-    return (elementClassName.length > 0 && (elementClassName == className ||
-      new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
-  },
-
-  addClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    if (!Element.hasClassName(element, className))
-      element.className += (element.className ? ' ' : '') + className;
-    return element;
-  },
-
-  removeClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    element.className = element.className.replace(
-      new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
-    return element;
-  },
-
-  toggleClassName: function(element, className) {
-    if (!(element = $(element))) return;
-    return Element[Element.hasClassName(element, className) ?
-      'removeClassName' : 'addClassName'](element, className);
-  },
-
-  cleanWhitespace: function(element) {
-    element = $(element);
-    var node = element.firstChild;
-    while (node) {
-      var nextNode = node.nextSibling;
-      if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
-        element.removeChild(node);
-      node = nextNode;
-    }
-    return element;
-  },
-
-  empty: function(element) {
-    return $(element).innerHTML.blank();
-  },
-
-  descendantOf: function(element, ancestor) {
-    element = $(element), ancestor = $(ancestor);
-
-    if (element.compareDocumentPosition)
-      return (element.compareDocumentPosition(ancestor) & 8) === 8;
-
-    if (ancestor.contains)
-      return ancestor.contains(element) && ancestor !== element;
-
-    while (element = element.parentNode)
-      if (element == ancestor) return true;
-
-    return false;
-  },
-
-  scrollTo: function(element) {
-    element = $(element);
-    var pos = Element.cumulativeOffset(element);
-    window.scrollTo(pos[0], pos[1]);
-    return element;
-  },
-
-  getStyle: function(element, style) {
-    element = $(element);
-    style = style == 'float' ? 'cssFloat' : style.camelize();
-    var value = element.style[style];
-    if (!value || value == 'auto') {
-      var css = document.defaultView.getComputedStyle(element, null);
-      value = css ? css[style] : null;
-    }
-    if (style == 'opacity') return value ? parseFloat(value) : 1.0;
-    return value == 'auto' ? null : value;
-  },
-
-  getOpacity: function(element) {
-    return $(element).getStyle('opacity');
-  },
-
-  setStyle: function(element, styles) {
-    element = $(element);
-    var elementStyle = element.style, match;
-    if (Object.isString(styles)) {
-      element.style.cssText += ';' + styles;
-      return styles.include('opacity') ?
-        element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
-    }
-    for (var property in styles)
-      if (property == 'opacity') element.setOpacity(styles[property]);
-      else
-        elementStyle[(property == 'float' || property == 'cssFloat') ?
-          (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
-            property] = styles[property];
-
-    return element;
-  },
-
-  setOpacity: function(element, value) {
-    element = $(element);
-    element.style.opacity = (value == 1 || value === '') ? '' :
-      (value < 0.00001) ? 0 : value;
-    return element;
-  },
-
-  getDimensions: function(element) {
-    element = $(element);
-    var display = Element.getStyle(element, 'display');
-    if (display != 'none' && display != null) // Safari bug
-      return {width: element.offsetWidth, height: element.offsetHeight};
-
-    var els = element.style;
-    var originalVisibility = els.visibility;
-    var originalPosition = els.position;
-    var originalDisplay = els.display;
-    els.visibility = 'hidden';
-    if (originalPosition != 'fixed') // Switching fixed to absolute causes issues in Safari
-      els.position = 'absolute';
-    els.display = 'block';
-    var originalWidth = element.clientWidth;
-    var originalHeight = element.clientHeight;
-    els.display = originalDisplay;
-    els.position = originalPosition;
-    els.visibility = originalVisibility;
-    return {width: originalWidth, height: originalHeight};
-  },
-
-  makePositioned: function(element) {
-    element = $(element);
-    var pos = Element.getStyle(element, 'position');
-    if (pos == 'static' || !pos) {
-      element._madePositioned = true;
-      element.style.position = 'relative';
-      if (Prototype.Browser.Opera) {
-        element.style.top = 0;
-        element.style.left = 0;
-      }
-    }
-    return element;
-  },
-
-  undoPositioned: function(element) {
-    element = $(element);
-    if (element._madePositioned) {
-      element._madePositioned = undefined;
-      element.style.position =
-        element.style.top =
-        element.style.left =
-        element.style.bottom =
-        element.style.right = '';
-    }
-    return element;
-  },
-
-  makeClipping: function(element) {
-    element = $(element);
-    if (element._overflow) return element;
-    element._overflow = Element.getStyle(element, 'overflow') || 'auto';
-    if (element._overflow !== 'hidden')
-      element.style.overflow = 'hidden';
-    return element;
-  },
-
-  undoClipping: function(element) {
-    element = $(element);
-    if (!element._overflow) return element;
-    element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
-    element._overflow = null;
-    return element;
-  },
-
-  cumulativeOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      element = element.offsetParent;
-    } while (element);
-    return Element._returnOffset(valueL, valueT);
-  },
-
-  positionedOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      element = element.offsetParent;
-      if (element) {
-        if (element.tagName.toUpperCase() == 'BODY') break;
-        var p = Element.getStyle(element, 'position');
-        if (p !== 'static') break;
-      }
-    } while (element);
-    return Element._returnOffset(valueL, valueT);
-  },
-
-  absolutize: function(element) {
-    element = $(element);
-    if (Element.getStyle(element, 'position') == 'absolute') return element;
-
-    var offsets = Element.positionedOffset(element);
-    var top     = offsets[1];
-    var left    = offsets[0];
-    var width   = element.clientWidth;
-    var height  = element.clientHeight;
-
-    element._originalLeft   = left - parseFloat(element.style.left  || 0);
-    element._originalTop    = top  - parseFloat(element.style.top || 0);
-    element._originalWidth  = element.style.width;
-    element._originalHeight = element.style.height;
-
-    element.style.position = 'absolute';
-    element.style.top    = top + 'px';
-    element.style.left   = left + 'px';
-    element.style.width  = width + 'px';
-    element.style.height = height + 'px';
-    return element;
-  },
-
-  relativize: function(element) {
-    element = $(element);
-    if (Element.getStyle(element, 'position') == 'relative') return element;
-
-    element.style.position = 'relative';
-    var top  = parseFloat(element.style.top  || 0) - (element._originalTop || 0);
-    var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
-
-    element.style.top    = top + 'px';
-    element.style.left   = left + 'px';
-    element.style.height = element._originalHeight;
-    element.style.width  = element._originalWidth;
-    return element;
-  },
-
-  cumulativeScrollOffset: function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.scrollTop  || 0;
-      valueL += element.scrollLeft || 0;
-      element = element.parentNode;
-    } while (element);
-    return Element._returnOffset(valueL, valueT);
-  },
-
-  getOffsetParent: function(element) {
-    if (element.offsetParent) return $(element.offsetParent);
-    if (element == document.body) return $(element);
-
-    while ((element = element.parentNode) && element != document.body)
-      if (Element.getStyle(element, 'position') != 'static')
-        return $(element);
-
-    return $(document.body);
-  },
-
-  viewportOffset: function(forElement) {
-    var valueT = 0, valueL = 0;
-
-    var element = forElement;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-
-      if (element.offsetParent == document.body &&
-        Element.getStyle(element, 'position') == 'absolute') break;
-
-    } while (element = element.offsetParent);
-
-    element = forElement;
-    do {
-      if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
-        valueT -= element.scrollTop  || 0;
-        valueL -= element.scrollLeft || 0;
-      }
-    } while (element = element.parentNode);
-
-    return Element._returnOffset(valueL, valueT);
-  },
-
-  clonePosition: function(element, source) {
-    var options = Object.extend({
-      setLeft:    true,
-      setTop:     true,
-      setWidth:   true,
-      setHeight:  true,
-      offsetTop:  0,
-      offsetLeft: 0
-    }, arguments[2] || { });
-
-    source = $(source);
-    var p = Element.viewportOffset(source);
-
-    element = $(element);
-    var delta = [0, 0];
-    var parent = null;
-    if (Element.getStyle(element, 'position') == 'absolute') {
-      parent = Element.getOffsetParent(element);
-      delta = Element.viewportOffset(parent);
-    }
-
-    if (parent == document.body) {
-      delta[0] -= document.body.offsetLeft;
-      delta[1] -= document.body.offsetTop;
-    }
-
-    if (options.setLeft)   element.style.left  = (p[0] - delta[0] + options.offsetLeft) + 'px';
-    if (options.setTop)    element.style.top   = (p[1] - delta[1] + options.offsetTop) + 'px';
-    if (options.setWidth)  element.style.width = source.offsetWidth + 'px';
-    if (options.setHeight) element.style.height = source.offsetHeight + 'px';
-    return element;
-  }
-};
-
-Object.extend(Element.Methods, {
-  getElementsBySelector: Element.Methods.select,
-
-  childElements: Element.Methods.immediateDescendants
-});
-
-Element._attributeTranslations = {
-  write: {
-    names: {
-      className: 'class',
-      htmlFor:   'for'
-    },
-    values: { }
-  }
-};
-
-if (Prototype.Browser.Opera) {
-  Element.Methods.getStyle = Element.Methods.getStyle.wrap(
-    function(proceed, element, style) {
-      switch (style) {
-        case 'left': case 'top': case 'right': case 'bottom':
-          if (proceed(element, 'position') === 'static') return null;
-        case 'height': case 'width':
-          if (!Element.visible(element)) return null;
-
-          var dim = parseInt(proceed(element, style), 10);
-
-          if (dim !== element['offset' + style.capitalize()])
-            return dim + 'px';
-
-          var properties;
-          if (style === 'height') {
-            properties = ['border-top-width', 'padding-top',
-             'padding-bottom', 'border-bottom-width'];
-          }
-          else {
-            properties = ['border-left-width', 'padding-left',
-             'padding-right', 'border-right-width'];
-          }
-          return properties.inject(dim, function(memo, property) {
-            var val = proceed(element, property);
-            return val === null ? memo : memo - parseInt(val, 10);
-          }) + 'px';
-        default: return proceed(element, style);
-      }
-    }
-  );
-
-  Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
-    function(proceed, element, attribute) {
-      if (attribute === 'title') return element.title;
-      return proceed(element, attribute);
-    }
-  );
-}
-
-else if (Prototype.Browser.IE) {
-  Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
-    function(proceed, element) {
-      element = $(element);
-      try { element.offsetParent }
-      catch(e) { return $(document.body) }
-      var position = element.getStyle('position');
-      if (position !== 'static') return proceed(element);
-      element.setStyle({ position: 'relative' });
-      var value = proceed(element);
-      element.setStyle({ position: position });
-      return value;
-    }
-  );
-
-  $w('positionedOffset viewportOffset').each(function(method) {
-    Element.Methods[method] = Element.Methods[method].wrap(
-      function(proceed, element) {
-        element = $(element);
-        try { element.offsetParent }
-        catch(e) { return Element._returnOffset(0,0) }
-        var position = element.getStyle('position');
-        if (position !== 'static') return proceed(element);
-        var offsetParent = element.getOffsetParent();
-        if (offsetParent && offsetParent.getStyle('position') === 'fixed')
-          offsetParent.setStyle({ zoom: 1 });
-        element.setStyle({ position: 'relative' });
-        var value = proceed(element);
-        element.setStyle({ position: position });
-        return value;
-      }
-    );
-  });
-
-  Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
-    function(proceed, element) {
-      try { element.offsetParent }
-      catch(e) { return Element._returnOffset(0,0) }
-      return proceed(element);
-    }
-  );
-
-  Element.Methods.getStyle = function(element, style) {
-    element = $(element);
-    style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
-    var value = element.style[style];
-    if (!value && element.currentStyle) value = element.currentStyle[style];
-
-    if (style == 'opacity') {
-      if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
-        if (value[1]) return parseFloat(value[1]) / 100;
-      return 1.0;
-    }
-
-    if (value == 'auto') {
-      if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
-        return element['offset' + style.capitalize()] + 'px';
-      return null;
-    }
-    return value;
-  };
-
-  Element.Methods.setOpacity = function(element, value) {
-    function stripAlpha(filter){
-      return filter.replace(/alpha\([^\)]*\)/gi,'');
-    }
-    element = $(element);
-    var currentStyle = element.currentStyle;
-    if ((currentStyle && !currentStyle.hasLayout) ||
-      (!currentStyle && element.style.zoom == 'normal'))
-        element.style.zoom = 1;
-
-    var filter = element.getStyle('filter'), style = element.style;
-    if (value == 1 || value === '') {
-      (filter = stripAlpha(filter)) ?
-        style.filter = filter : style.removeAttribute('filter');
-      return element;
-    } else if (value < 0.00001) value = 0;
-    style.filter = stripAlpha(filter) +
-      'alpha(opacity=' + (value * 100) + ')';
-    return element;
-  };
-
-  Element._attributeTranslations = (function(){
-
-    var classProp = 'className';
-    var forProp = 'for';
-
-    var el = document.createElement('div');
-
-    el.setAttribute(classProp, 'x');
-
-    if (el.className !== 'x') {
-      el.setAttribute('class', 'x');
-      if (el.className === 'x') {
-        classProp = 'class';
-      }
-    }
-    el = null;
-
-    el = document.createElement('label');
-    el.setAttribute(forProp, 'x');
-    if (el.htmlFor !== 'x') {
-      el.setAttribute('htmlFor', 'x');
-      if (el.htmlFor === 'x') {
-        forProp = 'htmlFor';
-      }
-    }
-    el = null;
-
-    return {
-      read: {
-        names: {
-          'class':      classProp,
-          'className':  classProp,
-          'for':        forProp,
-          'htmlFor':    forProp
-        },
-        values: {
-          _getAttr: function(element, attribute) {
-            return element.getAttribute(attribute);
-          },
-          _getAttr2: function(element, attribute) {
-            return element.getAttribute(attribute, 2);
-          },
-          _getAttrNode: function(element, attribute) {
-            var node = element.getAttributeNode(attribute);
-            return node ? node.value : "";
-          },
-          _getEv: (function(){
-
-            var el = document.createElement('div');
-            el.onclick = Prototype.emptyFunction;
-            var value = el.getAttribute('onclick');
-            var f;
-
-            if (String(value).indexOf('{') > -1) {
-              f = function(element, attribute) {
-                attribute = element.getAttribute(attribute);
-                if (!attribute) return null;
-                attribute = attribute.toString();
-                attribute = attribute.split('{')[1];
-                attribute = attribute.split('}')[0];
-                return attribute.strip();
-              };
-            }
-            else if (value === '') {
-              f = function(element, attribute) {
-                attribute = element.getAttribute(attribute);
-                if (!attribute) return null;
-                return attribute.strip();
-              };
-            }
-            el = null;
-            return f;
-          })(),
-          _flag: function(element, attribute) {
-            return $(element).hasAttribute(attribute) ? attribute : null;
-          },
-          style: function(element) {
-            return element.style.cssText.toLowerCase();
-          },
-          title: function(element) {
-            return element.title;
-          }
-        }
-      }
-    }
-  })();
-
-  Element._attributeTranslations.write = {
-    names: Object.extend({
-      cellpadding: 'cellPadding',
-      cellspacing: 'cellSpacing'
-    }, Element._attributeTranslations.read.names),
-    values: {
-      checked: function(element, value) {
-        element.checked = !!value;
-      },
-
-      style: function(element, value) {
-        element.style.cssText = value ? value : '';
-      }
-    }
-  };
-
-  Element._attributeTranslations.has = {};
-
-  $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
-      'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
-    Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
-    Element._attributeTranslations.has[attr.toLowerCase()] = attr;
-  });
-
-  (function(v) {
-    Object.extend(v, {
-      href:        v._getAttr2,
-      src:         v._getAttr2,
-      type:        v._getAttr,
-      action:      v._getAttrNode,
-      disabled:    v._flag,
-      checked:     v._flag,
-      readonly:    v._flag,
-      multiple:    v._flag,
-      onload:      v._getEv,
-      onunload:    v._getEv,
-      onclick:     v._getEv,
-      ondblclick:  v._getEv,
-      onmousedown: v._getEv,
-      onmouseup:   v._getEv,
-      onmouseover: v._getEv,
-      onmousemove: v._getEv,
-      onmouseout:  v._getEv,
-      onfocus:     v._getEv,
-      onblur:      v._getEv,
-      onkeypress:  v._getEv,
-      onkeydown:   v._getEv,
-      onkeyup:     v._getEv,
-      onsubmit:    v._getEv,
-      onreset:     v._getEv,
-      onselect:    v._getEv,
-      onchange:    v._getEv
-    });
-  })(Element._attributeTranslations.read.values);
-
-  if (Prototype.BrowserFeatures.ElementExtensions) {
-    (function() {
-      function _descendants(element) {
-        var nodes = element.getElementsByTagName('*'), results = [];
-        for (var i = 0, node; node = nodes[i]; i++)
-          if (node.tagName !== "!") // Filter out comment nodes.
-            results.push(node);
-        return results;
-      }
-
-      Element.Methods.down = function(element, expression, index) {
-        element = $(element);
-        if (arguments.length == 1) return element.firstDescendant();
-        return Object.isNumber(expression) ? _descendants(element)[expression] :
-          Element.select(element, expression)[index || 0];
-      }
-    })();
-  }
-
-}
-
-else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
-  Element.Methods.setOpacity = function(element, value) {
-    element = $(element);
-    element.style.opacity = (value == 1) ? 0.999999 :
-      (value === '') ? '' : (value < 0.00001) ? 0 : value;
-    return element;
-  };
-}
-
-else if (Prototype.Browser.WebKit) {
-  Element.Methods.setOpacity = function(element, value) {
-    element = $(element);
-    element.style.opacity = (value == 1 || value === '') ? '' :
-      (value < 0.00001) ? 0 : value;
-
-    if (value == 1)
-      if(element.tagName.toUpperCase() == 'IMG' && element.width) {
-        element.width++; element.width--;
-      } else try {
-        var n = document.createTextNode(' ');
-        element.appendChild(n);
-        element.removeChild(n);
-      } catch (e) { }
-
-    return element;
-  };
-
-  Element.Methods.cumulativeOffset = function(element) {
-    var valueT = 0, valueL = 0;
-    do {
-      valueT += element.offsetTop  || 0;
-      valueL += element.offsetLeft || 0;
-      if (element.offsetParent == document.body)
-        if (Element.getStyle(element, 'position') == 'absolute') break;
-
-      element = element.offsetParent;
-    } while (element);
-
-    return Element._returnOffset(valueL, valueT);
-  };
-}
-
-if ('outerHTML' in document.documentElement) {
-  Element.Methods.replace = function(element, content) {
-    element = $(element);
-
-    if (content && content.toElement) content = content.toElement();
-    if (Object.isElement(content)) {
-      element.parentNode.replaceChild(content, element);
-      return element;
-    }
-
-    content = Object.toHTML(content);
-    var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
-
-    if (Element._insertionTranslations.tags[tagName]) {
-      var nextSibling = element.next();
-      var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
-      parent.removeChild(element);
-      if (nextSibling)
-        fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
-      else
-        fragments.each(function(node) { parent.appendChild(node) });
-    }
-    else element.outerHTML = content.stripScripts();
-
-    content.evalScripts.bind(content).defer();
-    return element;
-  };
-}
-
-Element._returnOffset = function(l, t) {
-  var result = [l, t];
-  result.left = l;
-  result.top = t;
-  return result;
-};
-
-Element._getContentFromAnonymousElement = function(tagName, html) {
-  var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
-  if (t) {
-    div.innerHTML = t[0] + html + t[1];
-    t[2].times(function() { div = div.firstChild });
-  } else div.innerHTML = html;
-  return $A(div.childNodes);
-};
-
-Element._insertionTranslations = {
-  before: function(element, node) {
-    element.parentNode.insertBefore(node, element);
-  },
-  top: function(element, node) {
-    element.insertBefore(node, element.firstChild);
-  },
-  bottom: function(element, node) {
-    element.appendChild(node);
-  },
-  after: function(element, node) {
-    element.parentNode.insertBefore(node, element.nextSibling);
-  },
-  tags: {
-    TABLE:  ['<table>',                '</table>',                   1],
-    TBODY:  ['<table><tbody>',         '</tbody></table>',           2],
-    TR:     ['<table><tbody><tr>',     '</tr></tbody></table>',      3],
-    TD:     ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
-    SELECT: ['<select>',               '</select>',                  1]
-  }
-};
-
-(function() {
-  var tags = Element._insertionTranslations.tags;
-  Object.extend(tags, {
-    THEAD: tags.TBODY,
-    TFOOT: tags.TBODY,
-    TH:    tags.TD
-  });
-})();
-
-Element.Methods.Simulated = {
-  hasAttribute: function(element, attribute) {
-    attribute = Element._attributeTranslations.has[attribute] || attribute;
-    var node = $(element).getAttributeNode(attribute);
-    return !!(node && node.specified);
-  }
-};
-
-Element.Methods.ByTag = { };
-
-Object.extend(Element, Element.Methods);
-
-(function(div) {
-
-  if (!Prototype.BrowserFeatures.ElementExtensions && div['__proto__']) {
-    window.HTMLElement = { };
-    window.HTMLElement.prototype = div['__proto__'];
-    Prototype.BrowserFeatures.ElementExtensions = true;
-  }
-
-  div = null;
-
-})(document.createElement('div'))
-
-Element.extend = (function() {
-
-  function checkDeficiency(tagName) {
-    if (typeof window.Element != 'undefined') {
-      var proto = window.Element.prototype;
-      if (proto) {
-        var id = '_' + (Math.random()+'').slice(2);
-        var el = document.createElement(tagName);
-        proto[id] = 'x';
-        var isBuggy = (el[id] !== 'x');
-        delete proto[id];
-        el = null;
-        return isBuggy;
-      }
-    }
-    return false;
-  }
-
-  function extendElementWith(element, methods) {
-    for (var property in methods) {
-      var value = methods[property];
-      if (Object.isFunction(value) && !(property in element))
-        element[property] = value.methodize();
-    }
-  }
-
-  var HTMLOBJECTELEMENT_PROTOTYPE_BUGGY = checkDeficiency('object');
-
-  if (Prototype.BrowserFeatures.SpecificElementExtensions) {
-    if (HTMLOBJECTELEMENT_PROTOTYPE_BUGGY) {
-      return function(element) {
-        if (element && typeof element._extendedByPrototype == 'undefined') {
-          var t = element.tagName;
-          if (t && (/^(?:object|applet|embed)$/i.test(t))) {
-            extendElementWith(element, Element.Methods);
-            extendElementWith(element, Element.Methods.Simulated);
-            extendElementWith(element, Element.Methods.ByTag[t.toUpperCase()]);
-          }
-        }
-        return element;
-      }
-    }
-    return Prototype.K;
-  }
-
-  var Methods = { }, ByTag = Element.Methods.ByTag;
-
-  var extend = Object.extend(function(element) {
-    if (!element || typeof element._extendedByPrototype != 'undefined' ||
-        element.nodeType != 1 || element == window) return element;
-
-    var methods = Object.clone(Methods),
-        tagName = element.tagName.toUpperCase();
-
-    if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
-
-    extendElementWith(element, methods);
-
-    element._extendedByPrototype = Prototype.emptyFunction;
-    return element;
-
-  }, {
-    refresh: function() {
-      if (!Prototype.BrowserFeatures.ElementExtensions) {
-        Object.extend(Methods, Element.Methods);
-        Object.extend(Methods, Element.Methods.Simulated);
-      }
-    }
-  });
-
-  extend.refresh();
-  return extend;
-})();
-
-Element.hasAttribute = function(element, attribute) {
-  if (element.hasAttribute) return element.hasAttribute(attribute);
-  return Element.Methods.Simulated.hasAttribute(element, attribute);
-};
-
-Element.addMethods = function(methods) {
-  var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
-
-  if (!methods) {
-    Object.extend(Form, Form.Methods);
-    Object.extend(Form.Element, Form.Element.Methods);
-    Object.extend(Element.Methods.ByTag, {
-      "FORM":     Object.clone(Form.Methods),
-      "INPUT":    Object.clone(Form.Element.Methods),
-      "SELECT":   Object.clone(Form.Element.Methods),
-      "TEXTAREA": Object.clone(Form.Element.Methods)
-    });
-  }
-
-  if (arguments.length == 2) {
-    var tagName = methods;
-    methods = arguments[1];
-  }
-
-  if (!tagName) Object.extend(Element.Methods, methods || { });
-  else {
-    if (Object.isArray(tagName)) tagName.each(extend);
-    else extend(tagName);
-  }
-
-  function extend(tagName) {
-    tagName = tagName.toUpperCase();
-    if (!Element.Methods.ByTag[tagName])
-      Element.Methods.ByTag[tagName] = { };
-    Object.extend(Element.Methods.ByTag[tagName], methods);
-  }
-
-  function copy(methods, destination, onlyIfAbsent) {
-    onlyIfAbsent = onlyIfAbsent || false;
-    for (var property in methods) {
-      var value = methods[property];
-      if (!Object.isFunction(value)) continue;
-      if (!onlyIfAbsent || !(property in destination))
-        destination[property] = value.methodize();
-    }
-  }
-
-  function findDOMClass(tagName) {
-    var klass;
-    var trans = {
-      "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
-      "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
-      "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
-      "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
-      "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
-      "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
-      "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
-      "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
-      "FrameSet", "IFRAME": "IFrame"
-    };
-    if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
-    if (window[klass]) return window[klass];
-    klass = 'HTML' + tagName + 'Element';
-    if (window[klass]) return window[klass];
-    klass = 'HTML' + tagName.capitalize() + 'Element';
-    if (window[klass]) return window[klass];
-
-    var element = document.createElement(tagName);
-    var proto = element['__proto__'] || element.constructor.prototype;
-    element = null;
-    return proto;
-  }
-
-  var elementPrototype = window.HTMLElement ? HTMLElement.prototype :
-   Element.prototype;
-
-  if (F.ElementExtensions) {
-    copy(Element.Methods, elementPrototype);
-    copy(Element.Methods.Simulated, elementPrototype, true);
-  }
-
-  if (F.SpecificElementExtensions) {
-    for (var tag in Element.Methods.ByTag) {
-      var klass = findDOMClass(tag);
-      if (Object.isUndefined(klass)) continue;
-      copy(T[tag], klass.prototype);
-    }
-  }
-
-  Object.extend(Element, Element.Methods);
-  delete Element.ByTag;
-
-  if (Element.extend.refresh) Element.extend.refresh();
-  Element.cache = { };
-};
-
-
-document.viewport = {
-
-  getDimensions: function() {
-    return { width: this.getWidth(), height: this.getHeight() };
-  },
-
-  getScrollOffsets: function() {
-    return Element._returnOffset(
-      window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
-      window.pageYOffset || document.documentElement.scrollTop  || document.body.scrollTop);
-  }
-};
-
-(function(viewport) {
-  var B = Prototype.Browser, doc = document, element, property = {};
-
-  function getRootElement() {
-    if (B.WebKit && !doc.evaluate)
-      return document;
-
-    if (B.Opera && window.parseFloat(window.opera.version()) < 9.5)
-      return document.body;
-
-    return document.documentElement;
-  }
-
-  function define(D) {
-    if (!element) element = getRootElement();
-
-    property[D] = 'client' + D;
-
-    viewport['get' + D] = function() { return element[property[D]] };
-    return viewport['get' + D]();
-  }
-
-  viewport.getWidth  = define.curry('Width');
-
-  viewport.getHeight = define.curry('Height');
-})(document.viewport);
-
-
-Element.Storage = {
-  UID: 1
-};
-
-Element.addMethods({
-  getStorage: function(element) {
-    if (!(element = $(element))) return;
-
-    var uid;
-    if (element === window) {
-      uid = 0;
-    } else {
-      if (typeof element._prototypeUID === "undefined")
-        element._prototypeUID = [Element.Storage.UID++];
-      uid = element._prototypeUID[0];
-    }
-
-    if (!Element.Storage[uid])
-      Element.Storage[uid] = $H();
-
-    return Element.Storage[uid];
-  },
-
-  store: function(element, key, value) {
-    if (!(element = $(element))) return;
-
-    if (arguments.length === 2) {
-      Element.getStorage(element).update(key);
-    } else {
-      Element.getStorage(element).set(key, value);
-    }
-
-    return element;
-  },
-
-  retrieve: function(element, key, defaultValue) {
-    if (!(element = $(element))) return;
-    var hash = Element.getStorage(element), value = hash.get(key);
-
-    if (Object.isUndefined(value)) {
-      hash.set(key, defaultValue);
-      value = defaultValue;
-    }
-
-    return value;
-  },
-
-  clone: function(element, deep) {
-    if (!(element = $(element))) return;
-    var clone = element.cloneNode(deep);
-    clone._prototypeUID = void 0;
-    if (deep) {
-      var descendants = Element.select(clone, '*'),
-          i = descendants.length;
-      while (i--) {
-        descendants[i]._prototypeUID = void 0;
-      }
-    }
-    return Element.extend(clone);
-  }
-});
-/* Portions of the Selector class are derived from Jack Slocum's DomQuery,
- * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
- * license.  Please see http://www.yui-ext.com/ for more information. */
-
-var Selector = Class.create({
-  initialize: function(expression) {
-    this.expression = expression.strip();
-
-    if (this.shouldUseSelectorsAPI()) {
-      this.mode = 'selectorsAPI';
-    } else if (this.shouldUseXPath()) {
-      this.mode = 'xpath';
-      this.compileXPathMatcher();
-    } else {
-      this.mode = "normal";
-      this.compileMatcher();
-    }
-
-  },
-
-  shouldUseXPath: (function() {
-
-    var IS_DESCENDANT_SELECTOR_BUGGY = (function(){
-      var isBuggy = false;
-      if (document.evaluate && window.XPathResult) {
-        var el = document.createElement('div');
-        el.innerHTML = '<ul><li></li></ul><div><ul><li></li></ul></div>';
-
-        var xpath = ".//*[local-name()='ul' or local-name()='UL']" +
-          "//*[local-name()='li' or local-name()='LI']";
-
-        var result = document.evaluate(xpath, el, null,
-          XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
-
-        isBuggy = (result.snapshotLength !== 2);
-        el = null;
-      }
-      return isBuggy;
-    })();
-
-    return function() {
-      if (!Prototype.BrowserFeatures.XPath) return false;
-
-      var e = this.expression;
-
-      if (Prototype.Browser.WebKit &&
-       (e.include("-of-type") || e.include(":empty")))
-        return false;
-
-      if ((/(\[[\w-]*?:|:checked)/).test(e))
-        return false;
-
-      if (IS_DESCENDANT_SELECTOR_BUGGY) return false;
-
-      return true;
-    }
-
-  })(),
-
-  shouldUseSelectorsAPI: function() {
-    if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
-
-    if (Selector.CASE_INSENSITIVE_CLASS_NAMES) return false;
-
-    if (!Selector._div) Selector._div = new Element('div');
-
-    try {
-      Selector._div.querySelector(this.expression);
-    } catch(e) {
-      return false;
-    }
-
-    return true;
-  },
-
-  compileMatcher: function() {
-    var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
-        c = Selector.criteria, le, p, m, len = ps.length, name;
-
-    if (Selector._cache[e]) {
-      this.matcher = Selector._cache[e];
-      return;
-    }
-
-    this.matcher = ["this.matcher = function(root) {",
-                    "var r = root, h = Selector.handlers, c = false, n;"];
-
-    while (e && le != e && (/\S/).test(e)) {
-      le = e;
-      for (var i = 0; i<len; i++) {
-        p = ps[i].re;
-        name = ps[i].name;
-        if (m = e.match(p)) {
-          this.matcher.push(Object.isFunction(c[name]) ? c[name](m) :
-            new Template(c[name]).evaluate(m));
-          e = e.replace(m[0], '');
-          break;
-        }
-      }
-    }
-
-    this.matcher.push("return h.unique(n);\n}");
-    eval(this.matcher.join('\n'));
-    Selector._cache[this.expression] = this.matcher;
-  },
-
-  compileXPathMatcher: function() {
-    var e = this.expression, ps = Selector.patterns,
-        x = Selector.xpath, le, m, len = ps.length, name;
-
-    if (Selector._cache[e]) {
-      this.xpath = Selector._cache[e]; return;
-    }
-
-    this.matcher = ['.//*'];
-    while (e && le != e && (/\S/).test(e)) {
-      le = e;
-      for (var i = 0; i<len; i++) {
-        name = ps[i].name;
-        if (m = e.match(ps[i].re)) {
-          this.matcher.push(Object.isFunction(x[name]) ? x[name](m) :
-            new Template(x[name]).evaluate(m));
-          e = e.replace(m[0], '');
-          break;
-        }
-      }
-    }
-
-    this.xpath = this.matcher.join('');
-    Selector._cache[this.expression] = this.xpath;
-  },
-
-  findElements: function(root) {
-    root = root || document;
-    var e = this.expression, results;
-
-    switch (this.mode) {
-      case 'selectorsAPI':
-        if (root !== document) {
-          var oldId = root.id, id = $(root).identify();
-          id = id.replace(/([\.:])/g, "\\$1");
-          e = "#" + id + " " + e;
-        }
-
-        results = $A(root.querySelectorAll(e)).map(Element.extend);
-        root.id = oldId;
-
-        return results;
-      case 'xpath':
-        return document._getElementsByXPath(this.xpath, root);
-      default:
-       return this.matcher(root);
-    }
-  },
-
-  match: function(element) {
-    this.tokens = [];
-
-    var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
-    var le, p, m, len = ps.length, name;
-
-    while (e && le !== e && (/\S/).test(e)) {
-      le = e;
-      for (var i = 0; i<len; i++) {
-        p = ps[i].re;
-        name = ps[i].name;
-        if (m = e.match(p)) {
-          if (as[name]) {
-            this.tokens.push([name, Object.clone(m)]);
-            e = e.replace(m[0], '');
-          } else {
-            return this.findElements(document).include(element);
-          }
-        }
-      }
-    }
-
-    var match = true, name, matches;
-    for (var i = 0, token; token = this.tokens[i]; i++) {
-      name = token[0], matches = token[1];
-      if (!Selector.assertions[name](element, matches)) {
-        match = false; break;
-      }
-    }
-
-    return match;
-  },
-
-  toString: function() {
-    return this.expression;
-  },
-
-  inspect: function() {
-    return "#<Selector:" + this.expression.inspect() + ">";
-  }
-});
-
-if (Prototype.BrowserFeatures.SelectorsAPI &&
- document.compatMode === 'BackCompat') {
-  Selector.CASE_INSENSITIVE_CLASS_NAMES = (function(){
-    var div = document.createElement('div'),
-     span = document.createElement('span');
-
-    div.id = "prototype_test_id";
-    span.className = 'Test';
-    div.appendChild(span);
-    var isIgnored = (div.querySelector('#prototype_test_id .test') !== null);
-    div = span = null;
-    return isIgnored;
-  })();
-}
-
-Object.extend(Selector, {
-  _cache: { },
-
-  xpath: {
-    descendant:   "//*",
-    child:        "/*",
-    adjacent:     "/following-sibling::*[1]",
-    laterSibling: '/following-sibling::*',
-    tagName:      function(m) {
-      if (m[1] == '*') return '';
-      return "[local-name()='" + m[1].toLowerCase() +
-             "' or local-name()='" + m[1].toUpperCase() + "']";
-    },
-    className:    "[contains(concat(' ', @class, ' '), ' #{1} ')]",
-    id:           "[@id='#{1}']",
-    attrPresence: function(m) {
-      m[1] = m[1].toLowerCase();
-      return new Template("[@#{1}]").evaluate(m);
-    },
-    attr: function(m) {
-      m[1] = m[1].toLowerCase();
-      m[3] = m[5] || m[6];
-      return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
-    },
-    pseudo: function(m) {
-      var h = Selector.xpath.pseudos[m[1]];
-      if (!h) return '';
-      if (Object.isFunction(h)) return h(m);
-      return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
-    },
-    operators: {
-      '=':  "[@#{1}='#{3}']",
-      '!=': "[@#{1}!='#{3}']",
-      '^=': "[starts-with(@#{1}, '#{3}')]",
-      '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
-      '*=': "[contains(@#{1}, '#{3}')]",
-      '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
-      '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
-    },
-    pseudos: {
-      'first-child': '[not(preceding-sibling::*)]',
-      'last-child':  '[not(following-sibling::*)]',
-      'only-child':  '[not(preceding-sibling::* or following-sibling::*)]',
-      'empty':       "[count(*) = 0 and (count(text()) = 0)]",
-      'checked':     "[@checked]",
-      'disabled':    "[(@disabled) and (@type!='hidden')]",
-      'enabled':     "[not(@disabled) and (@type!='hidden')]",
-      'not': function(m) {
-        var e = m[6], p = Selector.patterns,
-            x = Selector.xpath, le, v, len = p.length, name;
-
-        var exclusion = [];
-        while (e && le != e && (/\S/).test(e)) {
-          le = e;
-          for (var i = 0; i<len; i++) {
-            name = p[i].name
-            if (m = e.match(p[i].re)) {
-              v = Object.isFunction(x[name]) ? x[name](m) : new Template(x[name]).evaluate(m);
-              exclusion.push("(" + v.substring(1, v.length - 1) + ")");
-              e = e.replace(m[0], '');
-              break;
-            }
-          }
-        }
-        return "[not(" + exclusion.join(" and ") + ")]";
-      },
-      'nth-child':      function(m) {
-        return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
-      },
-      'nth-last-child': function(m) {
-        return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
-      },
-      'nth-of-type':    function(m) {
-        return Selector.xpath.pseudos.nth("position() ", m);
-      },
-      'nth-last-of-type': function(m) {
-        return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
-      },
-      'first-of-type':  function(m) {
-        m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
-      },
-      'last-of-type':   function(m) {
-        m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
-      },
-      'only-of-type':   function(m) {
-        var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
-      },
-      nth: function(fragment, m) {
-        var mm, formula = m[6], predicate;
-        if (formula == 'even') formula = '2n+0';
-        if (formula == 'odd')  formula = '2n+1';
-        if (mm = formula.match(/^(\d+)$/)) // digit only
-          return '[' + fragment + "= " + mm[1] + ']';
-        if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
-          if (mm[1] == "-") mm[1] = -1;
-          var a = mm[1] ? Number(mm[1]) : 1;
-          var b = mm[2] ? Number(mm[2]) : 0;
-          predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
-          "((#{fragment} - #{b}) div #{a} >= 0)]";
-          return new Template(predicate).evaluate({
-            fragment: fragment, a: a, b: b });
-        }
-      }
-    }
-  },
-
-  criteria: {
-    tagName:      'n = h.tagName(n, r, "#{1}", c);      c = false;',
-    className:    'n = h.className(n, r, "#{1}", c);    c = false;',
-    id:           'n = h.id(n, r, "#{1}", c);           c = false;',
-    attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
-    attr: function(m) {
-      m[3] = (m[5] || m[6]);
-      return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
-    },
-    pseudo: function(m) {
-      if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
-      return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
-    },
-    descendant:   'c = "descendant";',
-    child:        'c = "child";',
-    adjacent:     'c = "adjacent";',
-    laterSibling: 'c = "laterSibling";'
-  },
-
-  patterns: [
-    { name: 'laterSibling', re: /^\s*~\s*/ },
-    { name: 'child',        re: /^\s*>\s*/ },
-    { name: 'adjacent',     re: /^\s*\+\s*/ },
-    { name: 'descendant',   re: /^\s/ },
-
-    { name: 'tagName',      re: /^\s*(\*|[\w\-]+)(\b|$)?/ },
-    { name: 'id',           re: /^#([\w\-\*]+)(\b|$)/ },
-    { name: 'className',    re: /^\.([\w\-\*]+)(\b|$)/ },
-    { name: 'pseudo',       re: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/ },
-    { name: 'attrPresence', re: /^\[((?:[\w-]+:)?[\w-]+)\]/ },
-    { name: 'attr',         re: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ }
-  ],
-
-  assertions: {
-    tagName: function(element, matches) {
-      return matches[1].toUpperCase() == element.tagName.toUpperCase();
-    },
-
-    className: function(element, matches) {
-      return Element.hasClassName(element, matches[1]);
-    },
-
-    id: function(element, matches) {
-      return element.id === matches[1];
-    },
-
-    attrPresence: function(element, matches) {
-      return Element.hasAttribute(element, matches[1]);
-    },
-
-    attr: function(element, matches) {
-      var nodeValue = Element.readAttribute(element, matches[1]);
-      return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
-    }
-  },
-
-  handlers: {
-    concat: function(a, b) {
-      for (var i = 0, node; node = b[i]; i++)
-        a.push(node);
-      return a;
-    },
-
-    mark: function(nodes) {
-      var _true = Prototype.emptyFunction;
-      for (var i = 0, node; node = nodes[i]; i++)
-        node._countedByPrototype = _true;
-      return nodes;
-    },
-
-    unmark: (function(){
-
-      var PROPERTIES_ATTRIBUTES_MAP = (function(){
-        var el = document.createElement('div'),
-            isBuggy = false,
-            propName = '_countedByPrototype',
-            value = 'x'
-        el[propName] = value;
-        isBuggy = (el.getAttribute(propName) === value);
-        el = null;
-        return isBuggy;
-      })();
-
-      return PROPERTIES_ATTRIBUTES_MAP ?
-        function(nodes) {
-          for (var i = 0, node; node = nodes[i]; i++)
-            node.removeAttribute('_countedByPrototype');
-          return nodes;
-        } :
-        function(nodes) {
-          for (var i = 0, node; node = nodes[i]; i++)
-            node._countedByPrototype = void 0;
-          return nodes;
-        }
-    })(),
-
-    index: function(parentNode, reverse, ofType) {
-      parentNode._countedByPrototype = Prototype.emptyFunction;
-      if (reverse) {
-        for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
-          var node = nodes[i];
-          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
-        }
-      } else {
-        for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
-          if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
-      }
-    },
-
-    unique: function(nodes) {
-      if (nodes.length == 0) return nodes;
-      var results = [], n;
-      for (var i = 0, l = nodes.length; i < l; i++)
-        if (typeof (n = nodes[i])._countedByPrototype == 'undefined') {
-          n._countedByPrototype = Prototype.emptyFunction;
-          results.push(Element.extend(n));
-        }
-      return Selector.handlers.unmark(results);
-    },
-
-    descendant: function(nodes) {
-      var h = Selector.handlers;
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        h.concat(results, node.getElementsByTagName('*'));
-      return results;
-    },
-
-    child: function(nodes) {
-      var h = Selector.handlers;
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        for (var j = 0, child; child = node.childNodes[j]; j++)
-          if (child.nodeType == 1 && child.tagName != '!') results.push(child);
-      }
-      return results;
-    },
-
-    adjacent: function(nodes) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        var next = this.nextElementSibling(node);
-        if (next) results.push(next);
-      }
-      return results;
-    },
-
-    laterSibling: function(nodes) {
-      var h = Selector.handlers;
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        h.concat(results, Element.nextSiblings(node));
-      return results;
-    },
-
-    nextElementSibling: function(node) {
-      while (node = node.nextSibling)
-        if (node.nodeType == 1) return node;
-      return null;
-    },
-
-    previousElementSibling: function(node) {
-      while (node = node.previousSibling)
-        if (node.nodeType == 1) return node;
-      return null;
-    },
-
-    tagName: function(nodes, root, tagName, combinator) {
-      var uTagName = tagName.toUpperCase();
-      var results = [], h = Selector.handlers;
-      if (nodes) {
-        if (combinator) {
-          if (combinator == "descendant") {
-            for (var i = 0, node; node = nodes[i]; i++)
-              h.concat(results, node.getElementsByTagName(tagName));
-            return results;
-          } else nodes = this[combinator](nodes);
-          if (tagName == "*") return nodes;
-        }
-        for (var i = 0, node; node = nodes[i]; i++)
-          if (node.tagName.toUpperCase() === uTagName) results.push(node);
-        return results;
-      } else return root.getElementsByTagName(tagName);
-    },
-
-    id: function(nodes, root, id, combinator) {
-      var targetNode = $(id), h = Selector.handlers;
-
-      if (root == document) {
-        if (!targetNode) return [];
-        if (!nodes) return [targetNode];
-      } else {
-        if (!root.sourceIndex || root.sourceIndex < 1) {
-          var nodes = root.getElementsByTagName('*');
-          for (var j = 0, node; node = nodes[j]; j++) {
-            if (node.id === id) return [node];
-          }
-        }
-      }
-
-      if (nodes) {
-        if (combinator) {
-          if (combinator == 'child') {
-            for (var i = 0, node; node = nodes[i]; i++)
-              if (targetNode.parentNode == node) return [targetNode];
-          } else if (combinator == 'descendant') {
-            for (var i = 0, node; node = nodes[i]; i++)
-              if (Element.descendantOf(targetNode, node)) return [targetNode];
-          } else if (combinator == 'adjacent') {
-            for (var i = 0, node; node = nodes[i]; i++)
-              if (Selector.handlers.previousElementSibling(targetNode) == node)
-                return [targetNode];
-          } else nodes = h[combinator](nodes);
-        }
-        for (var i = 0, node; node = nodes[i]; i++)
-          if (node == targetNode) return [targetNode];
-        return [];
-      }
-      return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
-    },
-
-    className: function(nodes, root, className, combinator) {
-      if (nodes && combinator) nodes = this[combinator](nodes);
-      return Selector.handlers.byClassName(nodes, root, className);
-    },
-
-    byClassName: function(nodes, root, className) {
-      if (!nodes) nodes = Selector.handlers.descendant([root]);
-      var needle = ' ' + className + ' ';
-      for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
-        nodeClassName = node.className;
-        if (nodeClassName.length == 0) continue;
-        if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
-          results.push(node);
-      }
-      return results;
-    },
-
-    attrPresence: function(nodes, root, attr, combinator) {
-      if (!nodes) nodes = root.getElementsByTagName("*");
-      if (nodes && combinator) nodes = this[combinator](nodes);
-      var results = [];
-      for (var i = 0, node; node = nodes[i]; i++)
-        if (Element.hasAttribute(node, attr)) results.push(node);
-      return results;
-    },
-
-    attr: function(nodes, root, attr, value, operator, combinator) {
-      if (!nodes) nodes = root.getElementsByTagName("*");
-      if (nodes && combinator) nodes = this[combinator](nodes);
-      var handler = Selector.operators[operator], results = [];
-      for (var i = 0, node; node = nodes[i]; i++) {
-        var nodeValue = Element.readAttribute(node, attr);
-        if (nodeValue === null) continue;
-        if (handler(nodeValue, value)) results.push(node);
-      }
-      return results;
-    },
-
-    pseudo: function(nodes, name, value, root, combinator) {
-      if (nodes && combinator) nodes = this[combinator](nodes);
-      if (!nodes) nodes = root.getElementsByTagName("*");
-      return Selector.pseudos[name](nodes, value, root);
-    }
-  },
-
-  pseudos: {
-    'first-child': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        if (Selector.handlers.previousElementSibling(node)) continue;
-          results.push(node);
-      }
-      return results;
-    },
-    'last-child': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        if (Selector.handlers.nextElementSibling(node)) continue;
-          results.push(node);
-      }
-      return results;
-    },
-    'only-child': function(nodes, value, root) {
-      var h = Selector.handlers;
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
-          results.push(node);
-      return results;
-    },
-    'nth-child':        function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, formula, root);
-    },
-    'nth-last-child':   function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, formula, root, true);
-    },
-    'nth-of-type':      function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, formula, root, false, true);
-    },
-    'nth-last-of-type': function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, formula, root, true, true);
-    },
-    'first-of-type':    function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, "1", root, false, true);
-    },
-    'last-of-type':     function(nodes, formula, root) {
-      return Selector.pseudos.nth(nodes, "1", root, true, true);
-    },
-    'only-of-type':     function(nodes, formula, root) {
-      var p = Selector.pseudos;
-      return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
-    },
-
-    getIndices: function(a, b, total) {
-      if (a == 0) return b > 0 ? [b] : [];
-      return $R(1, total).inject([], function(memo, i) {
-        if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
-        return memo;
-      });
-    },
-
-    nth: function(nodes, formula, root, reverse, ofType) {
-      if (nodes.length == 0) return [];
-      if (formula == 'even') formula = '2n+0';
-      if (formula == 'odd')  formula = '2n+1';
-      var h = Selector.handlers, results = [], indexed = [], m;
-      h.mark(nodes);
-      for (var i = 0, node; node = nodes[i]; i++) {
-        if (!node.parentNode._countedByPrototype) {
-          h.index(node.parentNode, reverse, ofType);
-          indexed.push(node.parentNode);
-        }
-      }
-      if (formula.match(/^\d+$/)) { // just a number
-        formula = Number(formula);
-        for (var i = 0, node; node = nodes[i]; i++)
-          if (node.nodeIndex == formula) results.push(node);
-      } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
-        if (m[1] == "-") m[1] = -1;
-        var a = m[1] ? Number(m[1]) : 1;
-        var b = m[2] ? Number(m[2]) : 0;
-        var indices = Selector.pseudos.getIndices(a, b, nodes.length);
-        for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
-          for (var j = 0; j < l; j++)
-            if (node.nodeIndex == indices[j]) results.push(node);
-        }
-      }
-      h.unmark(nodes);
-      h.unmark(indexed);
-      return results;
-    },
-
-    'empty': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++) {
-        if (node.tagName == '!' || node.firstChild) continue;
-        results.push(node);
-      }
-      return results;
-    },
-
-    'not': function(nodes, selector, root) {
-      var h = Selector.handlers, selectorType, m;
-      var exclusions = new Selector(selector).findElements(root);
-      h.mark(exclusions);
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (!node._countedByPrototype) results.push(node);
-      h.unmark(exclusions);
-      return results;
-    },
-
-    'enabled': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (!node.disabled && (!node.type || node.type !== 'hidden'))
-          results.push(node);
-      return results;
-    },
-
-    'disabled': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (node.disabled) results.push(node);
-      return results;
-    },
-
-    'checked': function(nodes, value, root) {
-      for (var i = 0, results = [], node; node = nodes[i]; i++)
-        if (node.checked) results.push(node);
-      return results;
-    }
-  },
-
-  operators: {
-    '=':  function(nv, v) { return nv == v; },
-    '!=': function(nv, v) { return nv != v; },
-    '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
-    '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
-    '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
-    '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
-    '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
-     '-').include('-' + (v || "").toUpperCase() + '-'); }
-  },
-
-  split: function(expression) {
-    var expressions = [];
-    expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
-      expressions.push(m[1].strip());
-    });
-    return expressions;
-  },
-
-  matchElements: function(elements, expression) {
-    var matches = $$(expression), h = Selector.handlers;
-    h.mark(matches);
-    for (var i = 0, results = [], element; element = elements[i]; i++)
-      if (element._countedByPrototype) results.push(element);
-    h.unmark(matches);
-    return results;
-  },
-
-  findElement: function(elements, expression, index) {
-    if (Object.isNumber(expression)) {
-      index = expression; expression = false;
-    }
-    return Selector.matchElements(elements, expression || '*')[index || 0];
-  },
-
-  findChildElements: function(element, expressions) {
-    expressions = Selector.split(expressions.join(','));
-    var results = [], h = Selector.handlers;
-    for (var i = 0, l = expressions.length, selector; i < l; i++) {
-      selector = new Selector(expressions[i].strip());
-      h.concat(results, selector.findElements(element));
-    }
-    return (l > 1) ? h.unique(results) : results;
-  }
-});
-
-if (Prototype.Browser.IE) {
-  Object.extend(Selector.handlers, {
-    concat: function(a, b) {
-      for (var i = 0, node; node = b[i]; i++)
-        if (node.tagName !== "!") a.push(node);
-      return a;
-    }
-  });
-}
-
-function $$() {
-  return Selector.findChildElements(document, $A(arguments));
-}
-
-var Form = {
-  reset: function(form) {
-    form = $(form);
-    form.reset();
-    return form;
-  },
-
-  serializeElements: function(elements, options) {
-    if (typeof options != 'object') options = { hash: !!options };
-    else if (Object.isUndefined(options.hash)) options.hash = true;
-    var key, value, submitted = false, submit = options.submit;
-
-    var data = elements.inject({ }, function(result, element) {
-      if (!element.disabled && element.name) {
-        key = element.name; value = $(element).getValue();
-        if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
-            submit !== false && (!submit || key == submit) && (submitted = true)))) {
-          if (key in result) {
-            if (!Object.isArray(result[key])) result[key] = [result[key]];
-            result[key].push(value);
-          }
-          else result[key] = value;
-        }
-      }
-      return result;
-    });
-
-    return options.hash ? data : Object.toQueryString(data);
-  }
-};
-
-Form.Methods = {
-  serialize: function(form, options) {
-    return Form.serializeElements(Form.getElements(form), options);
-  },
-
-  getElements: function(form) {
-    var elements = $(form).getElementsByTagName('*'),
-        element,
-        arr = [ ],
-        serializers = Form.Element.Serializers;
-    for (var i = 0; element = elements[i]; i++) {
-      arr.push(element);
-    }
-    return arr.inject([], function(elements, child) {
-      if (serializers[child.tagName.toLowerCase()])
-        elements.push(Element.extend(child));
-      return elements;
-    })
-  },
-
-  getInputs: function(form, typeName, name) {
-    form = $(form);
-    var inputs = form.getElementsByTagName('input');
-
-    if (!typeName && !name) return $A(inputs).map(Element.extend);
-
-    for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
-      var input = inputs[i];
-      if ((typeName && input.type != typeName) || (name && input.name != name))
-        continue;
-      matchingInputs.push(Element.extend(input));
-    }
-
-    return matchingInputs;
-  },
-
-  disable: function(form) {
-    form = $(form);
-    Form.getElements(form).invoke('disable');
-    return form;
-  },
-
-  enable: function(form) {
-    form = $(form);
-    Form.getElements(form).invoke('enable');
-    return form;
-  },
-
-  findFirstElement: function(form) {
-    var elements = $(form).getElements().findAll(function(element) {
-      return 'hidden' != element.type && !element.disabled;
-    });
-    var firstByIndex = elements.findAll(function(element) {
-      return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
-    }).sortBy(function(element) { return element.tabIndex }).first();
-
-    return firstByIndex ? firstByIndex : elements.find(function(element) {
-      return /^(?:input|select|textarea)$/i.test(element.tagName);
-    });
-  },
-
-  focusFirstElement: function(form) {
-    form = $(form);
-    form.findFirstElement().activate();
-    return form;
-  },
-
-  request: function(form, options) {
-    form = $(form), options = Object.clone(options || { });
-
-    var params = options.parameters, action = form.readAttribute('action') || '';
-    if (action.blank()) action = window.location.href;
-    options.parameters = form.serialize(true);
-
-    if (params) {
-      if (Object.isString(params)) params = params.toQueryParams();
-      Object.extend(options.parameters, params);
-    }
-
-    if (form.hasAttribute('method') && !options.method)
-      options.method = form.method;
-
-    return new Ajax.Request(action, options);
-  }
-};
-
-/*--------------------------------------------------------------------------*/
-
-
-Form.Element = {
-  focus: function(element) {
-    $(element).focus();
-    return element;
-  },
-
-  select: function(element) {
-    $(element).select();
-    return element;
-  }
-};
-
-Form.Element.Methods = {
-
-  serialize: function(element) {
-    element = $(element);
-    if (!element.disabled && element.name) {
-      var value = element.getValue();
-      if (value != undefined) {
-        var pair = { };
-        pair[element.name] = value;
-        return Object.toQueryString(pair);
-      }
-    }
-    return '';
-  },
-
-  getValue: function(element) {
-    element = $(element);
-    var method = element.tagName.toLowerCase();
-    return Form.Element.Serializers[method](element);
-  },
-
-  setValue: function(element, value) {
-    element = $(element);
-    var method = element.tagName.toLowerCase();
-    Form.Element.Serializers[method](element, value);
-    return element;
-  },
-
-  clear: function(element) {
-    $(element).value = '';
-    return element;
-  },
-
-  present: function(element) {
-    return $(element).value != '';
-  },
-
-  activate: function(element) {
-    element = $(element);
-    try {
-      element.focus();
-      if (element.select && (element.tagName.toLowerCase() != 'input' ||
-          !(/^(?:button|reset|submit)$/i.test(element.type))))
-        element.select();
-    } catch (e) { }
-    return element;
-  },
-
-  disable: function(element) {
-    element = $(element);
-    element.disabled = true;
-    return element;
-  },
-
-  enable: function(element) {
-    element = $(element);
-    element.disabled = false;
-    return element;
-  }
-};
-
-/*--------------------------------------------------------------------------*/
-
-var Field = Form.Element;
-
-var $F = Form.Element.Methods.getValue;
-
-/*--------------------------------------------------------------------------*/
-
-Form.Element.Serializers = {
-  input: function(element, value) {
-    switch (element.type.toLowerCase()) {
-      case 'checkbox':
-      case 'radio':
-        return Form.Element.Serializers.inputSelector(element, value);
-      default:
-        return Form.Element.Serializers.textarea(element, value);
-    }
-  },
-
-  inputSelector: function(element, value) {
-    if (Object.isUndefined(value)) return element.checked ? element.value : null;
-    else element.checked = !!value;
-  },
-
-  textarea: function(element, value) {
-    if (Object.isUndefined(value)) return element.value;
-    else element.value = value;
-  },
-
-  select: function(element, value) {
-    if (Object.isUndefined(value))
-      return this[element.type == 'select-one' ?
-        'selectOne' : 'selectMany'](element);
-    else {
-      var opt, currentValue, single = !Object.isArray(value);
-      for (var i = 0, length = element.length; i < length; i++) {
-        opt = element.options[i];
-        currentValue = this.optionValue(opt);
-        if (single) {
-          if (currentValue == value) {
-            opt.selected = true;
-            return;
-          }
-        }
-        else opt.selected = value.include(currentValue);
-      }
-    }
-  },
-
-  selectOne: function(element) {
-    var index = element.selectedIndex;
-    return index >= 0 ? this.optionValue(element.options[index]) : null;
-  },
-
-  selectMany: function(element) {
-    var values, length = element.length;
-    if (!length) return null;
-
-    for (var i = 0, values = []; i < length; i++) {
-      var opt = element.options[i];
-      if (opt.selected) values.push(this.optionValue(opt));
-    }
-    return values;
-  },
-
-  optionValue: function(opt) {
-    return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
-  }
-};
-
-/*--------------------------------------------------------------------------*/
-
-
-Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
-  initialize: function($super, element, frequency, callback) {
-    $super(callback, frequency);
-    this.element   = $(element);
-    this.lastValue = this.getValue();
-  },
-
-  execute: function() {
-    var value = this.getValue();
-    if (Object.isString(this.lastValue) && Object.isString(value) ?
-        this.lastValue != value : String(this.lastValue) != String(value)) {
-      this.callback(this.element, value);
-      this.lastValue = value;
-    }
-  }
-});
-
-Form.Element.Observer = Class.create(Abstract.TimedObserver, {
-  getValue: function() {
-    return Form.Element.getValue(this.element);
-  }
-});
-
-Form.Observer = Class.create(Abstract.TimedObserver, {
-  getValue: function() {
-    return Form.serialize(this.element);
-  }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.EventObserver = Class.create({
-  initialize: function(element, callback) {
-    this.element  = $(element);
-    this.callback = callback;
-
-    this.lastValue = this.getValue();
-    if (this.element.tagName.toLowerCase() == 'form')
-      this.registerFormCallbacks();
-    else
-      this.registerCallback(this.element);
-  },
-
-  onElementEvent: function() {
-    var value = this.getValue();
-    if (this.lastValue != value) {
-      this.callback(this.element, value);
-      this.lastValue = value;
-    }
-  },
-
-  registerFormCallbacks: function() {
-    Form.getElements(this.element).each(this.registerCallback, this);
-  },
-
-  registerCallback: function(element) {
-    if (element.type) {
-      switch (element.type.toLowerCase()) {
-        case 'checkbox':
-        case 'radio':
-          Event.observe(element, 'click', this.onElementEvent.bind(this));
-          break;
-        default:
-          Event.observe(element, 'change', this.onElementEvent.bind(this));
-          break;
-      }
-    }
-  }
-});
-
-Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
-  getValue: function() {
-    return Form.Element.getValue(this.element);
-  }
-});
-
-Form.EventObserver = Class.create(Abstract.EventObserver, {
-  getValue: function() {
-    return Form.serialize(this.element);
-  }
-});
-(function() {
-
-  var Event = {
-    KEY_BACKSPACE: 8,
-    KEY_TAB:       9,
-    KEY_RETURN:   13,
-    KEY_ESC:      27,
-    KEY_LEFT:     37,
-    KEY_UP:       38,
-    KEY_RIGHT:    39,
-    KEY_DOWN:     40,
-    KEY_DELETE:   46,
-    KEY_HOME:     36,
-    KEY_END:      35,
-    KEY_PAGEUP:   33,
-    KEY_PAGEDOWN: 34,
-    KEY_INSERT:   45,
-
-    cache: {}
-  };
-
-  var docEl = document.documentElement;
-  var MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED = 'onmouseenter' in docEl
-    && 'onmouseleave' in docEl;
-
-  var _isButton;
-  if (Prototype.Browser.IE) {
-    var buttonMap = { 0: 1, 1: 4, 2: 2 };
-    _isButton = function(event, code) {
-      return event.button === buttonMap[code];
-    };
-  } else if (Prototype.Browser.WebKit) {
-    _isButton = function(event, code) {
-      switch (code) {
-        case 0: return event.which == 1 && !event.metaKey;
-        case 1: return event.which == 1 && event.metaKey;
-        default: return false;
-      }
-    };
-  } else {
-    _isButton = function(event, code) {
-      return event.which ? (event.which === code + 1) : (event.button === code);
-    };
-  }
-
-  function isLeftClick(event)   { return _isButton(event, 0) }
-
-  function isMiddleClick(event) { return _isButton(event, 1) }
-
-  function isRightClick(event)  { return _isButton(event, 2) }
-
-  function element(event) {
-    event = Event.extend(event);
-
-    var node = event.target, type = event.type,
-     currentTarget = event.currentTarget;
-
-    if (currentTarget && currentTarget.tagName) {
-      if (type === 'load' || type === 'error' ||
-        (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
-          && currentTarget.type === 'radio'))
-            node = currentTarget;
-    }
-
-    if (node.nodeType == Node.TEXT_NODE)
-      node = node.parentNode;
-
-    return Element.extend(node);
-  }
-
-  function findElement(event, expression) {
-    var element = Event.element(event);
-    if (!expression) return element;
-    var elements = [element].concat(element.ancestors());
-    return Selector.findElement(elements, expression, 0);
-  }
-
-  function pointer(event) {
-    return { x: pointerX(event), y: pointerY(event) };
-  }
-
-  function pointerX(event) {
-    var docElement = document.documentElement,
-     body = document.body || { scrollLeft: 0 };
-
-    return event.pageX || (event.clientX +
-      (docElement.scrollLeft || body.scrollLeft) -
-      (docElement.clientLeft || 0));
-  }
-
-  function pointerY(event) {
-    var docElement = document.documentElement,
-     body = document.body || { scrollTop: 0 };
-
-    return  event.pageY || (event.clientY +
-       (docElement.scrollTop || body.scrollTop) -
-       (docElement.clientTop || 0));
-  }
-
-
-  function stop(event) {
-    Event.extend(event);
-    event.preventDefault();
-    event.stopPropagation();
-
-    event.stopped = true;
-  }
-
-  Event.Methods = {
-    isLeftClick: isLeftClick,
-    isMiddleClick: isMiddleClick,
-    isRightClick: isRightClick,
-
-    element: element,
-    findElement: findElement,
-
-    pointer: pointer,
-    pointerX: pointerX,
-    pointerY: pointerY,
-
-    stop: stop
-  };
-
-
-  var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
-    m[name] = Event.Methods[name].methodize();
-    return m;
-  });
-
-  if (Prototype.Browser.IE) {
-    function _relatedTarget(event) {
-      var element;
-      switch (event.type) {
-        case 'mouseover': element = event.fromElement; break;
-        case 'mouseout':  element = event.toElement;   break;
-        default: return null;
-      }
-      return Element.extend(element);
-    }
-
-    Object.extend(methods, {
-      stopPropagation: function() { this.cancelBubble = true },
-      preventDefault:  function() { this.returnValue = false },
-      inspect: function() { return '[object Event]' }
-    });
-
-    Event.extend = function(event, element) {
-      if (!event) return false;
-      if (event._extendedByPrototype) return event;
-
-      event._extendedByPrototype = Prototype.emptyFunction;
-      var pointer = Event.pointer(event);
-
-      Object.extend(event, {
-        target: event.srcElement || element,
-        relatedTarget: _relatedTarget(event),
-        pageX:  pointer.x,
-        pageY:  pointer.y
-      });
-
-      return Object.extend(event, methods);
-    };
-  } else {
-    Event.prototype = window.Event.prototype || document.createEvent('HTMLEvents').__proto__;
-    Object.extend(Event.prototype, methods);
-    Event.extend = Prototype.K;
-  }
-
-  function _createResponder(element, eventName, handler) {
-    var registry = Element.retrieve(element, 'prototype_event_registry');
-
-    if (Object.isUndefined(registry)) {
-      CACHE.push(element);
-      registry = Element.retrieve(element, 'prototype_event_registry', $H());
-    }
-
-    var respondersForEvent = registry.get(eventName);
-    if (Object.isUndefined(respondersForEvent)) {
-      respondersForEvent = [];
-      registry.set(eventName, respondersForEvent);
-    }
-
-    if (respondersForEvent.pluck('handler').include(handler)) return false;
-
-    var responder;
-    if (eventName.include(":")) {
-      responder = function(event) {
-        if (Object.isUndefined(event.eventName))
-          return false;
-
-        if (event.eventName !== eventName)
-          return false;
-
-        Event.extend(event, element);
-        handler.call(element, event);
-      };
-    } else {
-      if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED &&
-       (eventName === "mouseenter" || eventName === "mouseleave")) {
-        if (eventName === "mouseenter" || eventName === "mouseleave") {
-          responder = function(event) {
-            Event.extend(event, element);
-
-            var parent = event.relatedTarget;
-            while (parent && parent !== element) {
-              try { parent = parent.parentNode; }
-              catch(e) { parent = element; }
-            }
-
-            if (parent === element) return;
-
-            handler.call(element, event);
-          };
-        }
-      } else {
-        responder = function(event) {
-          Event.extend(event, element);
-          handler.call(element, event);
-        };
-      }
-    }
-
-    responder.handler = handler;
-    respondersForEvent.push(responder);
-    return responder;
-  }
-
-  function _destroyCache() {
-    for (var i = 0, length = CACHE.length; i < length; i++) {
-      Event.stopObserving(CACHE[i]);
-      CACHE[i] = null;
-    }
-  }
-
-  var CACHE = [];
-
-  if (Prototype.Browser.IE)
-    window.attachEvent('onunload', _destroyCache);
-
-  if (Prototype.Browser.WebKit)
-    window.addEventListener('unload', Prototype.emptyFunction, false);
-
-
-  var _getDOMEventName = Prototype.K;
-
-  if (!MOUSEENTER_MOUSELEAVE_EVENTS_SUPPORTED) {
-    _getDOMEventName = function(eventName) {
-      var translations = { mouseenter: "mouseover", mouseleave: "mouseout" };
-      return eventName in translations ? translations[eventName] : eventName;
-    };
-  }
-
-  function observe(element, eventName, handler) {
-    element = $(element);
-
-    var responder = _createResponder(element, eventName, handler);
-
-    if (!responder) return element;
-
-    if (eventName.include(':')) {
-      if (element.addEventListener)
-        element.addEventListener("dataavailable", responder, false);
-      else {
-        element.attachEvent("ondataavailable", responder);
-        element.attachEvent("onfilterchange", responder);
-      }
-    } else {
-      var actualEventName = _getDOMEventName(eventName);
-
-      if (element.addEventListener)
-        element.addEventListener(actualEventName, responder, false);
-      else
-        element.attachEvent("on" + actualEventName, responder);
-    }
-
-    return element;
-  }
-
-  function stopObserving(element, eventName, handler) {
-    element = $(element);
-
-    var registry = Element.retrieve(element, 'prototype_event_registry');
-
-    if (Object.isUndefined(registry)) return element;
-
-    if (eventName && !handler) {
-      var responders = registry.get(eventName);
-
-      if (Object.isUndefined(responders)) return element;
-
-      responders.each( function(r) {
-        Element.stopObserving(element, eventName, r.handler);
-      });
-      return element;
-    } else if (!eventName) {
-      registry.each( function(pair) {
-        var eventName = pair.key, responders = pair.value;
-
-        responders.each( function(r) {
-          Element.stopObserving(element, eventName, r.handler);
-        });
-      });
-      return element;
-    }
-
-    var responders = registry.get(eventName);
-
-    if (!responders) return;
-
-    var responder = responders.find( function(r) { return r.handler === handler; });
-    if (!responder) return element;
-
-    var actualEventName = _getDOMEventName(eventName);
-
-    if (eventName.include(':')) {
-      if (element.removeEventListener)
-        element.removeEventListener("dataavailable", responder, false);
-      else {
-        element.detachEvent("ondataavailable", responder);
-        element.detachEvent("onfilterchange",  responder);
-      }
-    } else {
-      if (element.removeEventListener)
-        element.removeEventListener(actualEventName, responder, false);
-      else
-        element.detachEvent('on' + actualEventName, responder);
-    }
-
-    registry.set(eventName, responders.without(responder));
-
-    return element;
-  }
-
-  function fire(element, eventName, memo, bubble) {
-    element = $(element);
-
-    if (Object.isUndefined(bubble))
-      bubble = true;
-
-    if (element == document && document.createEvent && !element.dispatchEvent)
-      element = document.documentElement;
-
-    var event;
-    if (document.createEvent) {
-      event = document.createEvent('HTMLEvents');
-      event.initEvent('dataavailable', true, true);
-    } else {
-      event = document.createEventObject();
-      event.eventType = bubble ? 'ondataavailable' : 'onfilterchange';
-    }
-
-    event.eventName = eventName;
-    event.memo = memo || { };
-
-    if (document.createEvent)
-      element.dispatchEvent(event);
-    else
-      element.fireEvent(event.eventType, event);
-
-    return Event.extend(event);
-  }
-
-
-  Object.extend(Event, Event.Methods);
-
-  Object.extend(Event, {
-    fire:          fire,
-    observe:       observe,
-    stopObserving: stopObserving
-  });
-
-  Element.addMethods({
-    fire:          fire,
-
-    observe:       observe,
-
-    stopObserving: stopObserving
-  });
-
-  Object.extend(document, {
-    fire:          fire.methodize(),
-
-    observe:       observe.methodize(),
-
-    stopObserving: stopObserving.methodize(),
-
-    loaded:        false
-  });
-
-  if (window.Event) Object.extend(window.Event, Event);
-  else window.Event = Event;
-})();
-
-(function() {
-  /* Support for the DOMContentLoaded event is based on work by Dan Webb,
-     Matthias Miller, Dean Edwards, John Resig, and Diego Perini. */
-
-  var timer;
-
-  function fireContentLoadedEvent() {
-    if (document.loaded) return;
-    if (timer) window.clearTimeout(timer);
-    document.loaded = true;
-    document.fire('dom:loaded');
-  }
-
-  function checkReadyState() {
-    if (document.readyState === 'complete') {
-      document.stopObserving('readystatechange', checkReadyState);
-      fireContentLoadedEvent();
-    }
-  }
-
-  function pollDoScroll() {
-    try { document.documentElement.doScroll('left'); }
-    catch(e) {
-      timer = pollDoScroll.defer();
-      return;
-    }
-    fireContentLoadedEvent();
-  }
-
-  if (document.addEventListener) {
-    document.addEventListener('DOMContentLoaded', fireContentLoadedEvent, false);
-  } else {
-    document.observe('readystatechange', checkReadyState);
-    if (window == top)
-      timer = pollDoScroll.defer();
-  }
-
-  Event.observe(window, 'load', fireContentLoadedEvent);
-})();
-
-Element.addMethods();
-
-/*------------------------------- DEPRECATED -------------------------------*/
-
-Hash.toQueryString = Object.toQueryString;
-
-var Toggle = { display: Element.toggle };
-
-Element.Methods.childOf = Element.Methods.descendantOf;
-
-var Insertion = {
-  Before: function(element, content) {
-    return Element.insert(element, {before:content});
-  },
-
-  Top: function(element, content) {
-    return Element.insert(element, {top:content});
-  },
-
-  Bottom: function(element, content) {
-    return Element.insert(element, {bottom:content});
-  },
-
-  After: function(element, content) {
-    return Element.insert(element, {after:content});
-  }
-};
-
-var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
-
-var Position = {
-  includeScrollOffsets: false,
-
-  prepare: function() {
-    this.deltaX =  window.pageXOffset
-                || document.documentElement.scrollLeft
-                || document.body.scrollLeft
-                || 0;
-    this.deltaY =  window.pageYOffset
-                || document.documentElement.scrollTop
-                || document.body.scrollTop
-                || 0;
-  },
-
-  within: function(element, x, y) {
-    if (this.includeScrollOffsets)
-      return this.withinIncludingScrolloffsets(element, x, y);
-    this.xcomp = x;
-    this.ycomp = y;
-    this.offset = Element.cumulativeOffset(element);
-
-    return (y >= this.offset[1] &&
-            y <  this.offset[1] + element.offsetHeight &&
-            x >= this.offset[0] &&
-            x <  this.offset[0] + element.offsetWidth);
-  },
-
-  withinIncludingScrolloffsets: function(element, x, y) {
-    var offsetcache = Element.cumulativeScrollOffset(element);
-
-    this.xcomp = x + offsetcache[0] - this.deltaX;
-    this.ycomp = y + offsetcache[1] - this.deltaY;
-    this.offset = Element.cumulativeOffset(element);
-
-    return (this.ycomp >= this.offset[1] &&
-            this.ycomp <  this.offset[1] + element.offsetHeight &&
-            this.xcomp >= this.offset[0] &&
-            this.xcomp <  this.offset[0] + element.offsetWidth);
-  },
-
-  overlap: function(mode, element) {
-    if (!mode) return 0;
-    if (mode == 'vertical')
-      return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
-        element.offsetHeight;
-    if (mode == 'horizontal')
-      return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
-        element.offsetWidth;
-  },
-
-
-  cumulativeOffset: Element.Methods.cumulativeOffset,
-
-  positionedOffset: Element.Methods.positionedOffset,
-
-  absolutize: function(element) {
-    Position.prepare();
-    return Element.absolutize(element);
-  },
-
-  relativize: function(element) {
-    Position.prepare();
-    return Element.relativize(element);
-  },
-
-  realOffset: Element.Methods.cumulativeScrollOffset,
-
-  offsetParent: Element.Methods.getOffsetParent,
-
-  page: Element.Methods.viewportOffset,
-
-  clone: function(source, target, options) {
-    options = options || { };
-    return Element.clonePosition(target, source, options);
-  }
-};
-
-/*--------------------------------------------------------------------------*/
-
-if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
-  function iter(name) {
-    return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
-  }
-
-  instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
-  function(element, className) {
-    className = className.toString().strip();
-    var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
-    return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
-  } : function(element, className) {
-    className = className.toString().strip();
-    var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
-    if (!classNames && !className) return elements;
-
-    var nodes = $(element).getElementsByTagName('*');
-    className = ' ' + className + ' ';
-
-    for (var i = 0, child, cn; child = nodes[i]; i++) {
-      if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
-          (classNames && classNames.all(function(name) {
-            return !name.toString().blank() && cn.include(' ' + name + ' ');
-          }))))
-        elements.push(Element.extend(child));
-    }
-    return elements;
-  };
-
-  return function(className, parentElement) {
-    return $(parentElement || document.body).getElementsByClassName(className);
-  };
-}(Element.Methods);
-
-/*--------------------------------------------------------------------------*/
-
-Element.ClassNames = Class.create();
-Element.ClassNames.prototype = {
-  initialize: function(element) {
-    this.element = $(element);
-  },
-
-  _each: function(iterator) {
-    this.element.className.split(/\s+/).select(function(name) {
-      return name.length > 0;
-    })._each(iterator);
-  },
-
-  set: function(className) {
-    this.element.className = className;
-  },
-
-  add: function(classNameToAdd) {
-    if (this.include(classNameToAdd)) return;
-    this.set($A(this).concat(classNameToAdd).join(' '));
-  },
-
-  remove: function(classNameToRemove) {
-    if (!this.include(classNameToRemove)) return;
-    this.set($A(this).without(classNameToRemove).join(' '));
-  },
-
-  toString: function() {
-    return $A(this).join(' ');
-  }
-};
-
-Object.extend(Element.ClassNames.prototype, Enumerable);
-
-/*--------------------------------------------------------------------------*/
index 8ed20c2..96c21c5 100644 (file)
@@ -709,7 +709,7 @@ formatNumber : function(n,fmt) {
  * <dt>translateDate</dt>
  *   <dd>use the date format specified in the Rico.dateFmt property</dd>
  * <dt>Otherwise</dt>
  * <dt>translateDate</dt>
  *   <dd>use the date format specified in the Rico.dateFmt property</dd>
  * <dt>Otherwise</dt>
- *   <dd>Any combination of: yyyy, yy, mmmm, mmm, mm, m, hh, h, HH, H, nn, ss, a/p</dd>
+ *   <dd>Any combination of: yyyy, yy, mmmm, mmm, mm, m, dddd, ddd, dd, d, hh, h, HH, H, nn, ss, a/p</dd>
  *</dl>
  */
 formatDate : function(d,fmt) {
  *</dl>
  */
 formatDate : function(d,fmt) {
diff --git a/ricoClient/js/rico2Dojo.js b/ricoClient/js/rico2Dojo.js
deleted file mode 100644 (file)
index 83a92fc..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
-  *  Copyright (c) 2009 Matt Brown
-  *
-  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
-  *  file except in compliance with the License. You may obtain a copy of the License at
-  *
-  *         http://www.apache.org/licenses/LICENSE-2.0
-  *
-  *  Unless required by applicable law or agreed to in writing, software distributed under the
-  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-  *  either express or implied. See the License for the specific language governing permissions
-  *  and limitations under the License.
-  **/
-
-if (typeof dojo=='undefined') throw('This version of Rico requires the Dojo library');
-
-Rico.Lib='dojo';
-Rico.LibVersion=dojo.version.toString();
-Rico.extend=dojo.mixin;
-Rico.trim=dojo.trim;
-
-Rico.tryFunctions = function() {
-  for (var i=0; i<arguments.length; i++) {
-               try {
-                       return arguments[i]();
-               } catch(e){}
-       }
-       return null;
-};
-
-Rico.select=dojo.query;
-  
-Rico.eventBind=function(element, eventName, handler) {
-  handler.connection=dojo.connect(Rico.$(element), eventName, handler.object, handler.method);
-};
-
-Rico.eventUnbind=function(element, eventName, handler) {
-  dojo.disconnect(handler.connection);
-};
-
-Rico.eventElement=function(ev) {
-  return ev.target;
-};
-
-Rico.eventStop=dojo.stopEvent;
-
-Rico.eventClient=function(ev) {
-  return {x:ev.pageX, y:ev.pageY};
-};
-
-Rico.eventHandle=function(object, method) {
-  return { object: object, method: method };
-};
-
-Rico.addClass=dojo.addClass;
-Rico.removeClass=dojo.removeClass;
-Rico.hasClass=dojo.hasClass;
-
-Rico.getStyle=function(element, name) {
-  var camelCase = name.replace(/\-(\w)/g, function(all, letter){
-    return letter.toUpperCase();
-  });
-  return dojo.style(element,camelCase);
-};
-
-Rico.setStyle=dojo.style;
-
-// tried to use dojo._abs - 1.3.0 was broken in webkit, nightlies broken on IE8
-Rico.cumulativeOffset=function(element) {
-//  var offset=dojo._abs(element);
-//  return {top:offset.y, left:offset.x};
-  element=Rico.$(element);
-  var valueT = 0, valueL = 0;
-  do {
-    valueT += element.offsetTop  || 0;
-    valueL += element.offsetLeft || 0;
-    element = element.offsetParent;
-  } while (element);
-  return {left: valueL, top: valueT};
-};
-
-Rico.positionedOffset=function(element) {
-  element=Rico.$(element);
-  var p, valueT = 0, valueL = 0;
-  do {
-    valueT += element.offsetTop  || 0;
-    valueL += element.offsetLeft || 0;
-    element = element.offsetParent;
-    if (element) {
-      p = dojo.style(element,'position');
-      if (p == 'relative' || p == 'absolute') break;
-    }
-  } while (element);
-  return {left: valueL, top: valueT};
-};
-
-Rico.getDirectChildrenByTag=function(element, tagName) {
-  var kids = [];
-  var allKids = element.childNodes;
-  tagName=tagName.toLowerCase();
-  for( var i = 0 ; i < allKids.length ; i++ ) {
-    if ( allKids[i] && allKids[i].tagName && allKids[i].tagName.toLowerCase() == tagName )
-      kids.push(allKids[i]);
-  }
-  return kids;
-};
-
-// logic borrowed from Prototype
-Rico._getWinDimension=function(D) {
-  if (this.isWebKit && !document.evaluate) {
-    // Safari <3.0 needs self.innerWidth/Height
-    return self['inner' + D];
-  } else if (this.isOpera && parseFloat(window.opera.version()) < 9.5) {
-    // Opera <9.5 needs document.body.clientWidth/Height
-    return document.body['client' + D]
-  } else {
-    return document.documentElement['client' + D];
-  }
-};
-
-Rico.windowHeight=function() {
-  return this._getWinDimension('Height');
-};
-
-Rico.windowWidth=function() {
-  return this._getWinDimension('Width');
-};
-
-Rico.docScrollLeft=function() {
-  return dojo._docScroll().x;
-};
-
-Rico.docScrollTop=function() {
-  return dojo._docScroll().y;
-};
-
-Rico.ajaxRequest=function(url,options) {
-  this.dojoSend(url,options);
-}
-
-Rico.ajaxRequest.prototype = {
-  dojoSend : function(url,options) {
-    this.onComplete=options.onComplete;
-    this.onSuccess=options.onSuccess;
-    this.onFailure=options.onFailure;
-    var dOptions = {
-      handle : Rico.bind(this,'dojoComplete'),
-      error : Rico.bind(this,'dojoError'),
-      load : Rico.bind(this,'dojoLoad'),
-      url : url,
-      content : options.parameters,
-      form : options.form
-    }
-    var method=options.method.toUpperCase();
-    dojo.xhr(method, dOptions, method=='POST');
-  },
-  
-  dojoComplete : function(dataORerror, ioArgs) {
-    if (this.onComplete) this.onComplete(ioArgs.xhr);
-  },
-  
-  dojoError : function(response, ioArgs) {
-    if (this.onFailure) this.onFailure(ioArgs.xhr);
-  },
-  
-  dojoLoad : function(response, ioArgs) {
-    if (this.onSuccess) this.onSuccess(ioArgs.xhr);
-  }
-}
-
-Rico.getJSON=function(xhr) { return dojo.fromJson(xhr.responseText); };
-
-Rico.ajaxSubmit=function(form,url,options) {
-  options.form=form;
-  if (!options.method) options.method='post';
-  new Rico.ajaxRequest(url,options);
-}
-
-Rico.toQueryString=dojo.objectToQuery;
-
-// Animation
-
-Rico.fadeIn=function(element,duration,onEnd) {
-  var a=dojo.fadeIn({node:element, duration:duration});
-  if (onEnd) dojo.connect(a,"onEnd",onEnd);
-  a.play();
-};
-
-Rico.fadeOut=function(element,duration,onEnd) {
-  var a=dojo.fadeOut({node:element, duration:duration});
-  if (onEnd) dojo.connect(a,"onEnd",onEnd);
-  a.play();
-};
-
-Rico.animate=function(element,options,properties) {
-  options.node=element;
-  options.properties=properties;
-  a=dojo.animateProperty(options);
-  a.play();
-};
diff --git a/ricoClient/js/rico2Ext.js b/ricoClient/js/rico2Ext.js
deleted file mode 100644 (file)
index dc05a38..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/**
-  *  Copyright (c) 2009 Matt Brown
-  *
-  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
-  *  file except in compliance with the License. You may obtain a copy of the License at
-  *
-  *         http://www.apache.org/licenses/LICENSE-2.0
-  *
-  *  Unless required by applicable law or agreed to in writing, software distributed under the
-  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-  *  either express or implied. See the License for the specific language governing permissions
-  *  and limitations under the License.
-  **/
-
-if (typeof Ext=='undefined') throw('This version of Rico requires the Ext-core library');
-
-
-Rico.Lib='Ext-core';
-Rico.LibVersion=Ext.version;
-Rico.extend=Ext.apply;
-Rico.trim=function(s) { return s.replace(Ext.DomQuery.trimRe,''); };
-Rico.tryFunctions = function() {
-  for (var i=0; i<arguments.length; i++) {
-               try {
-                       return arguments[i]();
-               } catch(e){}
-       }
-       return null;
-};
-
-
-Rico.select=Ext.query;
-  
-Rico.eventBind=function(element, eventName, handler) {
-  Ext.EventManager.addListener(element, eventName, handler.object[handler.method], handler.object);
-};
-
-Rico.eventUnbind=function(element, eventName, handler) {
-  Ext.EventManager.removeListener(element, eventName, handler.object[handler.method], handler.object);
-};
-
-Rico.eventHandle=function(object, method) {
-  return { object: object, method: method };
-};
-
-Rico.eventElement=function(ev) {
-  return ev.target;
-};
-
-Rico.eventClient=function(ev) {
-  return {x:ev.browserEvent.clientX, y:ev.browserEvent.clientY};
-};
-
-Rico.eventStop=function(ev) {
-  ev.stopEvent();
-};
-
-Rico.eventRelatedTarget=function(ev) {
-  return ev.getRelatedTarget();
-};
-  
-Rico.eventKey=function(ev) {
-  return ev.getKey();
-};
-  
-Rico.eventLeftClick=function(ev) {
-  return ev.button===0;
-};
-  
-Rico.addClass=function(element, className) {
-  return Ext.get(element).addClass(className);
-};
-
-Rico.removeClass=function(element, className) {
-  return Ext.get(element).removeClass(className);
-};
-
-Rico.hasClass=function(element, className) {
-  return Ext.get(element).hasClass(className);
-};
-  
-Rico.getStyle=function(element, property) {
-  return Ext.get(element).getStyle(property);
-};
-Rico.setStyle=function(element, properties) {
-  return Ext.get(element).setStyle(properties);
-};
-
-// logic borrowed from Prototype
-// Ext.lib.Dom.getViewportWidth/Height includes scrollbar in Gecko browsers
-Rico._getWinDimension=function(D) {
-  if (this.isWebKit && !document.evaluate) {
-    // Safari <3.0 needs self.innerWidth/Height
-    return self['inner' + D];
-  } else if (this.isOpera && parseFloat(window.opera.version()) < 9.5) {
-    // Opera <9.5 needs document.body.clientWidth/Height
-    return document.body['client' + D]
-  } else {
-    return document.documentElement['client' + D];
-  }
-};
-
-Rico.windowHeight=function() {
-  return this._getWinDimension('Height');
-};
-
-Rico.windowWidth=function() {
-  return this._getWinDimension('Width');
-};
-
-Rico.cumulativeOffset=function(element) {
-  element=Rico.$(element);
-  var valueT = 0, valueL = 0;
-  do {
-    valueT += element.offsetTop  || 0;
-    valueL += element.offsetLeft || 0;
-    element = element.offsetParent;
-  } while (element);
-  return {left: valueL, top: valueT};
-};
-
-Rico.positionedOffset=function(element) {
-  element=Rico.$(element);
-  var p, valueT = 0, valueL = 0;
-  do {
-    valueT += element.offsetTop  || 0;
-    valueL += element.offsetLeft || 0;
-    element = element.offsetParent;
-    if (element) {
-      p = Ext.get(element).getStyle('position');
-      if (p == 'relative' || p == 'absolute') break;
-    }
-  } while (element);
-  return {left: valueL, top: valueT};
-};
-
-Rico.docScrollLeft=function() {
-  return Ext.get(document).getScroll().left;
-};
-
-Rico.docScrollTop=function() {
-  return Ext.get(document).getScroll().top;
-};
-
-Rico.getDirectChildrenByTag=function(element, tagName) {
-  var kids = [];
-  var allKids = element.childNodes;
-  tagName=tagName.toLowerCase();
-  for( var i = 0 ; i < allKids.length ; i++ ) {
-    if ( allKids[i] && allKids[i].tagName && allKids[i].tagName.toLowerCase() == tagName )
-      kids.push(allKids[i]);
-  }
-  return kids;
-};
-
-Rico.ajaxRequest=function(url,options) {
-  var extOptions = {
-    success : options.onSuccess || options.onComplete,
-    failure : options.onFailure || options.onComplete,
-    method : options.method.toUpperCase(),
-    url : url,
-    form : options.form,
-    params : options.parameters
-  }
-  Ext.Ajax.request(extOptions);
-}
-
-Rico.getJSON=function(xhr) { return window["eval"]("(" + xhr.responseText + ")"); };
-
-Rico.ajaxSubmit=function(form,url,options) {
-  options.form=form;
-  if (!options.method) options.method='post';
-  Rico.ajaxRequest(url,options);
-}
-Rico.toQueryString=Ext.urlEncode;
-
-// Animation
-
-Rico.fadeIn=function(element,duration,onEnd) {
-  Ext.get(element).fadeIn({duration:duration/1000.0, callback: onEnd});
-};
-
-Rico.fadeOut=function(element,duration,onEnd) {
-  Ext.get(element).fadeOut({duration:duration/1000.0, callback: onEnd});
-};
-
-Rico.animate=function(element,options,properties) {
-  var opts={};
-  opts.callback=options.onEnd;
-  opts.duration=options.duration/1000.0;
-  opts.width=properties.width;
-  opts.height=properties.height;
-  opts.x=properties.left;
-  opts.y=properties.top;
-  opts.opacity=properties.opacity;
-  Ext.get(element).shift(opts);
-};
diff --git a/ricoClient/js/rico2Glow.js b/ricoClient/js/rico2Glow.js
deleted file mode 100644 (file)
index e2578d4..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-/**
-  *  Copyright (c) 2009 Matt Brown
-  *
-  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
-  *  file except in compliance with the License. You may obtain a copy of the License at
-  *
-  *         http://www.apache.org/licenses/LICENSE-2.0
-  *
-  *  Unless required by applicable law or agreed to in writing, software distributed under the
-  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-  *  either express or implied. See the License for the specific language governing permissions
-  *  and limitations under the License.
-  **/
-
-if (typeof glow=='undefined') throw('This version of Rico requires the glow library');
-
-
-Rico.Lib='Glow';
-Rico.LibVersion=glow.VERSION;
-Rico.extend=glow.lang.apply;
-Rico.trim=glow.lang.trim;
-Rico.tryFunctions = function() {
-  for (var i=0; i<arguments.length; i++) {
-    try {
-      return arguments[i]();
-    } catch(e){}
-  }
-  return null;
-};
-Rico._g=function(element) {
-  if (typeof element=='string')
-    element = document.getElementById(element);
-  return glow.dom.get(element);
-};
-
-Rico.select=function(selector, element) {
-  return element ? this._g(element).get(selector) : glow.dom.get(selector);
-};
-  
-Rico.eventBind=function(element, eventName, handler) {
-  handler.id=glow.events.addListener(Rico.$(element), eventName, handler.object[handler.method], handler.object);
-};
-
-Rico.eventUnbind=function(element, eventName, handler) {
-  glow.events.removeListener(handler.id);
-};
-
-Rico.eventHandle=function(object, method) {
-  return { object: object, method: method };
-};
-
-Rico.eventElement=function(ev) {
-  return ev.source;
-};
-
-Rico.eventClient=function(ev) {
-  return {x:ev.pageX - document.body.scrollLeft - document.documentElement.scrollLeft, 
-          y:ev.pageY - document.body.scrollTop - document.documentElement.scrollTop};
-};
-
-Rico.eventStop=function(ev) {
-  ev.preventDefault();
-  ev.stopPropagation();
-};
-
-Rico.eventKey=function(ev) {
-  return ev.keyCode;
-};
-
-Rico.eventLeftClick=function(ev) {
-  return ev.button==0;
-};
-  
-Rico.addClass=function(element, className) {
-  return this._g(element).addClass(className);
-};
-
-Rico.removeClass=function(element, className) {
-  return this._g(element).removeClass(className);
-};
-
-Rico.hasClass=function(element, className) {
-  return this._g(element).hasClass(className);
-};
-
-/*
-ran into bugs on FF and Safari with native Glow function
-Rico.getStyle=function(element, property) {
-  return this._g(element).css(property);
-};
-
-Use a modified version of Prototype's method
-*/
-Rico.getStyle=function(element, style) {
-  element = Rico.$(element);
-  var camelCase = style.replace(/\-(\w)/g, function(all, letter){
-    return letter.toUpperCase();
-  });
-  style = style == 'float' ? 'cssFloat' : camelCase;
-  var value = element.style[style];
-  if (!value || value == 'auto') {
-    if (element.currentStyle) {
-      value=element.currentStyle[style];
-    } else if (document.defaultView) {
-      var css = document.defaultView.getComputedStyle(element, null);
-      value = css ? css[style] : null;
-    }
-  }
-  if (style == 'opacity') return value ? parseFloat(value) : 1.0;
-  return value == 'auto' ? null : value;
-};
-
-
-Rico.setStyle=function(element, properties) {
-  var elem=this._g(element);
-  for (var prop in properties) {
-    elem.css(prop,properties[prop])
-  }
-};
-
-/**
- * @returns available height, excluding scrollbar & margin
- */
-Rico.windowHeight=function() {
-  return glow.dom.get(window).height();
-};
-
-/**
- * @returns available width, excluding scrollbar & margin
- */
-Rico.windowWidth=function() {
-  return glow.dom.get(window).width();
-};
-
-Rico.positionedOffset=function(element) {
-  var p, valueT = 0, valueL = 0;
-  do {
-    valueT += element.offsetTop  || 0;
-    valueL += element.offsetLeft || 0;
-    element = element.offsetParent;
-    if (element) {
-      p = glow.dom.get(element).css('position');
-      if (p == 'relative' || p == 'absolute') break;
-    }
-  } while (element);
-  return {left: valueL, top: valueT};
-};
-
-Rico.cumulativeOffset=function(element) {
-  return this._g(element).offset();
-};
-
-Rico._docElement=function() {
-  return (document.compatMode && document.compatMode.indexOf("CSS")!=-1) ? document.documentElement : document.getElementsByTagName("body")[0];
-},
-
-Rico.docScrollLeft=function() {
-  return Rico._docElement.scrollLeft || window.pageXOffset || 0;
-};
-
-Rico.docScrollTop=function() {
-  return Rico._docElement.scrollTop || window.pageYOffset || 0;
-};
-
-Rico.getDirectChildrenByTag=function(element, tagName) {
-  tagName=tagName.toLowerCase();
-  return this._g(element).children().filter(function(i) { return this.tagName && this.tagName.toLowerCase()==tagName; });
-};
-
-Rico.getJSON=function(xhr) { return glow.data.decodeJson(xhr.responseText); };
-
-Rico.ajaxRequest=function(url,options) {
-  this.glowSend(url,options);
-}
-
-Rico.ajaxRequest.prototype = {
-  glowSend : function(url,options) {
-    this.onComplete=options.onComplete;
-    this.onSuccess=options.onSuccess;
-    this.onFailure=options.onFailure;
-    options.onLoad=Rico.bind(this,'glowLoad');
-    options.onError=Rico.bind(this,'glowError');
-    options.useCache=true;
-    if (options.method.toLowerCase()=='post') {
-      glow.net.post(url,options.parameters,options);
-    } else {
-      glow.net.get(url+'?'+glow.data.encodeUrl(options.parameters),options);
-    }
-  },
-  
-  glowError : function(response) {
-    if (this.onFailure) this.onFailure(response);
-    if (this.onComplete) this.onComplete(response.nativeResponse);
-  },
-  
-  glowLoad : function(response) {
-    if (this.onSuccess) this.onSuccess(response.nativeResponse);
-    if (this.onComplete) this.onComplete(response.nativeResponse);
-  }
-}
-
-Rico.ajaxSubmit=function(form,url,options) {
-  options.parameters=glow.data.encodeUrl(this._g(form).val());
-  if (!options.method) options.method='post';
-  url=url || form.action;
-  new Rico.ajaxRequest(url,options);
-}
-Rico.toQueryString=glow.data.encodeUrl;
-
-// Animation
-
-Rico.fadeIn=function(element,duration,onEnd) {
-  glow.anim.fadeIn(this._g(element), duration/1000.0, {onComplete:onEnd});
-};
-
-Rico.fadeOut=function(element,duration,onEnd) {
-  glow.anim.fadeOut(this._g(element), duration/1000.0, {onComplete:onEnd});
-};
-
-Rico.animate=function(element,options,properties) {
-  var effect=glow.anim.css(this._g(element), options.duration/1000.0, properties);
-  glow.events.addListener(effect, "complete", options.onEnd);
-  effect.start();
-  return effect;
-};
diff --git a/ricoClient/js/rico2Moo.js b/ricoClient/js/rico2Moo.js
deleted file mode 100644 (file)
index 81f5947..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
-  *  Copyright (c) 2009 Matt Brown
-  *
-  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
-  *  file except in compliance with the License. You may obtain a copy of the License at
-  *
-  *         http://www.apache.org/licenses/LICENSE-2.0
-  *
-  *  Unless required by applicable law or agreed to in writing, software distributed under the
-  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-  *  either express or implied. See the License for the specific language governing permissions
-  *  and limitations under the License.
-  **/
-
-if (typeof MooTools=='undefined') throw('This version of Rico requires the MooTools library');
-
-
-Rico.Lib='MooTools';
-Rico.LibVersion=MooTools.version;
-Rico.extend=$extend;
-Rico.tryFunctions = $try;
-Rico.trim=function(s) { return s.trim(); };
-
-Rico.select=function(selector, element) {
-  return $(element || document).getElements(selector);
-};
-  
-Rico.eventBind=function(element, eventName, handler) {
-  $(element).addEvent(eventName, handler);
-};
-
-Rico.eventUnbind=function(element, eventName, handler) {
-  $(element).removeEvent(eventName, handler);
-};
-
-Rico.eventHandle=function(object, method) {
-  return object[method].bindWithEvent(object);
-};
-
-Rico.eventElement=function(ev) {
-  return ev.target;
-};
-
-Rico.eventClient=function(ev) {
-  return ev.client;
-};
-
-Rico.eventKey=function(ev) {
-  return ev.code;
-};
-
-Rico.eventStop=function(ev) {
-  ev.stop();
-};
-
-Rico.eventLeftClick=function(ev) {
-  return !ev.rightClick;
-};
-  
-Rico.addClass=function(element, className) {
-  return $(element).addClass(className);
-};
-
-Rico.removeClass=function(element, className) {
-  return $(element).removeClass(className);
-};
-
-Rico.hasClass=function(element, className) {
-  return $(element).hasClass(className);
-};
-  
-Rico.getStyle=function(element, property) {
-  return $(element).getStyle(property);
-};
-
-Rico.setStyle=function(element, properties) {
-  return $(element).setStyles(properties);
-};
-
-/**
- * @returns available height, excluding scrollbar & margin
- */
-Rico.windowHeight=function() {
-  return Window.getSize().y;
-};
-
-/**
- * @returns available width, excluding scrollbar & margin
- */
-Rico.windowWidth=function() {
-  return Window.getSize().x;
-};
-
-Rico._fixOffsets=function(o) {
-  return {top: o.y, left: o.x};
-}
-
-Rico.positionedOffset=function(element) {
-  var p, valueT = 0, valueL = 0;
-  do {
-    valueT += element.offsetTop  || 0;
-    valueL += element.offsetLeft || 0;
-    element = element.offsetParent;
-    if (element) {
-      p = $(element).getStyle('position');
-      if (p == 'relative' || p == 'absolute') break;
-    }
-  } while (element);
-  return {left: valueL, top: valueT};
-};
-
-Rico.cumulativeOffset=function(element) {
-  return this._fixOffsets($(element).getPosition());
-};
-
-Rico.docScrollLeft=function() {
-  return Window.getScroll().x;
-};
-
-Rico.docScrollTop=function() {
-  return Window.getScroll().y;
-};
-
-Rico.getDirectChildrenByTag=function(element, tagName) {
-  return $(element).getChildren(tagName);
-};
-
-Rico.ajaxRequest=function(url,options) {
-  this.mooSend(url,options);
-}
-
-Rico.ajaxRequest.prototype = {
-  mooSend : function(url,options) {
-    this.onSuccess=options.onSuccess;
-    this.onComplete=options.onComplete;
-    var mooOptions = {
-      onComplete : Rico.bind(this,'mooComplete'),
-      onSuccess : Rico.bind(this,'mooSuccess'),
-      onFailure : options.onFailure,
-      method : options.method,
-      data : options.parameters,
-      url : url
-    }
-    this.mooRequest = new Request(mooOptions);
-    this.mooRequest.send();
-  },
-  
-  mooSuccess : function() {
-    if (this.onSuccess) this.onSuccess(this.mooRequest.xhr);
-  },
-  
-  mooComplete : function() {
-    if (this.onComplete) this.onComplete(this.mooRequest.xhr);
-  }
-}
-
-Rico.getJSON=function(xhr) { return JSON.decode(xhr.responseText,true); };
-
-Rico.ajaxSubmit=function(form,url,options) {
-  options.parameters=$(form).toQueryString();
-  if (!options.method) options.method='post';
-  url=url || form.action;
-  new Rico.ajaxRequest(url,options);
-}
-Rico.toQueryString=Hash.toQueryString;
-
-// Animation
-
-Rico.fadeIn=function(element,duration,onEnd) {
-  var a = new Fx.Tween(element, {duration:duration, onComplete:onEnd});
-  a.start('opacity', 1);
-};
-
-Rico.fadeOut=function(element,duration,onEnd) {
-  var a = new Fx.Tween(element, {duration:duration, onComplete:onEnd});
-  a.start('opacity', 0);
-};
-
-Rico.animate=function(element,options,properties) {
-  options.onComplete=options.onEnd;
-  var effect=new Fx.Morph(element,options);
-  effect.start(properties);
-  return effect;
-};
diff --git a/ricoClient/js/rico2Proto.js b/ricoClient/js/rico2Proto.js
deleted file mode 100644 (file)
index bf90dba..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
-  *  Copyright (c) 2009 Matt Brown
-  *
-  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
-  *  file except in compliance with the License. You may obtain a copy of the License at
-  *
-  *         http://www.apache.org/licenses/LICENSE-2.0
-  *
-  *  Unless required by applicable law or agreed to in writing, software distributed under the
-  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-  *  either express or implied. See the License for the specific language governing permissions
-  *  and limitations under the License.
-  **/
-
-if (typeof Prototype=='undefined') throw('This version of Rico requires the Prototype library');
-
-Rico.Lib='Prototype';
-Rico.LibVersion=Prototype.Version;
-Rico.extend=Object.extend;
-Rico.tryFunctions=Try.these;
-Rico.trim=function(s) { return s.strip(); };
-
-Rico.toQueryString=Object.toQueryString;
-Rico.ajaxRequest=Ajax.Request;
-
-Rico.ajaxSubmit=function(form,url,options) {
-  options.parameters=Form.serialize(form);
-  if (!options.method) options.method='post';
-  url=url || form.action;
-  new Ajax.Request(url,options);
-}
-
-Rico.getJSON=function(xhr) { return xhr.responseJSON; };
-
-Rico.select=function(selector, element) {
-  return element ? $(element).select(selector) : $$(selector);
-};
-  
-Rico.eventBind=Event.observe;
-Rico.eventUnbind=Event.stopObserving;
-Rico.eventElement=Event.element;
-Rico.eventStop=Event.stop;
-Rico.eventClient=function(ev) {
-  return {x:ev.clientX, y:ev.clientY};
-};
-
-Rico.eventHandle=function(object, method) {
-  return object[method].bindAsEventListener(object);
-};
-
-Rico.addClass=Element.addClassName;
-Rico.removeClass=Element.removeClassName;
-Rico.hasClass=Element.hasClassName;
-
-Rico.getStyle=Element.getStyle;
-Rico.setStyle=Element.setStyle;
-Rico.windowHeight=function() {
-  return document.viewport.getHeight();
-};
-Rico.windowWidth=function() {
-  return document.viewport.getWidth();
-};
-Rico.positionedOffset=function(element) {
-  return $(element).positionedOffset();
-};
-Rico.cumulativeOffset=function(element) {
-  return $(element).cumulativeOffset();
-};
-
-Rico.docScrollLeft=function() {
-  return document.viewport.getScrollOffsets().left;
-};
-
-Rico.docScrollTop=function() {
-  return document.viewport.getScrollOffsets().top;
-};
-
-Rico.getDirectChildrenByTag=function(element, tagName) {
-  tagName=tagName.toLowerCase();
-  return $(element).childElements().inject([],function(result,child) {
-    if (child.tagName && child.tagName.toLowerCase()==tagName) result.push(child);
-    return result;});
-};
-
-
-// Animation
-
-Rico._animate=Class.create({
-  initialize: function(element,options,properties) {
-    this.element=$(element);
-    this.properties=[];
-    this.totSteps=(typeof options.duration =='number' ? options.duration : 500)/25;
-    this.options=options;
-    this.curStep=0;
-    var m,curval;
-    for (var p in properties) {
-      curval=this.element.getStyle(p);
-      switch (typeof curval) {
-        case 'string':
-          if (m=curval.match(/(-?\d+\.?\d*)([a-zA-Z]*)$/)) {
-            this.properties.push({property:p, vStart:parseFloat(m[1]), vEnd:parseFloat(properties[p]), units:m.length > 2 ? m[2] : ''});
-          }
-          break;
-        case 'number':
-          this.properties.push({property:p, vStart:curval, vEnd:parseFloat(properties[p]), units:''});
-          break;
-      }
-    }
-    this.px=new PeriodicalExecuter(this.processStep.bind(this),0.025);
-  },
-  
-  processStep: function() {
-    this.curStep++;
-    if (this.curStep >= this.totSteps) {
-      this.px.stop();
-      for (var i=0; i<this.properties.length; i++) {
-        this.setStyle(i,this.properties[i].vEnd);
-      }
-      if (this.options.onEnd) this.options.onEnd();
-    } else {
-      for (var i=0; i<this.properties.length; i++) {
-        var n=this.properties[i].vStart + (this.curStep / this.totSteps) * (this.properties[i].vEnd - this.properties[i].vStart);
-        this.setStyle(i,n);
-      }
-    }
-  },
-  
-  setStyle: function(idx, newVal) {
-    if (this.properties[idx].units) newVal+=this.properties[idx].units;
-    var styleParm={};
-    styleParm[this.properties[idx].property]=newVal;
-    this.element.setStyle(styleParm);
-  }
-});
-
-Rico.animate=function(element,options,properties) {
-  var a=new Rico._animate(element,options,properties);
-};
-
-Rico.fadeIn=function(element,duration,onEnd) {
-  new Rico._animate(element, {duration:duration, onEnd:onEnd}, {opacity:1.0})
-};
-
-Rico.fadeOut=function(element,duration,onEnd) {
-  new Rico._animate(element, {duration:duration, onEnd:onEnd}, {opacity:0.0})
-};
diff --git a/ricoClient/js/rico2doj.js b/ricoClient/js/rico2doj.js
new file mode 100644 (file)
index 0000000..83a92fc
--- /dev/null
@@ -0,0 +1,200 @@
+/**
+  *  Copyright (c) 2009 Matt Brown
+  *
+  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+  *  file except in compliance with the License. You may obtain a copy of the License at
+  *
+  *         http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software distributed under the
+  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+  *  either express or implied. See the License for the specific language governing permissions
+  *  and limitations under the License.
+  **/
+
+if (typeof dojo=='undefined') throw('This version of Rico requires the Dojo library');
+
+Rico.Lib='dojo';
+Rico.LibVersion=dojo.version.toString();
+Rico.extend=dojo.mixin;
+Rico.trim=dojo.trim;
+
+Rico.tryFunctions = function() {
+  for (var i=0; i<arguments.length; i++) {
+               try {
+                       return arguments[i]();
+               } catch(e){}
+       }
+       return null;
+};
+
+Rico.select=dojo.query;
+  
+Rico.eventBind=function(element, eventName, handler) {
+  handler.connection=dojo.connect(Rico.$(element), eventName, handler.object, handler.method);
+};
+
+Rico.eventUnbind=function(element, eventName, handler) {
+  dojo.disconnect(handler.connection);
+};
+
+Rico.eventElement=function(ev) {
+  return ev.target;
+};
+
+Rico.eventStop=dojo.stopEvent;
+
+Rico.eventClient=function(ev) {
+  return {x:ev.pageX, y:ev.pageY};
+};
+
+Rico.eventHandle=function(object, method) {
+  return { object: object, method: method };
+};
+
+Rico.addClass=dojo.addClass;
+Rico.removeClass=dojo.removeClass;
+Rico.hasClass=dojo.hasClass;
+
+Rico.getStyle=function(element, name) {
+  var camelCase = name.replace(/\-(\w)/g, function(all, letter){
+    return letter.toUpperCase();
+  });
+  return dojo.style(element,camelCase);
+};
+
+Rico.setStyle=dojo.style;
+
+// tried to use dojo._abs - 1.3.0 was broken in webkit, nightlies broken on IE8
+Rico.cumulativeOffset=function(element) {
+//  var offset=dojo._abs(element);
+//  return {top:offset.y, left:offset.x};
+  element=Rico.$(element);
+  var valueT = 0, valueL = 0;
+  do {
+    valueT += element.offsetTop  || 0;
+    valueL += element.offsetLeft || 0;
+    element = element.offsetParent;
+  } while (element);
+  return {left: valueL, top: valueT};
+};
+
+Rico.positionedOffset=function(element) {
+  element=Rico.$(element);
+  var p, valueT = 0, valueL = 0;
+  do {
+    valueT += element.offsetTop  || 0;
+    valueL += element.offsetLeft || 0;
+    element = element.offsetParent;
+    if (element) {
+      p = dojo.style(element,'position');
+      if (p == 'relative' || p == 'absolute') break;
+    }
+  } while (element);
+  return {left: valueL, top: valueT};
+};
+
+Rico.getDirectChildrenByTag=function(element, tagName) {
+  var kids = [];
+  var allKids = element.childNodes;
+  tagName=tagName.toLowerCase();
+  for( var i = 0 ; i < allKids.length ; i++ ) {
+    if ( allKids[i] && allKids[i].tagName && allKids[i].tagName.toLowerCase() == tagName )
+      kids.push(allKids[i]);
+  }
+  return kids;
+};
+
+// logic borrowed from Prototype
+Rico._getWinDimension=function(D) {
+  if (this.isWebKit && !document.evaluate) {
+    // Safari <3.0 needs self.innerWidth/Height
+    return self['inner' + D];
+  } else if (this.isOpera && parseFloat(window.opera.version()) < 9.5) {
+    // Opera <9.5 needs document.body.clientWidth/Height
+    return document.body['client' + D]
+  } else {
+    return document.documentElement['client' + D];
+  }
+};
+
+Rico.windowHeight=function() {
+  return this._getWinDimension('Height');
+};
+
+Rico.windowWidth=function() {
+  return this._getWinDimension('Width');
+};
+
+Rico.docScrollLeft=function() {
+  return dojo._docScroll().x;
+};
+
+Rico.docScrollTop=function() {
+  return dojo._docScroll().y;
+};
+
+Rico.ajaxRequest=function(url,options) {
+  this.dojoSend(url,options);
+}
+
+Rico.ajaxRequest.prototype = {
+  dojoSend : function(url,options) {
+    this.onComplete=options.onComplete;
+    this.onSuccess=options.onSuccess;
+    this.onFailure=options.onFailure;
+    var dOptions = {
+      handle : Rico.bind(this,'dojoComplete'),
+      error : Rico.bind(this,'dojoError'),
+      load : Rico.bind(this,'dojoLoad'),
+      url : url,
+      content : options.parameters,
+      form : options.form
+    }
+    var method=options.method.toUpperCase();
+    dojo.xhr(method, dOptions, method=='POST');
+  },
+  
+  dojoComplete : function(dataORerror, ioArgs) {
+    if (this.onComplete) this.onComplete(ioArgs.xhr);
+  },
+  
+  dojoError : function(response, ioArgs) {
+    if (this.onFailure) this.onFailure(ioArgs.xhr);
+  },
+  
+  dojoLoad : function(response, ioArgs) {
+    if (this.onSuccess) this.onSuccess(ioArgs.xhr);
+  }
+}
+
+Rico.getJSON=function(xhr) { return dojo.fromJson(xhr.responseText); };
+
+Rico.ajaxSubmit=function(form,url,options) {
+  options.form=form;
+  if (!options.method) options.method='post';
+  new Rico.ajaxRequest(url,options);
+}
+
+Rico.toQueryString=dojo.objectToQuery;
+
+// Animation
+
+Rico.fadeIn=function(element,duration,onEnd) {
+  var a=dojo.fadeIn({node:element, duration:duration});
+  if (onEnd) dojo.connect(a,"onEnd",onEnd);
+  a.play();
+};
+
+Rico.fadeOut=function(element,duration,onEnd) {
+  var a=dojo.fadeOut({node:element, duration:duration});
+  if (onEnd) dojo.connect(a,"onEnd",onEnd);
+  a.play();
+};
+
+Rico.animate=function(element,options,properties) {
+  options.node=element;
+  options.properties=properties;
+  a=dojo.animateProperty(options);
+  a.play();
+};
diff --git a/ricoClient/js/rico2ext.js b/ricoClient/js/rico2ext.js
new file mode 100644 (file)
index 0000000..dc05a38
--- /dev/null
@@ -0,0 +1,197 @@
+/**
+  *  Copyright (c) 2009 Matt Brown
+  *
+  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+  *  file except in compliance with the License. You may obtain a copy of the License at
+  *
+  *         http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software distributed under the
+  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+  *  either express or implied. See the License for the specific language governing permissions
+  *  and limitations under the License.
+  **/
+
+if (typeof Ext=='undefined') throw('This version of Rico requires the Ext-core library');
+
+
+Rico.Lib='Ext-core';
+Rico.LibVersion=Ext.version;
+Rico.extend=Ext.apply;
+Rico.trim=function(s) { return s.replace(Ext.DomQuery.trimRe,''); };
+Rico.tryFunctions = function() {
+  for (var i=0; i<arguments.length; i++) {
+               try {
+                       return arguments[i]();
+               } catch(e){}
+       }
+       return null;
+};
+
+
+Rico.select=Ext.query;
+  
+Rico.eventBind=function(element, eventName, handler) {
+  Ext.EventManager.addListener(element, eventName, handler.object[handler.method], handler.object);
+};
+
+Rico.eventUnbind=function(element, eventName, handler) {
+  Ext.EventManager.removeListener(element, eventName, handler.object[handler.method], handler.object);
+};
+
+Rico.eventHandle=function(object, method) {
+  return { object: object, method: method };
+};
+
+Rico.eventElement=function(ev) {
+  return ev.target;
+};
+
+Rico.eventClient=function(ev) {
+  return {x:ev.browserEvent.clientX, y:ev.browserEvent.clientY};
+};
+
+Rico.eventStop=function(ev) {
+  ev.stopEvent();
+};
+
+Rico.eventRelatedTarget=function(ev) {
+  return ev.getRelatedTarget();
+};
+  
+Rico.eventKey=function(ev) {
+  return ev.getKey();
+};
+  
+Rico.eventLeftClick=function(ev) {
+  return ev.button===0;
+};
+  
+Rico.addClass=function(element, className) {
+  return Ext.get(element).addClass(className);
+};
+
+Rico.removeClass=function(element, className) {
+  return Ext.get(element).removeClass(className);
+};
+
+Rico.hasClass=function(element, className) {
+  return Ext.get(element).hasClass(className);
+};
+  
+Rico.getStyle=function(element, property) {
+  return Ext.get(element).getStyle(property);
+};
+Rico.setStyle=function(element, properties) {
+  return Ext.get(element).setStyle(properties);
+};
+
+// logic borrowed from Prototype
+// Ext.lib.Dom.getViewportWidth/Height includes scrollbar in Gecko browsers
+Rico._getWinDimension=function(D) {
+  if (this.isWebKit && !document.evaluate) {
+    // Safari <3.0 needs self.innerWidth/Height
+    return self['inner' + D];
+  } else if (this.isOpera && parseFloat(window.opera.version()) < 9.5) {
+    // Opera <9.5 needs document.body.clientWidth/Height
+    return document.body['client' + D]
+  } else {
+    return document.documentElement['client' + D];
+  }
+};
+
+Rico.windowHeight=function() {
+  return this._getWinDimension('Height');
+};
+
+Rico.windowWidth=function() {
+  return this._getWinDimension('Width');
+};
+
+Rico.cumulativeOffset=function(element) {
+  element=Rico.$(element);
+  var valueT = 0, valueL = 0;
+  do {
+    valueT += element.offsetTop  || 0;
+    valueL += element.offsetLeft || 0;
+    element = element.offsetParent;
+  } while (element);
+  return {left: valueL, top: valueT};
+};
+
+Rico.positionedOffset=function(element) {
+  element=Rico.$(element);
+  var p, valueT = 0, valueL = 0;
+  do {
+    valueT += element.offsetTop  || 0;
+    valueL += element.offsetLeft || 0;
+    element = element.offsetParent;
+    if (element) {
+      p = Ext.get(element).getStyle('position');
+      if (p == 'relative' || p == 'absolute') break;
+    }
+  } while (element);
+  return {left: valueL, top: valueT};
+};
+
+Rico.docScrollLeft=function() {
+  return Ext.get(document).getScroll().left;
+};
+
+Rico.docScrollTop=function() {
+  return Ext.get(document).getScroll().top;
+};
+
+Rico.getDirectChildrenByTag=function(element, tagName) {
+  var kids = [];
+  var allKids = element.childNodes;
+  tagName=tagName.toLowerCase();
+  for( var i = 0 ; i < allKids.length ; i++ ) {
+    if ( allKids[i] && allKids[i].tagName && allKids[i].tagName.toLowerCase() == tagName )
+      kids.push(allKids[i]);
+  }
+  return kids;
+};
+
+Rico.ajaxRequest=function(url,options) {
+  var extOptions = {
+    success : options.onSuccess || options.onComplete,
+    failure : options.onFailure || options.onComplete,
+    method : options.method.toUpperCase(),
+    url : url,
+    form : options.form,
+    params : options.parameters
+  }
+  Ext.Ajax.request(extOptions);
+}
+
+Rico.getJSON=function(xhr) { return window["eval"]("(" + xhr.responseText + ")"); };
+
+Rico.ajaxSubmit=function(form,url,options) {
+  options.form=form;
+  if (!options.method) options.method='post';
+  Rico.ajaxRequest(url,options);
+}
+Rico.toQueryString=Ext.urlEncode;
+
+// Animation
+
+Rico.fadeIn=function(element,duration,onEnd) {
+  Ext.get(element).fadeIn({duration:duration/1000.0, callback: onEnd});
+};
+
+Rico.fadeOut=function(element,duration,onEnd) {
+  Ext.get(element).fadeOut({duration:duration/1000.0, callback: onEnd});
+};
+
+Rico.animate=function(element,options,properties) {
+  var opts={};
+  opts.callback=options.onEnd;
+  opts.duration=options.duration/1000.0;
+  opts.width=properties.width;
+  opts.height=properties.height;
+  opts.x=properties.left;
+  opts.y=properties.top;
+  opts.opacity=properties.opacity;
+  Ext.get(element).shift(opts);
+};
diff --git a/ricoClient/js/rico2glo.js b/ricoClient/js/rico2glo.js
new file mode 100644 (file)
index 0000000..e2578d4
--- /dev/null
@@ -0,0 +1,225 @@
+/**
+  *  Copyright (c) 2009 Matt Brown
+  *
+  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+  *  file except in compliance with the License. You may obtain a copy of the License at
+  *
+  *         http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software distributed under the
+  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+  *  either express or implied. See the License for the specific language governing permissions
+  *  and limitations under the License.
+  **/
+
+if (typeof glow=='undefined') throw('This version of Rico requires the glow library');
+
+
+Rico.Lib='Glow';
+Rico.LibVersion=glow.VERSION;
+Rico.extend=glow.lang.apply;
+Rico.trim=glow.lang.trim;
+Rico.tryFunctions = function() {
+  for (var i=0; i<arguments.length; i++) {
+    try {
+      return arguments[i]();
+    } catch(e){}
+  }
+  return null;
+};
+Rico._g=function(element) {
+  if (typeof element=='string')
+    element = document.getElementById(element);
+  return glow.dom.get(element);
+};
+
+Rico.select=function(selector, element) {
+  return element ? this._g(element).get(selector) : glow.dom.get(selector);
+};
+  
+Rico.eventBind=function(element, eventName, handler) {
+  handler.id=glow.events.addListener(Rico.$(element), eventName, handler.object[handler.method], handler.object);
+};
+
+Rico.eventUnbind=function(element, eventName, handler) {
+  glow.events.removeListener(handler.id);
+};
+
+Rico.eventHandle=function(object, method) {
+  return { object: object, method: method };
+};
+
+Rico.eventElement=function(ev) {
+  return ev.source;
+};
+
+Rico.eventClient=function(ev) {
+  return {x:ev.pageX - document.body.scrollLeft - document.documentElement.scrollLeft, 
+          y:ev.pageY - document.body.scrollTop - document.documentElement.scrollTop};
+};
+
+Rico.eventStop=function(ev) {
+  ev.preventDefault();
+  ev.stopPropagation();
+};
+
+Rico.eventKey=function(ev) {
+  return ev.keyCode;
+};
+
+Rico.eventLeftClick=function(ev) {
+  return ev.button==0;
+};
+  
+Rico.addClass=function(element, className) {
+  return this._g(element).addClass(className);
+};
+
+Rico.removeClass=function(element, className) {
+  return this._g(element).removeClass(className);
+};
+
+Rico.hasClass=function(element, className) {
+  return this._g(element).hasClass(className);
+};
+
+/*
+ran into bugs on FF and Safari with native Glow function
+Rico.getStyle=function(element, property) {
+  return this._g(element).css(property);
+};
+
+Use a modified version of Prototype's method
+*/
+Rico.getStyle=function(element, style) {
+  element = Rico.$(element);
+  var camelCase = style.replace(/\-(\w)/g, function(all, letter){
+    return letter.toUpperCase();
+  });
+  style = style == 'float' ? 'cssFloat' : camelCase;
+  var value = element.style[style];
+  if (!value || value == 'auto') {
+    if (element.currentStyle) {
+      value=element.currentStyle[style];
+    } else if (document.defaultView) {
+      var css = document.defaultView.getComputedStyle(element, null);
+      value = css ? css[style] : null;
+    }
+  }
+  if (style == 'opacity') return value ? parseFloat(value) : 1.0;
+  return value == 'auto' ? null : value;
+};
+
+
+Rico.setStyle=function(element, properties) {
+  var elem=this._g(element);
+  for (var prop in properties) {
+    elem.css(prop,properties[prop])
+  }
+};
+
+/**
+ * @returns available height, excluding scrollbar & margin
+ */
+Rico.windowHeight=function() {
+  return glow.dom.get(window).height();
+};
+
+/**
+ * @returns available width, excluding scrollbar & margin
+ */
+Rico.windowWidth=function() {
+  return glow.dom.get(window).width();
+};
+
+Rico.positionedOffset=function(element) {
+  var p, valueT = 0, valueL = 0;
+  do {
+    valueT += element.offsetTop  || 0;
+    valueL += element.offsetLeft || 0;
+    element = element.offsetParent;
+    if (element) {
+      p = glow.dom.get(element).css('position');
+      if (p == 'relative' || p == 'absolute') break;
+    }
+  } while (element);
+  return {left: valueL, top: valueT};
+};
+
+Rico.cumulativeOffset=function(element) {
+  return this._g(element).offset();
+};
+
+Rico._docElement=function() {
+  return (document.compatMode && document.compatMode.indexOf("CSS")!=-1) ? document.documentElement : document.getElementsByTagName("body")[0];
+},
+
+Rico.docScrollLeft=function() {
+  return Rico._docElement.scrollLeft || window.pageXOffset || 0;
+};
+
+Rico.docScrollTop=function() {
+  return Rico._docElement.scrollTop || window.pageYOffset || 0;
+};
+
+Rico.getDirectChildrenByTag=function(element, tagName) {
+  tagName=tagName.toLowerCase();
+  return this._g(element).children().filter(function(i) { return this.tagName && this.tagName.toLowerCase()==tagName; });
+};
+
+Rico.getJSON=function(xhr) { return glow.data.decodeJson(xhr.responseText); };
+
+Rico.ajaxRequest=function(url,options) {
+  this.glowSend(url,options);
+}
+
+Rico.ajaxRequest.prototype = {
+  glowSend : function(url,options) {
+    this.onComplete=options.onComplete;
+    this.onSuccess=options.onSuccess;
+    this.onFailure=options.onFailure;
+    options.onLoad=Rico.bind(this,'glowLoad');
+    options.onError=Rico.bind(this,'glowError');
+    options.useCache=true;
+    if (options.method.toLowerCase()=='post') {
+      glow.net.post(url,options.parameters,options);
+    } else {
+      glow.net.get(url+'?'+glow.data.encodeUrl(options.parameters),options);
+    }
+  },
+  
+  glowError : function(response) {
+    if (this.onFailure) this.onFailure(response);
+    if (this.onComplete) this.onComplete(response.nativeResponse);
+  },
+  
+  glowLoad : function(response) {
+    if (this.onSuccess) this.onSuccess(response.nativeResponse);
+    if (this.onComplete) this.onComplete(response.nativeResponse);
+  }
+}
+
+Rico.ajaxSubmit=function(form,url,options) {
+  options.parameters=glow.data.encodeUrl(this._g(form).val());
+  if (!options.method) options.method='post';
+  url=url || form.action;
+  new Rico.ajaxRequest(url,options);
+}
+Rico.toQueryString=glow.data.encodeUrl;
+
+// Animation
+
+Rico.fadeIn=function(element,duration,onEnd) {
+  glow.anim.fadeIn(this._g(element), duration/1000.0, {onComplete:onEnd});
+};
+
+Rico.fadeOut=function(element,duration,onEnd) {
+  glow.anim.fadeOut(this._g(element), duration/1000.0, {onComplete:onEnd});
+};
+
+Rico.animate=function(element,options,properties) {
+  var effect=glow.anim.css(this._g(element), options.duration/1000.0, properties);
+  glow.events.addListener(effect, "complete", options.onEnd);
+  effect.start();
+  return effect;
+};
diff --git a/ricoClient/js/rico2jQuery.js b/ricoClient/js/rico2jQuery.js
deleted file mode 100644 (file)
index bc35314..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
-  *  Copyright (c) 2009 Matt Brown
-  *
-  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
-  *  file except in compliance with the License. You may obtain a copy of the License at
-  *
-  *         http://www.apache.org/licenses/LICENSE-2.0
-  *
-  *  Unless required by applicable law or agreed to in writing, software distributed under the
-  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
-  *  either express or implied. See the License for the specific language governing permissions
-  *  and limitations under the License.
-  **/
-
-if (typeof jQuery=='undefined') throw('This version of Rico requires the jQuery library');
-
-
-Rico.Lib='jQuery';
-Rico.LibVersion=jQuery().jquery;
-Rico.extend=jQuery.extend;
-Rico.trim=jQuery.trim;
-Rico.tryFunctions = function() {
-  for (var i=0; i<arguments.length; i++) {
-               try {
-                       return arguments[i]();
-               } catch(e){}
-       }
-       return null;
-};
-
-
-Rico._j=function(element) {
-  if (typeof element=='string')
-    element = document.getElementById(element);
-  return jQuery(element);
-};
-  
-Rico.select=function(selector, element) {
-  return element ? this._j(element).find(selector) : jQuery(selector);
-};
-  
-Rico.eventBind=function(element, eventName, handler) {
-  this._j(element).bind(eventName, handler);
-};
-
-Rico.eventUnbind=function(element, eventName, handler) {
-  this._j(element).unbind(eventName, handler);
-};
-
-Rico.eventHandle=function(object, method) {
-  return function(e) {
-    return object[method].call(object,e);
-  }
-};
-
-Rico.eventElement=function(ev) {
-  return ev.target;
-};
-
-Rico.eventClient=function(ev) {
-  return {x:ev.clientX, y:ev.clientY};
-};
-
-Rico.eventStop=function(ev) {
-  ev.preventDefault();
-  ev.stopPropagation();
-};
-  
-Rico.addClass=function(element, className) {
-  return this._j(element).addClass(className);
-};
-
-Rico.removeClass=function(element, className) {
-  return this._j(element).removeClass(className);
-};
-
-Rico.hasClass=function(element, className) {
-  return this._j(element).hasClass(className);
-};
-  
-Rico.getStyle=function(element, property) {
-  return this._j(element).css(property);
-};
-Rico.setStyle=function(element, properties) {
-  return this._j(element).css(properties);
-};
-
-/**
- * @returns available height, excluding scrollbar & margin
- */
-Rico.windowHeight=function() {
-  return jQuery(window).height();
-};
-
-/**
- * @returns available width, excluding scrollbar & margin
- */
-Rico.windowWidth=function() {
-  return jQuery(window).width();
-};
-
-Rico.positionedOffset=function(element) {
-  return this._j(element).position();
-};
-
-Rico.cumulativeOffset=function(element) {
-  return this._j(element).offset();
-};
-
-Rico.docScrollLeft=function() {
-  return jQuery('html').scrollLeft();
-};
-
-Rico.docScrollTop=function() {
-  return jQuery('html').scrollTop();
-};
-
-Rico.getDirectChildrenByTag=function(element, tagName) {
-  return this._j(element).children(tagName);
-};
-
-Rico.ajaxRequest=function(url,options) {
-  this.jSend(url,options);
-}
-
-Rico.ajaxRequest.prototype = {
-  jSend: function(url,options) {
-    this.onSuccess=options.onSuccess;
-    var jOptions = {
-      complete : options.onComplete,
-      error: options.onFailure,
-      success: Rico.bind(this,'jSuccess'),
-      type : options.method.toUpperCase(),
-      url : url,
-      data : options.parameters
-    }
-    this.xhr=jQuery.ajax(jOptions);
-  },
-  
-  jSuccess: function() {
-    if (this.onSuccess) this.onSuccess(this.xhr);
-  }
-}
-
-Rico.getJSON=function(xhr) { return jQuery.httpData(xhr,'json'); };
-
-Rico.ajaxSubmit=function(form,url,options) {
-  options.parameters=this._j(form).serialize();
-  if (!options.method) options.method='post';
-  url=url || form.action;
-  new Rico.ajaxRequest(url,options);
-}
-Rico.toQueryString=jQuery.param;
-
-// Animation
-
-Rico.fadeIn=function(element,duration,onEnd) {
-  this._j(element).fadeIn(duration,onEnd);
-};
-
-Rico.fadeOut=function(element,duration,onEnd) {
-  this._j(element).fadeOut(duration,onEnd);
-};
-
-Rico.animate=function(element,options,properties) {
-  options.complete=options.onEnd;
-  this._j(element).animate(properties,options);
-};
diff --git a/ricoClient/js/rico2jqu.js b/ricoClient/js/rico2jqu.js
new file mode 100644 (file)
index 0000000..bc35314
--- /dev/null
@@ -0,0 +1,168 @@
+/**
+  *  Copyright (c) 2009 Matt Brown
+  *
+  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+  *  file except in compliance with the License. You may obtain a copy of the License at
+  *
+  *         http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software distributed under the
+  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+  *  either express or implied. See the License for the specific language governing permissions
+  *  and limitations under the License.
+  **/
+
+if (typeof jQuery=='undefined') throw('This version of Rico requires the jQuery library');
+
+
+Rico.Lib='jQuery';
+Rico.LibVersion=jQuery().jquery;
+Rico.extend=jQuery.extend;
+Rico.trim=jQuery.trim;
+Rico.tryFunctions = function() {
+  for (var i=0; i<arguments.length; i++) {
+               try {
+                       return arguments[i]();
+               } catch(e){}
+       }
+       return null;
+};
+
+
+Rico._j=function(element) {
+  if (typeof element=='string')
+    element = document.getElementById(element);
+  return jQuery(element);
+};
+  
+Rico.select=function(selector, element) {
+  return element ? this._j(element).find(selector) : jQuery(selector);
+};
+  
+Rico.eventBind=function(element, eventName, handler) {
+  this._j(element).bind(eventName, handler);
+};
+
+Rico.eventUnbind=function(element, eventName, handler) {
+  this._j(element).unbind(eventName, handler);
+};
+
+Rico.eventHandle=function(object, method) {
+  return function(e) {
+    return object[method].call(object,e);
+  }
+};
+
+Rico.eventElement=function(ev) {
+  return ev.target;
+};
+
+Rico.eventClient=function(ev) {
+  return {x:ev.clientX, y:ev.clientY};
+};
+
+Rico.eventStop=function(ev) {
+  ev.preventDefault();
+  ev.stopPropagation();
+};
+  
+Rico.addClass=function(element, className) {
+  return this._j(element).addClass(className);
+};
+
+Rico.removeClass=function(element, className) {
+  return this._j(element).removeClass(className);
+};
+
+Rico.hasClass=function(element, className) {
+  return this._j(element).hasClass(className);
+};
+  
+Rico.getStyle=function(element, property) {
+  return this._j(element).css(property);
+};
+Rico.setStyle=function(element, properties) {
+  return this._j(element).css(properties);
+};
+
+/**
+ * @returns available height, excluding scrollbar & margin
+ */
+Rico.windowHeight=function() {
+  return jQuery(window).height();
+};
+
+/**
+ * @returns available width, excluding scrollbar & margin
+ */
+Rico.windowWidth=function() {
+  return jQuery(window).width();
+};
+
+Rico.positionedOffset=function(element) {
+  return this._j(element).position();
+};
+
+Rico.cumulativeOffset=function(element) {
+  return this._j(element).offset();
+};
+
+Rico.docScrollLeft=function() {
+  return jQuery('html').scrollLeft();
+};
+
+Rico.docScrollTop=function() {
+  return jQuery('html').scrollTop();
+};
+
+Rico.getDirectChildrenByTag=function(element, tagName) {
+  return this._j(element).children(tagName);
+};
+
+Rico.ajaxRequest=function(url,options) {
+  this.jSend(url,options);
+}
+
+Rico.ajaxRequest.prototype = {
+  jSend: function(url,options) {
+    this.onSuccess=options.onSuccess;
+    var jOptions = {
+      complete : options.onComplete,
+      error: options.onFailure,
+      success: Rico.bind(this,'jSuccess'),
+      type : options.method.toUpperCase(),
+      url : url,
+      data : options.parameters
+    }
+    this.xhr=jQuery.ajax(jOptions);
+  },
+  
+  jSuccess: function() {
+    if (this.onSuccess) this.onSuccess(this.xhr);
+  }
+}
+
+Rico.getJSON=function(xhr) { return jQuery.httpData(xhr,'json'); };
+
+Rico.ajaxSubmit=function(form,url,options) {
+  options.parameters=this._j(form).serialize();
+  if (!options.method) options.method='post';
+  url=url || form.action;
+  new Rico.ajaxRequest(url,options);
+}
+Rico.toQueryString=jQuery.param;
+
+// Animation
+
+Rico.fadeIn=function(element,duration,onEnd) {
+  this._j(element).fadeIn(duration,onEnd);
+};
+
+Rico.fadeOut=function(element,duration,onEnd) {
+  this._j(element).fadeOut(duration,onEnd);
+};
+
+Rico.animate=function(element,options,properties) {
+  options.complete=options.onEnd;
+  this._j(element).animate(properties,options);
+};
diff --git a/ricoClient/js/rico2moo.js b/ricoClient/js/rico2moo.js
new file mode 100644 (file)
index 0000000..ebaeb6f
--- /dev/null
@@ -0,0 +1,184 @@
+/**
+  *  Copyright (c) 2009, 2010 Matt Brown
+  *
+  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+  *  file except in compliance with the License. You may obtain a copy of the License at
+  *
+  *         http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software distributed under the
+  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+  *  either express or implied. See the License for the specific language governing permissions
+  *  and limitations under the License.
+  **/
+
+if (typeof MooTools=='undefined') throw('This version of Rico requires the MooTools library');
+
+
+Rico.Lib='MooTools';
+Rico.LibVersion=MooTools.version;
+Rico.extend=typeof($extend) != 'undefined' ? $extend : Object.append;
+Rico.tryFunctions = typeof($try) != 'undefined' ? $try : Function.attempt;
+Rico.trim=function(s) { return s.trim(); };
+
+Rico.select=function(selector, element) {
+  return $(element || document).getElements(selector);
+};
+  
+Rico.eventBind=function(element, eventName, handler) {
+  $(element).addEvent(eventName, handler);
+};
+
+Rico.eventUnbind=function(element, eventName, handler) {
+  $(element).removeEvent(eventName, handler);
+};
+
+Rico.eventHandle=function(object, method) {
+  return function(e) { object[method].call(object,e); };
+};
+
+Rico.eventElement=function(ev) {
+  return ev.target;
+};
+
+Rico.eventClient=function(ev) {
+  return ev.client;
+};
+
+Rico.eventKey=function(ev) {
+  return ev.code;
+};
+
+Rico.eventStop=function(ev) {
+  ev.stop();
+};
+
+Rico.eventLeftClick=function(ev) {
+  return !ev.rightClick;
+};
+  
+Rico.addClass=function(element, className) {
+  return $(element).addClass(className);
+};
+
+Rico.removeClass=function(element, className) {
+  return $(element).removeClass(className);
+};
+
+Rico.hasClass=function(element, className) {
+  return $(element).hasClass(className);
+};
+  
+Rico.getStyle=function(element, property) {
+  return $(element).getStyle(property);
+};
+
+Rico.setStyle=function(element, properties) {
+  return $(element).setStyles(properties);
+};
+
+/**
+ * @returns available height, excluding scrollbar & margin
+ */
+Rico.windowHeight=function() {
+  return Window.getSize().y;
+};
+
+/**
+ * @returns available width, excluding scrollbar & margin
+ */
+Rico.windowWidth=function() {
+  return Window.getSize().x;
+};
+
+Rico._fixOffsets=function(o) {
+  return {top: o.y, left: o.x};
+}
+
+Rico.positionedOffset=function(element) {
+  var p, valueT = 0, valueL = 0;
+  do {
+    valueT += element.offsetTop  || 0;
+    valueL += element.offsetLeft || 0;
+    element = element.offsetParent;
+    if (element) {
+      p = $(element).getStyle('position');
+      if (p == 'relative' || p == 'absolute') break;
+    }
+  } while (element);
+  return {left: valueL, top: valueT};
+};
+
+Rico.cumulativeOffset=function(element) {
+  return this._fixOffsets($(element).getPosition());
+};
+
+Rico.docScrollLeft=function() {
+  return Window.getScroll().x;
+};
+
+Rico.docScrollTop=function() {
+  return Window.getScroll().y;
+};
+
+Rico.getDirectChildrenByTag=function(element, tagName) {
+  return $(element).getChildren(tagName);
+};
+
+Rico.ajaxRequest=function(url,options) {
+  this.mooSend(url,options);
+}
+
+Rico.ajaxRequest.prototype = {
+  mooSend : function(url,options) {
+    this.onSuccess=options.onSuccess;
+    this.onComplete=options.onComplete;
+    var mooOptions = {
+      onComplete : Rico.bind(this,'mooComplete'),
+      onSuccess : Rico.bind(this,'mooSuccess'),
+      onFailure : options.onFailure,
+      method : options.method,
+      data : options.parameters,
+      url : url
+    }
+    this.mooRequest = new Request(mooOptions);
+    this.mooRequest.send();
+  },
+  
+  mooSuccess : function() {
+    if (this.onSuccess) this.onSuccess(this.mooRequest.xhr);
+  },
+  
+  mooComplete : function() {
+    if (this.onComplete) this.onComplete(this.mooRequest.xhr);
+  }
+}
+
+Rico.getJSON=function(xhr) { return JSON.decode(xhr.responseText,true); };
+
+Rico.ajaxSubmit=function(form,url,options) {
+  options.parameters=$(form).toQueryString();
+  if (!options.method) options.method='post';
+  url=url || form.action;
+  new Rico.ajaxRequest(url,options);
+}
+Rico.toQueryString=typeof(Hash) != 'undefined' ? Hash.toQueryString : Object.toQueryString;
+
+// Animation
+
+Rico.fadeIn=function(element,duration,onEnd) {
+  var a = new Fx.Tween(element, {duration:duration, onComplete:onEnd});
+  a.start('opacity', 1);
+};
+
+Rico.fadeOut=function(element,duration,onEnd) {
+  var a = new Fx.Tween(element, {duration:duration, onComplete:onEnd});
+  a.start('opacity', 0);
+};
+
+Rico.animate=function(element,options,properties) {
+  options.onComplete=options.onEnd;
+  var effect=new Fx.Morph(element,options);
+  effect.start(properties);
+  return effect;
+};
diff --git a/ricoClient/js/rico2pro.js b/ricoClient/js/rico2pro.js
new file mode 100644 (file)
index 0000000..bf90dba
--- /dev/null
@@ -0,0 +1,146 @@
+/**
+  *  Copyright (c) 2009 Matt Brown
+  *
+  *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
+  *  file except in compliance with the License. You may obtain a copy of the License at
+  *
+  *         http://www.apache.org/licenses/LICENSE-2.0
+  *
+  *  Unless required by applicable law or agreed to in writing, software distributed under the
+  *  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+  *  either express or implied. See the License for the specific language governing permissions
+  *  and limitations under the License.
+  **/
+
+if (typeof Prototype=='undefined') throw('This version of Rico requires the Prototype library');
+
+Rico.Lib='Prototype';
+Rico.LibVersion=Prototype.Version;
+Rico.extend=Object.extend;
+Rico.tryFunctions=Try.these;
+Rico.trim=function(s) { return s.strip(); };
+
+Rico.toQueryString=Object.toQueryString;
+Rico.ajaxRequest=Ajax.Request;
+
+Rico.ajaxSubmit=function(form,url,options) {
+  options.parameters=Form.serialize(form);
+  if (!options.method) options.method='post';
+  url=url || form.action;
+  new Ajax.Request(url,options);
+}
+
+Rico.getJSON=function(xhr) { return xhr.responseJSON; };
+
+Rico.select=function(selector, element) {
+  return element ? $(element).select(selector) : $$(selector);
+};
+  
+Rico.eventBind=Event.observe;
+Rico.eventUnbind=Event.stopObserving;
+Rico.eventElement=Event.element;
+Rico.eventStop=Event.stop;
+Rico.eventClient=function(ev) {
+  return {x:ev.clientX, y:ev.clientY};
+};
+
+Rico.eventHandle=function(object, method) {
+  return object[method].bindAsEventListener(object);
+};
+
+Rico.addClass=Element.addClassName;
+Rico.removeClass=Element.removeClassName;
+Rico.hasClass=Element.hasClassName;
+
+Rico.getStyle=Element.getStyle;
+Rico.setStyle=Element.setStyle;
+Rico.windowHeight=function() {
+  return document.viewport.getHeight();
+};
+Rico.windowWidth=function() {
+  return document.viewport.getWidth();
+};
+Rico.positionedOffset=function(element) {
+  return $(element).positionedOffset();
+};
+Rico.cumulativeOffset=function(element) {
+  return $(element).cumulativeOffset();
+};
+
+Rico.docScrollLeft=function() {
+  return document.viewport.getScrollOffsets().left;
+};
+
+Rico.docScrollTop=function() {
+  return document.viewport.getScrollOffsets().top;
+};
+
+Rico.getDirectChildrenByTag=function(element, tagName) {
+  tagName=tagName.toLowerCase();
+  return $(element).childElements().inject([],function(result,child) {
+    if (child.tagName && child.tagName.toLowerCase()==tagName) result.push(child);
+    return result;});
+};
+
+
+// Animation
+
+Rico._animate=Class.create({
+  initialize: function(element,options,properties) {
+    this.element=$(element);
+    this.properties=[];
+    this.totSteps=(typeof options.duration =='number' ? options.duration : 500)/25;
+    this.options=options;
+    this.curStep=0;
+    var m,curval;
+    for (var p in properties) {
+      curval=this.element.getStyle(p);
+      switch (typeof curval) {
+        case 'string':
+          if (m=curval.match(/(-?\d+\.?\d*)([a-zA-Z]*)$/)) {
+            this.properties.push({property:p, vStart:parseFloat(m[1]), vEnd:parseFloat(properties[p]), units:m.length > 2 ? m[2] : ''});
+          }
+          break;
+        case 'number':
+          this.properties.push({property:p, vStart:curval, vEnd:parseFloat(properties[p]), units:''});
+          break;
+      }
+    }
+    this.px=new PeriodicalExecuter(this.processStep.bind(this),0.025);
+  },
+  
+  processStep: function() {
+    this.curStep++;
+    if (this.curStep >= this.totSteps) {
+      this.px.stop();
+      for (var i=0; i<this.properties.length; i++) {
+        this.setStyle(i,this.properties[i].vEnd);
+      }
+      if (this.options.onEnd) this.options.onEnd();
+    } else {
+      for (var i=0; i<this.properties.length; i++) {
+        var n=this.properties[i].vStart + (this.curStep / this.totSteps) * (this.properties[i].vEnd - this.properties[i].vStart);
+        this.setStyle(i,n);
+      }
+    }
+  },
+  
+  setStyle: function(idx, newVal) {
+    if (this.properties[idx].units) newVal+=this.properties[idx].units;
+    var styleParm={};
+    styleParm[this.properties[idx].property]=newVal;
+    this.element.setStyle(styleParm);
+  }
+});
+
+Rico.animate=function(element,options,properties) {
+  var a=new Rico._animate(element,options,properties);
+};
+
+Rico.fadeIn=function(element,duration,onEnd) {
+  new Rico._animate(element, {duration:duration, onEnd:onEnd}, {opacity:1.0})
+};
+
+Rico.fadeOut=function(element,duration,onEnd) {
+  new Rico._animate(element, {duration:duration, onEnd:onEnd}, {opacity:0.0})
+};
index 5169c64..b665b47 100644 (file)
@@ -34,6 +34,7 @@ Rico.GridCommon = {
       defaultWidth     : -1,          // if -1, then use unformatted column width
       scrollBarWidth   : 19,          // this is the value used in positioning calculations, it does not actually change the width of the scrollbar
       minScrollWidth   : 100,         // min scroll area width when width of frozen columns exceeds window width
       defaultWidth     : -1,          // if -1, then use unformatted column width
       scrollBarWidth   : 19,          // this is the value used in positioning calculations, it does not actually change the width of the scrollbar
       minScrollWidth   : 100,         // min scroll area width when width of frozen columns exceeds window width
+      frozenColumns    : 0,
       exportWindow     : "height=400,width=500,scrollbars=1,menubar=1,resizable=1",
       exportStyleList  : ['background-color','color','text-align','font-weight','font-size','font-family'],
       exportImgTags    : false,       // applies to grid header and to SimpleGrid cells (not LiveGrid cells)
       exportWindow     : "height=400,width=500,scrollbars=1,menubar=1,resizable=1",
       exportStyleList  : ['background-color','color','text-align','font-weight','font-size','font-family'],
       exportImgTags    : false,       // applies to grid header and to SimpleGrid cells (not LiveGrid cells)
@@ -187,7 +188,7 @@ Rico.GridCommon = {
     this.align=this.direction=='rtl' ? ['right','left'] : ['left','right'];
     Rico.log('createColumnArray: dir='+this.direction);
     this.columns = [];
     this.align=this.direction=='rtl' ? ['right','left'] : ['left','right'];
     Rico.log('createColumnArray: dir='+this.direction);
     this.columns = [];
-    for (var c=0 ; c < this.headerColCnt; c++) {
+    for (var c=0; c < this.headerColCnt; c++) {
       Rico.log("createColumnArray: c="+c);
       var tabidx=c<this.options.frozenColumns ? 0 : 1;
       var col=new Rico[columnType](this, c, this.hdrCells[this.headerRowIdx][c], tabidx);
       Rico.log("createColumnArray: c="+c);
       var tabidx=c<this.options.frozenColumns ? 0 : 1;
       var col=new Rico[columnType](this, c, this.hdrCells[this.headerRowIdx][c], tabidx);
@@ -195,6 +196,17 @@ Rico.GridCommon = {
       if (c > 0) this.columns[c-1].next=col;
     }
     this.getCookie();
       if (c > 0) this.columns[c-1].next=col;
     }
     this.getCookie();
+    Rico.runLater(100,this,'insertResizers');  // avoids peek-a-boo bug in column 1 in IE6/7
+  },
+
+/**
+ * Insert resizing handles
+ */
+  insertResizers: function() {
+    if (!this.options.allowColResize) return;
+    for (var x=0;x<this.columns.length;x++) {
+      this.columns[x].insertResizer();
+    }
   },
 
 /**
   },
 
 /**
@@ -204,10 +216,31 @@ Rico.GridCommon = {
     Rico.log("createDivs start");
     this.outerDiv   = this.createDiv("outer");
     if (Rico.theme.widget) Rico.addClass(this.outerDiv,Rico.theme.widget);
     Rico.log("createDivs start");
     this.outerDiv   = this.createDiv("outer");
     if (Rico.theme.widget) Rico.addClass(this.outerDiv,Rico.theme.widget);
+    if (this.outerDiv.firstChild && this.outerDiv.firstChild.tagName && this.outerDiv.firstChild.tagName.toUpperCase()=='TABLE') {
+      this.structTab=this.outerDiv.firstChild;
+      this.structTabLeft=this.structTab.rows[0].cells[0];
+      this.structTabUR=this.structTab.rows[0].cells[1];
+      this.structTabLR=this.structTab.rows[1].cells[0];
+    } else {
+      this.structTab = document.createElement("table");
+      this.structTab.border=0;
+      this.structTab.cellPadding=0;
+      this.structTab.cellSpacing=0;
+      var tr1=this.structTab.insertRow(-1);
+      tr1.vAlign='top';
+      this.structTabLeft=tr1.insertCell(-1);
+      this.structTabLeft.rowSpan=2;
+      var tr2=this.structTab.insertRow(-1);
+      tr2.vAlign='top';
+      this.structTabUR=tr1.insertCell(-1);
+      this.structTabLR=tr2.insertCell(-1);
+      this.outerDiv.appendChild(this.structTab);
+    }
+    //this.structTabLR.style.overflow='hidden';
     //if (Rico.isOpera) this.outerDiv.style.overflow="hidden";
     //if (Rico.isOpera) this.outerDiv.style.overflow="hidden";
-    this.scrollDiv  = this.createDiv("scroll",this.outerDiv);
-    this.frozenTabs = this.createDiv("frozenTabs",this.outerDiv);
-    this.innerDiv   = this.createDiv("inner",this.outerDiv);
+    this.frozenTabs = this.createDiv("frozenTabs",this.structTabLeft);
+    this.innerDiv   = this.createDiv("inner",this.structTabUR);
+    this.scrollDiv  = this.createDiv("scroll",this.structTabLR);
     this.resizeDiv  = this.createDiv("resize",this.outerDiv,true);
     this.exportDiv  = this.createDiv("export",this.outerDiv,true);
 
     this.resizeDiv  = this.createDiv("resize",this.outerDiv,true);
     this.exportDiv  = this.createDiv("export",this.outerDiv,true);
 
@@ -305,6 +338,7 @@ Rico.GridCommon = {
       if (this.columns[i].visible) this.frzWi+=parseInt(this.columns[i].colWidth,10)+borderWi;
     }
     this.scrTabWi=this.borderWidth(this.tabs[1]);
       if (this.columns[i].visible) this.frzWi+=parseInt(this.columns[i].colWidth,10)+borderWi;
     }
     this.scrTabWi=this.borderWidth(this.tabs[1]);
+    this.scrTabWi0=this.scrTabWi;
     Rico.log('scrTabWi: '+this.scrTabWi);
     for (i=this.options.frozenColumns; i<this.columns.length; i++) {
       if (this.columns[i].visible) this.scrTabWi+=parseInt(this.columns[i].colWidth,10)+borderWi;
     Rico.log('scrTabWi: '+this.scrTabWi);
     for (i=this.options.frozenColumns; i<this.columns.length; i++) {
       if (this.columns[i].visible) this.scrTabWi+=parseInt(this.columns[i].colWidth,10)+borderWi;
@@ -324,8 +358,9 @@ Rico.GridCommon = {
     if (overage > 0 && this.options.frozenColumns < this.columns.length)
       this.scrWi=Math.max(this.scrWi-overage, this.options.minScrollWidth);
     this.scrollDiv.style.width=this.scrWi+'px';
     if (overage > 0 && this.options.frozenColumns < this.columns.length)
       this.scrWi=Math.max(this.scrWi-overage, this.options.minScrollWidth);
     this.scrollDiv.style.width=this.scrWi+'px';
-    this.scrollDiv.style.top=this.hdrHt+'px';
-    this.frozenTabs.style.width=this.scrollDiv.style[this.align[0]]=this.innerDiv.style[this.align[0]]=this.frzWi+'px';
+    //this.scrollDiv.style.top=this.hdrHt+'px';
+    //this.frozenTabs.style.width=this.scrollDiv.style[this.align[0]]=this.innerDiv.style[this.align[0]]=this.frzWi+'px';
+    this.frozenTabs.style.width=this.frzWi+'px';
     this.outerDiv.style.width=(this.frzWi+this.scrWi)+'px';
   },
 
     this.outerDiv.style.width=(this.frzWi+this.scrWi)+'px';
   },
 
@@ -425,7 +460,7 @@ Rico.GridCommon = {
 
   setHorizontalScroll: function() {
     var newLeft=(-this.scrollDiv.scrollLeft)+'px';
 
   setHorizontalScroll: function() {
     var newLeft=(-this.scrollDiv.scrollLeft)+'px';
-    this.hdrTabs[1].style.left=newLeft;
+    this.hdrTabs[1].style.marginLeft=newLeft;
   },
 
   pluginScroll: function() {
   },
 
   pluginScroll: function() {
@@ -698,7 +733,7 @@ Rico.TableColumnBase.prototype = {
     this.options   = liveGrid.options;
     this.tabIdx    = tabIdx;
     this.hdrCell   = hdrInfo.cell;
     this.options   = liveGrid.options;
     this.tabIdx    = tabIdx;
     this.hdrCell   = hdrInfo.cell;
-    this.body = document.getElementsByTagName("body")[0];  // work around FireFox bug (document.body doesn't exist after XSLT)
+    this.body = document.getElementsByTagName("body")[0];
     this.displayName  = this.getDisplayName(this.hdrCell);
     var divs=this.hdrCell.getElementsByTagName('div');
     this.hdrColDiv=(divs.length<1) ? Rico.wrapChildren(this.hdrCell,'ricoLG_col') : divs[0];
     this.displayName  = this.getDisplayName(this.hdrCell);
     var divs=this.hdrCell.getElementsByTagName('div');
     this.hdrColDiv=(divs.length<1) ? Rico.wrapChildren(this.hdrCell,'ricoLG_col') : divs[0];
@@ -740,7 +775,6 @@ Rico.TableColumnBase.prototype = {
     wi=(typeof(wi)=='number') ? Math.max(wi,Rico.ColumnConst.MINWIDTH) : liveGrid.options.defaultWidth;
     this.setColWidth(wi);
     if (!this.visible) this.setDisplay('none');
     wi=(typeof(wi)=='number') ? Math.max(wi,Rico.ColumnConst.MINWIDTH) : liveGrid.options.defaultWidth;
     this.setColWidth(wi);
     if (!this.visible) this.setDisplay('none');
-    if (this.options.allowColResize && !this.format.noResize) this.insertResizer();
   },
   
   colClassName: function() {
   },
   
   colClassName: function() {
@@ -748,16 +782,18 @@ Rico.TableColumnBase.prototype = {
   },
 
   insertResizer: function() {
   },
 
   insertResizer: function() {
-    this.hdrCell.style.width='';
-    var resizer=this.hdrCellDiv.appendChild(document.createElement('div'));
+    //this.hdrCell.style.width='';
+    if (this.format.noResize) return;
+    var resizer=document.createElement('div');
     resizer.className='ricoLG_Resize';
     resizer.style[this.liveGrid.align[1]]='0px';
     if (this.options.resizeBackground) {
     resizer.className='ricoLG_Resize';
     resizer.style[this.liveGrid.align[1]]='0px';
     if (this.options.resizeBackground) {
-      var resizePath=Rico.imgDir+this.options.resizeBackground;
+      var resizePath=Rico.imgDir+this.liveGrid.options.resizeBackground;
       if (Rico.isIE && Rico.ieVersion < 8)
         resizePath=location.protocol+resizePath; // IE6+7 only
       resizer.style.backgroundImage='url('+resizePath+')';
     }
       if (Rico.isIE && Rico.ieVersion < 8)
         resizePath=location.protocol+resizePath; // IE6+7 only
       resizer.style.backgroundImage='url('+resizePath+')';
     }
+    this.hdrCellDiv.appendChild(resizer);
     Rico.eventBind(resizer,"mousedown", this.mouseDownHandler, false);
   },
 
     Rico.eventBind(resizer,"mousedown", this.mouseDownHandler, false);
   },
 
@@ -852,7 +888,7 @@ Rico.TableColumnBase.prototype = {
       }
     } else {
       this.edge=p.left+this.hdrCell.offsetWidth;
       }
     } else {
       this.edge=p.left+this.hdrCell.offsetWidth;
-      if (this.tabIdx>0) this.edge+=Rico.nan2zero(this.liveGrid.tabs[0].offsetWidth)-this.liveGrid.scrollDiv.scrollLeft;
+      if (this.tabIdx>0) this.edge+=Rico.nan2zero(this.liveGrid.tabs[0].offsetWidth);
     }
     this.liveGrid.resizeDiv.style.left=this.edge+"px";
     this.liveGrid.resizeDiv.style.display="";
     }
     this.liveGrid.resizeDiv.style.left=this.edge+"px";
     this.liveGrid.resizeDiv.style.display="";
index 0c69e68..5695253 100644 (file)
@@ -478,7 +478,7 @@ Rico.LiveGrid.prototype = {
     Rico.setDebugArea(tableId+"_debugmsgs");    // if used, this should be a textarea
 
     Rico.extend(this.options, {
     Rico.setDebugArea(tableId+"_debugmsgs");    // if used, this should be a textarea
 
     Rico.extend(this.options, {
-      visibleRows      : -1,    // -1 or 'window'=size grid to client window; -2 or 'data'=size grid to min(window,data); -3 or 'body'=size so body does not have a scrollbar; -4 or 'parent'=size to parent element (e.g. if grid is inside a div)
+      visibleRows      : -3,    // -1 or 'window'=size grid to client window; -2 or 'data'=size grid to min(window,data); -3 or 'body'=size so body does not have a scrollbar; -4 or 'parent'=size to parent element (e.g. if grid is inside a div)
       frozenColumns    : 0,
       offset           : 0,     // first row to be displayed
       prefetchBuffer   : true,  // load table on page load?
       frozenColumns    : 0,
       offset           : 0,     // first row to be displayed
       prefetchBuffer   : true,  // load table on page load?
@@ -536,8 +536,8 @@ Rico.LiveGrid.prototype = {
         }
         break;
       default:
         }
         break;
       default:
-        this.sizeTo='window';
-        this.options.visibleRows=-1;
+        this.sizeTo='body';
+        this.options.visibleRows=-3;
         break;
     }
     this.highlightEnabled=this.options.highlightSection>0;
         break;
     }
     this.highlightEnabled=this.options.highlightSection>0;
@@ -685,7 +685,9 @@ Rico.LiveGridMethods = {
     }
 
     this.createDivs();
     }
 
     this.createDivs();
-    this.scrollTabs = this.createDiv("scrollTabs",this.innerDiv);
+    this.scrollContainer = this.createDiv("scrollContainer",this.structTabLR);
+    this.scrollContainer.appendChild(this.scrollDiv); // move scrollDiv
+    this.scrollTab = this.createDiv("scrollTab",this.scrollContainer);
     this.shadowDiv  = this.createDiv("shadow",this.scrollDiv);
     this.shadowDiv.style.direction='ltr';  // avoid FF bug
     this.scrollDiv.style.display="none";
     this.shadowDiv  = this.createDiv("shadow",this.scrollDiv);
     this.shadowDiv.style.direction='ltr';  // avoid FF bug
     this.scrollDiv.style.display="none";
@@ -701,14 +703,14 @@ Rico.LiveGridMethods = {
         case 'menuCell':
         case 'cursorCell':
           for (i=0; i<2; i++) {
         case 'menuCell':
         case 'cursorCell':
           for (i=0; i<2; i++) {
-            this.highlightDiv[i] = this.createDiv("highlight",i==0 ? this.frozenTabs : this.scrollTabs);
+            this.highlightDiv[i] = this.createDiv("highlight",i==0 ? this.frozenTabs : this.scrollTab);
             this.highlightDiv[i].style.display="none";
             this.highlightDiv[i].id+=i;
           }
           break;
         case 'selection':
           // create one div for each side of the rectangle
             this.highlightDiv[i].style.display="none";
             this.highlightDiv[i].id+=i;
           }
           break;
         case 'selection':
           // create one div for each side of the rectangle
-          var parentDiv=this.options.highlightSection==1 ? this.frozenTabs : this.scrollTabs;
+          var parentDiv=this.options.highlightSection==1 ? this.frozenTabs : this.scrollTab;
           for (i=0; i<4; i++) {
             this.highlightDiv[i] = this.createDiv("highlight",parentDiv);
             this.highlightDiv[i].style.display="none";
           for (i=0; i<4; i++) {
             this.highlightDiv[i] = this.createDiv("highlight",parentDiv);
             this.highlightDiv[i].style.display="none";
@@ -721,23 +723,31 @@ Rico.LiveGridMethods = {
     }
 
     // create new tables
     }
 
     // create new tables
-    for (i=0; i<2; i++) {
+    for (i=0; i<3; i++) {
       this.tabs[i] = document.createElement("table");
       this.tabs[i].className = 'ricoLG_table';
       this.tabs[i].border=0;
       this.tabs[i].cellPadding=0;
       this.tabs[i].cellSpacing=0;
       this.tabs[i].id = this.tableId+"_tab"+i;
       this.tabs[i] = document.createElement("table");
       this.tabs[i].className = 'ricoLG_table';
       this.tabs[i].border=0;
       this.tabs[i].cellPadding=0;
       this.tabs[i].cellSpacing=0;
       this.tabs[i].id = this.tableId+"_tab"+i;
+    }
+    // set headings
+    for (i=0; i<2; i++) {
       this.thead[i]=this.tabs[i].createTHead();
       this.thead[i]=this.tabs[i].createTHead();
-      this.thead[i].className='ricoLG_top';
+      Rico.addClass(this.tabs[i],'ricoLG_top');
+      //this.thead[i].className='ricoLG_top';
       if (Rico.theme.gridheader) Rico.addClass(this.thead[i],Rico.theme.gridheader);
       if (Rico.theme.gridheader) Rico.addClass(this.thead[i],Rico.theme.gridheader);
-      this.tbody[i]=Rico.getTBody(this.tabs[i]);
+    }
+    // set bodies
+    for (i=0; i<2; i++) {
+      this.tbody[i]=Rico.getTBody(this.tabs[i==0?0:2]);
       this.tbody[i].className='ricoLG_bottom';
       if (Rico.theme.gridcontent) Rico.addClass(this.tbody[i],Rico.theme.gridcontent);
       this.tbody[i].insertRow(-1);
     }
     this.frozenTabs.appendChild(this.tabs[0]);
       this.tbody[i].className='ricoLG_bottom';
       if (Rico.theme.gridcontent) Rico.addClass(this.tbody[i],Rico.theme.gridcontent);
       this.tbody[i].insertRow(-1);
     }
     this.frozenTabs.appendChild(this.tabs[0]);
-    this.scrollTabs.appendChild(this.tabs[1]);
+    this.innerDiv.appendChild(this.tabs[1]);
+    this.scrollTab.appendChild(this.tabs[2]);
     if (insertloc) insertloc.parentNode.insertBefore(this.outerDiv,insertloc);
     if (hdrSrc) {
       this.headerColCnt = this.getColumnInfo(hdrSrc);
     if (insertloc) insertloc.parentNode.insertBefore(this.outerDiv,insertloc);
     if (hdrSrc) {
       this.headerColCnt = this.getColumnInfo(hdrSrc);
@@ -1015,11 +1025,19 @@ Rico.LiveGridMethods = {
     var totRowHt=this.columns[firstVisible].dataColDiv.offsetHeight;
     this.rowHeight = Math.round(totRowHt/this.pageSize);
     var scrHt=this.dataHt;
     var totRowHt=this.columns[firstVisible].dataColDiv.offsetHeight;
     this.rowHeight = Math.round(totRowHt/this.pageSize);
     var scrHt=this.dataHt;
-    if (this.scrWi>0 || Rico.isIE || Rico.isWebKit)
+    if (this.scrTabWi0 == this.scrTabWi) {
+      // no scrolling columns - horizontal scroll bar not needed
+      this.innerDiv.style.height=(this.hdrHt+1)+'px';
+      this.scrollDiv.style.overflowX='hidden';
+    } else {
+      this.scrollDiv.style.overflowX='scroll';
       scrHt+=this.options.scrollBarWidth;
       scrHt+=this.options.scrollBarWidth;
+    }
     this.scrollDiv.style.height=scrHt+'px';
     this.scrollDiv.style.height=scrHt+'px';
-    this.innerDiv.style.width=(this.scrWi-this.options.scrollBarWidth+1)+'px';
-    this.resizeDiv.style.height=this.frozenTabs.style.height=this.innerDiv.style.height=(this.hdrHt+this.dataHt+1)+'px';
+    this.innerDiv.style.width=(this.scrWi)+'px';
+    this.scrollTab.style.width=(this.scrWi-this.options.scrollBarWidth)+'px';
+    //this.resizeDiv.style.height=this.frozenTabs.style.height=this.innerDiv.style.height=(this.hdrHt+this.dataHt+1)+'px';
+    this.resizeDiv.style.height=(this.hdrHt+this.dataHt+1)+'px';
     Rico.log('sizeDivs scrHt='+scrHt+' innerHt='+this.innerDiv.style.height+' rowHt='+this.rowHeight+' pageSize='+this.pageSize);
     var pad=(this.scrWi-this.scrTabWi < this.options.scrollBarWidth) ? 2 : 0;
     this.shadowDiv.style.width=(this.scrTabWi+pad)+'px';
     Rico.log('sizeDivs scrHt='+scrHt+' innerHt='+this.innerDiv.style.height+' rowHt='+this.rowHeight+' pageSize='+this.pageSize);
     var pad=(this.scrWi-this.scrTabWi < this.options.scrollBarWidth) ? 2 : 0;
     this.shadowDiv.style.width=(this.scrTabWi+pad)+'px';
@@ -1028,8 +1046,9 @@ Rico.LiveGridMethods = {
   },
 
   setHorizontalScroll: function() {
   },
 
   setHorizontalScroll: function() {
-    var scrleft=this.scrollDiv.scrollLeft;
-    this.scrollTabs.style.left=(-scrleft)+'px';
+    var newLeft=(-this.scrollDiv.scrollLeft)+'px';
+    this.tabs[1].style.marginLeft=newLeft;
+    this.tabs[2].style.marginLeft=newLeft;
   },
 
   remainingHt: function() {
   },
 
   remainingHt: function() {
@@ -1040,7 +1059,6 @@ Rico.LiveGridMethods = {
     if (!Rico.isIE && window.frameElement && window.frameElement.scrolling=='yes' && this.sizeTo!='parent') margin+=this.options.scrollBarWidth;
     switch (this.sizeTo) {
       case 'window':
     if (!Rico.isIE && window.frameElement && window.frameElement.scrolling=='yes' && this.sizeTo!='parent') margin+=this.options.scrollBarWidth;
     switch (this.sizeTo) {
       case 'window':
-      case 'data':
         var divTop=Rico.cumulativeOffset(this.outerDiv).top;
         tabHt=Math.max(this.tabs[0].offsetHeight,this.tabs[1].offsetHeight);
         Rico.log("remainingHt, winHt="+winHt+' tabHt='+tabHt+' gridY='+divTop);
         var divTop=Rico.cumulativeOffset(this.outerDiv).top;
         tabHt=Math.max(this.tabs[0].offsetHeight,this.tabs[1].offsetHeight);
         Rico.log("remainingHt, winHt="+winHt+' tabHt='+tabHt+' gridY='+divTop);
@@ -1053,12 +1071,10 @@ Rico.LiveGridMethods = {
         if (Rico.isIE) Rico.show(this.outerDiv);
         Rico.log("remainingHt, parentHt="+parentHt+' gridY='+offset+' winHt='+winHt+' tabHt='+tabHt);
         return parentHt - tabHt - offset - this.options.scrollBarWidth;
         if (Rico.isIE) Rico.show(this.outerDiv);
         Rico.log("remainingHt, parentHt="+parentHt+' gridY='+offset+' winHt='+winHt+' tabHt='+tabHt);
         return parentHt - tabHt - offset - this.options.scrollBarWidth;
+      case 'data':
       case 'body':
       case 'body':
-        //Rico.log("remainingHt, document.height="+document.height);
-        //Rico.log("remainingHt, body.offsetHeight="+document.body.offsetHeight);
-        //Rico.log("remainingHt, body.scrollHeight="+document.body.scrollHeight);
-        //Rico.log("remainingHt, documentElement.scrollHeight="+document.documentElement.scrollHeight);
         var bodyHt=Rico.isIE ? document.body.scrollHeight : document.body.offsetHeight;
         var bodyHt=Rico.isIE ? document.body.scrollHeight : document.body.offsetHeight;
+        //alert("remainingHt\n document.height="+document.height+"\n body.offsetHeight="+document.body.offsetHeight+"\n body.scrollHeight="+document.body.scrollHeight+"\n documentElement.scrollHeight="+document.documentElement.scrollHeight);
         var remHt=winHt-bodyHt-margin;
         if (!Rico.isWebKit) remHt-=this.options.scrollBarWidth;
         Rico.log("remainingHt, winHt="+winHt+' pageHt='+bodyHt+' remHt='+remHt);
         var remHt=winHt-bodyHt-margin;
         if (!Rico.isWebKit) remHt-=this.options.scrollBarWidth;
         Rico.log("remainingHt, winHt="+winHt+' pageHt='+bodyHt+' remHt='+remHt);
@@ -2386,6 +2402,10 @@ _export: function(v) {
   return this._format(v);
 },
 
   return this._format(v);
 },
 
+exportBuffer: function(bufRow) {
+  return this._export(this.buffer.getValue(bufRow,this.index));
+},
+
 displayValue: function(windowRow) {
   var bufval=this.getValue(windowRow);
   if (bufval==null) {
 displayValue: function(windowRow) {
   var bufval=this.getValue(windowRow);
   if (bufval==null) {
index 79af917..25f8f94 100644 (file)
@@ -286,7 +286,7 @@ Rico.Buffer.AjaxXMLMethods = {
         newpos=Math.min(this.liveGrid.topOfLastPage(),offset);
         Rico.log("updateGrid: new rowcnt="+eofrow+" newpos="+newpos);
         if (lastTotalRows==0 && this.liveGrid.sizeTo=='data')
         newpos=Math.min(this.liveGrid.topOfLastPage(),offset);
         Rico.log("updateGrid: new rowcnt="+eofrow+" newpos="+newpos);
         if (lastTotalRows==0 && this.liveGrid.sizeTo=='data')
-          this.liveGrid.adjustPageSize();
+          Rico.runLater(100,this.liveGrid,'adjustPageSize');  // FF takes a long time to calc initial size
         this.liveGrid.scrollToRow(newpos);
         if ( this.isInRange(newpos) ) {
           this.liveGrid.refreshContents(newpos);
         this.liveGrid.scrollToRow(newpos);
         if ( this.isInRange(newpos) ) {
           this.liveGrid.refreshContents(newpos);
index 2f90dea..6299a48 100644 (file)
@@ -227,6 +227,18 @@ Rico.TableColumn.HighlightCell.prototype = {
         case '<=':
           match=(gridval<=this._chkval);
           break;
         case '<=':
           match=(gridval<=this._chkval);
           break;
+        case 'abs>':
+          match=(Math.abs(gridval)>this._chkval);
+          break;
+        case 'abs<':
+          match=(Math.abs(gridval)<this._chkval);
+          break;
+        case 'abs>=':
+          match=(Math.abs(gridval)>=this._chkval);
+          break;
+        case 'abs<=':
+          match=(Math.abs(gridval)<=this._chkval);
+          break;
         default:
           match=(gridval==this._chkval);
           break;
         default:
           match=(gridval==this._chkval);
           break;
@@ -289,7 +301,7 @@ Rico.TableColumn.link.prototype = {
     var href=this._href=='self' ? v : this._href.replace(/\{\d+\}/g,
       function ($1) {
         var colIdx=parseInt($1.substr(1),10);
     var href=this._href=='self' ? v : this._href.replace(/\{\d+\}/g,
       function ($1) {
         var colIdx=parseInt($1.substr(1),10);
-        return getWindowValue(windowRow,colIdx);
+        return encodeURIComponent(getWindowValue(windowRow,colIdx));
       }
     );
     var desc=this._linktext || v;
       }
     );
     var desc=this._linktext || v;
index fce844d..c675913 100644 (file)
@@ -35,7 +35,6 @@ Rico.TableEdit.prototype = {
       compact          : false,    // compact corners
       RecordName       : Rico.getPhraseById("record"),
       updateURL        : window.location.href, // default is that updates post back to the generating page
       compact          : false,    // compact corners
       RecordName       : Rico.getPhraseById("record"),
       updateURL        : window.location.href, // default is that updates post back to the generating page
-      readOnlyColor    : '#AAA',   // read-only fields displayed using this color
       showSaveMsg      : 'errors'  // disposition of database update responses (full - show full response, errors - show full response for errors and short response otherwise)
     };
     Rico.extend(this.options, liveGrid.options);
       showSaveMsg      : 'errors'  // disposition of database update responses (full - show full response, errors - show full response for errors and short response otherwise)
     };
     Rico.extend(this.options, liveGrid.options);
@@ -616,33 +615,34 @@ Rico.TableEdit.prototype = {
     }
   },
 
     }
   },
 
-  setReadOnly: function(addFlag) {
-    for (var i=0; i<this.grid.columns.length; i++) {
+  setReadOnly: function(action) {
+    for (var ro,i=0; i<this.grid.columns.length; i++) {
       var fldSpec=this.grid.columns[i].format;
       if (!fldSpec) continue;
       var e=Rico.$(fldSpec.FieldName);
       if (!e) continue;
       var fldSpec=this.grid.columns[i].format;
       if (!fldSpec) continue;
       var e=Rico.$(fldSpec.FieldName);
       if (!e) continue;
-      var ro=!fldSpec.Writeable || fldSpec.ReadOnly || (fldSpec.InsertOnly && !addFlag) || (fldSpec.UpdateOnly && addFlag);
-      var color=ro ? this.options.readOnlyColor : '';
+      switch (action) {
+        case 'ins': ro=!fldSpec.Writeable || fldSpec.ReadOnly || fldSpec.UpdateOnly; break;
+        case 'upd': ro=!fldSpec.Writeable || fldSpec.ReadOnly || fldSpec.InsertOnly; break;
+        default:    ro=false; break;
+      }
       switch (e.tagName.toUpperCase()) {
         case 'DIV':
       switch (e.tagName.toUpperCase()) {
         case 'DIV':
-          e.style.color=color;
           var elems=e.getElementsByTagName('INPUT');
           for (var j=0; j<elems.length; j++) {
           var elems=e.getElementsByTagName('INPUT');
           for (var j=0; j<elems.length; j++) {
-            elems[j].readOnly=ro;
+            elems[j].disabled=ro;
           }
           break;
         case 'SELECT':
           if (fldSpec.EntryType=='N') {
             var txt=Rico.$('textnew__'+e.id);
           }
           break;
         case 'SELECT':
           if (fldSpec.EntryType=='N') {
             var txt=Rico.$('textnew__'+e.id);
-            txt.readOnly=ro;
+            txt.disabled=ro;
           }
           }
-          e.readOnly=ro;
+          e.disabled=ro;
           break;
         case 'TEXTAREA':
         case 'INPUT':
           break;
         case 'TEXTAREA':
         case 'INPUT':
-          e.readOnly=ro;
-          e.style.color=color;
+          e.disabled=ro;
           if (fldSpec.selectIcon) fldSpec.selectIcon.style.display=ro ? 'none' : '';
           break;
       }
           if (fldSpec.selectIcon) fldSpec.selectIcon.style.display=ro ? 'none' : '';
           break;
       }
@@ -737,7 +737,7 @@ Rico.TableEdit.prototype = {
           Rico.EditControls.displayClrImg(c, !c.format.InsertOnly);
       }
     }
           Rico.EditControls.displayClrImg(c, !c.format.InsertOnly);
       }
     }
-    this.setReadOnly(action=='ins');
+    this.setReadOnly(action);
     for (var k=0; k<this.keys.length; k++) {
       this.keys[k].keyField.value = this.grid.buffer.getWindowValue(this.rowIdx,this.keys[k].colidx);
     }
     for (var k=0; k<this.keys.length; k++) {
       this.keys[k].keyField.value = this.grid.buffer.getWindowValue(this.rowIdx,this.keys[k].colidx);
     }
@@ -746,8 +746,8 @@ Rico.TableEdit.prototype = {
   
   addPrepare: function() {
     this.hideResponse(Rico.getPhraseById('saving'));
   
   addPrepare: function() {
     this.hideResponse(Rico.getPhraseById('saving'));
-    this.setReadOnly(true);
     this.form.reset();
     this.form.reset();
+    this.setReadOnly("ins");
     this.action.value="ins";
     for (var i=0; i<this.grid.columns.length; i++) {
       var c=this.grid.columns[i];
     this.action.value="ins";
     for (var i=0; i<this.grid.columns.length; i++) {
       var c=this.grid.columns[i];
@@ -840,7 +840,7 @@ Rico.TableEdit.prototype = {
           var i=this.keys[k].colidx;
           var fmt=this.grid.columns[i].format;
           if (fmt.EntryType.length>1 && fmt.EntryType.charAt(1)=='L') i++;
           var i=this.keys[k].colidx;
           var fmt=this.grid.columns[i].format;
           if (fmt.EntryType.length>1 && fmt.EntryType.charAt(1)=='L') i++;
-          var value=Rico.stripTags(this.grid.cell(rowIdx,i).innerHTML);
+          var value=Rico.stripTags(this.grid.cell(rowIdx,i).innerHTML).replace(/&nbsp;/g,' ');
           if (desc) desc+=', ';
           desc+=this.grid.columns[i].displayName+" "+value;
         }
           if (desc) desc+=', ';
           desc+=this.grid.columns[i].displayName+" "+value;
         }
@@ -868,7 +868,8 @@ Rico.TableEdit.prototype = {
   validationMsg: function(elem,colnum,phraseId) {
     var col=this.grid.columns[colnum];
     if (this.formPanels) this.formPanels.select(this.panelActualIdx[col.format.panelIdx]);
   validationMsg: function(elem,colnum,phraseId) {
     var col=this.grid.columns[colnum];
     if (this.formPanels) this.formPanels.select(this.panelActualIdx[col.format.panelIdx]);
-    var msg=Rico.getPhraseById(phraseId," \"" + col.formLabel.innerHTML + "\"");
+    var label=Rico.stripTags(col.formLabel.innerHTML).replace(/&nbsp;/g,' ');
+    var msg=Rico.getPhraseById(phraseId," \"" + label + "\"");
     Rico.log(' Validation error: '+msg);
     if (col.format.Help) msg+="\n\n"+col.format.Help;
     alert(msg);
     Rico.log(' Validation error: '+msg);
     if (col.format.Help) msg+="\n\n"+col.format.Help;
     alert(msg);
@@ -910,7 +911,7 @@ Rico.TableEdit.prototype = {
   },
 
   TESubmit: function(e) {
   },
 
   TESubmit: function(e) {
-    var i,lbl,spec,elem,n,dateValues=[];
+    var i,ro,lbl,spec,elem,n,dateValues=[];
 
     Rico.eventStop(e);
     Rico.log('Event: TESubmit called to validate input');
 
     Rico.eventStop(e);
     Rico.log('Event: TESubmit called to validate input');
@@ -922,6 +923,12 @@ Rico.TableEdit.prototype = {
       if (!spec || !spec.EntryType || !spec.FieldName) continue;
       elem=Rico.$(spec.FieldName);
       if (!this.isTextInput(elem)) continue;
       if (!spec || !spec.EntryType || !spec.FieldName) continue;
       elem=Rico.$(spec.FieldName);
       if (!this.isTextInput(elem)) continue;
+      switch (this.action.value) {
+        case 'ins': ro=!spec.Writeable || spec.ReadOnly || spec.UpdateOnly; break;
+        case 'upd': ro=!spec.Writeable || spec.ReadOnly || spec.InsertOnly; break;
+        default:    ro=false; break;
+      }
+      if (ro) continue;  // readonly, so don't validate
       Rico.log(' Validating field #'+i+' EntryType='+spec.EntryType+' ('+spec.FieldName+')');
 
       // check for blanks
       Rico.log(' Validating field #'+i+' EntryType='+spec.EntryType+' ('+spec.FieldName+')');
 
       // check for blanks
@@ -979,6 +986,7 @@ Rico.TableEdit.prototype = {
   },
   
   sendForm: function() {
   },
   
   sendForm: function() {
+    this.setReadOnly("reset");  // reset disabled flag so that all fields are sent to server
     this.showResponse();
     Rico.log("sendForm: "+this.grid.tableId);
     Rico.ajaxSubmit(this.form, this.options.updateURL, {method:'post',onComplete:this.responseHandler});
     this.showResponse();
     Rico.log("sendForm: "+this.grid.tableId);
     Rico.ajaxSubmit(this.form, this.options.updateURL, {method:'post',onComplete:this.responseHandler});
index b7c4851..5c16afd 100644 (file)
@@ -47,11 +47,11 @@ Rico.SimpleGrid.prototype = {
       if (!this.tabs[i]) return;
       this.hdrTabs[i]=document.getElementById(this.tableId+'_tab'+i+'h');
       if (!this.hdrTabs[i]) return;
       if (!this.tabs[i]) return;
       this.hdrTabs[i]=document.getElementById(this.tableId+'_tab'+i+'h');
       if (!this.hdrTabs[i]) return;
-      if (i==0) this.tabs[i].style.position='absolute';
-      if (i==0) this.tabs[i].style.left='0px';
-      this.hdrTabs[i].style.position='absolute';
-      this.hdrTabs[i].style.top='0px';
-      this.hdrTabs[i].style.zIndex=1;
+      //if (i==0) this.tabs[i].style.position='absolute';
+      //if (i==0) this.tabs[i].style.left='0px';
+      //this.hdrTabs[i].style.position='absolute';
+      //this.hdrTabs[i].style.top='0px';
+      //this.hdrTabs[i].style.zIndex=1;
       this.thead[i]=this.hdrTabs[i];
       this.tbody[i]=this.tabs[i];
       this.headerColCnt = this.getColumnInfo(this.hdrTabs[i].rows);
       this.thead[i]=this.hdrTabs[i];
       this.tbody[i]=this.tabs[i];
       this.headerColCnt = this.getColumnInfo(this.hdrTabs[i].rows);
@@ -63,10 +63,10 @@ Rico.SimpleGrid.prototype = {
       alert('ERROR: no columns found in "'+this.tableId+'"');
       return;
     }
       alert('ERROR: no columns found in "'+this.tableId+'"');
       return;
     }
-    this.hdrHt=Math.max(Rico.nan2zero(this.hdrTabs[0].offsetHeight),this.hdrTabs[1].offsetHeight);
-    for (i=0; i<2; i++) {
-      if (i==0) this.tabs[i].style.top=this.hdrHt+'px';
-    }
+    //this.hdrHt=Math.max(Rico.nan2zero(this.hdrTabs[0].offsetHeight),this.hdrTabs[1].offsetHeight);
+    //for (i=0; i<2; i++) {
+    //  if (i==0) this.tabs[i].style.top=this.hdrHt+'px';
+    //}
     this.createColumnArray('SimpleGridColumn');
     this.pageSize=this.columns[0].dataColDiv.childNodes.length;
     this.sizeDivs();
     this.createColumnArray('SimpleGridColumn');
     this.pageSize=this.columns[0].dataColDiv.childNodes.length;
     this.sizeDivs();
@@ -164,8 +164,8 @@ Rico.SimpleGrid.prototype = {
   },
 
   handleScroll: function(e) {
   },
 
   handleScroll: function(e) {
-    var newTop=(this.hdrHt-this.scrollDiv.scrollTop)+'px';
-    this.tabs[0].style.top=newTop;
+    var newTop=(-this.scrollDiv.scrollTop)+'px';
+    this.tabs[0].style.marginTop=newTop;
     this.setHorizontalScroll();
   },
 
     this.setHorizontalScroll();
   },
 
@@ -205,12 +205,14 @@ Rico.SimpleGrid.prototype = {
     this.dataHt=totHt-this.hdrHt;
     if (this.scrWi>0) this.dataHt+=this.options.scrollBarWidth;
     this.scrollDiv.style.height=this.dataHt+'px';
     this.dataHt=totHt-this.hdrHt;
     if (this.scrWi>0) this.dataHt+=this.options.scrollBarWidth;
     this.scrollDiv.style.height=this.dataHt+'px';
+    this.frozenTabs.style.height=this.scrollDiv.clientHeight+'px';
     var divAdjust=2;
     this.innerDiv.style.width=(this.scrWi-this.options.scrollBarWidth+divAdjust)+'px';
     var divAdjust=2;
     this.innerDiv.style.width=(this.scrWi-this.options.scrollBarWidth+divAdjust)+'px';
-    this.innerDiv.style.height=(this.hdrHt+1)+'px';
+    //this.innerDiv.style.height=(this.hdrHt+1)+'px';
     totHt+=divAdjust;
     totHt+=divAdjust;
-    this.resizeDiv.style.height=this.frozenTabs.style.height=totHt+'px';
-    this.outerDiv.style.height=(totHt+this.options.scrollBarWidth)+'px';
+    this.resizeDiv.style.height=totHt+'px';
+    
+    //this.outerDiv.style.height=(totHt+this.options.scrollBarWidth)+'px';
     this.handleScroll();
   },
   
     this.handleScroll();
   },
   
index 50416a8..83c5691 100644 (file)
@@ -133,6 +133,7 @@ Rico.Popup.prototype = {
     }
     this.content=this.contentCell.appendChild(document.createElement('div'));
     this.content.className='RicoPopupContent';
     }
     this.content=this.contentCell.appendChild(document.createElement('div'));
     this.content.className='RicoPopupContent';
+    this.content.style.position='relative';
 
     while (this.container.firstChild) {
       this.content.appendChild(this.container.firstChild);
 
     while (this.container.firstChild) {
       this.content.appendChild(this.container.firstChild);
@@ -252,7 +253,7 @@ Rico.Popup.prototype = {
     var msgHeight=this.container.offsetHeight;
     var divwi=this.container.parentNode.offsetWidth;
     var divht=this.container.parentNode.offsetHeight;
     var msgHeight=this.container.offsetHeight;
     var divwi=this.container.parentNode.offsetWidth;
     var divht=this.container.parentNode.offsetHeight;
-    this.move(parseInt((divwi-msgWidth)/2,10), parseInt((divht-msgHeight)/2,10));
+    this.move(parseInt(Math.max((divwi-msgWidth)/2,0),10), parseInt(Math.max((divht-msgHeight)/2,0),10));
   },
   
   visible: function() {
   },
   
   visible: function() {